Method and device for starting application program and electronic equipment

By increasing the priority of starting animation threads, the startup lag problem caused by the inability to call the startup animation threads in Android system is solved, and a smoother application startup animation display is achieved, improving the user experience.

CN119440647APending Publication Date: 2025-02-14HUAWEI TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310953516.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the existing Android system, startup animation threads may not be called in time due to various reasons, resulting in stuttering application startup and affecting user experience.

Method used

By adjusting the priority of the startup animation thread to the first priority higher than the initial priority, we ensure that when the user triggers the application to start, the system can call the startup animation thread in time to display smooth startup animation.

Benefits of technology

It realizes that the startup animation thread can be called normally in high-load scenarios, avoiding startup lags and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440647A_ABST
    Figure CN119440647A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for starting an application program and electronic equipment. The method comprises the steps that in response to a first operation of a user, the electronic equipment displays a desktop, the priority of an animation starting thread is adjusted to be a first priority, the desktop comprises a first icon, the first icon is an icon of a first application program, and the first priority is higher than the initial priority of animation starting; in response to a second operation of the user on the first icon, calling an animation starting thread according to the first priority; displaying a starting animation of the first application program through the starting animation thread; after the starting animation of the first application program is displayed, an interface of the first application program is displayed. According to the method for starting the application program, the priority of the animation starting thread can be improved when the electronic equipment displays the desktop, and when a user triggers starting of the application program, the system calls the animation starting thread with the priority improved, so that the animation starting of the application program is not blocked, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic devices, and in particular to a method, device and electronic device for starting an application. Background Art

[0002] With the development of science and technology, electronic devices can carry applications that provide various services to users, and users can trigger the start of applications in the user interface. The current Android system provides an application programming interface (API) related to the splash screen thread, which can be used to develop the startup page of applications in the Android system. That is to say, when the application is started, the Android system can construct a startup animation. However, the startup animation thread may not be called for various reasons, or it may not be called in time, which will cause the startup of the application to be stuck.

[0003] Therefore, how to call the startup animation thread in time to make the startup of the application smoother is a problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, device and electronic device for starting an application program. The method can call a start animation thread in time, thereby making the process of starting an application program smoother.

[0005] In a first aspect, a method for launching an application is provided, and the method is applied to an electronic device, comprising: in response to a first operation of a user, the electronic device displays a first interface, and adjusts the priority of a startup animation thread to a first priority, wherein the first interface is the desktop of the electronic device, the first interface includes a first icon, the first icon is an icon of a first application, and the first priority is higher than an initial priority of the startup animation thread; in response to a second operation of the user on the first icon, calling the startup animation thread according to the first priority; displaying the startup animation of the first application through the startup animation thread; and displaying the interface of the first application after displaying the startup animation of the first application.

[0006] Exemplarily, the user can trigger the electronic device to display the first interface by inputting the unlock password of the electronic device, face recognition or fingerprint recognition, etc. The desktop (or main interface) of the electronic device can display multiple application icons, and the first icon is one of the multiple icons. The desktop of the electronic device displays application icons, and the user can slide the desktop left and right to make the electronic device display icons of different applications. The user can trigger the startup of the application by clicking on the first icon, calling the startup animation thread with increased priority.

[0007] Exemplarily, the initial priority of the startup animation may be 110, and the first priority may be 97. It is understandable that the lower the value, the higher the priority.

[0008] Based on the above solution, when the electronic device displays the desktop, the priority of the startup animation thread can be increased to prepare for the user to trigger the startup of the application. When the user triggers the startup of the application, even in the high-load scenario of the electronic device, the system can call the startup animation thread with the increased priority, so that the startup animation of the application is not stuck, improving the user experience.

[0009] In combination with the first aspect, in some implementations of the first aspect, adjusting the priority of the startup animation thread to the first priority includes: adjusting the priority of the startup animation thread to the first priority, and adjusting the priority of an associated thread of the startup animation thread.

[0010] Exemplarily, the associated thread of the started animation thread is a Binder thread.

[0011] It is understandable that the electronic device can further increase the priority of the Binder thread while increasing the priority of the startup animation thread. The priority of the Binder thread will affect the call of the startup animation thread. Therefore, increasing the priority of the Binder thread helps the system to preferentially call the startup animation thread.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: calling the associated thread of the startup animation thread according to the first priority; wherein, displaying the startup animation of the first application through the startup animation thread includes: displaying the startup animation of the first application through the startup animation thread and the associated thread of the startup animation.

[0013] Based on the above solution, when the priority of the startup animation line thread and the priority of the startup animation thread associated thread are increased, the system can make the application startup animation display more smoothly by calling the startup animation thread with increased priority and the startup animation thread associated thread.

[0014] In combination with the first aspect, in certain implementations of the first aspect, before the electronic device displays a first interface in response to a first operation by the user and adjusts the priority of the startup animation thread to the first priority, the method also includes: in response to a third operation by the user, the electronic device displays a lock screen interface and caches the identifier of the startup animation thread.

[0015] It should be noted that before the electronic device displays the desktop, the electronic device can display a lock screen interface, and the user can trigger the electronic device to display the lock screen interface by long pressing the power button of the electronic device.

[0016] Based on the above solution, when the electronic device is turned on, which can also be understood as when the system is started, the identifier of the startup animation thread is fixed, and the process of obtaining the identifier of the startup animation thread is time-consuming. Therefore, when the electronic device is started and enters the lock screen interface, the identifier of the startup animation thread is cached, so that the subsequent call to the startup animation thread can respond quickly and reduce latency.

[0017] In combination with the first aspect, in some implementations of the first aspect, the method further includes: after displaying the interface of the first application, reducing the first priority of the startup animation thread to a second priority.

[0018] Based on the above scheme, after the startup animation of the first application is displayed, the first application is started and the interface of the first application is realized. At this time, the startup animation thread ends, and the priority of the startup animation thread can be reduced, releasing part of the central processing unit (CPU) computing power and saving energy consumption.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: after lowering the first priority of the startup animation thread to the second priority, the method also includes: when the electronic device displays the first interface again, increasing the second priority of the startup animation thread to a third priority, wherein the third priority is higher than the initial priority of the startup animation thread; in response to the user's fourth operation on the first icon, calling the startup animation thread according to the third priority; displaying the startup animation of the first application through the startup animation thread; and displaying the interface of the first application after displaying the startup animation of the first application.

[0020] Based on the above scheme, when the electronic device displays the main interface including multiple icons again, the priority of the startup animation thread can be increased again. When the user triggers the startup of the application on the main interface, the system can call the startup animation thread with the increased priority. In other words, when the application is warm started, the startup animation thread with the increased priority can also be called, so that the startup animation of the warm start process is smooth, improving the user experience.

[0021] In combination with the first aspect, in some implementations of the first aspect, the third priority is the same as or different from the first priority.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the startup animation of the first application includes at least one of the following: the first icon, a picture, or a startup animation.

[0023] Exemplarily, the first icon can serve as the central icon of the startup animation of the first application, the picture can serve as the background of the startup animation interface of the first application (for example, different colors can be set for the background), and the startup animation can display the first icon and picture in a dynamic form on the user interface.

[0024] In a second aspect, a device for launching an application is provided, comprising: a display module, for displaying a first interface in response to a first operation of a user, the first interface being the desktop of the electronic device, the first interface comprising a first icon, the first icon being an icon of a first application; a management and control module, for adjusting the priority of a startup animation thread to a first priority, the first priority being higher than an initial priority of the startup animation thread; a management and control module, for calling the startup animation thread according to the first priority in response to a second operation of the user on the first icon; the display module, further for displaying the startup animation of the first application through the startup animation thread; the display module, further for displaying the interface of the first application after displaying the startup animation of the first application.

[0025] Exemplarily, the display module can be understood as the UI component in the embodiment of the present application, and the management and control module can be understood as the performance management and control component in the embodiment of the present application.

[0026] In combination with the second aspect, in certain implementations of the second aspect, the management and control module is used to adjust the priority of the startup animation thread to the first priority, including: the management and control module is used to adjust the priority of the startup animation thread to the first priority, and is also used to adjust the priority of the associated thread of the startup animation thread.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the management and control module is also used to call the associated thread of the startup animation thread according to the first priority; the display module is specifically used to display the startup animation of the first application through the startup animation thread and the associated thread of the startup animation.

[0028] In combination with the second aspect, in certain implementations of the second aspect, the display module is used to display a lock screen interface in response to a third operation of the user before displaying the first interface in response to a first operation of the user, and the management and control module is also used to cache the identifier of the startup animation thread.

[0029] In combination with the second aspect, in some implementations of the second aspect, the management and control module is further used to reduce the first priority of the startup animation thread to a second priority after the display module displays the interface of the first application.

[0030] In combination with the second aspect, in certain implementations of the second aspect, the management and control module is used to, after lowering the first priority of the startup animation thread to the second priority, increase the second priority of the startup animation thread to a third priority when the display module displays the first interface again, wherein the third priority is higher than the initial priority of the startup animation thread; the management and control module is also used to call the startup animation thread according to the third priority in response to a fourth operation of the user on the first icon; the display module is also used to display the startup animation of the first application through the startup animation thread; the display module is also used to display the interface of the first application after displaying the startup animation of the first application.

[0031] In combination with the second aspect, in some implementations of the second aspect, the third priority is the same as or different from the first priority.

[0032] In combination with the second aspect, in certain implementations of the second aspect, the startup animation of the first application includes at least one of the following: the first icon, the picture, or the startup animation.

[0033] In a third aspect, an electronic device is provided, comprising: one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs comprising instructions, which, when executed by the one or more processors, enable the electronic device to perform the method in the first aspect and any possible implementation thereof.

[0034] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer implements the method in the first aspect and any possible implementation thereof.

[0035] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method in the first aspect and any possible implementation thereof.

[0036] In a sixth aspect, a chip is provided, characterized in that the chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method in the first aspect and any possible implementation thereof.

[0037] In combination with the sixth aspect, in a possible implementation manner, the processor is coupled to the memory through an interface.

[0038] In combination with the sixth aspect, in a possible implementation, the chip system also includes a memory, in which a computer program or computer instructions are stored. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a structural diagram of an electronic device.

[0040] Figure 2 It is a software structure diagram of an electronic device.

[0041] Figure 3 It is a set of GUIs provided by the embodiments of the present application.

[0042] Figure 4 This is a systrace schematic diagram provided in an embodiment of the present application.

[0043] Figure 5 It is a system architecture diagram provided in an embodiment of the present application.

[0044] Figure 6 It is a set of GUIs provided by the embodiments of the present application.

[0045] Figure 7 It is a schematic flow chart of a method for starting an application provided in an embodiment of the present application.

[0046] Figure 8 It is a systrace comparison chart provided in an embodiment of the present application.

[0047] Fig. 9 An exemplary flow chart of a method for starting an application is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0049] The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0050] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0051] The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also includes other functions such as a personal digital assistant and / or a music player function, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), etc. Exemplary embodiments of portable electronic devices include but are not limited to devices equipped with Or a portable electronic device with other operating systems. The portable electronic device may also be other portable electronic devices, such as a laptop computer. It should also be understood that in some other embodiments, the electronic device may not be a portable electronic device, but a desktop computer. In some other embodiments, the electronic device may be an instrument for measurement, such as an oscilloscope.

[0052] For example, Figure 11 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0053] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0054] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0055] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0056] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0057] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0058] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0059] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0060] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0061] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0062] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0063] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0064] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0065] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0066] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0067] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0068] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0069] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0070] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0071] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0072] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0073] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0074] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0075] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0076] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0077] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0078] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0079] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the alarm application icon, an instruction to create a new alarm is executed.

[0080] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc. For example, when the mobile phone detects a user's touch operation on the lock screen interface, the mobile phone can collect the user's fingerprint information through the fingerprint sensor 180H, and match the collected fingerprint information with the fingerprint information preset in the mobile phone. If the match is successful, the mobile phone can enter the non-lock screen interface from the lock screen interface.

[0081] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0082] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0083] like Figure 2 As shown, the application layer may include camera, settings, skin module, user interface (UI), third-party applications, etc. Among them, the third-party applications may include gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0084] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer may include some predefined functions.

[0085] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0086] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0087] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. The display interface can be composed of one or more views.

[0088] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0089] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0090] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0091] Android runtime includes core libraries and virtual machines. Android runtime is responsible for calling and managing the Android system.

[0092] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0093] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0094] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0095] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0096] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0097] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0098] A 2D graphics engine is a drawing engine for 2D drawings.

[0099] In addition, the system library may also include status monitoring service modules, such as a physical status recognition module for analyzing and identifying user gestures; a sensor service module for monitoring sensor data uploaded by various sensors at the hardware layer to determine the physical status of the electronic device 100.

[0100] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0101] The hardware layer can include various types of sensors, such as Figure 1 Various types of sensors introduced in.

[0102] Combined with the above Figure 1 and Figure 2 The electronic device introduced, in the embodiment of the present application, is an electronic device such as a mobile phone terminal, a tablet computer, etc. that can run various applications. The physical devices involved in the electronic device 100 mainly include hardware components such as sensors, decision support systems (DSS) display chips, touch screens, fingerprint recognition modules, etc.; as well as kernel software layers such as screen management modules, display drivers, fingerprint drivers, and anti-mistouch; application framework layer functions such as anti-mistouch input, screen control, always on display (AOD) services, power management, etc.; and application layer services such as special adaptation applications (camera), third-party applications, system sleep, and AOD.

[0103] In the Android system, the SplashScreen thread can provide a splash animation for most applications. As a working thread of the user interface (UI) component, it can provide users with a vivid process of starting the application. By default, the splash animation can include the application icon and the application window background. Among them, the application icon can be used as the central icon of the splash animation. After the application's splash animation thread is called, the application's splash animation can be dynamically displayed. Generally speaking, the splash animation can be displayed when the application is cold started and warm started, that is, when the application is completely killed and then restarted, the splash animation can be displayed; or when the main activity of the application is destroyed or recycled, the splash animation can be displayed when it is started. The splash animation is introduced to prevent the application from taking too long to initialize during cold start or warm start, causing the user to wait too long in an idle area. When the application is started and the application interface can be displayed, or when the application draws the first frame, the splash animation is turned off.

[0104] For ease of understanding, Figure 3 As shown, taking a mobile phone terminal where the application started is a video application as an example, a set of graphical user interfaces (GUIs) are shown.

[0105] When the user unlocks the screen of the mobile terminal, the mobile terminal can display the following Figure 3 (a) in FIG. 1 shows the main interface of the mobile terminal. The interface displays icons of multiple applications (applications, Apps), including clock, calendar, gallery, video, etc. In response to the user's operation on the video application icon 301, the mobile terminal can sequentially display the following: Figure 3 (b) to Figure 3 The GUI described in (f), wherein the video application can be a third-party application.

[0106] like Figure 3 As shown in (b) of FIG. 1 , in response to the user's operation on the video application icon 301, the mobile terminal displays the main interface. Figure 3 In addition to the icons of multiple applications shown in (a) of FIG. 1 , an enlarged video application icon 301 may be displayed in the middle of the main interface. Furthermore, the video application icon 301 may become larger as time goes by. For example, Figure 3 In the main interface of the mobile terminal shown in (c), the size of the video application icon 301 in the main interface is relatively large compared to that in Figure 3 The video application icon 301 shown in (b) is larger.

[0107] It should be noted that the change in the size of the application icon can change continuously over time.

[0108] If the startup animation thread is called normally, the startup animation will be turned off after the application draws the first frame. For example, when the startup animation thread is called normally, when the mobile terminal displays Figure 3 When the interface of the application shown in (f) is displayed, the startup animation is turned off. However, due to a variety of possible reasons, the startup animation thread cannot be called normally, causing a certain amount of lag in the process of starting the application.

[0109] When the startup animation thread cannot be called normally, it will cause system lag. System lag is manifested in the user interface as the icon is loaded (for example Figure 3 As shown in (c) in the figure, there is an empty area, and the main interface of the mobile terminal appears in the empty area. Figure 3 (d) in the figure indicates that when the animation thread cannot be called normally, the main interface of the mobile terminal is displayed in the blank area after the video application icon 301 is loaded. After the blank area lasts for a period of time, the mobile terminal can display the following Figure 3 That is, when the mobile terminal displays the startup animation, it indicates that the startup animation thread has completed the call.

[0110] It can be seen that the failure to call the startup animation thread normally will cause the system to freeze and affect the user experience. Figure 4 The diagram of system tracing (systrace) during the application startup animation process is shown, and the reasons why the startup animation thread cannot be called normally are introduced.

[0111] like Figure 4 As shown in (a) in the figure, a systrace diagram of a startup animation (SplashScreen) thread is shown. Among them, some tasks when the startup animation thread is called are exemplarily represented, such as the addStartingWindow task, the addRootView task, and the binder processing (bindertansaction) task. When an application is set with a startup animation, the startup animation can be displayed when the application is started. When the startup animation thread is selected (the shadow indicates selection), the priority value of the startup animation thread is 110. It can be seen that the priority of the startup animation thread is low, and a low-priority startup animation thread may be difficult to be called or even unable to be called.

[0112] like Figure 4As shown in (b) in the figure, the startup animation thread will also call other threads during work, such as the Binder thread. The Binder thread is a way of inter-process communication in the Android system, which can glue the various components in the system together, similar to the "bridge" of various components. Figure 4 (b) in the figure shows that the startup animation thread includes a binder reply task, which needs to interact with another thread, that is, interact with the Binder thread on the other end. The time required to process the binder reply task in the Binder thread will affect the time required to process the binder reply task in the startup animation thread (it can be understood that the time required to process the binder reply task is consistent with the time required to process the binder reply task). Therefore, when the priority of the Binder thread on the other end of the startup animation thread is low, the time required for the Binder thread call is long, which affects the task processing time corresponding to the startup animation thread, thereby affecting the processing time of the startup animation thread. Figure 4 In (b), when the Binder thread is selected, the priority value of the Binder thread is 120. It can be seen that the priority of the thread (Binder thread) called by the animation startup thread is low, which will also affect the central processing unit (CPU) calling the animation startup thread, causing the system to freeze.

[0113] Therefore, in order to solve the problem of system lag caused by the inability to call the above-mentioned startup animation thread normally, the present application provides a method for starting an application to increase the priority of the startup animation thread or the priority of the Binder thread. In the scenario of high system load, the startup animation thread can also be called normally, making the application startup animation smoother and improving the user experience.

[0114] like Figure 5 , a system architecture diagram provided by the present application is shown. The system architecture can be carried in an electronic device and can include an application layer, a framework layer and a kernel layer.

[0115] Specifically, the application layer carries applications (Application, APP). Applications can be understood as software programs carried on electronic devices to provide users with a variety of functional services, such as maps, games, videos and other applications. Electronic devices can be understood as personal computers, tablet computers, mobile phone terminals and other devices. Applications can usually be displayed on the main interface of the mobile terminal in the form of icons, and the user interacts with the application icon to trigger the start of the application.

[0116] The framework layer carries UI components and Launcher. Among them, UI components can be understood as system UI, which belongs to the system-level Android application package (APK). UI components can provide a basic display interface for the system, such as the status bar at the top of the screen, the navigation bar at the bottom of the screen, the quick settings bar of the drop-down interface, the notification bar, the lock screen interface, the volume adjustment dialog box, the screenshot display interface, etc. In this application, the UI component can provide the lock screen interface of the electronic device and display the startup animation, etc. For the Android system, the last step after the system is started can be to start a Home application, which is used to display the applications already installed in the system, wherein the Home application is Launcher. During the startup process, Launcher will request the package manager service (PMS) to return the information of the applications already installed in the system, and encapsulate this information into icons and display them on the screen, so that the user can start the corresponding application by clicking the icon. In this application, Launcher can display icons of various applications on the main interface of the electronic device.

[0117] The kernel layer carries a real time group (Rtg) module, which can be used to adjust the priority of application threads (for example, start animation threads or Binder threads).

[0118] In addition, the system architecture of the present application also includes a performance control component (iaware). The performance control component can be carried in the application layer, framework layer and kernel layer to facilitate the management and control of thread priorities in the present application.

[0119] For ease of understanding, the following Figure 6 , showing a set of GUIs, taking a mobile terminal, where the application is a video application as an example, a method for starting an application provided in an embodiment of the present application is introduced.

[0120] like Figure 6 As shown in (a) of FIG. 1 , the lock screen interface of the mobile terminal is shown. The user can trigger the mobile terminal to display the lock screen interface by long pressing the power button. The user's power-on operation can also be understood as triggering the system startup of the electronic device. The lock screen interface of the mobile terminal displays a slide-to-unlock icon 601. In response to the user sliding the slide-to-unlock icon 601 from left to right, the mobile terminal can display the following Figure 6 GUI shown in (b) in .

[0121] like Figure 6As shown in (b) of FIG. 1 , in response to the user sliding the slide unlock icon 601 from left to right, the mobile terminal displays the main interface. The main interface of the mobile terminal includes icons of multiple applications, including clock, gallery, calendar, and video. In response to the user's operation on the video icon 602, the mobile terminal can display the following Figure 6 (c) and Figure 6 GUI shown in (d).

[0122] like Figure 6 As shown in (c) of FIG. 5 , in response to the user's operation on the video icon 602, the main interface of the mobile terminal displays the enlarged video icon 602. Moreover, the video icon 602 may become larger over time. For example, Figure 6 As shown in (d) in FIG. 1 , as time changes, the video icon 602 displayed on the main interface of the mobile terminal becomes larger.

[0123] It should be noted that the user's operation on the video icon 602 triggers the start of the video application program, which triggers the system to call and start the animation thread.

[0124] like Figure 6 As shown in (e) in FIG. 1 , in response to the completion of the startup animation thread, the mobile terminal displays the startup animation. The startup animation may include an icon of the video application or a window background of the video application.

[0125] like Figure 6 As shown in (f) in FIG. 1 , in response to the completion of the startup animation display, the mobile terminal displays the main interface of the video application. It can be understood that when the mobile terminal displays the main interface of the video application, it means that the video application has drawn the first frame and the startup animation is closed.

[0126] It should be noted that in Figure 6 In the set of GUIs shown, when the user clicks the icon of the application, the electronic device normally calls the startup animation thread, and the startup animation can be smoothly displayed on the interface of the electronic device. Figure 6 The GUI shown in (e) and Figure 6 Between the GUIs shown in (d) in FIG. 1 , there will be no blank area (for example, Figure 3 The blank area will continue to be displayed for a period of time, affecting the user experience.

[0127] Combine the following Figure 7 , a method for starting an application provided in an embodiment of the present application is specifically introduced. For example, Figure 6 Two scenarios of enabling application programs are shown. The two scenarios are introduced below.

[0128] Scenario 1: After the electronic device is unlocked, the application is started directly.

[0129] It should be noted that scenario 1 can be understood as a cold start of an application.

[0130] S701, entering the lock screen interface, and the UI component gains focus.

[0131] Exemplarily, when the electronic device responds to the user's operation of starting the electronic device, the electronic device enters the lock screen interface. For example, the user long presses or presses the power button of the mobile phone terminal, the mobile phone terminal turns on and enters the lock screen interface.

[0132] Exemplarily, the lock screen interface is as follows Figure 6 The lock screen interface of the mobile terminal shown in (a).

[0133] S702, the UI component sends a notification message A, and correspondingly, the performance control component (iaware) receives the notification message A.

[0134] S703, the performance control component caches the start animation thread identity (Identity, ID).

[0135] It should be noted that when the electronic device is turned on, the performance control component can obtain the notification message A, which is used to notify the performance control component that the electronic device has been turned on. The performance control component will cache the ID of the startup animation thread to facilitate the subsequent management of the startup animation thread priority.

[0136] S704, enter the main interface, and Launcher gets the focus.

[0137] Exemplarily, in response to the user unlocking operation, the electronic device enters the main interface. Figure 3 The main interface of the mobile phone terminal shown in (a) in FIG. 6 , or the main interface of the mobile phone terminal shown in (b) in FIG. 6 .

[0138] S705, Launcher sends notification message B, and accordingly, the performance control component receives notification message B.

[0139] S706: The performance control component increases the priority of the startup animation thread.

[0140] It should be noted that when the electronic device displays the main interface, the performance control component can obtain notification message B, which is used to notify the performance control component that the electronic device has displayed the main interface. The performance control component will increase the priority of the startup animation thread. When the application is started, the startup animation thread can be called first, making the startup of the application smoother.

[0141] Exemplarily, the performance control component adjusts the priority of the startup animation thread through Rtg.

[0142] Furthermore, the performance control component can also adjust the Binder thread priority through Rtg.

[0143] It should be noted that the start animation thread can call the Binder thread. The performance control component can determine the Binder thread called by the start animation thread according to the start animation thread ID cached in step S703, and adjust the Binder thread priority through Rtg.

[0144] It can be understood that the Binder thread is the thread that can be called by the animation thread. Figure 4 As can be seen from the description of (b) in the figure, the priority of the Binder thread will also affect the call of the animation startup thread. Based on this, increasing the priority of the Binder thread will help the system to prioritize the call of the animation startup thread.

[0145] S707 , the UI component displays a startup screen in response to the user clicking the application icon.

[0146] For example, the triggering condition for displaying the startup screen is as follows: Figure 6 As shown in (b), the user clicks on the icon of an application on the main interface. Since the priority of the startup animation thread is increased in the above step S706, when the user clicks on the icon of the application, the startup animation thread is called first according to the adjusted priority. For example, Figure 8 (b) and Figure 8 Compared with (a), the priority of the startup animation thread is increased. When the startup animation is called according to the adjusted priority, the processing time of the startup animation thread is shortened. Figure 8 (d) and Figure 8 Compared with (c) in the figure, the priority of the Binder thread called by the startup animation thread is increased, which also helps the system to prioritize calling the startup animation thread, thereby shortening the processing time of the startup animation thread. The system prioritizes calling the startup animation thread, which can display a smooth startup animation. For example, Figure 6 The startup animation shown in (e) in FIG. It can be understood that the startup animation is dynamically displayed on the screen.

[0147] It should be noted that, since the priority of the start animation thread is increased in the above step S706, the start animation thread can be called first. Figure 6 The startup animation shown in (e) in the figure avoids the display of a blank area due to the inability to call the startup animation thread normally, which affects the user experience.

[0148] S708, the UI component sends a notification message C, and correspondingly, the application receives the notification message C.

[0149] S709, the application obtains focus.

[0150] It should be noted that when the startup screen is displayed, the application receives notification message C. Notification message C is used to notify the application that the startup animation is displayed. When the startup animation is closed, the application starts drawing the first frame. For example, Figure 8 As shown in (e) in FIG. 1 , a startup animation is displayed within time t (for example, Figure 6 As shown in (e) in FIG. 1 , when the startup animation is displayed, that is, when t ends, the main interface of the map application is displayed. When the electronic device displays the application main interface, it means that the application starts to draw the first frame.

[0151] For example, Figure 6 As shown in (f) in FIG. 1 , when the application draws the first frame, the startup animation is closed and the mobile terminal displays the main interface of the application.

[0152] S710: The performance control component lowers the priority of the startup animation thread.

[0153] It should be noted that when the application starts drawing the first frame, the startup animation thread has been completed. Therefore, the performance control component can lower the priority of the startup animation thread, release CPU performance, and facilitate the system to call other threads.

[0154] Exemplarily, when the startup animation is displayed, the performance control component removes the startup animation thread from Rtg and lowers the priority of the startup animation thread, so that the user's subsequent interaction with the application is smoother.

[0155] Scenario 2: After closing the application, return to the main interface of the electronic device and restart the application.

[0156] It should be noted that scenario 2 can be understood as a warm start of the application.

[0157] S711, enter the main interface, Launcher gets the focus.

[0158] Exemplarily, the electronic device enters the main interface of the electronic device in response to the user's operation of exiting the application. Figure 6 The main interface shown in (b).

[0159] It should be noted that the user's operation of exiting the application can be understood as returning the user interface from the application's interface to the main interface, and the application is no longer running in the background.

[0160] S712, Launcher sends a notification message D, and accordingly, the performance control component receives the notification message D.

[0161] S713, the performance control component increases the priority of the startup animation thread.

[0162] It should be noted that when the electronic device returns to the main interface, the performance control component can obtain a notification message D, which is used to notify the performance control component that the electronic device has displayed the main interface. The notification message D is similar to the notification message B in step S705 above.

[0163] It should be noted that step S712 and step S713 are similar to the above step S705 and step S706 respectively.

[0164] That is to say, according to the above step S710, when the startup animation of the application is displayed, the priority of the startup animation thread is reduced. In order not to affect the next call of the startup animation thread. When the user exits the application and enters the main interface, the performance control component will increase the priority of the startup animation thread again.

[0165] In one implementation, in response to a user clicking on an application icon, the electronic device system calls the startup animation thread whose priority has been raised in step S713, and displays a startup screen. The icon clicked by the electronic device may be the icon of the application exited in step S711, or the icon of another application. In other words, when an application is exited, the user can click on the application icon again to display the startup screen of the application. The priority of the startup animation thread at this time is also the priority adjusted by the performance control component, so that the startup animation of the cold start or warm start of the application can be displayed smoothly.

[0166] S714: In response to the user clicking on the application icon, the UI component displays a startup screen.

[0167] S715, the UI component sends a notification message E, and the application receives the notification message E accordingly.

[0168] S716, the application obtains focus.

[0169] S717, the performance control component lowers the priority of the startup animation thread.

[0170] It can be understood that the notification message E in the above step S715 is similar to the notification message C in the above step S708. Steps S714 to S717 are similar to the above steps S707 to S710, and will not be repeated here.

[0171] Based on the above scheme, before the application is started, by increasing the priority of the startup animation thread, when the user triggers the startup of the application, the system calls the startup animation thread and smoothly displays the startup screen of the application on the electronic device interface, thereby improving the user experience.

[0172] like Figure 8 As shown in FIG. 1 , a systrace comparison chart of a set of application startup methods is shown. The systrace comparison chart clearly shows the impact of thread priority and thread processing time.

[0173] like Figure 8 As shown in (a) in FIG. 1 , when the start animation (SplashScreen) thread is selected (shown as a shadow, indicating selection), the priority value of the thread is 110. The processing time of the system call to start the animation thread is 55ms. In addition, the system starts to call the start animation thread after 3.800s.

[0174] like Figure 8 As shown in (b) of FIG. 1 , the method for starting an application provided by the present application is used to increase the priority of the start animation thread. When the start animation thread is selected, the priority value of the thread is 97. It can be seen that the priority value of 97 is higher than the priority value of 110. Therefore, Figure 8 Compared with the systrace shown in (a) in Figure 1, the processing time of the startup animation thread after the system call priority is increased is 41.1ms, which is significantly shorter. In addition, the system starts calling the startup animation thread before 3.800s.

[0175] It can be seen that by comparison Figure 8 (a) and Figure 8 In (b), when the user clicks the application icon at the same time to trigger the application startup, the processing time of the system calling the startup animation thread with increased priority is significantly shorter than the processing time of calling the startup animation thread before increasing the priority, and the system can call the startup animation thread with increased priority earlier.

[0176] In addition, the system can also increase the priority of the Binder thread called by the startup animation thread, which can also shorten the processing time of calling the startup animation thread.

[0177] like Figure 8 As shown in (c), when the Binder reply task in the Binder thread is selected, the priority of the Binder thread is 120, the processing time of the system call to start the animation thread is 55ms, and the processing time of the Binder reply task is t1. In addition, the system starts calling the animation thread 3.800s ago.

[0178] like Figure 8 As shown in (d), the method for starting an application provided by the present application is used to increase the priority of the Binder thread called by the start animation thread. When the Binder reply task is selected, the priority value of the Binder thread is 98. It can be seen that the priority value of 98 is higher than the priority value of 120. The processing time of the system call to start the animation thread is 41.1ms, and the processing time of the Binder reply task is t2, which is less than t1. In addition, the system starts calling the start animation thread 3.800s ago.

[0179] in, Figure 8 (c) and Figure 8 The dotted line between the Binder transaction task and the Binder reply task shown in (d) indicates that the time required to process the Binder reply task in the Binder thread will affect the time required to process the Binder t ansaction task in the startup animation thread. The Binder thread is a thread that can be called by the startup animation thread, and the priority of the Binder thread will also affect the call of the startup animation thread.

[0180] It should be noted that increasing the priority of the startup animation thread and increasing the priority of the Binder thread can both shorten the processing time of the startup animation thread. The method for starting an application provided in this application can increase the priority of these two threads separately or simultaneously, so that the system can give priority to calling the startup animation thread, which can better shorten the processing time of calling the startup animation thread and advance the time when the system starts calling the startup animation thread.

[0181] It is understandable that the above-mentioned start time of calling the thread, the processing time of calling the thread and the task processing time are only examples, and the embodiments of the present application do not limit the specific processing time.

[0182] like Figure 8 As shown in (e) of FIG. 1 , using the method for starting the animation thread provided by the present application, when the user triggers the start of an application (e.g., a map app), the system will preferentially call the start animation thread, complete the call to the start animation thread in 41.1 ms, and display the start animation in t time (e.g., Figure 6 As shown in (e) in the figure, the startup animation is turned off when the map app draws the first frame. It can be seen that when the system preferentially calls the startup animation thread, the processing time of the startup animation thread is short, and the startup screen can be displayed quickly, avoiding the blank area displayed because the startup animation cannot be called normally, which affects the user experience.

[0183] like Fig. 9 FIG. 1 is a schematic flow chart of a method for starting an application program provided in an embodiment of the present application. The method can be applied to electronic devices, and the method is described in detail below.

[0184] S901, in response to a first operation of a user, the electronic device displays a first interface and adjusts the priority of starting an animation thread to a first priority.

[0185] Exemplarily, the first interface is the main interface (or desktop) of the electronic device. Figure 6 The main interface of the mobile terminal shown in (b) of FIG. The desktop of the electronic device displays icons of application programs, and the user can slide the desktop left and right to make the electronic device display icons of different application programs.

[0186] It should be noted that the specific method in which the user triggers the electronic device to display the first interface is not limited, including but not limited to the user entering the unlock password of the electronic device, or triggering the electronic device to display the first interface through face recognition, fingerprint recognition, etc.

[0187] That is to say, when the electronic device displays the main interface, the priority of the startup animation (SplashScreen) thread can be adjusted.

[0188] It should be noted that the first priority is higher than the initial priority of the startup animation. For example, the value of the initial priority of the startup animation can be as follows: Figure 8 The value of the first priority can be as follows: Figure 8 97 as shown in (b) of FIG. It can be understood that although the value of the first priority is smaller than the value of the initial priority, the first priority represented is higher than the initial priority.

[0189] In one implementation, the electronic device displays the first interface, and while adjusting the priority of the startup animation thread to the first priority, the priority of the associated thread of the startup animation thread may also be adjusted.

[0190] Exemplarily, the associated thread of the started animation thread is a Binder thread.

[0191] For example, Figure 8 As shown in (c) in the figure, the initial priority of the Binder thread is 120; Figure 8 As shown in (d) in the figure, the priority of the Binder thread is increased to 98.

[0192] That is to say, the startup animation thread can be called preferentially by the system by increasing the priority of the startup animation thread, or increasing the priority of the Binder thread, or increasing the priorities of the startup animation thread and the Binder thread at the same time.

[0193] It should be noted that the system giving priority to calling the animation start thread can be understood as the time when the system starts calling the animation start thread is advanced, and / or the processing time of the system calling the animation start thread is shortened.

[0194] S902: In response to a second operation of the user on the first icon, calling and starting an animation thread according to a first priority.

[0195] It should be noted that, a plurality of icons may be displayed on the first interface, and the first icon is one of the plurality of icons. The icon is an icon of an application. The first icon is an icon of a first application.

[0196] Exemplarily, the second operation of the user on the first icon may be a click of the user on the first icon. The user clicking the first icon may trigger the start of the application corresponding to the icon. In other words, the user clicking the first icon may trigger the start animation of the application corresponding to the icon.

[0197] That is to say, after the thread of starting animation is improved, the electronic device can preferentially call the startup animation thread of the first priority. Even when the electronic device is highly loaded (for example, multiple applications are running in the background), the startup animation thread can still be called normally.

[0198] S903: Display the startup animation of the first application program by starting the animation thread.

[0199] It should be noted that the electronic device calls the first priority startup animation thread to display the startup animation of the first application on the user interface. Due to the normal calling of the startup animation thread, the startup animation will also be smoother.

[0200] It should be noted that, as can be seen from the above step S901, while adjusting the priority of the startup animation thread, the priority of the associated thread of the startup animation thread can also be adjusted. After the electronic device adjusts the priority of the associated thread of the startup animation thread, it can also call the associated thread of the startup animation thread according to the first priority, and, further, can display the startup animation of the first application through the startup animation thread and the associated thread of the startup animation. For example, Figure 8 As shown in (d), the priority of the Binder thread is increased.

[0201] S904: After displaying the startup animation of the first application, display the interface of the first application.

[0202] It should be noted that before the electronic device displays the main interface, the electronic device may also display a lock screen interface.

[0203] That is, in the above step S901, in response to the user's first operation, the electronic device displays the first interface and adjusts the priority of the startup animation thread. It can also respond to the user's third operation and display the lock screen interface and cache the identifier of the startup animation thread.

[0204] It should be noted that the specific method in which a user triggers the electronic device to display the lock screen interface is not limited, including but not limited to the user turning on the electronic device.

[0205] It is understandable that when the electronic device displays the lock screen interface, the identifier of the startup animation thread can be cached in advance to facilitate the subsequent adjustment of the priority of the startup animation thread. Specifically, the identifier of the startup animation thread can be cached by the performance control component carried by the electronic device.

[0206] In one implementation, after the interface of the first application is displayed, the first priority of starting the animation thread is reduced to a second priority.

[0207] It is understandable that after the startup animation of the first application is displayed, the first application is started and the interface of the application is displayed. After the first application is started, the user can complete the interaction on the interface of the first application. At this time, the priority of the startup animation thread can be appropriately reduced to release part of the CPU computing power and save energy consumption.

[0208] In one implementation, after the first priority of the startup animation thread is reduced to the second priority, when the electronic device displays the first interface again, the second priority of the startup animation thread is increased to the third priority; in response to the user's fourth operation on the first icon, the startup animation thread is called according to the third priority; the startup animation of the first application is displayed through the startup animation thread; after displaying the startup animation of the first application, the interface of the first application is displayed.

[0209] Illustratively, the third priority is the same as or different from the first priority.

[0210] It can be understood that the display of the first interface this time is a re-display of the first interface by the electronic device in step S901.

[0211] That is to say, after the user turns on the device, when the electronic device displays the main interface for the first time, or when the electronic device returns to the main interface from the application interface, the priority of the startup animation thread will be triggered to increase. When the user subsequently clicks on the icon of any application and triggers the startup of any application, the system can call the high-priority startup animation thread to ensure smooth display of the startup animation.

[0212] Exemplarily, the startup animation of the first application includes at least one of the following: a first icon, a picture, or a startup animation. The first icon can be used as the central icon of the startup animation of the first application, the picture can be used as the background of the startup animation interface of the first application (for example, different colors can be set for the background), and the startup animation can display the first icon and the picture in a dynamic form on the user interface.

[0213] Based on the above scheme, before the application of the electronic device is started, the priority of the startup animation thread can be increased. When the user triggers the startup of an application, the system can give priority to calling the startup animation thread. This allows the startup animation thread to be called normally in high-load scenarios of the electronic device, and the startup animation on the user interface will not be stuck due to the difficulty of system calling, affecting the user experience.

[0214] The embodiment of the present application provides a computer program product, which, when executed on a device, enables the device to execute the technical solution in the above embodiment. Its implementation principle and technical effect are similar to those of the above method-related embodiments, and will not be described in detail here.

[0215] The embodiment of the present application provides a readable storage medium, which contains instructions. When the instructions are executed on a device, the device executes the technical solution of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0216] The embodiment of the present application provides a chip, which is used to execute instructions. When the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar and will not be repeated here.

[0217] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0218] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units (modules) can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0219] In the several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0220] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0222] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0223] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for starting an application, characterized in that: The method is applied to an electronic device, comprising: In response to a first operation of the user, the electronic device displays a first interface, and adjusts the priority of the startup animation thread to a first priority, wherein the first interface is a desktop of the electronic device, the first interface includes a first icon, the first icon is an icon of a first application, and the first priority is higher than an initial priority of the startup animation thread; In response to a second operation of the user on the first icon, calling the start animation thread according to the first priority; Displaying the startup animation of the first application through the startup animation thread; After displaying the startup animation of the first application, the interface of the first application is displayed.

2. The method according to claim 1, characterized in that The step of adjusting the priority of the startup animation thread to be the first priority includes: Adjust the priority of the startup animation thread to the first priority, and Adjust the priority of the associated thread of the start animation thread.

3. The method according to claim 2, characterized in that The method further comprises: Calling the associated thread of the animation start thread according to the first priority; The step of displaying the startup animation of the first application program through the startup animation thread includes: The startup animation of the first application is displayed through the startup animation thread and the associated thread of the startup animation.

4. The method according to any one of claims 1 to 3, characterized in that Before the electronic device displays the first interface in response to the first operation of the user and adjusts the priority of the startup animation thread to the first priority, the method further includes: In response to the user's third operation, the electronic device displays a lock screen interface and caches the identifier of the startup animation thread.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After the interface of the first application is displayed, the first priority of the startup animation thread is reduced to a second priority.

6. The method according to claim 5, characterized in that After lowering the first priority of the startup animation thread to a second priority, the method further includes: When the electronic device displays the first interface again, the second priority of the startup animation thread is increased to a third priority, wherein the third priority is higher than the initial priority of the startup animation thread; In response to a fourth operation of the user on the first icon, calling the start animation thread according to the third priority; Displaying the startup animation of the first application through the startup animation thread; After displaying the startup animation of the first application, the interface of the first application is displayed.

7. The method according to claim 6, characterized in that The third priority level is the same as or different from the first priority level.

8. The method according to any one of claims 1 to 7, characterized in that The startup animation of the first application includes at least one of the following: the first icon, the picture, or the startup animation.

9. A device for starting an application, characterized in that: include: A display module, configured to display a first interface in response to a first operation of a user, wherein the first interface is a desktop of the electronic device, and the first interface includes a first icon, which is an icon of a first application program; A management and control module, used for adjusting the priority of the startup animation thread to a first priority, where the first priority is higher than the initial priority of the startup animation thread; a management and control module, configured to call the startup animation thread according to the first priority level in response to a second operation of the user on the first icon; The display module is further configured to display the startup animation of the first application through the startup animation thread; The display module is further configured to display the interface of the first application after displaying the startup animation of the first application.

10. The device according to claim 9, characterized in that The control module is used to adjust the priority of the startup animation thread to the first priority, including: The control module is used to adjust the priority of the startup animation thread to the first priority, and It is also used to adjust the priority of the associated thread of the startup animation thread.

11. The device according to claim 10, characterized in that The control module is further configured to call the associated thread of the animation startup thread according to the first priority; The display module is specifically configured to display the startup animation of the first application through the startup animation thread and the associated thread of the startup animation.

12. The device according to any one of claims 9 to 11, characterized in that Before the display module is used to display the first interface in response to the first operation of the user, The display module is further configured to display a lock screen interface in response to a third operation of the user. The control module is further used to cache the identifier of the startup animation thread.

13. The device according to any one of claims 9 to 12, characterized in that: The management and control module is further used to reduce the first priority of the startup animation thread to a second priority after the display module displays the interface of the first application.

14. The device according to claim 13, characterized in that After the control module is used to reduce the first priority of the startup animation thread to the second priority, The control module is further configured to increase the second priority of the startup animation thread to a third priority when the display module displays the first interface again, wherein the third priority is higher than the initial priority of the startup animation thread; The control module is further configured to call the start animation thread according to the third priority level in response to a fourth operation of the user on the first icon; The display module is further configured to display the startup animation of the first application through the startup animation thread; The display module is further configured to display the interface of the first application after displaying the startup animation of the first application.

15. The device according to claim 14, characterized in that The third priority level is the same as or different from the first priority level.

16. The device according to any one of claims 9 to 15, characterized in that The startup animation of the first application includes at least one of the following: the first icon, the picture, or the startup animation.

17. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device performs the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 8.

19. A computer program product comprising instructions, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.

20. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Thread priority management method, electronic equipment and readable storage medium

    CN120066737A

  • Method and apparatus for starting application program, and electronic device

    EP4693036A1

  • Method and apparatus for starting application program, and electronic device

    WO2025026077A1