[go: up one dir, main page]

CN114201226A - Application starting method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN114201226A
CN114201226A CN202010871761.XA CN202010871761A CN114201226A CN 114201226 A CN114201226 A CN 114201226A CN 202010871761 A CN202010871761 A CN 202010871761A CN 114201226 A CN114201226 A CN 114201226A
Authority
CN
China
Prior art keywords
application
started
page
virtual display
preloading
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
CN202010871761.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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010871761.XA priority Critical patent/CN114201226A/en
Publication of CN114201226A publication Critical patent/CN114201226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开是关于一种应用的启动方法及装置、电子设备及存储介质。该方法应用于电子设备中,包括:创建虚拟显示类的虚拟显示实例;通过所述虚拟显示实例,预加载待启动应用的应用页面。本公开的方案具有可维护性高的特点;此外,本公开的方案对横屏和竖屏的显示页面均可预加载,具有适用范围广的特点。

Figure 202010871761

The present disclosure relates to an application startup method and device, an electronic device and a storage medium. The method is applied to an electronic device, and includes: creating a virtual display instance of a virtual display class; and preloading an application page of an application to be activated by using the virtual display instance. The solution of the present disclosure has the characteristics of high maintainability; in addition, the solution of the present disclosure can preload the display pages of the horizontal screen and the vertical screen, and has the characteristics of wide application range.

Figure 202010871761

Description

Application starting method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for starting an application, an electronic device, and a storage medium.
Background
At present, with the rapid development of terminal technology, smart devices such as smart phones and tablet computers have become essential electronic devices in people's lives.
Various Applications (APPs) are installed on the terminal, such as: rong Yao, Jing Dong and Tao Bao, etc. Generally, the application is started to be loaded only based on the opening operation of a user, and an advertisement page of a few seconds is displayed on a display screen of the terminal; some game applications can also display a resource loading page when being opened, and perform some resource loading operations, so that the starting of the applications has delay.
Based on this, there are some solutions for application preloading, however, the above solutions have problems of poor maintainability and limited application pages that can be preloaded.
Disclosure of Invention
The disclosure provides an application starting method and device, electronic equipment and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided an application starting method, applied to an electronic device, including:
creating a virtual display instance of the virtual display class;
and preloading an application page of the application to be started through the virtual display example.
Optionally, the method further includes:
and prohibiting the preloaded application from outputting sound according to the application identifier of the application to be started.
Optionally, the prohibiting the preloaded application from outputting sound includes:
muting the track of the preloaded application.
Optionally, the method further includes:
and after the application page preloading is completed, freezing the process of the preloaded application.
Optionally, the preloading an application page of an application to be started through the virtual display instance includes:
and preloading a main page of the application to be started through the virtual display instance.
Optionally, the preloading the main page of the application to be started through the virtual display instance includes:
and sequentially preloading a starting page and an advertisement page of the application to be started through the virtual display example, and stopping on the main page.
Optionally, the method further includes:
acquiring the loading duration from the starting page of the application to be started to the main page in advance;
the pre-loading the starting page and the advertisement page of the application to be started in sequence through the virtual display instance, and stopping on the main page, comprises:
stopping the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
Optionally, the method further includes:
and after the preset duration of the application page preloading is completed, if the starting instruction of the application to be started is not received, closing the process for executing the preloading of the application to be started.
Optionally, the method further includes:
and after the process of preloading the application to be started is closed, recovering the sound of the application to be started.
Optionally, the method further includes:
receiving a starting instruction of an application;
determining whether the starting instruction indicates a started application or not, wherein the application is preloaded through the virtual display instance;
and if the starting instruction indicates that the started application is the preloaded application, displaying the application page loaded by the virtual display instance.
Optionally, the method further includes:
and restoring the sound of the application according to the starting instruction.
Optionally, the method further includes:
and according to the starting instruction, unfreezing the process of preloading the application page.
Optionally, the preloading an application page of an application to be started through the virtual display instance includes:
if the electronic equipment works in a first state, preloading an application page of the application to be started through the virtual display instance; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
According to a second aspect of the embodiments of the present disclosure, there is provided an application starting apparatus, applied to an electronic device, including:
a creation module configured to create a virtual display instance of a virtual display class;
and the preloading module is configured to preload the application page of the application to be started through the virtual display instance.
Optionally, the apparatus further comprises:
and the forbidding module is configured to forbid the preloaded application from outputting sound according to the application identifier of the application to be started.
Optionally, the disabling module is specifically configured to mute an audio track of the preloaded application.
Optionally, the apparatus further comprises:
and the freezing module is configured to freeze the process of the preloaded application after the application page preloading is completed.
Optionally, the preloading module is specifically configured to preload the main page of the application to be started through the virtual display instance.
Optionally, the pre-loading module is specifically configured to pre-load the start page and the advertisement page of the application to be started in sequence through the virtual display instance, and stop on the main page.
Optionally, the apparatus further comprises:
the acquisition module is configured to acquire the loading duration from the starting page of the application to be started to the main page in advance;
the preloading module is specifically configured to stop the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
Optionally, the apparatus further comprises:
and the closing module is configured to close the process of executing the application to be started in a preloading manner if the starting instruction of the application to be started is not received after the application page is preloaded for the preset time length.
Optionally, the apparatus further comprises:
the first recovery module is configured to recover the sound of the application to be started after the process of preloading the application to be started is closed.
Optionally, the apparatus further comprises:
the receiving module is configured to receive a starting instruction of the application;
a determining module configured to determine whether the starting instruction indicates a started application, which is an application preloaded through the virtual display instance;
and the display module is configured to display the application page loaded by the virtual display instance if the starting instruction indicates that the started application is a preloaded application.
Optionally, the apparatus further comprises:
and the second recovery module is configured to recover the sound of the application according to the starting instruction.
Optionally, the apparatus further comprises:
and the unfreezing module is configured to unfreeze the process of preloading the application page according to the starting instruction.
Optionally, the preloading module is specifically configured to preload the application page of the application to be started through the virtual display instance if the electronic device is in the first state; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of launching an application as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium including:
the instructions in said storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of launching an application as described in the first aspect above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, the application page of the application to be started is preloaded through the virtual display instance by creating the virtual display instance of the virtual display class, and the application page preloaded through the virtual display instance is invisible, so that the application page does not need to be actively set to be in an invisible state; after the electronic equipment receives the starting instruction aiming at the application to be started, the application page can be directly displayed without changing the display state of the application page. Therefore, the scheme of the disclosure has the characteristic of high maintainability. In addition, the scheme disclosed by the invention can pre-load the display pages of the horizontal screen and the vertical screen, and has the characteristic of wide application range.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a method for starting an application according to an embodiment of the present disclosure.
Fig. 2 is a diagram illustrating an example of a method for starting an application in a mobile phone.
Fig. 3 is a flowchart illustrating a preloading method applied in an embodiment of the disclosure.
Fig. 4 is a diagram illustrating an exemplary process flow after the process of the preloaded application is closed in the embodiment of the present disclosure.
Fig. 5 is a diagram illustrating an exemplary process flow of a preloaded application being launched in an embodiment of the present disclosure.
FIG. 6 is a diagram illustrating a launching device for an application, according to an example embodiment.
Fig. 7 is a block diagram of an electronic device shown in an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a method for starting an application according to an embodiment of the present disclosure, and as shown in fig. 1, the method for starting an application applied to an electronic device includes the following steps:
s11, creating a virtual display instance of the virtual display class;
and S12, preloading an application page of the application to be started through the virtual display instance.
In an embodiment of the present disclosure, an electronic device includes: mobile phones, tablet computers, notebook computers, and the like. The electronic device is installed with an application, and runs based on an operating system in the electronic device. The operating system of the electronic device may be an android operating system, an apple operating system, or the like, which is not limited in the embodiments of the present disclosure.
In the embodiment of the disclosure, when the electronic device starts an application, a preloading mode is adopted, that is, before a start instruction that a user opens the application is detected, the application is loaded to the memory in advance.
In step S11, the electronic device creates a virtual display instance of the virtual display class, i.e., the electronic device opens up a piece of memory using the virtual display class.
Taking an example that an operating system of the electronic device is an android system, a virtual display class in the android system may be a VirtualDisplay class, and the VirtualDisplay class is a predefined class in the operating system and can be regarded as a container for drawing a display interface. The electronic equipment creates a virtual display instance of the VirtualDisplay class, namely, a memory is opened up for storing display data of a display interface to be displayed.
In embodiments of the present disclosure, one virtual display instance represents one virtual display. The virtual display is different from a display screen of the electronic device, the virtual display being invisible to a user. And if the display data corresponding to the virtual display needs to be displayed, reading and displaying the display data of the virtual display by the display screen, and turning the display interface of the virtual display to be visible for the user.
In step S12, based on the created virtual display instance, the application page of the application to be started may be preloaded. The application page at least comprises a main page of the application to be started, and can also comprise a starting page, an advertisement page and the like.
The launch page may be an import page of the application, for example, the launch page is a page including an application profile. Since the application program is essentially formed by combining a plurality of code commands and data, the process of starting the application is essentially the process of running the codes and reading the data, and the process needs a certain time, so that when the application is started, a starting page is usually displayed on a display screen, the running process of the codes is not displayed or the starting page is displayed in a black screen mode, and the user experience can be improved.
The advertisement page may be a page embedded in the application but unrelated to the functional execution of the application. The introduction of the advertisement page can also enable the application to be displayed with rich page content when the application is started, and the application is not displayed in the running process of the display code or in the mode of a black screen, so that the user experience can also be improved.
In addition, the main page of the application can be a navigation page of the application, and the user can conveniently operate the application based on the display of the main page. Generally, after the main page is loaded and displayed, the application is started to be completed, and the main page is the first page displayed after the application is started.
It should be noted that, in the embodiment of the present disclosure, based on the created virtual display instance, the application page of the preloaded application to be started is not visible to the user, but the application page loading completion also indicates that the application is started in advance.
In one embodiment, all installed applications in an electronic device may be preloaded using the methods of embodiments of the present disclosure. In addition, all installed applications may also be pre-documented in connection with time periods. For example, it is set that an application installed in the electronic device is preloaded at a predetermined time period such as daytime.
In an embodiment, the method of the embodiment of the present disclosure may also be used for preloading different applications in different time periods according to the recorded user usage habits, for example, for the time period when the user uses each application.
In another embodiment, the method of the embodiment of the present disclosure may be used for preloading an application with a high frequency of use according to the frequency of use of the application. For example, it is determined that an application program of a first usage frequency within the current period is preloaded, and it is determined that an application program of a second usage frequency within the current period is not preloaded. The second usage frequency is lower than the first usage frequency.
In the embodiment of the disclosure, when the application page of the application to be started is preloaded through the virtual display instance, the application page of the application to be started can be preloaded according to the application identifier of the application to be started. Wherein the application identification comprises: an application name and/or an application number.
In a preloading scheme of an application, an application page of an application to be started is preloaded by creating an instance of a management class Stack of the application page. However, in this scheme, the application page loaded by the instance of the Stack class needs to be actively set to an invisible state, so that the application page can be hidden from the user. After the electronic device detects a start instruction of the user for the application, the application page to be displayed needs to be set to a visible state, so that the application page (such as a home page) can be displayed on a display screen of the electronic device. Therefore, the scheme needs to change the display state of the application page based on different stages of application starting, and the maintainability is poor. In addition, a problem with the Stack-based approach is that the display pages of the landscape cannot be preloaded.
In contrast, according to the application page pre-loading method and device, the virtual display instance of the virtual display class is created, the application page of the application to be started is pre-loaded through the virtual display instance, and the application page pre-loaded through the virtual display instance is invisible, so that the application page does not need to be actively set to be in an invisible state; after the electronic equipment receives the starting instruction aiming at the application to be started, the application page can be directly displayed without changing the display state of the application page, so that the scheme disclosed by the invention has the characteristic of high maintainability. In addition, the scheme disclosed by the invention can pre-load the display pages of the horizontal screen and the vertical screen, and has the characteristic of wide application range.
In one embodiment, the method for starting the application further includes:
and prohibiting the preloaded application from outputting sound according to the application identifier of the application to be started.
In this embodiment, when the application page of the application to be started is preloaded by the virtual display instance, the application is also prohibited from outputting sound according to the application Identifier (UID) of the application to be started. In the application preloading stage, the user does not intend to use the application, so the sound output in the preloading stage is unnecessary, and for this reason, the preloaded application is prohibited from outputting the sound, so that the power consumption of the electronic equipment can be reduced, and the interference to the user can be reduced.
It should be noted that, in the embodiment of the present disclosure, the prohibited sound may include: pre-loading sounds in the process, such as sounds corresponding to the start page and/or the advertisement page; further, the prohibited sounds may further include: and after the preloading is finished, applying sound in the running stage, such as the WeChat application, and preloading a message prompt tone received on the main page of the WeChat application.
Further, in one embodiment, during the pre-loading phase, the application is disabled from outputting sound based on a Process Identifier (PID). However, since one application may correspond to multiple processes when preloaded, disabling the PID may result in part of the sound of the preloaded application still being output.
In contrast, the application to be started is prohibited from outputting the sound according to the application identifier of the application to be started, so that the sound output of the application to be started can be comprehensively prohibited, and the accuracy of prohibiting the sound output is improved.
In one embodiment, the preloaded application may be inhibited from outputting sound by inhibiting a sound output component of the electronic device, such as a speaker.
In another embodiment, the disabling of the preloaded applications from outputting sound includes:
muting the track of the preloaded application.
In this embodiment, since the track of the preloaded application belongs only to the application to be preloaded, the influence on the sound output of other applications can be reduced by muting the track of the preloaded application to prohibit the output of sound.
In the embodiments of the present disclosure, when muting the track of the preloaded application, the volume of the track of the preloaded application may be set to zero.
For example, the mobile phone is running the application a, and at the same time, the mobile phone also preloads the application page of the application B in the background through the virtual display instance. Then, when the track of the B application is muted, the a application can still normally output sound. It can be understood that in this way, normal data of sound of other applications can not be interfered, and the use experience of a user can be improved.
In one embodiment, the method for starting the application further includes:
and after the application page preloading is completed, freezing the process of the preloaded application.
In this embodiment, after application page preloading is complete, the process of the preloaded application is frozen, thereby causing the process to be in a suspended state. Because the process in the suspended state does not need to perform instruction interaction any more, the occupancy rate of a Central Processing Unit (CPU) of the electronic device is not increased, and the power consumption of the electronic device is not increased. In addition, due to the fact that the process of the preloaded application is frozen, the occurrence of interference phenomena among the processes running in the electronic equipment can be reduced, and the running stability of the electronic equipment is improved.
In an embodiment, the preloading an application page of an application to be started through the virtual display instance includes:
and preloading a main page of the application to be started through the virtual display instance.
As previously described, the main page preload is complete, indicating that the application preload is complete. The main page may be understood as the first page displayed after the application preloading is completed, e.g. the main page may be a navigation page of the application. Therefore, when the application page of the application to be started is preloaded through the virtual display instance, the main page is preloaded, so that the electronic equipment can quickly display the main page after receiving a starting instruction of the application to be started, and a user can conveniently execute operation based on the displayed main page.
In one embodiment, the preloading the main page of the application to be started through the virtual display instance includes:
and sequentially preloading a starting page and an advertisement page of the application to be started through the virtual display example, and stopping on the main page.
As described above, generally, when an application is started, a start page and an advertisement page are displayed on a display screen, and a running process of a code is not displayed, so that user experience can be improved. Therefore, when the electronic equipment detects the starting instruction of the application program, the display screen can directly read the display data of the main page from the virtual display instance to directly display the display data, so that the main page of the application program is directly entered, the waiting time of a user is saved, and the use experience of the user is improved.
In addition, the electronic device stops at the main page, that is, the loading is not continued, for example, the animation effect of the main page is not continuously loaded, and the consumption of the memory of the electronic device can be reduced.
In one embodiment, the method for starting the application further includes:
acquiring the loading duration from the starting page of the application to be started to the main page in advance;
the pre-loading the starting page and the advertisement page of the application to be started in sequence through the virtual display instance, and stopping on the main page, comprises:
stopping the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
In this embodiment, the electronic device may obtain in advance a loading duration from a start page to a main page of an application to be started, for example, the loading duration is obtained based on a preset manner; for another example, the electronic device obtains the historical loading duration from the starting page to the main page when the application is started based on the historical times, and performs statistical analysis.
Based on the loading duration acquired in advance, after the loading duration of the application to be started is preloaded by the virtual display instance, the loading of the application to be started can be stopped, that is, after the loading duration, the application to be started is determined to be preloaded.
The virtual display instance is controlled to be pre-loaded in a loading time length mode, so that the current loading is not distinguished from the starting page and/or the advertisement page of the application program, and the virtual display instance is stopped after the preset time length is directly loaded, and the pre-loading operation is simplified.
In addition, in the embodiment of the disclosure, in order to ensure that the loading duration is the duration from the application starting to the loading to the main page, the electronic device may correct the loading duration periodically or aperiodically according to the historical starting data or the starting data of a large number of terminals.
In one embodiment, the method further comprises:
and after the preset duration of the application page preloading is completed, if the starting instruction of the application to be started is not received, closing the process for executing the preloading of the application to be started.
In this embodiment, if the start instruction of the application to be started is not received after the application page is preloaded for the preset duration, the process of preloading the application to be started is closed.
As described above, for example, the application is preloaded by using the scheme of the present disclosure in advance according to the time period of the application by the user, and if the start instruction of the application is not received after the preset time period of completion of the preloading, it is indicated that the pre-start may not be necessary, and thus the process of executing the application may be closed.
It can be understood that, if the electronic device of the present disclosure does not receive the start instruction of the application to be started after the preset time period, the process of executing the preloaded application to be started is closed, so that memory usage of the electronic device can be reduced.
It should be noted that, in the embodiment of the present disclosure, the preset time period may vary from several minutes to several hours, for example, the preset time period is 20 minutes. It can be understood that, if the preset duration is longer, the main page of the application can be displayed as quickly as possible when the electronic device detects a start instruction of the application; and if the preset duration is shorter, the occupation of the preloading on the memory of the electronic equipment can be reduced.
In one embodiment, the method further comprises:
and after the process of preloading the application to be started is closed, recovering the sound of the application to be started.
In this embodiment, as described above, when the application page of the application to be started is preloaded, the preloaded application is also inhibited from outputting sound, so as to reduce power consumption of the electronic device and reduce interference to the user. However, after the process of executing the preloaded application to be started is closed, the electronic device may also receive a start instruction, and at this time, the electronic device opens the application in a cold start mode (the application is opened from a state where the application is not running in the background), so that, to enable the application to run normally (the screen display and the sound can be output synchronously), the sound of the application to be started needs to be recovered after the process of executing the preloaded application to be started is closed.
In the embodiment of the disclosure, the sound of the application to be started is recovered after the process for executing the preloaded application to be started is closed, so that on one hand, the occurrence of failure phenomena caused by multiple processing tasks of a CPU (central processing unit) when the process is closed and the sound synchronization processing is recovered can be reduced, for example, the sound recovery failure and/or the process closing failure; on the other hand, the sound is recovered after the process is closed, so that the error output of the sound in the preloading stage can be reduced.
It can be understood that, in this embodiment, through the recovery of the sound, the electronic device can still normally operate when the application is started in the cold start mode, so that the use experience of the user can be improved.
In one embodiment, the method further comprises:
receiving a starting instruction of an application;
determining whether the starting instruction indicates a started application or not, wherein the application is preloaded through the virtual display instance;
and if the starting instruction indicates that the started application is the preloaded application, displaying the application page loaded by the virtual display instance.
In this embodiment, the electronic device may receive a start instruction of an application, the start instruction being received based on a click operation of an application icon by a user or based on voice information for opening the application input by the user.
After receiving the starting instruction, the electronic device determines whether the application started by the starting instruction is the application loaded through the virtual display instance, and if the application started by the starting instruction is the preloaded application, the electronic device displays the application page loaded through the virtual display instance.
It should be noted that, in the embodiment of the present disclosure, displaying, by the electronic device, the application page loaded by the virtual display instance refers to presenting the application page to the user through a display screen of the electronic device. Because the application page of the application is pre-loaded by the virtual display instance in advance, when the application page is displayed by the display screen, the application page which is loaded well only needs to be moved to the display screen for displaying.
In addition, in the embodiment of the disclosure, the application preloaded by the virtual display instance stays in the home page of the application when the application is preloaded, so that the application page displayed on the display screen is the home page when the application is displayed based on the start instruction.
In one embodiment, the method further comprises:
and restoring the sound of the application according to the starting instruction.
In this embodiment, as described above, the application preloaded by the virtual display instance prohibits the sound output of the application during the loading process, and therefore, after the electronic device receives the start instruction, if the start instruction indicates that the started application is the preloaded application, the sound of the application should be recovered, so that the page display and the sound of the application can be synchronously output, and the application is enabled to normally run.
It should be noted that, in this embodiment, the application sound restoration may be the muting of the audio track of the application.
In one embodiment, the method further comprises:
and according to the starting instruction, unfreezing the process of preloading the application page.
In this embodiment, as described above, the application preloaded by the virtual display instance freezes the process after the loading is completed, and therefore, after receiving the start instruction, if the start instruction indicates that the started application is the preloaded application, the electronic device should unfreeze the process so that the application can run.
It can be understood that the process of unfreezing the preloaded application page, that is, the application running in the background is started in a hot-start mode, so that the waiting time of the user can be saved, and the use experience of the user can be improved.
In an embodiment, the preloading an application page of an application to be started through the virtual display instance includes:
if the electronic equipment works in a first state, preloading an application page of the application to be started through the virtual display instance; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
In the embodiment, when the electronic equipment works in the first state with low working frequency, the application page of the application to be started is preloaded through the virtual display instance.
The first state may refer to an idle state in which a load rate of the electronic device is low, for example, a screen locking state or a screen blank state, the second state may refer to an operating state in which the load rate is high, and an operating frequency in the first state is lower than an operating frequency in the second state. For example, in the first state, the electronic device does not respond to the touch operation, but responds to the touch operation in the second state. For another example, the speed of the electronic device responding to the touch operation in the first state is lower than the speed of the electronic device responding to the touch operation in the second state. In the first state, the occupancy rate of the electronic device CPU is low.
It can be understood that, in the embodiment of the present disclosure, the application page of the application to be started is preloaded through the virtual display instance in the first state with a low operating frequency, and the preloading can be performed when the CPU occupancy rate of the electronic device is low, so that the probability of successful preloading can be increased.
Taking the electronic device as an example of a mobile phone, fig. 2 is an exemplary diagram of a starting method of an application in the mobile phone. As shown in fig. 2, when the mobile phone is in an idle state, such as a screen lock state, the application is preloaded in the background, and the screen-open advertisement or resource loading of the application is skipped. When the user opens the application and the mobile phone receives a starting instruction of the application, the application main page which is really used by the user is displayed on the mobile phone. By the method, the waiting time for loading the advertisement page and the resource loading page can be saved for the user, and the use experience of the user is improved.
Fig. 3 is a flowchart illustrating a preloading method applied in an embodiment of the present disclosure, as shown in fig. 3, the method includes the following steps:
s101, determining whether a virtual display screen exists or not; if not, executing step S102; if yes, go to step S103.
In this embodiment, a virtual display screen refers to a virtual display instance created by a virtual display class, such as the VirtualDisplay class.
S102, creating a virtual display screen.
In this embodiment, if there is no virtual display instance of the virtual display class, a virtual display instance is created.
S103, acquiring the identifier of the virtual display screen.
In this embodiment, if there is an instance of a virtual display class, an identifier of the virtual display instance is obtained to perform preloading by using the instance indicated by the identifier.
And S104, starting a page to a virtual display screen.
In this embodiment, the application page of the application is preloaded through the virtual display screen.
And S105, muting the current preloaded application through the application identification and the like.
In this embodiment, the currently preloaded application is muted according to the application identification of the preloaded application.
S106, suspending the page and freezing the process.
In this embodiment, after 20 seconds, the page suspends and freezes the process, that is, after the loading duration of the application to be started is preloaded in the virtual display instance, the loading of the application to be started is stopped and stopped on the main page.
And S107, closing the process.
In this embodiment, the process is closed after 20 minutes, that is, the process for executing the preloaded application to be started is closed after the preset duration for completing the preloading of the application page.
It can be understood that the scheme of the virtual display screen adopted by the present disclosure has the characteristic of high maintainability; the preloaded application is prohibited from outputting the sound in the preloading process, so that the power consumption of the electronic equipment can be reduced, and the interference to users can be reduced. In addition, the processes are closed or frozen according to the duration, so that the interference phenomenon among the processes running in the electronic equipment can be reduced, and the running stability of the electronic equipment is improved.
Fig. 4 is a diagram illustrating an exemplary process flow after the process of the preloaded application is closed in the embodiment of the present disclosure, as shown in fig. 4, the method includes the following steps:
s201, closing the application process.
In this embodiment, the electronic device may detect whether any application process is closed.
S202, judging whether the application is a preloaded application or not; if yes, go to step S203.
In this embodiment, if it is detected that a process of an application is closed, it is determined whether the closed application is an application to be started that is preloaded by a virtual display instance.
And S203, canceling the mute limitation to the application.
In this embodiment, if the application whose process is closed is a preloaded application, the sound of the application to be started is restored. For example, the sound of the application to be started is restored according to the identification of the application.
It can be understood that, through the recovery of the sound, the electronic device can still normally operate when the application is started in a cold start mode, and therefore the use experience of a user can be improved.
Fig. 5 is a flowchart illustrating a process of starting a preloaded application according to an embodiment of the present disclosure, and as shown in fig. 5, the method includes the following steps:
s301, detecting a starting instruction of the application.
In this embodiment, the electronic device detects whether an application start instruction is received
S302, whether the application is preloaded or not is judged; if not, executing step S303; if yes, go to step S304.
In this embodiment, if a start instruction is detected, it is determined whether the application that the start instruction indicates is a preloaded application through a virtual display instance.
And S303, normally starting the application process.
In this embodiment, if the application is not preloaded, the flow of the application is started normally. It should be noted that the normal start refers to a cold start mode, that is, a program running process from a start page to an advertisement page or a resource loading page to a main page is executed.
And S304, moving to a display screen.
In this embodiment, if the application is already preloaded, the loaded home page is moved to the display screen of the electronic device for display.
And S305, canceling silence.
In this embodiment, since the preloaded application is prohibited from outputting sound at the time of preloading, it is also necessary to cancel muting, that is, to restore the sound of the application to be started.
S306, unfreezing.
In this embodiment, the application preloaded by the virtual display instance freezes the process after the application is loaded, so that after the electronic device receives the start instruction, if the start instruction indicates that the started application is the preloaded application, the process needs to be unfrozen, so that the application can run.
It can be understood that, in this embodiment, the process of the pre-recorded application page is unfrozen, that is, the application running in the background is started in a warm-boot manner, so that the waiting time of the user can be saved, and the use experience of the user is improved.
FIG. 6 is a diagram illustrating a launching device for an application, according to an example embodiment. The starting device of the application is applied to the electronic device, and referring to fig. 6, in an alternative embodiment, the device includes:
a creating module 101 configured to create a virtual display instance of a virtual display class;
and the preloading module 102 is configured to preload the application page of the application to be started through the virtual display instance.
Optionally, the apparatus further comprises:
and the forbidding module 103 is configured to forbid the preloaded application from outputting sound according to the application identifier of the application to be started.
Optionally, the disabling module 103 is specifically configured to mute the audio track of the preloaded application.
Optionally, the apparatus further comprises:
and the freezing module 104 is configured to freeze the process of the preloaded application after the application page preloading is completed.
Optionally, the preloading module 103 is specifically configured to preload the main page of the application to be started through the virtual display instance.
Optionally, the preloading module 103 is specifically configured to sequentially preload the start page and the advertisement page of the application to be started through the virtual display instance, and stop on the main page.
Optionally, the apparatus further comprises:
an obtaining module 105 configured to obtain in advance a loading duration from a start page of the application to be started to the main page;
the preloading module 103 is specifically configured to stop the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
Optionally, the apparatus further comprises:
the closing module 106 is configured to close the process of executing the application to be started in a pre-loaded manner if the starting instruction of the application to be started is not received after the application page is pre-loaded for a preset time length.
Optionally, the apparatus further comprises:
a first restoring module 107 configured to restore the sound of the application to be started after the process of executing the application to be started is closed.
Optionally, the apparatus further comprises:
a receiving module 108 configured to receive a start instruction of an application;
a determining module 109 configured to determine whether the application that the launch instruction indicates is launched is an application preloaded through the virtual display instance;
the display module 110 is configured to display the application page loaded by the virtual display instance if the start instruction indicates that the started application is a preloaded application.
Optionally, the apparatus further comprises:
and a second restoring module 111 configured to restore the sound of the application according to the start instruction.
Optionally, the apparatus further comprises:
and the unfreezing module 112 is configured to unfreeze the process of preloading the application page according to the starting instruction.
Optionally, the preloading module 103 is specifically configured to preload the application page of the application to be started through the virtual display instance if the electronic device is in the first state; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an electronic device apparatus 800 in accordance with an example embodiment. For example, the device 800 may be a mobile phone, a mobile computer, etc.
Referring to fig. 7, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of launching an application, the method comprising:
creating a virtual display instance of the virtual display class;
and preloading an application page of the application to be started through the virtual display example.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (28)

1. A starting method of an application is applied to an electronic device, and the method comprises the following steps:
creating a virtual display instance of the virtual display class;
and preloading an application page of the application to be started through the virtual display example.
2. The method of claim 1, further comprising:
and prohibiting the preloaded application from outputting sound according to the application identifier of the application to be started.
3. The method of claim 2, wherein the inhibiting the preloaded application from outputting sound comprises:
muting the track of the preloaded application.
4. The method of claim 1, further comprising:
and after the application page preloading is completed, freezing the process of the preloaded application.
5. The method of claim 1, wherein preloading application pages of applications to be launched via the virtual display instance comprises:
and preloading a main page of the application to be started through the virtual display instance.
6. The method of claim 5, wherein preloading the main page of the application to be launched via the virtual display instance comprises:
and sequentially preloading a starting page and an advertisement page of the application to be started through the virtual display example, and stopping on the main page.
7. The method of claim 6, further comprising:
acquiring the loading duration from the starting page of the application to be started to the main page in advance;
the pre-loading the starting page and the advertisement page of the application to be started in sequence through the virtual display instance, and stopping on the main page, comprises:
stopping the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
8. The method of claim 1, further comprising:
and after the preset duration of the application page preloading is completed, if the starting instruction of the application to be started is not received, closing the process for executing the preloading of the application to be started.
9. The method of claim 8, further comprising:
and after the process of preloading the application to be started is closed, recovering the sound of the application to be started.
10. The method of claim 1, further comprising:
receiving a starting instruction of an application;
determining whether the starting instruction indicates a started application or not, wherein the application is preloaded through the virtual display instance;
and if the starting instruction indicates that the started application is the preloaded application, displaying the application page loaded by the virtual display instance.
11. The method of claim 10, further comprising:
and restoring the sound of the application according to the starting instruction.
12. The method of claim 10, further comprising:
and according to the starting instruction, unfreezing the process of preloading the application page.
13. The method of claim 1, wherein preloading application pages of applications to be launched via the virtual display instance comprises:
if the electronic equipment works in a first state, preloading an application page of the application to be started through the virtual display instance; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
14. An apparatus for starting an application, applied to an electronic device, the apparatus comprising:
a creation module configured to create a virtual display instance of a virtual display class;
and the preloading module is configured to preload the application page of the application to be started through the virtual display instance.
15. The apparatus of claim 14, further comprising:
and the forbidding module is configured to forbid the preloaded application from outputting sound according to the application identifier of the application to be started.
16. The apparatus of claim 15,
the disabling module is particularly configured to mute an audio track of the preloaded application.
17. The apparatus of claim 14, further comprising:
and the freezing module is configured to freeze the process of the preloaded application after the application page preloading is completed.
18. The apparatus of claim 14,
the preloading module is specifically configured to preload the main page of the application to be started through the virtual display instance.
19. The apparatus of claim 18,
the pre-loading module is specifically configured to pre-load the starting page and the advertisement page of the application to be started in sequence through the virtual display instance, and stop on the main page.
20. The apparatus of claim 19, further comprising:
the acquisition module is configured to acquire the loading duration from the starting page of the application to be started to the main page in advance;
the preloading module is specifically configured to stop the loading of the application to be started after the virtual display instance preloads the loading duration of the application to be started.
21. The apparatus of claim 14, further comprising:
and the closing module is configured to close the process of executing the application to be started in a preloading manner if the starting instruction of the application to be started is not received after the application page is preloaded for the preset time length.
22. The apparatus of claim 21, further comprising:
the first recovery module is configured to recover the sound of the application to be started after the process of preloading the application to be started is closed.
23. The apparatus of claim 14, further comprising:
the receiving module is configured to receive a starting instruction of the application;
a determining module configured to determine whether the starting instruction indicates a started application, which is an application preloaded through the virtual display instance;
and the display module is configured to display the application page loaded by the virtual display instance if the starting instruction indicates that the started application is a preloaded application.
24. The apparatus of claim 23, further comprising:
and the second recovery module is configured to recover the sound of the application according to the starting instruction.
25. The apparatus of claim 23, further comprising:
and the unfreezing module is configured to unfreeze the process of preloading the application page according to the starting instruction.
26. The apparatus of claim 14,
the preloading module is specifically configured to preload the application page of the application to be started through the virtual display instance if the electronic device works in a first state; wherein the operating frequency of the electronic device in the first state is lower than the operating frequency in the second state.
27. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of launching an application of any of claims 1 to 13.
28. A non-transitory computer readable storage medium, instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform a method of launching an application as recited in any of claims 1 to 13.
CN202010871761.XA 2020-08-26 2020-08-26 Application starting method and device, electronic equipment and storage medium Pending CN114201226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010871761.XA CN114201226A (en) 2020-08-26 2020-08-26 Application starting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010871761.XA CN114201226A (en) 2020-08-26 2020-08-26 Application starting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114201226A true CN114201226A (en) 2022-03-18

Family

ID=80644133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010871761.XA Pending CN114201226A (en) 2020-08-26 2020-08-26 Application starting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114201226A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562743A (en) * 2022-03-31 2023-01-03 荣耀终端有限公司 Application program loading method and electronic equipment
CN115576621A (en) * 2022-03-31 2023-01-06 荣耀终端有限公司 Application program loading method and electronic device
CN115858047A (en) * 2023-02-28 2023-03-28 荣耀终端有限公司 Method, electronic device and chip system for preloading file pages
CN120560737A (en) * 2025-04-27 2025-08-29 华为技术有限公司 Application preloading method and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681475A (en) * 2018-05-21 2018-10-19 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal
CN108762837A (en) * 2018-05-21 2018-11-06 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal
CN108845840A (en) * 2018-06-05 2018-11-20 Oppo广东移动通信有限公司 Application sound management method and device, storage medium and intelligent terminal
CN109976821A (en) * 2017-12-14 2019-07-05 广东欧珀移动通信有限公司 Application program loading method, device, terminal and storage medium
CN110032702A (en) * 2019-04-08 2019-07-19 腾讯科技(深圳)有限公司 Webpage display process, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976821A (en) * 2017-12-14 2019-07-05 广东欧珀移动通信有限公司 Application program loading method, device, terminal and storage medium
CN108681475A (en) * 2018-05-21 2018-10-19 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and mobile terminal
CN108762837A (en) * 2018-05-21 2018-11-06 Oppo广东移动通信有限公司 Application program preloads method, apparatus, storage medium and terminal
CN108845840A (en) * 2018-06-05 2018-11-20 Oppo广东移动通信有限公司 Application sound management method and device, storage medium and intelligent terminal
CN110032702A (en) * 2019-04-08 2019-07-19 腾讯科技(深圳)有限公司 Webpage display process, device, equipment and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562743A (en) * 2022-03-31 2023-01-03 荣耀终端有限公司 Application program loading method and electronic equipment
CN115576621A (en) * 2022-03-31 2023-01-06 荣耀终端有限公司 Application program loading method and electronic device
CN115562743B (en) * 2022-03-31 2023-10-27 荣耀终端有限公司 Application program loading method and electronic device
CN115576621B (en) * 2022-03-31 2023-11-03 荣耀终端有限公司 Application program loading method and electronic device
CN115858047A (en) * 2023-02-28 2023-03-28 荣耀终端有限公司 Method, electronic device and chip system for preloading file pages
CN120560737A (en) * 2025-04-27 2025-08-29 华为技术有限公司 Application preloading method and electronic device

Similar Documents

Publication Publication Date Title
EP3572936B1 (en) Method, terminal and computer-readable storage medium for displaying interface of application program
CN104050035B (en) The processing method and processing device of application program
CN104951335B (en) The processing method and processing device of application program installation kit
CN105338409B (en) Network video preloading method and device
EP3171270A1 (en) Method and device for information push
CN114201226A (en) Application starting method and device, electronic equipment and storage medium
US20170265141A1 (en) Method and apparatus of temperature control
CN104536783B (en) Headspace method to set up and device
CN110995929A (en) Terminal control method, device, terminal and storage medium
US20180167478A1 (en) Method and apparatus for displaying notification message
CN106033397B (en) Memory buffer area adjusting method, device and terminal
JP6328762B2 (en) Method and apparatus for reminding in shutdown state
CN104506649A (en) Push method and device for notification message
US9678868B2 (en) Method and device for optimizing memory
US20140380292A1 (en) Method, device, and storage medium for upgrading operating system
CN104503786B (en) Firmware refreshing method and device
CN108829473A (en) event response method, device and storage medium
CN112214254A (en) Method and device for accelerating application startup, and electronic device
CN112083841B (en) Information input method, device and storage medium
CN114077461A (en) Application running method, device, device and storage medium
US12216561B2 (en) Application launch detection and management via launch interface code instrumentation
CN111522676B (en) Application program repairing method and device
CN110502714B (en) Information detection method and device, electronic equipment and storage medium
CN108762944B (en) Processing method, device, equipment and medium of business system
CN107766722B (en) Application software installation processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination