Display method, electronic device, and readable medium

By cache memory attribute information when the electronic device is powered on and only obtaining cached values ​​when the application is running, the problem of sliding lag in the browser or shopping application of electronic devices is solved, which significantly reduces the time-consuming of rendering threads.

WO2025130054A1PCT designated stage expired Publication Date: 2025-06-26HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/109741
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-18
Filing Date
2024-08-05
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

When users enter the interface of electronic device browsers or shopping applications, sliding lags often occur. This is mainly because the rendering thread continuously runs the WebViewFunctor::drawVk function, which frequently reads memory attribute information.

Method used

By obtaining the memory attribute information and cache it when the electronic device is powered on and started, only the cache value is obtained during the operation of the browser or shopping application, the number of times the memory attribute information is read is reduced and the long-term consumption of the rendering thread is avoided.

Benefits of technology

It effectively reduces the time-consuming operation of the rendering thread in running the WebViewFunctor::drawVk function, and avoids the sliding lag of users when inputting operations on the application interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024109741_26062025_PF_FP_ABST
    Figure CN2024109741_26062025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a display method, an electronic device, and a readable medium. The display method comprises: receiving a first operation of a user for starting a first application; acquiring first information and attribute information of a memory, and display an interface of the first application on the basis of the first information and the attribute information of the memory; within a first period of time after the user exits the first application, receiving a second operation of the user for starting the first application; and acquiring second information, and displaying the interface of the first application on the basis of the second information. The input of a first operation by a user initiates cold start of a first application, the input of a second operation by the user within a period of time after the user exits the first application does not initiate cold start of the first application, and an electronic device will not read attribute information of a memory without the cold start of the first application, such that the number of times the attribute information of the memory is read is reduced, and the time consumed when a render thread continuously runs a WebViewFunctor::drawVk function is shortened, thereby avoiding sliding lagging of the electronic device when the user inputs an operation on an application interface.
Need to check novelty before this filing date? Find Prior Art

Description

Display method, electronic device, and readable medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on December 18, 2023, with application number 202311750058.3 and invention name “Display method, electronic device and readable medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of display technology, and in particular to a display method, electronic device, computer program product, and computer-readable storage medium. Background Art

[0003] Currently, when users use the browser or shopping applications of electronic devices, the electronic devices may experience sliding and lag problems.

[0004] Research has found that when an electronic device launches and runs a browser or shopping app, in response to a user's swiping gesture on the app's interface, the browser or shopping app's rendering thread runs to update the displayed interface. This rendering thread continuously executes the WebViewFunctor::drawVk function, which takes a long time, leading to lag issues with scrolling.

[0005] Further research also found that the reason why the rendering thread takes a long time to continuously run the WebViewFunctor::drawVk function is that the electronic device reads the attribute information of the memory multiple times.

[0006] Summary of the Invention

[0007] The present application provides a display method, electronic device, computer program product and computer-readable storage medium, the purpose of which is to avoid the phenomenon of sliding and lag in the electronic device when the user inputs operations on the application interface.

[0008] In order to achieve the above objectives, this application provides the following technical solutions:

[0009] In a first aspect, the present application provides a display method, comprising: receiving a first operation of a user to start a first application; in response to the first operation, obtaining first information and attribute information of the memory, and displaying the interface of the first application based on the first information and the attribute information of the memory; within a first time period after the user exits the first application, receiving a second operation of the user to start the first application; in response to the second operation, obtaining second information, and displaying the interface of the first application based on the second information.

[0010] Among them, the user inputting the first operation to start the first application can be understood as a cold start of the first application. The electronic device responds to the first operation and needs to obtain the first information and the attribute information of the memory before displaying the interface of the first application. The user exits the first application for a period of time and then inputs the second operation to start the first application, which can be understood as a warm start or hot start of the first application, not a cold start of the first application. The electronic device responds to the second operation and only obtains the second information before displaying the interface of the first application, without the need to obtain the attribute information of the memory. From this, it can be seen that: the electronic device will read the attribute information of the memory only when the electronic device cold-starts the first application. If the first application is not started in a cold-start manner, the attribute information of the memory will not be read, which can reduce the number of times the attribute information of the memory is read, and reduce the time consumed by the rendering thread to continuously run the WebViewFunctor::drawVk function, thereby avoiding the phenomenon of sliding and freezing of the electronic device when the user inputs operations on the application interface.

[0011] In a possible implementation, the first information and the second information are associated information of an interface displaying the first application.

[0012] In one possible implementation, before obtaining the first information and the attribute information of the memory, the method further includes: determining that a process needs to be started during the startup of the first application. The need to start a process during the startup of the first application indicates that the first application is a cold start.

[0013] In a possible implementation, before obtaining the second information, the method further includes: determining that no process needs to be started during the startup of the first application. The fact that no process needs to be started during the startup of the first application indicates that the first application is not cold started.

[0014] In one possible embodiment, it also includes: receiving a third operation input by the user in the interface of the first application, the third operation is used to switch the interface of the first application; in response to the third operation, obtaining third information, and displaying the switched interface of the first application based on the third information, the third information is associated information for displaying the switched interface of the first application.

[0015] In the above possible implementation, the user inputs the third operation in the interface of the first application to switch the display interface. The electronic device only obtains the third information and does not obtain the attribute information of the memory, which also reduces the number of times the attribute information of the memory is read, and further reduces the time consumed by the rendering thread to continuously run the WebViewFunctor::drawVk function, thereby avoiding the phenomenon of sliding and freezing of the electronic device when the user inputs operations in the application interface.

[0016] In one possible implementation, obtaining the first information and the attribute information of the memory includes: obtaining the cached value of the first information and the attribute information of the memory. The cached value of the attribute information of the memory is different from the attribute information of the memory. The electronic device obtains the cached value of the attribute information of the memory without calling multiple functions to read parameters such as the available memory heap and memory type. In this way, the time it takes for the electronic device to obtain the cached value of the attribute information of the memory once is much less than the time it takes to obtain the attribute information of the memory once. It also reduces the time it takes for the rendering thread to continuously run the WebViewFunctor::drawVk function, thereby avoiding the phenomenon of sliding and freezing of the electronic device when the user inputs operations on the application interface.

[0017] In one possible implementation, the time taken to obtain the cache value of the attribute information in the memory is at the microsecond level.

[0018] In a possible implementation, during the process of obtaining the cache value of the attribute information of the memory, the electronic device does not call a function to read the parameters stored in the register.

[0019] In a possible implementation, when the cache value of the attribute information in the memory is enabled by the electronic device, it is saved in the form of a variable.

[0020] In one possible implementation, obtaining the first information and the attribute information of the memory includes: when a graphics processor driver of the electronic device receives an interface display task through a three-dimensional graphics processing library Vulkan, obtaining the first information and the attribute information of the memory.

[0021] In a second aspect, the present application provides an electronic device comprising: one or more processors, a memory, and a display screen; the memory and the display screen are coupled to one or more processors, the memory is used to store a computer program, the computer program includes computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the display method provided in any one of the first aspect and its possible implementation methods.

[0022] In a third aspect, the present application provides a computer-readable storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the display method provided in the first aspect and any one of its possible implementation methods.

[0023] In a fourth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the display method provided in any one of the first aspect and possible implementations thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a software structure diagram of an electronic device provided in an embodiment of the present application;

[0025] FIG2 is an interactive diagram of a method for obtaining attribute information of an electronic device memory during a first application startup process provided by an embodiment of the present application;

[0026] FIG3 is a flowchart of a method for displaying an interface of a first application provided in an embodiment of the present application;

[0027] FIG4 is a hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and claims of this application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless the context clearly indicates otherwise.

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

[0030] The "multiple" involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first" and "second" are only used for the purpose of distinguishing the description and cannot be understood as indicating or implying relative importance or order.

[0031] Currently, when users use the browser or shopping applications of electronic devices, the electronic devices may experience sliding and lag problems.

[0032] Research has found that when an electronic device launches and runs a browser or shopping app, in response to a user's swiping gesture on the app's interface, the browser or shopping app's rendering thread runs to update the displayed interface. This rendering thread continuously executes the WebViewFunctor::drawVk function, which takes a long time, leading to lag issues with scrolling.

[0033] Further analysis shows that:

[0034] The main thread of the browser or shopping app creates a view and calls the WebViewFunctor::drawVk function of the Webview through the rendering thread. The reason why the WebViewFunctor::drawVk function takes a long time is that when the electronic device responds to the user's sliding operation on the application interface and updates the display interface content, the GetPhysicalDeviceMemoryProperties2 function will be called repeatedly. For example, statistics show that within 10 seconds, the GetPhysicalDeviceMemoryProperties2 function was called 51 times, with the maximum call time of 49ms and the minimum call time of 14ms. When the GetPhysicalDeviceMemoryProperties2 function is called and executed, Chrome_InProGp is ​​required to run. The Chrome_InProGp run will wake up WebViewFunctor::drawVk. WebViewFunctor::drawVk takes 186ms, reaching the level of severe lag.

[0035] The GetPhysicalDeviceMemoryProperties2 function is called to read memory properties to support applications requesting memory based on these properties. However, the memory properties of electronic devices are set at the factory and remain unchanged. Therefore, there's no need to repeatedly read these properties during the operation of browsers or shopping apps.

[0036] Based on this, in order to solve the problem of scrolling lag when running a browser or shopping application on an electronic device, the embodiments of the present application provide the following two solutions:

[0037] 1. When the electronic device is powered on, the attribute information of the electronic device's memory is obtained and cached. When the browser or shopping application is running, the electronic device obtains the cached value.

[0038] 2. Reduce the number of times the electronic device's memory attribute information is retrieved. When the browser or shopping app is cold-started, the electronic device reads the memory attribute information once. When the browser or shopping app is hot-started or warm-started, the memory attribute information is not read.

[0039] To introduce the above two methods provided in the embodiments of the present application in detail, the following description is made in conjunction with the functional modules in the software structure of the electronic device.

[0040] First, let's discuss the software structure of electronic devices. This can be thought of as the layered architecture of their operating systems. These operating systems run on their hardware components and can include iOS, the open-source Android operating system, and Windows.

[0041] The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.

[0042] FIG1 is a block diagram of the software structure of the electronic device according to an embodiment of the present application.

[0043] A layered architecture divides software into several layers, which communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: application layer, application framework layer, Android runtime and system library, hardware abstraction layer, and kernel layer.

[0044] The application layer can include multiple applications. For example, Figure 1 shows two applications: a browser and a shopping application.

[0045] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer shown in Figure 1 includes a view system. In some embodiments, the view system can be used to build applications and includes visual controls, such as controls for displaying text and images. The functions of the view system during the execution of the above two solutions by the electronic device are described below.

[0046] The system library can include multiple functional modules. For example, Figure 1 shows Hwui, a 3D graphics processing library (such as Vulkan), and Webview. In some embodiments, Hwui is a hardware-accelerated UI for 2D drawing; Hwui primarily uses Vulkan for GPU hardware drawing; Vulkan is used to implement 3D graphics drawing, image rendering, compositing, and layer processing; Webview is used to display web pages. When an electronic device executes the above two solutions, the functions of Hwui, Vulkan, and Webview can be seen in the following content.

[0047] The hardware abstraction layer includes at least the device development kit (DDK) of the graphics processing unit (GPU), which can be referred to as GPU DDK.

[0048] The kernel layer at least includes the graphics processor driver (GPU Driver).

[0049] The following uses a browser application as an example to describe how the view system, Hwui, Vulkan, WebView, GPU DDK, and GPU Driver work together to obtain cached values ​​of electronic device memory attribute information during the browser application's operation.

[0050] As shown in FIG2 , the method for obtaining attribute information of the memory of an electronic device includes:

[0051] S101: The browser application receives a start-up operation from a user.

[0052] In some embodiments, the user can start the browser application by clicking the browser application icon, or clicking the browser application interface in the multitasking management interface, voice wake-up, etc. The browser application can receive the user's start operation.

[0053] S102: The browser application responds to the user's startup operation and calls the interface transmission interface display task of Webview through the view system, Hwui, and Vulkan.

[0054] The user starts the browser application, and the display screen of the electronic device displays the interface of the browser application. Based on this, the browser application can send the interface display task to the lower-level module. In some embodiments, the browser application can send the interface display task by sending instructions to the lower-level module.

[0055] The browser application issues an interface display task to the view system. Upon receiving the interface display task, the view system can issue the task to Hwui. In some embodiments, the view system can issue the interface display task to Hwui by calling the libhwui.so database. In other embodiments, the view system can also create the browser application interface after receiving the interface display task.

[0056] Based on the aforementioned electronic device's software architecture, Hwui primarily uses Vulkan for GPU hardware drawing. Based on this, upon receiving an interface display task, Hwui can send it to Vulkan. In some embodiments, the libhwui.so database calls the libwebviewchromium.so database via Vulkan to transfer the interface display task, thereby enabling Hwui to send the interface display task to Vulkan, and then, via Vulkan, to send the interface display task to Webview.

[0057] In some embodiments, after receiving the interface display task, Vulkan performs operations such as three-dimensional graphics drawing, image rendering, synthesis and layer processing based on the browser interface indicated by the interface display task.

[0058] S103. Webview transmits the interface display task to GPU Driver through GPU DDK.

[0059] After Webview receives the interface display task, it transmits the interface display task to GPU Driver through GPU DDK.

[0060] The libwebviewchromium.so database of Webview transfers the interface display task to the GPU Driver through GPU DDK calls.

[0061] Webview is used to display web pages, so Hwui sends an interface display task to Webview through Vulkan. In some embodiments, after Webview receives the interface display task, it can perform a web page display operation based on the browser interface indicated by the interface display task.

[0062] It should be noted that in the scenario where the user launches a shopping application, the electronic device displays the interface of the shopping application without displaying a web page. In this case, after the shopping application sends the interface display task to Vulkan through the view system and Hwui, Vulkan can directly transmit the interface display task to the GPU Driver through the GPU DDK.

[0063] S104: When the browser is cold-started, the GPU Driver obtains cached values ​​of memory attribute information.

[0064] It should be noted that application startup is divided into cold startup, hot startup and warm startup.

[0065] A cold start occurs when an application is first run after the device is powered on, or when the application process is cleared (e.g., due to system memory shortages or user-initiated clearing). This means that before the application is launched, the system does not yet have any processes for the application. A cold start requires the creation of processes and initialization of the application.

[0066] Hot start: refers to restarting an application after exiting it. At startup, the application process exists and the Activity object is still in memory, which can avoid object initialization and layout parsing and drawing.

[0067] Warm start: refers to restarting the application after exiting the application. The application process exists at startup, but the Activity object may be recycled due to insufficient memory.

[0068] It should also be noted that, as previously mentioned, when the electronic device is powered on, the GPU Driver obtains and caches the attribute information of the electronic device's memory. After the GPU Driver receives the interface display task, it obtains the cached value of the attribute information of the electronic device's memory, but does not obtain the attribute information of the electronic device's memory.

[0069] In some embodiments, the GPU Driver calls the GetPhysicalDeviceMemoryProperties2 function to obtain cached values ​​of memory property information.

[0070] In some embodiments, the memory attribute information of a physical device describes the available memory heaps and memory types. Based on this, when the GPU Driver obtains the memory attribute information of the electronic device, after calling the GetPhysicalDeviceMemoryProperties2 function, the GPU Driver also needs to call multiple functions to read parameters such as the available memory heaps and memory types from registers. Calling multiple functions to read parameters from registers takes a considerable amount of time.

[0071] The GPU Driver obtains the attribute information of the electronic device's memory and caches it, which allows the GPU Driver to cache parameters such as the available memory heap and memory type in the form of variables. When the GPU Driver obtains the cached value of the attribute information of the electronic device's memory, it can directly search and obtain the variable without calling multiple functions to read parameters such as the available memory heap and memory type. In this way, the time it takes for the GPU Driver to obtain the cached value of the attribute information of the electronic device's memory is much less than the time it takes to obtain the attribute information of the electronic device's memory.

[0072] In some embodiments, pMemoryProperties may point to a variable containing parameters such as the available memory heap and memory type.

[0073] From this we can see that the GPU Driver obtains the cached value of the property information of the electronic device memory by calling the GetPhysicalDeviceMemoryProperties2 function, which can reduce the calling time of the WebViewFunctor::drawVk function and alleviate the problem of sliding freeze caused by the rendering thread continuously running the WebViewFunctor::drawVk function for a long time.

[0074] After receiving the interface display task, the GPU Driver can determine whether the browser application is cold-started. If the GPU Driver determines that the browser application is cold-started, it obtains the cached value of the memory attribute information.

[0075] In some embodiments, when an electronic device launches a browser application, it may first determine the browser application launch method. As described above regarding the three application launch methods, the electronic device may determine the browser application launch method by detecting the existence of the browser application process and the browser application Activity object. If the electronic device detects the existence of the browser application process and the browser application Activity object, it determines that the browser application is cold-started; otherwise, the electronic device determines that the browser application is not cold-started.

[0076] If the GPU Driver determines that the browser application is not cold-started, that is, the browser application is warm-started or hot-started, it does not obtain the cached value of the memory property information. Because the GPU Driver can only obtain the cached value of the memory property information in the scenario of cold-starting the browser application, the number of times the GetPhysicalDeviceMemoryProperties2 function is called is significantly reduced, reducing the time it takes to call the GetPhysicalDeviceMemoryProperties2 function. In turn, the time it takes to call the WebViewFunctor::drawVk function is reduced, resolving the issue of scrolling lag caused by the rendering thread continuously taking a long time to run the WebViewFunctor::drawVk function.

[0077] It should be noted that while a browser application is running, the electronic device can switch interfaces (i.e., switch from one browser application interface to another) based on user input operations within the browser application interface. During this process, the browser application can also issue interface display tasks to the GPU Driver via the view system, Hwui, Vulkan, WebView, and GPU DDK. The GPU Driver receives the interface display tasks but does not retrieve the cached values ​​of the memory attribute information.

[0078] In other embodiments, when the GPU Driver receives an interface display task, it can determine that the browser application is cold started. The GPU Driver can also obtain the property information of the electronic device's memory. Because the browser application is warm started and hot started, the GPU Driver will not obtain the property information of the electronic device's memory. The number of times the GetPhysicalDeviceMemoryProperties2 function is called and run is greatly reduced, reducing the time it takes to call and run the GetPhysicalDeviceMemoryProperties2 function, thereby reducing the time it takes to call the WebViewFunctor::drawVk function, and thus alleviating the problem of sliding freezes caused by the rendering thread continuously running the WebViewFunctor::drawVk function for a long time.

[0079] From the above, it can be seen that: the GPU Driver obtains the cached value of the attribute information of the electronic device's memory, which can alleviate the problem of sliding lag caused by the rendering thread continuously running the WebViewFunctor::drawVk function for a long time; the GPU Driver obtains the attribute information of the electronic device's memory in the scenario of cold starting the application, which can also alleviate the problem of sliding lag caused by the rendering thread continuously running the WebViewFunctor::drawVk function for a long time. The GPU Driver can only obtain the cached value of the attribute information of the memory in the scenario of cold starting the browser application, which can solve the problem of sliding lag caused by the rendering thread continuously running the WebViewFunctor::drawVk function for a long time.

[0080] After testing the solution provided by the embodiment of the present application on an electronic device, the inventor found that:

[0081] When the GPU driver cold-starts a browser application, it calls the GetPhysicalDeviceMemoryProperties2 function to obtain the cached value of the device's memory property information. Compared to the GPU driver calling the GetPhysicalDeviceMemoryProperties2 function to obtain the device's memory property information, the call duration is reduced from 30ms to 3us. This solves the 5% scrolling lag problem in big data.

[0082] That is to say: the time it takes for the GPU Driver to call the GetPhysicalDeviceMemoryProperties2 function to obtain the property information of the electronic device's memory is in the millisecond level, while the time it takes for the GPU Driver to call the GetPhysicalDeviceMemoryProperties2 function to obtain the cached value of the property information of the electronic device's memory is in the microsecond level.

[0083] It should also be noted that after the GPU Driver obtains the cached value of the memory attribute information, it can also send the cached value of the memory attribute information to the GPU. In some embodiments, the cached value of the electronic device's memory attribute information can be sent to the GPU in the form of a structure including: memoryTypeCount, memoryTypes, memoryHeapCount, and memoryHeaps.

[0084] After the GPU receives the cached value of the attribute information in the electronic device's memory, it can perform an operation to display the browser application's interface based on the cached value of the attribute information in the electronic device's memory and the first information. Of course, the first information is necessary information for the GPU to execute the operation to display the browser application's interface, such as the GPU's priority, which indicates whether the GPU prioritizes the interface display task. The first information may also include image rendering data, such as the image's size and texture. For more information about the first information, please refer to the relevant technical content.

[0085] Of course, since the cached value of the attribute information of the electronic device's memory is not necessary information during the GPU's execution of displaying the browser application's interface, in the scenario of hot start or warm start of the browser application, the GPU will not receive the cached value of the attribute information of the electronic device's memory, but can execute the operation of displaying the browser application's interface based on the first information.

[0086] It can be seen from the above content that when an electronic device launches a browser application or a shopping application, the electronic device can use the method shown in Figure 3 to display the interface of the browser application or the shopping application to avoid the problem of sliding and lag when the user inputs operations on the interface of the browser application or the shopping application.

[0087] FIG3 shows a display method, comprising the steps of:

[0088] S201: Receive a startup operation of a first application.

[0089] The first application refers to a browser application or a shopping application. The user inputs an operation to start the first application, and the electronic device receives the operation.

[0090] S202: Determine whether a process needs to be started during the process of starting the first application.

[0091] Upon receiving a startup operation for a first application, the electronic device may display the interface of the first application. Before displaying the interface of the first application, the electronic device first determines whether a process needs to be started during the startup of the first application, thereby determining whether the first application is a cold start. If the electronic device determines that a process needs to be started during the startup of the first application, the electronic device determines that the first application is a cold start and executes steps S203 and S204. Otherwise, the electronic device determines that the first application is not a cold start and executes steps S205 and S206.

[0092] S203: Obtain the first information and the cache value of the attribute information in the memory.

[0093] The first information, as described above, is associated information for displaying the interface of the first application, and is necessary information for displaying the interface of the first application.

[0094] S204: Display the interface of the first application based on the first information and the cache value of the attribute information in the memory.

[0095] After the electronic device obtains the first information and the cached value of the attribute information of the memory, it can display the interface of the first application based on the first information and the cached value of the attribute information of the memory.

[0096] S205: Obtain first information.

[0097] The first application is not cold started, so the electronic device does not need to obtain the cache value of the attribute information of the memory, and can only obtain the first information, and display the interface of the first application based on the first information through step S206.

[0098] S206: Display an interface of the first application based on the first information.

[0099] In some embodiments, after the first application is started, the first application is in a running state, and the user can input an operation to switch the interface of the first application. For example, the first application is a shopping application, and the user inputs an interface switching operation to control the electronic device to switch from displaying the home page interface to displaying the shopping cart interface. For the interface of the first application after switching, the electronic device does not need to obtain the cached value of the attribute information in the memory before displaying the interface.

[0100] In some embodiments, when the user inputs a sliding operation on the interface of the first application, the electronic device will not obtain the cached value of the attribute information of the memory.

[0101] It should also be noted that the method for obtaining attribute information of the electronic device's memory in the display method provided in the embodiment of the present application can also be applied to other software modules or other hardware components of the electronic device. Other software modules or other hardware components of the electronic device also frequently obtain attribute information of the device's memory.

[0102] The electronic devices mentioned in the above embodiments of the present application can be mobile phones, tablet computers, personal digital assistants (PDAs), desktop computers, laptop computers, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices, etc.

[0103] Taking a mobile phone as an example, Figure 4 shows an example of the composition of an electronic device provided in an embodiment of the present application. As shown in Figure 4, the electronic device 100 may include a processor 110, an internal memory 120, a display screen 130, and a sensor module 140.

[0104] It should be understood that, to facilitate understanding of the embodiments of the present application, the electronic device 100 shown in FIG4 only includes some components related to the method for obtaining attribute information of the electronic device memory provided in the embodiments of the present application. The electronic device provided in the embodiments of the present application may include more or fewer components than the electronic device 100 shown in FIG4. In other words, the electronic device 100 shown in FIG4 does not constitute a specific limitation on the electronic device provided in the embodiments of the present application.

[0105] The processor 110 may include one or more processing units, such as an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), and a video codec. The processor 110 may also include a memory for storing instructions and data.

[0106] The internal memory 120 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120. In some embodiments, the internal memory 120 stores instructions for executing a method for obtaining attribute information of the electronic device's memory. By executing the instructions stored in the internal memory 120, the processor 110 can obtain cached values ​​of the memory's attribute information during the operation of the browser application or shopping application, or when the browser or shopping application is cold-started.

[0107] In sensor module 140, pressure sensor 140A senses pressure signals and converts them into electrical signals. Touch sensor 140B, also known as a "touch control device," can be mounted on display screen 130. Together, touch sensor 140B and display screen 130 form a touch screen, also known as a "touch screen." Touch sensor 140B detects touch operations applied to or near the touch sensor. The touch sensor can communicate detected touch operations to the application processor to determine the type of touch event.

[0108] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or processor executes one or more steps in any of the above methods.

[0109] The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0110] Another embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer or processor, causes the computer or processor to execute one or more steps in any of the above methods.

Claims

1. A display method, characterized in that: include: Receiving a first operation of a user to start a first application; In response to the first operation, obtaining first information and attribute information of the memory, and displaying the interface of the first application based on the first information and the attribute information of the memory; receiving a second operation of the user starting the first application within a first time period after the user exits the first application; In response to the second operation, second information is acquired, and the interface of the first application is displayed based on the second information.

2. The display method according to claim 1, characterized in that: The first information and the second information are associated information of an interface displaying the first application.

3. The display method according to claim 1 or 2, characterized in that: Before obtaining the first information and the attribute information of the memory, it also includes: determining that a process needs to be started during the startup of the first application.

4. The display method according to any one of claims 1 to 3, characterized in that: Before obtaining the second information, it also includes: determining that no process needs to be started during the startup of the first application.

5. The display method according to any one of claims 1 to 4, characterized in that: Also includes: Receiving a third operation input by a user on the interface of the first application, where the third operation is used to switch the interface of the first application; In response to the third operation, third information is acquired, and based on the third information, the interface after the switching of the first application is displayed, wherein the third information is associated information for displaying the interface after the switching of the first application.

6. The display method according to claim 5, characterized in that: The acquiring the first information and the attribute information of the memory includes: acquiring cache values ​​of the first information and the attribute information of the memory.

7. The display method according to claim 6, characterized in that: The time taken to obtain the cache value of the attribute information of the memory is in the microsecond level.

8. The display method according to claim 5 or 6, characterized in that: In the process of obtaining the cache value of the attribute information of the memory, the electronic device does not call a function to read the parameters stored in the register.

9. The display method according to any one of claims 5 to 8, characterized in that: When the cache value of the attribute information of the memory is turned on by the electronic device, it is saved in the form of a variable.

10. The display method according to any one of claims 1 to 9, characterized in that: The obtaining of the first information and the attribute information of the memory includes: When a graphics processor driver of an electronic device receives an interface display task through a three-dimensional graphics processing library Vulkan, it obtains the first information and attribute information of the memory.

11. An electronic device, characterized in that: include: one or more processors, memory, and display screens; The memory and the display screen are coupled to the one or more processors, the memory is used to store a computer program, the computer program includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the display method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the display method according to any one of claims 1 to 10.

13. A computer program product, characterized in that When the computer program product runs on a computer, the computer is enabled to execute the display method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Display method, electronic equipment and readable medium

    CN120215771A

  • Method and device for switching application activity

    CN104331235A

  • Application starting method, electronic equipment and readable storage medium

    CN115562742A

  • Web browser remoting using network vector rendering

    US10452868B1

  • Data processing method and apparatus and electronic device

    WO2022100132A1