Method and apparatus for starting application program, and electronic device

By increasing the priority of starting animated thread, the application startup lag caused by the inability to call the startup animation thread in time is solved, and the smoothness of application startup and user experience is improved.

WO2025026077A1PCT designated stage expired Publication Date: 2025-02-06HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106163
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-31
Filing Date
2024-07-18
Publication Date
2025-02-06

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, 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 the smoothness of the application startup process and improves the user experience, especially in high-load scenarios of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106163_06022025_PF_FP_ABST
    Figure CN2024106163_06022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for starting an application program, and an electronic device. The method comprises: in response to a first operation of a user, an electronic device displaying a desktop and adjusting the priority of a splash screen thread as a first priority, wherein the desktop comprises a first icon, the first icon is an icon of a first application program, and the first priority is higher than an initial priority of a splash screen; in response to a second operation of the user on the first icon, calling the splash screen thread on the basis of the first priority; displaying the splash screen of the first application program by means of the splash screen thread; and after displaying the splash screen of the first application program, displaying an interface of the first application program. According to the method for starting an application program of the present application, the priority of a splash screen thread can be increased when an electronic device displays a desktop, and when a user triggers starting of an application program, the system calls the splash screen thread of which the priority is increased, such that a splash screen of the application program will not lag, and the use experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and electronic device for starting application

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 31, 2023, with application number 202310953516.7 and invention name “Method, device and electronic device for launching an application”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] 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

[0003] With the advancement of science and technology, electronic devices can now host applications that provide various services to users, and users can trigger the launch of these applications through the user interface. The current Android system provides an application programming interface (API) for a splash screen thread, which can be used to develop application startup pages in the Android system. This means that when an application starts, the Android system can create a splash screen. However, the splash screen thread may not be called for various reasons, or may not be called in a timely manner, causing application startup delays.

[0004] 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.

[0005] Summary of the Invention

[0006] The present application provides a method, device, and electronic device for launching an application program. The method can promptly call a startup animation thread, thereby making the process of launching the application program smoother.

[0007] In a first aspect, a method for launching an application is provided, which 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 the 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.

[0008] For example, the user can trigger the electronic device to display the first interface by entering 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 launch of the application by clicking on the first icon, calling the startup animation thread with increased priority.

[0009] For example, 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.

[0010] Based on this 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 launch of the application. When the user triggers the launch 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 application's startup animation is smooth and improves the user experience.

[0011] 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.

[0012] Exemplarily, the associated thread for starting the animation thread is a Binder thread.

[0013] It is understandable that the electronic device can increase the priority of the startup animation thread while further increasing the priority of the Binder 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 call the startup animation thread first.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the method further 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.

[0015] 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 both increased, the system can make the application startup animation display smoother by calling the startup animation thread with increased priority and the startup animation thread associated thread.

[0016] 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 of 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 of the user, the electronic device displays a lock screen interface and caches the identifier of the startup animation thread.

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

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

[0019] 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.

[0020] Based on the above solution, after the first application's startup animation is displayed, the first application is launched and the first application's interface is implemented. At this point, the startup animation thread ends, and the priority of the startup animation thread can be lowered, freeing up some central processing unit (CPU) computing power and saving energy.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: after lowering the first priority of the startup animation thread to the second priority, the method further 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.

[0022] Based on the above solution, when the electronic device displays the main interface containing multiple icons again, the priority of the startup animation thread can be increased again. When the user triggers the launch of an application on the main interface, the system can call the startup animation thread with the increased priority. In other words, during a warm start of the application, the startup animation thread with the increased priority can also be called, making the startup animation of the warm start process smoother and improving the user experience.

[0023] 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.

[0024] In combination with the first aspect, in some 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.

[0025] For example, the first icon can serve as the central icon of the startup animation of the first application, and 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.

[0026] In a second aspect, a device for launching an application is provided, including: 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 including a first icon, the first icon being the icon of a first application; a management module for adjusting the priority of a startup animation thread to a first priority, the first priority being higher than the initial priority of the startup animation thread; a management 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 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.

[0027] 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.

[0028] 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.

[0029] 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.

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

[0031] 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.

[0032] In combination with the second aspect, in certain implementations of the second aspect, the control module is used to reduce the first priority of the startup animation thread to the second priority, and the control module is also used to increase the second priority of the startup animation thread to the 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 also used to call the startup animation thread according to the third priority in response to the user's fourth operation 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.

[0033] 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.

[0034] 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, a picture, or a startup animation.

[0035] 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.

[0036] 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.

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

[0038] 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 the memory through the data interface to execute the method in the first aspect and any possible implementation thereof.

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

[0040] 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

[0041] FIG1 is a schematic structural diagram of an electronic device.

[0042] FIG2 is a software structure block diagram of an electronic device.

[0043] FIG3 is a set of GUIs provided in an embodiment of the present application.

[0044] FIG4 is a schematic diagram of a systrace provided in an embodiment of the present application.

[0045] FIG5 is a system architecture diagram provided in an embodiment of the present application.

[0046] FIG6 is a set of GUIs provided in an embodiment of the present application.

[0047] FIG7 is a schematic flowchart of a method for starting an application provided in an embodiment of the present application.

[0048] FIG8 is a systrace comparison diagram provided in an embodiment of the present application.

[0049] FIG9 is a schematic flowchart of a method for starting an application provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solution in this application will be described below with reference to the accompanying drawings.

[0051] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of this application and the appended claims, the singular expressions "a", "an", "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 can exist; for example, A and / or B can mean: 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 previous and subsequent associated objects are in an "or" relationship.

[0052] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] 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, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication functions (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.

[0054] 1 shows a schematic structural diagram of an 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 194, and a subscriber identification module (SIM) card interface 195. 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.

[0055] It should be understood that the structures illustrated in the embodiments of the present application do 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0056] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.

[0057] 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.

[0058] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0059] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.

[0060] 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.

[0061] 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 antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0062] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G 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.

[0063] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted 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 being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the 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.

[0064] 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 that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0065] 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 a network and other devices through wireless communication technologies. The wireless communication technologies 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).

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

[0067] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0068] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0069] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0070] 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 light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion 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.

[0071] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0072] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0073] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0074] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0075] 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 can 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 can 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.

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

[0077] 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 provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

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

[0079] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0080] Microphone 170C, also known as "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 the microphone 170C to input the sound signal into the 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 source of sound, realize directional recording function, etc.

[0081] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. 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. A capacitive pressure sensor can be a device comprising at least two parallel plates with 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 intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch 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, the instruction to create a new alarm is executed.

[0082] Fingerprint sensor 180H is used to collect fingerprints. Electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, and so on. For example, when the phone detects a user's touch operation on the lock screen, the phone can collect the user's fingerprint information through fingerprint sensor 180H and match the collected fingerprint information with the fingerprint information pre-set in the phone. If the match is successful, the phone can enter the non-lock screen interface from the lock screen interface.

[0083] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. 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 applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.

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

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

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

[0087] As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0088] The window manager manages windowed applications. It can determine the display size, determine whether a status bar is present, lock the screen, and take screenshots. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.

[0089] The view system includes visual controls, such as controls for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views.

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

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

[0092] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0093] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for calling and managing the Android system.

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

[0095] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

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

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

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

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

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

[0101] In addition, the system library can 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.

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

[0103] The hardware layer may include various sensors, such as the various sensors described in FIG1 .

[0104] In conjunction with the electronic devices described in Figures 1 and 2 above, in the embodiments of the present application, electronic devices such as mobile terminals and tablet computers 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, and power management; and application layer services such as special adaptation applications (camera), third-party applications, system hibernation, and AOD.

[0105] In the Android system, the SplashScreen thread provides the startup animation for most applications. As a worker thread for the user interface (UI) component, it provides users with a vivid experience of the application's startup process. By default, the startup animation includes the application icon and the application's window background. The application icon serves as the centerpiece of the startup animation. After the application's startup animation thread completes, the application's startup animation can be dynamically displayed. Generally speaking, the startup animation can be displayed during cold and warm startups. Specifically, the startup animation can be displayed when the application is completely killed and then restarted; or when the application's main activity is destroyed or recycled. The startup animation is introduced to prevent the application from taking too long to initialize during cold or warm startups, causing the user to wait for an extended period of time. The startup animation is terminated when the application startup is complete and the application interface is ready to be displayed, or when the application draws its first frame.

[0106] For ease of understanding, as shown in FIG3 , a set of graphical user interfaces (GUIs) is shown, taking a mobile phone terminal where the started application is a video application as an example.

[0107] When a user unlocks the screen of a mobile terminal, the mobile terminal may display the main interface of the mobile terminal as shown in Figure 3 (a). This interface displays icons of multiple applications (apps), including a clock, calendar, gallery, video, etc. In response to the user's operation on the video application icon 301, the mobile terminal may sequentially display the GUIs described in Figures 3 (b) to 3 (f), wherein the video application may be a third-party application.

[0108] As shown in FIG3(b), in response to a user's operation on the video application icon 301, the mobile terminal displays a main interface. In addition to displaying multiple application icons as shown in FIG3(a), the main interface may also display an enlarged video application icon 301 in the center of the main interface. Furthermore, the video application icon 301 may continue to grow in size over time. For example, as shown in FIG3(c), the main interface of the mobile terminal has a larger size of the video application icon 301 than the video application icon 301 shown in FIG3(b).

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

[0110] If the startup animation thread is called normally, the startup animation will be terminated after the application draws the first frame. For example, when the startup animation thread is called normally, when the mobile terminal displays the application interface shown in Figure 3 (f), the startup animation will be terminated. However, due to various possible reasons, the startup animation thread may not be called normally, causing some lag during the application startup process.

[0111] When the startup animation thread cannot be called normally, it will cause system jamming. System jamming is manifested in the user interface as follows: after the icon is loaded (for example, as shown in (c) in Figure 3), there is a blank area, and the main interface of the mobile terminal will appear in the blank area. As shown in (d) in Figure 3, when the startup 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 startup animation as shown in (e) in Figure 3. That is to say, when the mobile terminal displays the startup animation, it means that the startup animation thread has completed the call.

[0112] It can be seen that the failure to call the startup animation thread normally will cause system lag and affect user experience. The following is an introduction to the reasons why the startup animation thread cannot be called normally, combined with the system tracking (systrace) diagram during the application startup animation process shown in Figure 4.

[0113] As shown in (a) in Figure 4, 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 (binder tansaction) 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.

[0114] As shown in Figure 4(b), the animation startup thread also calls other threads during its work, such as the Binder thread. Binder threads are a form of inter-process communication in the Android system, gluing together various components in the system, similar to a "bridge" between them. Figure 4(b) shows that the animation startup thread includes a binder transaction task, which requires interaction with another thread, namely, the peer Binder thread. The time required to process the binder reply task in the Binder thread affects the time required to process the binder transaction task in the animation startup thread (it can be understood that the time required to process the binder reply task is the same as the time required to process the binder transaction task). Therefore, when the priority of the peer Binder thread of the animation startup thread is low, the Binder thread call takes a long time, affecting the processing time of the task corresponding to the animation startup thread, and thus the processing time of the animation startup thread. In Figure 4(b), when the Binder thread is selected, it is shown that 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.

[0115] 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.

[0116] As shown in 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.

[0117] Specifically, the application layer hosts applications (APPs). Applications can be understood as software programs hosted on electronic devices that provide users with a variety of functional services, such as maps, games, and videos. Electronic devices can be understood as devices such as personal computers, tablets, and mobile phones. Applications are typically displayed as icons on the main interface of a mobile phone terminal, and user interaction with the application icon triggers the launch of the application.

[0118] 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 starts can be to start a Home application, which is used to display the applications already installed in the system, wherein the Home application is the Launcher. During the startup process, the Launcher will request the package manager service (PMS) to return information about 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, the Launcher can display icons of various applications on the main interface of the electronic device.

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

[0120] In addition, the system architecture of the present application also includes a performance management component (iaware). The performance management 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.

[0121] For ease of understanding, a set of GUIs is shown below in conjunction with FIG6 , taking a mobile terminal and a video application as an example to introduce a method for starting an application provided by an embodiment of the present application.

[0122] As shown in (a) of Figure 6, the lock screen interface of the mobile phone terminal is shown. The user can trigger the mobile phone 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 phone 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 phone terminal can display the GUI shown in (b) of Figure 6.

[0123] As shown in FIG6(b), in response to a user sliding the slide-to-unlock icon 601 from left to right, the mobile terminal displays the main interface. The main interface of the mobile terminal includes icons for multiple applications, including a clock, gallery, calendar, and video. In response to a user operating the video icon 602, the mobile terminal may display a GUI as shown in FIG6(c) and FIG6(d).

[0124] As shown in FIG6 (c), in response to the user's operation on the video icon 602, the main interface of the mobile terminal displays an enlarged video icon 602. In addition, the video icon 602 can increase in size over time. For example, as shown in FIG6 (d), the video icon 602 displayed on the main interface of the mobile terminal increases in size over time.

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

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

[0127] As shown in (f) in Figure 6, 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.

[0128] It should be noted that in the set of GUIs shown in Figure 6, when the user clicks the application icon, the electronic device normally calls the startup animation thread, and the startup animation can be smoothly displayed on the interface of the electronic device. In other words, between the GUI shown in (e) of Figure 6 and the GUI shown in (d) of Figure 6, there will not be a gap (for example, the GUI shown in (d) of Figure 3) displayed because the startup animation thread cannot be called normally, and the gap will continue to be displayed for a period of time, affecting the user experience.

[0129] A method for starting an application provided by an embodiment of the present application is described in detail below in conjunction with Figure 7. For example, Figure 6 shows a method for starting an application in two scenarios, and the following describes these two scenarios respectively.

[0130] Scenario 1: After the electronic device is unlocked, the application is directly launched.

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

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

[0133] For example, 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.

[0134] Exemplarily, the lock screen interface is the lock screen interface of the mobile phone terminal as shown in (a) in FIG6 .

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

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

[0137] It should be noted that when the electronic device is turned on, the performance control component can obtain 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 subsequent management of the startup animation thread priority.

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

[0139] Exemplarily, in response to the user unlocking operation, the electronic device displays the main interface, for example, the main interface of the mobile phone terminal shown in (a) of FIG3 or the main interface of the mobile phone terminal shown in (b) of FIG6 .

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

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

[0142] It should be noted that when the electronic device displays the main interface, the performance control component can receive notification message B, which notifies 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 starts, it can prioritize the startup animation thread, making the application startup smoother.

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

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

[0145] It should be noted that the animation startup thread can call a Binder thread. The performance control component can determine the Binder thread called by the animation startup thread based on the animation startup thread ID cached in step S703, and adjust the Binder thread priority through Rtg.

[0146] It's understandable that the Binder thread is the thread that the animation startup thread can call. As shown in the description of (b) in Figure 4 above, the Binder thread's priority also affects the calling of the animation startup thread. Therefore, increasing the Binder thread's priority helps the system prioritize the calling of the animation startup thread.

[0147] S707 : In response to the user clicking the application icon, the UI component displays a startup screen.

[0148] Exemplarily, the triggering condition for displaying the startup screen is shown in (b) in Figure 6, that is, 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, compared with (a) in Figure 8, (b) in Figure 8 increases the priority of the startup animation thread. When the startup animation is called according to the adjusted priority, the processing time of the startup animation thread is shortened. Compared with (c) in Figure 8, (d) in Figure 8 increases the priority of the Binder thread called by the startup animation thread, which also helps the system to give priority to calling the startup animation thread, thereby shortening the processing time of the startup animation thread. The system gives priority to calling the startup animation thread, which can display a smooth startup animation. For example, the startup animation shown in (e) in Figure 6. It can be understood that the startup animation is dynamically displayed on the screen.

[0149] It should be noted that, since the priority of the startup animation thread is increased in step S706, the startup animation thread can be called first. When the user clicks the application icon, the startup animation shown in FIG6(e) can be displayed in a timely manner, avoiding the display of a blank area due to the inability to call the startup animation thread normally, which affects the user experience.

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

[0151] S709: The application program obtains focus.

[0152] It should be noted that when the startup screen is displayed, the application receives a notification message C. Notification message C is used to notify the application that the startup animation display is complete. When the startup animation is closed, the application starts drawing the first frame. For example, as shown in (e) in Figure 8, the startup animation is displayed within time t (for example, as shown in (e) in Figure 6), and when the startup animation is displayed, that is, after 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 drawing the first frame.

[0153] For example, as shown in (f) in FIG6 , when the application draws the first frame, the startup animation is closed, and the mobile terminal displays the main interface of the application.

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

[0155] 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.

[0156] For example, after 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.

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

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

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

[0160] Exemplarily, the electronic device enters the main interface of the electronic device in response to the user's operation of exiting the application program. For example, the electronic device returns to the main interface shown in FIG6( b ).

[0161] 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 no longer running the application in the background.

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

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

[0164] 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.

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

[0166] That is, according to the above step S710, after the application's startup animation is displayed, the priority of the startup animation thread is lowered. 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.

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

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

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

[0170] S716, the application obtains focus.

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

[0172] It is understandable that the notification message E in step S715 is similar to the notification message C in step S708. Steps S714 to S717 are similar to steps S707 to S710 above, and are not described in detail here.

[0173] Based on the above solution, 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.

[0174] Figure 8 shows a systrace comparison of a set of application startup methods. The systrace comparison clearly shows the impact of thread priority and thread processing time.

[0175] As shown in Figure 8 (a), when the SplashScreen thread is selected (shaded to indicate selection), its priority is 110. The system processing time for calling the SplashScreen thread is 55ms. Furthermore, the system starts calling the SplashScreen thread after 3.800s.

[0176] As shown in (b) of FIG8 , the method for starting an application provided by the present application is used to increase the priority of the startup animation thread. When the startup 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, compared with the systrace shown in (a) of FIG8 , the processing time of the system call to start the animation thread after the priority is increased is 41.1ms, which is significantly shortened. In addition, the system starts calling the startup animation thread before 3.800s.

[0177] It can be seen that by comparing (a) in Figure 8 and (b) in Figure 8, 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 after the priority is increased is significantly shorter than the processing time of calling the startup animation thread before the priority is increased, and the system can call the startup animation thread after the priority is increased earlier.

[0178] 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.

[0179] As shown in Figure 8(c), when the Binder reply task in the Binder thread is selected, the Binder thread priority is 120, the system call to start the animation thread takes 55ms, and the Binder reply task processing time is t1. Furthermore, the system started calling the animation thread 3.800s ago.

[0180] As shown in (d) in Figure 8, the method for starting an application provided by this application is used to increase the priority of the Binder thread called by the startup animation thread. When the Binder reply task is selected, the priority of the Binder thread is 98. It can be seen that the priority of 98 is higher than the priority 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 startup animation thread 3.800s ago.

[0181] Among them, the dotted line between the Binder transaction task and the Binder reply task shown in (c) in Figure 8 and (d) in Figure 8 indicates that the time required to process the Binder reply task in the Binder thread will affect the time required to process the Binder transaction 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.

[0182] It should be noted that increasing the priority of the animation startup thread and increasing the priority of the Binder thread can both shorten the processing time of the animation startup 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 animation startup thread, which can better shorten the processing time of calling the animation startup thread and also advance the time when the system starts calling the animation startup thread.

[0183] It will be understood that the above-mentioned time for starting the calling thread, the processing time for the calling thread, and the task processing time are merely examples, and the embodiments of the present application do not limit the specific processing time.

[0184] As shown in (e) of Figure 8, using the method for starting an animation thread provided by this application, when a user triggers the launch of an application (e.g., a map app), the system prioritizes calling the startup animation thread, completing the call in 41.1ms, displaying the startup animation within time t (as shown in (e) of Figure 6), and turning off the startup animation when the map app draws its first frame. As can be seen, when the system prioritizes calling the startup animation thread, the processing time of the startup animation thread is short, enabling the startup screen to be displayed quickly, avoiding the display of a blank area due to a failure to call the startup animation normally, which affects the user experience.

[0185] As shown in Figure 9, a schematic flow chart of a method for starting an application program provided by an embodiment of the present application is shown. This method can be applied to electronic devices, and the method is described in detail below.

[0186] 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.

[0187] Exemplarily, the first interface is the main interface (or desktop) of the electronic device. For example, the main interface of the mobile phone terminal is shown in (b) of Figure 6. 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 applications.

[0188] It should be noted that the specific method by 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.

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

[0190] It should be noted that the first priority is higher than the initial priority of the startup animation. For example, the initial priority value of the startup animation can be 110 as shown in Figure 8 (a). The first priority value can be 97 as shown in Figure 8 (b). It is understandable that although the first priority value is lower than the initial priority value, the first priority represented is higher than the initial priority.

[0191] In one implementation, the electronic device displays the first interface, adjusts the priority of the startup animation thread to the first priority, and also adjusts the priority of the associated thread of the startup animation thread.

[0192] Exemplarily, the associated thread for starting the animation thread is a Binder thread.

[0193] For example, as shown in (c) of FIG8 , the initial priority value of the Binder thread is 120; as shown in (d) of FIG8 , the priority value of the Binder thread is increased to 98.

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

[0195] It should be noted that the system prioritizing calling the start animation thread can be understood as the system starting to call the start animation thread in advance and / or the processing time of the system calling the start animation thread is shortened.

[0196] 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.

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

[0198] For example, the second operation of the user on the first icon may be a click of the user on the first icon. Clicking the first icon may trigger the launch of the application corresponding to the icon. In other words, clicking the first icon may trigger the launch animation of the application corresponding to the icon.

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

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

[0201] It should be noted that the electronic device calls the first priority startup animation thread and can 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.

[0202] 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, as shown in (d) in Figure 8, the priority of the Binder thread is increased.

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

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

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

[0206] It should be noted that the specific method in which the 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.

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

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

[0209] It is understood that after the first application's startup animation is displayed, the first application completes startup and displays its interface. After the first application is launched, the user can interact with the first application's interface. At this point, the priority of the startup animation thread can be appropriately lowered, freeing up some CPU computing power and saving energy.

[0210] 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.

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

[0212] It can be understood that the display of the first interface this time is a second display of the first interface displayed by the electronic device in step S901.

[0213] 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, it will trigger the increase of the priority of the startup animation thread. 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.

[0214] 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 serve as the central icon of the startup animation of the first application, and the picture can serve as the background of the startup animation interface of the first application (for example, a different color can be set for the background). The startup animation can display the first icon and picture in a dynamic form on the user interface.

[0215] Based on this solution, the priority of the startup animation thread can be increased before an application on an electronic device is launched. When the user triggers the launch of an application, the system can prioritize calling the startup animation thread. This allows the startup animation thread to be called normally even in high-load scenarios, preventing the startup animation from being displayed on the user interface due to system call difficulties, which would affect the user experience.

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

[0217] The present embodiment provides a readable storage medium containing instructions that, when executed on a device, cause the device to execute the technical solution of the above embodiment. The implementation principles and technical effects are similar and will not be further described here.

[0218] The present application provides a chip for executing 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 described in detail here.

[0219] Those skilled 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 this application.

[0220] Those skilled in the art will 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.

[0221] In the several embodiments provided in this 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 merely schematic. For example, the division of the unit is merely a logical function division. In actual implementation, there may be other division methods, 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.

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

[0223] 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.

[0224] 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, 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, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0225] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection 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

Patent Citations

  • Method and device for starting application program and electronic equipment

    CN119440647A

  • Method and device for processing advertisements in application program, storage medium and terminal

    CN110413347A

  • Animation switching method and device and storage medium

    CN113703937A

  • Thread scheduling method and device and electronic equipment

    CN115543551A

  • Application program loading method and electronic equipment

    CN115576621A