CN117648137A - Application starting method, electronic device and readable storage medium - Google Patents

Application starting method, electronic device and readable storage medium Download PDF

Info

Publication number
CN117648137A
CN117648137A CN202311485115.XA CN202311485115A CN117648137A CN 117648137 A CN117648137 A CN 117648137A CN 202311485115 A CN202311485115 A CN 202311485115A CN 117648137 A CN117648137 A CN 117648137A
Authority
CN
China
Prior art keywords
application
electronic device
time
starting
interface
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.)
Pending
Application number
CN202311485115.XA
Other languages
Chinese (zh)
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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311485115.XA priority Critical patent/CN117648137A/en
Publication of CN117648137A publication Critical patent/CN117648137A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

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

Abstract

The application provides an application starting method, electronic equipment and a readable storage medium, relates to the technical field of terminal application, and can solve the problem of long application starting response time. The method comprises the following steps: when an application in the electronic equipment is started, the sum of the process starting time and the Activity loading time at the time of starting can be estimated according to the application starting time before the application is cold-started, and the starting response time of the application at the time of starting is determined according to the state (whether the application is started) of the process at the time of starting and the estimated sum of the process starting time and the Activity loading time at the time of starting, and when the response time is long, the snapshot page is taken as a starting page, and the application is considered to be started to be completed when the snapshot page is displayed because the interfaces displayed after the snapshot page and the application are similar or identical, so that the application starting response time is short and the user experience is good; when the response time is short, other pages can be used as starting pages.

Description

Application starting method, electronic device and readable storage medium
The present application is a divisional application of chinese patent application filed by the national intellectual property agency, application number 202210023801.4, application name "application starting method, electronic device, and readable storage medium" at day 1 and 10 of 2022.
Technical Field
The present disclosure relates to the field of terminal applications, and in particular, to an application starting method, an electronic device, and a readable storage medium.
Background
As the degree of intellectualization of electronic devices is higher, more and more application software is installed and run in the electronic devices. When a user uses a service provided by the application, the user needs to perform an operation to start the application, for example, the user clicks an icon of the application on a system desktop of the electronic device, and the electronic device may open the application to display an interface provided by the application.
When the electronic device starts the application software, the electronic device system needs to process the application software to obtain an interface of the application software, so that after the operation of a user is finished, the electronic device may delay a period of time to display the interface of the application software. Currently, logo pages or the like of application software can be displayed during this period. However, from the user's perspective, the duration of the start response of the application software (from the time when the user triggers the start of the application software to the time when the application software displays the interface of the application software) is long, and the user experience is poor.
Disclosure of Invention
The application starting method, the electronic device and the readable storage medium can improve the starting response speed of application software and improve user experience.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, the present application provides an application launching method, the method comprising:
the electronic equipment receives a first operation input by a user, wherein the first operation acts on an icon of a first application;
in response to the first operation, the electronic device initiates a first process of the first application, the electronic device displaying a first interface, the first interface comprising: advertisement page, logo page or blank page;
the electronic equipment displays a second interface of the first application, wherein the second interface comprises a first control;
responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to the third operation, the electronic device displays a second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys the first process;
the electronic equipment receives a fifth operation input by a user;
and responding to the fifth operation, the electronic equipment starts a first process, the electronic equipment displays a first image, and the electronic equipment displays a second interface, wherein the first image is an image containing a first control.
The application can display the snapshot image (the image corresponding to the last interface displayed in the last time of the background, namely the first image) of the electronic device when the background is killed by the system and restarted after the background is applied, and then display the last interface (the second interface) displayed in the last time of the background of the electronic device. From the perspective of the user, the electronic equipment is considered to be started and completed when the snapshot image is displayed, so that from the perspective of the user, the starting response speed of the application is improved.
As an implementation manner of the first aspect of the present application, after the electronic device destroys the first process, before the electronic device receives the fifth operation input by the user, the method further includes:
the electronic equipment starts a first process;
after the electronic device receives the fifth operation of the user input, the method further comprises:
and responding to the fifth operation, the electronic equipment starts a first activity of the first application, the electronic equipment displays a first image, and the electronic equipment displays a second interface, wherein the first image is an image containing a first control, and the first activity is used for generating the second interface.
In this application, if the first process of the electronic device has been started in the background before the electronic device receives the fifth operation input by the user, the snapshot image of the electronic device (the image corresponding to the last interface displayed when the electronic device was in the background last time, i.e., the first image) may be displayed first, and then the last interface (the second interface) displayed when the electronic device was in the background last time may be displayed. From the perspective of the user, the electronic equipment is considered to be started and completed when the snapshot image is displayed, so that from the perspective of the user, the starting response speed of the application is improved.
As another implementation manner of the first aspect of the present application, the method further includes:
the electronic equipment displays a fourth interface of the second application, wherein the fourth interface comprises a second control;
responsive to a sixth operation acting on the second control, the electronic device displays a fifth interface of the second application;
in response to the seventh operation, the electronic device displays a fourth interface of the second application;
the electronic equipment receives an eighth operation input by a user;
in response to the eighth operation, the electronic device switches the second application to background operation;
the electronic device destroys a second process of the second application;
the electronic equipment receives a ninth operation input by a user;
in response to the ninth operation, the electronic device starts the second process, the electronic device displays a sixth interface, and the electronic device displays a fourth interface, wherein the sixth interface includes: advertisement page, logo page or blank page.
In this application, the start page that may be displayed is different for different applications, and as an example, the second application may be displayed as an advertisement page, logo page or blank page at the time of cold start, instead of the snapshot page.
As another implementation form of the first aspect of the present application, before the electronic device displays the first image, the method further includes:
The electronic device determines an index in which a first image is stored in the electronic device;
the electronic device determines that the application starting response time length of the first application is smaller than a first value, wherein the application starting response time length is the time length from the electronic device receiving the fifth operation to the electronic device displaying the second interface;
the electronic equipment determines that a first activity is stored in a task stack of a first application, and the first activity is used for generating a second interface;
the electronic device acquires an index of a first image stored in the electronic device and window information of a first application, wherein the index of the first image is used for representing a storage position of the first image in the electronic device, and the window information of the first application comprises display parameters when the electronic device displays the first image.
In the application, if the application is killed in the background, when the application is restarted, it is required to determine that a first activity is stored in a task stack of the first application, so as to ensure that the interface of the first application displayed after the electronic device is started and the content of the snapshot are the same and similar; determining an index of a first image stored in the electronic device and window information of a first application to ensure that a snapshot can be obtained to display the snapshot based on the window information; in order to obtain better experience, a condition that the response time of the first application is shorter (smaller than a first value) when the first application is started can be set, and a snapshot page is displayed; if the response time is longer (greater than or equal to the first value), the displayed snapshot page is longer, the user mistakenly uses the displayed snapshot page as the real interface of the application, and after the user operates on the snapshot page, the application does not respond, so that the user experience is poor.
As another implementation manner of the first aspect of the present application, before the electronic device displays the sixth interface, the method further includes:
the electronic equipment determines an index of a second image stored in the electronic equipment, wherein the second image is an image containing a second control;
the electronic device determines that an application launch response of the second application is greater than or equal to the first value.
In the application, when the response time is longer (greater than or equal to the first value), the advertisement page, the Logo page or the blank page can be used as the starting page.
As another implementation manner of the first aspect of the present application, after the electronic device receives the fifth operation input by the user, the method further includes:
the electronic device determines whether a first process is started;
under the condition that the first process is not started, the electronic equipment determines the application starting response time length of the first application as a first time length, wherein the first time length is determined by the historical application starting time length of the first application during cold starting;
under the condition that the first process is started, the electronic equipment determines the started duration of the first process;
under the condition that the first process is started and longer than or equal to the second time, determining that the application starting response time of the first application is a third time, wherein the second time is determined by the historical process starting time when the first application is cold started, and the third time is determined by the historical application starting time and the historical process starting time when the first application is cold started;
And under the condition that the started time length of the first process is smaller than the second time length, determining that the application starting response time length of the first application is a fourth time length, wherein the fourth time length is determined by the historical application starting time length of the first application during historical cold starting and the started time length of the first process.
As another implementation manner of the first aspect of the present application, the determining, by the electronic device, whether the first process is started includes:
the electronic equipment acquires a processrunning flag bit of a first process;
in the case that the processrunning flag bit is the first identifier, the electronic device determines that the first process has been started;
in the event that the processrun flag bit is not the first identifier, the electronic device determines that the first process is not started.
As another implementation manner of the first aspect of the present application, the determining, by the electronic device, a started duration of the first process includes:
the electronic equipment calculates a second difference value between the current time and the starting time of the first process, the started time of the first process is the second difference value, and the starting time of the first process is the time when the processing running flag bit of the first process becomes the first identifier last time.
Or the electronic equipment calculates a third difference value between the moment of receiving the fifth operation and the starting moment of the first process, wherein the started duration of the first process is the third difference value;
Or the electronic equipment calculates a fourth difference value between the first moment and the starting moment of the first process, wherein the first moment is any moment between the moment when the electronic equipment receives the fifth operation and the current moment, and the started duration of the first process is the fourth difference value.
As another implementation manner of the first aspect of the present application, the method further includes:
the method comprises the steps that the electronic equipment obtains historical application starting time and historical process starting time when cold starting is performed last N times on a first application history, wherein N is a natural number which is greater than or equal to 1;
the electronic equipment obtains a second value according to the historical application starting time length of the last N times of cold starting on the first application history, wherein the second value is the sum of the estimated process starting time length and the Activity loading time length of the first application when the first application is started at this time;
the electronic equipment obtains a third value according to the historical process starting time length of the last N times of cold starting on the first application history, wherein the third value is the estimated process starting time length of the first application when the first application is started at this time;
the first time length is a second value, the second time length is a third value, the third time length is the second value minus the third value, and the fourth time length is the second value minus the started time length of the first process.
As another implementation manner of the first aspect of the present application, the obtaining, by the electronic device, the second value according to a historical application start duration of the last N times of cold starts on the first application history includes:
The method comprises the steps that the electronic equipment obtains historical application starting time length and corresponding weights respectively when the first application is cold started for the last N times, wherein N is a natural number which is more than or equal to 2;
the electronic equipment calculates a weighted average of historical application starting time lengths at the last N times of cold starting in the history to obtain a second value;
the electronic device obtaining a third value according to the historical process starting time length of last N times of cold starting on the first application history comprises:
the electronic equipment acquires historical process starting time length at last N times of cold starting in history and weights corresponding to the historical process starting time length and the historical process starting time length respectively;
the electronic device calculates a weighted average of historical process starting time lengths at the last N times of cold starting in the history to obtain a third value.
As another implementation manner of the first aspect of the present application, a time of an ith cold start at a last N times of cold starts in history is smaller than a time of a jth cold start, a weight of a history application start time length at the ith cold start is smaller than or equal to a weight of a history application start time length at the jth cold start, a weight of a history process start time length at the ith cold start is smaller than or equal to a weight of a history process start time length at the jth cold start, i and j are both positive integers smaller than or equal to N, and i is not equal to j.
As another implementation manner of the first aspect of the present application, the weight of the application start duration at the ith cold start is S N-i S is the attenuation coefficient.
As another implementation of the first aspect of the present application, N is equal to 1.
As another implementation manner of the first aspect of the present application, in a case where the first process is not started, the method further includes:
after the first process is started, the electronic equipment sends the starting time length of the current process of the first process to a systemserver process through the first process;
the electronic equipment acquires the starting time of the current process from the systemserver process;
the electronic equipment stores the current process starting time length which is the historical process starting time length when the first application is started next time.
As another implementation manner of the first aspect of the present application, in a case where the first process is not started, the method further includes:
after the electronic equipment displays the second interface, the electronic equipment acquires a first moment when drawing of the second interface is completed and a second moment when the electronic equipment detects a fifth operation through an actigyMetricsLoger;
the electronic equipment calculates the difference between the first moment and the second moment through an actigyMetricsLogger to obtain the current application starting time of the first application;
The electronic equipment stores the starting time length of the application, wherein the starting time length of the application is the historical application starting time length when the first application is started next time.
As another implementation manner of the first aspect of the present application, after the fourth operation of the electronic device receiving the user input, the method further includes:
the electronic equipment generates a first image based on the second interface and stores the first image;
the electronic device caches an index of the first image in the first storage space.
In the application, when the application is in the background, the image of the last interface displayed before the application is in the background can be stored and stored, and the snapshot index can be stored in the first storage space.
As another implementation manner of the first aspect of the present application, after the electronic device destroys the first process of the first application, the method further includes:
the electronic equipment acquires an index of a first image from a first storage space;
the electronic equipment acquires window information of a first application from a window state;
the electronic equipment caches the index of the first image and the window information of the first application in the second storage space;
the electronic device caches activities at the top of the task stack of the first application in the task stack, wherein the activities at the top of the task stack of the first application are first activities.
In the system native flow, after the application is killed in the background, the electronic device deletes the snapshot index of the first storage space and clears the window information of the first application recorded by the window state, so that the electronic device needs to cache the snapshot index of the first storage space and the window information of the first application recorded by the window state in the second storage space so as to obtain the snapshot index and the window information when the electronic device is restarted. In addition, since the Activity in the task stack depends on the information recorded by the window, when the application is killed in the background, if the window is cleared, the Activity at the top of the task stack cannot be acquired when the application is restarted. Therefore, the Activity at the top of the task stack of the first application also needs to be cached in the task stack again.
As another implementation manner of the first aspect of the present application, after the electronic device caches the index of the first image, the window information of the first application, and the first activity, the method further includes:
the electronic equipment deletes the index of the first image cached in the first storage space;
and the electronic equipment deletes the window information of the first application recorded by the window state.
As another implementation manner of the first aspect of the present application, the electronic device obtaining the index of the first image and the window information of the first application stored in the electronic device includes:
The electronic device obtains an index of the first image and window information of the first application from the second storage space.
As another implementation manner of the first aspect of the present application, before the electronic device obtains the index of the first image and the window information of the first application from the second storage space, the method further includes:
the electronic device does not obtain an index of the first image from the first storage space.
As another implementation manner of the first aspect of the present application, the determining, by the electronic device, that the first activity is stored in the task stack of the first application includes:
the electronic equipment sends a first request to a task stack of a first application through a tasksnapshotsource, wherein the first request is used for acquiring a first activity cached in the task stack of the first application;
under the condition that the electronic equipment acquires the cached first activity from the task stack of the first application, the electronic equipment determines that the first activity is stored in the task stack of the first application.
As another implementation manner of the first aspect of the present application, before the electronic device sends the first request to the task stack of the first application through the tasknapshotsurface, the method further includes:
the electronic equipment sends a second request to a task stack of the first application through the tasksnapshotsource, wherein the second request is used for acquiring a first activity recorded in the task stack of the first application;
The electronic device does not acquire the first activity based on the second request.
As another implementation manner of the first aspect of the present application, before the electronic device determines that the task stack of the first application has the first activity stored therein, the method further includes:
the electronic device obtains a task stack of the first application from the actiglyrecord through the tasksnapshotsource.
As another implementation manner of the first aspect of the present application, after the electronic device caches the index of the first image, the window information of the first application, and the first activity, the method further includes:
under the condition that the display configuration of the electronic equipment is modified, deleting window information cached in the second storage space and an index of the first image by the electronic equipment, and deleting a first activity cached in a task stack of the first application;
under the condition that the index of the first image and the duration of the window information of the first application stored in the second storage space are longer than the fifth duration, deleting the window information and the index of the first image cached in the second storage space by the electronic equipment, and deleting the first activity cached in the task stack of the first application;
under the condition that the electronic equipment is shut down or restarted, the electronic equipment deletes window information cached in the second storage space and the index of the first image, and deletes the first activity cached in the task stack of the first application;
Under the condition that the electronic equipment uninstalls the first application, the electronic equipment deletes the window information cached in the second storage space and the index of the first image, and deletes the first activity cached in the task stack of the first application.
In the application, after the display configuration of the electronic device is modified, the display mode of the snapshot page and the content of the interface after the application is started may be different, so that the user experience is poor, and therefore, the electronic device can delete the cached information under the condition that the display configuration is modified. Of course, under the condition that the caching time of the cached information is too long, the interface of the application may change, so that the situation that the content of the snapshot page and the interface after the application is started may be different, and the user experience is poor is avoided, and therefore the electronic equipment can delete the cached information under the condition that the caching time is too long. In addition, under the condition that the electronic equipment uninstalls the first application, the electronic equipment is shut down or restarted, the electronic equipment deletes the relevant information of the application, and correspondingly, the cache information is deleted together.
As another implementation form of the first aspect of the present application, the display parameters include screen adaptation information and window attribute information.
In a second aspect, the present application provides an application launching method, the method comprising:
the electronic equipment displays a second interface of the first application, wherein the second interface comprises a first control;
responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to the third operation, the electronic device displays a second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys a first process of a first application;
the electronic equipment starts a first process;
the electronic equipment receives a fifth operation input by a user;
in response to the fifth operation, the electronic device initiates a first activity, the electronic device displays a first interface, and the electronic device displays a second interface, wherein the first activity is used for generating the second interface, and the first interface comprises: advertisement page, logo page or blank page;
responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to the third operation, the electronic device displays a second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
Responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys the first process;
the electronic equipment starts a first process;
the electronic equipment receives a fifth operation input by a user;
in response to the fifth operation, the electronic device starts a first activity, the electronic device displays a first image, and the electronic device displays a second interface, wherein the first image is an image containing a first control.
In this application, if the first process of the first application is already started in the background before the electronic device receives the fifth operation input by the user, the snapshot image (the image corresponding to the last interface displayed when the electronic device was in the background last time, i.e., the first image) of the electronic device may be displayed first, and then the last interface (the second interface) displayed when the electronic device was in the background last time may be displayed. From the perspective of the user, the electronic equipment is considered to be started and completed when the snapshot image is displayed, so that from the perspective of the user, the starting response speed of the application is improved.
Of course, in the practical application, the first value may be set, the starting response time of the first application is estimated, the starting response time is compared with the first value, and the snapshot page is used as the starting page when the starting response time is smaller than the first value; and taking the logo page, the blank page or the advertisement page as a starting page under the condition that the starting response length is larger than or equal to the first value.
In a third aspect, there is provided an electronic device comprising a processor for executing a computer program stored in a memory, implementing the method of any of the first aspects of the present application.
In a fourth aspect, there is provided a system on a chip comprising a processor coupled to a memory, the processor executing a computer program stored in the memory to implement the method of any of the first aspects of the present application.
In a fifth aspect, there is provided a computer readable storage medium storing a computer program which when executed by one or more processors performs the method of any of the first aspects of the present application.
In a sixth aspect, the present application provides a computer program product for, when run on a device, causing the device to perform the method of any one of the first aspects of the present application.
It will be appreciated that the advantages of the third aspect to the sixth aspect may be found in the relevant description of the first aspect, and are not described here again.
Drawings
Fig. 1 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic diagram of interface change at the time of application start provided in the embodiment of the present application;
FIG. 3 is a schematic diagram illustrating interface changes at the start of another application according to an embodiment of the present application;
FIG. 4 is a schematic diagram of interface changes at the start of another application according to an embodiment of the present application;
fig. 5 is a schematic flow chart of an application start-up and back-off platform according to an embodiment of the present application;
FIG. 6 is a flowchart of an improved application start-up fallback background according to an embodiment of the present application;
fig. 7 is a schematic diagram of an operation interface for triggering application start according to an embodiment of the present application;
FIG. 8 is a timing diagram of an application start method according to an embodiment of the present disclosure;
FIG. 9 is a timing diagram of another method for starting an application according to an embodiment of the present application;
FIG. 10 is a timing diagram of another method for starting an application according to an embodiment of the present application;
fig. 11 is a flowchart of an application starting method according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a time relationship at the time of cold start of an application according to an embodiment of the present application;
FIG. 13 is a schematic diagram of a time relationship at a cold start of another application provided in an embodiment of the present application;
FIG. 14 is a schematic diagram of a time relationship at the time of starting an application temperature according to an embodiment of the present application;
FIG. 15 is a schematic diagram of a time relationship at the time of starting another application temperature according to an embodiment of the present application;
Fig. 16 is a schematic flow chart of an application start-up according to an embodiment of the present application;
fig. 17 is a technical architecture diagram of an application starting method according to an embodiment of the present application;
FIG. 18 is a timing diagram of an application launch method according to an embodiment of the present disclosure;
FIG. 19 is a schematic diagram of interface change at the start of an application according to an embodiment of the present application;
FIG. 20 is a timing diagram of another method for starting an application according to an embodiment of the present application;
FIG. 21 is a timing diagram of another method for starting an application according to an embodiment of the present disclosure;
FIG. 22 is a timing diagram of another method for application start provided in an embodiment of the present application;
FIG. 23 is a timing diagram of another method for starting an application according to an embodiment of the present application;
fig. 24 is a timing chart of another application starting method according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that in embodiments of the present application, "one or more" means one, two, or more than two; "and/or", describes an association relationship of the association object, indicating that three relationships may exist; for example, a and/or B may represent: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," "fourth," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The application starting method provided by the embodiment of the application can be applied to electronic equipment. The electronic device may be a tablet computer, a cell phone, a wearable device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), or the like. The embodiment of the application does not limit the specific type of the electronic equipment.
Fig. 1 shows a schematic structural diagram of an electronic device. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. Among other things, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. For example, the processor 110 is configured to execute an application starting method in an embodiment of the present application.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store application programs (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system.
In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio signals to analog audio signal outputs and also to convert analog audio inputs to digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to listening to voice information. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A.
The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The camera 193 is used to capture still images or video. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1.
The embodiment of the present application is not particularly limited to a specific structure of an execution body of an application starting method, as long as processing can be performed by running a code recorded with an application starting method of the embodiment of the present application, with an application starting method provided according to the embodiment of the present application. For example, an execution body of an application starting method provided in the embodiment of the present application may be a functional module in an electronic device that can call a program and execute the program, or a processing apparatus, for example, a chip, applied to the electronic device.
Applications may be installed and run in the electronic device. When the electronic device runs the application A (any application installed in the electronic device) in the foreground, the display screen of the electronic device displays the interface of the application A, and a user of the electronic device can perform interactive operation with the interface of the application A currently displayed by the display screen of the electronic device. When the electronic equipment runs the application A in the background, the electronic equipment does not display the interface of the application A any more, and a user of the electronic equipment cannot perform interactive operation with the interface of the application A; of course, the application a may receive other information during the background running process (e.g., the instant messaging application may receive messages sent by other users) and notify the users of the other information.
When the user uses the electronic device, if the application a is not running (not running in the background or not running in the foreground), the user starts the application a through the icon of the application a on the desktop of the electronic device, the electronic device first creates and starts the process of the application for the application, after the process of the application a has completed starting, the Activity (for example, activity 1) of the application a is loaded through the process, the Activity1 enters the task stack and is located at the top of the task stack, and the electronic device displays that the Activity1 corresponds to one interface 1. The user can perform an interactive operation through the interface 1 corresponding to the Activity1, if the interactive operation causes the electronic device to display another new interface, the process of the application a in the system loads another new Activity (for example, activity 2), the Activity2 enters the task stack and is located at the top of the task stack, and the old Activity1 is pushed to the lower side of the task stack. Correspondingly, the display screen of the electronic device displays the interface 2 corresponding to the Activity2, and the old interface of the Activity1 is destroyed. Of course, the user may perform an interactive operation (e.g., a return operation) on the interface 2 corresponding to the Activity2, so that the Activity1 in the task stack returns to the top of the task stack, and then the Activity2 is destroyed, and accordingly, the display screen of the electronic device displays the interface 1 corresponding to the Activity1 at the top of the task stack.
As can be appreciated from the above description, the respective interfaces displayed by the application load the respective activities in dependence on the process of the application. In addition, after an application enters into the background run from the foreground, the process of the application may still exist in the system (e.g., the process of the application is not eliminated). If the user clicks the icon of the application to enable the application to run in the foreground, the system does not need to create and start a process for the application because the process of the application exists in the background of the system; if the Activity of the application still exists in the system memory, the application does not need to repeat the operations of initializing, rendering and drawing the Activity, but displays an interface corresponding to the Activity at the top of a task stack of the application in the foreground, and the starting process is recorded as hot start.
After an application runs from the foreground into the background, the process of the application may still exist in the system (e.g., the process of the application is not eliminated). If the application is killed off in the background (the process of the application is destroyed and Activity is reclaimed), in this case, the system background does not have the process of the application. However, after the process of the application is destroyed, the application may also have a self-priming behavior, i.e., the application may create and launch a process for the application in the background self-requesting system. If after the background of the system successfully creates and starts the process of the application, when the user clicks the icon of the application to make the application run in the foreground, the system does not need to create and start the process for the application because the background of the system has the process of the application; since the Activity of the application has been recovered before, the system needs to load the Activity of the application through the process of the application until the interface of the application (the interface corresponding to the successfully loaded Activity) is displayed after the successfully loaded Activity is loaded, and this starting process is denoted as warm start.
After an application enters the background from the foreground to run, the process of the application may also be destroyed, and at the same time, the Activity is reclaimed, i.e. the process of the application does not exist in the system background. If the user clicks the icon of the application to make the application run in the foreground, because the background of the system does not have a process of the application, the system needs to create and start a process for the application, after the process finishes starting, the application is loaded with the Activity of the application through the process of the application until the interface of the application (the interface corresponding to the successfully loaded Activity) is displayed after the successful Activity is loaded, and the starting process is recorded as cold starting.
As another example of a cold start, when an application is first started after the electronic device is started, the starting process of the application is also the cold start described above.
In a practical application, after an application enters a background from a foreground and runs, the application is killed (the process of the application is destroyed and the Activity is recovered), and in this case, the process of the application does not exist in the system background. However, after the process of the application is destroyed, the application may also have a self-priming behavior, i.e., the application may create and launch a process for the application in the background self-requesting system. When the user clicks on the icon of the application so that the application is running again in the foreground, the application continues to perform subsequent operations according to the current state of the application's process (e.g., the application's process may or may not have been started up during the start-up process, or may not have been created) until the application's interface is displayed. This mode of start-up may be either a cold start or a warm start.
Whether cold or warm, the electronic device needs to perform a series of processes (e.g., loading the Activity of the application through the application process) to display the interface of the application. From the user clicking on the application icon to displaying the application's interface, a period of time is required, during which the electronic device may display a start page in an actual application. The start page is a page displayed before the electronic device displays an interface of the application itself (e.g., a main interface, a last interface displayed before the last time the electronic device was returned to the background) when the application is started, and is denoted as a start page. The start page may include an advertisement page, a blank page, a Logo page, and a snapshot page. For ease of description, the advertisement page, blank page, and Logo page may be collectively referred to as transition pages. I.e., the start page includes a transition page and a snapshot page. Examples of transition pages and snapshot pages may be specifically described with reference to the embodiments of fig. 2-4.
As an example of a scenario of a start page, referring to fig. 2, an interface change schematic diagram during a cold start or warm start application is provided in an embodiment of the present application. Taking a task stack with no application in the background of the system at the starting time as an example.
Referring to fig. 2 (a), a user clicks an icon of an application on a desktop of the system, and if the current starting mode of the application is cold start or warm start, since a task stack of the application does not exist in a background of the system during starting, the electronic device displays a main interface of the application after the starting is completed, referring to the main interface shown in fig. 2 (d).
In practical applications, before the electronic device displays the complete interface shown in (d) of fig. 2, there is typically a process of displaying the interface shown in (c) of fig. 2. The interface shown in (c) in fig. 2 is an interface of the electronic device that corresponds to a start window (startWindow) before the interface shown in (d) in fig. 2. Of course, in practical applications, since the refresh frequency of the display screen of the electronic device is faster, from the perspective of the user, the process of displaying the interface of the start window shown in fig. 2 (c) by the electronic device may not be perceived, but the interface shown in fig. 2 (d) by the electronic device may be perceived directly. The embodiment of the present application does not limit whether the interface shown in (c) in fig. 2 can be perceived.
Taking the electronic device cold start application as an example, after the user clicks the icon of the application, referring to (e) in fig. 2, the electronic device loads the logo page (during which the system desktop is still displayed) first, so as to obtain the interface corresponding to the logo page, and after obtaining the interface corresponding to the logo page, the electronic device displays the logo page. Of course, during the display of the logo page by the electronic device, the system will create and start the application process, after the application process is successfully created, the application process is used to load the Activity1 corresponding to the main interface, and during the loading of the Activity1, the start window of the main interface corresponding to the Activity1 is obtained first. After the starting window is obtained, the electronic equipment displays the starting window, the system continues and adds view in the starting window to obtain a first frame of the main interface corresponding to the Activity 1; after the first frame of the main interface corresponding to the Activity1 is obtained, the first frame of the electronic equipment interface 1. Therefore, the electronic device needs to perform operations of creating and starting a process, loading an Activity, and the like for a period of time to obtain the interface of the start window shown in (c) of fig. 2, so that a transition page can be displayed during the period of time, and specifically, see a logo page shown in (b) of fig. 2. The interface shown in fig. 2 (b) is described by taking logo page as an example, and in practical application, advertisement pages, blank pages, etc. may be used.
Of course, in actual application, when the electronic device starts the application at a temperature, if the system background does not have the task stack of the application, the starting page is also the transition page, and only the system may not be creating the process of the application, but may directly adopt the process of the application to load the Activity1. No further examples are given.
As another example of a scenario of a start page, referring to fig. 3, a schematic diagram of interface change at a cold start or a warm start is provided in an embodiment of the present application. Taking a task stack with an application in the background of the system at the time of starting as an example.
Referring to fig. 3 (a), an application display interface 1 in an electronic device, a user triggers application a to go back to background operation by a gesture (e.g., a gesture sliding up from the bottom of the display screen of the electronic device in the figure).
Referring to (b) in fig. 3, the electronic device saves the interface as a snapshot. The snapshot may not include status bar content.
Referring to (c) in fig. 3, after the application is returned to the background running, the electronic device may display a system desktop, and the user clicks an icon of the application on the system desktop, if the current starting mode of the application is cold start or warm start, and when the system background has a task stack of the application during starting, the electronic device displays a last interface displayed before the application is returned to the background after the starting is completed. See (f) in fig. 3.
In practical applications, before the electronic device displays the complete interface shown in (f) in fig. 3, there is typically a process of displaying the interface shown in (e) in fig. 3. The interface shown in (e) in fig. 3 is an interface of the electronic device that corresponds to a start window (startWindow) before the interface shown in (f) in fig. 3. Of course, in practical applications, since the refresh frequency of the display screen of the electronic device is faster, from the perspective of the user, the process of displaying the interface of the start window shown in (e) in fig. 3 by the electronic device may not be perceived, but the interface shown in (f) in fig. 3 by the electronic device may be perceived directly. The embodiment of the present application does not limit whether the interface shown in (e) of fig. 3 can be perceived.
Taking the example when the electronic device cold starts the application, after the user clicks the icon of the application, see (g) in fig. 3, and in particular, reference may be made to the description related to (e) in fig. 2. Only, as the task stack of the application is not destroyed, the electronic device loads the Activity2 corresponding to the last interface displayed before the electronic device is returned to the background. As described in fig. 2, the electronic device needs to perform operations of creating and starting a process, loading an Activity, and the like for a period of time to obtain the interface of the start window shown in (e) in fig. 3, so that a transition page can be displayed during the period of time, and specifically, see a logo page shown in (d) in fig. 3. The interface shown in fig. 3 (d) is described by taking logo page as an example, and in practical application, advertisement pages, blank pages, etc. may be used.
Of course, in actual application, when the electronic device starts the application at a temperature, if the task stack of the application exists in the background of the system, the starting page is also the transition page, and only the system may not be creating the process of the application, but may directly load the Activity2 by adopting the process of the application. No further examples are given.
As another scenario example of the start page, referring to fig. 4, a schematic diagram of interface change during a hot start application is provided in an embodiment of the present application.
Fig. 4 (a) to 4 (c) may be referred to the related description of fig. 3 (a) to 3 (c), and will not be described again.
Referring to fig. 4 (c), the user clicks an icon of the application on the system desktop, and if the current starting mode of the application is hot start, the electronic device displays the last interface displayed before the application is last backed up to the background after the start is completed, and specifically, referring to fig. 4 (f) as an example, the last interface displayed before the application is last backed up to the background is shown.
As understood from the above embodiments, before the electronic device draws the complete interface shown in (f) of fig. 4, there is typically a process of displaying the interface shown in (e) of fig. 4. The interface shown in (e) in fig. 4 is an interface of the electronic device that depicts a corresponding start window before the interface shown in (f) in fig. 4. Of course, in practical applications, since the refresh frequency of the display screen of the electronic device is faster, from the perspective of the user, the process of displaying the interface of the start window shown in fig. 4 (e) by the electronic device may not be perceived, but the interface shown in fig. 4 (f) by the electronic device may be perceived directly. The embodiment of the present application also does not limit whether the interface shown in (e) of fig. 4 can be perceived.
When the electronic device is started up, after the user clicks the icon of the application, referring to (g) in fig. 4, the electronic device first loads the snapshot page (during which the system desktop is still displayed), obtains the interface corresponding to the snapshot page, and after obtaining the interface corresponding to the snapshot page, the electronic device displays the snapshot page. Because the process of the application exists and the Activity of the application is not recovered, when the electronic device displays the snapshot page, as long as the Activity2 at the top of the resume task stack is obtained, a starting window corresponding to the Activity2 is obtained first, the system continues and adds view in the starting window, and then the first frame of the interface 1 corresponding to the Activity2 is obtained. After the first frame of the main interface corresponding to the Activity1 is obtained, the first frame of the electronic equipment interface 1. As described above, the electronic device also needs to perform the operation of resume Activity2 (e.g., rendering, etc.) for a period of time to obtain the interface shown in (f) in fig. 4, so that the snapshot page (the image corresponding to the last interface displayed before the application was last backed back to the background) may be displayed during the period of time, which may be specifically referred to the snapshot page shown in (d) in fig. 4.
As can be understood from the scene example shown in fig. 2 to the scene example shown in fig. 4, the start page provided in the embodiment of the present application includes: transition pages and snapshot pages. The transition pages in the examples shown in fig. 2 and 3 are not related to the interface displayed after the application is started, and the user experience is poor. The snapshot page in the example shown in FIG. 4 is generally the same or similar to the content of the interface displayed after the application is launched, the user's experience being better than the experience of displaying the transition page; however, in the case that the application is started for a long time, the user may consider the displayed snapshot page as the real interface of the application, and if the user operates on the snapshot page, the application will not respond to the operation of the user, and the user experience is poor.
By combining the two cases, the embodiment of the application can estimate the time from the moment when the user clicks the application icon on the desktop of the system to the time elapsed between the display of the starting window corresponding to the first frame application interface by the electronic equipment. For example, the time elapsed from the point of clicking of the application icon shown in (a) in fig. 2 to the point of time when the electronic device displays the interface shown in (c) in fig. 2; the time elapsed from the click time of the application icon shown in (c) in fig. 3 to the time elapsed between the display of the interface shown in (e) in fig. 3 by the electronic device; the time elapsed from the click time of the application icon shown in (c) in fig. 4 to the time elapsed between the display of the interface shown in (e) in fig. 4 by the electronic device. The embodiment of the application can record the time period as the display duration of the starting page.
In addition, since the time from the interface shown in (c) in fig. 2 to the interface shown in (d) in fig. 2 is very short, the embodiment of the present application may also estimate the time from the time when the user clicks the application icon on the system desktop to the time when the electronic device displays the first frame application interface. For example, from the point of clicking of the application icon shown in fig. 2 (a) to the time elapsed between the electronic device displaying the first frame application interface shown in fig. 2 (d); the time elapsed from the click time of the application icon shown in (c) in fig. 3 to the time elapsed between the electronic device displaying the first frame application interface shown in (f) in fig. 3; the time elapsed from the click time of the application icon shown in (c) in fig. 4 to the time elapsed between the electronic device displaying the first frame application interface shown in (f) in fig. 4. The embodiment of the application can record the time as the starting response time of the application.
As can be appreciated from the above examples, the start response time of the application and the display time of the start page can be considered to be similar or equal. And displaying the snapshot page before displaying the interface of the application under the condition that the estimated starting response time of the application or the starting page display time is short, and displaying the transition page before displaying the interface of the application under the condition that the estimated starting response time of the application or the starting page display time is long.
However, it is necessary to pre-judge whether to display the transition page or the snapshot page after the click time of the application icon, so that the application current start response time or the start page display time needs to be estimated after the click time of the application icon, then the estimated application current start response time (or the start page display time) is compared with a preset threshold value, the transition page is used as the start page to be displayed when the estimated application current start response time (or the start page display time) is greater than or equal to the threshold value, and the snapshot page is used as the start page to be displayed when the estimated application current start response time (or the start page display time) is less than the threshold value.
Of course, in order to avoid the situation that the snapshot page is inconsistent with the interface of the application when the snapshot page is displayed as the start page, the embodiment of the application needs to be implemented under the situation that the task stack of the application is not destroyed. When the application runs in the foreground again under the condition that the task stack of the application is not destroyed (i.e. the system has the task stack of the application), the system loads an interface corresponding to the Activity at the top of the task stack through the process of the application.
In practical application, when application a is returned from the foreground to the background, although a snapshot of the last interface and a snapshot index displayed by application a before returning to the background are saved. However, when the process of the application a is killed in the background, the system typically clears the snapshot index of the application a and other information (for example, the window state of the application a), so that when the application a is restarted (cold start or warm start), the snapshot of the application a cannot be obtained according to the snapshot index to display the snapshot page of the application a, but a transition page display procedure is executed, and then the real interface of the application a is displayed.
In view of this, the embodiment of the present application may set up: when the background application meets the condition of killing set by the system, before the snapshot index is cleared, the snapshot index of the application to be cleared is cached from the current storage space (for example, the storage space A) to another storage space (for example, the storage space B). It should be noted that when the application is killed by the system in the background, the snapshot index cached in the storage space a is cleaned together, however, the snapshot index cached in the storage space B is not cleaned because the application a is killed in the system background. When the application is restarted to the foreground operation, whether the storage space B is cached with the snapshot index of the application or not can be checked; and if the snapshot index of the application is cached, acquiring a snapshot page based on the cached snapshot index of the application. Of course, in practical applications, other information (for example, window state of application a) may also be stored in the storage space B together.
A flowchart illustrating how embodiments of the present application may display a snapshot page when an application is restarted after the background is killed will be described below with reference to fig. 5 and 6. Fig. 5 is a system original flow.
And step A1, the electronic equipment detects an operation of triggering the application A to return to the background.
In this embodiment, the operation of triggering the application a to return to the background may be a gesture navigation operation.
As an example, the user slides up the bottom of the display screen of the electronic device to trigger application a to go back to background operation while the electronic device displays the system desktop.
Of course, in the actual application, the user triggers the application a to return to the background running, and the electronic device may also display other interfaces outside the desktop of the system.
As an example, a user triggers the electronic device to display a side navigation bar through a gesture, the side navigation bar is a suspension interface appearing on the side surface of the electronic device, the suspension interface comprises icons of a plurality of applications, the user clicks an icon of an application B in the side navigation bar, and the electronic device controls the application a to switch from a foreground to a background, and meanwhile the electronic device displays an interface of the application B.
The above examples all take gestures of a user on a touch screen of the electronic device as examples to trigger the electronic device to switch applications to the background. In practical application, the application can be switched from the foreground to the background in a voice command or a blank gesture mode.
As an example, in the case where the electronic device displays the interface of the application a, the user utters the voice information of "back to the system desktop", and the electronic device switches the application a to the system background, and the electronic device displays the system desktop.
The embodiment of the application is not limited to a triggering mode of running from the foreground to the background. After the application is applied to background operation, an interface displayed by the electronic equipment is not limited.
And step A2, under the condition that the electronic equipment detects the operation of triggering the application A to return to the background, storing the snapshot of the application A, and caching the snapshot index of the application A into the storage space A.
In the specific implementation, if the operation of triggering the application A to return to the background is a gesture that the bottom of the display screen slides upwards, a navigation component in the system can detect the operation, the navigation component informs an ATMS in the system, and the ATMS sends an instruction to the Snapshot in the system, wherein the instruction is used for instructing the Snapshot to generate a Snapshot of the application A and store the Snapshot. After Snapshot generates a Snapshot of application A, the Snapshot index of application A is cached in snapshotvache. The storage space a is the snapshontcache.
Of course, in the case where the operation of triggering the application a to return to the background is an operation on the side navigation bar, the side navigation bar of the electronic device detects the operation, and the navigation component notifies the ATMS in the system. Other cases are not exemplified one by one.
And A3, the electronic equipment detects that the application A meets the condition of killing.
Typically, the system sets a process reclamation mechanism, and when an application runs in the foreground, the system allocates a portion of memory for each application, and after the application is backed up in the background, the system typically does not kill the application immediately, but rather caches relevant data of the application that is backed up in the background. Under the condition that the system is opened and more applications are available, the processes of the background cache of the system are more and more, and the large memory of the electronic equipment can be occupied. If the system memory is insufficient, the system kills the application (destroys the application process) according to the process recovery mechanism.
And A4, the electronic equipment kills the process of the application A running in the background, and simultaneously clears the snapshot index of the application A cached in the storage space A.
When an application is killed (a process is killed), the Activity of the application is destroyed, and the snapshot index of the application is cleaned up. However, the system provides some remedy, i.e. the task stack of the application is not cleaned up. So, under the condition that the application satisfies the condition of being killed, the process of the application may be destroyed, and then the task stack of the application exists in the system.
And B1, the electronic equipment detects an operation of triggering the application A to enter a foreground operation.
In this embodiment, the triggering operation of the application a to enter the foreground operation may be an operation that the user clicks an icon of the application a on the system desktop. In this case, the desktop launcher detects an operation that triggers application a to enter foreground operation.
Of course, in the actual application, the application may jump to the application a through other applications to start the application a, and in this scenario, other applications may also detect the operation of starting the application a. Or, the user starts the scene of the application A by clicking the widget on the desktop of the system, and in this scene, the widget can detect the operation of starting the application A.
See (a) in fig. 7, which is a scenario for jumping from other applications to application a to launch application a. In this scenario, the electronic device displays an interface of another application (e.g., application B), where the interface includes a jump control of application a, the user clicks the jump control of application a, application B detects an operation of starting application a, and the electronic device will start application a.
Referring to fig. 7 (b), a scenario of application a is launched in such a way that the user clicks a widget on the system desktop. When a user clicks a widget on the system desktop, the widget may detect an operation to launch application A.
And B2, the electronic equipment judges the content of the starting page.
In this embodiment of the present application, the system will generally have judgment logic, and when the application is cold-started, for example, a transition page (Logo page, advertisement page, blank page, etc.) is used as a start page (interface before displaying the real interface of the application). When the application is hot-started, the snapshot page (the image corresponding to the last interface displayed before the application is backed up to the background operation) is used as a starting page.
And B3, the electronic equipment displays the transition page.
And under the condition that the electronic equipment judges that the transition page is used as the starting page, the electronic equipment can obtain an interface corresponding to the activity of the transition page. And then the electronic equipment displays an interface corresponding to the transition page.
When the electronic equipment displays the interface corresponding to the transition page, the status bar of the electronic equipment can be displayed together, namely, the complete interface displayed by the electronic equipment is the interface corresponding to the transition page Activity and the interface after the status bar content is synthesized.
Of course, in practical application, when the electronic device displays the interface corresponding to the transition page, the status bar of the electronic device may not be displayed, that is, the complete interface displayed by the electronic device is the interface corresponding to the transition page Activity.
The embodiments of the present application are not limited to specific implementations.
And B4, the electronic equipment displays a main interface of the application A (when the task stack of the application A does not exist in the background of the system) or an interface corresponding to the Activity at the top of the task stack (when the task stack of the application A exists in the background of the system).
During the process of the application A, the electronic equipment needs to load an interface corresponding to the Activity of the main interface or the Activity at the top of the task stack during the display of the transition page, and after the loading is completed, the electronic equipment changes the display of the transition page into the display of the interface corresponding to the Activity at the top of the main interface or the task stack of the application A.
In order to realize that the application can display a snapshot page when the application is restarted after the background is killed, the embodiment of the application is improved on the basis of fig. 5. Referring to fig. 6, a flow chart is shown after modification.
The embodiment shown in fig. 6 is modified from the embodiment shown in fig. 5 by:
(1) And adding step A5 to cache the snapshot index cached in the storage space A to the storage space B between the step A3 that the electronic equipment detects that the application A meets the condition of killing and the step A4 that the electronic equipment clears the snapshot index of the application A cached in the storage space A.
In practical application, before the snapshot index of the application a cached in the storage space a is cleared, the snapshot index of the application a cached in the storage space a is stored in the storage space B, and before or after the process of the application a is killed, the method is not limited.
(2) In step B2, the following judgment logic is added to the content of the start page:
it is determined whether the snapshot index (or other related information) is cached in the storage space B. In this determination example, whether or not the snapshot index is cached may be determined by acquiring the snapshot index from the storage space B.
Judging whether a task stack of the application A exists or not, and judging whether the Activity at the top of the task stack before the last back stage is stored in the task stack or not.
Of course, in practical application, other judgment logic may be added: and judging whether the estimated application starting response time (estimated welcome page display time) is smaller than a preset value.
The embodiment of the present application is implemented based on the modules in the timing chart shown in fig. 8, and of course, in practical application, the interaction between these modules may also be implemented by other modules that are not shown. Or a certain module needs to invoke other not shown module implementations when executing a certain step. The embodiments of the present application are not limited in this regard.
See the timing diagram described in fig. 8. A timing diagram corresponding to the flowchart shown in fig. 6 is provided for an embodiment of the present application.
In step K1, in response to operation a, application a starts executing the fallback processing.
In this step, for step A1 in fig. 6, operation a in step K1 is an operation of returning the trigger application a to the background in step A1 in fig. 6.
In step K2, application a sends a message to snapshot to save a snapshot of application a.
And step K3, after the snapshot receives the message sent by the application A and used for storing the snapshot of the application A, the snapshot stores the snapshot of the application A.
In practical applications, snapshot may save a snapshot in memory.
In step K4, snapshot sends the snapshot index of the snapshot of application a to the shapshutcache (which may be denoted as the first storage space).
And step K5, after the shapshutcache receives the snapshot index of the snapshot of the application A, caching the snapshot index.
The steps K2 to K5 correspond to the corresponding step A2 in the flowchart shown in fig. 6.
By way of example, it will be appreciated that the memory space A in the flow chart shown in FIG. 6 is the snapshontcache.
Of course, in practical applications, the system needs to perform other operations to enable the application a to complete the background-returning process.
And step L1, the application A meets the killing condition set by the system and starts to be killed.
This step corresponds to step A3 in the flowchart shown in fig. 6.
And step L2, triggering a death callback by the application A to inform a window state to clean window resources of the application A.
In an actual application, a process of each application may load multiple activities, where each Activity corresponds to a window, and each window is responsible for carrying an interface. The information of the window is recorded through the window state.
As an example, a layout parameter (layout parameter) is recorded in the window state. The layoutparam carries attribute information such as the position, height, width and the like of each layout in the window. The Layout occupies an area on the display screen for carrying views added to the Layout.
When a process loads an Activity, the system adds a window to record the information of the window corresponding to the Activity, and obtains a window corresponding to the Activity based on the information of the window recorded by the window, and then loads an interface corresponding to the Activity through the window.
When an application is killed in the background, the system can clean all windows of the application, when the system cleans windows of the application, an application process informs the system of cleaning windows states of recorded windows through a death callback mechanism, and when the windows states are cleaned, snapshot indexes cached in a storage space A by the application are cleaned together.
When the application is started next time, the application process loads the Activity at the top of the task stack, however, the Activity at the top of the task stack does not already have window information, and no snapshot page exists, so that the snapshot page cannot be loaded.
In order to solve the problem, before the system clears the window state of the recorded window information, the snapshot page and the window parameters of the Activity of the application can be cached, so that the call is convenient when the system is started next time.
And step L3, the window state acquires a snapshot index cached after application return from the SnapshutCache.
And step L4, the window state caches the window information recorded by the window state and the obtained snapshot index into an information caching module (which can be recorded as a second storage space).
And step L5, after the information caching module receives the snapshot index and the window information sent by the window, caching the snapshot index and the window information into a cache corresponding to the information caching module. As can be understood from this example, the storage space B in the flowchart shown in fig. 6 is a cache corresponding to the information cache module.
Step L3 to step L5 correspond to step A5 in the flowchart shown in fig. 6. In addition, the cache information applied when the background is killed is shown in table 1.
Table 1 application information cached when background is killed
The cached information may include a snapshot index, and may further include display parameters, such as screen adaptation information, window attribute information, and the like, when the electronic device displays the first image.
As an example of the screen adaptation information, sysiVis, dimAmount, or the like may be included.
As an example of the window attribute information, windowFlags, privateFlags and the like may be included.
The embodiment of the application does not limit whether the parameters belong to the screen adaptation information or the window attribute information. The above information is divided into screen adaptation information and window attribute information as just one example, and is not limiting to the present application.
Of course, in practical applications, more information than the above information may be included.
And step L6, the information caching module sends a message with a caching flag bit of true to the task.
The buffer flag bit is used for indicating that the snapshot index and the window information are acquired from the information buffer module. When the buffer flag bit is true, it indicates that when the application is killed in the background, the snapshot index buffered in the storage space a is buffered in the storage space B, and at the same time, window information corresponding to the Activity at the top of the task stack of the application is buffered in the storage space B.
And step L7, modifying the buffer zone bit into true by the task.
In step L8, the task obtains the Activity related information (Activity record) of the top of the stack from the window state.
And step L9, caching the Activity information of the stack top by the task.
And caching the information of the Activity at the top of the stack, wherein the information is used for displaying an interface corresponding to the Activity at the top of the stack when the stack is restarted. Thus, the snapshot page and the application interface content are the same or similar when the user is restarted, and the user experience is good.
In step L10, the window state sends information for cleaning up the snapshot index to the snapshotcache.
Step L11, snapshontcache cleans up the snapshot index of application A.
In step L12, after clearing the snapshot index of the application A, the snapshontcache returns a response of successfully clearing the snapshot index to the window state.
And step L13, window state cleans up window information of the application A recorded by the window state.
Steps L8 to L12 correspond to step A4 in the flowchart shown in fig. 6.
It should be noted that when an application is killed in the background, the task stack of the application is typically preserved.
In step M1, application a starts to start in response to operation B.
In this step, for step B1 in fig. 6, operation B in step M1 is an operation of triggering application a in step B1 in fig. 6 to enter the foreground operation.
Of course, in practical application, the start of the application a indicates that the system starts to create a process for the application, and starts the process after creating is completed.
And step M2, the application A sends a message for starting the application A to the ActivityRecord.
In an actual application, the application a sends a message to start.
After the activitycord receives the message that the application a starts to start, which is sent by the application a, the start page content starts to be judged.
And step M3, the ActivityRecord sends a snapshot index acquisition request to the snapshontcache to obtain information that the snapshot index is empty.
Since application a was killed off in the background by the system, snapshottcache has cleaned up the snapshot index in snapshottcache (see step L9), information is returned that the snapshot index is empty.
And step M4, the ActivityRecord sends a snapshot index acquisition request to the information caching module to obtain a snapshot index.
Since application a was killed off by the system in the background, the system has cached the snapshot index and window information in the information caching module (see step L5), the snapshot index is returned.
And M5, the ActivityRecord sends a request for acquiring the cache flag bit to the Task to obtain information with the flag bit being true.
Since the Task has set the cache flag bit to true in step L6 and step L7, a message with the cache flag bit true will be returned. In the case where the cache flag bit is true, it indicates that the snapshot index and window information of application a have been cached.
Step M6, the ActivityRecord determines whether the image corresponding to the snapshot index meets the snapshot page condition specified by the system.
In practical application, the actiglyrecord determines whether the image corresponding to the snapshot index meets the condition of the snapshot image specified by the system, and if so, the snapshot type is obtained.
Of course, in actual application, in this step, it may also be determined whether the estimated application start response duration is less than a preset value. See description of the embodiments that follow for specific steps.
If the estimated application start response time is smaller than the preset value, executing the follow-up steps.
Of course, in actual application, if the application is set after the background is killed, the relationship between the application start response time and the preset value is not considered when the application is restarted, and the subsequent steps can also be directly executed.
And step M7, if yes, the ActivityRecord sends information for drawing the snapshot page to the TaskSnapshapsurface.
And M8, under the condition that the information for drawing the snapshot page is received by the TaskSnapshot surface, acquiring main window information from the ActivityRecord to obtain a null.
The main window information does not exist because the system has cleaned up the window information when the application is killed in the background.
And step M9, acquiring task stack information of the application A from the ActivityRecord by the TaskSnapshot surface.
In step M10, the tasksnappshsurface obtains Activity (TopFullScreenActivity) of the stack top from the task stack (task) with get TopFullScreenActivity () function (denoted as the second request) based on the task stack information of the application a.
In general, the TopFullScreenActivity object depends on the windows state, and since the application is killed off in the background (the windows state is cleaned), the relevant information recorded in the windows state will not exist, so the TopFullScreenActivity object cannot be acquired from the windows state through the Task module according to the normal flow.
It can be understood that the Activity at the top of the stack is obtained from the fourth storage space of the task stack by the second request.
In step M11, the tasksnappshosurface obtains Activity (TopFullScreenActivity) of the stack top from the task stack (task) with the getcachedtopfullscreenactivity () function.
In practical application, the function getcachedtopfullscreenactivity () can be newly added in the task. In the case of returning to null through the normal flow, the topfulscreen activity object is acquired by the Task module as a getcachedtopfulscreen activity () function (noted as the first request). The TopFellScreen Activity object may be obtained since it has been cached in the task before.
In this way, the Activity at the top of the stack is obtained from the cache (third storage space) of the task stack.
And step M12, obtaining a buffer flag bit (true) from the ActivityRecord by the TaskSnapshot surface.
And step M13, under the condition that the flag bit is true, the TaskSnapshot surface acquires the snapshot index and the window information from the information cache module. To obtain the relevant variables (e.g., sysUiVis, windowFlags, etc.) in the window information.
And step M14, drawing a snapshot page based on the obtained snapshot index and window information and displaying the snapshot page under the condition that the snapshot index and window information are determined to be obtained and the Activity at the top of the task stack is cached.
Of course, in practical application, the tasksnappshtsurface invokes other modules to draw and display snapshot pages.
In addition, during the time that the electronic device displays the snapshot page, the electronic device will create and launch a process of application a, through which the interface of Activity at the top of the task stack of application a is loaded.
And N1, finishing the drawing of the first frame interface of the application A.
And step N2, after the first frame interface of the application A is drawn, the application A sends related information to the ActivityRecord to instruct the ActivityRecord to remove the snapshot page and display the first frame interface.
And step N3, removing the starting window after the ActivityRecord receives the information.
Step N4, activityRecord sends the removed information to application A.
And step N5, after the application A receives the information, displaying a first frame interface of the application A.
And step N6, after the ActivityRecord removes the starting window, sending an instruction for clearing the cached snapshot index and window information to the information caching module.
And after the information caching module receives the instruction, clearing the snapshot index and window information cached when the application is killed in the background last time.
In the system native flow, after the application is started, when the start page exits, cleaning of the start animation is usually performed, so in this embodiment of the present application, cache information (snapshot index and window information) in the information cache module may be cleaned together when the start animation is cleaned each time. Of course, in practical application, the information buffer module will also clear the buffered snapshot index and window information in the following cases.
(1) If the application is modified after the background is killed and during the restart period, the snapshot index and window information cached by the information cache module will be cleared after the display settings (such as resolution, switching of day and night modes, split screen startup and switching of other startup modes) of the electronic device are modified, and of course, the Activity cached by the task stack may be cleared.
In this case, the startup window parameters after the electronic device modification display settings cannot be matched due to the previously cached window information.
(2) And when the running time of the application in the background exceeds the preset time, clearing the snapshot index and window information cached by the information caching module, and certainly, clearing the Activity cached by the task stack.
In this case, since the application has a long background time, there may be a large difference in the interfaces corresponding to the activities in the application task stack when the application is restarted.
In practical application, the time when the snapshot index and the window information are cached can be recorded, when the application is started, the time when the application is started (or the time when the snapshot is taken at the starting, etc.) can be subtracted from the recorded time when the snapshot index and the window information are cached to obtain the snapshot index caching duration, and when the snapshot index caching duration is greater than a certain threshold (for example, 18 hours, 24 hours, etc.), the snapshot index and the window information cached by the information caching module are cleaned, and the information that the snapshot index is empty is returned.
(3) When the electronic equipment is shut down, restarted or uninstalled, the snapshot index and window information cached by the information caching module are cleared, and of course, the Activity cached by the task stack can be cleared.
Of course, in practical applications, other situations not shown may also be included.
As another embodiment of the present application, referring to the timing chart shown in fig. 9, on the basis of the embodiment shown in fig. 8, the chart may further carry a buffer flag bit in the information sent in step M7, and after the information corresponding to step M7 received by the tasksnap-shot surface, if the information carries the buffer flag bit, step M11 may be directly executed to obtain the Activity of the stack top from the buffer of the task.
Since the tasksnappshsurface has already obtained the buffer flag bit in the information corresponding to step M7, step M12 may not be executed any more.
Other steps may be described with reference to the embodiment shown in fig. 8, and will not be described in detail herein.
As another embodiment of the present application, referring to the timing chart shown in fig. 10, after the information caching module caches the snapshot index and the window information in step L5, the information is sent to the activitycord to indicate that the snapshot index and the window information are cached in the information caching module on the basis of the embodiment shown in fig. 8 or fig. 9. After the activitycord receives the message corresponding to the step M2, the snapshot index is not acquired from the snapshontcache (i.e. the step M3 is cancelled), but the step M4 is executed, and the snapshot index is acquired from the information cache module. Other steps are described in the above embodiments, and are not described in detail herein.
A schematic flow chart of the step B2 execution in the embodiment shown in fig. 6 will be described below. Referring to fig. 11, a schematic flow chart is provided in an embodiment of the present application.
In step P1, the electronic device detects an operation of triggering the application to start, and starts to add a start window.
In step P2, the electronic device obtains the snapshot index in the storage space A (snapshotcache).
In step P3, the electronic device determines whether the snapshot index is empty.
Under the condition that the snapshot index is not empty, the method is equivalent to that the application is not killed after the application is in a background, namely the application is in a current hot start mode, and the snapshot page can be used as a primary flow of a start page based on the snapshot page index in the storage space A.
And step P4, in the case that the snapshot index in the snapshotcache is empty, acquiring the snapshot index from the storage space B (information caching module).
And step P5, judging whether the snapshot index is empty.
And under the condition that the snapshot index is empty (for example, the electronic equipment is started for the first time after being started, the electronic equipment is started for the first time after being installed, the electronic equipment is returned to the background for a certain time, and the like), continuing to run the original flow.
And step P6, under the condition that the snapshot page index in the storage space B (information caching module) is not empty, obtaining a caching flag bit, judging whether the caching flag bit is true or not, and judging whether a snapshot page starting condition is met or not.
As an example, meeting the snapshot page start condition includes: whether the Activity information at the top of the task stack is obtained, whether the window information is obtained, and the like. Of course, other conditions may be added: and predicting whether the application starting response time length (the time length from the detection of the operation triggering the current starting of the application by the electronic equipment to the first frame of the interface of the application drawn by the system) is smaller than a threshold value.
In the case where the cache flag bit is not true or the snapshot page start condition (no in any of the above conditions) is not satisfied, the transition page is executed as a native flow of the start page.
In step P7, when the cache flag bit is true and the snapshot page start condition is satisfied (yes in all the above conditions), the snapshot page is executed as a process of starting the page.
Under the condition that the application is determined to be capable of acquiring related information such as a snapshot index when the background is killed and restarted, how to estimate the application starting response time (estimated starting page display time) when the application is started this time will be described.
As described above, when an application is cold started, the system needs to create and start a process for the application, and after the process finishes starting, the Activity of the application is loaded through the process of the application until the Activity loading finishes displaying the first frame application interface.
In practical application, when an application is cold started, activity Manager Service in the system sends a request for creating a process of the application to a zygate process (an important process in an android system, responsible for other processes of the fork), and after the zygate receives the request, the process of the application is created and started. Therefore, the system starts the process together after creating the process for the application, and the time for creating the process can be ignored because the process time for creating the process is short.
Referring to fig. 12, taking a cold start of an application (a user clicks an application icon on a desktop of the system to start the application) as an example, the application start duration is from the click time of the application icon to the first frame loading completion time of the application interface. The starting duration of the application includes two parts: one part is the duration of starting the process, and the other part is the duration of loading the Activity.
As described above, since the duration of creating the process may be ignored, the application start duration may also be understood as the time when the process of the application starts to start to the time when the first frame loading is completed when the application is cold started.
Of course, in practical application, the duration of creating the process may be categorized into the duration of starting the process. The emphasis of the embodiment of the present application is not on the start time and the end time of each duration, but on how to implement the scheme provided by the embodiment of the present application through each duration.
As previously described, an application may be killed after it enters the background from the foreground. However, there may be a self-priming behavior after the application is killed, i.e., the application will request the system to create and launch a process for the application, so at the time the user clicks on an icon of the application, the process of the application may or may not have been launched, or may not be in the process of being launched.
In view of the above, when the current startup response time of the application (or the current startup page display time) is estimated, there may be the following cases according to the time when the user clicks the icon of the application:
case one: at the click time of the application icon, the process of the application is not created (the process of the application does not exist in the background of the system).
Referring to (a) of fig. 13, if the process of the application is not created at the moment when the user clicks the application icon, after the user clicks the application icon, the application needs to perform the following procedure: and creating and starting the application process, and loading the Activity after the starting is completed. Then, the starting response time length (or the starting page display time length) of the application is: the sum of the starting time length of the process at the time of starting and the Activity loading time length at the time of starting.
In specific implementation, through testing, the application starting time length of the same application in cold starting on the same type of electronic equipment is relatively stable, that is, the fluctuation of the application starting time length of the same application in each cold starting on the same type of electronic equipment is small, therefore, referring to (b) in fig. 13, the sum of the starting time length of the process in the current starting time and the Activity loading time length in the current starting time of the application can be estimated according to the application starting time length in the historical application cold starting time, and the estimated sum of the process starting time length in the current starting time and the Activity loading time length in the current starting time is used as the estimated application starting response time length (or estimated starting page display time length) in the current starting time of the application.
Of course, in the practical application, the process starting time length of the application at the time of starting can be estimated according to the process starting time length of the application at the time of starting in the history, and the Activity loading time length of the application at the time of starting can be estimated according to the Activity loading time length of the application at the time of starting in the history. And then adding the estimated process starting time length when the application is started up and the estimated Activity loading time length when the application is started up to obtain the sum of the estimated process starting time length and the Activity loading time length when the application is started up, and taking the sum of the estimated process starting time length and the Activity loading time length when the application is started up as the application starting response time length (or the current starting page display time length) when the application is started up.
In addition, the process in the system will set the processRuning flag bit to True after starting. Therefore, whether the process of the application is started or not can be determined based on the value of the processRuning flag bit, and if the electronic device detects the clicking operation of the application icon, the processRuning flag bit of the process of the application is checked to be Flase, which indicates that the situation one belongs (the system does not exist the process of the application corresponding to the application icon). Of course, in practical applications, other manners may be used to determine whether the process of the application has started to start, which is not limited in the embodiment of the present application.
And a second case: at the point of clicking the application icon, the process of the application has been started and not started to be completed. Referring to (a) of fig. 14, if the user clicks the application icon at the moment when the process of the application is in the process of starting, after the user clicks the application icon, the application needs to perform the following process: and continuing to start the application process, and loading the Activity after the starting is completed. Then, the application start response time (or the current start page display time) when the application is started is: the residual starting time of the process at the time of starting is added with the time of loading the Activity at the time of starting.
In specific implementation, the process starting time length of the application at the time of starting can be estimated according to the process starting time length of the application at the time of starting in history, the Activity loading time length of the application at the time of starting can be estimated according to the Activity loading time length of the application at the time of starting in history, then the estimated process starting time length of the application at the time of starting is subtracted by the process starting time length to obtain the process residual starting time length of the application at the time of starting, and finally the estimated Activity loading time length and the current process residual starting time length are calculated to obtain the application starting response time length of the application at the time of starting.
In practical applications, based on the relationships between the parameters shown in (a) in fig. 14, other calculation manners may be obtained to estimate the application start response duration (or the current start page display duration) when the application is started.
As another example, referring to fig. 14 (b), the sum of the start time length of the process when the application is started and the Activity loading time length when the application is started may be estimated according to the application start time length when the application is cold started in the application history, and then the estimated start time length of the process when the application is started and the sum of the Activity loading time length when the application is started are subtracted to obtain the estimated application start response time length (or the current start page display time length) when the application is started.
In specific implementation, after detecting the clicking operation of the application icon, the electronic device checks and checks a flag bit corresponding to the processRuning of the application process, and if True, continues to judge whether the application process is started and completed. The starting time of the application process can be subtracted from the clicking time of the application icon to obtain the process started time length when the application is started at this time; if the calculated process started time length is smaller than the estimated process started time length (estimated by the process started time length when the application is started historically), the process is not started and completed yet. Of course, in actual application, whether the process of the application has been started and completed may also be determined by other manners, which is not limited in the embodiment of the present application.
In practical application, when the processRuning flag bit of the application process becomes True, the system also records the time of the change of the processRuning flag bit. Thus, the time at which the process starts to start can be determined from the time at which the processRuning flag bit changes.
As described above, whether the process is completed is determined according to the relationship between the process started time and the estimated process started time, however, in the actual application, even if the process started time is smaller than the estimated current process started time, the process of the application may be started to be completed.
Referring to fig. 14 (c), if the system is started up more quickly, the application process is started up and completed at the time of clicking the application icon, however, the result obtained in the above calculation manner is that the application process is not started up and completed yet (the process started-up duration is less than the estimated process start-up duration). According to the calculation mode, the application starting response time (or the current starting page display time) of the application at the current starting time estimated by adopting the mode of estimating 1 is as follows: the estimated sum of the process starting time and the Activity loading time minus the starting time of the current process.
However, in practice, after the click time of the application icon, the system needs to do the following steps: loading the Activity through the application process, if the mode of estimating 2 is adopted, that is, whether the process is started and completed is actually checked, but the difference between the clicking time of the application icon and the starting time of the process is compared with the estimated process starting time in the mode of estimating 1, the estimated application starting response time (or the current starting page display time) when the application is started is the estimated Activity loading time (the estimated process starting time and the sum of the Activity loading time minus the estimated process starting time). Therefore, an error may occur for a long period of time. The error of the time length is as follows: the estimated residual starting time of the process.
Since the application start response time (or the present start page display time) is estimated. Further, since the fluctuation of the start-up time period of the process at each start-up of the application is small, even if the situation shown in fig. 14 (c) exists, the normally estimated remaining start-up time period of the process is short, and therefore, the estimated application start-up response time period (or the present start-up page display time period) in the manner shown in fig. 14 (b) (in the manner shown in fig. 14 (c) in the manner of the estimate 1) is relatively close to the display time period of the actually started-up page.
And a third case: the clicking time of the application icon is the time when the application process is started and completed.
Referring to (a) of fig. 15, if the process of the application has completed starting at the moment when the user clicks the application icon, the application needs to perform the following process after the user clicks the application icon: the Activity is loaded by the process of the application. Then the starting response time length (or the starting page display time length) of the application is: the duration of loading the Activity at this time of starting.
In specific implementation, the Activity loading time length of the application at the time of starting can be estimated according to the historical activty loading time length of the application. And then taking the estimated Activity loading time length when the application is started up this time as the estimated application starting response time length (or the current starting page display time length) when the application is started up this time.
As another example, referring to (b) in fig. 15, the sum of the process start duration and the Activity loading duration at this time of start may also be estimated according to the application start duration at the time of cold start of the application historically. Because the process is started and completed, the estimated sum of the process starting time length and the Activity loading time length at the time of the starting can be used for subtracting the process starting time length to obtain the application starting response time length of the application.
Of course, in the specific implementation, after the electronic device detects the click operation of the application icon, checking a processRuning flag bit of the process of the application, if True, continuing to judge whether the process of the application is started and completed; as described above, the starting time of the application process can be subtracted from the clicking time of the application icon to obtain the process started time length when the application is started this time; if the calculated starting time length of the process is greater than or equal to the estimated starting time length of the process (estimated by the starting time length of the process when the application is historically started), the process is indicated to be started and completed. Of course, in actual application, whether the process of the application has been started and completed may also be determined by other manners, which is not limited in the embodiment of the present application.
As described above, whether the process is completed is determined according to the relationship between the started time length of the process and the estimated starting time length of the process, however, in actual application, even if the started time length of the process is greater than or equal to the estimated starting time length of the current process, the process of the application may not be started to be completed.
Referring to fig. 15 (c), if the current starting process of the system is slower, the application process is started and completed at the time of clicking the application icon, and the result obtained according to the above calculation method is that the process of the application is already started and completed (the time period when the process is started is longer than or equal to the estimated process starting duration), and the estimated application starting response duration (or the current starting page display duration) when the application is started is: and (5) estimating the Activity loading time.
However, in practice, after the click time of the application icon, the system needs to do the following steps: and continuing to start the application process, loading the Activity through the process of the application after the application process is started, and if a mode of estimating 2 is adopted, namely that whether the process is started is actually checked, but not if a mode of estimating 1 is adopted, comparing the difference value between the clicking time of the application icon and the starting time of the process with the estimated process starting time, wherein the estimated application starting response time (or the current starting page display time) is the estimated Activity loading time plus the actual process residual starting time. Therefore, an error may occur for a long period of time. The error of the time length is as follows: the actual process remains started for a period of time.
As described above, since the application start response time (or the present start page display time) is estimated. Further, since the fluctuation of the start-up time period of the process at each start-up of the application is small, even if the situation shown in fig. 15 (c) exists, the remaining start-up time period of the process is generally short after the application icon click time, and therefore, the application start-up response time period (or the present start-up page display time period) estimated in the manner shown in fig. 15 (b) (in the manner of estimated 1 shown in fig. 15 (c)) is also relatively close to the display time period of the actually started-up page.
Of course, in actual application, no matter what kind of situation the application is started this time, after obtaining the estimated application start response time (or the current start page display time) in this case, if the estimated application start response time (or the current start page display time) is greater than or equal to a certain threshold, it is considered that the current application start time will be too long, and a transition page (e.g. Logo page) needs to be displayed. If the estimated application starting response time (or the current starting page display time) is smaller than the threshold value, the current application starting time is considered to be not longer, and the snapshot page needs to be displayed.
As can be understood from fig. 13 to 15:
At the time of application cold start (example shown in fig. 13), the start response time period (start page display time period) of the application includes: a process start time and an Activity loading time.
An example at the time of warm start of an application (example shown in fig. 15), a start response period (start page display period) of the application includes: activity loading time (or, historically, application start time minus current process start time at application cold start).
Another example at the time of warm start of the application (example shown in fig. 14), a start response period (start page display period) of the application includes: the remaining start-up time and Activity loading time of the process (or, historically, the application start-up time at the time of the application cold start minus the current process started-up time).
As shown in fig. 12, the embodiment of the application defines an application start time length at the time of application cold start as a time length passing from the point of application icon clicking at the time of application cold start to the point of time when the electronic device displays the first frame application interface, and predicts a sum of a process start time length and an Activity loading time length at the time of application current start through the application start time length at the time of application cold start. In order to maintain data consistency, the process starting time length of the application history during cold starting of the electronic equipment can also be used for estimating the process starting time length of the application during the current starting. Of course, in the embodiment of the present application, the process start duration at this time of starting may be estimated by using the process start duration at any starting mode historically.
As another embodiment of the application, the application starting time period may be defined from the starting time of the process to the time of displaying the first frame application interface. Because the process starting time and the Activity loading time are continuous time periods during the cold start shown in the first case and the warm start shown in the second case, the sum of the process starting time and the Activity loading time during the current start of the application can be estimated by the application starting time during the same application cold start and/or the warm start shown in the second case historically; the embodiments of the present application are not limited in this regard.
Through the description of the above embodiments, a flowchart of the electronic device shown in fig. 16 for determining whether to execute the loading transition page or the loading snapshot page after detecting the click event of the application icon may be obtained. It should be noted that, the steps after the step A2 are the steps between the step M6 and the step M7 in the embodiment shown in fig. 8.
And step A1, the electronic equipment detects clicking operation of the application icon.
In the embodiment of the application, the application icon represents an application icon displayed on a system desktop of the electronic device. The click operation of the application icon is used to launch the application.
In the embodiment of the application, the user clicks an application icon displayed on a desktop of the system to start an application.
Of course, in the actual application, the application may also jump to the application through other applications to start the application, and in this scenario, the electronic device may also detect the operation of starting the application through other applications. Or the user clicks a widget on the system desktop to start the scene of the application, and under the scene, the electronic equipment can detect the operation of starting the application through the widget.
See (a) in fig. 7, for a scenario in which to jump from another application to the present application (e.g., application a) to launch the present application. In this scenario, the electronic device displays an interface of another application (e.g., application B), where the interface includes a jump control of application a, the user clicks the jump control of application a, application B detects an operation of starting application a, and the electronic device will start application a. Accordingly, in the above embodiment, the click time of the application icon may be understood as: click time of jump control of application.
Referring to (b) in fig. 7, a scenario of the present application (e.g., application a) is launched for a user clicking on a widget on the system desktop. When a user clicks a widget on the system desktop, the widget may detect an operation to launch application A. Accordingly, in the above embodiment, the click time of the application icon may be understood as: clicking time of a widget on a system desktop.
Of course, in actual application, the clicking time of the application icon in the embodiment of the present application is only the time when the electronic device detects any operation that can trigger the application a to be started.
As described above, when the application of the embodiment of the application is in a scene that the system has a task stack of the application, the application has better user experience. Therefore, after step A1, the electronic device also needs to determine whether the system has a task stack for the application.
Of course, the embodiment of the application can also be applied to a scene that the system does not have the task stack of the application, and only when the snapshot page is judged to be displayed, the main interface of the application is displayed after the snapshot page is displayed, so that the experience of the user is poor.
Step A2, the electronic device judges whether the process of the application has started to start.
In this embodiment of the present application, by looking at the processing running flag bit (True or False) of the process of the application, if the processing running flag bit of the process of the application is True, it indicates that the process of the application has been created and started. When the flag bit False of process running of the process of the application indicates that the process of the application has not yet been started.
As previously described, the AMS sends a request to create a process to the zygate process, which, upon receipt of the request, creates and initiates the process of the application. Therefore, the system starts the process after creating the process for the application, and because the process time of creating the process is short, the process running flag bit of the process of the application is known as False, which indicates that the process of the application is not created. The identifier that determines that the process of the application has been started is noted as the first identifier. For example, true in the above embodiment.
Step A3, if the process of the application has started to start, calculating the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process (the difference is marked as a third difference).
It should be noted that the difference may be used as the already started time period of the process, and the starting time of the process may be the time when the flag bit of the process running of the process becomes True for the last time.
As described above, the time length value in the embodiment of the present application does not have to use an accurate time length value as an endpoint of the time length value, so in implementation of the present application, a second difference between the current time and the starting time of the second process may also be calculated, where the started time length of the second process is the second difference, and the starting time of the second process is the time when the processing running flag bit of the second process becomes the first identifier last time.
Or the electronic equipment calculates a fourth difference value between a first moment and a starting moment of the second process, wherein the first moment is any moment between the moment when the electronic equipment receives the clicking operation of the application icon and the current moment, and the started duration of the second process is the fourth difference value.
And A4, judging whether the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process is larger than or equal to the estimated starting time (T2) of the current process.
In the embodiment of the application, whether the process of the application is started or not is judged through the difference value between the clicking time (T4) of the application icon and the starting time (T3) of the process and the estimated starting time of the current process.
If the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process is greater than or equal to the estimated starting time of the current process (which can be recorded as a second time), the process of the application is started and completed. If the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process is smaller than the estimated starting time of the current process, the process of the application is indicated to be still in the starting process.
And step A5, if the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process is greater than or equal to the estimated current process starting time (T2), subtracting the estimated current process starting time (T2, which can be recorded as a third value) from the sum (T1, which can be recorded as a second value) of the estimated current process starting time and the current acitvty loading time to obtain the estimated starting page display time. The estimated start page display time period at this time may be referred to as a third time period.
Step A6, judging whether the estimated display duration of the start page is greater than or equal to a threshold value (the value can be recorded as a first value).
And A7, executing a loading transition page process under the condition that the estimated display time length of the starting page is greater than or equal to a threshold value.
And step A8, executing a snapshot page loading process under the condition that the estimated starting page display duration is smaller than a threshold value.
In the embodiment of the present application, the procedure of loading the transition page may be a procedure that the existing electronic device displays the transition page before displaying the interface of the application; the load snapshot page flow may be a flow in which an existing electronic device displays a snapshot page before displaying an interface of an application.
The flow of the above-described flow steps A1 to A7 (or A8) corresponds to the above-described case three.
As another embodiment of the present application, when step A2 is performed, the result of the judgment is: the process of the application has not yet been started; and executing the step B1, wherein the sum of the estimated current process starting time length and the Activity loading time length (recorded as a first time length) is used as the estimated starting page display time length. After obtaining the estimated start page display duration, step A6 is performed. This embodiment corresponds to the case one described above.
As another embodiment of the present application, when step A4 is performed, the result of the determination is: if the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process is smaller than the estimated current process starting time (T2), executing step C1, and subtracting the difference (the difference between the clicking time (T4) of the application icon and the starting time (T3) of the process) from the sum of the estimated current process starting time and the Activity loading time to obtain the estimated starting page display time. The estimated start page display duration obtained at this time may be recorded as a fourth duration. After obtaining the estimated start page display duration, step A6 is performed. This embodiment corresponds to the second case described above.
As can be appreciated from the above embodiments, the embodiments of the present application, when implemented in particular, need to rely on the following parameters: the estimated sum of the current process starting time length and the current Activity loading time length, the estimated current process starting time length, the clicking time of the current application icon and the starting time of the current process.
The clicking time of the application icon and the starting time of the current process can be acquired only when the application is started. The estimated time length of the current process starting and the current Activity loading time length can be obtained from the last cold start (or the last cold start or the warm start shown in the second case) to any time before the estimated time length parameter is needed to be adopted in the step B1 (or the step A4).
As another embodiment of the present application, in the case of executing the flow (cold start) corresponding to step B1 in the embodiment shown in fig. 16, it is necessary to store, after the completion of the present start, the application start time length and the process start time length at the time of the present application start as historical data, so as to estimate the sum of the process start time length and the Activity record time length at the time of the next start of the application, and the process start time length.
Of course, if the parameters corresponding to the warm start and the cold start shown in the second case are used as the history data, then, when executing the flow corresponding to the step B1 in the embodiment shown in fig. 16 or executing the flow corresponding to the step C1 in the embodiment shown in fig. 16, it is necessary to store, after the current start, the application start time length and the process start time length at the current application start time as the history data to estimate the sum of the process start time length and the Activity record time length at the next start of the application, and the process start time length.
Of course, in practical application, the system may also store the application start time and the process start time when the application is started each time, but select the history data (for example, the history data corresponding to the cold start) meeting the requirements when the history data is acquired.
As another example, the application start duration and the process start duration at the time of the application history cold start may be obtained after step A1 to estimate duration data at the time of the start. This example is described with particular reference to the following embodiments.
The following describes how to obtain the sum of the estimated current process starting time length and the current Activity loading time length, and the estimated current process starting time length.
In the following embodiments, the parameter data at the time of the application history startup (last N times) each represents the parameter data at the time of the cold startup described in the above embodiments, or the parameter data at the time of the cold startup and/or the warm startup shown in the second case. Specifically, the parameter data at the time of cold start is used as the history data, and the parameter data at the time of warm start as shown in the cold start and the second case can be used as the history data, please refer to the description in the above embodiment. N is a natural number greater than or equal to 1. Of course, even if the parameter data at the time of cold start can be adopted, in the case of the parameter data at the time of warm start shown in the second case, if the latest N times are all the parameter data at the time of warm start shown in the second case of application, the acquired history data are all the parameter data at the time of warm start shown in the second case of application; and if the latest N times are all the parameter data during the application cold start, the acquired historical data are all the parameter data during the cold start.
Taking the application starting time length and the process starting time length during cold start as historical data as an example, the average value of the application starting time lengths during the last N times of application cold starts before the application is started can be taken as the sum of the estimated current process starting time length and the Activity loading time length; and taking the average value of the process starting time lengths of the latest N times of application cold starts before the current application is started as the estimated current process starting time length.
As another example, different weights are given to application start-up durations at the last N times of application cold start, and a weighted average of the N times of application start-up durations is calculated, where the average is used as a sum of the estimated current process start-up duration and the Activity loading duration. And giving different weights to the latest N times of process starting time, and calculating a weighted average of the N times of process starting time, wherein the weighted average is used as the estimated current process starting time.
As another example, the weight of the application start time period closer to this time is greater than the weight of the application start time period farther from this time.
For example, the application start time periods at the time of N application cold starts are respectively recorded as follows in order from far to near (also understood as time from first to last): the 1 st application start duration … … ith application start duration … … nth application start duration. The weight settings are sequentially made smaller in the order described above. Of course, in practical applications, weights of adjacent application start durations may be the same, and i is a positive integer less than or equal to N.
As another example, the weight of the 1 st application start duration of the N application start durations may be set to S N-1 Setting the ith application starting time length as S N-i Setting the nth application start time to S 0 。0<S<1。
In practical applications, there may be a large difference between the application start time and the process start time of different applications, so a list may be set: and taking packet names of different applications as indexes in the list, and storing the application starting time and the process starting time of the application when the application is started for N times. See table 2 for details.
Table 2 application cold start time list
Taking the last 3 application start durations as an example, the 1 st (the farthest time from this time) application start duration (L 1 ) Weight of (1) is S 2 The 2 nd application start time period (L 2 ) Set as S, the 3 rd time (time is closest to the current time) of the application starting time length (L 3 ) Let 1 be the value. Then the sum (L) of the estimated current application starting time and the Activity loading time 0 ) The method comprises the following steps:
s represents the attenuation coefficient.
Taking the start-up duration of one application in Table 2 as an example, L 1 2199ms, L 2 2219ms, L 3 For 2230ms, S is 0.95, and the sum (L) of the estimated current application starting time and Activity loading time is obtained based on the formula 0 ) 2216ms.
Taking the last 3 process start time periods as an example, the 1 st (the farthest time from this time) process start time period (P 1 ) Weight of (1) is S 2 The 2 nd process start time period (P 2 ) Set as S, the 3 rd (time is closest to the current) process starting time length (P 3 ) Let 1 be the value. Then the estimated current process starting time (P) 0 ) The method comprises the following steps:
taking the process start duration of one application in Table 2 as an example, P 1 1782ms, P 2 1789ms, P 3 1790ms, S is 0.95,obtaining the starting time length (P) of the current process based on the formula 0 ) 1787ms.
Of course, the application start duration and the process start duration in table 2 both represent the application start duration and the process start duration when the application is started at the same time.
The above-described embodiment may be implemented based on the technical architecture described in fig. 17. The technical architecture diagram includes an application layer and a framework layer. In practical applications, the technical architecture for implementing the application starting method provided in the present application may include more layers than the technical architecture shown in fig. 17, and may also include more modules, which is not limited by the comparison of the embodiments in the present application. Of course, two or more modules of the modules shown in fig. 17 may be combined into one module. The module shown in fig. 17 may be split into two or more sub-modules.
The application layer has various applications.
The frame layer comprises an information acquisition module and a processing decision module.
The information acquisition module is used for acquiring and storing various parameters required by the embodiment of the application. For example, a historical application starting time, a historical process starting time, a clicking time of the application icon, a starting time of the process, and the like. The information acquisition module sends the acquired historical application starting time, the historical process starting time, the clicking time of the application icon and the starting time of the process to the processing decision module.
The information acquisition module includes ATMS, activityRecord, activityMetricsLogger and WindowProcessController.
The ATMS is used for acquiring the process starting time and storing the process starting time in the ActivityRecord.
The actigymetacslog is used for calculating the application starting time and storing the application starting time in the actigyrecord.
The activitycord is used for storing the process starting time and the application starting time in the above examples, and is also used for storing the starting time of the application. In this embodiment of the present application, the application start starting time may be a click time of an application icon (or a time when an operation triggering application starting arbitrarily occurs).
The WindowProcessController is used to store the process start time. The last time the process running flag of the process becomes true is the starting time of the current process.
Since the display time of the start page adopted when determining whether to execute the procedure of displaying the transition page or the procedure of displaying the snapshot page is itself a predicted time in specific implementation, in practical application, the start time and the end time of each duration parameter may be different from the examples in the embodiments of the present application, and allow for a difference from the start time and the end time provided in the embodiments of the present application. Similarly, the time values corresponding to the time parameters may also be different from the examples in the embodiments of the present application, and may also allow for differences from the time provided by the implementations of the present application.
As another example, the application start time may have a process start time as a start time of the application start time; the time when the flag bit of the process running of the application process becomes True can also be used as the starting time of the application starting time.
As another example, the process start time may take a time when a flag bit of process running of the application process becomes True as a start time of the process start time. And not for other examples.
The processing decision module comprises an information processing module and a loading decision module.
The information processing module is used for taking the application starting time and the process starting time obtained by the information acquisition module as the sum of the current process starting time and the current Activity loading time estimated by the historical data and the current process starting time; and sending the estimated sum of the current process starting time length and the current Activity loading time length and the current process starting time length to a loading decision module.
The loading decision module is used for estimating the display time length of the current starting page (snapshot or transition page) based on various parameters (the sum of the estimated process starting time length and the Activity loading time length of the information processing module), the estimated process starting time length, the current process starting time and the application icon clicking time length acquired by the information acquisition module; and under the condition that the estimated display time length of the current starting page is greater than or equal to a certain threshold value, the current application starting response time length is considered to be longer, and the flow of executing the display transition page (such as an advertisement interface) is determined. If the estimated display time length of the current starting page is larger than the threshold value, the current application starting response time length is considered to be shorter, and the snapshot page displaying process is determined to be executed.
The starting procedure of an application (application a) will be described below by taking the application as an example. See the timing diagram of the embodiment shown in fig. 18. The steps E1 to E7 are cold start processes of the application a, and are mainly described how to obtain an application start duration and a process start duration when the application is cold started. Step H1 to step H15 are the application a executing the transition page process or the snapshot page process by adopting the decision shown in the embodiment of the present application. The history data adopted in the steps H1 to H15 include the application start time and the process start time obtained in the steps E1 to E7.
In step E1, in response to operation 1, the process of application a is started.
In this embodiment, operation 1 may be any operation capable of triggering the start of application a. In addition, the application a is started in the cold start mode.
The electronic equipment is powered off and then powered on, and when the application A is started for the first time after the electronic equipment is powered on, the starting mode of the application A is cold start.
Of course, in practical applications, when the electronic device is started up and does not start up the application a for the first time, the starting mode of the application a may be cold start. For example, application a is killed by the system while running in the background.
In a specific implementation, in response to operation 1, the first JAVA process of the system is a zygate process, and the zygate process is a parent process of all JAVA processes and is responsible for creating and starting other processes of the framework layer.
The SystemServer process is the first process to hatch by the Zygote process, in which most of the Android-provided services (e.g., activityManagerService, windowManagerService, etc.) are in place. Wherein ActivityManagerService (AMS) uniformly schedules the application processes.
When an application is started, actigraphy service notifies the zygate process to create a new process for the application program through a Socket inter-process communication mechanism and starts the process.
As an example, when a user clicks on an application icon from the system desktop to launch the application, the process in which the host resides sends a message to the AMS running in the systemserver process via the binder. The AMS running in the systemserver process sends a message to create a new process to the zygate process through a socket, so that the zygate process creates a process of an application.
As another example, when a user clicks a jump control from application B to launch the application, the process of application B sends a message to the AMS running in the systemserver process through the binder. The AMS running in the systemserver process sends a message to create a new process to the zygate process through a socket, so that the zygate process creates a process of an application.
Other examples are not exemplified one by one.
In addition, in a different system, there is some functionality moved from ActivityManagerService (AMS) to ActivityTaskManagerService (ATMS). AMS in the embodiments of the present application is equivalent to ATMS.
Step E2, the application a transmits, to the actigymetariclogger, a time t1 when the electronic device receives the operation 1.
It should be noted that in the embodiment of the present application, trace acquisition points are set in the systemserver process. The method and the device can add a time stamp in the set Trace acquisition point function, and the actigityMetricsLogger can acquire the time stamp (t 2) of the acquisition point function of which the first frame drawing of the application A is completed and the time stamp of the acquisition point function of the application icon clicking time (or the time of any triggering of the application starting operation, t 1). And calculating the difference value of the two time stamps by the ActivityMetricsLogger to obtain the application starting time when the application A is started at the present time. The application start-up duration will be used as a historical application start-up duration when the application is started up next time.
Therefore, this step is only used for the information transfer direction, that is, the time t1 when the activitymetacslog er can receive the operation 1 from the electronic device, and does not indicate the time t1 when the application a will send the operation 1 to the activitymetacslog er.
And E3, finishing the process starting of the application A, and sending the process starting time length of the application A when the application A is started at the time to an active task management component (ActivityTaskManegerServer, ATMS).
After a process of an application is successfully created, the application process communicates with the systemserver process across processes through a render (inter-process communication) to implement some functions.
In practical application, after the application process is started, the application process may transmit the difference between the starting completion time and the starting start time (the difference is the process starting time) to the system mserver process through a Binder (inter-process communication), and the ATMS may obtain the process starting time from the system mserver process as a service running in the system_server process.
In particular implementations, the application process may pass the execution duration of the bindApplication function in the UITMREAD thread to the systemServer process. (since the execution time of the bindApplication function accounts for the vast majority of the process start time, the time here is counted).
As another example, in practical application, the starting completion time of the process may be acquired through a Trace acquisition point function set in advance when the starting of the application process is completed. Then, the activityMetricsLoger calculates a process starting time based on the set acquisition point function, and the process starting time is stored in the activityMetricsLoger or in the activityRecord.
And E4, under the condition that the ATMS receives the process starting time length when the application A is started at the time, the process starting time length is sent to an activity record component (ActivityRecord).
In the embodiment of the application, the activity recording component may record the application start duration and the process start duration when the application is cold started. Therefore, after the activity recording component receives the process starting time, the received process starting time is stored.
And E5, after the application A is started, the application A transmits the time t2 of the completion of the application A to the ActivityMetricsLoger.
In this embodiment, the application a starts up and completes the first frame application interface (e.g., the main interface of the application a) indicating that the application a has drawn and completed the application a. After the application A is started, a timestamp corresponding to a preset acquisition point function is transmitted to an ActivityMetricsLogger. This step is only for the direction of transfer of the information and does not indicate that application a will send time t1 to activitymetacslog.
In practical application, the actigymetacslog may actively obtain the time stamps of the acquisition point functions of the two endpoints (the application icon clicking time and the application first frame interface drawing completion time) from the system process (the systemserver process), and then calculate the application starting duration.
And E6, after the application A is started, the ActivityMetricsLogger can detect that the application A is started, and after the ActivityMetricsLogger detects that the application A is started, the timestamp (t 2 and t 1) of the acquisition point function is obtained, and the application starting time of the application A is calculated (t 2 minus t 1).
And E7, after the ActivityMetricsLogger obtains the application starting time of the application A, sending the application starting time to an ActivityRecord.
After the activitycord receives the application starting time, the received application starting time is stored.
In practical applications, the method may be set in an actiglyrecord after each cold start (or non-hot start) of the application a, where the duration of the application start and the duration of the process start when the application a is started at this time are recorded in the actiglyrecord. When the application A is started next time, the latest N application starting time and the latest process starting time recorded in the ActivityRecord can be used as historical data to estimate the data at the time of starting.
Of course, the application start duration and the process start duration of the application a when the application a is started at this time may also be set in the activitycord after each start of the application a. When the application A is started next time, the application starting time length and the process starting time length recorded in the ActivityRecord during the last N times of cold start (or non-hot start) can be used as historical data to estimate the data during the current start. The embodiments of the present application are not limited to specific implementations.
It should be noted that, the application start duration and the process start duration of the step E1 to the step E7 are only used for illustrating that the application start duration and the process start duration during the application cold start are stored in the system as history data, and do not indicate that a cold start process needs to be executed each time before the application is started to execute the application start method provided in the embodiment of the present application. In practical applications, the application starting method provided in the embodiment of the present application may also be implemented in the process of executing steps E1 to E7 by the electronic device.
Through steps E1 to E7, the system can obtain the application starting duration and the process starting duration during the cold start of the application A.
After the application a is started, a user can operate on an interface of the application a to experience various functions provided by the application a.
In response to operation 2, application a returns to the background, step F1.
In this embodiment of the present application, operation 2 may be any operation that a user may navigate the display system desktop through a gesture to return the application a to background operation in the case where the electronic device displays an interface of the application a. The user may also enter the multitasking interface by clicking on the task card of one application (e.g., application B) in the multitasking interface to call another application (application B) to foreground operation, with the electronic device displaying the interface of application a, then application a reverts to background operation. The user may also click on a control of other applications (e.g., application C) displayed in the side navigation bar to call the other applications (application C) to the foreground run, with the electronic device displaying an interface for application a, then application a reverts to the background run.
In addition, before the user backs the application back to the background, the system will cache a snapshot of the last interface displayed by the application.
In step F2, the process of application a is killed.
In the embodiment of the application, a rule that the application in the background is killed is generally set in the system, for example, after the application in the background enters the background to run for a period of time exceeding a certain period of time, the application in the background is killed. And when the power consumption of the system is high, the background application is killed.
In addition, an application being killed off in the background means that the application's process is killed off. When the progress of the application is killed, the task stack of the application still exists, so that the content of the interface corresponding to the Activity at the top of the displayed snapshot page and the final displayed task stack is the same or similar when the snapshot page is determined to be displayed.
And F3, after the process of the application A is killed, the application A sends information that the process of the application A is killed to the Activityetectord.
And F4, changing the processrun flag bit into False by actigirecord.
In the embodiment shown in fig. 18, taking application a self-launches in the background first, the user clicks on the icon of application a afterwards as an example.
In step G1, the process of application a starts.
In the embodiment of the application, after the background is killed, the application may have self-starting behavior in the background.
In practical applications, if the system is set to allow the application a to be self-started, the application a may be self-started at a specific time (for example, 19 points per day) or when a certain condition is reached (for example, when other applications wake up, and a specific period of time passes after the application is killed). In practical application, the self-starting condition is not limited.
Of course, after application a self-starts, the system may also kill application a after the background self-starts again, and again self-starts … … if a certain time is reached again or a certain condition is reached.
In step G2, when the process of the application a starts to start, the application a sends information of the process of the application a starting to start to the activitycord.
And G3, after the ActivityRecord receives the information of starting the process of the application A, setting a processRunning flag bit as true to obtain the process starting time (the moment when the processRunning flag bit becomes true).
In step G4, the activitycord sends to the WindowProcessController the time when the ProcessRunning flag bit becomes true (process start time), and the WindowProcessController takes the time when the ProcessRunning flag bit becomes true as the process start time.
After step G4, windowProcessController stores the process start-up time (the time at which the ProcessRunning flag bit becomes true).
In response to operation 3, the process of application a loads Activity, step H1.
In this embodiment, the operation 3 may start the application a for the user to click on the icon of the application a on the system desktop, and of course, may also be any manner shown in fig. 7.
In the embodiment of the present application, in response to operation 3 in step H1, the application starts to start, which may also be understood as that the process of the application starts to load the Activity. Of course, the application start time indicates the time at which a trigger event triggering the application to the foreground run occurs, not the time at which the process of the application starts to start.
And H2, the application A sends a message for starting the application A to the ActivityRecord so as to instruct the ActivityRecord to record the starting moment of the current time.
And step H3, after the ActivityRecord receives the information sent by the application A, recording the starting moment of the application A.
As an example, if in step H1, the user clicks the icon of the application a to start the application a, the recorded time when the application a starts to start this time is the time when the electronic device detects that the user clicks the icon of the application a. That is, the clicking time of the application icon in the above embodiment is the time when the application recorded in this step starts to be started this time. The message in step H2 may carry the moment at which the application starts to start (the moment at which the electronic device receives operation 3). Of course, in actual application, the message in step H2 does not carry the starting time of the application, and step H3 takes the time when the message corresponding to step H2 is received as the starting time of the application.
And step H4, the ActivityRecord requests a processing decision module to start a page loading strategy.
The actigloord requests a boot page loading policy from the processing decision module to obtain a boot page loading policy to load a transition page or snapshot page based on the obtained boot page loading policy.
After receiving the request information sent by the activitycord, the processing decision module starts to decide whether to execute the transition page loading strategy or the snapshot page loading strategy.
The logic of the processing decision module to decide whether to execute the transient page load policy or the snapshot page load policy may refer to steps subsequent to step A2 in the embodiment shown in fig. 16.
As an example of the steps after the processing decision module performs step A2:
and step H5, after the processing decision module receives the request information sent by the ActivityRecord, acquiring the value of the ProcessRunning flag bit from the ActivityRecord.
And step H7, the processing decision module acquires the stored application starting time length and the stored process starting time length of the application A from the ActivityRecord.
Between step H5 and step H7, step H6 may be present.
And H6, the processing decision module determines whether the processing running flag bit is true or False, and certainly, under the true condition, whether the processing running flag bit belongs to the second condition or the third condition needs to be judged continuously based on other data.
In practical applications, when the application start time and the process start time of the application a are acquired, the unique identifier of the application a may be carried, for example, a package name and the like. Of course, the obtained and stored application starting time length and process starting time length of the application A are used as the historical data in the starting process. The history data may include a process start duration stored after step E4 and an application start duration stored after step E8.
And step H8, the processing decision module predicts the sum of the process starting time length and the Activity loading time length when the application is started according to the acquired historical application starting time length, and predicts the process starting time length when the application is started according to the historical process starting time length.
In practical application, the application starting time length at the last cold start can be set as the sum of the process starting time length and the Activity loading time length at the current application start, and the process starting time length at the last cold start is set as the process starting time length at the current application start.
The method can also set the sum of the history N times of application starting time length at the time of cold starting and the Activity loading time length at the time of starting the application, and the history N times of process starting time length at the time of cold starting and the history N times of process starting time length at the time of starting the application. Reference is made in particular to the description of the embodiments described above.
And step H9, the processing decision module acquires the starting time (the time when the processing running flag bit is changed to true) of the process starting from the Window processing controller.
And step H10, the processing decision module acquires the starting time of the application A from the ActivityRecord.
In this embodiment of the present application, after step H7, the execution sequence of step H7, step H9, and step H10 may be set based on the order of the judgment logic, and is not completely according to the execution sequence in the embodiment of the present application. As an example, H10 may be performed first and then step H9 may be performed. Steps H9 and H10 may be performed first, and then steps H7 and H8 may be performed.
Step H11, the processing decision module judges that the process is started based on the step H6; under the condition that the process is started, continuously judging whether the application starting time acquired in the step H10 minus the process starting time acquired in the step H9 is greater than or equal to the estimated process starting time in the step H8; if the estimated start page display time length is greater than or equal to the estimated process start time length, the estimated process start time length is obtained as the sum of the estimated process start time length and the Activity loading time length minus the estimated process start time length; under the condition that the estimated starting page display duration is smaller than a threshold value, determining that a starting page loading strategy is to load a snapshot page; and determining that the starting page loading strategy is to load the transition page under the condition that the estimated starting page display time length is greater than or equal to a threshold value.
Of course, as another example, it is determined whether the application start-up time acquired in step H10 minus the process start-up time acquired in step H9 is greater than or equal to the process start-up time estimated in step H8; if the estimated starting page display time is less than the estimated process starting time, the estimated starting page display time is obtained as the sum of the estimated process starting time and the Activity loading time minus the process started time (the application starting time acquired in the step H10 minus the process starting time acquired in the step H9); under the condition that the estimated starting page display duration is smaller than a threshold value, determining that a starting page loading strategy is to load a snapshot page; and determining that the starting page loading strategy is to load the transition page under the condition that the estimated starting page display time length is greater than or equal to a threshold value.
Steps H12 to H15 are described taking the example of determining that the boot page loading policy is to load the snapshot page.
And step H12, under the condition that the estimated starting page display duration is smaller than a threshold value, the processing decision module sends the determined starting page loading strategy to the ActivityRecord to load the snapshot page.
In the embodiment of the present application, the threshold value of all applications may be set equal. In this case, the snapshot page may be displayed even when an application having a short application start time at the time of cold start is cold started (task stack exists).
In practical applications, different identifiers may be used as different boot page loading policies, and as an example, a first identifier (e.g., 1) is used as an identifier for loading a snapshot page, and a second identifier (e.g., 0) is used as an identifier for loading a transition page.
And step H13, after the ActivityRecord receives the starting page loading strategy, loading the snapshot page based on the starting page loading strategy.
After loading the snapshot page, the electronic device will display the snapshot page.
And step H14, the first frame interface drawing of the first Activity of the application A is finished.
In step H15, the application a sends a message to actiglycord to exit the display snapshot page.
Accordingly, the electronic device will display the first frame application interface after step H15.
As an example of executing the load Logo page, see the interface diagram shown in fig. 19.
Fig. 19 (a) shows an example of a trigger event occurring in the trigger step H1.
Fig. 19 (b) shows an example after loading Logo page in step H13.
Fig. 19 (c) shows an example of a launch window before the interface corresponding to the first Activity (Activity at the top of the task stack) of the application a after executing the retract display Logo page in step H15.
Fig. 19 (d) shows an example of an interface corresponding to the first Activity (Activity at the top of the task stack) displayed after the electronic device starts the application a.
As an example of executing the loading snapshot page, reference may be made to the interface diagram shown in fig. 4, where the interface change diagram shown in fig. 4 is the interface change diagram at the time of application hot start as described above. That is, in the embodiment of the present application, the response duration of the current start may be shorter during cold start or warm start, and the interface change adopted is similar to the interface change during hot start.
Taking fig. 4 as an example of loading the snapshot page at the time of cold start or warm start, fig. 4 (c) is an example of a trigger event that triggers step H1 to occur. I.e. the interface display process at cold start or warm start is similar to the interface display process at hot start.
Fig. 4 (d) is an example after the loading of the snapshot page is performed in step H13.
Fig. 4 (e) shows an example of a launch window before the interface corresponding to the first Activity (Activity at the top of the task stack) of the application a after executing the retract display snapshot page in step H15.
Fig. 4 (f) shows an example of an interface corresponding to the first Activity (Activity at the top of the task stack) displayed after the electronic device starts the application a.
In the example of executing the snapshot page loading policy shown in fig. 4, when the application is returned to the background last time before this start, the snapshot page saved by the system may be an image of an interface (excluding status bar content) of the application displayed by the electronic device. The interface shown in (d) in fig. 4, which is displayed by the electronic device when the electronic device is started at this time, includes the snapshot page and the current content of the status bar stored in the system. The interface displayed when the snapshot page is loaded when the application is started is the interface synthesized by the snapshot image layer and the status bar layer.
As another example, the snapshot saved before the system may also be an image corresponding to the entire interface (including status bar content) displayed by the electronic device after the electronic device is returned to the background. And (3) applying an interface shown in (d) of fig. 4 displayed by the electronic equipment at the time of starting to be an image obtained after the current content of the status bar covers the status bar area of the snapshot image stored by the system. The interface displayed when the snapshot page is loaded when the application is started is an interface synthesized after the status bar layer covers the status bar area in the snapshot image layer.
As another example, referring to fig. 20, if steps G1 to G4 are not present between step F2 and step H1 on the basis of the timing chart shown in fig. 18, the processing decision module determines that the event belongs to the case one based on the value (False) of the processing running flag bit in step H6. The predicted start page display duration requires the sum of the predicted process start duration and the Activity loading duration. Therefore, step H7 (the process start time period is not acquired any more) to step H8 (the process start time period is not estimated any more) are continuously performed, and step H9 to step H10 are not performed any more. In step H11, the estimated start page display duration is obtained as the sum of the estimated process start duration and the Activity loading duration.
In addition, since the process of the application a is not self-started in the background before the user inputs the operation 3 on the electronic device, after the electronic device receives the operation 3, the electronic device creates the process of the application a and starts the process of the application a.
As an example, after step H1, there are steps Z1 to Z3.
In step Z1, the process of application a starts.
And step Z2, after the process of the application A starts to start, the application A sends information of starting the process of the application A to the Activityetectord.
And step Z3, changing the processrun flag bit into true by actigirecord.
In practical applications, after step H1, the system performs steps H2 to H13, and steps Z1 to Z3 in parallel. Except that the speed of execution of steps H2 to H5 is higher than the speed of steps Z1 to Z3. Therefore, generally, before the processrun flag bit in step Z3 becomes true, the system has already performed step H5, and the flag bit of procssrun is obtained as Flase.
Of course, in practical applications, if there is no step G1 to step G4 between step F2 and step H1, the processing decision module in step H6 determines that the event belongs to the case one based on the value (False) of the processing running flag bit. Or may be performed in accordance with the steps of the embodiment shown in fig. 21. Namely, when the value of the processing running flag bit shown in step H7 and fig. 18 is true, the content of step H7 is the same, that is, the same get function can be adopted, and the process starting time and the application starting time are obtained at the same time, however, in step H8, the process starting time is not required to be estimated any more, and only the sum of the process starting time and the Activity loading time is required to be estimated.
Of course, in actual application, after receiving the request information in step H4, the processing decision module may set the order of obtaining each duration parameter (the historical application start duration and the historical process start duration) and obtaining each time parameter (the current process start time and the current application start time) based on the actual situation. As an example, referring to fig. 22, the following sequence may be performed: step H7 (acquiring a historical application starting time and a historical process starting time), step H8, step H10 (acquiring a current application starting time), and step H5, and executing step H9 (acquiring a current process starting time) when the result obtained in step H5 is True. In case step H5 yields False, step H9 is not performed. Examples of other execution sequences are not illustrated.
As another example of a processing decision module, the processing decision module includes an information processing module and a loading decision module.
The information processing module and the loading decision module are used as virtual modules in the processing decision module, and the interaction with the information acquisition module is not uniquely fixed, and in practical application, the information processing module and the loading decision module can be realized based on the example shown in fig. 23 or other examples besides the example shown in fig. 23.
In the embodiment shown in fig. 23, step J1 to step J4 can be described with reference to step H1 to step H4 in the embodiment shown in fig. 18.
After the loading decision module receives the request corresponding to J4, it first needs to determine the value of the ProcessRunning flag bit, so step J5 is executed.
And step J5, the loading decision module acquires the value of the ProcessRunning flag bit from the ActivityRecord.
And step J6, the loading decision module determines that the value of the obtained ProcessRunning flag bit is True.
And step J7, the loading decision module sends a request for obtaining the sum of the estimated application starting time and the Activity loading time and the estimated process starting time to the information processing module under the condition that the value of the obtained processing running flag bit is True.
And step J8, after the information processing module receives the request sent by the loading decision module, acquiring the historical application starting time and the historical process starting time from the ActivityRecord.
And step J9, the information processing module obtains the sum of the estimated application starting time and the Activity loading time and the request of the estimated process starting time based on the obtained historical application starting time and the historical process starting time.
And step J10, the information processing module sends the obtained sum of the estimated application starting time and the Activity loading time and the request for estimating the process starting time to the loading decision module.
And step J11, the loading decision module acquires the starting time of the process from the Window ProcessController (the time when the ProcessRunning flag bit is changed to true).
And step J12, the loading decision module acquires the starting moment of the application from the ActivityRecord.
And step J13, the loading decision module can estimate the display time of the starting page based on the acquired parameters and determine the loading strategy of the starting page.
The contents of step J14 to step J17 may be described with reference to the embodiment shown in fig. 18, and will not be described herein.
In the embodiment shown in the application, the application starting time and the process starting time are recorded in an ActivityRecord in the information acquisition module, and the processing decision module acquires the application starting time and the process starting time from the ActivityRecord in the information acquisition module. In practical application, the actiginerecord in the information acquisition module may also send the acquired process start duration and the application start duration to the information processing module in the processing decision module for storage after the application is started, that is, the information processing module is responsible for maintaining table 2 in the above embodiment. The information processing module no longer obtains historical data from the information acquisition module when the application is started next time. The embodiments of the present application are not limited to specific implementations.
As described above, the embodiment of the present application implements, through the embodiments shown in fig. 8 to 10, a scheme of displaying a snapshot page when an application is started again after a background is killed; the embodiment shown in fig. 18 to 23 is used for estimating the application starting response time when the application is started again after the background is killed, and deciding whether to display the snapshot page or the transition page according to the application starting response time.
In practical applications, implementation of the embodiments shown in fig. 18 to 23 (when executing the snapshot page display policy) requires a scheme of displaying snapshot pages based on the embodiments shown in fig. 8 to 10.
For easy understanding, a flowchart of predicting an application start response time period when an application is restarted after the background is killed is described by fig. 24, and a snapshot page is displayed according to the application start response time period decision.
The embodiment of the present application adds steps H4 to H12 in the embodiment shown in fig. 18 to 22 between steps M6 to M7 mainly on the basis of the embodiment shown in fig. 8 to 10.
The embodiment of the present application will be described by taking the embodiment shown in fig. 8 as an example, and adding steps H4 to H12 in the embodiment shown in fig. 18 between steps M6 to M7.
Of course, in fig. 24, other steps may be added on the basis of the embodiment shown in fig. 8.
As an example, steps F3 to F4 in the embodiment shown in fig. 18 are added when the application background is killed.
If the application has a self-priming behavior in the background, steps G1 to G4 are added in the embodiment shown in FIG. 8.
After the application receives operation B (i.e., operation 3 in the embodiment shown in fig. 20), step H3 in the embodiment shown in fig. 18 is added.
The description of other steps is referred to the embodiment shown in fig. 8 and the description in the embodiment shown in fig. 18, and will not be repeated here.
In addition, in the embodiment shown in fig. 18, the step of loading the snapshot page by activiturerecord based on the policy may also be understood as the process of instructing the tasksnapshot source to execute step M8 to step M14 through step M7 by activiturerecord.
Of course, in practical applications, if the policy of loading the transition page is obtained after the steps H4 to H12, the steps M7 to M14 are not required to be executed, but the native flow of executing the transition page is performed. And will not be described in detail herein.
In the embodiment of the present application, taking the application a as an example, in practice, a plurality of applications installed in an electronic device may be applied to the application starting method provided in the embodiment of the present application.
As an example, a first application and a second application may be installed in an electronic device, where both the first application and the second application may be applicable to the application starting method provided in the above embodiment.
Wherein the master process of the first application may be denoted as first process. The Activity of the first application loaded after the first application is started is noted as a first Activity. The first activity is for obtaining an interface of a first application displayed after the first application is started.
In this embodiment of the present application, the first application may display a transition page during cold start under some conditions (e.g., the first application is started for the first time after the electronic device is started, the first application is started for the first time after the electronic device installs the first application, after the electronic device starts the first application last time, and after a certain period of time, the first application is started again, etc.), and may display a snapshot page during cold start under other conditions (e.g., various conditions for displaying the snapshot page are satisfied).
Taking the example of displaying a transition page when the first application is cold started, the electronic device displays a system desktop, and when an icon of the first application is displayed on the system desktop, a user inputs a first operation, and the first operation acts on the icon of the first application, the electronic device starts a first process of the first application, and the electronic device displays the transition page (the transition page can be recorded as a first interface).
Taking the example of displaying a snapshot page when the first application is cold started, under the condition that the electronic device displays the second interface of the first application, the first application can be backed up, and the last interface displayed before the first application is backed up is recorded as the second interface. Before the user goes back to the background, a click operation (which may be referred to as a second operation) may be performed on the second interface, for example, clicking on the first control displayed in the second interface, so that the electronic device displays a third interface of the application. Of course, the user may also perform a third operation (e.g., a back gesture on the display screen, clicking a back control in a navigation control displayed by the electronic device, etc.) while the electronic device displays the third interface, such that the electronic device backs from displaying the third interface to displaying the second interface. The operation of triggering the first application to fall back is noted as a fourth operation. After the first application is in the background, the operation of triggering the first application to run again to the foreground is recorded as a fifth operation. The snapshot stored in the first application background can be recorded as a first image.
Because the electronic device may or may not be self-initiated before receiving the fifth operation input by the user, after receiving the fifth operation input by the user, the electronic device may directly start the first activity of the application by using the first process that is self-initiated by the first application background, or may need to start the first process of the first application, and after the first process of the first application is started, start the first activity of the first application by using the first process of the first application. Of course, after the electronic device is started this time, a snapshot page is displayed, and then a second interface (the last interface displayed before the last back stage) is displayed.
Of course, in practical applications, since the process of the first application may be self-started in the background, according to different occasions of the fifth operation of the user (in the case two and the case three in the above example), the response time of the application at the time of starting is different, and after the starting, the transition page may be used as the starting page, and the snapshot page may also be used as the starting page.
That is, even if the first application is started by the same operation and the same process, the first application may display the transition page, and may also display the snapshot page.
As one example of displaying a transition page, the electronic device displays a second interface of the first application, the second interface including a first control;
responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to a third operation, the electronic device displays the second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys the first process;
the electronic equipment starts the first process;
the electronic equipment receives a fifth operation input by a user;
in response to the fifth operation, the electronic device starts a first activity, the electronic device displays a first interface, and the electronic device displays the second interface, wherein the first activity is used for generating the second interface, and the first interface comprises: advertisement page, logo page or blank page.
In the case where the electronic device displays the second interface, if the user starts the first application using the same operation and the same procedure, the first application may display the snapshot page.
As an example of displaying a snapshot page, since the first application displays a second interface after the first application is started last time, the second interface includes a first control, and the first application is started again by adopting the same process (also backing off and then starting up).
Responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to a third operation, the electronic device displays the second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys the first process;
the electronic equipment starts the first process;
the electronic equipment receives a fifth operation input by a user;
and responding to the fifth operation, the electronic equipment starts the first activity, displays a first image, and displays the second interface, wherein the first image is an image containing the first control.
Since the second application and the first application are the same as the application installed in the electronic device, the second application and the first application are the same in the case when they are started. In practical applications, the starting response time of each application may be different, so that the snapshot page may be used as a starting page when the first application is started, and the transition page may be used as a starting page; the second application may be started with the snapshot page as a start page and the transition page as a start page.
For ease of distinction, the master process of the second application may be denoted as the second process. The Activity of the first application loaded after the second application is started is noted as a second Activity. The second activity is for obtaining an interface of the first application displayed after the second application is started.
In the embodiment of the application, the last interface displayed before the second application is in the background is referred to as a fourth interface. Before the user goes back to the background, a clicking operation (which may be denoted as a sixth operation) may be performed on the fourth interface, for example, clicking on a second control displayed in the fourth interface, so that the electronic device displays a fifth interface of the application. Of course, the user may also perform a seventh operation (e.g., a gesture to back on the display screen, clicking a back control in a navigation control displayed by the electronic device, etc.) while the electronic device displays the fifth interface, such that the electronic device returns from displaying the fifth interface to displaying the fourth interface. The operation triggering the second application to go back to the background is denoted as eighth operation. After the second application is in the background, the operation of triggering the second application to run again to the foreground is recorded as a ninth operation. Wherein the snapshot saved in the second application fallback stage may be noted as the second image.
Because the electronic device may or may not be self-initiated before receiving the ninth operation input by the user, after receiving the ninth operation input by the user, the electronic device may directly start the second activity of the application by using the second process that is self-initiated by the background of the second application, or may need to start the second process of the second application, and after the second process of the second application is started, start the second activity of the second application by using the second process of the second application. Of course, since the second application may be displayed after being started, the transition page may also be displayed as a snapshot page. The transition page displayed by the second application may be denoted as a sixth interface, and the snapshot page displayed by the second application may be denoted as a second image, the second image being an image containing the second control.
In addition, in practical applications, the cached Activity is actually a cached Activity index.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, where the computer program can implement the steps in the above-mentioned method embodiments when executed by a processor.
Embodiments of the present application also provide a computer program product enabling an electronic device to carry out the steps of the various method embodiments described above when the computer program product is run on a first device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a first device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The embodiments of the present application also provide a chip system, where the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any of the method embodiments of the present application. The chip system can be a single chip or a chip module composed of a plurality of chips.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (28)

1. An application launch method, comprising:
the method comprises the steps that the electronic equipment receives a first operation input by a user, wherein the first operation acts on an icon of a first application, and the first operation is an operation of starting the first application for the first time after the electronic equipment is started;
in response to the first operation, the electronic device starts a first process of the first application, and the electronic device displays a first interface, wherein the first interface comprises: advertisement page, logo page or blank page;
the electronic equipment displays a second interface of the first application, wherein the second interface comprises a first control;
responsive to a second operation acting on the first control, the electronic device displays a third interface of the first application;
in response to a third operation, the electronic device displays the second interface of the first application;
the electronic equipment receives a fourth operation input by a user;
responding to the fourth operation, and switching the first application to background operation by the electronic equipment;
the electronic device destroys the first process;
the electronic equipment receives a fifth operation input by a user;
and responding to the fifth operation, the electronic equipment starts the first process, displays a first image, and displays the second interface, wherein the first image is an image containing the first control.
2. The method of claim 1, wherein the electronic device, in response to the fifth operation, initiates the first process, the electronic device displaying a first image, the electronic device displaying the second interface, comprising:
in response to the fifth operation, the electronic device initiates the first process;
displaying a first image by the electronic device under the condition that the application starting response time length of the first application is smaller than a first value, wherein the application starting response time length of the first application is the time length from the electronic device accepting the fifth operation to the electronic device displaying the second interface;
after the electronic device displays the first image, the electronic device displays the second interface.
3. The method of claim 1 or 2, wherein after the electronic device destroys the first process, before the electronic device receives a fifth operation of user input, the method further comprising:
the electronic equipment starts the first process;
after the electronic device receives the fifth operation input by the user, the method further comprises:
and responding to the fifth operation, the electronic equipment starts a first activity of the first application, the electronic equipment displays the first image, and the electronic equipment displays the second interface, wherein the first image is an image containing the first control, and the first activity is used for generating the second interface.
4. The method of claim 1 or 2, wherein the method further comprises:
the electronic equipment displays a fourth interface of the second application, wherein the fourth interface comprises a second control;
responsive to a sixth operation acting on the second control, the electronic device displays a fifth interface of the second application;
in response to a seventh operation, the electronic device displays the fourth interface of the second application;
the electronic equipment receives an eighth operation input by a user;
in response to the eighth operation, the electronic device switches the second application to a background operation;
the electronic device destroys a second process of the second application;
the electronic equipment receives a ninth operation input by a user;
in response to the ninth operation, the electronic device starts the second process, the electronic device displays a sixth interface, and the electronic device displays the fourth interface, wherein the sixth interface includes: advertisement page, logo page or blank page.
5. The method of claim 4, wherein the electronic device, in response to the ninth operation, initiates the second process, the electronic device displaying a sixth interface, the electronic device displaying the fourth interface, comprising:
In response to the ninth operation, the electronic device initiates the second process;
displaying the sixth interface by the electronic device when the application start response time of the second application is longer than or equal to a second value, wherein the application start response time of the second application is a time between the electronic device receiving the ninth operation and the electronic device displaying the fourth interface;
after the electronic device displays the sixth interface, the electronic device displays the fourth interface.
6. The method of claim 1 or 2, wherein before the electronic device displays the first image, the method further comprises:
the electronic equipment determines an index of the first image stored in the electronic equipment;
the electronic device determines that the application starting response time length of the first application is smaller than a first value, wherein the application starting response time length is the time length from the electronic device receiving the fifth operation to the electronic device displaying the second interface;
the electronic equipment determines that a first activity is stored in a task stack of the first application, and the first activity is used for generating the second interface;
The electronic device obtains an index of the first image stored in the electronic device and window information of the first application, wherein the index of the first image is used for representing a storage position of the first image in the electronic device, and the window information of the first application comprises display parameters when the electronic device displays the first image.
7. The method of claim 4 or 5, wherein before the electronic device displays the sixth interface, the method further comprises:
the electronic equipment determines an index of a second image stored in the electronic equipment, wherein the second image is an image containing the second control;
the electronic device determines that an application start response length of the second application is greater than or equal to a first value.
8. The method of claim 6, wherein after the electronic device receives the fifth operation of the user input, the method further comprises:
the electronic device determines whether the first process is started;
under the condition that the first process is not started, the electronic equipment determines the application starting response time length of the first application as a first time length, wherein the first time length is determined by the historical application starting time length of the first application during cold starting;
The electronic equipment determines the started duration of the first process under the condition that the first process is started;
when the first process is started and longer than or equal to a second time, determining that the application starting response time of the first application is a third time, wherein the second time is determined by the historical process starting time when the first application is cold started, and the third time is determined by the historical application starting time and the historical process starting time when the first application is cold started;
and under the condition that the started time length of the first process is smaller than the second time length, determining that the application starting response time length of the first application is a fourth time length, wherein the fourth time length is determined by the historical application starting time length of the first application during historical cold starting and the started time length of the first process.
9. The method of claim 8, wherein the electronic device determining whether the first process is initiated comprises:
the electronic equipment acquires a processrunning flag bit of the first process;
in the case that the processrunning flag bit is a first identifier, the electronic device determines that the first process has been started;
And in the case that the processrunning flag bit is not the first identifier, the electronic device determines that the first process is not started.
10. The method of claim 9, wherein the electronic device determining the first process initiated duration comprises:
the electronic equipment calculates a second difference value between the current time and the starting time of the first process, the started time of the first process is the second difference value, and the starting time of the first process is the time when the processing running flag bit of the first process becomes the first identifier for the last time;
or the electronic equipment calculates a third difference value between the moment of receiving the fifth operation and the starting moment of starting the first process, wherein the started duration of the first process is the third difference value;
or the electronic device calculates a fourth difference value between a first time and a starting start time of the first process, wherein the first time is any time between the time when the electronic device receives the fifth operation and the current time, and the started time length of the first process is the fourth difference value.
11. The method according to any one of claims 8 to 10, wherein the method further comprises:
The electronic equipment acquires a historical application starting time length and a historical process starting time length of the last N times of cold starting on the first application history, wherein N is a natural number which is greater than or equal to 1;
the electronic equipment obtains a second value according to the historical application starting time length of the last N times of cold starting on the first application history, wherein the second value is the sum of the estimated process starting time length and the estimated Activity loading time length of the first application when the first application is started at this time;
the electronic equipment obtains a third value according to the historical process starting time length of the last N times of cold starting on the first application history, wherein the third value is the estimated process starting time length of the first application when the first application is started at this time;
the first time length is the second value, the second time length is the third value, the third time length is the second value minus the third value, and the fourth time length is the second value minus the first process started time length.
12. The method of claim 11, wherein the obtaining, by the electronic device, a second value based on a historical application launch duration at a last N cold boots historically of the first application comprises:
the electronic equipment acquires historical application starting time length and corresponding weights respectively at last N times of cold starting on a first application history, wherein N is a natural number which is more than or equal to 2;
The electronic equipment calculates a weighted average value of historical application starting time lengths at the last N times of cold starting in the history to obtain the second value;
the electronic device obtaining a third value according to the historical process starting time length of the last N times of cold starting on the first application history comprises:
the electronic equipment acquires historical process starting time length at last N times of cold starting in history and weights corresponding to the historical process starting time length and the historical process starting time length respectively;
and the electronic equipment calculates a weighted average of the historical process starting time lengths of the last N times of cold starting in the history to obtain the third value.
13. The method of claim 11, wherein the time of the ith cold start at the last N cold starts historically is less than the time of the jth cold start, the weight of the historical application start time at the ith cold start is less than or equal to the weight of the historical application start time at the jth cold start, the weight of the historical process start time at the ith cold start is less than or equal to the weight of the historical process start time at the jth cold start, both i and j are positive integers less than or equal to N, i is not equal to j, the weight of the application start time at the ith cold start is S N-i S is the attenuation coefficient.
14. The method of any of claims 8 to 13, wherein in the event that the first process is not started, the method further comprises:
after the first process is started, the electronic equipment sends the current process starting time length of the first process to a systemserver process through the first process;
the electronic equipment acquires the starting time length of the current process from the systemserver process;
the electronic equipment stores the current process starting time length which is the historical process starting time length when the first application is started next time.
15. The method of any of claims 8 to 14, wherein in the event that the first process is not started, the method further comprises:
after the electronic equipment displays the second interface, the electronic equipment acquires a first moment when drawing of the second interface is completed and a second moment when the electronic equipment detects the fifth operation through an actigyMetricsLogger;
the electronic equipment calculates the difference between the first moment and the second moment through an actigyMetricsLogger to obtain the current application starting time length of the first application;
The electronic equipment stores the current application starting time length which is the historical application starting time length when the first application is started next time.
16. The method of any of claims 6, 8 to 15, wherein after the fourth operation of the electronic device receiving user input, the method further comprises:
the electronic equipment generates the first image based on the second interface and stores the first image;
the electronic device caches an index of the first image in a first storage space.
17. The method of claim 16, wherein after the electronic device destroys the first process of the first application, the method further comprises:
the electronic equipment acquires an index of the first image from the first storage space;
the electronic equipment acquires window information of the first application from a window state;
the electronic equipment caches the index of the first image and the window information of the first application in a second storage space;
the electronic equipment caches the activity of the top of the task stack of the first application in the task stack, wherein the activity of the top of the task stack of the first application is the first activity.
18. The method of claim 17, wherein after the electronic device caches the index of the first image, the window information of the first application, and the first activity, the method further comprises:
the electronic equipment deletes the index of the first image cached in the first storage space;
and deleting the window information of the first application recorded by the window state by the electronic equipment.
19. The method of claim 18, wherein the electronic device obtaining the index of the first image and the window information of the first application stored in the electronic device comprises:
the electronic device acquires the index of the first image and the window information of the first application from the second storage space.
20. The method of claim 19, wherein prior to the electronic device obtaining the index of the first image and the window information of the first application from the second storage space, the method further comprises:
the electronic device does not obtain an index of the first image from the first storage space.
21. The method of any of claims 17 to 20, wherein the electronic device determining that the first activity is stored in a task stack of the first application comprises:
The electronic equipment sends a first request to a task stack of the first application through a tasksnapshotsource, wherein the first request is used for acquiring the first activity cached in the task stack of the first application;
and under the condition that the electronic equipment acquires the cached first activity from the task stack of the first application, the electronic equipment determines that the first activity is stored in the task stack of the first application.
22. The method of claim 21, wherein before the electronic device sends the first request to the task stack of the first application via a tasknapshotsurface, the method further comprises:
the electronic equipment sends a second request to a task stack of the first application through a tasksnapshotsource, wherein the second request is used for acquiring the first activity recorded in the task stack of the first application;
the electronic device does not acquire the first activity based on the second request.
23. The method of claim 21 or 22, wherein before the electronic device determines that the first activity is stored in a task stack of the first application, the method further comprises:
and the electronic equipment acquires the task stack of the first application from the actiglyrecord through a tasksnapshotsource.
24. The method of any of claims 17 to 23, wherein after the electronic device caches the index of the first image, the window information of the first application, and the first activity, the method further comprises:
deleting the window information and the index of the first image cached in the second storage space by the electronic equipment under the condition that the display configuration of the electronic equipment is modified, and deleting the first activity cached in the task stack of the first application;
when the time length of the index of the first image and the window information of the first application stored in the second storage space is longer than a fifth time length, deleting the index of the window information and the first image cached in the second storage space by the electronic device, and deleting the first activity cached in a task stack of the first application;
under the condition that the electronic equipment is powered off or restarted, deleting the window information cached in the second storage space and the index of the first image by the electronic equipment, and deleting the first activity cached in a task stack of the first application;
and under the condition that the electronic equipment uninstalls the first application, deleting the window information and the index of the first image cached in the second storage space by the electronic equipment, and deleting the first activity cached in a task stack of the first application.
25. The method of any one of claims 6, 8 to 23, wherein the display parameters include screen adaptation information and window attribute information.
26. The method of any of claims 1-25, wherein after the electronic device displays the second interface in response to the fifth operation, the method further comprises:
the electronic equipment receives tenth operation input by a user;
in response to the tenth operation, the electronic device switches the first application to background operation;
the electronic device destroys a first process of the first application;
the electronic equipment starts the first process;
the electronic device receiving an eleventh operation of user input;
in response to the eleventh operation, the electronic device initiates a first activity, the electronic device displaying the first interface if an application initiation response of the first application grows longer than or equal to a first value; the electronic device displays the second interface, wherein the first activity is used for generating the second interface;
or, in response to the eleventh operation, the electronic device starts the first activity, and the electronic device displays the first image if an application start response time length of the first application is less than the first value; the electronic device displays the second interface.
27. An electronic device comprising a processor coupled to a memory, the processor operable to execute a computer program stored in the memory to cause the electronic device to implement the method of any one of claims 1-26.
28. A computer readable storage medium, characterized in that it stores a computer program which, when run on a processor, implements the method according to any one of claims 1 to 26.
CN202311485115.XA 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium Pending CN117648137A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311485115.XA CN117648137A (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210023801.4A CN115562742B (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium
CN202311485115.XA CN117648137A (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210023801.4A Division CN115562742B (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN117648137A true CN117648137A (en) 2024-03-05

Family

ID=84738067

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311485115.XA Pending CN117648137A (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium
CN202210023801.4A Active CN115562742B (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210023801.4A Active CN115562742B (en) 2022-01-10 2022-01-10 Application starting method, electronic device and readable storage medium

Country Status (1)

Country Link
CN (2) CN117648137A (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9449055B1 (en) * 2008-06-02 2016-09-20 Veritas Technologies Llc Technique for estimating report generation time at launch in client-server applications
CN104346351B (en) * 2013-07-26 2019-10-11 Sap欧洲公司 Smooth navigation between the page of content oriented
US10200824B2 (en) * 2015-05-27 2019-02-05 Apple Inc. Systems and methods for proactively identifying and surfacing relevant content on a touch-sensitive device
CN107179920B (en) * 2016-03-09 2021-06-04 斑马智行网络(香港)有限公司 Network engine starting method and device
US10747467B2 (en) * 2016-06-10 2020-08-18 Apple Inc. Memory management for application loading
CN109814941A (en) * 2018-11-27 2019-05-28 努比亚技术有限公司 A kind of application starting method, terminal and computer readable storage medium
CN111459715A (en) * 2019-01-20 2020-07-28 华为技术有限公司 Application exception recovery
CN110162343B (en) * 2019-04-10 2023-04-07 北京梧桐车联科技有限责任公司 Application starting method and device, electronic equipment and storage medium
CN110781067A (en) * 2019-10-30 2020-02-11 北京博睿宏远数据科技股份有限公司 Method, device, equipment and storage medium for calculating starting time consumption

Also Published As

Publication number Publication date
CN115562742B (en) 2023-10-20
CN115562742A (en) 2023-01-03

Similar Documents

Publication Publication Date Title
CN116126201B (en) Application starting method, electronic device and readable storage medium
CN106406940B (en) System upgrading method, device and terminal
CN110955541B (en) Data processing method, device, chip, electronic equipment and readable storage medium
CN104601683A (en) File download management method, mobile terminal and communication system
CN106776908B (en) Data cleaning method and device and terminal
CN111078376A (en) Process management method and device
CN111580851A (en) Data management method and related device
CN109634762B (en) Data recovery method and device, electronic equipment and storage medium
CN115562742B (en) Application starting method, electronic device and readable storage medium
CN115858046B (en) Method for preloading memory pages, electronic equipment and chip system
CN113391743A (en) Display method and electronic equipment
CN108874591B (en) Document processing method and related product
CN115543470B (en) Application starting method, electronic device and readable storage medium
CN114691276B (en) Application processing method, intelligent terminal and storage medium
WO2023029985A1 (en) Method for displaying dock bar in launcher and electronic device
CN114217685A (en) Application management method, intelligent terminal and storage medium
CN115878500A (en) Memory recovery method and device, electronic equipment and readable storage medium
CN116048679B (en) Layer processing method, electronic equipment and readable storage medium
CN113138857A (en) Memory cleaning method, mobile terminal and storage medium
CN116028265B (en) Snapshot acquisition method, electronic equipment and readable storage medium
CN114265662B (en) Information recommendation method, electronic device and readable storage medium
EP4276622A1 (en) Task scheduling method, electronic device, chip system, and storage medium
CN116700602B (en) Method and equipment for inquiring and expanding service life of memory
CN116089320B (en) Garbage recycling method and related device
CN116680118A (en) Application backup method, electronic device, storage medium and program product

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