Interface image processing method, electronic equipment and storage medium
By splitting the image decoding and display process into two frames in electronic devices, or adjusting the frame rate according to the interface scrolling speed, the problem of the picture content not being displayed in time when the page is scrolled quickly is solved, and the display efficiency and fluency are improved.
Patent Information
- Application Number
- CN202310960085.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-07-31
AI Technical Summary
During the rapid scrolling of the page of an electronic device, the image content may not be displayed in time.
By splitting the decoding and display process corresponding to the same frame into two frames, or reducing the frame rate when the interface scrolls faster, or increasing the response speed when the interface scrolls slowly, to ensure that the image has more before display The decoding is complete with a high probability.
It effectively improves the problem that the image content cannot be displayed in time during the fast scrolling of the page, and improves the display rate and fluency of the image during the scrolling process.
Smart Images

Figure CN119450079A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an interface image processing method, electronic device and storage medium. Background Art
[0002] As the camera functions of electronic devices such as mobile phones become more and more powerful, users will store a large number of pictures in electronic devices. Gallery applications are used to display pictures in electronic devices. Gallery applications usually include two types of page layouts: grid type and large picture type. The grid type page layout can display multiple pictures, helping users to obtain a wider range of picture content and quickly browse or locate pictures by sliding the page or dragging the scroll bar. However, in current electronic devices, when the page is scrolled quickly, the picture content may not be displayed in time. Summary of the invention
[0003] The technical solution of the present application provides an interface image processing method, an electronic device and a storage medium, which can improve the problem that the image content has not been displayed in time during the rapid scrolling of the page.
[0004] In a first aspect, an interface image processing method is provided, wherein the interface is used to display multiple images, and the method includes a frame error processing flow, wherein the frame error processing flow includes: in the nth frame, obtaining the image index position requested by the input event of the nth frame, decoding the image corresponding to the image index position requested by the input event of the nth frame, and displaying the image of the n-1th frame, wherein the image of the n-1th frame includes the image corresponding to the image index position requested by the input event of the n-1th frame; in the n+ath frame, obtaining the image index position requested by the input event of the n+ath frame, decoding the image corresponding to the image index position requested by the input event of the n+ath frame, and displaying the image of the nth frame, wherein the image of the nth frame includes the image corresponding to the image index position requested by the input event of the nth frame, and a is an integer greater than or equal to 1. By splitting the decoding and displaying processes corresponding to the same frame into two frames for execution, the image has a greater probability of being decoded before being displayed, thereby improving the problem that the image content is not displayed in time during the fast scrolling of the page.
[0005] In a possible implementation, if the first speed exceeds the first threshold, the error frame processing process is executed, and the first speed is the scrolling speed of the interface or the dragging speed of the scroll bar acting on the interface. When the interface scrolls faster, the error frame processing process is executed to increase the decoding events of the picture, and when the interface scrolls slower, the response speed is improved.
[0006] In a possible implementation, a = 1. The first error frame processing flow splits the decoding process and drawing process corresponding to the same frame into two adjacent frames for execution respectively, so that the image has a greater probability of being decoded before being displayed, thereby improving the problem that the image content cannot be displayed in time during fast page scrolling.
[0007] In a possible implementation, a=2; the error frame processing process also includes: in the n+1th frame, obtaining the image index position requested by the input event of the n+1th frame, decoding the image corresponding to the image index position requested by the input event of the n+1th frame, and displaying the image of the n-1th frame. Giving the image more decoding time allows it to have a greater probability of being displayed later, and in the subsequent process, the decoding and display of the image are performed in different staggered frames, that is, giving the image more decoding time to increase the probability of the image being displayed.
[0008] In a possible implementation, when the interface is a first view interface, the error frame processing process is a first error frame processing process; when the interface is a second view interface, the error frame processing process is a second error frame processing process, and the number of pictures displayed on the first view interface is less than the number of pictures displayed on the second view interface; in the first error frame processing process, a=1; in the second error frame processing process, a=2; the second error frame processing process also includes: in the n+1th frame, obtaining the picture index position requested by the input event of the n+1th frame, decoding the picture corresponding to the picture index position requested by the input event of the n+1th frame, and displaying the image of the n-1th frame.
[0009] In a 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 is an interface that displays pictures in days, the month view interface is an interface that displays pictures in months, and the year view interface is an interface that displays pictures in years.
[0010] In a 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 is stationary. When the number of pictures that need to be updated on the interface is large, a lower frame rate is used to increase the decoding speed of the pictures, and when the number of pictures that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the picture.
[0011] In a 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 the 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 a possible implementation manner, the first threshold is less than or equal to the second threshold.
[0013] In a possible implementation, if the first speed exceeds the third threshold, the picture displayed on the interface is a picture of the first resolution; if the first speed does not exceed the third threshold, the picture displayed on the interface is a picture of the second resolution, and the resolution of the second resolution picture is greater than the resolution of the first resolution picture. When the number of pictures that need to be updated on the interface is large, a lower resolution is used to decode the picture to increase the decoding speed of the picture, and when the number of pictures that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the picture.
[0014] In a possible implementation manner, the first threshold is smaller than the third threshold.
[0015] In a possible implementation manner, the second threshold is smaller than the third threshold.
[0016] In a possible implementation, after the scrolling of the interface starts, if a preset condition is not met, the first resolution picture is decoded and displayed; after the scrolling of the interface starts, if the preset condition is met, the second resolution picture is decoded and displayed, and the preset condition is that the duration from the moment t1 when the interface starts scrolling to the current moment t2 reaches a preset duration △t and the picture index position requested by the input event of the current frame includes at least part of the picture index position requested by the input event 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: executing 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-1th frame includes: executing the layout task of the n-1th frame and the drawing task of the n-1th frame; obtaining the image index position requested by the input event of the n+ath frame includes: executing the input event task of the n+ath frame and obtaining the image index position requested by the input event of the n+ath frame; displaying the image of the nth frame includes: executing the layout task of the nth frame and the drawing task of the nth frame.
[0018] In a second aspect, an interface image processing method is provided, comprising: displaying multiple pictures in an interface; a frame rate in a first state is lower than a frame rate in a second state; in the first state, the interface scrolls, and in the second state, the interface is stationary. When a large number of pictures need to be updated on the interface, a lower frame rate is used to increase the decoding speed of the pictures, and when a small number of pictures need to be updated on the interface, a higher frame rate is used to increase the smoothness of the picture.
[0019] In a third aspect, an interface image processing method is provided, including: displaying multiple pictures in an interface; the frame rate in a first state is less 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 dragging operation of a scroll bar acting 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 pictures that need to be updated on the interface is large, a lower frame rate is used to increase the decoding speed of the pictures, and when the number of pictures that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the picture.
[0020] In a fourth aspect, an interface image processing method is provided, including: displaying multiple pictures in an interface; if a first speed exceeds a third threshold, the picture is a first resolution picture, and the first speed is the scrolling speed of the interface or the dragging speed of the dragging operation of the scroll bar acting on the interface; if the first does not exceed the third threshold, the picture is a second resolution picture, and the resolution of the second resolution picture is greater than the resolution of the first resolution picture. When the number of pictures that need to be updated on the interface is large, a lower resolution is used to decode the picture to increase the decoding speed of the picture, and when the number of pictures that need to be updated on the interface is small, a higher frame rate is used to improve the smoothness of the picture.
[0021] In one possible implementation, after the scrolling of the interface starts, if a preset condition is not met, the first resolution picture is decoded and displayed; after the scrolling of the interface starts, if the preset condition is met, the second resolution picture is decoded and displayed, and the preset condition is that the duration from the moment the interface starts scrolling to the current moment reaches a preset duration and the picture index position requested by the input event of the current frame includes the picture index position requested by the input event of the frame before the preset duration.
[0022] In a fifth aspect, an electronic device is provided, comprising: a processor and a memory, the memory being used to store at least one instruction, and when the instruction is loaded and executed by the processor, the electronic device executes the above-mentioned interface image processing method.
[0023] In a sixth aspect, a computer-readable storage medium is provided, comprising a program or an instruction, and when the program or the instruction runs on a computer, the above method is executed.
[0024] The interface image processing method, electronic device and storage medium in the embodiments of the present application split the decoding and display processes corresponding to the same frame into two frames for execution. In this way, the image has a greater probability of being decoded before being displayed, thereby improving the problem of the image content not being displayed in time during the rapid scrolling of the page; or improving the problem of the image content not being displayed in time during the rapid scrolling of the page by reducing the frame rate; or improving the problem of the image content not being displayed in time during the rapid scrolling of the page by decoding lower resolution images. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A timing diagram of an image display in the related art;
[0026] Figure 2 This is a structural block diagram of an electronic device in an embodiment of the present application;
[0027] Figure 3 A schematic diagram of a software architecture in an embodiment of the present application;
[0028] Figure 4 A timing diagram of an interface image processing method in an embodiment of the present application;
[0029] Figure 5 for Figure 4 A corresponding schematic diagram of interface changes;
[0030] Figure 6 A timing diagram of another interface image processing method in an embodiment of the present application;
[0031] Figure 7 This is a schematic diagram of a day view interface in an embodiment of the present application;
[0032] Figure 8 This is a schematic diagram of a month view interface in an embodiment of the present application;
[0033] Fig. 9 This is a schematic diagram of a year view interface in an embodiment of the present application;
[0034] Fig.10 A schematic diagram of a flow chart of an interface image processing method in an embodiment of the present application;
[0035] Fig.11 It is a flowchart of another interface image processing method in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0037] Before describing the embodiments of the present application, the related technologies and their technical problems are described first. Figure 1As shown, in each frame of the related technology, the user interface (UI) thread executes input events, which are inputs triggered by each frame, such as the event of dragging the scroll bar. The dragging distance of the scroll bar is calculated based on the input event, and the requested image to be loaded is determined according to the dragging distance. The decoding thread decodes the image to be loaded requested by the input event to obtain the decoded image to be loaded, and the UI thread executes animation and traversal, which includes measurement, layout and drawing. Among them, the decoding thread notifies the UI thread of the completion of decoding through a message after the decoding is completed. Since the decoding is in the process of fast scrolling of the page, each frame displays a new image, and the decoding of the image takes a long time, resulting in the drawing of each frame always failing to obtain the decoded image requested by the current frame, resulting in the image requested by the current frame not being drawn and displayed in time, so that a white block will be displayed in the area where the image should be displayed. Figure 1 The numbers in the frame refer to the serial numbers of the frames corresponding to the executed tasks. In order to solve the above problems, a technical solution of the embodiment of the present application is provided, and the technical solution of the embodiment of the present application is described in detail below.
[0038] Figure 2 A schematic structural diagram of an electronic device 100 is shown.
[0039] The electronic device 100 may include a processor 110, an internal memory 121, a display screen 194, etc. It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0040] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0041] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0042] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0043] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0044] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0045] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0046] Figure 3 This is a schematic diagram of a software architecture in an embodiment of the present application, and the software architecture includes an application layer, a middleware layer, and an operating system framework layer. The application layer includes a gallery application, and the gallery application 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 is used to execute input events, the layout module is used to execute layout layout, the drawing module is used to execute drawing, and the rendering module is used to execute rendering. The error frame management module, the frame reduction management module, and the dynamic resolution module will be introduced in detail in the following content. The middleware layer includes a picture management middleware, and the picture management middleware includes an IO module, a decoding module, a post-processing module, and a cache management module. The IO module is used for input and output management of pictures, the decoding module is used for decoding pictures, the post-processing is used for processing decoded pictures, and the cache management is used for cache management of pictures. The operating system framework layer includes a file system, a graphics system, a media system, and a memory management system. The middleware is a functional layer between the application and the operating system, which is used to provide basic services or functions for application calls.
[0047] The embodiment of the present application provides an interface image processing method, the interface is used to display multiple pictures, the execution subject of the method can be the above electronic device, the method includes an error frame processing process, the error frame processing process includes:
[0048] In the nth frame, the picture index position requested by the input event of the nth frame is obtained, the picture corresponding to the picture index position requested by the input event of the nth frame is decoded, and the image of the n-1th frame is displayed, where the image of the n-1th frame includes the picture corresponding to the picture index position requested by the input event of the n-1th frame, where n is an integer greater than 1;
[0049] In the n+ath frame, the picture index position requested by the input event of the n+ath frame is obtained, the picture corresponding to the picture index position requested by the input event of the n+ath frame is decoded, and the image of the nth frame is displayed, the image of the nth frame includes the picture corresponding to the picture index position requested by the input event of the nth frame, and a is an integer greater than or equal to 1.
[0050] Specifically, Figure 4 and Figure 5 As shown, a=1, n=1 is taken as an example. The current interface is, for example, a gallery interface, and the current input is an input operation of a user dragging a scroll bar in the gallery interface. Assume that there are four consecutive frames from frame 0 to frame 3. In frame 0, the interface displays pictures 0 to 7 in the gallery, and in frames 1 to 3, the user drags the scroll bar in the interface to slide quickly. In frames 0 to 3, the positions where the scroll bar in the interface is dragged in the input operation are four positions A, B, C, and D. In frame 1, the UI thread executes the input event of frame 1, obtains the corresponding scroll bar drag position B, and obtains the picture index position corresponding to the position as 10 to 17, 10 to 17 are the picture index positions requested by the input event of frame 1, and the pictures corresponding to the index position can be pictures 10 to 17. In frame 1, the decoding thread decodes pictures 10 to 17. However, the image of frame 1 is not displayed in frame 1, that is, it does not scroll to the corresponding position in response to the scroll trigger of the scroll bar, but displays the image of frame 0. That is to say, in the first frame, only the picture corresponding to the first frame is decoded, and the interface still stays at the 0th frame in the first frame, that is, the scroll bar in the interface still stays at the A position, and the pictures displayed in the interface are still the pictures displayed when the scroll bar stays at the A position, that is, the 0th to 7th pictures are displayed. In the second frame, the UI thread executes the input event of the second frame, obtains the corresponding scroll bar drag position C, and obtains the picture index position corresponding to the position as 20 to 27. In the second frame, the decoding thread decodes the 20th to 27th pictures, and displays the image of the first frame in the second frame, and the image of the first frame includes the 10th to 17th pictures decoded in the first frame. In the third frame, the UI thread executes the input event of the third frame, obtains the corresponding scroll bar drag position D, and obtains the picture index position corresponding to the position as 30 to 37. In the third frame, the decoding thread decodes the 30th to 37th pictures, and displays the image of the second frame in the third frame, and the image of the second frame includes the 20th to 27th pictures decoded in the second frame. By analogy, in the error frame processing process, the corresponding input event and picture decoding are executed in the current frame, but the display of the image is delayed by one frame, that is, the decoding and display of the picture are performed in two staggered frames respectively. In this way, even if the decoding time of the picture is longer, it can be displayed in the next frame with a greater probability.
[0051] The interface image processing method in the embodiment of the present application splits the decoding and display processes corresponding to the same frame into two frames for execution. In this way, the image has a greater probability of being decoded before being displayed, thereby improving the problem of the image content not being displayed in time during the rapid scrolling of the page.
[0052] In a possible implementation, if the first speed exceeds the first threshold, the error frame processing process is executed, and the first speed is the scrolling speed of the interface or. That is to say, the interface in this embodiment is an application interface of the gallery type, and a scroll bar may be provided in the interface. When the electronic device detects a drag operation on the scroll bar or a sliding operation on the interface, the interface will scroll, and as the interface scrolls, the pictures displayed therein will be updated. The faster the scrolling speed of the interface, the greater the probability that a larger number of pictures need to be decoded in each frame during the scrolling process. In one embodiment, whether to trigger the execution of the error frame processing flow can be determined based on whether the dragging speed of the dragging operation of the scroll bar acting on the interface exceeds a first threshold. For example, if the dragging speed of the dragging operation of the scroll bar acting on the interface exceeds the first threshold, it means that the pictures in the interface will scroll and update quickly, and a large number of pictures need to be decoded in one frame time, resulting in a relatively large decoding pressure on the pictures. At this time, the error frame processing flow can be executed to try to avoid the problem of pictures not being displayed in time; if the dragging speed of the dragging operation of the scroll bar acting on the interface does not exceed the first threshold, it means that the picture scrolling and updating speed in the interface is slow, and a small number of pictures need to be decoded in one frame time, and the decoding pressure on the pictures is relatively small. At this time, the error frame processing flow does not need to be executed, and the non-error frame processing flow can be executed. In the non-error frame processing flow, the picture of the current frame can be decoded in each frame, and the image of the current frame can be displayed. Since the decoding pressure of the picture is small, the image of the current frame can be displayed based on the decoded picture of the current frame, that is, the image of the current frame includes the decoded picture of the current frame, and it is not easy to have the problem that the decoded picture is not displayed in time in the current frame. In another embodiment, whether to trigger the error frame processing 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.
[0053] In a possible implementation, the error frame processing flow includes a first error frame processing flow, in which a = 1. The first error frame processing flow splits the decoding process and the drawing process originally corresponding to the same frame into two adjacent frames for execution respectively, so that the image has a greater probability of being decoded before being displayed, thereby improving the problem that the image content has not been displayed in time during the fast scrolling of the page.
[0054] In a possible implementation manner, the error frame processing flow includes a second error frame processing flow. In the second error frame processing flow, Figure 6As shown, a=2; the second frame error processing process also includes: in the n+1th frame, obtaining the picture index position requested by the input event of the n+1th frame, decoding the picture corresponding to the picture index position requested by the input event of the n+1th frame, and displaying the image of the n-1th frame.
[0055] Specifically, in the second frame error process, the current interface is, for example, a gallery interface, taking n=1 as an example. The current input is an input operation of the user dragging the scroll bar in the gallery interface. Assume that there are five consecutive frames from the 0th frame to the 4th frame. In the 0th frame, the 0th to 36th pictures in the gallery are displayed in the interface, and in the 1st to 3rd frames, the user drags the scroll bar in the interface to slide quickly. In the 0th to 3rd frames, the positions where the scroll bar in the interface is dragged in the input operation are four positions A, B, C, and D respectively. In the nth frame, that is, the 1st frame, the UI thread executes the input event of the 1st frame, obtains the corresponding scroll bar drag position B, and obtains the picture index position corresponding to the position as 1000~1036, 1000~1036 is the picture index position requested by the input event of the 1st frame, and the picture corresponding to the index position can be the 1000th to 1036th pictures. In the 1st frame, the decoding thread decodes the 1000th to 1036th pictures. However, the image of frame 1 is not displayed in frame 1, that is, it does not scroll to the corresponding position in response to the scroll trigger of the scroll bar, but displays the image of frame 0. In other words, in frame 1, only the picture corresponding to frame 1 is decoded, and the interface remains at frame 0 in frame 1, that is, the scroll bar in the interface remains at position A, and the pictures displayed in the interface are still the pictures displayed when the scroll bar remains at position A, that is, pictures 0 to 36 are displayed. In frame n+1, i.e., frame 2, the UI thread executes the input event of frame 2, obtains the corresponding scroll bar drag position C, and obtains the picture index position corresponding to this position as 2000 to 2036. In the second frame, if the decoding process of the first frame is not completed, the decoding thread still decodes the 1000-1036th pictures, and decodes the pictures corresponding to the picture index position requested by the input event of the second frame, for example, decodes the 2000-2036th pictures, and still displays the image of the 0th frame in the second frame, that is, the pictures corresponding to the picture index position requested by the input event of the first frame are decoded in the time of the first frame and the second frame. In the n+2th frame, i.e., the third frame, the UI thread executes the input event of the third frame, obtains the corresponding scroll bar drag position D, and obtains the picture index position corresponding to the position as 3000-3036. In the third frame, the decoding thread still decodes the 2000th to 2036th pictures, and decodes the pictures corresponding to the picture index position requested by the input event of the third frame, for example, decodes the 3000th to 3036th pictures, and displays the image of the first frame in the third frame, the image of the first frame includes the 1000th to 1036th pictures decoded in the first and second frames. In the n+3th frame, i.e., the fourth frame, the UI thread executes the input event of the fourth frame, obtains the corresponding scroll bar drag position, and obtains the picture index position corresponding to the position as 4000-4036.In the 4th frame, the decoding thread still decodes the 3000-3036th pictures, and decodes the pictures corresponding to the picture index position requested by the input event of the 4th frame, for example, decodes the 4000-4036th pictures, and displays the image of the 2nd frame in the 4th frame, and the image of the 2nd frame includes the 2000-2036th pictures decoded in the 2nd frame and the 3rd frame. By analogy, in the second error frame processing flow, in the n+1th frame and the n+2th frame, the picture of the n+1th frame is decoded, and the picture of the n-1th frame is displayed. Starting from the nth frame, each frame uses two frames to decode a frame of pictures, and then displays the decoded pictures of the first two frames in the next frame. That is to say, the picture corresponding to the picture index position requested by the input event of any frame in the second error frame processing flow will be decoded in the first two frames of the frame, and displayed in the third frame of the frame. This method gives the image more decoding time, so that it has a greater probability of being displayed later, and in the subsequent process, the decoding and display of the image are performed in different staggered frames, that is, the image is given more decoding time to increase the probability of the image being displayed.
[0056] In a possible implementation, when the interface is the first view interface, the error frame processing process is the first error frame processing process; when the interface is the second view interface, the error frame processing process is the second error frame processing process, and the number of pictures displayed on the first view interface is less than or equal to the number of pictures displayed on the second view interface; in the first error frame processing process, a=1; in the second error frame processing process, a=2; the second error frame processing process also includes: in the n+1th frame, obtaining the picture index position requested by the input event of the n+1th frame, decoding the picture corresponding to the picture index position requested by the input event of the n+1th frame, and displaying the image of the n-1th 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 in the figure, the day view interface refers to the interface that displays pictures in units of days, such as Figure 8 As shown in the figure, the month view refers to an interface that displays pictures in units of months, such as Fig. 9 As shown, the year view interface refers to an interface that displays pictures in units of years. Compared with the day view interface, the number of pictures displayed on the same screen in the month view interface or the year view interface is more, so the number of pictures that need to be decoded in the same frame is also more. Therefore, when the interface is the second view interface with more pictures displayed, the second frame error processing flow is applied to achieve picture decoding of the nth frame through two frames of time, thereby increasing the probability of the picture being displayed. When the interface is the first view interface with fewer pictures displayed, the second frame error processing flow is applied to achieve picture decoding of the nth frame through one frame of frame error time, thereby increasing the probability of the picture being displayed and reducing the response time of the interface scrolling.
[0057] In the above embodiment, the first view interface and the second view interface are distinguished by different time granularity. In other possible implementations, the first view interface and the second view interface may also be view types classified based on other rules, as long as the first view interface is a view type for displaying more pictures and the second view interface is a view type for displaying fewer pictures. For example, the gallery has preset large picture mode, medium picture mode and small picture mode, and different view interfaces are distinguished by different modes. In the large picture mode, the display size of the picture is large, and the number of pictures displayed in the interface is small; in the medium picture mode, the display size of the picture is medium, and the number of pictures displayed in the interface is medium; in the small picture mode, the display size of the picture is small, and the number of pictures displayed in the interface is large. The first view interface may be a view interface in the large picture mode, and the second view interface may be a view interface in the medium picture mode or a view interface in the small picture mode.
[0058] The following is an explanation of the processing of one frame in the error frame processing flow of an embodiment of the present application through a specific example.
[0059] like Fig.10 As shown, the software architecture includes a basic fast scroll bar BaseFastScroller, a linear layout manager LinearLayoutManager, a grid album data adapter GridAlbumDataAdapter and a fast scroll bar data loader FastScrollerDataLoader. These four modules may be modules in the application layer. These four modules may execute the error frame processing flow by calling the error frame management module.
[0060] The basic fast scroll bar responds to the input event of finger pressing on the scroll bar, triggering the start of fast scrolling;
[0061] After the basic fast scroll bar starts fast scrolling, if it is determined that the displacement of the scroll bar dragged in the Y direction exceeds the first threshold, the frame error processing flow is triggered;
[0062] The error frame processing process includes:
[0063] The basic fast scroll bar calculates the image index position and offset requested by the input event of the current frame based on the displacement of the scroll bar dragging 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 scroll bar 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 scroll bar 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) according to 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, which means decoding.
[0067] The basic fast scroll bar 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 corresponding to the image index position requested by the input event of 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 a possible implementation, based on the frame error processing flow, 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 interface scrolling can be triggered in response to the dragging operation of the scroll bar in the interface, or in response to the sliding operation on the interface. In the second state, the interface is stationary. If there is a scroll bar in the interface, then when the interface is stationary, the scroll bar is also stationary. The frame rate refers to the number of times the screen is refreshed per second, and the frame refers to the refresh cycle of the screen, 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 about 16ms. In an embodiment of the present application, for example, the duration of each frame in the first state is set to 32ms, and the duration of each frame in the second state is set to 16ms. When the scroll bar is dragged or the interface is slid, the refresh rate is switched to 30Hz. At this time, the duration of each frame is 32ms. Therefore, the time for performing image decoding within one frame is longer, which can satisfy the decoding of more pictures in one frame. Therefore, even if the number of pictures refreshed during the scrolling of the interface is large, there is a high probability that the decoding can be completed, thereby improving the problem of the picture 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 the picture does not need to be refreshed when the interface is stationary, only some interface changes and other content need to be refreshed. Therefore, more picture decoding time is not required, and the faster refresh rate can gradually reduce the screen ghosting problem and make the display smoother.
[0071] In a possible implementation, based on the frame error processing 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, and the interface scrolling can be triggered in response to the dragging operation of the scroll bar in the interface, or it can be triggered in response to the sliding operation on the interface. In the second state, the interface is still, or the interface scrolls and the first speed does not exceed the second threshold. For example, the duration of each frame in the first state is set to 32ms, and the duration of each frame in the second state is set to 16ms. When the scroll bar is dragged at a faster speed or the interface is slid at a faster speed, it is switched to a refresh rate of 30Hz. At this time, the duration of each frame is 32ms. Therefore, the time for performing picture decoding within one frame is longer, which can meet the decoding of more pictures in one frame at the same time. Therefore, even if the number of pictures refreshed during the rapid scrolling of the interface is large, there is a high probability that the decoding can be completed, thereby improving the problem that the picture is not displayed in time; when the interface is stationary or scrolling at a slower speed, it is switched to a refresh rate of 60Hz. At this time, the duration of each frame is 16ms. Since the picture does not need to be refreshed or the number of pictures that need to be refreshed is small when the interface is stationary and scrolling at a slower speed, more picture decoding time is not required, and the faster refresh rate can gradually reduce the screen ghosting problem and make the display smoother. Therefore, superimposing the method of reducing the frame rate in the error frame processing process can further improve the problem that the picture content is not displayed in time during the rapid scrolling of the page. The method of reducing the frame rate can be implemented by the above-mentioned 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 processing process can be triggered based on the same speed threshold as the frame rate reduction process, or the frame error processing process can be triggered at a lower speed threshold relative to the frame rate reduction process, that is, the problem of the image not being displayed in time is improved based on the frame error processing process.
[0073] In a possible implementation, based on the frame error processing flow, a dynamic resolution decoding process can be implemented, and the dynamic resolution decoding process can be implemented by the above-mentioned dynamic resolution module. The specific implementation of the dynamic resolution decoding process is as follows: if the first speed exceeds the third threshold, the picture displayed in the interface is a first resolution picture; if the first speed does not exceed the third threshold, the picture displayed in the interface is a second resolution picture, and the resolution of the second resolution picture is greater than the resolution of the first resolution picture. That is to say, taking the drag operation on the scroll bar to trigger the scrolling of the interface as an example, when the drag speed of the drag operation of the scroll bar is fast, the decoded pictures are all first resolution pictures with lower resolution, and when the drag speed of the drag operation of the scroll bar is slow or stationary, the decoded pictures are second resolution pictures with higher resolution. For example, the resolution of the first resolution picture is 64*64, the resolution of the second resolution picture is 256*256, and the decoding time of the first resolution picture is only 1 / 4 of the decoding time of the second resolution picture. Therefore, decoding the first resolution picture can save the time consumed in decoding each picture. During the process of fast dragging of the scroll bar, the problem of the image not being displayed in time can be further improved. When the fast dragging of the scroll bar ends and the scroll bar is dragged slowly or stops, the second resolution image is decoded to meet the clear display effect.
[0074] In one possible implementation, the first threshold is smaller than the third threshold, that is, during the scrolling of the interface, the error frame processing process can be triggered at a lower speed threshold relative to the dynamic resolution decoding process, that is, the problem of the image not being displayed in time is improved based on the error frame processing process.
[0075] In addition, in the process of implementing the dynamic resolution decoding process and the frame rate reduction process, the second threshold is less than the third threshold, that is, the frame rate reduction process can be triggered at a lower speed threshold relative to the dynamic resolution decoding process.
[0076] In a possible implementation manner, based on the error frame processing flow, as follows Fig.11 As shown, when the dragging operation acting on the scroll bar starts, the first resolution picture is decoded, the layout task is performed based on the first resolution picture, the current time is recorded as t1, and it is determined whether the preset condition is met.
[0077] Among them, after the scrolling of the interface starts, if the preset conditions are not met, the drawing task is directly executed to display the image, and the next frame is entered after the image is displayed. That is to say, if the preset conditions are not met, the decoded and displayed picture is still the first resolution picture. If the interface image processing method of the current frame executes the wrong frame processing flow, the first resolution picture decoded by the current frame will be drawn and displayed in the n+ath frame. If the interface image processing method of the current frame does not execute the wrong frame processing flow, but displays the picture decoded by the current frame, the first resolution picture decoded by the current frame will be drawn and displayed in the current frame.
[0078] Among them, after the scrolling of the interface starts, if the preset conditions are met, the decoding of the second resolution picture is triggered, and the drawing task is performed to display the image, and then enter the next frame. That is to say, the second resolution picture with higher resolution will be decoded in the frame that meets the preset conditions, so as to display the second resolution picture with higher resolution next. If the interface image processing method of the current frame executes the wrong frame processing flow, the second resolution picture decoded by the current frame will be drawn and displayed in the n+a frame. If the interface image processing method of the current frame does not execute the wrong frame processing flow, but displays the decoded picture of the current frame, the second resolution picture decoded by the current frame will be drawn and displayed in the current frame.
[0079] Among them, the preset condition is that the duration from the moment t1 when the interface starts to scroll to the current moment t2 reaches the preset duration △t and the image index position requested by the input event of the current frame includes at least part of the image index position requested by the input event between t1 and t2-△t. That is to say, the electronic device will continue to determine whether the preset condition is met in each frame from the start of scrolling of the interface. After judging that a certain frame reaches t1+△t, the current moment t2 of each frame reaches and exceeds the preset duration △t of t1. Therefore, from each frame after t1+△t, it is continuously judged whether the image index position requested by the input event of the current frame includes at least part of the image index position requested by the input event between t1 and t2-△t to determine the resolution of the image that triggers decoding. The embodiment of the present application does not limit the relationship between the decoding process of dynamic resolution and the error frame processing process. For example, the dynamic resolution decoding process can be implemented in the error frame processing flow, that is, in each frame of the error frame processing flow, if the preset condition is not met, the first resolution picture of the picture index position requested by the input event of the current frame is decoded, and the first resolution picture decoded before the corresponding frame is displayed based on the error frame processing flow; in each frame of the error frame processing flow, if the preset condition is met, the second resolution picture of the picture index position requested by the input event of the current frame is decoded, and the second resolution picture decoded before the corresponding frame is displayed based on the error frame processing flow. For another example, the error frame processing flow and the dynamic resolution decoding process can be partially overlapped, for example, when the preset condition is not met, it belongs to the error frame processing flow, then the first resolution picture of the picture index position requested by the input event of the current frame is decoded, and the first resolution picture decoded before the corresponding frame is displayed based on the error frame processing flow; when the preset condition is met, it belongs to the non-error frame processing flow, then the second resolution picture is decoded and displayed in each frame.
[0080] Specifically, for example, the preset duration △t is set to 100ms. Taking the dragging of the scroll bar as an example, after the dragging operation on the scroll bar starts, the first frame does not reach 100ms, so the preset condition is not met, and the picture decoded in this frame is, for example, the first resolution picture at the picture index position 1000-1036; the second frame does not reach 100ms, so the preset condition is not met, and the picture decoded in this frame is the first resolution picture at the picture index position 2000-2036; and so on, the fourth frame, more than 100ms has passed since the first frame, that is, the duration from the moment t1 (the first frame) when the interface starts scrolling to the current moment t2 (the fourth frame) reaches more than the preset duration △t of 100ms, and between t1 and t2-100ms. It is moment t1, i.e., the first frame, but the picture index position requested by the input event of the fourth frame is 4000-4036, i.e., the picture index position requested by the input event of the current frame does not include the picture index position requested by the input event between t1 and t2-△t, and therefore the preset condition is still not met. The picture decoded in this frame is the first resolution picture at picture index position 4000-4036, and so on. During the rapid dragging of the scroll bar, the preset condition will not be met, i.e., the first resolution pictures will be decoded, and the decoded first resolution pictures will be displayed in subsequent frames, i.e., during the rapid dragging of the scroll bar, the first resolution pictures with lower resolution will be decoded to increase the decoding speed of the pictures, i.e., increase the probability that the pictures are decoded before being displayed. When the user no longer drags the scroll bar quickly, for example, the user lifts his finger while dragging the scroll bar, at this time, assuming it is the 13th frame, the image index position requested by the input event of the 13th frame is 10000~10036, and the first resolution image corresponding to the index position 10000~10036 is decoded at the beginning. Since the image index position 10000~10036 requested by the input event of the 13th frame includes the image index position requested by the input event at -100ms of the 13th frame, at this time, the decoding of the second resolution image corresponding to the image index position 10000~10036 requested by the input event of the 13th frame will be triggered. The decoded second resolution image will be displayed in the subsequent process, and starting from the 13th frame, the second resolution image will be decoded. Therefore, the decoded second resolution image is displayed next to achieve clear image display.
[0081] If the preset condition is not met, it means that the first speed exceeds the third threshold, that is, the interface scrolling speed is fast, so the first resolution picture is decoded to increase the decoding speed of the picture to reduce the problem of the picture not being displayed in time; if the preset condition is met, it means that the first speed does not exceed the third threshold, that is, the interface scrolling speed is slow, so the second resolution picture is decoded to improve the clarity of the picture display. At the same time, since the interface scrolling speed is slow at this time, even if the second resolution picture is decoded, it can be displayed in time.
[0082] In a possible implementation, Figure 4 and Figure 5 As shown, the above-mentioned obtaining the image index position requested by the input event of the nth frame includes: executing the input event task input of the nth frame to obtain the image index position requested by the input event of the nth frame; the above-mentioned displaying the image of the n-1th frame includes: executing the layout task layout of the n-1th frame and the drawing task draw of the n-1th frame; the above-mentioned obtaining the image index position requested by the input event of the n+ath frame includes: executing the input event task of the n+ath frame and obtaining the image index position requested by the input event of the n+ath frame; the above-mentioned displaying the image of the nth frame includes: executing the layout task of the nth frame and the drawing task of the nth frame. Figure 4 and Figure 5 The Arabic numerals in 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, drawing 0 represents the drawing task of frame 0, and decoding 1 represents the decoding task of frame 1. An input event task refers to a task executed in response to an input event.
[0083] It should be noted that the first threshold, the second threshold and the third threshold in the embodiment of the present application may be the same or different.
[0084] The embodiment of the present application also provides an interface image processing method, which may not rely on the above-mentioned frame error processing process, and the interface image processing method includes: displaying multiple pictures in 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 interface scrolling can be triggered in response to the dragging operation of the scroll bar acting on the interface, or it can be triggered in response to the sliding operation acting on the interface. In the second state, the interface is stationary. If there is a scroll bar in the interface, then when the interface is stationary, the scroll bar is also stationary. In the embodiment of the present application, the change of the frame rate may not rely on the frame error processing process. For example, at a refresh rate of 60Hz, the duration of each frame is about 16ms. In an embodiment of the present application, for example, the duration of each frame in the first state is set to 32ms, and the duration of each frame in the second state is set to 16ms. When the scroll bar is dragged or the interface is slid, the refresh rate is switched to 30Hz. At this time, the duration of each frame is 32ms, and the picture decoding and the picture display of the current frame are executed in each frame. Therefore, the time for executing picture decoding within one frame is longer, which can meet the requirement of decoding more pictures in one frame at the same time. Therefore, even if the number of pictures refreshed during the scrolling of the interface is large, there is a greater probability that the decoding can be completed, thereby improving the problem of not having time to display the pictures; when the interface is static, the refresh rate is switched to 60Hz. At this time, the duration of each frame is 16ms, and the picture decoding and the picture display of the current frame are executed in each frame. Since when the interface is static, there is no need to refresh the picture, but only some interface changes and other content need to be refreshed. Therefore, no more picture decoding time is required, and a faster refresh rate can gradually reduce the screen ghosting problem and make the display smoother.
[0085] In a possible implementation, without relying on the above-mentioned frame error processing process, the interface image processing method includes: displaying multiple pictures in 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, and the interface scrolling can be triggered in response to the dragging operation of the scroll bar in the interface, or in response to the 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, the duration of each frame in the first state is set to 32ms, and the duration of each frame in the second state is set to 16ms. When the scroll bar is dragged at a faster speed or the interface is slid at a faster speed, the refresh rate is switched to 30Hz. At this time, the duration of each frame is 32ms, and the picture decoding and the picture display of the current frame are executed in each frame. Therefore, the time for executing picture decoding in one frame is longer, which can meet the decoding of more pictures in one frame at the same time. Therefore, even if the number of pictures refreshed during the fast scrolling of the interface is large, there is a high probability that the decoding can be completed, thereby improving the problem of the picture not being displayed in time; when the interface is stationary or scrolling at a slower speed, the refresh rate is switched to 60Hz. At this time, the duration of each frame is 16ms, and the picture decoding and the picture display of the current frame are executed in each frame. Since when the interface is stationary and scrolling at a slower speed, there is no need to refresh the picture or the number of pictures that need to be refreshed is small, therefore, more picture decoding time is not required, and the faster refresh rate can gradually reduce the screen ghosting problem, making the display smoother. Therefore, superimposing a method of reducing the frame rate in the frame error processing process can further improve the problem of image content not being displayed in time during fast page scrolling.
[0086] The embodiment of the present application also provides an interface image processing method, which can be independent of the above-mentioned frame error processing process, and the interface image processing method includes: displaying multiple pictures in the interface; if the first speed exceeds the third threshold, the picture is a first resolution picture, and the first speed is the scrolling speed of the interface or the dragging speed of the dragging operation of the scroll bar acting on the interface; if the first speed does not exceed the third threshold, the picture is a second resolution picture, and the resolution of the second resolution picture is greater than the resolution of the first resolution picture. That is to say, taking the dragging operation on the scroll bar to trigger the scrolling of the interface as an example, when the dragging speed of the dragging operation of the scroll bar is fast, the decoded and displayed pictures are all first resolution pictures with lower resolution, and when the dragging speed of the dragging operation of the scroll bar is slow or stationary, the decoded and displayed pictures are second resolution pictures with higher resolution. In the process of fast dragging of the scroll bar, the problem of the picture not being displayed in time can be further improved, and when the fast dragging of the scroll bar ends and the slow dragging of the scroll bar or the stationary state is entered, the second resolution picture is decoded and displayed to meet the clear display effect.
[0087] In a possible implementation, Fig.11 As shown, without relying on the above-mentioned frame error processing process, after the scrolling of the interface starts, if the preset condition is not met, the first resolution picture is decoded and displayed; after the scrolling of the interface starts, if the preset condition is met, the second resolution picture is decoded and displayed, and the preset condition is that the time from the moment the interface starts scrolling to the current moment reaches the preset time and the picture index position requested by the input event of the current frame includes the picture index position requested by the input event of the frame before the preset time.
[0088] Specifically, for example, the preset duration △t is set to 100ms. Taking the dragging of the scroll bar as an example, after the dragging operation on the scroll bar starts, the first frame does not reach 100ms, so the preset condition is not met, and the picture decoded and displayed in this frame is, for example, the first resolution picture at the picture index position 1000-1036; the second frame does not reach 100ms, so the preset condition is not met, and the picture decoded and displayed in this frame is the first resolution picture at the picture index position 2000-2036; and so on, the fourth frame, more than 100ms has passed since the first frame, that is, the duration from the moment t1 (the first frame) when the interface starts scrolling to the current moment t2 (the fourth frame) reaches more than the preset duration △t of 100ms, and the duration from t1 to t2-100ms is The time interval is t1, i.e., the 1st frame, but the picture index position requested by the input event of the 4th frame is 4000-4036, i.e., the picture index position requested by the input event of the current frame does not include the picture index position requested by the input event between t1 and t2-△t, and therefore the preset condition is still not met, and the picture decoded and displayed in this frame is the first resolution picture at the picture index position 4000-4036, and so on. During the rapid dragging of the interface, the preset condition will not be met, i.e., the first resolution pictures will be decoded, and the decoded first resolution pictures will be displayed in the current frame, i.e., during the rapid dragging of the scroll bar, the first resolution picture with a lower resolution will be decoded and displayed to increase the decoding speed of the picture, i.e., increase the probability that the picture is decoded before being displayed. When the user no longer drags the scroll bar quickly, for example, the user lifts his finger while dragging the scroll bar, at this time, assuming it is the 13th frame, the image index position requested by the input event of the 13th frame is 10000~10036, and the first resolution image corresponding to the index position 10000~10036 is decoded initially. Since the image index position 10000~10036 requested by the input event of the 13th frame includes the image index position requested by the input event at -100ms of the 13th frame, at this time, the decoding of the second resolution image corresponding to the image index position 10000~10036 requested by the input event of the 13th frame will be triggered, and the decoded second resolution image will be displayed in the current frame, and starting from the 13th frame, the second resolution image will be decoded and displayed to achieve clear image display.
[0089] The embodiment of the present application also provides an electronic device, including: a processor and a memory, the memory is used to store at least one instruction, when the instruction is loaded and executed by the processor, the electronic device executes 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 the above embodiment, and will not be repeated here. The specific structure and principle of the electronic device can be the same as the above embodiment, and will not be repeated here.
[0090] The electronic devices involved in this application may be smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, and any other products.
[0091] An embodiment of the present application further provides a computer-readable storage medium, including a program or an instruction. When the program or the instruction runs on a computer, the method in any of the above embodiments is executed.
[0092] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of 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, the process or function described in this application is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.
[0093] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated 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 be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0094] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An interface image processing method, characterized in that: The interface is used to display multiple pictures. The method includes a frame error processing process, and the frame error processing process includes: In the nth frame, the picture index position requested by the input event of the nth frame is obtained, the picture corresponding to the picture index position requested by the input event of the nth frame is decoded, and the image of the n-1th frame is displayed, where the image of the n-1th frame includes the picture corresponding to the picture index position requested by the input event of the n-1th frame; In the n+ath frame, the picture index position requested by the input event of the n+ath frame is obtained, the picture corresponding to the picture index position requested by the input event of the n+ath frame is decoded, and the image of the nth frame is displayed, the image of the nth frame includes the picture corresponding to the picture index position requested by the input event of the nth frame, and 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 process is executed, and the first speed is the scrolling speed of the interface or the dragging speed of the dragging operation of the scroll bar acting on 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 error frame processing process also includes: In the n+1th frame, the picture index position requested by the input event of the n+1th frame is obtained, the picture corresponding to the picture index position requested by the input event of the n+1th frame is decoded, and the image of the n-1th frame is displayed.
5. The method according to claim 1 or 2, characterized in that: When the interface is the first view interface, the error frame processing flow is the first error frame processing flow; When the interface is the second view interface, the frame error processing flow is the second frame error processing flow, and the number of pictures displayed in the first view interface is less than the number of pictures displayed in 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 process also includes: In the n+1th frame, the picture index position requested by the input event of the n+1th frame is obtained, the picture corresponding to the picture index position requested by the input event of the n+1th frame is decoded, and the image of the n-1th frame is displayed.
6. The method according to claim 5, characterized in that 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 is an interface for displaying pictures in units of days, the month view interface is an interface for displaying pictures in units of months, and the year view interface is an interface for displaying pictures in units of years.
7. The method according to claim 2, characterized in that: 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 in the second state, the interface is stationary.
8. The method according to claim 2, characterized in that: 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 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 a third threshold, the picture displayed on the interface is a picture of the first resolution; If the first speed does not exceed the third threshold, the picture displayed on the interface is a second-resolution picture, and the resolution of the second-resolution picture is greater than the resolution of the first-resolution picture.
11. The method according to claim 10, characterized in that The first threshold is smaller than the third threshold.
12. The method according to claim 10 or 11, characterized in that: After the scrolling of the interface starts, if the preset condition is not met, decoding and displaying the first resolution picture; After the scrolling of the interface starts, if the preset condition is met, the second resolution picture is decoded and displayed, and the preset condition is that the duration from the moment t1 when the interface starts scrolling to the current moment t2 reaches the preset duration △t and the picture index position requested by the input event of the current frame includes at least part of the picture index position requested by the input event between t1 and t2-△t.
13. The method according to any one of claims 1 to 12, characterized in that The obtaining of the picture index position requested by the input event of the nth frame comprises: executing the input event task of the nth frame to obtain the picture index position requested by the input event of the nth frame; Displaying the image of the n-1th frame includes: executing the layout task of the n-1th frame and the drawing task of the n-1th frame; The obtaining of the picture index position requested by the input event of the n+ath frame comprises: executing the input event task of the n+ath frame and obtaining the picture index position requested by the input event of the n+ath frame; Displaying the image of the nth frame includes: executing a layout task of the nth frame and a drawing task of the nth frame.
14. An interface image processing method, characterized in that: include: Display multiple pictures in the interface; 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 in the second state, the interface is stationary.
15. An interface image processing method, characterized in that: include: Display multiple pictures in the interface; 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 a first speed exceeds a second threshold, the first speed being the scrolling speed of the interface or the dragging speed of a dragging operation on a scroll bar of the interface; In the second state, the interface is stationary, or the first speed does not exceed the second threshold.
16. An interface image processing method, characterized in that: include: Display multiple pictures in the interface; If the first speed exceeds the third threshold, the picture is a first resolution picture, and the first speed is a scrolling speed of the interface or a dragging speed of a scroll bar acting on the interface; If the first does not exceed the third threshold, the picture is a second-resolution picture, and the resolution of the second-resolution picture is greater than the resolution of the first-resolution picture.
17. The method according to claim 16, characterized in that After the scrolling of the interface starts, if the preset condition is not met, decoding and displaying the first resolution picture; After the scrolling of the interface starts, if the preset condition is met, the second resolution picture is decoded and displayed, and the preset condition is that the time from the moment the interface starts scrolling to the current moment reaches the preset time and the picture index position requested by the input event of the current frame includes the picture index position requested by the input event of the frame before the preset time.
18. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the electronic device executes the interface image processing method as described in any one of claims 1 to 17.
19. A computer-readable storage medium, characterized in that: The method comprises a program or an instruction, and when the program or the instruction is run on a computer, the method according to any one of claims 1 to 17 is executed.
Citation Information
Patent Citations
Display method and apparatus for diversely displaying an object according to scroll speed
CN104077025A
Sliding display method and sliding display device of list data of mobile terminal
CN105892831A
Selective decoding of an input stream
US20110141362A1
Render transform based scrolling and panning for smooth effects
US20120144333A1
Page search method and electronic device supporting the same
US20140215386A1
Cited By
Interface image processing method, electronic device, and storage medium
EP4716220A1
Interface image processing method, electronic device, and storage medium
WO2025025992A1