CN112579187A - Optimization method and device for cold start of application program - Google Patents

Optimization method and device for cold start of application program Download PDF

Info

Publication number
CN112579187A
CN112579187A CN201910923626.2A CN201910923626A CN112579187A CN 112579187 A CN112579187 A CN 112579187A CN 201910923626 A CN201910923626 A CN 201910923626A CN 112579187 A CN112579187 A CN 112579187A
Authority
CN
China
Prior art keywords
interface
application
main interface
picture
application main
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.)
Withdrawn
Application number
CN201910923626.2A
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 Anyun Century Technology Co Ltd
Original Assignee
Beijing Anyun Century Technology 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 Anyun Century Technology Co Ltd filed Critical Beijing Anyun Century Technology Co Ltd
Priority to CN201910923626.2A priority Critical patent/CN112579187A/en
Publication of CN112579187A publication Critical patent/CN112579187A/en
Withdrawn legal-status Critical Current

Links

Images

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/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)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses an optimization method and a device for cold start of an application program, wherein the method comprises the following steps: when cold starting is carried out on a target application, a preview window of the target application is created; detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application; if the first interface picture exists, displaying the first interface picture in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a second interface picture is obtained; and updating the first interface picture in the preset storage area into the second interface picture. The method provided by the invention improves the display efficiency of the application program, avoids meaningless operation of a user, and reduces the expense of a processor.

Description

Optimization method and device for cold start of application program
Technical Field
The invention relates to the technical field of computers, in particular to an optimization method and device for application cold start.
Background
At present, when the APP (Application, Application software) of electronic equipment such as a mobile phone and a tablet is started but not displayed, a default background of a system or a user-defined background is displayed on a current window, so that an effect of quickly loading an Application cannot be achieved. And when the application is not loaded, the application is mistaken for a card pause and the like, which is generally forced by the user to wait, to operate the screen to end the process, and at the moment, for the operating system, various operation information of the user is received, such as a button for clicking a return button, a Home key, a menu and the like. Since the CPU has a large overhead in the process of loading the application, and the operation of the user will greatly increase the overhead of the CPU resource, how to improve the display efficiency of the application program to avoid the user performing meaningless operation becomes a problem to be solved urgently.
Disclosure of Invention
In view of the above problems, the present invention provides an optimization method and apparatus for application cold start, which improves the display efficiency of an application, avoids meaningless operations performed by a user, and reduces the processor overhead.
In a first aspect, the present application provides the following technical solutions through an embodiment:
a method for optimizing cold start of an application, the method comprising:
when cold starting is carried out on a target application, a preview window of the target application is created; detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application; if the first interface picture exists, displaying the first interface picture in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a second interface picture is obtained; and updating the first interface picture in the preset storage area into the second interface picture.
Preferably, the screenshot of the application main interface to obtain a second interface picture includes:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded; and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
Preferably, before the creating the preview window of the target application, the method further includes:
judging whether the application main interface to be loaded by the target application is a transparent window or a floating window; and if the application main interface is not a transparent window or a floating window, executing the step of creating the preview window of the target application.
Preferably, after the detecting whether the preset first interface picture exists in the preset storage area, the method further includes:
if the first interface picture does not exist, displaying a default interface in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
Preferably, after the displaying the first interface picture in the preview window, the method further includes:
recording the click position of a user for clicking on the first interface picture; after the switching the preview window to the application main interface, the method further comprises: and carrying out simulated clicking on the application main interface according to the clicking position.
Preferably, the screenshot of the application main interface to obtain a second interface picture includes:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures; splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
In a second aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
an apparatus for optimizing cold start-up of an application, the apparatus comprising:
the system comprises a creating module, a setting module and a display module, wherein the creating module is used for creating a preview window of a target application when the target application is subjected to cold start; the system comprises a checking module, a storage module and a processing module, wherein the checking module is used for detecting whether a preset first interface picture exists in a preset storage area, and the first interface picture is the same as an application main interface of the target application; the interface picture display module is used for displaying the first interface picture in the preview window if the first interface picture exists; the application main interface display module is used for switching the preview window into the application main interface after the application main interface is loaded; the first screenshot module is used for screenshot the application main interface to obtain a second interface picture; and the updating module is used for updating the first interface picture in the preset storage area into the second interface picture.
Preferably, the screenshot module is further configured to:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded; and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
Preferably, the application host interface comprises a determining module, configured to determine, before the creating of the preview window of the target application, whether the application host interface to be loaded by the target application is a transparent window or a floating window; and if the application main interface is not a transparent window or a floating window, enabling the creating module to execute the step of creating the preview window of the target application.
Preferably, the method further comprises the following steps: a second screenshot module for displaying the first interface picture in the preset storage area after detecting whether the preset first interface picture exists in the preset storage area,
if the first interface picture does not exist, displaying a default interface in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
Preferably, the method further comprises the following steps: a simulated click module for displaying the first interface picture in the preview window,
recording the click position of a user for clicking on the first interface picture; and after the preview window is switched to the application main interface, carrying out simulated click on the application main interface according to the click position.
Preferably, the first screenshot module is further configured to:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures; splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
In a third aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
an electronic device comprising a processor and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the optimization apparatus for application cold start to perform the steps of the method of any of the first aspects above.
In a fourth aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment:
a computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the first aspects.
The embodiment of the invention provides an optimization method and device for cold start of an application program, wherein the method comprises the steps of creating a preview window of a target application when the target application is triggered and started; checking whether a preset first interface picture exists in a preset storage position or not; if the cached first interface picture exists in the preset storage position, displaying the first interface picture to the preview window to replace a default interface; the first interface picture is the same as an application main interface of the target application; therefore, in the process of loading the target application, the user can preview the application main interface of the target application in advance and can consider the operation on the target application in advance. Further, after the application main interface is loaded, switching the displayed preview window of the first interface picture to the application main interface; because the display content of the application main interface is the same as that of the first interface picture, a user cannot perceive the display content during switching, and seamless switching is realized. After switching is completed and loading of the target application is completed, screenshot is conducted on the application main interface to obtain a second interface picture, the first interface picture in the preset storage position is updated to the second interface picture, updating of pictures needing to be displayed on the preview window is achieved, and displaying of different or wrong interface pictures on the preview window after the application main interface is changed is avoided. Because the interface picture which is the same as the main application interface can be displayed in the process of loading the target application every time, the phenomenon that a user mistakenly thinks that the target application is blocked or falsely died is avoided, the meaningless operations of switching the application, returning to a desktop, shutting down and the like which are performed after mistaken recognition are also avoided, the waste of processor resources under the meaningless operations is avoided, and the use performance of the equipment can be indirectly improved; meanwhile, the content of the application main interface can be displayed when the preview window is created, so that the loading efficiency of part of the content of the target application is improved; because the user can see the content of the application main interface at the first time, the interactive experience of the target application and the user and the use efficiency of the target application are improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating an optimization method for cold start of an application according to a first embodiment of the present invention;
FIG. 2 is a diagram showing a comparison of cold start time of a camera program without and with the method of the present invention according to a first embodiment of the present invention;
FIG. 3 is a functional block diagram of an optimization apparatus for cold start of an application according to a first embodiment of the present invention;
fig. 4 shows a block diagram of a user terminal according to a fourth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First embodiment
Referring to fig. 1, a method for optimizing cold start of an application according to a first embodiment of the present invention is shown, where the method includes:
step S10: when cold starting is carried out on a target application, a preview window of the target application is created;
step S20: detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application;
step S30: if the first interface picture exists, displaying the first interface picture in the preview window;
step S40: after the application main interface is loaded, switching the preview window into the application main interface;
step S50: screenshot is conducted on the application main interface, and a second interface picture is obtained;
step S60: and updating the first interface picture in the preset storage area into the second interface picture.
In step S10, the target application may be any system or application installed in any terminal device, and the system may be an Android system, an IOS system, or the like. The terminal device may be a smart phone, a tablet computer, a smart television, and the like, without limitation.
The manner in which the target application is triggered to start includes, but is not limited to, the following: after clicking the icon of the target application by the user, starting the target application; and the user triggers the starting of the target application in other associated applications. In this embodiment, the starting of the target application is cold starting. In cold start, generally, since the background service does not have a process related to the target application, or the target application is started for the first time, the system needs to re-create and allocate a corresponding process for initialization.
And a Preview window (Preview window), which is a window displayed in advance in order to prevent the display of the main interface from being too slow when the application is in cold start, so as to prompt a user that the application is being loaded and displayed and avoid mistakenly considering that the application is blocked and falsely killed. Taking the android system as an example, in specific implementation, the system server may be requested to create previwindow when the application is cold-started. When creating the preview window, it should also check whether the current target application meets the creation condition, that is, the specific steps before creating the preview window are as follows:
step S11: and judging whether the application main interface to be loaded by the target application is a transparent window or a floating window. When the application main interface preloaded by the target application is a transparent window, the interface displayed on the terminal device and capable of being viewed by the user may be interfaces of other applications, wallpaper and the like which cannot be determined. When the application main interface is the floating window, the position of the floating window on the screen is uncertain, and other contents can be displayed on the screen except the floating window. In the above two cases, it is not certain when the screenshot of the application main interface is performed, and if the screenshot of the application main interface is performed in the above case, it is difficult to achieve the effect of seamless switching, because it is difficult to determine what content is being displayed on the current screen when the user triggers the start of the target application.
Step S12: and if the application main interface is not a transparent window or a floating window, creating a preview window of the target application.
Step S20: detecting whether a preset first interface picture exists in a preset storage area, wherein the first interface picture is the same as an application main interface of the target application.
In step S20, for convenience of management, the preset storage location may be a location under the installation path of the target application, or any other location in the memory, without limitation.
In this embodiment, the preset first interface picture may be obtained in the following manner:
1. when the target application is installed, a main interface picture of the target application is stored as a first interface picture by default. For example, since the main interface of a general application program is mostly the same when the application program is started for the first time after installation, an initial main interface picture can be stored as the first interface picture when a developer develops the application. Thereafter, each time the application is started, the application main interface is subjected to screenshot under the condition that the screenshot condition is satisfied to update the first main interface picture, and the following descriptions of steps S30-S60 may be specifically referred to.
2. The first interface picture is a picture generated by screenshot when the target application is cold started last time. This manner of acquiring the first interface picture is equivalent to steps S30-S50.
Step S30: and if the first interface picture exists, displaying the first interface picture in the preview window.
In step S30, the display of the first interface picture is temporary, and at this time, due to the display of the first interface picture, the preloading of the target application is achieved, and the user can click on the first interface picture again. Therefore, the situation that the user mistakenly thinks that the target application is blocked and falsely killed due to the fact that the default preview window is directly displayed can be avoided, and further the situation that the user performs operations of returning, main menus, shutdown and the like which increase the cost of the processor is avoided.
Step S40: after the application main interface is loaded, switching the preview window into the application main interface;
in step S40, since the application main interface is the same as the first interface picture, after the application main interface is loaded, the application main interface can be directly displayed in the foreground, and the seamless switching between the application main interface and the first interface picture can be completed. At this time, the preview window can be closed to avoid occupying too much content or consuming processor resources.
Further, in some cases, the application main interface may change with the use of the user during the use of the target application by the user. For example, the layout of the application main interface changes, the display content of the application main interface changes, the icons of the application main interface changes, the size of the characters changes, and the like. Therefore, the first interface picture needs to be updated, i.e., steps S50-S60.
Step S50: screenshot is conducted on the application main interface, and a second interface picture is obtained;
in step S50, the present embodiment provides two embodiments.
1. And carrying out single screenshot when the target application is started to obtain a second interface picture. The method comprises the following specific steps:
step S501: and judging whether the starting time of the application main interface is a specific moment. The specific time is the time when the main interface of the target application is just loaded, namely the time when the starting time is started and timed just when the target application is started and finished. In this embodiment, the time when the main interface of the target application is started is 0. In addition, whether the mobile phone is in a vertical screen or horizontal screen state can be judged, the target application is started in a vertical screen mode when being started, and the screenshot can be carried out when the current screen state is in the vertical screen mode; when the target application is started, the screen is horizontally started, and the screenshot can be performed when the current screen state is horizontally judged.
Step S502: and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture. At this time, the application main interface is not operated by the user and is not changed. The second interface picture obtained after the screenshot is carried out on the application main interface at the moment is completely the same as the specific moment of the application main interface, and the seamless switching between the application main interface and the interface picture is favorably realized. If the target application can be started in a horizontal screen state and a vertical screen state, the finally obtained second interface picture can correspondingly mark the horizontal screen state or the vertical screen state, namely, the second interface picture is divided into a horizontal screen state group and a vertical screen state group which respectively correspond to the horizontal screen start and the vertical screen start.
Step S503: and if the starting time of the application main interface is not the specific moment, not performing screenshot.
Taking the android system as an example, in specific implementation, when the screenshot condition is met, the App Transition Server service in the system can be requested to perform screenshot operation.
2. And performing multiple screenshots when the target application is started to obtain a second interface picture. The method comprises the following specific steps:
step S511: when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface, and a plurality of temporary pictures are obtained.
In step S511, since the application main interface cannot be fully displayed on the display screen of the current electronic device, for example, the application main interface may be slid up and down and/or left and right. Therefore, when the screenshot is carried out, a plurality of pictures can be intercepted on the application main interface in the process of user operation and sliding. Specific rules can be referred to as follows:
the method can be used for capturing one picture at a specific moment when the target application is loaded, and capturing the picture once when the user slides the application main interface up and down and/or left and right to exceed half of the width of the application main interface in the current direction. Then, when the user slides to the boundary position of the application main interface, the screenshot is performed. Therefore, the application main interface can be completely intercepted as much as possible.
Step S512: splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
In step S512, the captured images are spliced to form a complete application main interface image. If the user does not browse the application main interface completely in the operation process, the part which is not intercepted can be supplemented directly by using the default picture of the application main interface, and the default picture of the application main interface is a picture preset by an application developer when developing the target application, such as a complete long screenshot carried out on the application main interface; in addition, when the first interface picture exists, the first interface picture can be adopted to complement the part of the application main interface which is currently intercepted.
When the preview window displays the second interface picture obtained through steps S511-S512, the user may directly perform a sliding operation on the second interface picture. Application preloading is more complete, and the interaction experience between a user and a target application being loaded is improved.
Step S60: and updating the first interface picture in the preset storage area into the second interface picture.
In step S60, the updating mode may be an overlay updating, the first interface picture is deleted, the second interface picture is saved, and the processor overhead is saved. In addition, image comparison can also be carried out, if the second interface picture is changed relative to the first interface picture, reading and writing operation is carried out, the first interface picture is deleted, and the second interface picture is stored; and if the second interface picture is not changed relative to the first interface picture, the first interface picture is reserved.
Corresponding to step S30, if there is no cached first interface picture in the preset storage location, creating the preview window and displaying a default configured preview window, displaying a default interface in the preview window, and after the target application is loaded, switching the preview window to the application main interface; then, the following steps are carried out: screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
Further, in this embodiment, in order to further improve the utilization efficiency and performance of the target application in the loading process, the following implementation steps may be added:
step S71: and recording the click position of the user for displaying the first interface picture.
In step S71, a click event of the user clicking the screen may be obtained through the code, and a click position and a click time at which the click event occurs are recorded, which corresponds to the user actually operating on the application main interface of the target application.
Step S72: and after the displayed preview window of the first interface picture is switched to the application main interface, carrying out simulated click on the application main interface according to the click position.
In step S72, the operation of the application main interface may include various situations, such as: after the application main interface is clicked, the application main interface is converted into a submenu of the clicked icon or title; there may also be multiple selection operations on the application main interface (no change in the interface menu occurs, only certain titles or icons are selected). Therefore, the following steps can be executed when the application main interface is clicked in a simulation mode:
step S721: clicking the application main interface according to the time sequence corresponding to the clicking position;
step S722: and stopping the simulated click when the simulated click reaches the option containing the submenu or the interface jump transformation.
In this embodiment, the interaction efficiency between the user and the target application can be further improved through steps S71-S72, the target application can be substantially operated in the target application loading process, the use efficiency of the target application is improved, the meaningless operation caused by mistakenly considering that the target application is stuck or falsely killed by the user is avoided, and the resource overhead of the processor is saved.
It should be noted that the functions of each step in the present invention can be implemented by using corresponding codes, and the specific codes can be written and implemented by those skilled in the art after understanding the execution logic of the present invention, and different development codes correspond to different system platforms, and the process of implementing the codes is not described again.
Referring to fig. 2, in the android system, it is found that, in the same configuration and under the same working condition, a camera program which is not subjected to preview optimization and is subjected to preview optimization by using the optimization method for application cold start provided by the present invention is tested: because the screenshot is loaded in the preview window for preview optimization, the application main interface can be quickly displayed, and the meaningless operation of the user is avoided. The result shows that although the operation step of displaying the interface picture to the preview window is added, the loading speed is improved and the time is saved on the whole.
In summary, in the optimization method for application cold start provided in the embodiment of the present invention, when a target application is triggered to start, a preview window of the target application is created; checking whether a preset first interface picture exists in a preset storage position or not; if the cached first interface picture exists in the preset storage position, displaying the first interface picture to the preview window to replace a default interface; the first interface picture is the same as an application main interface of the target application; therefore, in the process of loading the target application, the user can preview the application main interface of the target application in advance and can consider the operation on the target application in advance. Further, after the application main interface is loaded, switching the displayed preview window of the first interface picture to the application main interface; because the display content of the application main interface is the same as that of the first interface picture, a user cannot perceive the display content during switching, and seamless switching is realized. After switching is completed and loading of the target application is completed, screenshot is conducted on the application main interface to obtain a second interface picture, the first interface picture in the preset storage position is updated to the second interface picture, updating of pictures needing to be displayed on the preview window is achieved, and displaying of different or wrong interface pictures on the preview window after the application main interface is changed is avoided. Because the interface picture which is the same as the main application interface can be displayed in the process of loading the target application every time, the phenomenon that a user mistakenly thinks that the target application is blocked or falsely died is avoided, the meaningless operations of switching the application, returning to a desktop, shutting down and the like which are performed after mistaken recognition are also avoided, the waste of processor resources under the meaningless operations is avoided, and the use performance of the equipment can be indirectly improved; meanwhile, the content of the application main interface can be displayed when the preview window is created, so that the loading efficiency of part of the content of the target application is improved; because the user can see the content of the application main interface at the first time, the interactive experience of the target application and the user and the use efficiency of the target application are improved.
Second embodiment
Based on the same inventive concept, the second embodiment of the present invention provides an optimization apparatus 300 for cold start of an application. Fig. 3 shows a functional block diagram of an optimization apparatus for application cold start according to a second embodiment of the present invention. The device comprises:
a creating module 301, configured to create a preview window of a target application when the target application is cold-started;
a checking module 302, configured to detect whether a preset first interface picture exists in a preset storage area, where the first interface picture is the same as an application main interface of the target application;
an interface picture display module 303, configured to display the first interface picture in the preview window if the first interface picture exists;
an application main interface display module 304, configured to switch the preview window to the application main interface after the application main interface is loaded;
the first screenshot module 305 is configured to perform screenshot on the application main interface to obtain a second interface picture;
an updating module 306, configured to update the first interface picture in the preset storage area to the second interface picture.
As an alternative implementation, the first cut-out module 305 is further configured to:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded; and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
As an optional implementation manner, the method further includes, before the creating of the preview window of the target application,
judging whether the application main interface to be loaded by the target application is a transparent window or a floating window; and if the application main interface is not a transparent window or a floating window, enabling the creating module to execute the step of creating the preview window of the target application.
As an optional implementation, the method further includes: a second screenshot module for displaying the first interface picture in the preset storage area after detecting whether the preset first interface picture exists in the preset storage area,
if the first interface picture does not exist, displaying a default interface in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
As an optional implementation, the method further includes: a simulated click module for displaying the first interface picture in the preview window,
recording the click position of a user for clicking on the first interface picture; and after the preview window is switched to the application main interface, carrying out simulated click on the application main interface according to the click position.
As an alternative implementation, the first cut-out module 305 is further configured to:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures; splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
It should be noted that the implementation and technical effects of the optimization apparatus 300 for application cold start provided in the embodiment of the present invention are the same as those of the foregoing method embodiment, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiment where no mention is made in part of the apparatus embodiment.
Third embodiment
Based on the same inventive concept, a third embodiment of the present invention further provides an electronic device, including a processor and a memory, the memory being coupled to the processor, the memory storing instructions that, when executed by the processor, cause the optimization apparatus for cold start of an application to perform the following operations:
when cold starting is carried out on a target application, a preview window of the target application is created; detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application; if the first interface picture exists, displaying the first interface picture in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a second interface picture is obtained; and updating the first interface picture in the preset storage area into the second interface picture.
It should be noted that, in the optimization device for application cold start provided in the embodiment of the present invention, the specific implementation and the generated technical effect of each step are the same as those of the foregoing method embodiment, and for brief description, for the sake of brevity, corresponding contents in the foregoing method embodiment may be referred to for what is not mentioned in this embodiment.
Fourth embodiment
In an embodiment of the present invention, the present embodiment provides a user terminal 500, and an operating system and a third-party application are installed in the user terminal 500. The user terminal 500 may be a tablet computer, a mobile phone, a notebook computer, a PC (personal computer), a wearable device, a vehicle-mounted terminal, or other user terminal devices.
Fig. 4 shows a block diagram of modules of an exemplary user terminal 500. As shown in fig. 4, the user terminal 500 includes a memory 502, a storage controller 504, one or more processors 506 (only one of which is shown), a peripheral interface 508, a network module 510, an input-output module 512, a display module 514, and the like. These components communicate with one another via one or more communication buses/signal lines 516.
The memory 502 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for optimizing the cold start of the application program in the embodiment of the present invention, and the processor 506 executes various functional applications and data processing, such as the method for optimizing the cold start of the application program provided in the embodiment of the present invention, by running the software programs and modules stored in the memory 502.
The memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. Access to the memory 502 by the processor 506, and possibly other components, may be under the control of the memory controller 504.
Peripheral interface 508 couples various input/output devices to processor 506 and memory 502. In some embodiments, the peripheral interface 508, the processor 506, and the memory controller 504 may be implemented in a single chip. In other examples, they may be implemented separately from the individual chips.
The network module 510 is used for receiving and transmitting network signals. The network signal may include a wireless signal or a wired signal.
The input/output module 512 is used for providing input data for the user to realize the interaction between the user and the user terminal. The input/output module 512 can be, but is not limited to, a mouse, a keyboard, a touch screen, and the like.
The display module 514 provides an interactive interface (e.g., a user interface) between the user terminal 500 and the user or for displaying image data to the user's reference. In this embodiment, the display module 514 may be a liquid crystal display or a touch display. In the case of a touch display, the display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. The support of single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are sent to the processor for calculation and processing.
It is to be understood that the structure shown in fig. 4 is merely illustrative, and that user terminal 500 may also include more or fewer components than shown in fig. 4, or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware, software, or a combination thereof.
Fifth embodiment
A fifth embodiment of the present invention provides a computer storage medium, and the functional module integrated by the optimization device for cold start of an application program in the second embodiment of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software functional module and sold or used as a stand-alone product. Based on such understanding, all or part of the processes in the optimization method for application cold start according to the first embodiment of the present invention may also be implemented by a computer program that can be stored in a computer-readable storage medium and that, when being executed by a processor, can implement the steps of the above-described method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the apparatus for optimizing cold start of an application, a user terminal, and/or the like in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses A1. an optimization method for cold start of an application program, which comprises the following steps:
when cold starting is carried out on a target application, a preview window of the target application is created; detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application; if the first interface picture exists, displaying the first interface picture in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a second interface picture is obtained; and updating the first interface picture in the preset storage area into the second interface picture.
A2. According to the method of a1, the screenshot of the application main interface to obtain a second interface picture includes:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded; and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
A3. The method of A1, prior to the creating the preview window of the target application, further comprising:
judging whether the application main interface to be loaded by the target application is a transparent window or a floating window; and if the application main interface is not a transparent window or a floating window, executing the step of creating the preview window of the target application.
A4. The method according to a1, wherein the detecting whether the preset first interface picture exists in the preset storage area further includes:
if the first interface picture does not exist, displaying a default interface in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
A5. The method of a1, further comprising, after the displaying the first interface picture within the preview window:
recording the click position of a user for clicking on the first interface picture; after the switching the preview window to the application main interface, the method further comprises: and carrying out simulated clicking on the application main interface according to the clicking position.
A6. According to the method of any one of A1-A5, screenshot is performed on the application main interface to obtain a second interface picture, and the method comprises the following steps:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures;
splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
The invention also discloses B7. an optimizing device for cold start of application program, the device includes:
the system comprises a creating module, a setting module and a display module, wherein the creating module is used for creating a preview window of a target application when the target application is subjected to cold start; the system comprises a checking module, a storage module and a processing module, wherein the checking module is used for detecting whether a preset first interface picture exists in a preset storage area, and the first interface picture is the same as an application main interface of the target application; the interface picture display module is used for displaying the first interface picture in the preview window if the first interface picture exists; the application main interface display module is used for switching the preview window into the application main interface after the application main interface is loaded; the first screenshot module is used for screenshot the application main interface to obtain a second interface picture; and the updating module is used for updating the first interface picture in the preset storage area into the second interface picture.
B8. The apparatus of B7, the first screenshot module further to:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded; and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
B9. The apparatus of B7, further comprising a determining module for, prior to the creating the preview window of the target application,
judging whether the application main interface to be loaded by the target application is a transparent window or a floating window; and if the application main interface is not a transparent window or a floating window, enabling the creating module to execute the step of creating the preview window of the target application.
B10. The apparatus of B7, further comprising: a second screenshot module for displaying the first interface picture in the preset storage area after detecting whether the preset first interface picture exists in the preset storage area,
if the first interface picture does not exist, displaying a default interface in the preview window; after the application main interface is loaded, switching the preview window into the application main interface; screenshot is conducted on the application main interface, and a third interface picture is obtained; and saving the third interface picture into the preset storage area.
B11. The apparatus of B7, further comprising: a simulated click module for displaying the first interface picture in the preview window,
recording the click position of a user for clicking on the first interface picture; and after the preview window is switched to the application main interface, carrying out simulated click on the application main interface according to the click position.
B12. The apparatus of any one of B7-B11, the first screenshot module further configured to:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures; splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
An electronic device comprising a processor and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the optimization apparatus for application cold start to perform the steps of the method of any one of A1-A6.
Also disclosed is a computer-readable storage medium, having stored thereon a computer program, which when executed by a processor, carries out the steps of the method of any one of A1-A6.

Claims (10)

1. A method for optimizing cold start of an application program, the method comprising:
when cold starting is carried out on a target application, a preview window of the target application is created;
detecting whether a preset first interface picture exists in a preset storage area or not, wherein the first interface picture is the same as an application main interface of the target application;
if the first interface picture exists, displaying the first interface picture in the preview window;
after the application main interface is loaded, switching the preview window into the application main interface;
screenshot is conducted on the application main interface, and a second interface picture is obtained;
and updating the first interface picture in the preset storage area into the second interface picture.
2. The method of claim 1, wherein the screenshot of the application host interface to obtain a second interface picture comprises:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded;
and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
3. The method of claim 1, further comprising, prior to said creating a preview window for the target application:
judging whether the application main interface to be loaded by the target application is a transparent window or a floating window;
and if the application main interface is not a transparent window or a floating window, executing the step of creating the preview window of the target application.
4. The method according to claim 1, wherein after detecting whether the preset first interface picture exists in the preset storage area, the method further comprises:
if the first interface picture does not exist, displaying a default interface in the preview window;
after the application main interface is loaded, switching the preview window into the application main interface;
screenshot is conducted on the application main interface, and a third interface picture is obtained;
and saving the third interface picture into the preset storage area.
5. The method of claim 1, further comprising, after the displaying the first interface picture within the preview window:
recording the click position of a user for clicking on the first interface picture;
after the switching the preview window to the application main interface, the method further comprises:
and carrying out simulated clicking on the application main interface according to the clicking position.
6. The method according to any one of claims 1 to 5, wherein the screenshot of the application main interface to obtain a second interface picture comprises:
when the target application displays an application main interface, screenshot is carried out on the application main interface in the sliding process of the application main interface to obtain a plurality of temporary pictures;
splicing the plurality of temporary pictures to obtain a second interface picture; and the second interface picture comprises all display contents of an application main interface of the target application.
7. An apparatus for optimizing cold start of an application, the apparatus comprising:
the system comprises a creating module, a setting module and a display module, wherein the creating module is used for creating a preview window of a target application when the target application is subjected to cold start;
the system comprises a checking module, a storage module and a processing module, wherein the checking module is used for detecting whether a preset first interface picture exists in a preset storage area, and the first interface picture is the same as an application main interface of the target application;
the interface picture display module is used for displaying the first interface picture in the preview window if the first interface picture exists;
the application main interface display module is used for switching the preview window into the application main interface after the application main interface is loaded;
the first screenshot module is used for screenshot the application main interface to obtain a second interface picture;
and the updating module is used for updating the first interface picture in the preset storage area into the second interface picture.
8. The apparatus of claim 7, wherein the first screenshot module is further configured to:
judging whether the starting time of the application main interface is a specific moment or not; the specific moment is the moment when the application main interface is loaded;
and if the starting time of the application main interface is the specific moment, screenshot is carried out on the application main interface to obtain the second interface picture.
9. An electronic device comprising a processor and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the optimization apparatus for application cold start to perform the steps of the method of any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201910923626.2A 2019-09-27 2019-09-27 Optimization method and device for cold start of application program Withdrawn CN112579187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910923626.2A CN112579187A (en) 2019-09-27 2019-09-27 Optimization method and device for cold start of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910923626.2A CN112579187A (en) 2019-09-27 2019-09-27 Optimization method and device for cold start of application program

Publications (1)

Publication Number Publication Date
CN112579187A true CN112579187A (en) 2021-03-30

Family

ID=75109790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910923626.2A Withdrawn CN112579187A (en) 2019-09-27 2019-09-27 Optimization method and device for cold start of application program

Country Status (1)

Country Link
CN (1) CN112579187A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113805745A (en) * 2021-08-12 2021-12-17 荣耀终端有限公司 Control method of suspension window and electronic equipment
CN114047973A (en) * 2021-11-15 2022-02-15 合众新能源汽车有限公司 Starting method and starting device for vehicle-mounted application
WO2022213757A1 (en) * 2021-04-06 2022-10-13 Oppo广东移动通信有限公司 Application interface display method and apparatus, device, and storage medium
CN115567737A (en) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022213757A1 (en) * 2021-04-06 2022-10-13 Oppo广东移动通信有限公司 Application interface display method and apparatus, device, and storage medium
CN113805745A (en) * 2021-08-12 2021-12-17 荣耀终端有限公司 Control method of suspension window and electronic equipment
CN113805745B (en) * 2021-08-12 2022-09-20 荣耀终端有限公司 Control method of suspension window and electronic equipment
CN114047973A (en) * 2021-11-15 2022-02-15 合众新能源汽车有限公司 Starting method and starting device for vehicle-mounted application
CN115567737A (en) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture
CN115567737B (en) * 2022-09-21 2023-05-16 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture

Similar Documents

Publication Publication Date Title
CN112579187A (en) Optimization method and device for cold start of application program
KR102108583B1 (en) Instantiable gesture objects
KR102118223B1 (en) Cross window animation
US20110197165A1 (en) Methods and apparatus for organizing a collection of widgets on a mobile device display
US20180239777A1 (en) Method and apparatus for dissolving folder and mobile terminal
JP2015503152A (en) Measuring the rendering time of a web page
KR20140039209A (en) Web browser with quick site access user interface
US20090193363A1 (en) Representing Multiple Computing Resources Within A Predefined Region Of A Graphical User Interface For Displaying A Single Icon
US20190325562A1 (en) Window rendering method and terminal
EP3757739A1 (en) Method for display when exiting an application, and terminal
CN112783783A (en) Webpage point burying method, device and equipment and readable storage medium
CN109542569B (en) Method, device, terminal and storage medium for setting display language
US10467023B2 (en) System and method of interactive splash screen in embedded environments
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
US7523389B2 (en) Document display device, method, and program product
CN108845924B (en) Control response area display control method, electronic device, and storage medium
CN114265653A (en) Interface display method, device, equipment, storage medium and program product
CN109558187B (en) User interface rendering method and device
CN111367518A (en) Page layout method and device, computing equipment and computer storage medium
US10114518B2 (en) Information processing system, information processing device, and screen display method
CN109246468B (en) Video list switching method, device and storage medium based on education system
CN115756466A (en) View checking method and device, electronic equipment and storage medium
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
US9081487B2 (en) System and method for manipulating an image

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210330