Interface image processing method, electronic device, and storage medium

By splitting the decoding and display process into two frames or reducing the frame rate/resolution, the problem of images not being able to display in time during fast scrolling on electronic devices is solved, thus improving the smoothness of image display.

CN119450079BActive Publication Date: 2026-07-10HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2023-07-31
Publication Date
2026-07-10

Smart Images

  • Figure CN119450079B_ABST
    Figure CN119450079B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an interface image processing method, an electronic device and a storage medium, relate to the technical field of image processing, and can improve the problem that picture content cannot be displayed in time during page fast scrolling. The method comprises a frame skipping processing flow, which comprises: at the nth frame, obtaining a picture index position requested by an input event of the nth frame, decoding a picture corresponding to the picture index position requested by the input event of the nth frame, and displaying an image of the (n-1)th frame, the image of the (n-1)th frame comprising the picture corresponding to the picture index position requested by the input event of the (n-1)th frame; at the (n+a)th frame, obtaining a picture index position requested by an input event of the (n+a)th frame, decoding a picture corresponding to the picture index position requested by the input event of the (n+a)th frame, and displaying an image of the nth frame, the image of the nth frame comprising the picture corresponding to the picture index position requested by the input event of the nth frame, a being an integer greater than or equal to 1.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an interface image processing method, electronic device, and storage medium. Background Technology

[0002] As the camera capabilities of smartphones and other electronic devices become increasingly powerful, users store a large number of pictures on these devices. Gallery apps are used to display these images, and they typically include two main page layouts: grid layouts and large image layouts. Grid layouts can display multiple images, helping users access a wider range of content and quickly browse or locate images by swiping or scrolling. However, on current electronic devices, during rapid page scrolling, images may not display in time. Summary of the Invention

[0003] This application provides an interface image processing method, electronic device, and storage medium, which can improve the problem that image content cannot be displayed in time during fast page scrolling.

[0004] Firstly, a method for processing interface images is provided. The interface is used to display multiple images. The method includes a frame error processing procedure, which includes: in frame n, obtaining the image index position requested by the input event of frame n, decoding the image corresponding to the image index position requested by the input event of frame n, and displaying the image of frame n-1, where the image of frame n-1 includes the image corresponding to the image index position requested by the input event of frame n-1; in frame n+a, obtaining the image index position requested by the input event of frame n+a, decoding the image corresponding to the image index position requested by the input event of frame n+a, and displaying the image of frame n, where the image of frame n includes the image corresponding to the image index position requested by the input event of frame n, and 'a' is an integer greater than or equal to 1. By splitting the decoding and display processes corresponding to the same frame into two frames, the image has a higher probability of being decoded before being displayed, thereby improving the problem of image content not being displayed in time during rapid page scrolling.

[0005] In one possible implementation, if the first speed exceeds a first threshold, a frame error processing procedure is executed. The first speed is the scrolling speed of the interface or the dragging speed of a scrollbar operation on the interface. When the interface scrolling speed is fast, the frame error processing procedure is executed to increase the number of image decoding events; when the interface scrolling speed is slow, the response speed is improved.

[0006] In one possible implementation, a = 1. The first frame error handling process splits the decoding and rendering processes that originally corresponded to the same frame into two adjacent frames for separate execution. In this way, the image has a greater probability of being decoded before being displayed, thereby improving the problem of image content not being displayed in time during fast page scrolling.

[0007] In one possible implementation, a = 2; the frame error handling process further includes: in the (n+1)th frame, obtaining the image index position requested by the input event in the (n+1)th frame, decoding the image corresponding to the image index position requested by the input event in the (n+1)th frame, and displaying the image in the (n-1)th frame. This gives the image more decoding time, increasing its probability of being displayed later. Furthermore, in subsequent processes, image decoding and display are performed in staggered frames, thus giving the image more decoding time and improving the probability of it being displayed.

[0008] In one possible implementation, when the interface is a first view interface, the frame error processing flow is a first frame error processing flow; when the interface is a second view interface, the frame error processing flow is a second frame error processing flow, and the number of images displayed on the first view interface is less than the number of images displayed on the second view interface; in the first frame error processing flow, a = 1; in the second frame error processing flow, a = 2; the second frame error processing flow further includes: in the (n+1)th frame, obtaining the image index position requested by the input event of the (n+1)th frame, decoding the image corresponding to the image index position requested by the input event of the (n+1)th frame, and displaying the image of the (n-1)th frame.

[0009] In one possible implementation, the first view interface is a day view interface, and the second view interface is a month view interface or a year view interface. The day view interface displays images on a daily basis, the month view interface displays images on a monthly basis, and the year view interface displays images on a yearly basis.

[0010] In one possible implementation, the frame rate in the first state is lower than the frame rate in the second state; in the first state, the interface scrolls, and in the second state, the interface remains still. When the number of images that need to be updated is large, a lower frame rate is used to improve the image decoding speed; when the number of images that need to be updated is small, a higher frame rate is used to improve the smoothness of the screen.

[0011] In one possible implementation, the frame rate in the first state is less than the frame rate in the second state; in the first state, the interface scrolls and the first speed exceeds a second threshold; in the second state, the interface is stationary, or the interface scrolls and the first speed does not exceed the second threshold.

[0012] In one possible implementation, the first threshold is less than or equal to the second threshold.

[0013] In one possible implementation, if the first speed exceeds a third threshold, the image displayed on the interface is a first-resolution image; if the first speed does not exceed the third threshold, the image displayed on the interface is a second-resolution image, where the resolution of the second-resolution image is greater than that of the first-resolution image. When the number of images that need to be updated on the interface is large, a lower resolution is used to decode the images to improve the decoding speed; when the number of images that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the screen.

[0014] In one possible implementation, the first threshold is less than the third threshold.

[0015] In one possible implementation, the second threshold is less than the third threshold.

[0016] In one possible implementation, after the scrolling of the interface begins, if a preset condition is not met, a first resolution image is decoded and displayed; after the scrolling of the interface begins, if a preset condition is met, a second resolution image is decoded and displayed. The preset condition is that the duration from the time t1 when the scrolling of the interface begins to the current time t2 reaches a preset duration Δt, and the image index position requested by the input event of the current frame includes at least a portion of the image index positions requested by the input events between t1 and t2-Δt.

[0017] In one possible implementation, obtaining the image index position requested by the input event of the nth frame includes: performing the input event task of the nth frame to obtain the image index position requested by the input event of the nth frame; displaying the image of the (n-1)th frame includes: performing the layout task and the drawing task of the (n-1)th frame; obtaining the image index position requested by the input event of the (n+a)th frame includes: performing the input event task of the (n+a)th frame and obtaining the image index position requested by the input event of the (n+a)th frame; displaying the image of the nth frame includes: performing the layout task and the drawing task of the nth frame.

[0018] Secondly, a method for processing user interface images is provided, including: displaying multiple images on the interface; the frame rate in a first state is lower than the frame rate in a second state; in the first state, the interface scrolls, and in the second state, the interface remains still. When the number of images that need to be updated on the interface is large, a lower frame rate is used to improve the image decoding speed; when the number of images that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the screen.

[0019] Thirdly, a method for processing interface images is provided, comprising: displaying multiple images on the interface; the frame rate in a first state being lower than the frame rate in a second state; in the first state, the interface scrolls and a first speed exceeds a second threshold, the first speed being the scrolling speed of the interface or the dragging speed of a scroll bar dragging operation on the interface; in the second state, the interface is stationary, or the first speed does not exceed the second threshold. When the number of images that need to be updated on the interface is large, a lower frame rate is used to improve the image decoding speed; when the number of images that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the screen.

[0020] Fourthly, a method for processing interface images is provided, comprising: displaying multiple images on the interface; if a first speed exceeds a third threshold, the image is a first resolution image, where the first speed is the scrolling speed of the interface or the dragging speed of a scroll bar dragging operation on the interface; if the first speed does not exceed the third threshold, the image is a second resolution image, where the resolution of the second resolution image is greater than the resolution of the first resolution image. When the number of images that need to be updated on the interface is large, a lower resolution is used to decode the images to improve the image decoding speed; when the number of images that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the screen.

[0021] In one possible implementation, if a preset condition is not met after the interface scrolling begins, a first resolution image is decoded and displayed; if the preset condition is met after the interface scrolling begins, a second resolution image is decoded and displayed. The preset condition is that the duration from the start of the interface scrolling to the current time reaches a preset duration and the image index position requested by the input event of the current frame includes the image index position requested by the input event of the frame before the preset duration.

[0022] Fifthly, an electronic device is provided, comprising: a processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, causes the electronic device to perform the interface image processing method described above.

[0023] In a sixth aspect, a computer-readable storage medium is provided, including a program or instructions, wherein the above-described method is executed when the program or instructions are run on a computer.

[0024] The interface image processing method, electronic device, and storage medium in this application improve the problem of image content not being displayed in time during fast page scrolling by splitting the decoding and display process corresponding to the same frame into two frames. This increases the probability that the image is decoded before being displayed. Alternatively, the problem can be improved by reducing the frame rate or by decoding lower resolution images. Attached Figure Description

[0025] Figure 1 This is a timing diagram of an image display in a related technology;

[0026] Figure 2 This is a structural block diagram of an electronic device according to an embodiment of this application;

[0027] Figure 3 This is a schematic diagram of a software architecture according to an embodiment of this application;

[0028] Figure 4 This is a timing diagram of an interface image processing method according to an embodiment of this application;

[0029] Figure 5 for Figure 4 A corresponding schematic diagram of interface changes;

[0030] Figure 6 This is a timing diagram of another interface image processing method in an embodiment of this application;

[0031] Figure 7 This is a schematic diagram of a day view interface in an embodiment of this application;

[0032] Figure 8 This is a schematic diagram of a moon view interface in an embodiment of this application;

[0033] Figure 9 This is a schematic diagram of a year view interface in an embodiment of this application;

[0034] Figure 10 This is a flowchart illustrating an interface image processing method according to an embodiment of this application.

[0035] Figure 11 This is a flowchart illustrating another interface image processing method in an embodiment of this application. Detailed Implementation

[0036] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0037] Before describing the embodiments of this application, the relevant technologies and their technical problems will first be explained. For example... Figure 1As shown, in each frame, the related technology executes input events, which are the inputs triggered in each frame, such as dragging the scroll bar. Based on the input events, the scroll bar drag distance is calculated, and the requested image to be loaded is determined according to the drag distance. The decoding thread decodes the image requested by the input event to obtain the decoded image. The UI thread executes animation and traversal, which includes measurement, layout, and drawing. The decoding thread notifies the UI thread of decoding completion via a message. Because decoding occurs during rapid page scrolling, each frame displays a new image, and decoding takes a long time. This results in the drawing process of each frame often failing to obtain the decoded image requested for the current frame, causing the requested image to be undrawn and displayed in time, resulting in white blocks appearing in areas where the image should be displayed. Figure 1 The number in the figure refers to the sequence number of the frame corresponding to the task being performed. To address the above problems, this application provides a technical solution based on its embodiments, which will be described in detail below.

[0038] Figure 2 A schematic diagram of the structure of the electronic device 100 is shown.

[0039] Electronic device 100 may include processor 110, internal memory 121, display screen 194, etc. It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on electronic device 100. In other embodiments of this application, electronic device 100 may include more or fewer components than illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0040] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0041] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0042] 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 retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0044] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0045] Internal memory 121 can be used to store executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located within the processor.

[0046] Figure 3 This is a schematic diagram of a software architecture in an embodiment of this application. The software architecture includes an application layer, a middleware layer, and an operating system framework layer. The application layer includes a gallery application, which may include an input processing module, a layout module, a drawing module, a rendering module, an error frame management module, a frame reduction management module, and a dynamic resolution module. The input processing module executes input events, the layout module executes layout, the drawing module executes drawing, and the rendering module executes rendering. The error frame management module, frame reduction management module, and dynamic resolution module will be described in detail later. The middleware layer includes image management middleware, which includes an IO module, a decoding module, a post-processing module, and a cache management module. The IO module manages image input and output, the decoding module decodes images, the post-processing module processes the decoded images, and the cache management module manages image caching. The operating system framework layer includes a file system, a graphics system, a media system, and a memory management system. Middleware is a functional layer between the application and the operating system, providing basic services or functions for application invocation.

[0047] This application provides an interface image processing method. The interface is used to display multiple images. The execution subject of this method can be the aforementioned electronic device. The method includes a frame error processing flow, which includes:

[0048] In frame n, obtain the image index position requested by the input event in frame n, decode the image corresponding to the image index position requested by the input event in frame n, and display the image of frame n-1. The image of frame n-1 includes the image corresponding to the image index position requested by the input event in frame n-1, where n is an integer greater than 1.

[0049] In frame n+a, obtain the image index position requested by the input event in frame n+a, decode the image corresponding to the image index position requested by the input event in frame n+a, and display the image of frame n. The image of frame n includes the image corresponding to the image index position requested by the input event in frame n, where a is an integer greater than or equal to 1.

[0050] Specifically, such as Figure 4 and Figure 5 As shown, taking a=1 and n=1 as an example, the current interface is, for example, a gallery interface, and the current input is the user's input operation of dragging the scroll bar in the gallery interface. Assume there are four consecutive frames from frame 0 to frame 3. In frame 0, the interface displays images 0-7 from the gallery. In frames 1-3, the user quickly scrolls the interface using the scroll bar. In frames 0-3, the scroll bar is dragged to positions A, B, C, and D respectively during the input operation. In frame 1, the UI thread executes the input event for frame 1, obtains the corresponding scroll bar drag position B, and obtains the image index positions corresponding to this position as 10-17. 10-17 are the image index positions requested by the input event in frame 1, and the images corresponding to these index positions can be images 10-17. In frame 1, the decoding thread decodes images 10-17. However, the image of frame 1 is not displayed in frame 1; that is, it does not respond to the scroll bar scrolling trigger to scroll to the corresponding position, but instead displays the image of frame 0. In other words, in frame 1, only the image corresponding to frame 1 is decoded. The interface remains at frame 0 in frame 1, meaning the scroll bar remains at position A, and the displayed images are those shown when the scroll bar is at position A, i.e., images 0-7. In frame 2, the UI thread executes the input event for frame 2, obtains the corresponding scroll bar drag position C, and gets the image index positions 20-27 corresponding to that position. In frame 2, the decoding thread decodes images 20-27, and displays the image from frame 1, which includes images 10-17 decoded in frame 1. In frame 3, the UI thread executes the input event for frame 3, obtains the corresponding scroll bar drag position D, and gets the image index positions 30-37 corresponding to that position. In frame 3, the decoding thread decodes images 30-37, and displays the image from frame 2, which includes images 20-27 decoded in frame 2. Similarly, in the frame error handling process, the corresponding input event and image decoding are executed in the current frame, but the image display is delayed by one frame. That is, the image decoding and display are executed in two staggered frames. In this way, even if the image decoding time is long, there is a greater probability that it will be displayed in the next frame.

[0051] The interface image processing method in this application splits the decoding and display processes corresponding to the same frame into two frames. This increases the probability that the image will be decoded before it is displayed, thereby improving the problem that the image content cannot be displayed in time during rapid page scrolling.

[0052] In one possible implementation, if the first speed exceeds a first threshold, a frame error processing procedure is executed. The first speed is either the scrolling speed of the interface or... That is, the interface in this embodiment is a gallery-type application interface, which may include a scroll bar. When the electronic device detects a dragging operation on the scroll bar or a swiping operation on the interface, the interface scrolls, and the displayed images are updated as the interface scrolls. The faster the interface scrolls, the more likely it is that more images need to be decoded in each frame during the scrolling process. In one embodiment, the decision to trigger a frame error processing procedure can be determined based on whether the dragging speed of the scroll bar exceeds a first threshold. For example, if the dragging speed exceeds the first threshold, it indicates that the images on the screen are scrolling and updating rapidly, resulting in a large number of images needing to be decoded within one frame, thus placing a heavy burden on image decoding. In this case, a frame error processing procedure can be executed to minimize the possibility of images not being displayed in time. If the dragging speed does not exceed the first threshold, it indicates that the images on the screen are scrolling and updating slowly, resulting in a smaller number of images needing to be decoded within one frame, thus placing a lighter burden on image decoding. In this case, a frame error processing procedure is not required, and a non-frame error processing procedure can be executed. In the non-frame error processing procedure, the image of the current frame can be decoded and displayed in each frame. Since the image decoding burden is relatively low, the image of the current frame can be displayed based on the already decoded image of the current frame. That is, the image of the current frame includes the decoded image of the current frame, making it less likely that the decoded image will not be displayed in time in the current frame. In another embodiment, the decision to trigger the error frame handling process can be determined based on whether the scrolling speed of the interface exceeds a first threshold; the specific process will not be described in detail here.

[0053] In one possible implementation, the frame error handling process includes a first frame error handling process, in which a = 1. The first frame error handling process splits the decoding and rendering processes that originally corresponded to the same frame into two adjacent frames for separate execution. This increases the probability that the image will be decoded before being displayed, thereby improving the problem of image content not being displayed in time during rapid page scrolling.

[0054] In one possible implementation, the frame error processing flow includes a second frame error processing flow, in which, as... Figure 6As shown, a = 2; the second frame error processing procedure also includes: in the (n+1)th frame, obtaining the image index position requested by the input event of the (n+1)th frame, decoding the image corresponding to the image index position requested by the input event of the (n+1)th frame, and displaying the image of the (n-1)th frame.

[0055] Specifically, in the second frame error process, the current interface is, for example, a gallery interface, with n=1. The current input is the user's input operation of dragging the scroll bar in the gallery interface. Assume there are five consecutive frames from frame 0 to frame 4. In frame 0, the interface displays images 0-36 in the gallery. In frames 1-3, the user quickly scrolls the interface using the scroll bar. In frames 0-3, the scroll bar is dragged to positions A, B, C, and D during the input operation. In frame n, i.e., frame 1, the UI thread executes the input event of frame 1, obtains the corresponding scroll bar drag position B, and obtains the image index positions corresponding to this position as 1000-1036. 1000-1036 are the image index positions requested by the input event of frame 1, and the images corresponding to these index positions can be images 1000-1036. In frame 1, the decoding thread decodes images 1000-1036. However, the image of frame 1 is not displayed in frame 1. That is, it does not respond to scrolling to the corresponding position by scrolling the scrollbar; instead, it displays the image of frame 0. In other words, in frame 1, only the image corresponding to frame 1 is decoded. The interface remains at frame 0 in frame 1, meaning the scrollbar remains at position A, and the images displayed are still those shown when the scrollbar is at position A, i.e., images 0 to 36. In frame n+1, i.e., frame 2, the UI thread executes the input event of frame 2, obtains the corresponding scrollbar drag position C, and obtains the image index position corresponding to that position as 2000 to 2036. In frame 2, if the decoding process in frame 1 is not yet complete, the decoding thread continues to decode images 1000-1036, and also decodes the images corresponding to the image index positions requested by the input event in frame 2, for example, images 2000-2036. Furthermore, the image from frame 0 is still displayed in frame 2. In other words, the time allotted between frames 1 and 2 is used to decode the images corresponding to the image index positions requested by the input event in frame 1. In frame n+2, i.e., frame 3, the UI thread executes the input event of frame 3, obtains the corresponding scroll bar drag position D, and determines the image index positions corresponding to that position as 3000-3036. In frame 3, the decoding thread continues to decode images 2000-2036, and also decodes the images corresponding to the image index positions requested by the input event in frame 3, for example, images 3000-3036. Furthermore, the image from frame 1 is displayed in frame 3, which includes images 1000-1036 decoded in frames 1 and 2. In frame n+3, i.e., frame 4, the UI thread executes the input event from frame 4, obtains the corresponding scroll bar drag position, and determines the image index positions corresponding to that position as 4000-4036.In frame 4, the decoding thread continues to decode images 3000-3036, and also decodes the image corresponding to the image index position requested by the input event in frame 4, for example, decoding images 4000-4036. Furthermore, the image from frame 2 is displayed in frame 4, and the image from frame 2 includes images 2000-2036 decoded from frames 2 and 3. Similarly, in this second frame error handling process, in frames n+1 and n+2, the image of frame n+1 is decoded, and the image of frame n-1 is displayed. From frame n onwards, each frame takes two frames to decode one image before displaying the image from the previous two frames in the next frame. In other words, in the second frame error handling process, the image corresponding to the image index position requested by the input event in any frame is decoded in the two frames preceding that frame and displayed in the third frame preceding that frame. This method gives the image more decoding time, increasing its probability of being displayed later. Furthermore, in subsequent processes, image decoding and display are performed in staggered frames, thus giving the image more decoding time and increasing the probability of it being displayed.

[0056] In one possible implementation, when the interface is a first view interface, the frame error handling process is a first frame error handling process; when the interface is a second view interface, the frame error handling process is a second frame error handling process, and the number of images displayed on the first view interface is less than or equal to the number of images displayed on the second view interface; in the first frame error handling process, a = 1; in the second frame error handling process, a = 2; the second frame error handling process further includes: in the (n+1)th frame, obtaining the image index position requested by the input event of the (n+1)th frame, decoding the image corresponding to the image index position requested by the input event of the (n+1)th frame, and displaying the image of the (n-1)th frame. For example, the first view interface is a day view interface, and the second view interface is a month view interface or a year view interface. Figure 7 As shown, the daily view interface refers to an interface that displays images in daily units, such as... Figure 8 As shown, the moon view refers to an interface that displays images in monthly units, such as... Figure 9 As shown, the year view interface displays images on a yearly basis. Compared to the day view interface, the month view interface or year view interface displays more images on the same screen. Therefore, the number of images that need to be decoded in the same frame is also greater. Thus, when the interface is a second view interface displaying more images, a second frame error processing flow is applied to decode the image of the nth frame in two frames, increasing the probability of the image being displayed. Conversely, when the interface is a first view interface displaying fewer images, the second frame error processing flow is applied to decode the image of the nth frame in one frame, increasing the probability of the image being displayed while reducing the response time of screen scrolling.

[0057] In the above embodiments, the first view interface and the second view interface are distinguished by different time granularities. In other possible implementations, the first view interface and the second view interface can also be view types classified based on other rules, as long as the first view interface is a view type used to display more images and the second view interface is a view type used to display fewer images. For example, the image library has preset large image mode, medium image mode, and small image mode, using different modes to distinguish different view interfaces. In large image mode, the image display size is larger, and the number of images displayed on the interface is smaller; in medium image mode, the image display size is medium, and the number of images displayed on the interface is medium; in small image mode, the image display size is smaller, and the number of images displayed on the interface is larger. The first view interface can be a large image mode view interface, and the second view interface can be a medium image mode view interface or a small image mode view interface.

[0058] The following example illustrates the processing of a single frame in the frame error handling process of this application embodiment.

[0059] like Figure 10 As shown, the software architecture includes four modules: BaseFastScroller, LinearLayoutManager, GridAlbumDataAdapter, and FastScrollerDataLoader. These four modules can be application layer modules, and they can execute the error frame handling process by calling the error frame management module.

[0060] The basic fast scrollbar responds to the input event of a finger pressing the scrollbar, triggering the start of fast scrolling;

[0061] If, after the basic fast scrollbar starts scrolling, it is determined that the displacement of the scrollbar in the Y direction exceeds the first threshold, the frame error handling process is triggered.

[0062] The frame error handling process includes:

[0063] The basic fast scrollbar calculates the image index position and offset requested by the input event in the current frame based on the displacement of the scrollbar dragged in the current frame and the total length of the view. The offset refers to the offset of the image relative to the screen boundary.

[0064] The basic fast scrollbar saves the image index position and offset requested by the input event of the current frame for use in the next frame;

[0065] The basic fast scrollbar sends the image index position requested by the input event of the current frame to the grid album data adapter;

[0066] The grid album data adapter obtains the Uniform Resource Identifier (URI) based on the image index position requested by the input event of the current frame, and triggers the preloading of the corresponding image based on the URI. Preloading is decoding.

[0067] The basic fast scrollbar sends the image index position and offset requested by the input event of the previous frame to the linear layout manager;

[0068] The Linear Layout Manager binds the image and control item to the image index position requested by the input event in the previous frame;

[0069] The grid album data adapter binds data to all child controls of the control, including executing the subsequent image loading process.

[0070] In one possible implementation, based on the frame error handling process, the frame rate in the first state is lower than the frame rate in the second state; that is, the duration of each frame in the first state is longer than the duration of each frame in the second state. In the first state, the interface scrolls, which can be triggered by dragging an action on the scroll bar or by swiping an action on the interface. In the second state, the interface is stationary; if the interface has a scroll bar, then the scroll bar is also stationary when the interface is stationary. Frame rate refers to the number of times the screen refreshes per second, and a frame refers to the screen refresh cycle, that is, the time required for the screen to refresh once. For example, at a refresh rate of 60Hz, the duration of each frame is approximately 16ms. In this embodiment, for example, the duration of each frame is set to 32ms in the first state and 16ms in the second state. When the scroll bar is dragged or the interface is scrolled, the refresh rate is switched to 30Hz. At this time, the duration of each frame is 32ms. Therefore, the time for image decoding is longer within one frame, which can satisfy the requirement of decoding more images simultaneously in one frame. Therefore, even if a large number of images are refreshed during the interface scrolling, there is a high probability that the decoding can be completed, thus improving the problem of images not being displayed in time. When the scroll bar is stationary, the refresh rate is switched to 60Hz. At this time, the duration of each frame is 16ms. Since there is no need to refresh images when the interface is stationary, but only to refresh some interface changes and other content, no more image decoding time is required. The faster refresh rate can reduce the screen ghosting problem and make the display smoother.

[0071] In one possible implementation, based on the frame error handling process, the frame rate in the first state is less than the frame rate in the second state, that is, the duration of each frame in the first state is greater than the duration of each frame in the second state; in the first state, the interface scrolls and the first speed exceeds the second threshold. The interface scrolling can be triggered in response to a drag operation on the scroll bar in the interface or in response to a sliding operation on the interface. In the second state, the interface is stationary, or the interface scrolls and the first speed does not exceed the second threshold. For example, if the frame duration is set to 32ms in the first state and 16ms in the second state, when the scroll bar is dragged or the interface is scrolled quickly, the refresh rate is switched to 30Hz. In this case, the frame duration is 32ms, allowing for longer image decoding time within a single frame. This allows for decoding more images simultaneously, increasing the probability of successful decoding even during rapid scrolling, thus mitigating the problem of images not displaying in time. When the interface is stationary or scrolling slowly, the refresh rate is switched to 60Hz, with a frame duration of 16ms. Since fewer images need to be refreshed during slow scrolling, less image decoding time is required, and the faster refresh rate reduces screen ghosting, resulting in smoother display. Therefore, superimposing a frame rate reduction method into the frame error handling process can further improve the problem of images not displaying in time during rapid page scrolling. The frame rate reduction method can be implemented through the aforementioned frame reduction management module.

[0072] In one possible implementation, the first threshold is less than or equal to the second threshold. That is, during the interface scrolling process, the frame error handling process can be triggered based on the same speed threshold as the frame rate reduction process, or the frame error handling process can be triggered at a lower speed threshold relative to the frame rate reduction process. In other words, the frame error handling process is prioritized to improve the problem of images not being able to display in time.

[0073] In one possible implementation, a dynamic resolution decoding process can be implemented based on the frame error handling process. This dynamic resolution decoding process can be achieved through the aforementioned dynamic resolution module. The specific implementation of the dynamic resolution decoding process is as follows: if the first speed exceeds a third threshold, the image displayed on the interface is a first-resolution image; if the first speed does not exceed the third threshold, the image displayed on the interface is a second-resolution image, and the resolution of the second-resolution image is greater than that of the first-resolution image. That is, taking the dragging operation of the scroll bar as an example, when the scroll bar dragging speed is fast, the decoded images are all lower-resolution first-resolution images; when the scroll bar dragging speed is slow or stationary, the decoded images are higher-resolution second-resolution images. For example, if the first-resolution image has a resolution of 64*64 and the second-resolution image has a resolution of 256*256, the decoding time for the first-resolution image is only 1 / 4 of the decoding time for the second-resolution image. Therefore, decoding the first-resolution image can save the time spent decoding each image. During the rapid scrolling process, the problem of images not being displayed in time can be further improved. When the rapid scrolling ends and the scrolling slows down or stops, a second resolution image is decoded to achieve a clear display effect.

[0074] In one possible implementation, the first threshold is less than the third threshold. That is, during the interface scrolling process, the frame error handling process can be triggered at a lower speed threshold relative to the dynamic resolution decoding process, i.e., the frame error handling process is prioritized to improve the problem of images not being able to display in time.

[0075] In addition, during the decoding process of dynamic resolution and the process of frame rate reduction, the second threshold is less than the third threshold, that is, the process of frame rate reduction can be triggered at a lower speed threshold relative to the decoding process of dynamic resolution.

[0076] In one possible implementation, based on the frame error handling process, such as Figure 11 As shown, after the drag operation for the scroll bar begins, the first resolution image is decoded, the layout task is performed based on the first resolution image, the current time is recorded as t1, and it is determined whether the preset conditions are met.

[0077] In this process, if the preset conditions are not met after the interface scrolling begins, a drawing task is executed directly to display the image. After displaying the image, the process proceeds to the next frame. In other words, if the preset conditions are not met, the decoded and displayed image is still the first-resolution image. If the interface image processing method of the current frame executes the frame error handling process, the first-resolution image decoded in the current frame will be drawn and displayed in the (n+a)th frame. If the interface image processing method of the current frame does not execute the frame error handling process, but instead displays the image decoded in the current frame, then the first-resolution image decoded in the current frame will be drawn and displayed in the current frame.

[0078] The process begins after the interface scrolls, and if preset conditions are met, decoding of the second-resolution image is triggered, and a drawing task is performed to display the image before moving to the next frame. In other words, frames that meet the preset conditions will decode a higher-resolution second-resolution image to facilitate the subsequent display of that image. If the current frame's interface image processing method executes a frame error handling process, the decoded second-resolution image will be drawn and displayed in the (n+a)th frame. If the current frame's interface image processing method does not execute a frame error handling process but instead displays the decoded image, the decoded second-resolution image will be drawn and displayed in the current frame.

[0079] The preset condition is that the duration from the start of scrolling on the screen t1 to the current time t2 reaches a preset duration Δt, and the image index position requested by the input event of the current frame includes at least a portion of the image index positions requested by the input events between t1 and t2-Δt. In other words, the electronic device continuously determines whether the preset condition is met in each frame from the start of scrolling on the screen. When it is determined that a certain frame reaches t1+Δt, the current time t2 of each frame reaches and exceeds the preset duration Δt of t1. Therefore, from t1+Δt onwards, it continuously determines whether the image index position requested by the input event of the current frame includes at least a portion of the image index positions requested by the input events between t1 and t2-Δt to determine the resolution of the image triggering decoding. This embodiment does not limit the relationship between the dynamic resolution decoding process and the error frame handling process. For example, dynamic resolution decoding can be implemented within the frame error handling process. That is, in each frame of the frame error handling process, if a preset condition is not met, the first-resolution image at the image index position requested by the input event of the current frame is decoded, and this first-resolution image is decoded before the corresponding frame is displayed, based on the frame error handling process. Conversely, in each frame of the frame error handling process, if the preset condition is met, the second-resolution image at the image index position requested by the input event of the current frame is decoded, and this second-resolution image is decoded before the corresponding frame is displayed, based on the frame error handling process. Furthermore, the frame error handling process and the dynamic resolution decoding process can partially overlap. For instance, when the preset condition is not met, it falls under the frame error handling process, in which case the first-resolution image at the image index position requested by the input event of the current frame is decoded, and this first-resolution image is decoded before the corresponding frame is displayed, based on the frame error handling process. When the preset condition is met, it falls under the non-frame error handling process, in which case the second-resolution image is decoded and displayed in each frame.

[0080] Specifically, for example, setting the preset duration Δt to 100ms, taking scroll bar dragging as an example, after the scroll bar dragging operation begins, in the first frame, since 100ms has not been reached, the preset condition is not met, and the image decoded in this frame is, for example, a first-resolution image with image index positions 1000-1036; in the second frame, since 100ms has not been reached, the preset condition is not met, and the image decoded in this frame is a first-resolution image with image index positions 2000-2036; and so on, in the fourth frame, more than 100ms have elapsed since the first frame, that is, the duration from the time t1 (the first frame) when the interface starts scrolling to the current time t2 (the fourth frame) reaches more than the preset duration Δt of 100ms, between t1 and t2-100ms. At time t1, i.e., frame 1, the image index position requested by the input event in frame 4 is 4000-4036. That is, the image index position requested by the input event in the current frame does not include the image index position requested by the input event between t1 and t2-Δt. Therefore, the preset condition is not met. The image decoded in this frame is the first resolution image with image index positions 4000-4036. Similarly, during the rapid scrolling of the scroll bar, the preset condition will not be met, i.e., the first resolution image will be decoded. The decoded first resolution image will be displayed in subsequent frames. That is, during the rapid scrolling of the scroll bar, the lower resolution first resolution image will be decoded to improve the image decoding speed, i.e., to increase the probability that the image is decoded before it is displayed. When the user stops rapidly dragging the scroll bar, for example, when the user lifts their finger while dragging the scroll bar, let's say it's frame 13. The image index position requested by the input event in frame 13 is 10000-10036. Initially, the first resolution image corresponding to index positions 10000-10036 is decoded. Since the image index positions 10000-10036 requested by the input event in frame 13 include the image index positions requested by the input event in frame 13 - 100ms, the second resolution image corresponding to the image index positions 10000-10036 requested by the input event in frame 13 will be decoded. The decoded second resolution image will be displayed in subsequent processes, and starting from frame 13, the second resolution image will be decoded. Therefore, what is displayed next is the decoded second resolution image to achieve a clear image display.

[0081] If the preset conditions are not met, it means that the first speed exceeds the third threshold, i.e., the interface scrolling speed is too fast. Therefore, the first resolution image is decoded to improve the image decoding speed and reduce the problem of the image not being displayed in time. If the preset conditions are met, it means that the first speed does not exceed the third threshold, i.e., the interface scrolling speed is too slow. Therefore, the second resolution image is decoded to improve the image display clarity. At the same time, since the interface scrolling speed is slow at this time, even if the second resolution image is decoded, it can still be displayed in time.

[0082] In one possible implementation, such as Figure 4 and Figure 5 As shown, obtaining the image index position requested by the input event of frame n includes: executing the input event task of frame n to obtain the image index position requested by the input event of frame n; displaying the image of frame n-1 includes: executing the layout task of frame n-1 and the drawing task of frame n-1; obtaining the image index position requested by the input event of frame n+a includes: executing the input event task of frame n+a and obtaining the image index position requested by the input event of frame n+a; displaying the image of frame n includes: executing the layout task of frame n and the drawing task of frame n. Figure 4 and Figure 5 The Arabic numerals in the code represent the corresponding frame numbers. For example, Input Event 1 represents the input event task of frame 1, Layout 0 represents the layout task of frame 0, Render 0 represents the rendering task of frame 0, and Decode 1 represents the decoding task of frame 1. An input event task is a task performed in response to an input event.

[0083] It should be noted that the first threshold, the second threshold, and the third threshold in the embodiments of this application may be the same or different.

[0084] This application also provides an interface image processing method that does not rely on the aforementioned frame error processing procedure. The interface image processing method includes: displaying multiple images on the interface; the frame rate in a first state is lower than the frame rate in a second state, i.e., the duration of each frame in the first state is greater than the duration of each frame in the second state; in the first state, the interface scrolls, which can be triggered in response to a dragging operation on a scroll bar or a sliding operation on the interface; in the second state, the interface is stationary, and if the interface has a scroll bar, the scroll bar is also stationary when the interface is stationary. In this application embodiment, the change in frame rate does not depend on the frame error processing procedure; for example, at a 60Hz refresh rate, the duration of each frame is approximately 16ms. In this embodiment, for example, the duration of each frame is set to 32ms in the first state and 16ms in the second state. When the scroll bar is dragged or the interface is scrolled, the refresh rate is switched to 30Hz. At this time, the duration of each frame is 32ms. Image decoding and display of the current frame are performed in each frame. Therefore, the time for image decoding is longer within one frame, which can satisfy the requirement of decoding more images in one frame. Therefore, even if a large number of images are refreshed during the interface scrolling, there is a high probability that the decoding can be completed, thus improving the problem of images not being displayed in time. When the interface is stationary, the refresh rate is switched to 60Hz. At this time, the duration of each frame is 16ms. Image decoding and display of the current frame are performed in each frame. Since there is no need to refresh images when the interface is stationary, but only to refresh some interface changes and other content, no more image decoding time is required. The faster refresh rate can reduce the screen ghosting problem and make the display smoother.

[0085] In one possible implementation, without relying on the above-described frame error handling process, the interface image processing method includes: displaying multiple images on the interface; the frame rate in the first state is less than the frame rate in the second state, that is, the duration of each frame in the first state is greater than the duration of each frame in the second state; in the first state, the interface scrolls and the first speed exceeds the second threshold, the interface scrolling may be triggered in response to a drag operation on the scroll bar in the interface or in response to a sliding operation on the interface; in the second state, the interface is stationary, or the interface scrolls and the first speed does not exceed the second threshold. For example, in the first state, the frame duration is set to 32ms, and in the second state, the frame duration is set to 16ms. When the scroll bar is dragged quickly or the interface is scrolled rapidly, the refresh rate is switched to 30Hz. In this case, the frame duration is 32ms, and the image decoding and display of the current frame are performed within each frame. Therefore, the time for image decoding within a single frame is longer, which can satisfy the requirement of decoding more images simultaneously. Thus, even if a large number of images are refreshed during rapid scrolling, there is a high probability that the decoding can be completed, thereby improving the problem of images not being displayed in time. When the interface is stationary or scrolling at a slower speed, the refresh rate is switched to 60Hz. In this case, the frame duration is 16ms, and the image decoding and display of the current frame are performed within each frame. Since there is no need to refresh images or the number of images that need to be refreshed is small when the interface is stationary and scrolling at a slower speed, less image decoding time is required. The faster refresh rate can reduce screen ghosting and make the display smoother. Therefore, adding a frame rate reduction method to the frame error handling process can further improve the problem of image content not being able to be displayed in time during fast page scrolling.

[0086] This application also provides an interface image processing method that does not rely on the above-described frame error processing procedure. The interface image processing method includes: displaying multiple images on the interface; if a first speed exceeds a third threshold, the image is a first resolution image, where the first speed is the scrolling speed of the interface or the dragging speed of a scroll bar dragging operation; if the first speed does not exceed the third threshold, the image is a second resolution image, where the resolution of the second resolution image is greater than the resolution of the first resolution image. In other words, taking the interface scrolling triggered by a scroll bar dragging operation as an example, when the scroll bar dragging speed is fast, the decoded and displayed images are both lower-resolution first-resolution images; when the scroll bar dragging speed is slow or stationary, the decoded and displayed images are higher-resolution second-resolution images. During rapid scroll bar dragging, the problem of images not being displayed in time can be further improved. When the rapid scroll bar dragging ends and the scroll bar enters a slow dragging state or becomes stationary, the second-resolution image is decoded and displayed to achieve a clear display effect.

[0087] In one possible implementation, such as Figure 11 As shown, without relying on the above-mentioned frame error handling process, if the preset conditions are not met after the interface scrolling starts, the first resolution image is decoded and displayed; if the preset conditions are met after the interface scrolling starts, the second resolution image is decoded and displayed. The preset conditions are that the time from the moment the interface starts scrolling to the current moment reaches a preset time and the image index position requested by the input event of the current frame includes the image index position requested by the input event of the frame before the preset time.

[0088] Specifically, for example, setting the preset duration Δt to 100ms, taking scroll bar dragging as an example, after the scroll bar dragging operation begins, in the first frame, since 100ms has not been reached, the preset condition is not met, and the image decoded and displayed in this frame is, for example, a first-resolution image with image index positions 1000-1036; in the second frame, since 100ms has not been reached, the preset condition is not met, and the image decoded and displayed in this frame is a first-resolution image with image index positions 2000-2036; and so on, in the fourth frame, more than 100ms have elapsed since the first frame, that is, the duration from the time t1 (the first frame) when the interface starts scrolling to the current time t2 (the fourth frame) reaches more than the preset duration Δt of 100ms, and the time from t1 to t2-100ms... The interval is t1, which is the first frame. However, the image index position requested by the input event in the fourth frame is 4000-4036. That is, the image index position requested by the input event in the current frame does not include the image index position requested by the input event between t1 and t2-Δt. Therefore, the preset condition is not met. The image decoded and displayed in this frame is the first resolution image with image index positions 4000-4036. Similarly, the preset condition will not be met during the rapid dragging of the interface. That is, the first resolution image will be decoded. The decoded first resolution image will be displayed in the current frame. That is, during the rapid dragging of the scroll bar, the lower resolution first resolution image will be decoded and displayed to improve the decoding speed of the image, that is, to increase the probability that the image is decoded before it is displayed. When the user stops rapidly dragging the scroll bar, for example, when the user lifts their finger while dragging the scroll bar, let's say it's frame 13. The image index position requested by the input event in frame 13 is 10000-10036. Initially, the first resolution image corresponding to index positions 10000-10036 is decoded. Since the image index positions 10000-10036 requested by the input event in frame 13 include the image index positions requested by the input event in frame 13 - 100ms, the second resolution image corresponding to the image index positions 10000-10036 requested by the input event in frame 13 will be decoded. The decoded second resolution image will be displayed in the current frame, and starting from frame 13, the second resolution image will be decoded and displayed to achieve clear image display.

[0089] This application also provides an electronic device, including a processor and a memory. The memory stores at least one instruction, which, when loaded and executed by the processor, causes the electronic device to perform the interface image processing method in any of the above embodiments. The specific process and principle of the interface image processing method can be the same as those in the above embodiments, and will not be repeated here. Similarly, the specific structure and principle of the electronic device can be the same as those in the above embodiments, and will not be repeated here.

[0090] The electronic devices involved in this application may be any product such as smart TVs, mobile phones, tablets, personal computers (PCs), personal digital assistants (PDAs), smartwatches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, in-vehicle devices, drone devices, smart cars, smart speakers, robots, smart glasses, etc.

[0091] This application also provides a computer-readable storage medium, including a program or instructions, wherein the methods in any of the above embodiments are executed when the program or instructions are run on a computer.

[0092] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0093] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0094] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for processing interface images, characterized in that, The interface is used to display multiple images, and the method includes a frame error handling process, which includes: In frame n, obtain the image index position requested by the input event in frame n, decode the image corresponding to the image index position requested by the input event in frame n, and display the image of frame n-1. The image of frame n-1 includes the image corresponding to the image index position requested by the input event in frame n-1. In frame n+a, obtain the image index position requested by the input event in frame n+a, decode the image corresponding to the image index position requested by the input event in frame n+a, and display the image of frame n. The image of frame n includes the image corresponding to the image index position requested by the input event in frame n, where a is an integer greater than or equal to 1.

2. The method according to claim 1, characterized in that, If the first speed exceeds the first threshold, the frame error processing procedure is executed, where the first speed is the scrolling speed of the interface or the dragging speed of the scroll bar of the interface.

3. The method according to claim 1 or 2, characterized in that, a=1。 4. The method according to claim 1 or 2, characterized in that, a=2; The frame error handling process also includes: In frame n+1, obtain the image index position requested by the input event in frame n+1, decode the image corresponding to the image index position requested by the input event in frame n+1, and display the image in frame n-1.

5. The method according to claim 1 or 2, characterized in that, When the interface is a first view interface, the frame error processing flow is the first frame error processing flow. When the interface is a second view interface, the frame error processing flow is a second frame error processing flow, and the number of images displayed by the first view interface is less than the number of images displayed by the second view interface. In the first frame error handling process, a=1; In the second frame error processing flow, a=2; The second frame error handling process also includes: In frame n+1, obtain the image index position requested by the input event in frame n+1, decode the image corresponding to the image index position requested by the input event in frame n+1, and display the image in frame n-1.

6. The method according to claim 5, characterized in that, The first view interface is a daily view interface, and the second view interface is a monthly view interface or a yearly view interface. The daily view interface displays images on a daily basis, the monthly view interface displays images on a monthly basis, and the yearly view interface displays images on a yearly basis.

7. The method according to claim 2, characterized in that, The frame rate in the first state is lower than the frame rate in the second state; In the first state, the interface scrolls; in the second state, the interface remains still.

8. The method according to claim 2, characterized in that, The frame rate in the first state is lower than the frame rate in the second state; In the first state, the interface scrolls and the first speed exceeds the second threshold; In the second state, the interface is stationary, or the interface is scrolling and the first speed does not exceed the second threshold.

9. The method according to claim 8, characterized in that, The first threshold is less than or equal to the second threshold.

10. The method according to claim 2, characterized in that, If the first speed exceeds the third threshold, the image displayed on the interface is an image with the first resolution. If the first speed does not exceed the third threshold, the image displayed on the interface is a second resolution image, and the resolution of the second resolution image is greater than the resolution of the first resolution image.

11. The method according to claim 10, characterized in that, The first threshold is less than the third threshold.

12. The method according to claim 10 or 11, characterized in that, If the preset conditions are not met after scrolling begins on the interface, the first resolution image is decoded and displayed. After the scrolling of the interface begins, if the preset condition is met, the second resolution image is decoded and displayed. The preset condition is that the duration from the time t1 when the scrolling of the interface begins to the current time t2 reaches a preset duration Δt, and the image index position requested by the input event of the current frame includes at least a portion of the image index positions requested by the input events between t1 and t2-Δt.

13. The method according to any one of claims 1 to 12, characterized in that, The step of obtaining the image index position requested by the input event of the nth frame includes: executing the input event task of the nth frame to obtain the image index position requested by the input event of the nth frame; The process of displaying the image of the (n-1)th frame includes: performing the layout task of the (n-1)th frame and the drawing task of the (n-1)th frame; The step of obtaining the image index position requested by the input event of the (n+a)th frame includes: executing the input event task of the (n+a)th frame and obtaining the image index position requested by the input event of the (n+a)th frame. The process of displaying the image of the nth frame includes: performing the layout task of the nth frame and the drawing task of the nth frame.

14. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store at least one instruction that, when loaded and executed by the processor, causes the electronic device to perform the interface image processing method as described in any one of claims 1 to 13.

15. A computer-readable storage medium, characterized in that, Includes a program or instructions that, when run on a computer, execute the method as described in any one of claims 1 to 13.