Picture loading and displaying method and terminal
By obtaining and creating view controls in the terminal device and loading and displaying pictures in an orderly manner within the time period, the problem of out-of-order flashing is solved, the user's visual experience is improved, and the orderly loading and display of pictures is achieved.
Patent Information
- Application Number
- PCT/CN2024/091429
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-17
- Filing Date
- 2024-05-07
- Publication Date
- 2024-11-21
AI Technical Summary
In the prior art, the picture loading display often occurs in out-of-order flashes in terminal devices such as mobile phones, resulting in poor user visual experience, especially when opening or refreshing the application, the image display effect is chaotic.
By obtaining the pictures in the application interface and creating a view control, at least one picture is loaded in the first time period and displayed in its position in order; if the pictures are not fully loaded, continue to load the remaining pictures in the second time period. And displayed in order, using unified transparency animation to enhance the visual experience.
It realizes the orderly loading and display of pictures, improves the user's visual experience, avoids out-of-order flashes and chaotic display effects, and is in line with the user's browsing habits.
Smart Images

Figure CN2024091429_21112024_PF_FP_ABST
Abstract
Description
Image loading and display method and terminal Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a method and terminal for loading and displaying images. Background Art
[0002] Mobile phones and other terminals typically have one or more applications (APPs) installed, allowing users to access a wide range of functionality. Conventional technology often causes images to appear out of order when opened or refreshed in apps whose display elements contain images. This can be confusing and inconsistent with the order in which users typically view images within an app.
[0003] Summary of the Invention
[0004] The embodiments of the present application provide a method and terminal for loading and displaying an image, which are used to solve the problem in the prior art of out-of-order flashing of images and chaotic display effects when loading and displaying images.
[0005] In a first aspect, an embodiment of the present application provides a method for loading and displaying images, comprising: obtaining N images in a first interface of a first application, where N is a positive integer; creating a view control corresponding to the N images in the first interface; loading at least one of the N images within a first time period; after the first time period ends, displaying the at least one image in the first interface in a first order according to the position of the view control corresponding to the at least one image.
[0006] The embodiment of the present application can display at least one image among N images that have been loaded in the first interface of the first application within the first time period in a first order, thereby avoiding causing a disordered and chaotic poor visual experience to the user.
[0007] In a possible implementation of the first aspect, after creating the view control corresponding to the N pictures in the first interface, it also includes: displaying a placeholder image at the position of the view control corresponding to the N pictures, and the placeholder image is a background image that temporarily replaces the picture for display.
[0008] That is to say, a placeholder image can be displayed first at the position of the view control corresponding to the N images to avoid giving the user a bad visual experience of missing images in the first interface.
[0009] In a possible implementation of the first aspect, displaying the at least one picture in the first interface in the first order includes: displaying the at least one picture in the first interface in an order from top to bottom and from left to right.
[0010] In a possible implementation of the first aspect, while displaying the at least one picture in the first interface in the first order, the method also includes: displaying the at least one picture in the first interface using a unified transparency animation, wherein the unified transparency animation includes uniformly setting the values of the alpha channels of the at least one picture to the same value at the same time.
[0011] In a possible implementation of the first aspect, after displaying the at least one picture in the first interface in the first order, it also includes: loading at least one remaining picture of the N pictures except the at least one picture within a second time period; after the second time period ends, displaying the at least one remaining picture in the first interface in the first order according to the position of the view control corresponding to the at least one remaining picture.
[0012] That is to say, after at least one picture is displayed in the first interface in the first order, if there is at least one remaining picture in the first interface that has not been loaded, the at least one remaining picture can be loaded within the second time period; and after the second time period ends, the at least one remaining picture is displayed in the first order.
[0013] In a possible implementation of the first aspect, while displaying the at least one remaining picture in the first order, the method further includes: displaying the at least one remaining picture in the first interface using the unified transparency animation.
[0014] In the second aspect, an embodiment of the present application provides a terminal device, comprising: a memory for storing instructions executed by one or more processors of the terminal device; a transceiver for receiving or sending radio signals; and a processor, which, when the processor executes the instructions in the memory, enables the terminal device to implement the steps of the image loading and display method proposed in the first aspect of the embodiment of the present application.
[0015] In a third aspect, an embodiment of the present application provides a chip, wherein the chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program code; when the computer program code is executed by the processing circuit, the steps of the image loading and display method proposed in the first aspect of the embodiment of the present application are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a computer, the computer executes the steps of the image loading and display method proposed in the first aspect of the embodiment of the present application.
[0017] Compared with the prior art, the embodiment of the present application can display the pictures in the first interface in an orderly manner, thereby improving the user's visual experience when browsing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram of the interface changes when a user opens an APP in the application store in the prior art;
[0019] FIG2 is a schematic diagram showing interface changes during a user swiping to refresh a gallery APP in the prior art;
[0020] FIG3 is a schematic diagram of the structure of a mobile phone provided in an embodiment of the present application;
[0021] FIG4 is a software structure block diagram of a terminal device provided in an embodiment of the present application;
[0022] FIG5 is a process diagram 1 of a method for loading and displaying an image provided by an embodiment of the present application;
[0023] FIG6 is a second process diagram of a method for loading and displaying an image provided by an embodiment of the present application;
[0024] FIG7 is a flow chart of a method for loading and displaying an image according to an embodiment of the present application;
[0025] FIG8 is a first structural diagram of a terminal device provided in an embodiment of the present application;
[0026] FIG9 is a second structural diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0029] Applications on terminal devices that display images as display elements can provide users with rich and intuitive information. In today's era of rapid development of smart terminal devices, applications containing images as display elements are emerging in an endless stream, meeting user needs in various fields. However, when a user opens an application and loads images for display, images may appear out of order, resulting in a confusing display and a poor user experience.
[0030] As shown in FIG1 , the user selects to open the application store 102 in the main interface 101 of the mobile phone 100, and the interface quickly changes to the placeholder interface 103, in which all pictures are replaced by placeholders (solid color pictures, shown in white), such as the promotional picture at position 104, the placeholder picture at position 105, and the placeholder picture at position 106. Icon image of position 106 The game icon image and location 107 All icon images will be displayed instead of placeholder images.
[0031] Then, the image is displayed in the interface after it is loaded in the background according to the principle of "whoever loads first will be displayed first", so the interface can be transformed into the interface shown in interface 108: Popular applications at position 109 The first one to be loaded will display the icon image, while the rest of the applications will still display the placeholder image. The icon image seems to flash suddenly, and the visual effect is abrupt.
[0032] Then, at position 111 The icon image is also loaded and displayed, as shown in interface 110. Position 111 is located to the left of position 109. If the human visual sequence from top to bottom and from left to right is used, the position 111 should be displayed first. The icon image is displayed at position 109 , but the actual image is at position 109. The icon image is displayed first after it is loaded. The icon image is displayed after loading, see the change from interface 108 to interface 110, which brings a bad visual experience of disordered display to the user.
[0033] As more and more images are loaded and displayed, the interface 110 may be transformed into the interface 112. It should be noted that the icon images at positions 105, 113, 114, 115 and 116 are still displayed according to the principle of "whoever loads first is displayed first". A possible display order is: the icon image at position 115 The icon image at position 114 is displayed first after it is loaded. Icon image, position 113 Icon image, location 105 Icon image and location 116 The icon images are loaded one by one and displayed. During this process, the visual effect presented to the user is still a chaotic feeling of flashing out of order.
[0034] As time goes by, all the pictures are loaded and displayed, and the interface 112 changes to the interface 117. Similarly, the pictures at position 104, position 118, position 119, position 106 and position 107 are also displayed according to the principle of "whoever loads first is displayed first". A possible display order is: the picture at position 107 The icon image is loaded first and displayed first, followed by the one at position 118 Icon image, location 119 Icon image, location 106 The icon image and the promotional image at position 104 are loaded and displayed in sequence. Although the change from interface 101 to interface 117 is short, the overall visual effect to the user is disordered and messy, causing a bad visual experience of "flash" and "jump" to the user.
[0035] In addition, when the user slides to refresh the pictures in the application (or browses pictures in other ways), the pictures will also flash out of order. Please refer to Figure 2, when the user opens the gallery application of the mobile phone 100, all the pictures on the gallery homepage are loaded, and the display result is shown in interface 201.
[0036] If the user swipes upward in interface 201 to view earlier images, interface 201 changes to interface 202: some images that load quickly are loaded and displayed first according to the principle of "first loaded, first displayed", such as the image displayed at position 203; while some images that load slowly are not loaded in time, and placeholder images are displayed first at the positions where they should be displayed, such as position 204. At this time, the image displayed at position 203 will create an abrupt visual effect for the user.
[0037] As time passes, more images are loaded and displayed. For example, the image at position 204 is loaded and displayed after the image at position 203, and then interface 202 changes to interface 205. It should be noted that although position 204 is above position 203 in interface 205, the image at position 204 is displayed after the image at position 203, and is not displayed in order from top to bottom and left to right. This gives the user a bad visual impression of disorder.
[0038] After staying on the interface 205 for a certain period of time and all the pictures in the interface 205 are loaded, the interface 205 will eventually change to the interface 206. It should be noted that the pictures in the interface 206 are not displayed in the order of position 207 to position 211 from top to bottom and from left to right, but are still displayed according to the principle of "whoever loads first will be displayed first". For example, the picture at position 211 is loaded first and displayed first (the pictures at positions 203 and 204 have been displayed in the interface 205), then the picture at position 208 is loaded and displayed, the picture at position 207 is loaded and displayed, the picture at position 210 is loaded and displayed, and finally the picture at position 209 is loaded and displayed.
[0039] Although the time it takes for interface 201 to change to interface 206 is relatively short, the image refresh process creates a chaotic and random "flickering" experience for the user, which is inconsistent with the typical user's top-to-bottom and left-to-right browsing habits. In particular, when the user continuously swipes to refresh images, the chaotic flashing experience becomes more pronounced, significantly impacting the user's visual experience.
[0040] In order to solve the problem in the prior art that images flash out of order during the loading and display process when opening or refreshing images, the embodiment of the present application uniformly manages the order in which images appear according to their positions, and provides a method for orderly loading and displaying images.
[0041] The method for displaying an application icon provided in an embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, laptop computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, vehicle-mounted devices, and virtual reality devices, and the embodiment of the present application does not impose any restrictions on this.
[0042] For example, the terminal referred to in the embodiments of the present application is a mobile phone. As shown in FIG3 , the mobile phone 100 includes:
[0043] Processor 310, memory (including external memory interface 320 and internal memory 321), universal serial bus (USB) interface 330, charging management module 340, power management module 341, battery 342, antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, audio module 370, speaker 370A, receiver 370B, microphone 370C, headphone jack 370D, sensor module 380, button 390, motor 391, indicator 392, camera 393, display screen 394, and subscriber identification module (SIM) card interface 395, etc.
[0044] It should be understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on mobile phones. In other embodiments of the present application, the mobile phone may include more or fewer components than shown in the figure, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0045] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a flight controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. In an embodiment of the present application, the processor 310 may process instructions for loading images through a graphics processor, etc.
[0046] In some embodiments, the mobile phone 100 may also include one or more processors 310. The controller may generate an operation control signal based on the instruction opcode and timing signal to control instruction fetching and execution. In other embodiments, the processor 310 may also be provided with a memory for storing instructions and data. For example, the memory in the processor 310 may be a cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 310. If the processor 310 needs to use the instruction or data again, it may directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thereby improves the efficiency of the mobile phone 100 in processing data or executing instructions.
[0047] In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0048] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 310 through the external memory interface 320 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0049] The internal memory 321 can be used to store computer executable program codes, which include instructions. The internal memory 321 may include a program storage area and a data storage area. 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 mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 321 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 310 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 321 and / or instructions stored in a memory provided in the processor.
[0050] The charging management module 340 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 can receive charging input from the wired charger via the USB interface 330. In some wireless charging embodiments, the charging management module 340 can receive wireless charging input via the wireless charging coil of the mobile phone 100. While charging the battery 342, the charging management module 340 can also provide power to the mobile phone 100 via the power management module 341.
[0051] The power management module 341 is used to connect the battery 342, the charging management module 340, and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340 and provides power to the processor 310, the internal memory 321, the display 394, the camera assembly 393, and the wireless communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 341 can also be provided in the processor 310. In other embodiments, the power management module 341 and the charging management module 340 can also be provided in the same device.
[0052] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor and the baseband processor.
[0053] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0054] The mobile communication module 350 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the mobile phone 100. The mobile communication module 350 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be set in the processor 310. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be set in the same device as at least some of the modules of the processor 310.
[0055] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 370A, the receiver 370B, etc.) or displays an image or video through the display screen 394. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 310 and be provided in the same device as the mobile communication module 350 or other functional modules.
[0056] The wireless communication module 360 can provide wireless communication solutions including near field communication (NFC), wireless local area networks (WLAN) (such as WiFi networks), Bluetooth BT, global navigation satellite system (GNSS), frequency modulation (FM), infrared technology (IR), etc. applied on the mobile phone 100. The wireless communication module 360 can be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module 360 can also receive the signal to be sent from the processor 310, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0057] In some embodiments, the antenna 1 of the mobile phone 100 is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS) and / or satellite based augmentation system (SBAS). The mobile phone 100 can establish a communication connection with other devices through the mobile communication module 350 and perform data transmission with the other devices through the established communication connection.
[0058] The mobile phone 100 implements display functions through a GPU, display screen 394, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs that execute program instructions to generate or change display information. In embodiments of the present application, the GPU can be used to convert and drive the display information required by the computer system and provide horizontal scanning signals to the display to control the display to correctly display content, such as various images.
[0059] The display screen 394 is used to display images, videos, etc. The display screen 394 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 mobile phone 100 may include 1 or N display screens 394, where N is a positive integer greater than 1. In the embodiment of the present application, the display screen 394 is mainly used to display various pictures, such as pictures of application icons, pictures taken in the gallery, and animations.
[0060] The mobile phone 100 can realize the shooting function through the ISP, the camera component 393, the video codec, the GPU, the display screen 394 and the application processor.
[0061] The mobile phone 100 can implement audio functions such as music playback and recording through the audio module 370, speaker 370A, receiver 370B, microphone 370C, and application processor. For the specific operating principles and functions of the audio module 370, speaker 370A, receiver 370B, and microphone 370C, please refer to the description in conventional technology.
[0062] The sensor module 380 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0063] Keys 390 include a power button, a volume button, etc. Keys 390 may be mechanical keys or touch keys. Mobile phone 100 may receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 100.
[0064] Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 394, motor 391 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0065] Indicator 392 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0066] The camera 393 is used to shoot pictures. The camera can be a wide-angle camera, a main camera, a macro camera, a telephoto camera, a time of flight (TOF) camera, etc.
[0067] The SIM card interface 395 is used to connect a SIM card. The SIM card can be connected to and disconnected from the mobile phone 100 by inserting it into or removing it from the SIM card interface 395. The mobile phone 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 395 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 395 can also be compatible with different types of SIM cards. The SIM card interface 395 can also be compatible with external memory cards. The mobile phone 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the mobile phone 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile phone 100 and cannot be separated from the mobile phone 100.
[0068] It should be noted that the hardware modules included in the mobile phone 100 shown in FIG3 are merely exemplary descriptions and do not limit the specific structure of the mobile phone 100. For example, the mobile phone 100 may also include other functional modules.
[0069] The following introduces the software system architecture of the terminal device. For example, the software system of the terminal device provided in the embodiment of the present application can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. For example, the software system can include but is not limited to (Symbian), (Android), (iOS), (Blackberry), Hongmeng (Harmony) and other operating systems, this application is not limited.
[0070] Please refer to Figure 4. Figure 4 takes the layered architecture of the Harmony operating system as an example to specifically introduce the software structure block diagram of the terminal device when the image is loaded and displayed in the embodiment of the present application. The layered architecture can divide the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. As shown in Figure 4, the software structure of the terminal device can be divided into four layers from bottom to top: the kernel layer, the system basic capability layer, the application framework layer (referred to as the framework layer) and the application layer (referred to as the application layer).
[0071] The Harmony system utilizes a multi-kernel design, optionally including the Linux kernel, the Harmony microkernel, and LiteOS. This design allows devices with varying capabilities to select the appropriate system kernel. The kernel layer also includes the Kernel Abstraction Layer, which provides foundational kernel capabilities for other Harmony layers, such as process management, thread management, memory management, file system management, network management, and peripheral management.
[0072] The system basic service layer is the core capability set of the Harmony system, supporting the Harmony system to provide services to application services through the framework layer in multi-device deployment scenarios. This layer optionally includes the system basic capability subsystem set, the basic software service subsystem set, the Hongmeng Driver Framework (HDF) and the Hardware Abstraction Adaptation Layer (HAL), the hardware service subsystem set, the proprietary hardware service subsystem, and the enhanced software service subsystem set.
[0073] The system's basic capability subsystems provide fundamental capabilities for running, scheduling, and migrating distributed applications across multiple devices in the Harmony system. These subsystems comprise a distributed soft bus, distributed data and file management, distributed task scheduling, the Ark runtime, and distributed security and privacy protection. The Ark runtime provides a C / C++ / JavaScript multi-language runtime and basic system class libraries. It also provides a runtime for Java programs statically compiled using the Ark compiler (i.e., applications or frameworks developed in Java).
[0074] The basic software service subsystem provides common, general-purpose software services for the Harmony system. These services include MSDP & DV (Multimodal Sensor Data Platform & Device Virtualization), graphics and imaging, distributed media, multimodal input, and event notification. The graphics and imaging software services also include an image arrangement framework. In this embodiment, the image arrangement framework manages the display positions of the corresponding ImageView controls, ensuring orderly and progressive display of images, avoiding out-of-order flashing.
[0075] The enhanced software service subsystem set provides the Harmony system with differentiated capability-enhanced software services for different devices. It consists of subsystems such as vehicle-mounted business software, tablet business software services, smart screen business software services, and IoT business software services.
[0076] The Harmony Driver Framework (HDF) and Hardware Abstraction Adaptation Layer (HAL) are the foundation of the open hardware ecosystem of the Harmony system. They provide hardware capability abstraction to the hardware upward and provide a development framework and operating environment for various peripheral drivers downward.
[0077] The hardware service subsystem set provides common and adaptive hardware services for the Harmony system, and is composed of hardware service subsystems such as pan-Sensor, location, power, USB, and biometrics.
[0078] The proprietary hardware service subsystem provides the Harmony system with differentiated hardware services for different devices, optionally including subsystems such as tablet proprietary hardware services, car proprietary hardware services, wearable proprietary hardware services, and IoT proprietary hardware services.
[0079] The framework layer provides the Harmony system's applications with user program frameworks and meta-capability frameworks in multiple languages, such as Java / C / C++ / JavaScript, as well as multi-language framework APIs open to various software and hardware services.
[0080] The application layer includes system applications and third-party applications, which can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0081] It should be noted that Figure 4 only uses the layered architecture of the Harmony system as an example to introduce a software structure block diagram of a terminal device when loading and displaying an image. This application does not limit the specific architecture of the terminal device's software system. For detailed introductions to software systems of other architectures, reference can be made to conventional technologies.
[0082] An embodiment of the present application provides a method for loading and displaying images. The method first obtains N images in a first interface of a first application; then creates a view control corresponding to the N images in the first interface; then loads at least one image of the N images within a first time period; after the first time period ends, displays the at least one image in the first interface in a first order based on the position of the view control corresponding to the at least one image. If not all of the N images are loaded within the first time period, at least one remaining image of the N images other than the at least one image loaded within the first time period is loaded within a second time period; then, after the second time period ends, the at least one remaining image is displayed in the first order in the first interface based on the position of the view control corresponding to the at least one remaining image. More time periods may also exist until all of the N images in the first interface are displayed after a certain time period.
[0083] Please refer to Figure 5, which takes a mobile phone as a terminal device as an example, and is a schematic diagram of the interface changes when a user chooses to open the application store APP in a method for loading and displaying pictures provided in an embodiment of the present application. The changes from interface 101 to interface 103 in Figure 5 are the same as those in Figure 1: when the user chooses to open the application store 102 in the main interface 101 of the mobile phone 100, the interface quickly changes to the placeholder interface 103: all pictures are first replaced by placeholders (illustrated as a pure white background picture), such as the promotional picture at position 104, the placeholder picture at position 105, and the placeholder picture at position 106. Icon image of position 106 The game icon image and location 107 All icon images will be displayed instead of placeholder images.
[0084] It should be noted that before displaying the image, it is necessary to first create a view control corresponding to the image. After the view control is created, a placeholder image will generally be displayed at the location of the view control. The placeholder image can be a solid color background image, a non-solid color background image with pattern content, or even a transparent blank image. In fact, in interface 103, the view controls for each image are first quickly created at the corresponding position, but because the images are not loaded, the placeholder image is used instead for display.
[0085] Interface 103 is merely an example of an interface display effect, and may also be presented in other graphic or textual forms, which is not limited in this embodiment of the present application. Furthermore, interface 103 may include more or fewer display elements, for example, in one possible embodiment, there may be no large image at position 104, which is not limited in this embodiment of the present application.
[0086] Assuming that all images in interface 103 are loaded within a time period of 350 milliseconds, all images can be displayed in a certain order. One possible display order is to display them from top to bottom and from left to right, that is, interface 103 is directly transformed into interface 510: the promotional image at position 104, the promotional image at position 105, the promotional image at position 106, the promotional image at position 107, the promotional image at position 108, the promotional image at position 109, the promotional image at position 110, the promotional image at position 111, the promotional image at position 112, the promotional image at position 113, the promotional image at position 114, the promotional image at position 115, the promotional image at position 116, the promotional image at position 117, the promotional image at position 118, the promotional image at position 119, the promotional image at Icon image, location 502 Icon image, location 503 Icon image, location 504 Icon image, location 505 Icon image, location 506 Icon image, location 507 Icon image, location 508 Icon image, location 509 Icon image, location 106 Icon image and location 107 Icon images are displayed in order from top to bottom and from left to right.
[0087] It should be noted that the time period in the scenario shown in Figure 5 is set to 350 milliseconds. In some embodiments, the time period can also be set to other values that do not make the user obviously feel that the picture has a sense of lag, such as 300 milliseconds. The embodiment of the present application does not limit the value of the time period.
[0088] It should be noted that the order in which the images at the above 12 positions are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right.
[0089] In a possible implementation, the images at the above 12 positions may be displayed in another order, such as from top to bottom and from right to left.
[0090] In a possible implementation, the images at the 12 positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0091] Using uniform transparency animation means setting the alpha channel values of all images to the same value at the same time. More specifically, images are typically represented in the RGB color space (RGB represents the three color channels red (R), green (G), and blue (B) and their interplay to create a variety of colors. This color space encompasses nearly all colors perceptible to human vision). Images in various applications typically have an alpha channel superimposed on top of the RGB color space. The alpha channel is typically used as an opacity parameter: if a pixel's alpha channel value is 0%, it is completely transparent (invisible), while a value of 100% means a completely opaque pixel (identical to the pixel in the RGB color space). Values between 0% and 100% allow the pixel to show through the background, like through glass (translucency). Alpha channel values can be expressed as percentages, integers, or real numbers ranging from 0 to 1, like RGB parameters. In the embodiment of the present application, the alpha channel values of all images can be uniformly set to the same value at the same time, such as uniformly set to 0.5 at a certain time, so that all images have the same transparency at the same time. The embodiment of the present application does not limit the value of the alpha channel.
[0092] Assume that within a time period of 350 milliseconds, only some of the images in interface 103 are loaded, and the loaded images are displayed in a certain order. One possible situation is that interface 103 changes to interface 501: only the promotional image at position 104, the promotional image at position 105, and the promotional image at position 506 are displayed. Icon image, location 502 Icon image, location 503 Icon image, location 504 The icon images are loaded and displayed in order from top to bottom and from left to right (see the vertical arrow lines and horizontal arrow lines in interface 501), and the placeholder images are still displayed in the remaining positions.
[0093] It should be noted that the order in which the images at the above five positions are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right.
[0094] In a possible implementation, the images at the five positions may be displayed in another order, such as from top to bottom and from right to left.
[0095] In a possible implementation, the images at the five positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0096] After another time period of 350 milliseconds, that is, when the time reaches 700 milliseconds, if the remaining pictures are also loaded, the interface 501 changes to the interface 510, and the remaining pictures are also displayed in a certain order. One possible situation is to display them in order from top to bottom and from left to right. More specifically, the pictures at position 505 are displayed in the order from top to bottom and from left to right. The icon image is displayed first, then the one at position 506 The icon image is displayed again, followed by the one at position 507 The icon image is displayed, followed by the position 508 Icon image, location 509 Icon image, location 106 Icon image and location 107 The icon images are displayed in sequence.
[0097] It should be noted that the order in which the images at the above 7 positions are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right.
[0098] In a possible implementation, the pictures at the seven positions may be displayed in another order, such as from top to bottom and from right to left.
[0099] In a possible implementation, the pictures at the seven positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0100] Assume that after another time period of 350 milliseconds, that is, when the time reaches 700 milliseconds, if some of the remaining pictures have not been loaded (not shown in Figure 5), the loaded pictures can be displayed in a certain order. One possible situation is to display them in order from top to bottom and from left to right; the unloaded pictures will continue to be loaded in the background until the loading is completed within a certain time period, and then they will be displayed in order from top to bottom and from left to right at the end of the time period.
[0101] When a user refreshes an image within the app, the method provided in the embodiment of the present application can also display the images in a certain order. Please refer to Figure 6, which uses a mobile phone as an example terminal device, and is a schematic diagram of the interface changes when a user refreshes the gallery app in a method for loading and displaying images provided in the embodiment of the present application.
[0102] When the user swipes up in interface 201 of the gallery APP of mobile phone 100 to view earlier pictures, assuming that the time period is 350 milliseconds, all earlier pictures are loaded within 350 milliseconds, then interface 201 changes to interface 606: the pictures at position 607, position 602, position 603, position 608, position 604, position 605 and position 609 are displayed in a certain order. One possible situation is that they are displayed in order from top to bottom and from left to right (as shown by the horizontal arrow line and the diagonal arrow line in interface 606).
[0103] It should be noted that the order in which the images at the above 7 positions are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right.
[0104] It should be noted that the time period in the scenario shown in Figure 6 is set to 350 milliseconds. In some embodiments, the time period can also be set to other values that do not make the user obviously feel that the picture has a sense of lag, such as 300 milliseconds. The embodiment of the present application does not limit the value of the time period.
[0105] In a possible implementation, the pictures at the seven positions may be displayed in another order, such as from top to bottom and from right to left.
[0106] In a possible implementation, the pictures at the seven positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0107] Assuming that only some of the images are loaded within 350 milliseconds, interface 201 can first transition to interface 601. In interface 601, the images at positions 602, 603, 604, and 605 are all loaded and displayed in a certain order. One possible display order is from top to bottom and left to right, that is, the image at position 602 is displayed first, followed by the image at position 603, then the image at position 604, and finally the image at position 605. The images at the remaining positions in interface 601 have not yet been loaded, so placeholder images are still used for display.
[0108] It should be noted that the order in which the images at the above four locations are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right.
[0109] In a possible implementation, the images at the above four positions may be displayed in another order, such as from top to bottom and from right to left.
[0110] In a possible implementation, the images at the above four positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0111] After another 350 milliseconds, that is, at 700 milliseconds, the images at the remaining positions have also been loaded, and interface 601 changes to interface 606. Compared to interface 601, the images at positions 607, 608, and 609 in interface 606 are displayed in a certain order. One possible display order is from top to bottom and from left to right. More specifically, the image at position 607 is displayed first, followed by the image at position 608, and finally the image at position 609.
[0112] It should be noted that the order in which the images at the above three locations are loaded can be arbitrary, but they are displayed in the order from top to bottom and from left to right and with a uniform transparency animation.
[0113] In a possible implementation, the images at the three positions may be displayed in another order, such as from top to bottom and from right to left.
[0114] In a possible implementation, the images at the three positions are displayed in a certain order and can also be displayed using a uniform transparency animation.
[0115] Assume that after another time period of 350 milliseconds, that is, when the time reaches 700 milliseconds, if some of the pictures at other positions have not been loaded (not shown in Figure 6), the loaded pictures can be displayed in a certain order. One possible display order is to display them from top to bottom and from left to right; the unloaded pictures will continue to be loaded in the background until they are loaded within a certain time period, and then they will be displayed from top to bottom and from left to right after the time period ends.
[0116] It should be noted that interface 606 is only an exemplary display of a scene in which a picture is refreshed in the gallery app. Interface 606 can also be displayed in the form of other pictures or text, and this embodiment of the application does not limit this. In addition, interface 606 can also include more or fewer display elements, and this embodiment of the application does not limit this.
[0117] The technical solution in the present application is described in detail below with reference to specific embodiments. In the embodiment of the present application, first obtain N pictures in the first interface of the first application, then create a view control corresponding to the N pictures in the first interface, then load at least one picture of the N pictures within a first time period, and when the first time period ends, display the at least one picture in the first interface in a first order according to the position of the view control corresponding to the at least one picture. If not all N pictures are loaded within the first time period, load at least one remaining picture of the N pictures other than the at least one picture loaded within the first time period within a second time period, and then after the second time period ends, display the at least one remaining picture in the first interface in a first order according to the position of the view control corresponding to the at least one remaining picture. There may also be more time periods until all N pictures in the first interface are displayed after a certain time period. The embodiment of the present application can solve the problem of out-of-order flashing and chaotic visual effects when displaying pictures.
[0118] Please refer to Figure 7, which shows a flow chart of the image loading and display method provided by an embodiment of the present application. The image loading and display method comprises the following steps:
[0119] S701: Obtain N pictures in a first interface of a first application.
[0120] Wherein, N is a positive integer.
[0121] Optionally, the first application may obtain N images of the first interface of the first application from the server. For example, in the App Store app shown in FIG5 , since the content of the App Store app changes frequently, the images in the first interface will be updated and changed in real time when the user opens the App Store app at different times. Therefore, it is necessary to obtain the updated images from the server in real time. Of course, when the content of the first interface of the App Store app remains unchanged, the images can also be obtained from the local cache.
[0122] The first application can also retrieve N pictures from the terminal device's memory. For example, in the gallery app shown in FIG6 , pictures taken or saved by the user are generally stored in the current terminal device's memory. When the user refreshes to view pictures, the pictures can be directly retrieved from the memory. Of course, if the user previously chose to upload the pictures to a cloud server for storage, the pictures can also be retrieved from the cloud server when refreshing to view pictures.
[0123] S702: Create view controls corresponding to N pictures in the first interface.
[0124] It should be noted that the first application can be any application that contains pictures, such as the application store APP shown in interface 101 in Figure 5 and the gallery APP shown in interface 201 in Figure 6.
[0125] A view control is used to display images. You can set basic display properties for the image, such as zoom and aspect ratio. Before displaying an image, you must first create a view control corresponding to the image. Once the image is loaded, the image can be displayed in the corresponding view control position.
[0126] After executing step S702, optional step S703 may be executed:
[0127] S703: Display a placeholder image at the position of the view control corresponding to the N images.
[0128] The placeholder image is a background image that temporarily replaces the image for display.
[0129] Please refer to interface 103 in Figure 5. All images in interface 103 are loaded in the background, and placeholders are first displayed in the view controls corresponding to all images. For example, the placeholders in interface 103 are pure white background images. The placeholders can also be pure color background images of other colors, non-pure color background images with patterned content, or even transparent blank images. The specific content of the placeholders is not limited in this embodiment of the application.
[0130] S704: Load at least one picture among the N pictures within a first time period.
[0131] It should be understood that N pictures are acquired in step S701 , and at least one of the acquired N pictures needs to be loaded into the first application in step S704 for subsequent display.
[0132] The embodiment of the present application loads and displays images according to a time period. The time period can be set to a value that does not make the user noticeably feel a sense of lag in the image. The embodiment of the present application does not limit the value of the time period.
[0133] It should be noted that in embodiments of the present application, the image arrangement framework can monitor the loading status of N images in the first interface of the first application according to a time period. For example, taking the HarmonyOS framework shown in Figure 4 as an example, the image arrangement framework is located in the graphics and image software service subsystem and can be used to monitor the loading status of N images in the first interface of the first application according to a time period.
[0134] More specifically, in one possible implementation, the picture editing framework may actively send an inquiry message to the first application according to a time period, and the inquiry message is used to inquire about the loading status of N pictures in the first interface of the first application within the current time period; the first application returns the loading status of the N pictures in the first interface within the current time period to the picture editing framework.
[0135] In another possible implementation, whenever a picture is loaded in the first interface of the first application during the current time period, the first application can actively send a message indicating that the picture loading is complete to the picture arrangement framework, and the picture arrangement framework records the loading status of each picture during the current time period.
[0136] S705: After the first time period ends, display the at least one image in a first order in the first interface according to the position of the view control corresponding to the at least one image.
[0137] Specifically, the view controls corresponding to the N pictures in the first interface created in step S702 are placed into an image container, and then after the first time period ends, the image container displays the at least one picture in the first interface in a first order according to the position of the view control corresponding to the at least one picture.
[0138] In a possible implementation, displaying the at least one picture in the first interface in a first order includes: displaying the at least one picture in the first interface in an order from top to bottom and from left to right.
[0139] It should be understood that displaying in the order from top to bottom and from left to right is set according to the visual viewing habits of most users, and displaying in a certain order can also include other order displays, such as displaying in the order from top to bottom and from right to left.
[0140] In addition, optionally, in a possible implementation, while displaying the at least one picture in the first interface in a first order, the method also includes: displaying the at least one picture in the first interface using a unified transparency animation, wherein the unified transparency animation includes uniformly setting the values of the alpha channels of the at least one picture to the same value at the same time.
[0141] For example, assuming that the value range of the alpha channel of all pictures in the first interface is normalized to 0 to 1, the value of the alpha channel of all pictures in the first interface at time t1 is 0, the value of the alpha channel of all pictures in the first interface at time t2 is 0.2, and the value of the alpha channel of all pictures in the first interface at time t3 is 0.5.
[0142] It should be understood that if all N pictures are loaded within the first time period, that is, the at least one picture mentioned in step S704 refers to N pictures, then in step S705, after the first time period ends, the N pictures will be displayed in the first interface in the first order according to the positions of the view controls corresponding to the N pictures.
[0143] Specifically, regarding the interface changes brought about by the execution of steps S704 to S705, please refer to FIG5 , where interface 103 directly changes to interface 510. Assuming the time period is 350 milliseconds, and only 350 milliseconds have passed, that is, after the first time period, all 12 images in interface 103 have been loaded, that is, the images from the topmost position 104 to the bottommost position 107 in interface 103 have been loaded. Then, the images from the topmost position 104 to the bottommost position 107 in interface 103 are displayed in order from top to bottom and from left to right. As shown in interface 510, the black arrow line in interface 510 indicates that all images in interface 510 are displayed in order from top to bottom and from left to right.
[0144] Optionally, the pictures from the topmost position 104 to the bottommost position 107 in the interface 103 may be displayed in a uniform transparency animation while being displayed in order from top to bottom and from left to right.
[0145] It should be noted that the order in which the images at the top position 104 to the bottom position 107 in the interface 103 are loaded can be arbitrary. For example, the image at position 504 The icon image can be loaded first, then the one at position 105 The icon images are loaded until the final promotional image at position 104 is loaded.
[0146] Taking Figure 6 as an example, when a user slides to view images within the application, the interface changes brought about by the execution of steps S704 to S705 can be seen in Figure 6, where interface 201 directly changes to interface 606. Assuming that the time period is 350 milliseconds, and only 350 milliseconds have passed, that is, after the first time period, all images that need to be loaded in interface 201 have been loaded, that is, the images at positions 607, 602, 603, 608, 604, 605, and 609 have all been loaded. Then, the images at the upper left position 607 to the lower rightmost position 609 are displayed in order from top to bottom and from left to right. As shown in interface 606, the black arrow line in interface 606 indicates that the images in interface 606 are displayed in order from top to bottom and from left to right.
[0147] It should be noted that the order in which the images at positions 607 , 602 , 603 , 608 , 604 , 605 and 609 are loaded can be arbitrary.
[0148] It should be understood that if not all N pictures are loaded within the first time period, that is, the number of the at least one picture in step S704 is less than N, then in step S705, after the first time period ends, the at least one picture will be displayed in the first interface in the first order according to the position of the view control corresponding to the at least one picture.
[0149] For example, please refer to Figure 5. When the first application is opened, the interface changes brought about by the execution of steps S704 to S705 can be referred to as the interface 103 in Figure 5 changes to interface 501. Assuming that the time period is 350 milliseconds, and after the first time period ends, that is, after 350 milliseconds, only some of the pictures in interface 103 between time 0 and time 350 milliseconds (within the first time period) are loaded. That is, the pictures at positions 104, 105, 502, 503, and 504 in interface 103 are loaded, while the pictures at other positions are not yet loaded. Then, the pictures at positions 104, 105, 502, 503, and 504 are displayed in order from top to bottom and from left to right. The black arrow line in interface 501 indicates that the pictures in interface 501 are displayed in order from top to bottom and from left to right.
[0150] Optionally, the pictures at positions 104 , 105 , 502 , 503 and 504 may be displayed in a sequence from top to bottom and from left to right, and may also be displayed using a uniform transparency animation.
[0151] It should be noted that the order in which the images at positions 104, 105, 502, 503 and 504 are loaded can be arbitrary. For example, the image at position 504 The icon image can be loaded first, then the one at position 105 The icon images are loaded until the final promotional image at position 104 is loaded.
[0152] Taking Figure 6 as an example, when a user refreshes an image within the app, the interface changes resulting from the execution of steps S704 to S705 can be seen in Figure 6 , where interface 201 changes to interface 601. Assuming the time period is 350 milliseconds, and after the first time period ends, i.e., after 350 milliseconds, only some of the images in interface 201 are loaded, i.e., the images at positions 602, 603, 604, and 605 in interface 201 are loaded, while the images at the remaining positions are not yet loaded, the images at positions 602, 603, 604, and 605 are displayed in order from top to bottom and left to right. The black arrows in interface 601 indicate that the images in interface 601 are displayed in order from top to bottom and left to right.
[0153] Optionally, the pictures at positions 602 , 603 , 604 and 605 may be displayed in a uniform transparency animation while being displayed in order from top to bottom and from left to right.
[0154] It should be noted that the order in which the images at positions 602, 603, 604 and 605 are loaded can be arbitrary. Regardless of the order in which they are loaded, the image arrangement framework will display the images loaded between time 0 and time 350 milliseconds (within the first time period) in order from top to bottom and from left to right.
[0155] Optionally, if all N pictures are not loaded within the first time period, steps S706 and S707 may be executed.
[0156] S706: Load at least one remaining picture among the N pictures except the at least one picture within a second time period.
[0157] S707: After the second time period ends, display the at least one remaining picture in the first interface in a first order according to the position of the view control corresponding to the at least one remaining picture.
[0158] Specifically, the view controls corresponding to the N pictures in the first interface created in step S702 are placed into an image container; after the second time period ends, the image container displays the at least one remaining picture in the first interface in a first order according to the position of the view control corresponding to the at least one remaining picture.
[0159] For example, the interface change caused by the execution of steps S706 and S707 can be seen in FIG5 , where interface 501 changes to interface 510. Generation of interface 501: Assuming a time period of 350 milliseconds, only images at positions 104, 105, 502, 503, and 504 in interface 103 are loaded between time 0 and time 350 milliseconds (a first time period). After executing steps S704 and S705, interface 501 is obtained. If another time period elapses, i.e., after a second time period of 700 milliseconds, images at positions 505, 506, 507, 508, 509, 106, and 107 in interface 501 are loaded between 350 milliseconds and 700 milliseconds (a second time period), the images at positions 505, 506, 507, 508, 509, 106, and 107 are displayed in order from top to bottom and from left to right. The black arrow lines in the interface 510 indicate that the pictures in the interface 510 are displayed in order from top to bottom and from left to right.
[0160] Optionally, while the pictures at positions 505 , 506 , 507 , 508 , 509 , 106 and 107 are displayed in order from top to bottom and from left to right, a uniform transparency animation display may also be adopted.
[0161] It should be noted that the order in which the images at positions 505 , 506 , 507 , 508 , 509 , 106 , and 107 are loaded can be arbitrary.
[0162] Taking Figure 6 as an example, the interface changes caused by the execution of steps S706 and S707 can be seen in Figure 6, where interface 601 changes to interface 606. Generation of interface 601: Assuming a time period of 350 milliseconds, only images at positions 602, 603, 604, and 605 in interface 601 are loaded between time 0 and time 350 milliseconds (the first time period). After executing steps S704 and S705, the final interface 601 is displayed. If another time period elapses, i.e., after a second time period of 700 milliseconds, and images at positions 607, 608, and 609 in interface 601 are loaded between 350 milliseconds and 700 milliseconds (the second time period), the images at positions 607, 608, and 609 are displayed in order from top to bottom and left to right. It should be noted that the order in which the images at positions 607, 608, and 609 are loaded can be arbitrary.
[0163] In the embodiment of the present application, there may also be a third time period, a fourth time period...an Mth time period, step a: loading K pictures among the N pictures in the Mth time period except for the pictures loaded in the previous M-1 time periods, where M is a positive integer and K is a positive integer; step b: after the end of the Mth time period, display the K pictures in the first interface in the first order according to the positions of the view controls corresponding to the K pictures; repeat the above steps a to b until all N pictures in the first interface are displayed after the end of the Lth time period, where L is a positive integer.
[0164] For example, still taking Figure 5 as an example, the background assumption is: assuming that the time period is still 350 milliseconds, and within time 0 to time 350 milliseconds (within the first time period), only the images at positions 104, 105, 502, 503 and 504 in interface 103 are loaded. After executing steps S704 and S705, interface 501 is obtained. If another time period (second time period) passes, within 350 milliseconds to 700 milliseconds (within the second time period), only some of the images at positions 505, 506, 507, 508, 509, 106 and 107 in the interface 501 are loaded. One possible situation is that only the images at positions 505, 507 and 509 are loaded, and the images at positions 506, 508, 106 and 107 are not yet loaded (not shown in Figure 5). Then, after 700 milliseconds (after the end of the second time period), the images at positions 505, 507 and 509 that have been loaded are displayed in order from top to bottom and from left to right, and the images at positions 506, 508, 106 and 107 are still replaced by placeholder images.
[0165] If, after another time period, i.e., the third time period, all images at positions 506, 508, 106, and 107 are loaded within 700 milliseconds to 1050 milliseconds (within the third time period), then after 1050 milliseconds (after the end of the third time period), the loaded images at positions 506, 508, 106, and 107 are displayed in order from top to bottom and from left to right, and the process ends. If, however, within 700 milliseconds to 1050 milliseconds (within the third time period), the images at positions 506 and 508 are loaded but the images at positions 106 and 107 are not loaded, then after 1050 milliseconds, the images at positions 506 and 507 are displayed in order from top to bottom and from left to right; and the images at positions 106 and 107 continue to be loaded until the images at positions 106 and 107 are also displayed after the Lth time period, and the process ends.
[0166] Taking FIG. 6 as an example, the background assumption is: assuming the time period is 350 milliseconds, and between time 0 and time 350 milliseconds (within the first time period), only the images at positions 602, 603, 604, and 605 in interface 601 are loaded, and after executing steps S704 and S705, the final interface 601 is obtained. If another time period (a second time period) passes, and between 350 milliseconds and 700 milliseconds (within the second time period), only some of the images at positions 607, 608, and 609 in interface 601 are loaded, one possible scenario is that only the images at positions 607 and 608 are loaded (not shown in FIG. 6 ). In this case, after 700 milliseconds (after the end of the second time period), the loaded images at positions 607 and 608 are displayed in order from top to bottom and from left to right. If after another time period, that is, the third time period, the image at position 609 is loaded within 700 milliseconds to 1050 milliseconds (within the third time period), then after 1050 milliseconds (after the end of the third time period), the image at position 609 is displayed in order from top to bottom and from left to right, and the process ends; and if the image at position 609 is still not loaded within 700 milliseconds to 1050 milliseconds (within the third time period), the loading will continue until the image at position 609 is displayed after the Lth time period, and the process ends.
[0167] It is understandable that, in order to realize the above functions, the above-mentioned terminals etc. include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0168] The embodiments of the present application can divide the functional modules of the terminal device, etc. according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0169] In the case of using an integrated unit, FIG8 shows a possible schematic diagram of the structure of the terminal device involved in the above embodiment. Terminal device 800 includes: a storage module 801, a processing module 802, and a transceiver module 803. The processing module 802 is used to control and manage the operation of the terminal device 800. For example, the processing module 802 is used to support the first terminal 800 to execute processes S701, S702, S704, and S706 in FIG7, and / or other processes used in the technology described herein. The transceiver module 803 is used to support information communication in the terminal device 800. The terminal device 800 may also include a storage module 801 for storing program code and data of the terminal device.
[0170] Among them, the processing module 802 can be a processor or controller, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 803 can be a transceiver, a transceiver circuit or a communication interface, and the storage module 801 can be a memory.
[0171] The processing module 802 can be implemented by the processor 902 shown in Figure 9. The transceiver module 803 can be implemented by the transceiver 903 shown in Figure 9. Specifically, the processor 902 is implemented by executing a computer program stored in the memory 901. Optionally, the memory is a storage unit within the chip, such as a register or cache. The storage unit can also be a storage unit within the computer device located outside the chip, such as the memory 901 shown in Figure 9.
[0172] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in a hardware manner or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disc (CD-ROM) or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC.
[0173] Those skilled in the art will appreciate that, in one or more of the examples above, the functions described herein may be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0174] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of this application. It should be understood that the above description is only the specific implementation methods of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of this application should be included in the scope of protection of this application.
Claims
1. A method for loading and displaying an image, characterized in that: The method comprises: Obtain N pictures in the first interface of the first application, where N is a positive integer; Creating a view control corresponding to the N pictures in the first interface; Loading at least one picture of the N pictures within a first time period; After the first time period ends, the at least one image is displayed in the first interface in a first order according to the position of the view control corresponding to the at least one image.
2. The method according to claim 1, characterized in that After creating the view controls corresponding to the N pictures in the first interface, the method further includes: A placeholder image is displayed at the position of the view control corresponding to the N images, and the placeholder image is a background image that temporarily replaces the images for display.
3. The method according to claim 1 or 2, characterized in that: The displaying the at least one picture in the first interface according to the first order includes: The at least one picture is displayed in the first interface in a sequence from top to bottom and from left to right.
4. The method according to any one of claims 1 to 3, characterized in that While displaying the at least one picture in the first interface according to the first order, the method further includes: The at least one picture is displayed in the first interface using a unified transparency animation, wherein the unified transparency animation includes setting the values of the alpha channels of the at least one picture to the same value at the same time.
5. The method according to any one of claims 1 to 4, characterized in that After displaying the at least one picture in the first interface according to the first order, the method further includes: Loading at least one remaining picture of the N pictures except the at least one picture within a second time period; After the second time period ends, the at least one remaining picture is displayed in the first interface in the first order according to the position of the view control corresponding to the at least one remaining picture.
6. The method according to claim 5, characterized in that While displaying the at least one remaining picture in the first order, the method further includes: The at least one remaining picture is displayed in the first interface using the uniform transparency animation.
7. A terminal device, characterized in that: include: a memory for storing instructions executed by one or more processors of the terminal device; transceivers, used to receive or send radio signals; The processor, when the processor executes the instructions in the memory, can enable the terminal device to execute the image loading and display method described in any one of claims 1 to 6.
8. A chip, characterized in that: The chip system includes a processing circuit and a storage medium, wherein the storage medium stores a computer program code; when the computer program code is executed by the processing circuit, the image loading and display method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program. When the computer program is executed on a computer, the computer is enabled to execute the picture loading and displaying method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Application program processing method, device and equipment
CN111552473A
Picture loading method and device, computer equipment and storage medium
CN111767492A
Page display method and device, electronic equipment and storage medium
CN112287257A
Interface loading method and device and storage medium
CN113535307A
Page generation method and device and page display method and device
CN113641358A
