Application loading method and electronic equipment

By employing a non-fixed frame rate loading method and detecting blank screens to display the loading page during the application loading phase of electronic devices, the problem of excessively long loading times has been solved, improving user experience and smoothness.

CN121764544APending Publication Date: 2026-03-31HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, electronic devices need to load a large amount of resources when loading applications, resulting in excessively long waiting times for users and affecting their gaming experience.

Method used

By loading at a non-fixed frame rate during the application loading phase, the CPU's idle time is utilized for acceleration, and a loading page is displayed when a blank screen is detected, thus preventing users from seeing a blank screen.

Benefits of technology

It improved application loading speed, enhanced the user's entertainment experience, reduced waiting time, and ensured smooth gameplay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764544A_ABST
    Figure CN121764544A_ABST
Patent Text Reader

Abstract

The invention provides an application loading method and electronic equipment. The application loading method comprises the following steps: detecting that a target application enters a loading stage; in response to the target application entering a loading stage, the target application is loaded at a non-fixed frame rate, the frame rate of each frame in the loading stage is determined by the working duration of each frame, and the frame rate of at least one frame in the loading stage is higher than a preset frame rate. And if the loading page of the target application is the blank picture, obtaining a first loading page and displaying the first loading page in a loading stage. According to the method, the application loading speed can be increased, when the loaded page is the blank picture, the electronic equipment displays the first loaded page, the situation that a user sees the blank picture in the loading stage is avoided, and the entertainment experience of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and more specifically, to an application loading method and an electronic device. Background Technology

[0002] With the development and application of electronic devices, their functions have become increasingly diverse, enabling them to run various applications and web pages. In recent years, electronic devices have gradually become an indispensable part of people's lives. Besides basic internet access and communication needs, more and more people use electronic devices for entertainment. Video games, a type of entertainment activity based on electronic devices, are widely loved by users for their rich content and varied gameplay. Taking mobile games as an example, users can download installation packages from mobile app stores and then launch the game within the corresponding application; these applications are called game applications.

[0003] However, regardless of the type of game, a large amount of resources generally need to be loaded before the game can run, which can lead to a longer waiting time for users and thus affect their gaming experience. Summary of the Invention

[0004] This application provides an application loading method and an electronic device that helps reduce the user's waiting time before the application runs, thereby helping to improve the user's entertainment experience.

[0005] In a first aspect, this application provides an application loading method applied to an electronic device, comprising: detecting that a target application has entered a loading stage; and loading the target application at a non-fixed frame rate in response to the target application entering the loading stage, wherein the frame rate of each frame in the loading stage is determined by the working duration of each frame, and the frame rate of at least one frame in the loading stage is higher than a preset frame rate.

[0006] Based on the above technical solution, loading the target application at a non-fixed frame rate during the loading phase of the target application helps to improve the loading speed of the application, reduce the waiting time of the user before the application runs, and thus help to improve the user's entertainment experience.

[0007] In some possible implementations, the method also includes running the target application at the preset frame rate during the application runtime phase.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method further includes: during the loading phase, when it is detected that the loading page of the target application is a blank screen, obtaining the first loading page; and displaying the first loading page.

[0009] Based on the above technical solution, electronic devices can display the first loading page when the loading screen is blank. This eliminates the need for application developers to adapt their systems, prevents users from seeing a blank screen during application loading, and helps improve the user's entertainment experience.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, detecting that the loading page of the target application is a blank screen includes: in the nth frame of the loading phase, obtaining the pixel values ​​of multiple pixels in the screen to be displayed, where n is an integer greater than 0; when the pixel values ​​of multiple pixels are all 0, determining that the loading page of the target application is a blank screen.

[0011] Based on the above technical solution, electronic devices can automatically detect the pixel values ​​of the pixels in the screen to be displayed during the loading process. By using the pixel values, it can determine whether the loading page is blank. This allows for targeted optimization after a blank screen is detected, which helps improve the user experience.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method may further include: in the p-th frame of the loading phase, obtaining the pixel values ​​of multiple pixels in the screen to be displayed, where p is an integer greater than 0, and the p-th frame is a frame after the n-th frame; stopping the display of the first loading page when the pixel values ​​of multiple pixels are not all 0.

[0013] Based on the above technical solution, when an electronic device determines that the current screen is not a blank screen (such as another page) by detecting the pixel values ​​of the pixels in the display screen, it can stop displaying the first loading page and display other pages. This achieves seamless transition between the first loading page and other pages, preventing users from seeing blank screens and enhancing their entertainment experience.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, detecting that the loading page of the target application is blank includes: in the m-th frame of the loading phase, obtaining the number of times the graphics drawing application programming interface (API) is called, where m is an integer greater than 0; when the number of times the graphics drawing API is called is 0, determining that the loading page of the target application is blank.

[0015] Based on the above technical solution, electronic devices can determine whether the current screen is blank by obtaining the number of times the graphics drawing API is called without affecting the loading speed. This allows for targeted optimization after a blank screen is detected, which helps improve the user experience.

[0016] In conjunction with the first aspect, in some implementations of the first aspect, the method may further include: in the q-th frame of the loading phase, obtaining the number of times the graphics drawing API is called, where q is an integer greater than 0, and the q-th frame is a frame after the m-th frame; when the number of times the graphics drawing API is called is not 0, stopping the display of the first loading page.

[0017] Based on the above technical solution, when an electronic device determines, by calling the graphics rendering API a certain number of times, that the current screen is not a blank screen (such as another page), it can stop displaying the first loading page and display other pages instead. This achieves seamless transition between the first loading page and other pages, preventing users from seeing blank screens and enhancing their entertainment experience.

[0018] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method further includes: before loading the target application at a non-fixed frame rate, obtaining first information, the first information being used to indicate that the loading page of the target application is a blank screen; and during the loading phase, displaying a first loading page according to the first information.

[0019] Based on the above technical solution, by acquiring the loading page data in advance, electronic devices can display the first loading page after the application loading stage begins, without the need for application developers to adapt, thereby avoiding users seeing a blank screen during the application loading stage and helping to better improve the user's entertainment experience.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method further includes: obtaining information about a first duration before loading the target application at a non-fixed frame rate, the first duration being the duration for loading the target application at a non-fixed frame rate; wherein loading the target application at a non-fixed frame rate includes loading the target application at a non-fixed frame rate within the first duration starting from the loading phase.

[0021] Based on the above technical solution, by acquiring loading time data in advance, electronic devices can load target applications at a non-fixed frame rate after the application loading phase begins, thereby improving the application loading speed and helping to better enhance the user's entertainment experience.

[0022] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: stopping the display of the first loading page after the first duration from the start of the loading phase has ended.

[0023] Based on the above technical solution, by acquiring loading time data in advance, electronic devices can cancel the display of the first loading page in a timely manner according to the application loading status, so as to achieve a smooth transition between the first loading page and other pages, avoid users seeing blank screens, and help improve the user's entertainment experience.

[0024] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: running the target application at a preset frame rate after a first duration from the start of the loading phase.

[0025] Based on the above technical solution, by acquiring loading time data in advance, electronic devices can switch to running the target application at a preset frame rate at the end of the application loading phase, ensuring that the frame rate of the target application is stable during the application running phase. While speeding up the application loading speed, it does not affect the user's operation and visual experience, which helps to improve the user's overall entertainment experience.

[0026] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: receiving a first instruction sent by a first application, the first instruction being used to instruct the display of a first loading page; and displaying the first loading page according to the first instruction.

[0027] Based on the above technical solution, electronic devices can promptly display the first loading page according to the instructions of the first application, which can prevent users from seeing a blank screen during the application loading stage and help improve the user's entertainment experience.

[0028] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: receiving a second instruction sent by the first application, the second instruction being used to instruct the display of the first loading page to stop; and stopping the display of the first loading page according to the second instruction.

[0029] Based on the above technical solution, the electronic device can stop displaying the first loading page according to the instructions of the first application, thereby connecting the first loading page with other pages, preventing users from seeing a blank screen, and helping to improve the user's entertainment experience.

[0030] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: sending a third instruction to a first application, the third instruction being used to instruct the rendering of the first frame of the loading phase; receiving a fourth instruction sent by the first application, the fourth instruction being used to instruct the acceleration of the loading phase; wherein loading the target application at a non-fixed frame rate includes: loading the target application at a non-fixed frame rate according to the fourth instruction.

[0031] Based on the above technical solution, electronic devices can load the target application at a non-fixed frame rate after the loading phase begins, according to the instructions of the first application, thereby improving the loading speed of the application and helping to better enhance the user's entertainment experience.

[0032] In conjunction with the first aspect, in some implementations of the first aspect, the application loading method may further include: receiving a fifth instruction sent by the first application, the fifth instruction being used to instruct the loading phase to stop acceleration; and running the target application at a preset frame rate according to the fifth instruction.

[0033] Based on the above technical solution, electronic devices can switch to running the target application at a preset frame rate in a timely manner according to the instructions of the first application, thereby improving the loading speed of the application during the loading stage and without affecting the user's application operation and visual experience during the application running stage, which helps to better enhance the user's overall entertainment experience.

[0034] Secondly, this application provides an electronic device including one or more processors, one or more memories, and one or more programs; wherein the one or more programs are stored in one or more memories, and the one or more programs include instructions that, when executed by one or more processors, enable the electronic device to execute an application loading method corresponding to any of the implementations in the first aspect above.

[0035] Thirdly, this application provides an electronic device including a unit or module for executing an application loading method corresponding to any of the implementations in the first aspect above.

[0036] Fourthly, this application provides a readable storage medium storing a program or instructions that, when executed, can implement an application loading method corresponding to any of the implementation methods in the first aspect above.

[0037] Fifthly, this application provides a chip including circuits for executing the application loading method corresponding to any of the implementations in the first aspect above.

[0038] Sixthly, this application provides a program product that stores programs or instructions, which, when run, can implement the application loading method corresponding to any of the implementation methods in the first aspect above. Attached Figure Description

[0039] Figure 1 This is a partial structural block diagram of an electronic device 100 related to an embodiment of this application.

[0040] Figure 2 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application.

[0041] Figure 3 This is a set of graphical user interface diagrams illustrating the startup and loading process of mobile games.

[0042] Figure 4This is a schematic diagram of the frame loop during the application loading and running phases.

[0043] Figure 5 This is a flowchart of an application loading method 300 of this application.

[0044] Figure 6 This is a schematic diagram of a frame loop for an application loading method provided in an embodiment of this application.

[0045] Figure 7 This is a frame loop diagram of another application loading method provided in this application embodiment.

[0046] Figure 8 This is a frame loop diagram of another application loading method provided in the embodiments of this application.

[0047] Figure 9 This is a schematic diagram of the first loading page drawn by some game engines in embodiments of this application.

[0048] Figure 10 This is a flowchart of an application loading method 500 of this application.

[0049] Figure 11 This is a flowchart of a game startup phase corresponding to the embodiments and method 500 of this application.

[0050] Figure 12 This is a flowchart of an application loading method 600 of this application.

[0051] Figure 13 This is a flowchart of a game startup phase corresponding to the embodiments and method 600 of this application.

[0052] Figure 14 This is a schematic diagram of an application loading device 900 provided in an embodiment of this application.

[0053] Figure 15 This is a schematic diagram of the structure of an electronic device 1000 that can be used for application loading, provided in an embodiment of this application. Detailed Implementation

[0054] The technical solutions of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments.

[0055] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0056] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.

[0057] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "one embodiment," "some embodiments," "another embodiment," "other embodiments," etc., appearing in different parts of 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 "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0058] The methods provided in some embodiments of this application can be applied to electronic devices capable of loading applications (Apps), games, videos, etc., such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, various game consoles, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices, and other electronic devices. The embodiments of this application do not impose any restrictions on the specific type of electronic device.

[0059] Figure 1 This is a block diagram illustrating a portion of the structure of an electronic device 100 related to an embodiment of this application. (See reference...) Figure 1The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, an audio module 170, a display screen 194, etc.

[0060] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented by hardware, software, or a combination of software and hardware.

[0061] The following is combined with Figure 1 A detailed description of each component of the electronic device 100 is provided below:

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

[0063] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0064] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory, avoiding repeated accesses, reducing the waiting time of the processor 110, and thus improving the efficiency of the system.

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

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

[0067] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on electronic devices 100.

[0068] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0069] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0070] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. Electronic device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to display screen 194 and application processor. The GPU is used to perform mathematical and geometric calculations, as well as for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0071] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-oled, or quantum dot light-emitting diodes (QLEDs). In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0072] The external memory interface 120 can be used to connect an external memory card to expand the storage capacity of the electronic device 100.

[0073] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121.

[0074] The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, accelerometers, distance sensors, fingerprint sensors, touch sensors, bone conduction sensors, etc. Figure 2 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system library layer, and the kernel layer. The application layer may include a series of application packages.

[0075] like Figure 2 As shown, the application layer can include applications such as camera, gallery, games, calls, maps, navigation, sports, Bluetooth, music, video, and chat.

[0076] The application framework layer can include a window manager, content providers, a view system, a phone manager, a resource manager, a notification manager, and so on. The application framework layer includes some predefined functions.

[0077] The window manager is used to manage windowed applications. It can retrieve screen size, determine if a status bar is present, lock the screen, and capture screenshots, among other things.

[0078] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, and more.

[0079] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0080] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection, hang-up, etc.).

[0081] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc.

[0082] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0083] The application layer and application framework layer run in a virtual machine. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

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

[0085] The Surface Manager is used to manage the display subsystem and provides the blending of two-dimensional and three-dimensional layers for multiple applications.

[0086] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio, image, and video encoding formats.

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

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

[0089] The kernel layer is the layer between hardware and software. The kernel layer can include, but is not limited to, display drivers, camera drivers, audio drivers, sensor drivers, etc.

[0090] It should be understood that the technical solutions in some embodiments of this application can be used in systems such as Android, iOS, and HarmonyOS.

[0091] The applications described in this application's embodiments may include games, videos, and other applications that are loaded and run using a frame-looping method. The videos involved in this application's embodiments include, but are not limited to, short videos, movies, TV series, animations, and sports events. The games involved in the application loading methods of some embodiments of this application, depending on the operating scenario, may be arcade games, console games, PC games, or portable games, including but not limited to online games, mobile games, mini-games, online games (H5 games) developed based on Hypertext Markup Language (HTML) 5 technology, and cloud games. Depending on the game content, they may be action games, adventure games, simulation games, role-playing games, strategy games, music games, casual games, sports games, and racing games. Depending on the number of participants, they may be single-player games, two-player interactive games, or multiplayer games. This application does not limit the specific application type.

[0092] The game engine involved in some embodiments of this application can be located in any of the above-mentioned application layer, application framework layer, system library, and kernel layer. This application does not limit the software layer in which the game engine resides. In one embodiment, the APIs that the application loading method of this application needs to call during execution can be in the same software layer as the game engine.

[0093] The following describes the terminology used in the applications of this application:

[0094] 1. Engine:

[0095] An engine refers to a pre-written, editable software system or a core component that supports interactive, real-time graphics applications. It's a set of machine-readable code (instructions) designed for a specific type of application. These systems provide application designers with various tools needed to write applications, aiming to enable application developers to easily and quickly create programs without starting from scratch. Common engines include game engines, audio / video engines, and search engines. Most engines support multiple operating platforms, such as Android, embedded operating systems (Linux), Mac operating systems (Mac OS X), windowed operating systems (Windows), iOS, and HarmonyOS.

[0096] 2. API:

[0097] An API (Application Programming Interface) is a set of predefined functions, or a set of conventions for communication between different components of a software system. As a set of rules and protocols, an API defines the methods and data formats used for communication between software components. It acts as an intermediary between different systems, enabling different software applications to communicate with each other.

[0098] 3. Frames, Frame Count, Frame Rate:

[0099] A frame is a single image in a video or animation. Game visuals or videos are generated by playing multiple still images in succession, and each of these still images is one frame.

[0100] Frame rate is short for the number of frames generated, which is the total number of still images. If an animation has a fixed frame rate of 60 frames per second, then it has 60 frames per second. The reciprocal of the frame rate is the duration of each frame, measured in milliseconds.

[0101] Frame rate is the number of frames displayed per second (fps). Frame rate = number of frames (frames) / time (time), with the unit being frames per second. Frame rate defines the mapping relationship between the speed of the frame loop and real time. For example, 60 frames per second means that the engine renders one frame every 16.7 ms.

[0102] 4. Frame loop:

[0103] A frame loop refers to the process of drawing images frame by frame. Taking games as an example, the game frame loop, also known as the main game loop, is the core mechanism of the game engine. It executes game logic, handles game events, and renders game images frame by frame. The game's operation can be abstracted as continuously repeating the following actions: user input, updating the game logic state, and rendering game images. The main game loop repeatedly executes these actions to keep the game running until the user exits. After each loop, the image is updated, and this process is repeated once per frame.

[0104] The existing screen display architecture consists of three parts. The first part is responsible for rendering, including the CPU, graphics card, GPU, and some system modules. The second part is the screen buffer, where rendered data is stored. The third part is the screen, used to draw the data on the screen buffer. After the graphics card generates an image, the image is written to the screen buffer in memory, and then transferred from the screen buffer to the screen for display. The number of times the screen refreshes its page per second is called the refresh rate. Taking a mobile phone as an example, a mobile phone screen is composed of many pixels, and each pixel displays different colors to ultimately create various images on the screen.

[0105] To ensure smooth operation of applications such as video streaming and gaming, the CPU or GPU frame rate should match the screen refresh rate. Ideally, with a 60Hz screen refresh rate, the application needs to render one frame within 16.7ms to achieve a smooth 60 frames per second. When the GPU rendering speed differs from the screen refresh rate, if a particular frame takes longer to render, the screen may display the same image on two separate refreshes, resulting in dropped frames and a perceived "stuttering" or "lag" experience for the user.

[0106] Taking games as an example, game developers typically use game engines as the basic framework for new games to save significant development time and costs. Games created using a game engine only require the corresponding game engine environment configuration to be included in the game's resource package for users to play. Mini-games, on the other hand, are a type of game characterized by being installation-free and playable instantly. An application that manages mini-games in a unified manner is called a game platform. Mini-games employ a separation of game engine and game content; the game platform provides the game engine and the necessary execution environment, while game developers only need to implement the game content. Mini-games are centrally managed by the game platform, which can display a list of mini-games, provide entry points for launching them, and integrate the game engine to run them. The game engine is responsible for rendering the game graphics and executing the game code. Game platforms can be pre-installed on electronic devices or downloaded from app stores or browsers.

[0107] However, in most user scenarios, launching an application typically requires downloading code packages and loading a large amount of resources, which takes a considerable amount of time. Taking the game launch process as an example, this embodiment refers to the page displayed when the user officially starts playing the game as the main page; in another scenario, taking the video launch process as an example, this embodiment refers to the first frame of the video file or the video playback start page as the main page. The stage from when the user launches the application through the application entry point to when the main page is displayed is called the application loading stage, and the stage after the main page is displayed is called the application running stage. For example, the loading page is the page displayed on the electronic device during the application loading stage. Excessive loading time can make users feel that the application is frozen, resulting in a poor user experience.

[0108] Taking mobile games as an example, Figure 3 This document illustrates the graphical user interface (GUI) of the startup and loading process for a set of mobile games. Figure 3Image (a) illustrates a game platform app display page, which includes a game icon, a search control, and an open control. The current game platform app display page corresponds to the page displayed before the user launches the game. Taking game 1 as an example, the mini-game starts in response to the user clicking control 301. For example, the mini-game proceeds as follows... Figure 3 The game loading stage shown in (b) ultimately presents as follows: Figure 3 The main page of Game 1 shown in (c).

[0109] Because there are numerous game developers with varying levels of technical expertise, manpower, and funding, a significant number of games fail to optimize the loading experience. If game developers haven't pre-set any loading screens, electronic devices may experience issues such as... Figure 3 As shown in (b) above, the "black screen" prevents users from knowing when the game has finished loading, potentially causing them to mistakenly believe their device has crashed and leading to anxiety. This "black screen" severely impacts the user experience.

[0110] Figure 4 This diagram illustrates a frame loop diagram of an application's loading and running phases. Each frame during application loading requires drawing a screen. The drawing time depends on the complexity of the screen, and there are significant differences in drawing time between different screens. For the same application, the drawing time for different frames may be the same or different. Taking games as an example, in one implementation scenario, based on preset running logic, some game developers set the game loading method to asynchronous loading; in another implementation scenario, game developers also set up user login, account verification, privacy notifications, and other interfaces requiring user interaction during the loading phase, and the game engine needs to process user input and provide feedback. Therefore, in addition to drawing, other events may need to be processed within a frame of the loading phase, and processing events also takes time. In the game engine implementation, events such as user input and asynchronous tasks are not processed immediately after they occur, but are placed in an event queue and executed in the next nearest frame. Figure 4 As shown, event 1, which occurs in frame 2, will not be processed until frame 3.

[0111] When the frame rate is unstable, such as switching from 60 frames per second to 30 frames per second, some users may feel that the screen updates are "slower," creating a stuttering sensation. Therefore, in addition to the rendering time and event processing time in each frame, the game engine fills the intervals between frames with a variable length of idle time to ensure a stable frame rate.

[0112] During the application loading phase, the application platform doesn't know when the application has finished loading and runs at a fixed frame rate. For users, this loading phase presents only static images, making it impossible to perceive whether the frame rate is stable. The fixed frame rate also results in inefficient use of CPU idle time, which is wasted. Therefore, the existing application loading phase is excessively long, leading to a poor user experience. There is an urgent need for an application loading method to speed up application loading and reduce the time spent in the loading phase.

[0113] Based on this, embodiments of this application provide an application loading method and an electronic device. This method allows the electronic device to load the target application at a non-fixed frame rate during the loading phase, reducing loading time and improving loading speed.

[0114] The following describes an application loading method and an electronic device according to an embodiment of this application. This application loading method can help reduce the user's waiting time before the application runs, thereby improving the user's entertainment experience.

[0115] Figure 5 A flowchart of an application loading method 300 according to this application is shown. The application loading method 300 includes:

[0116] S310: The target application has been detected to be entering the loading phase.

[0117] For example, after detecting that a user has launched an application, in response to the user's action of launching the target application, the electronic device loads the resources of the target application according to the action. At this time, the target application enters the loading phase.

[0118] In one implementation, taking a mini-game as an example, if it is detected that the user is opening the mini-game for the first time, or if it is detected that the user has previously opened the mini-game but the mini-game's code package has been deleted, then the corresponding code package needs to be downloaded before entering the loading stage. The code package download stage includes the game engine or game platform downloading game content, checking for game updates, etc. If it is detected that the user is not opening the mini-game for the first time, and the electronic device still has previously downloaded data cached, then the code package download may not be necessary, or only a small amount of data may need to be downloaded, allowing for a faster entry into the loading stage.

[0119] S320: In response to the target application entering the loading phase, load the target application at a non-fixed frame rate; wherein, the frame rate of each frame in the loading phase is determined by the working duration of each frame, and the frame rate of at least one frame in the loading phase is higher than the preset frame rate.

[0120] In one implementation, after the loading phase ends, the method 300 may further include: during the running phase, running the target application at the preset frame rate.

[0121] The following is based on Figures 6 to 13 Taking the loading and running phases of small and medium-sized games as examples, this application details the application loading method that loads the target application at a non-fixed frame rate. Figure 6 This diagram illustrates a frame loop of an application loading method according to an embodiment of this application. In this embodiment, the working duration may include one or more of the following: rendering time, possible processing event time, and time occupied by other tasks (e.g., screen detection time). Alternatively, all durations other than idle time can be referred to as the working duration, and the working duration of each frame is equal to the non-idle time of each frame. Figure 6 As shown, the first 5 frames are the application loading phase frames, the main page is displayed in the 6th frame, and every frame from the 6th frame onwards is the runtime phase frame for this target application. Assuming a preset frame rate of 60 frames / second, before optimizing application loading, as follows... Figure 4 As shown, the frame rate is the same during the loading and running phases of the target application, with a preset frame interval of 16.7ms.

[0122] like Figure 6 As shown in the embodiments of this application, in the loading phase shown in frames 1 to 5, each frame does not have idle time except for the working duration. The electronic device directly executes the next frame after drawing, processing events, and other tasks are completed. Thus, the frame rate of each frame from frame 1 to frame 5 can be higher than 60 frames per second. Therefore, in the method of this application embodiment, the frame rate of each frame in the application loading phase is determined by the working duration of each frame. Different frames may correspond to different frame rates; that is, a non-fixed frame rate is used for loading in the application loading phase.

[0123] After the 5th frame is rendered, the electronic device can render the main page, ending the loading phase and entering the runtime phase. To ensure a smooth refresh rate of 60 frames per second (i.e., a 16.7ms interval between the start and end of the 6th frame), the electronic device fills in the idle time after the 6th frame is rendered. From the 6th frame onwards, the frame rate in the runtime phase returns to a fixed frame rate, running the application at a fixed frame interval of 16.7ms.

[0124] This application loading method fully utilizes CPU idle time to automatically accelerate the application loading phase. By loading the target application at a non-fixed frame rate during the application loading phase, it helps improve application loading speed and enhance the user experience during the application loading process.

[0125] Taking mini-games as an example, in real-world scenarios, game platforms typically provide multiple entry points for launching mini-games. However, game platforms are unaware of whether mini-game developers have set up loading pages. If some game developers haven't pre-set a loading page, users may see a blank screen for a period of time during the loading phase. Depending on the user's electronic device, this blank screen may appear as a "black screen" or a "white screen" on different devices. This blank screen severely impacts the user experience.

[0126] In this scenario, to further enhance the user experience, the method 300 may optionally include: during the loading phase, when it is detected that the loading page of the target game is blank, obtaining the first loading page; and displaying the first loading page.

[0127] For example, an electronic device can automatically detect whether the loading phase of a target application includes a loading page; for games that do not have a designated loading page, the electronic device can draw a first loading page with a uniform style and overlay it on the blank screen, thereby preventing the user from seeing a blank screen. The method of this application embodiment can prevent users from seeing a blank screen during the application loading phase, which helps to improve the user's entertainment experience.

[0128] In one implementation, the electronic device can determine the start and end of the application loading phase through screen detection. Upon detecting a blank screen, the electronic device determines that the application has entered the loading phase and there is no preset loading page, at which point acceleration is initiated. The electronic device sets the frame rate of the loading phase to a non-fixed frame rate, with no idle time between frames except for the working duration; that is, it loads the application at a non-fixed frame rate to speed up the loading process. When the electronic device detects the first non-blank screen, it can determine that the application loading phase has ended and enters the running phase. Thereafter, the electronic device can run the application at the preset frame rate.

[0129] Optionally, detecting that the loading page of the target application is a blank screen includes: in the nth frame of the loading phase, obtaining the pixel values ​​of multiple pixels in the screen to be displayed, where n is an integer greater than 0; when the pixel values ​​of multiple pixels are all 0, determining that the loading page of the target application is a blank screen.

[0130] Optionally, the method may further include: in the p-th frame of the loading phase, obtaining the pixel values ​​of multiple pixels in the screen to be displayed, where p is an integer greater than 0, and the p-th frame is a frame after the n-th frame; stopping the display of the first loading page when the pixel values ​​of multiple pixels are not all 0.

[0131] For example, Figure 7 This diagram illustrates a frame loop during the application loading stage according to an embodiment of this application. Figure 7As shown, after the first frame is drawn, the electronic device begins screen detection. If multiple pixels in the screen buffer are found to have values ​​of 0, it is determined that the electronic device is currently displaying a blank screen, and the electronic device can display the first loading page. After the screen detection of the first frame is completed, the electronic device can skip filling the idle time and directly execute the second frame. After the second frame is drawn, the electronic device begins screen detection again. If multiple pixels in the screen to be displayed have values ​​of 0, it is determined that the electronic device is currently displaying a blank screen, and the electronic device can continue displaying the first loading page. After the screen detection of the second frame is completed, the electronic device can directly execute the third frame. After the third frame is drawn and the event 1 input from the second frame is processed, the electronic device begins screen detection again. If multiple pixels in the screen to be displayed have values ​​of 0, it is determined that the electronic device is currently displaying a blank screen, and the electronic device can continue displaying the first loading page. After the screen detection of the third frame is completed, the electronic device can directly execute the fourth frame. The drawing and screen detection methods for the fourth frame follow the same pattern. After the 5th frame is rendered, the electronic device detects that the pixel values ​​of multiple pixels in the screen to be displayed are not all 0. The electronic device can then determine that the first non-blank screen has been rendered, stop displaying the first loading page, and resume the preset frame rate. To ensure a stable frame rate during application runtime, idle time is filled after the 6th frame is detected and before the 7th frame begins rendering, so that the frame rate of the 6th frame and every subsequent frame is the preset frame rate.

[0132] Optionally, to improve application loading speed while avoiding excessive resource consumption, the electronic device can flexibly adjust the sampling rules of this scheme. For example, the electronic device can detect every r frames, every s pixels, or every t seconds, etc., to reduce the total time spent on image detection. Here, r and s are integers greater than 0, and t is a number greater than 0. When detecting images every s pixels, the electronic device can flexibly adjust the sampling rate. Taking detecting every 4 pixels as an example, setting the sampling rate to 1 / 4 means that only one pixel is detected in an adjacent 2*2 pixel block. Similarly, the electronic device can also set the sampling rate to 1 / 9, 1 / 16, etc.

[0133] Due to performance differences between various electronic devices, on some devices with weaker processors, when a frame contains a complex image, the rendering time for that frame may be prolonged, while the idle time may be shortened, potentially insufficient for complete image detection. If image detection continues under these circumstances, the frame's processing time may exceed the preset frame interval (e.g., a preset frame rate of 60 frames per second and a preset frame interval of 16.7 ms), resulting in dropped frames and stuttering. In another scenario, the rendering time of a single frame may exceed the preset frame interval, meaning there is absolutely no idle time within that frame. In this scenario, the actual frame rate of the application is lower than the preset frame rate.

[0134] For example, Figure 8 This illustration shows another application loading stage frame loop provided in an embodiment of this application. Figure 8 (a) in the diagram illustrates the frame cycle under the preset frame rate. Assuming the application enters the game running phase at frame 7, if the loading phase does not include the loading page, the game page will display a blank screen until frame 6 is completed. Taking a preset frame rate of 60 frames per second as an example, before loading optimization, the frame rate is the same in both the loading and running phases, with a preset frame interval of 16.7 ms. The electronic device can calculate the rendering time for each frame from frame 1 to frame 6 as y1, y2, y3, y4, y5, and y6, and the corresponding idle time for each frame as z1, z2, z3, z4, z5, and z6. If the application uses the preset frame rate, then z1 = 16.7 - y1, z2 = 16.7 - y2.

[0135] Assume the time taken for the electronic device to perform one image detection is x. For example... Figure 8 As shown in (b), the electronic device determines the magnitudes of z1 and x based on the rendering time y1 of the first frame. If x < z1, then it refers to... Figure 7 In the illustrated embodiment, image detection is performed directly. If x > z1, image detection is not performed when the first frame finishes rendering. After rendering, the fixed frame interval is canceled, no idle time is reserved, and the second frame is executed directly. At this time, the frame rate of the first frame is higher than the preset frame rate. The electronic device judges the size of z1+z2 and x based on the rendering time y2 of the second frame. If x < z1+z2, then... Figure 7 In the illustrated embodiment, image detection is performed at the end of the second frame rendering. If x > z1 + z2, image detection is not performed at the end of the second frame rendering; the fixed frame interval is canceled after the second frame rendering ends, no idle time is reserved, and the third frame is executed directly. This process continues for the third frame. If similar calculation conditions are still not met, image detection can be performed in the fourth frame; the specific process will not be elaborated here. Figure 8 In the embodiment shown in (b), x < z1 + z2, so image detection is performed after the second frame is drawn.

[0136] like Figure 8 As shown in (b), assuming the rendering time of frame 3 exceeds 16.7ms, and the electronic device executes frame 4 only after frame 3 has finished rendering, then the idle time of frame 3 is z3 = 0, and the idle time of frame 4 is z4 = 16.7 - y4. The electronic device determines the value of z4 and x based on the rendering time of frame 4. If x < z4, a screen check is performed at the end of frame 4 rendering; if x > z4, no screen check is performed at the end of frame 4 rendering, the fixed frame interval is canceled after frame 4 rendering, no idle time is retained, and frame 5 is executed directly. At this time, the frame rate of frame 4 is higher than the preset frame rate. This process continues, and the idle time of frame 5 is then checked. After frame 6 is rendered, when the electronic device performs a screen check, it detects that at least some pixel data in the screen to be displayed is not 0. The electronic device can determine that the main page has been rendered, and at this time, it can stop displaying the preset first loading page and switch to running the target application at the preset frame rate.

[0137] Optionally, detecting that the target application's loading page is blank includes: in the m-th frame of the loading phase, obtaining the number of times the graphics drawing application programming interface (API) is called, where m is an integer greater than 0; when the number of times the graphics drawing API is called is 0, determining that the target application's loading page is blank.

[0138] Optionally, the method may further include: in the q-th frame of the loading phase, obtaining the number of times the graphics drawing API is called, where q is an integer greater than 0, and the q-th frame is a frame after the m-th frame; and stopping the display of the first loading page when the number of times the graphics drawing API is called is not 0.

[0139] Electronic devices can also detect whether a drawing action needs to be performed within a frame before drawing it, and determine whether the loading page of the target application is blank by the presence or absence of drawing action. For example, the electronic device can determine whether there is a drawing action within a frame by counting the number of drawing actions or drawing command calls within a frame. In one implementation, if the number of drawing actions is 0, then no content is drawn in that frame, and the loading page of the target application is determined to be blank. The electronic device then obtains and displays the first loading page. When the electronic device detects that there is a drawing action within a frame, for example, if the number of drawing actions in that frame is greater than 0, then the electronic device has performed a drawing operation in that frame, and the screen is not blank. The loading phase is then determined to be over, and the display of the first loading page is stopped.

[0140] In one implementation, the electronic device determines whether there is a drawing action in a frame by counting the number of drawing command calls made by the target application within that frame. The number of drawing command calls can be the number of times a graphics rendering API is called. If no graphics rendering API is called in a frame (i.e., the call count is 0), it indicates that the game has not drawn any content in that frame, and the screen of that frame is determined to be blank. The electronic device then retrieves and displays the first loading page. When the number of times the target application calls the graphics rendering API in a subsequent frame is greater than 0, it indicates that the target application has performed a drawing operation in that frame, and the screen of that frame is determined to be non-blank. The electronic device has rendered the main page, and the loading phase is determined to be complete. The electronic device can then stop displaying the first loading page. For example, the graphics rendering API can be a Web Graphics Library (WebGL).

[0141] The aforementioned image detection method does not affect the application's processing time per frame. Compared to image detection methods based on pixel values, it offers better application loading speed and can further reduce user loading wait time. The image detection method based on the number of API calls can be executed in every frame during the loading phase and can be flexibly adjusted according to the detection needs of application operators.

[0142] It should be understood that the screen detection method described in the embodiments of this application is merely an example, and the screen detection method is not limited to the above-described manner. Any screen detection method or combination of methods that can be readily conceived by those skilled in the art and is automatically executed by an electronic device should fall within the protection scope of this application.

[0143] When an electronic device detects a blank screen during the loading phase—that is, when it determines that the target application's loading page is blank—it can obtain a first loading page with a uniform style and then display it. This uniformly drawn first loading page can run in a different runtime unit than the application, without consuming frame interval time. This runtime unit can be a thread, a CPU core, or a processor.

[0144] For example, taking a mini-game loading scenario as an example, Figure 9 The diagram illustrates a first loading page drawn by an electronic device according to embodiments of this application. The electronic device can record the acquired first loading page in a database. When an application loads, if the target application's loading page is determined to be blank, at least one of the following first loading pages will be displayed.

[0145] like Figure 9As shown in (a), the content of the first loading page may include a background image 401, a progress bar 402, loading progress indication information 404, the game name, and related text prompts 403. Electronic devices can flexibly arrange these contents to form the first loading page.

[0146] like Figure 9 As shown in (b), electronic devices can dynamically combine the media materials (such as relevant text descriptions, game screenshots, animations, videos, etc.) submitted when the mini-game is launched to form the first loading page.

[0147] like Figure 9 As shown in (c), during the review and approval process for submitting a mini-game, application operators can manually or through automated tools capture the first frame of the mini-game or any frame during gameplay as the first loading page. When the game undergoes version updates or vulnerability patches, the content of the first loading page can also include new gameplay, vulnerability patch information, and advertising content for the game or other games, such as new characters, new skins, limited-time events, or promotional activities. When a user launches the game for the first time or updates the game, the first loading page can also include gameplay, a brief story summary, and introductions to game characters. The first loading page can be a static image or an animated image. The content of the first loading page can be a flexible combination of loading progress indicators, game name, text information, game screenshots, videos, and sound effects.

[0148] Optionally, the images and text displayed on the first loaded page can be shown in full screen, such as... Figure 9 As shown in (c); or, only some pages may display images, such as... Figure 9 As shown in (a) and (b) in the figure.

[0149] In one implementation, the electronic device can provide corresponding sound effects for the first loading page, which can be manually selected by the application operator when the game is launched.

[0150] Optionally, the first loading page can be configured with input controls, such as... Figure 9 As shown in (b), a button control 405 can be added to the first loading page. In response to user actions on the control (e.g., touch or click), different pages can be displayed on the screen of the electronic device. For example, in response to user actions on button control 405, the first loading page begins playing a dynamic promotional video.

[0151] Optionally, the content or format of the first loading page can be uniformly applied to all displays during all game loading stages, or it can be applied only to blank screens. During the game loading stage, the first loading page can be fixed or preset and change multiple times. Electronic devices can set a uniform format or content for the first loading page for all games, or they can set different styles for the first loading page based on game type or other classification methods. For the same game, it is not limited to a fixed first loading page; for example, a different first loading page can be displayed each time the game is launched, or a new first loading page can be displayed when the game is updated.

[0152] It should be understood that the embodiments of this application do not limit the specific content, implementation method, or display method of the first loading page. Any loading page drawn by a game engine is covered within the scope of the embodiments of this application.

[0153] The method of this application embodiment allows the game platform to automatically display a first loading page with a uniform style when the loading page is blank, without requiring developers to adapt it. Furthermore, once the loading phase is complete, the display of this first loading page can be stopped, thus achieving seamless transition between the first loading page and other pages. This method improves loading speed while preventing users from seeing blank screens, contributing to a better user experience.

[0154] It should be noted that when the target application is a game, since the game platform cannot determine whether the game has finished loading, the method in this embodiment uses screen detection to determine that loading is complete when a non-blank screen appears. However, in reality, displaying a non-blank screen in some games does not necessarily mean the loading phase is over. For example, in some scenarios, the loading phase of a game is divided into a first loading phase and a second loading phase. After the first loading phase ends, the game developer sets up a user login page. At this point, the game engine detects the user login prompt on the screen, determines it as a non-blank screen, and stops loading the game at a non-fixed frame rate. However, the main page does not appear at this time. After the user logs in, the game enters the second loading phase, where the frame rate is a preset frame rate.

[0155] In the above embodiments, the electronic device needs to perform multiple screen checks. Furthermore, since the electronic device has difficulty identifying whether a non-blank screen is the main page, this method can only identify the first loading stage. In another embodiment of this application, before the game is released, blank screen detection and loading stage determination are performed by application operators or automated tools.

[0156] For example, application operators can perform sampling before the loading phase. Sampling refers to the process where application operators conduct a series of measurements during the loading phase before the game is released, obtaining sampling data. The electronic device records this sampling data in a database; after detecting that a user has launched the application, the electronic device determines whether to accelerate loading and whether to display the first loading page based on the sampling data. Based on the sampling data, the electronic device performs operations to start and stop acceleration, and to display and retract the first loading page.

[0157] Optionally, the application loading method 300 further includes: before loading the target application at a non-fixed frame rate, obtaining information about a first duration, the first duration being the duration of loading the target application at a non-fixed frame rate; wherein loading the target application at a non-fixed frame rate includes loading the target application at a non-fixed frame rate within the first duration starting from the loading phase.

[0158] Optionally, the application loading method 300 may further include: running the target application at a preset frame rate after the first duration from the start of the loading phase has elapsed.

[0159] For example, the sampling data may include a first duration, which is the duration for loading the target application at a non-fixed frame rate, denoted as 'a' seconds. Taking game loading as an example, the first duration may be the shortest loading time of the target game without filling idle time, as calculated by the application operator after loading acceleration is enabled. The start and end of the game loading phase can be determined by changes in the game display page. In one implementation, for games that do not include a loading page in the loading resources, the application operator can determine whether the game loading has ended by changes in the blank screen. The application operator can record the initial time when the first blank screen appears after the game download is completed, and record the end time when the blank screen disappears; the difference between the two is the first duration 'a' seconds.

[0160] Since it is difficult to accurately determine the loading completion time point during manual measurement, in order to improve the accuracy of the measurement data, the first duration can also be obtained by taking the arithmetic mean of multiple measurements, denoted as a1 seconds. Optionally, other statistical methods can also be used when calculating the average value, such as removing deviation values, weighted averaging, etc. The specific calculation method of the first duration is not limited in the embodiments of this application.

[0161] In one implementation, to save manpower, the initial duration can be calculated using automated tools. For example, application operators can utilize screen detection methods based on the number of API calls, combined with... Figure 6The diagram illustrates the frame loop of the application loading method. During testing of the target game, an automated tool records the duration of each frame, calculates the sum of all frame durations, and obtains the first duration, a2 seconds. Optionally, the electronic device can also utilize the aforementioned method of image detection based on pixel values, combined with... Figure 7 or Figure 8 The application loading method shown calculates the sum of the working time of all frames, and then subtracts the time of all screen detection to obtain the first duration a2 seconds.

[0162] Optionally, the application loading method 300 further includes: before loading the target application at a non-fixed frame rate, obtaining first information, the first information being used to indicate that the loading page of the target application is a blank screen; and during the application loading stage, displaying a first loading page according to the first information.

[0163] Optionally, the application loading method 300 may further include: stopping the display of the first loading page after the first duration from the start of the loading phase has ended.

[0164] Taking game loading as an example, in one implementation, the sampling data can also indicate whether the target game's loading resources include information about a loading page, i.e., whether a blank screen exists during the loading phase. Before a game is released, if application operators or automated tools determine that a game's developers have not pre-set a loading page, then the game's loading phase is considered a blank screen. For example, electronic devices can assign a corresponding mark to each game, recording 0 for no pre-set loading page and 1 for a loading page. If the sampling data indicates that the target game's loading page is a blank screen, then during the loading phase, the electronic device can actively overlay the first loading page onto the game screen. The method and specific details for obtaining the first loading page can be found in [reference needed]. Figure 9 The corresponding textual descriptions will not be repeated here.

[0165] The application operators can adjust the calculation method for the first loading time based on the characteristics of different games. As mentioned earlier, for some games, displaying a non-blank screen does not equate to the end of the loading phase. These games include a first loading phase and a second loading phase, and their loading times differ from the duration of the blank screen. For this type of game, considering that some games may include a loading page in the resources loaded during the second loading phase, the application operators can activate loading acceleration only for the first loading phase. In this case, the first loading time a3 seconds corresponds to the time for loading the target game at a non-fixed frame rate during the first loading phase. During this first loading time a3 seconds, the target game always displays a blank screen. Optionally, to further improve loading speed, the application operators can also load the entire game loading phase at a non-fixed frame rate. In this case, the first loading time a4 seconds corresponds to the total time for the first and second loading phases at a non-fixed frame rate. In this scenario, the application operators can then calculate the duration of the blank screen separately.

[0166] Optionally, the electronic device can also use development and testing experience or historical game data to calculate the loading time and frame rate applicable to most games, and directly set the first j seconds or the first k frames of all game loading stages to use a non-fixed frame rate for loading, and restore the fixed frame rate after j seconds of loading or at the k+1th frame.

[0167] Taking game loading as an example, in one implementation, if the loading page is a blank screen, the sampling data can also be the start frame number and duration of the blank screen during the loading phase. That is, the game displays the first blank screen when frame c is being drawn, and it lasts for a total of d frames. The sampling data can include the end frame number of the blank screen, that is, the game displays the first non-blank screen when frame e is being drawn, where d = ec. The start frame number and duration of the blank screen can be obtained through screen detection methods. For example, the game engine can record the frame corresponding to the first detected blank screen and the frame corresponding to the first non-blank screen, which are frame c and frame e, respectively. c, d, and e are all integers greater than 0, and e is greater than c.

[0168] Figure 10 A flowchart illustrating an application loading method 500 according to this application is shown. The application loading method 500 may include:

[0169] S510: Obtain information about the first duration, which is the duration for loading the target application at a non-fixed frame rate.

[0170] Before the application is released to the app store, the target application is loaded at a non-fixed frame rate to obtain information about the first duration. As mentioned earlier, the first duration can be obtained by application developers or automated tools.

[0171] Optionally, the method 500 may further include: obtaining first information, the first information being used to indicate that the loading page of the target application is a blank screen; and displaying a first loading page according to the first information during the loading phase.

[0172] For example, when the target application's loading page is blank, the first loading page is retrieved and displayed during the loading phase. The method for retrieving the first loading page can be found in [reference needed]. Figure 9 And the corresponding text description.

[0173] S520: In response to the target application entering the loading phase, the target application is loaded at a non-fixed frame rate during the first duration from the start of the loading phase; wherein the frame rate of each frame in the loading phase is determined by the working duration of each frame, and the frame rate of at least one frame in the loading phase is higher than the preset frame rate.

[0174] For specific methods on loading the target application at a non-fixed frame rate, please refer to [link / reference]. Figure 6 Corresponding implementation examples.

[0175] Prior to step S520, the application loading method 500 may further include: detecting that the target application has entered the loading phase.

[0176] Based on the above technical solution, by acquiring loading page data and loading time data in advance, electronic devices can load the target application at a non-fixed frame rate after the application loading stage begins, thereby improving the application loading speed. Furthermore, when the application loading page is blank, the electronic device can display the first loading page without requiring adaptation from the application developer, thus preventing users from seeing a blank screen during the application loading stage and helping to better improve the user's entertainment experience.

[0177] S530: After the first duration from the start of the loading phase, run the target application at a preset frame rate.

[0178] For example, based on the sampled data, after the first duration from the start of the loading phase has ended, the electronic device can determine that the loading phase has ended, and in order to ensure the stable frame rate during application operation, it can switch to running the target application at a preset frame rate.

[0179] Optionally, the method 500 may further include: stopping the display of the first loaded page after the first duration from the start of the loading phase has ended.

[0180] Based on the above technical solution, by acquiring loading page data and loading time data in advance, electronic devices can switch to running the target application at a preset frame rate in a timely manner according to the game loading status, and cancel the display of the first loading page, thus achieving a seamless connection between the first loading page and other game pages. This speeds up loading without affecting the user's operation and visual experience, thereby enhancing the user's overall entertainment experience.

[0181] The following section uses a mini-game as an example to detail the steps of the application loading method 500 in this application. Figure 11 This diagram illustrates a game startup phase flowchart corresponding to an embodiment of this application and method 500. For example... Figure 11 As shown, game platform 11 is used to display a list of mini-games and provide game entry points; game engine 12 is integrated into game platform 11 and is responsible for rendering game graphics and executing game code. First application 13 may include game content or game framework, coded by the game developer; alternatively, first application 13 may be stored on an electronic device. Taking a mini-game as an example, first application 13 may be a code file downloaded from the network, which may include game scripts and all other key information in the game, such as game character attributes, game scenes or environments, game map layout, game progress, etc. Game scripts are crucial for game logic and interaction, responsible for controlling character movement, enemy behavior, item generation, level design, collision detection, and other aspects. Game engine 12 reads the carrier file of first application 13 and executes the game script to respond to user operations and handle events.

[0182] The following steps 501 to 508, based on the interaction process between the game platform 11, the game engine 12, and the first application 13, provide a detailed description of the application loading method 500 of this application. The target game startup phase may include, but is not limited to, the following:

[0183] 501: User action to launch the target game was detected.

[0184] Game platforms can display multiple game entry points for users to launch games. Different game platforms may have different game launch methods, such as touch, click, or shake.

[0185] 502: Responding to the target game's launch operation, load the target game's resources according to the operation.

[0186] Optionally, before the game enters the loading phase, the target game startup phase also includes a code package download phase. After the game platform receives the user's startup command, it downloads the corresponding game code package from the server using the game engine built into the platform, including downloading game content and checking for game updates.

[0187] 503: Based on the first preset condition, start loading acceleration.

[0188] Optionally, the first preset condition may include information about the first duration.

[0189] As mentioned earlier, before a game is released, the game platform can manually or using automated tools to obtain sampling data. Based on game characteristics and empirical values, the game platform can preset a first condition for initiating loading acceleration. After the preset is completed, the game engine executes this first condition during the game loading phase. For example, in one embodiment, the first condition can be that for a first period of time after the game enters the loading phase, the game engine runs loading acceleration, adjusting the game's frame rate to a non-fixed frame rate to improve the loading speed of the game during the loading phase; after the first period of time from the start of the loading phase ends, the game engine stops acceleration and runs the game at the preset frame rate.

[0190] Optionally, the first preset condition may include information about the frame that initiates acceleration and the frame that terminates acceleration.

[0191] For example, the first preset condition may include information from frame 1 and frame 5, where frame 1 is the frame that initiates acceleration and frame 5 is the frame that ends acceleration. After detecting that the user has launched the target game, the game engine can start loading the game from frame 1 at a non-fixed frame rate; after frame 5, it switches to running the game at a fixed frame rate.

[0192] 504: Based on the second preset condition, the first loading page is displayed.

[0193] For example, if the sampling data indicates that the game developer has not pre-set a loading page, the game loading page will be blank, and the game platform will display the first loading page.

[0194] For example, the second preset condition may include a second duration for displaying the first loading page. For instance, the game engine may display the first loading page within a second duration starting from the game loading phase. Optionally, multiple first loading pages may be prepared and stored in a database before the game is released. Different first loading pages may be displayed at the 0th and 5th seconds of game loading.

[0195] For example, the first duration and the second duration can be the same.

[0196] For example, the second preset condition may include information about the start and end frames of the blank screen. For instance, the second preset condition may include information about frame 1 and frame 5, where frame 1 is the start frame of the blank screen and frame 5 is the end frame of the blank screen. After detecting that the user has launched the target game, the electronic device can start displaying the first loading page from frame 1 and stop displaying the first loading page at the end of frame 5.

[0197] Optionally, the order of steps 503 and 504 can be adjusted depending on different preset conditions. That is, the game engine can also display the first loading page first and then start loading acceleration.

[0198] It should be noted that if the game developer has already pre-configured the loading page, this step 504 can be omitted.

[0199] 505: Loading the target game at a non-fixed frame rate.

[0200] During the game loading phase, the game engine loads the game frame by frame, executing game scripts, handling game events, and rendering game visuals on a frame-by-frame basis. The game loading phase in this embodiment uses a non-fixed frame rate; the specific loading method can be found above. Figure 6 The example shown.

[0201] 506: Based on the first preset condition, the loading acceleration is terminated.

[0202] For example, the first preset condition may include information about a first duration. The first preset condition may be set to end non-fixed frame rate loading and run the game at a fixed frame rate after the first duration from the start of the game loading phase.

[0203] Optionally, the game platform can also set different end times for the first launch and subsequent launches of the game on a new device. For example, if there is a lot of content to load on the first launch, the loading acceleration step can end after the game has loaded for g seconds; on subsequent launches, the loading acceleration step can end after the game has loaded for h seconds, where h is less than g and both h and g are greater than 0.

[0204] Considering the differences in processor performance across electronic devices, the loading time of a game may vary on different devices. In one implementation, to ensure game acceleration, a certain delay can be made after the game has loaded for the initial set time before resuming the preset frame rate. This delay can be 2 or 3 seconds, without affecting the user experience.

[0205] In one implementation, the first preset condition may include information about the end of the loading acceleration of the frame.

[0206] For example, the first preset condition may include information from frames 1 and 5, where frame 1 is the frame that initiates acceleration and frame 5 is the frame that ends acceleration. After detecting that the user has launched the target game, the game engine runs the game at a fixed frame rate after frame 5.

[0207] 507: Remove the first loading page based on the second preset condition.

[0208] For example, the second preset condition could be the time when the first loading page is removed. For instance, based on a first duration in the sampled data, the first loading page could be removed after a first duration from the start of the game loading phase.

[0209] For example, the second preset condition could be removing the frame of the first loading page. For instance, based on the fact that the blank screen ends at frame e in the sampling data, the first loading page could be removed after the game finishes rendering at frame e.

[0210] Optionally, the order of steps 506 and 507 can be adjusted depending on different preset conditions. That is, the game engine can remove the first loading page first and then end the loading acceleration.

[0211] Similar to step 504, step 507 can be omitted if the game developer has already preset the loading page.

[0212] In one implementation, the frame loop shown in step 505 may include steps 503, 504, 506, and 507. For example, the game loading process of some games may also include pages such as user login, account verification, and privacy notifications. Based on these intermediate pages, the game engine can flexibly adjust the execution order of each step. For games without pre-set loading pages, when the user login page is included in step 505, the game engine determines that the screen is not blank, but the loading process is not yet complete. In this case, the loop of step 505 includes step 507, meaning that the game engine has removed the first loading page before the loading phase ends.

[0213] 508: The main page is displayed.

[0214] Displaying the game's main page indicates that the game has entered the running phase, and users can operate normally.

[0215] Optionally, without affecting user operation, step 506 can also be performed after step 508, that is, the fixed frame rate is restored after the main page is displayed.

[0216] It should be noted that the order of steps in the embodiments of this application is only an example, and those skilled in the art can flexibly adjust the order of each step according to the actual situation.

[0217] Optionally, the sampling data may also include the game's original loading time at a fixed frame rate, denoted as i seconds. By comparing the first duration with the original loading time of i seconds, the acceleration effect of a game can be determined and statistically analyzed. This data can be compiled into a database or used for product promotion, etc.

[0218] In one implementation, the game platform can set a threshold based on data such as game launch time and historical user retention rate. This threshold can be used to determine whether to accelerate game loading. In another implementation, the threshold can be time. When the original loading time exceeds the threshold, loading acceleration is activated for the game's loading phase. In this case, the game's launch steps can refer to those described in this application. Figure 11 The illustrated embodiment states that when the original loading time is less than or equal to a threshold, it is considered that the game developer has optimized the loading phase, and the user can accept the original loading time without needing to enable loading acceleration. In another implementation, the threshold can be the ratio of a first duration to the original loading time of i seconds. For example, assuming the threshold is 70%, when the ratio of the first duration to the original loading time of i seconds is higher than 70%, it is considered that the game loading acceleration effect is average and has little impact on the user experience, so loading acceleration can be omitted; when the ratio of the first duration to the original loading time of i seconds is lower than 70%, it is considered that the game loading acceleration method has achieved a good optimization effect, and loading acceleration steps are initiated for the game's loading phase.

[0219] The method in this application embodiment does not require frequent screen detection during the loading process. By moving the screen detection and loading acceleration judgment steps forward to before the application is released, it solves the problem that electronic devices cannot accurately identify when the game loading stage ends, thereby improving the user experience.

[0220] In the above embodiments, since the electronic device cannot determine the node where loading is complete, the node where loading ends can be determined by screen detection results or by the game platform based on sampled data. To enable the electronic device to accurately determine the start and end markers of loading acceleration and the nodes for displaying and removing the first loading page, this application provides another application loading method. Taking the loading process of a game application as an example, this application loading method requires the game developer to set the API call nodes when writing the first application.

[0221] In this embodiment, the game engine may include, but is not limited to, providing the following APIs to game developers, with each API corresponding to the following functions:

[0222] API 1: Accelerates startup loading, does not fix the game's frame rate, and does not retain idle time for each frame;

[0223] API 2: End loading acceleration, run the game at a preset frame rate, and stabilize the screen refresh rate;

[0224] API 3: Display the first loading page, which is set by the game platform to cover the blank screen during the game loading phase;

[0225] API 4: Removes the first loading page shown in API 3 to reveal the game's main page.

[0226] The game engine can provide game developers with documentation and usage methods for the above APIs. These methods can include API definitions, descriptions, and sample code. Game developers know whether the game has a built-in loading page and at what step the game script executes the loading phase. Therefore, after the game starts, game developers can choose the appropriate time to call different APIs through the first application 13. Upon receiving the API call request, the game engine can execute the corresponding operation steps. Therefore, the game loading method in this embodiment of the application achieves loading acceleration and the display and removal of the first loading page by calling APIs.

[0227] Figure 12 A flowchart of an application loading method 600 according to this application is shown. The application loading method 600 may include:

[0228] S610: Send a third instruction to the first application, which is used to instruct the first frame of the drawing loading phase.

[0229] S620: Receive a fourth instruction sent by the first application, which instructs to accelerate the loading phase.

[0230] When the electronic device receives the fourth instruction sent by the first application, it determines that the target application has entered the loading phase.

[0231] Optionally, the method 600 may further include: receiving a first instruction sent by a first application, the first instruction being used to instruct the display of a first loading page; and displaying the first loading page according to the first instruction. The method for obtaining the first loading page can be referred to the above. Figure 9 The corresponding implementation examples and textual descriptions will not be repeated here.

[0232] S630: Load the target application at a non-fixed frame rate according to the fourth instruction.

[0233] Once the target game enters the loading phase, the frame rate for each frame is determined by the duration of each frame, and at least one frame during this loading phase will have a frame rate higher than the preset frame rate. For methods of loading the target game with a non-fixed frame rate, please refer to [link / reference]. Figure 6 The example shown.

[0234] Based on the above method, the electronic device can load the target application at a non-fixed frame rate after the loading stage begins, according to the instructions of the first application, and display the first loading page in a timely manner. This improves the loading speed of the application and avoids users seeing blank screens during the loading stage, thus helping to improve the user's entertainment experience.

[0235] S640: Receives a fifth instruction sent by the first application, which instructs the loading phase to stop accelerating.

[0236] When the electronic device receives the second instruction sent by the first application, it determines that the loading phase of the target game has ended.

[0237] Optionally, the method 600 may further include: receiving a second instruction sent by a first application, the second instruction being used to instruct the display of a first loading page to be stopped; and stopping the display of the first loading page according to the second instruction.

[0238] S650: Run the target application at a preset frame rate according to the fifth instruction.

[0239] Based on the above method, the electronic device can switch to running the target application at a preset frame rate in a timely manner according to the instructions of the first application, and stop displaying the first loading page, thereby improving the loading speed of the application during the loading stage and realizing the connection between the first loading page and other pages. This does not affect the user's operation and visual experience during the running stage, and helps to better enhance the user's overall entertainment experience.

[0240] The following section uses a mini-game as an example to detail the steps of the application loading method 600 in this application. Figure 13 This diagram illustrates a game startup phase corresponding to an embodiment of this application and method 600. Steps 601 to 609 below provide a detailed description of the game loading method 600 of this application based on the interaction process between the game platform 11, the game engine 12, and the first application 13. This game startup phase may include, but is not limited to, the following:

[0241] 601: User action to launch the target game was detected.

[0242] A gaming platform can display multiple game entry points for users to launch the game. Different gaming platforms may have different launch methods, such as touch, click, or shake.

[0243] 602: Responds to the target game's launch operation and loads the target game's resources accordingly.

[0244] Optionally, before the game enters the loading phase, the target game startup phase also includes a code package download phase. After the game platform receives the user's startup command, it downloads the corresponding game code package from the server using the game engine built into the platform, including downloading game content and checking for game updates.

[0245] 603: Execute the game script and draw the first frame.

[0246] According to the existing game engine API call process, it is not possible to directly call the game engine's API before the game runs. The execution of the game script requires the game engine to trigger it, and subsequent API call steps can only be performed after the game starts running.

[0247] 604: Application 13 called API 1 to instruct Game Engine 12 to start loading faster.

[0248] When designing the first application 13, game developers can determine at what moment or in which frame the game enters the loading phase. Therefore, the first application 13 can select a node after the game script executes to call API 1 to the game engine, loading the remaining frames at a non-fixed frame rate, thereby improving the loading speed of the game during the loading phase.

[0249] In one implementation, this step may further include the following: Game engine 12 receives the call request for API 1 and returns the call result to first application 13. Based on the call result, first application 13 can determine whether the call request for API 1 was successful. If the request fails, first application 13 can analyze the reason for failure based on the status code in the call result and handle the corresponding error.

[0250] 605: The first application 13 calls API 3 to instruct the game engine 12 to display the first loading page.

[0251] If the first application 13 does not preset a loading page during the loading phase, it can choose to call API 3 to instruct the game engine to display the first loading page. For details on how to determine and the content of the first loading page, please refer to [link / reference needed]. Figure 9 The corresponding content.

[0252] Optionally, the order of steps 604 and 605 can be adjusted, meaning the game engine can display the first loading page first, and then start loading acceleration.

[0253] Optionally, if the target game's loading resources include a loading page and do not require game platform rendering, step 605 can be omitted.

[0254] 606: Game Engine 12 loads the remaining frames at a non-fixed frame rate.

[0255] Step 606 runs the remaining frames of the game loading phase. Game Engine 12 responds to the API 1 call request. This loading phase uses a non-fixed frame rate. For methods of loading the target game at a non-fixed frame rate, please refer to [link / reference]. Figure 6 The example shown.

[0256] 607: The first application 13 determines that the loading phase has ended.

[0257] Application 13 can determine the node where loading ends. When the game script runs to this step, it can draw the main page, indicating that the loading phase has ended.

[0258] 608: The first application 13 calls API 2 to instruct the game engine 12 to end the loading acceleration.

[0259] When Application 13 determines that the loading phase has ended or that a stable screen refresh rate needs to be matched after a certain point in the game, it calls API 2 to run the target game at a preset frame rate.

[0260] 609: The first application 13 calls API 4 to instruct the game engine 12 to remove the first loading page.

[0261] After the first application 13 determines that the loading phase is over, it needs to call API 4 again to instruct the game engine 12 to remove the first loading page displayed in step 605.

[0262] Optionally, if the target game's loading resources include a loading page, do not require game platform rendering, and do not call API 3, then step 609 is omitted.

[0263] Optionally, the order of steps 608 and 609 can be adjusted, meaning the game engine can remove the first loading page first and then end the loading acceleration.

[0264] In one implementation, the frame loop shown in step 606 may include steps 604, 605, 608, and 609. The steps in this embodiment are merely examples, and the first application 13 can adjust the timing and order of API calls according to the game logic.

[0265] 610: Display the main page.

[0266] Displaying the game's main page indicates that the game has entered the running phase and users can play normally.

[0267] The method in this embodiment determines when to start and stop loading acceleration, and whether to display and remove the first loading page, using the first application 13. The first application 13 can autonomously select when to display and remove the first loading page and when to start and stop loading acceleration by calling APIs, thereby achieving precise control over game loading acceleration and loading page display, and improving the game's loading speed during the loading phase.

[0268] It should be noted that the specific implementation methods of the above game loading methods are only examples. Those skilled in the art can flexibly adjust the running order of each step according to the actual situation, and can also split or combine the methods in different implementation methods.

[0269] The following will combine Figure 14and Figure 15 The apparatus provided in the embodiments of this application is described in detail. It should be understood that the description of the apparatus embodiments corresponds to the description of the method embodiments. Therefore, for content not described in detail, please refer to the method embodiments above. For the sake of brevity, it will not be repeated here.

[0270] Figure 14 A schematic diagram of an application loading apparatus 900 provided in this application embodiment is depicted. The application loading apparatus 900 includes a processing unit 910 and a storage unit 920. The storage unit can be used to store instructions and / or data, and the processing unit 910 can read the instructions and / or data from the storage unit 920 to enable the application loading apparatus to perform the relevant actions executed by the electronic device in the aforementioned method embodiments. The application loading apparatus 900 can be a component of an electronic device; for example, the application loading apparatus 900 can also be a chip or integrated circuit in the electronic device.

[0271] It should be understood that the specific process of each unit performing the above-mentioned corresponding steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0272] Figure 15 This application provides a schematic diagram of the structure of an electronic device 1000 that can be used for application loading. The electronic device 1000 includes at least one processor 1010, at least one memory 1020, and at least one communication bus 1030. The communication bus 1030 is used to enable communication between these components. The electronic device 1000 also includes a user interface 1040 for connecting display devices (e.g., monitors, touchscreens, LCDs, holographic imaging, or projectors) and input devices (e.g., keyboards, mice, trackballs, game controllers, touchpads, or touchscreens).

[0273] Memory 1020 is used to store instructions and provide instructions and data to processor 1010. Memory 1020 can be volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM). For example, RAM can be used as an external cache. By way of example and not limitation, RAM includes a variety of forms, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). The memory described herein includes, but is not limited to, these and any other suitable types of memory.

[0274] It should be noted that the memory 1020 can be coupled to the processor 1010 through an interface, or it can be integrated with the processor 1010.

[0275] In some implementations, memory 1020 stores executable modules or data structures, or subsets thereof, or extended sets thereof:

[0276] Operating system 1021 contains various system programs, such as Figure 2 The application framework layer, system library, kernel layer, etc. shown are used to implement various basic business functions and handle hardware-based tasks.

[0277] Application module 1022 contains various applications, such as Figure 2 The camera, gallery, games, chat, music, video, etc. shown are used to realize various application services.

[0278] In this embodiment of the application, by calling the program or instructions stored in the memory 1020, the processor 1010 can read the instructions and / or data in the memory 1020 so that the electronic device 1000 can perform the relevant actions performed by the electronic device in the aforementioned method embodiments.

[0279] This application also provides a program product (also referred to as a computer program product), which, when run on a device, causes the device to execute any of the application loading methods described above. Its implementation principle and technical effects are similar to those of the related embodiments described above, and will not be repeated here.

[0280] This application provides a readable storage medium (also known as a computer-readable storage medium) containing instructions that, when executed on a device, cause the device to perform any of the application loading methods described in the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.

[0281] This application provides a chip including circuits that can be used to execute any of the application loading methods described in the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.

[0282] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0283] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.

[0284] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0285] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0286] If the above functions are implemented as software functional units and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0287] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An application loading method characterized by comprising: The method is applied to an electronic device, and the method comprises: detecting that a target application enters a loading stage; in response to the target application entering the loading stage, loading the target application at a non-fixed frame rate, wherein a frame rate of each frame in the loading stage is determined by a working duration of the each frame, and a frame rate of at least one frame in the loading stage is higher than a preset frame rate.

2. The application loading method according to claim 1, wherein The method further comprises: in the loading stage, detecting that a loading page of the target application is a blank screen, obtaining a first loading page; displaying the first loading page.

3. The application loading method according to claim 2, wherein The detection that the loading page of the target application is a blank screen comprises: in an n-th frame in the loading stage, obtaining pixel values of a plurality of pixel points in a to-be-displayed screen, wherein n is an integer greater than 0; when the pixel values of the plurality of pixel points are all 0, determining that the loading page of the target application is a blank screen.

4. The application loading method according to claim 3, wherein The method further comprises: in a p-th frame in the loading stage, obtaining pixel values of a plurality of pixel points in a to-be-displayed screen, wherein p is an integer greater than 0; when the pixel values of the plurality of pixel points are not all 0, stopping displaying the first loading page, wherein the p-th frame is a frame after the n-th frame.

5. The application loading method of claim 2, wherein The detection that the loading page of the target application is a blank screen comprises: in an m-th frame in the loading stage, obtaining a number of times of calling a graphics drawing application programming interface (API), wherein m is an integer greater than 0; when the number of times of calling the graphics drawing API is 0, determining that the loading page of the target application is a blank screen.

6. The application loading method according to claim 5, wherein The method further comprises: in a q-th frame in the loading stage, obtaining a number of times of calling a graphics drawing API, wherein q is an integer greater than 0; when the number of times of calling the graphics drawing API is not 0, stopping displaying the first loading page, wherein the q-th frame is a frame after the m-th frame.

7. The application loading method of claim 1, wherein The method further comprises: before the loading of the target application at the non-fixed frame rate, obtaining first information, the first information being used to indicate that a loading page of the target application is a blank screen; in the loading stage, displaying a first loading page according to the first information.

8. The application loading method according to Claim 7, wherein The method further comprises: before the loading of the target application at the non-fixed frame rate, obtaining information of a first duration, the first duration being a duration of the loading of the target application at the non-fixed frame rate; wherein the loading of the target application at the non-fixed frame rate comprises: in the first duration from the start of the loading stage, loading the target application at the non-fixed frame rate.

9. The application loading method according to claim 8, wherein The method further comprises: after the end of the first duration from the start of the loading stage, stopping displaying the first loading page.

10. The application loading method according to claim 8 or 9, wherein The method further comprises: after the end of the first duration from the start of the loading stage, running the target application at the preset frame rate.

11. The application loading method of claim 1, wherein, The method further comprises: receiving a first instruction sent by a first application, the first instruction being used to indicate displaying a first loading page; displaying the first loading page according to the first instruction.

12. The application loading method according to Claim 11, wherein The method further comprises: receiving a second instruction sent by the first application, the second instruction being used to indicate stopping displaying the first loading page; According to a second instruction, stop displaying the first loading page.

13. The application loading method according to any one of claims 1, 11 or 12, wherein, The method further includes: sending a third instruction to the first application, the third instruction being used to instruct to draw a first frame of the loading stage; receiving a fourth instruction sent by the first application, the fourth instruction being used to instruct to accelerate the loading stage; wherein the loading of the target application at a non-fixed frame rate includes: loading the target application at a non-fixed frame rate according to the fourth instruction.

14. The application loading method according to Claim 13, wherein The method further includes: receiving a fifth instruction sent by the first application, the fifth instruction being used to instruct to stop accelerating the loading stage; running the target application at the preset frame rate according to the fifth instruction.

15. An electronic device, comprising: The electronic device includes: one or more processors; one or more memories; and one or more programs, wherein the one or more programs are stored in the one or more memories, and the one or more programs include instructions that, when executed by the one or more processors, cause the electronic device to perform the application loading method according to any one of claims 1 to 14.

16. A readable storage medium, characterized by, The readable storage medium stores a program or instructions, and when the program or instructions are executed, the application loading method according to any one of claims 1 to 14 is implemented.

17. A chip, characterized by The chip includes a circuit for executing the application loading method according to any one of claims 1 to 14.

18. A program product, characterized by The program product stores a program or instructions, and when the program or instructions are executed, the application loading method according to any one of claims 1 to 14 is implemented.