Picture list optimized loading method and computing equipment

By setting a loading dwell time threshold and a strategy combining sliding events, the image list is dynamically loaded, which solves the problem of lag and resource waste during sliding browsing, and improves user experience and website performance.

CN118551127APending Publication Date: 2024-08-27SHANGHAI KUNYUN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410573601.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When users slide through the image list, frequent loading and rendering of a large number of images leads to list lags, increased memory, and degraded user experience. Unnecessary image loading wastes network resources and server bandwidth.

Method used

By setting the loading dwell time threshold, combining sliding events and dwell time, priority is given to loading images in the visible area, dynamically calculating rendering data and using default placeholder images to delay loading of real images, using virtual lists and lazy loading technology to reduce initial loading data volume and concurrent requests.

Benefits of technology

It effectively reduces list lag and network consumption, improves user experience and website accessibility, significantly improves first-screen content rendering speed and server response speed, and saves resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551127A
    Figure CN118551127A
Patent Text Reader

Abstract

The invention provides a picture list optimized loading method and computing equipment. The method comprises the following steps: setting a loading residence time threshold value of a list, wherein the list is used for loading pictures and comprises a visual area for displaying the pictures and a non-visual area for not loading the pictures; judging a list sliding event and list residence time; when the sliding of the list is stopped and the residence time of the list is equal to or greater than the loading residence time threshold value, displaying a picture in the visual area; and when the list sliding is not stopped, or the list sliding is stopped but the list staying time is less than the loading staying time threshold value, preferentially responding to the list operation, and not loading the picture in the visible area. According to the technical scheme, effective optimization loading of webpage performance is achieved, user experience is improved, network resources are saved, and improvement of accessibility of websites is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a method and computing device for optimizing loading of a picture list. Background Art

[0002] When users browse a list, the amount of image data in the list is large, and it is impossible to obtain all the data at once. Although paging can be used, the user experience is not good. Usually most users like to slide down to display data. However, when obtaining data by sliding, another problem will be encountered, that is, the data is constantly loaded, resulting in more and more nodes piled up in the list, the memory is constantly increasing, and finally even the sliding is stuck.

[0003] To this end, a technical solution is needed that can achieve effective optimization loading of web page performance, improve user experience, save network resources, and help improve the accessibility of the website. Summary of the invention

[0004] The present invention aims to provide a method and computing device for optimizing the loading of image lists, thereby achieving effective optimization loading of web page performance, improving user experience, saving network resources, and helping to improve the accessibility of the website.

[0005] According to one aspect of the present invention, a method for optimizing loading of a picture list is provided, the method comprising:

[0006] Setting a loading dwell time threshold of a list, wherein the list is used to load pictures and includes a visible area for displaying pictures and a non-visible area for not loading pictures;

[0007] Determine list sliding events and list dwell time;

[0008] When the list stops sliding and the list stay time is equal to or greater than the loading stay time threshold, displaying the picture in the visible area;

[0009] When the list slides without stopping, or the list slides but the list stays for less than the loading stay time threshold, the list operation is responded to first, and the picture is not loaded in the visible area.

[0010] According to some embodiments, the further step includes initializing the list:

[0011] After opening the page including the list, requesting the list data from the server, the list data including the image address;

[0012] After acquiring the list data, the list data is cached in a data pool;

[0013] Calculate the number of rendered data items in the list according to the height of the visible area and the height of the list items displayed in the list;

[0014] Convert the list data corresponding to the number of rendered data into page elements, and the image address of each list data is the default placeholder image address;

[0015] Replace the default placeholder image address of the list data corresponding to the number of rendered data with the real image address;

[0016] The image is loaded from the real image address and rendered and displayed in the visible area.

[0017] According to some embodiments, the method further includes updating data in the list:

[0018] Listening to the sliding of the list;

[0019] Dynamically calculate the start and end position indexes of the rendering data of the list in the data pool;

[0020] The original list data is replaced with new list data for rendering obtained by dynamic calculation, and the image address of the new list data is the default placeholder image address.

[0021] According to some embodiments, when the list stops sliding and the list stay time is equal to or greater than the loading stay time threshold, displaying the picture in the visible area includes:

[0022] Convert the list data in the visible area into page elements;

[0023] Replace the default placeholder image address of the list data with the real image address;

[0024] The image is loaded from the real image address and rendered and displayed in the visible area.

[0025] According to some embodiments, the list further comprises a buffer area between the visible area and the non-visible area.

[0026] According to some embodiments, the further step includes: binding a timer on the list to measure the time the list stays.

[0027] According to some embodiments, after the list stops sliding, if the list continues to slide within the loading dwell time threshold, the timer is reset.

[0028] According to some embodiments, the loading dwell time threshold is adjusted according to user behavior, website characteristics, user group habits, and performance test results.

[0029] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method as described above is implemented.

[0030] According to another aspect of the present invention, there is provided a computing device, comprising:

[0031] Processor; and

[0032] A memory storing a computer program, which, when executed by the processor, enables the processor to execute any of the methods described above.

[0033] According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium having computer-readable instructions stored thereon, and when the instructions are executed by a processor, the processor is caused to execute any of the above methods.

[0034] According to an embodiment of the present invention, a loading dwell time threshold of a list is set, and by determining the dwell action and dwell time, the user's demand for obtaining list images is judged in multiple dimensions, thereby reducing problems such as list freezes, list freezes, and program crashes, and effectively achieving optimized loading of web page performance, thereby improving user experience, saving network resources, and helping to improve the accessibility of the website.

[0035] According to some embodiments, the method of the present invention can ensure that only images in the current visible area or images that are about to slide into the window are loaded first, thereby reducing the amount of data that needs to be downloaded when the initial list is loaded, significantly improving the presentation speed of the first screen content, and users can quickly see the main content without waiting for all images to be loaded, thereby improving the user experience, especially for users on mobile devices or with poor network conditions.

[0036] According to some embodiments, since not all images are loaded immediately, especially for websites with long sliding lists or containing a large number of images, the method of the present invention can avoid unnecessary image data transmission. The user may not have slid to the bottom of the list or to certain areas. For these unviewed images, if delayed loading is not performed, their loading process will waste server bandwidth and user traffic. Only loading the images actually needed by the user can reduce overall data consumption.

[0037] According to some embodiments, reducing concurrent image requests helps relieve server pressure, especially during high-traffic periods or when users open multiple lists at the same time. By loading images on demand, the server does not have to respond to all image requests immediately, but allocates resources to requests that are really needed, which helps maintain server response speed and stability, and can reduce list jams caused by loading a large number of images at the same time, making list sliding smoother. When users slide and browse, the list layout will not jump due to sudden loading of images, which improves the overall browsing fluency and comfort.

[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0040] Figure 1 A flow chart of a method for optimizing loading of a picture list according to an example embodiment is shown.

[0041] Figure 2 A schematic diagram showing an implementation concept of an anti-shake technology according to an example embodiment.

[0042] Figure 3 A schematic diagram of a virtual list according to an example embodiment is shown.

[0043] Figure 4 A block diagram of a computing device is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0044] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0045] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.

[0046] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0047] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0048] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the present inventive concept. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0049] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0050] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present invention, and therefore cannot be used to limit the protection scope of the present invention.

[0051] To ensure a good user experience, the list browsing method generally adopts an infinite scrolling list, which is generally called a long list. At present, the infinite scrolling long list is a good experience for users, but there is a problem here. When the user scrolls the list and needs to load too many pictures, rendering all the pictures at once will cause a large number of requests to the server, resulting in a slow response from the server, resulting in problems such as list scrolling stuck, slow data rendering, white screen and list crash.

[0052] To this end, the present invention proposes a method for optimizing the loading of image lists. By using virtual lists, lazy loading of images and anti-shake technology, and by determining the dwell action and dwell time, the user's demand for obtaining list images is judged in multiple dimensions, thereby reducing problems such as list freezes, list freezes, and program crashes, and effectively realizing optimized loading of web page performance, thereby improving user experience, saving network resources, and helping to improve the accessibility of the website.

[0053] According to some embodiments, compared with traditional image loading methods, the method of the present invention can reduce the time of initial list loading, improve the response speed of the website, and significantly improve the user experience for mobile devices and poor network conditions.

[0054] Exemplary embodiments of the present invention are described below with reference to the accompanying drawings.

[0055] Figure 1 A flow chart of a method for optimizing loading of a picture list according to an example embodiment is shown.

[0056] See also Figure 1 In S101, a loading residence time threshold of a list is set, where the list is used to load pictures and includes a visible area for displaying pictures.

[0057] After opening the page including the list, request the list data from the server. The list data includes the image address. After obtaining the list data, cache the list data in the data pool. Calculate the number of rendered data items in the list according to the height of the visible area and the height of the list items displayed in the list. Convert the list data corresponding to the number of rendered data items into page elements (HTML elements). The image address of each list data item is the default placeholder image address. Replace the default placeholder image address of the list data corresponding to the number of rendered data items with the real image address. Load the image from the real image address and render and display it in the visible area.

[0058] Listen to the sliding of the list, dynamically calculate the start and end position index of the list rendering data in the data pool, replace the original list data with the new list data for rendering obtained by dynamic calculation, and the image address of the new list data is the default placeholder image address. Convert the list data in the visible area into HTML elements, replace the default placeholder image address of the list data with the real image address, load the image from the real image address, and render and display it in the visible area.

[0059] The list also includes a non-visible area located above and / or below the visible area. The non-visible area is used to load and render images but not display them. The non-visible area has no real page elements (HTML elements), and there will be no image elements. It is generally filled with blank spacing, which is padding in CSS.

[0060] According to some embodiments, setting a loading dwell time threshold can reduce unnecessary loading. Immediately triggering loading based solely on list dwelling may result in unnecessary resource consumption, because the user may only briefly stop sliding the list and then quickly leave. Setting a reasonable threshold can filter out such short interactions and only load pictures that are actually likely to be viewed. Setting a loading time threshold helps find a balance between saving bandwidth, reducing server pressure, and improving user experience expectations. The system only starts loading pictures when the user shows interest for a longer period of time, which neither wastes resources nor responds to users' potential needs in a timely manner.

[0061] The selection of the loading time threshold should be based on the observation and analysis of user behavior, and is usually set between 200 and 300 milliseconds. The specific value may need to be adjusted according to the characteristics of the website, the habits of the user group, and the results of performance testing. For example, if the main user group of the website is accustomed to browsing the content carefully, then the threshold can be appropriately increased; conversely, if user behavior tends to browse quickly, a smaller threshold should be selected.

[0062] When the list stops sliding, the image processing function will not be executed immediately, but will be executed after the set threshold time in the last uncleared timer. Triggering sliding within the set threshold time will clear the previous timer.

[0063] According to some embodiments, the priority or order of loading can be dynamically adjusted according to factors such as image size and importance, ensuring that important or small-sized images are loaded first. In addition, clear loading status feedback can be provided to users in a timely manner, such as loading progress prompts, placeholder image changes, etc., to enhance users' understanding of the loading process.

[0064] Setting the loading dwell time threshold is a refined optimization loading method based on the lazy loading strategy of images, which aims to more accurately predict user intentions, load images at the right time, and further improve user experience. By reasonably setting the threshold, implementing the loading logic, and performing necessary optimization and expansion, a good balance can be achieved between saving resources and improving user experience.

[0065] In S103, the list sliding event and the list dwelling time are determined.

[0066] According to some embodiments, a timer is bound to the list for counting the list dwell time. After the list stops sliding, if the list continues to slide within a loading dwell time threshold, the timer is reset.

[0067] According to some embodiments, firstly, a list sliding event is determined. List sliding generally refers to a sliding operation performed by a user on a web page by means of a mouse wheel, touch screen sliding, or keyboard shortcuts. Determining a list sliding event generally involves monitoring sliding events and monitoring stay events.

[0068] In JavaScript, the addEventListener method can be used to listen to the scroll event, which is triggered when the user slides the list. The present invention combines the two logics of the sliding event and the dwell time to determine whether to trigger the loading picture event.

[0069] In S105, when the list slide stops and the list stay time is equal to or greater than the loading stay time threshold, the picture is displayed in the visible area.

[0070] The loading dwell time threshold is adjusted according to user behavior, website characteristics, user group habits, and performance test results.

[0071] According to some embodiments, the present invention uses an image loading strategy that combines list sliding stopping and satisfying a time condition, aiming to further optimize resource loading timing and improve user experience.

[0072] When detecting that the list slide stops, listen to the list slide event, and determine when the slide stops. This can be achieved by setting a slide stop timer. When the slide event is triggered, the timer is reset. If the slide event is not triggered again after exceeding the loading time threshold, the slide is considered to have stopped. After the slide stops, check whether there are images in the visible area of ​​the list that are in a stay state and the time is equal to or greater than the preset threshold. If so, start loading these images.

[0073] Adjust the sliding stop judgment time threshold according to the actual project requirements and the characteristics of user sliding behavior to accurately capture the sliding stop moment. When processing a large number of images, pay attention to loading performance, such as using throttling functions to batch process image loading to avoid blocking the main thread. Ensure that the implementation is compatible with various browsers and devices, especially for old browsers that do not support certain features, you may need to provide alternative solutions.

[0074] The image loading strategy that combines list sliding stop and loading dwell time threshold can load images at the right time when the user stops browsing and shows continued interest in a certain image, further improving the user experience and saving resources. When implementing it, attention should be paid to sliding stop determination, dwell state maintenance, and performance optimization to ensure the effectiveness and compatibility of the strategy.

[0075] In S107, when the list sliding does not stop, or the list sliding stops but the list stay time is less than the loading stay time threshold, the list operation is responded to first, and the picture is not loaded in the visible area.

[0076] According to some embodiments, when the list is continuously sliding, or the list sliding has stopped but the loading dwell time threshold has not been reached, priority is given to responding to the list operation, and the list visible area map is not loaded.

[0077] In order to achieve this requirement, we combine the monitoring of sliding events, the determination of sliding status, and the recording of dwell time to control image loading. When the list slides, a sliding stop timer is cleared and reset. If the sliding event is not triggered again within the set time, it is considered that the sliding has stopped.

[0078] When the sliding stops, check whether the time the list stops sliding reaches the preset threshold. If the threshold is reached, call the loadVisibleImages function to load the image in the visible area.

[0079] When the list is hovered, set a timer. If the list does not continue to slide within the preset dwell time threshold, record the element. When the list continues to slide, clear the timer and clear the record.

[0080] Through the above implementation, when the list continues to slide or the slide stops but the dwell time does not reach the threshold, the images in the visible area will not be loaded, and the list operation will be responded to first. Only when the slide stops and there are images that meet the dwell time threshold, the images in the visible area will be loaded.

[0081] According to some embodiments, the basic process of the present invention is to open a browser or App page and request list data from the server, usually more than 10,000 data items; after obtaining the data, cache the data in the data status pool store; calculate the number of data items N rendered in the current list according to the height of the list in the visible area and the height of each data item displayed in the list; convert the N data items into HTML elements, and the image address of each data item is the default placeholder image, all placeholder images are the same image, and initialize to replace the default placeholder image in the N data items with the real image address; monitor page scrolling, dynamically calculate the start and end position indexes in the store, replace the old ones with the new N data items, and still use the placeholder image for the image of each data item; when the scrolling stops, and the page does not trigger a new scroll after 200 to 300 milliseconds, replace the image placeholder image address in the current N data items with the real image address, and if the sliding is triggered within the specified time, the timing is restarted. This step uses anti-shake and lazy loading of images.

[0082] Figure 2 A schematic diagram showing an implementation concept of an anti-shake technology according to an example embodiment.

[0083] When there are more than tens of thousands of data in a conventional long list, virtual lists and lazy loading of images are used to optimize loading to avoid browser freezes and freezes. However, in general, lazy loading of images is to load images in the visible area immediately when the list slides to a certain position. If these images are not thumbnailed or are relatively large, they will be loaded all the time. The longer the distance we slide the long list, the more images that have not been loaded will accumulate. This also causes the browser to issue many unresponsive HTTP requests, one HTTP request for one image. The maximum number of concurrent requests for HTTP / 1.1 standard browsers is usually 6 to 8, which will cause the browser list to freeze and the operation to be unresponsive. In order to solve this problem, the present invention uses anti-shake technology, which can load images in the visible area 200 to 300 milliseconds after stopping sliding. If sliding continues within the specified time, the timing will be reset, and the user interface operation will be responded to first to avoid the list from freezing.

[0084] The function of debounce technology is to execute only the last time when an event is triggered multiple times. The debounce strategy is to execute the callback after a delay of n seconds after the event is triggered. If the event is triggered again within these n seconds, the time is reset. For events triggered at a high frequency, only the last response is made within the specified unit time. If it is triggered again within the specified time, the time is recalculated.

[0085] Anti-shake technology can be applied to login, text messaging and other buttons to prevent users from clicking too quickly and sending multiple requests; when adjusting the size of the browser window, too frequent clicks will cause too many calculations, which need to be done in one go; or in real-time saving in a text editor, save after one second when no changes are made.

[0086] By using anti-shake technology and setting a loading event threshold, delayed loading of images will not cause the total loading time of the list to be slower, but will only delay the loading of the images, that is, the images are displayed with a delay. Generally, delayed loading images will have a default placeholder image. The image at the front of a long list is not loading, and will only be loaded if this threshold is exceeded.

[0087] Whether the images in the non-visible area of ​​the list are loading depends on whether there is a slide within the specified time. If there is a slide within the specified time, it is not loaded, otherwise it is loading. The loading event threshold is generally set to 200ms to 300ms, which ensures the length of stay while preventing users from waiting too long or making mistakes.

[0088] Figure 3 A schematic diagram of a list according to an example embodiment is shown.

[0089] See also Figure 3As shown in the figure, a list is a container created on the list as a visible area, and a part of the list is displayed in this visible area, that is, the list is rendered in the visible area. The list composition generally includes a visible area and a non-visible area. The visible area is the visually visible area of ​​the sliding container element.

[0090] See also Figure 3 , list items 1 and 2 are the upper non-visible area; list items 7 to n are the lower non-visible area. These list items are not displayed and cannot be seen on the list. Generally, padding-top and padding-bottom in CSS are used to set the inner spacing, which is the virtual list technology. When sliding, padding-top and padding-bottom are dynamically calculated, and the visible area shows the first to last item in the list data.

[0091] According to some embodiments, the visible area belongs to the list rendering area, which is the area where the list items are actually rendered. The list rendering area is greater than or equal to the visible area.

[0092] Lists are rendered list items. For example, there are 1,000 items in total, but only 100 items need to be rendered. These 100 items are the real list. The length of the list needs to be longer than the height of the visible area.

[0093] Image loading uses lazy loading. When a list needs to display a large number of images, if all images are rendered at once, a large number of requests will be sent to the server, resulting in slow server response, list freeze or crash, etc. Lazy loading technology is used to preload only the images in the visible area. When sliding to other positions, the images in this area are loaded. Smaller loading images can also be used as placeholders, which effectively reduces the pressure on the server, speeds up list rendering, and improves user experience.

[0094] The traditional way to load images is to use them in the HTML code of the web page. The tag references the image. When the browser parses this tag, it starts downloading the image. Lazy loading of images stores the URL of the image in another attribute, such as data-src, instead of using it directly. Tag. When the user slides the list, JavaScript will detect whether the image is in the visible area. If so, it will assign the URL to The src attribute of the tag, the browser will start downloading the image.

[0095] The advantage of lazy loading of images is that it can reduce the loading time of the initial list. When the images in a web page are usually large resources, if all the images are loaded at once when the list is just loaded, the loading time of the list will become very long. The lazy loading technology can only load the necessary resources when the list is initially loaded, and then load them when the user needs to view more images. The user experience of the website is very important, and lazy loading of images can significantly improve the user experience. When the user slides the list, the images will be loaded one by one, and the user does not have to wait for all the images to be loaded before seeing the content. This gradual display method allows users to obtain information faster, thereby improving user satisfaction. The lazy loading technology can reduce the burden on the server, because the server does not have to send all the images at once when the list is initially loaded, but dynamically loads the images according to the user's browsing behavior, reducing the pressure on the server. For mobile devices and users with poor network conditions, traffic and bandwidth are very precious resources. If all the images are loaded at once, a lot of traffic and bandwidth will be consumed, and the lazy loading technology of images can only load images when needed, thereby reducing the consumption of bandwidth and traffic.

[0096] Figure 4 A block diagram of a computing device according to an example embodiment of the present invention is shown.

[0097] like Figure 4 As shown, computing device 30 includes processor 12 and memory 14. Computing device 30 may also include bus 22, network interface 16, and I / O interface 18. Processor 12, memory 14, network interface 16, and I / O interface 18 may communicate with each other via bus 22.

[0098] The processor 12 may include one or more general-purpose CPUs (Central Processing Units, processors), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions. According to some embodiments, the computing device 30 may also include a high-performance graphics card (GPU) 20 for accelerating the processor 12.

[0099] The memory 14 may include a machine system readable medium in the form of a volatile memory, such as a random access memory (RAM), a read-only memory (ROM) and / or a cache memory. The memory 14 is used to store one or more programs including instructions and data. The processor 12 can read the instructions stored in the memory 14 to execute the above-mentioned method according to the embodiment of the present invention.

[0100] The computing device 30 may also communicate with one or more networks via the network interface 16. The network interface 16 may be a wireless network interface.

[0101] The bus 22 may include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between components.

[0102] It should be noted that, in the specific implementation process, the computing device 30 may also include other components necessary for normal operation. In addition, those skilled in the art may understand that the above device may only include components necessary for implementing the embodiments of this specification, and need not include all components shown in the figure.

[0103] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.

[0104] An embodiment of the present invention also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method recorded in the above method embodiments.

[0105] Those skilled in the art can clearly understand that the technical solution of the present invention can be implemented with the help of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.

[0106] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0107] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0108] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0110] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0111] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.

[0112] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0113] The exemplary embodiments of the present invention are specifically shown and described above. It should be understood that the present invention is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present invention is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended clauses.

Claims

1. A method for optimizing loading of a picture list, characterized in that: include: Setting a loading dwell time threshold of a list, wherein the list is used to load pictures and includes a visible area for displaying pictures and a non-visible area for not loading pictures; Determine list sliding events and list dwell time; When the list stops sliding and the list stay time is equal to or greater than the loading stay time threshold, displaying the picture in the visible area; When the list slides without stopping, or the list slides but the list stays for less than the loading stay time threshold, the list operation is responded to first, and the picture is not loaded in the visible area.

2. The method according to claim 1, characterized in that It also includes initializing the list: After opening the page including the list, requesting the list data from the server, the list data including the image address; After acquiring the list data, the list data is cached in a data pool; Calculate the number of rendered data items in the list according to the height of the visible area and the height of the list items displayed in the list; Convert the list data corresponding to the number of rendered data into page elements, and the image address of each list data is the default placeholder image address; Replace the default placeholder image address of the list data corresponding to the number of rendered data with the real image address; The image is loaded from the real image address and rendered and displayed in the visible area.

3. The method according to claim 2, characterized in that It also includes updating the data in the list: Listening to the sliding of the list; Dynamically calculate the start and end position indexes of the rendering data of the list in the data pool; The original list data is replaced with new list data for rendering obtained by dynamic calculation, and the image address of the new list data is the default placeholder image address.

4. The method according to claim 3, characterized in that When the list stops sliding and the list stay time is equal to or greater than the loading stay time threshold, displaying the picture in the visible area includes: Convert the list data in the visible area into page elements; Replace the default placeholder image address of the list data with the real image address; The image is loaded from the real image address and rendered and displayed in the visible area.

5. The method according to claim 4, characterized in that The list also includes a buffer area between the visible area and the non-visible area.

6. The method according to claim 1, characterized in that Also includes: A timer is bound to the list to measure the time the list stays.

7. The method according to claim 1, characterized in that After the list stops sliding, if the list continues to slide within the loading dwell time threshold, the timer is reset.

8. The method according to claim 1, characterized in that: Also includes: The loading dwell time threshold is adjusted according to user behavior, website characteristics, user group habits, and performance test results.

9. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.

10. A computing device, characterized in that include: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image loading device and method

    CN104951317A

  • Loading method and system for pictures in album

    CN106201247A

  • Implementation method of page virtual list

    CN116756455A

  • High-efficiency webpage dynamic rendering method, system, equipment and medium

    CN117725337A