Method and device for optimizing information flow loading component, electronic equipment and storage medium

By monitoring swipe operations and initiating preloading tasks based on swipe distance, the stuttering issue caused by view creation and binding in the information flow loading component was resolved, resulting in a smoother swipe experience.

CN119883395BActive Publication Date: 2025-12-05BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311394079.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-12-05
Estimated Expiration
2043-10-25

AI Technical Summary

Technical Problem

The information flow loading component experiences stuttering and delays during scrolling, especially due to frame drops caused by view creation and binding.

Method used

By monitoring swipe operations, a preloading task is initiated. The predicted display position is determined based on the swipe distance. If there is no view in the cache pool, the view is created and data binding is performed in the next preloading task, reducing the problem of simultaneous view creation and binding.

Benefits of technology

It improves the smoothness of the information flow loading component, reduces lag on electronic devices, and brings users a silky smooth scrolling experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883395B_ABST
    Figure CN119883395B_ABST
Patent Text Reader

Abstract

The application provides an optimization method and device of an information flow loading component, electronic equipment and a storage medium. The method comprises the following steps: monitoring a sliding operation at a current time, starting a first preloading task of the information flow loading component, and determining a next predicted display position based on a sliding distance of the sliding operation; if a first view of the predicted display position is not obtained from a cache pool, a second view corresponding to the predicted display position is created in the first preloading task; and if the sliding operation does not reach the predicted display position, a second preloading task is waited for next time, and data binding is performed on the second view in the second preloading task. Thus, the present application can reduce the frame loss problem caused by simultaneous creation and binding of the view, improve the sliding fluency of the information flow loading component, avoid the problem of lag, and bring a smooth sliding effect to the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and particularly relates to an information flow loading component optimization method and device, electronic equipment and storage medium. BACKGROUND

[0002] Preloading of the information flow loading component refers to a mechanism of preloading list items or grid items in the sliding process of the information flow loading component, relieving the lag or delay in the sliding process, but the preloading mechanism itself can also cause lag or delay. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the related art to some extent.

[0004] To this end, a first object of the present application is to provide an information flow loading component optimization method to reduce the frame loss problem caused by simultaneous creation of a view and binding of the view, improve the sliding fluency of the information flow loading component, and reduce the lag problem of the electronic equipment, thereby providing a smooth sliding effect for users.

[0005] A second object of the present application is to provide an information flow loading component optimization device.

[0006] A third object of the present application is to provide an electronic equipment.

[0007] A fourth object of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above objects, a first aspect of the present application provides an information flow loading component optimization method, comprising: monitoring a sliding operation at a current time, starting a first preloading task of an information flow loading component, and determining a next predicted display position based on a sliding distance of the sliding operation; if a first view of the predicted display position is not obtained from a cache pool, creating a second view corresponding to the predicted display position in the first preloading task; if the sliding operation does not reach the predicted display position, waiting for a second preloading task started next time, and performing data binding on the second view in the second preloading task.

[0010] To achieve the above object, the second aspect of the present application provides an optimization device of an information flow loading component, comprising: a determination module, configured to monitor a sliding operation at a current time, start a first preloading task of the information flow loading component, and determine a next predicted display position based on a sliding distance of the sliding operation; an acquisition module, configured to create a second view corresponding to the predicted display position in the first preloading task if a first view of the predicted display position is not acquired from a cache pool; and a binding module, configured to wait for a second preloading task started next time if the sliding operation does not reach the predicted display position, and perform data binding on the second view in the second preloading task.

[0011] To achieve the above object, the third aspect of the present application provides an electronic device, comprising: a processor; and a memory connected with the processor in communication; the memory stores computer execution instructions; and the processor executes the computer execution instructions stored in the memory, so that the processor can execute the optimization method of the information flow loading component provided in the first aspect of the present application.

[0012] To achieve the above object, the fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer instructions are used to make the computer execute the optimization method of the information flow loading component provided in the first aspect of the present application.

[0013] To achieve the above object, the fifth aspect of the present application provides a computer program product, comprising a computer program, and the computer program is executed by the processor to realize the optimization method of the information flow loading component provided in the first aspect of the present application.

[0014] The optimization method, device, electronic device and storage medium of the information flow loading component provided by the present application can reduce the frame loss problem caused by simultaneously creating and binding views, improve the sliding fluency of the information flow loading component, reduce the freezing problem of the electronic device, and bring a smooth sliding effect to the user.

[0015] Additional aspects and advantages of the present application will be made apparent by the following description. BRIEF DESCRIPTION OF DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the following drawings of which:

[0017] Figure 1 A flowchart of an optimization method of an information flow loading component provided by an embodiment of the present application;

[0018] Figure 2 A flowchart of an optimization method of an information flow loading component provided by an embodiment of the present application;

[0019] Figure 3 A flowchart of an optimization method of an information flow loading component provided by an embodiment of the present application;

[0020] Figure 4 A flowchart of an optimization method of an information flow loading component provided by an embodiment of the present application;

[0021] Figure 5 A structural diagram of an optimization device of an information flow loading component provided by an embodiment of the present application. DETAILED DESCRIPTION

[0022] Embodiments of the present application are described in detail below with reference to the accompanying drawings, in which the same or similar components have the same or similar designations and functions throughout various figures and / or portions of the drawings. The embodiments described below are examples in which the present application is applied to explain the present application, and are not to be construed as limiting the present application.

[0023] The optimization method and device of the information flow loading component of the embodiments of the present application are described below with reference to the accompanying drawings.

[0024] Figure 1 A flowchart of an optimization method of an information flow loading component according to an exemplary embodiment is shown in FIG. 1, and the optimization method of the information flow loading component of the embodiments of the present application includes but is not limited to the following steps: Figure 1

[0025] S101, a sliding operation at the current time is monitored, a first preloading task of an information flow loading component is started, and a next predicted display position is determined based on a sliding distance of the sliding operation.

[0026] It should be noted that the execution subject of the optimization method of the information flow loading component of the embodiments of the present application is an electronic device with a touch function, which can be operated and controlled by a finger or a stylus and the like. Optionally, the electronic device can include a user terminal, a computer and other smart devices. The user terminal includes but is not limited to a mobile phone, a tablet computer, a smart voice interactive device and the like.

[0027] ​It can be understood that the preloading task is to alleviate the lag or delay in the sliding operation process, ensure the smoothness of the sliding of the electronic device, and provide better visual effects for the user. Among them, the electronic device is configured with a touch screen, and various operations can be completed through finger sliding, dragging and the like, such as browsing web pages, typing, drawing and the like.

[0028] In some implementations, a screen-under sensor can be arranged below the touch screen of the electronic device, and the sliding operation is monitored through the screen-under sensor. For example, the sliding operation at the current moment can be identified by acquiring gesture data of the user, such as sliding, zooming and the like.

[0029] Further, the first preloading task of the information flow loading component is started, and the predicted display position to be displayed next is determined according to the sliding distance of the sliding operation at the current moment. That is, the display position reached after the sliding operation is performed is the predicted display position to be displayed next.

[0030] In some implementations, after the sliding operation at the current moment is monitored, the sliding distance can be determined based on the trajectory of the sliding operation. Alternatively, the sliding distance of the sliding operation can be calculated based on the starting coordinate position at the beginning of the sliding operation and the ending coordinate position at the end of the sliding operation.

[0031] S102, if the first view of the predicted display position is not obtained from the cache pool, a second view corresponding to the predicted display position is created in the first preloading task.

[0032] It can be understood that the cache pool contains loaded view items, and by obtaining the existing view from the cache pool, repeated creation of the view is avoided, the time consumption of displaying the view is reduced, the page lag is avoided, and the smoothness of the sliding is improved.

[0033] In some implementations, the first view can be obtained from the cache pool according to the predicted display position. Alternatively, a corresponding relationship between the display position and the view can be established in advance, and then after the predicted display position is obtained, the predicted display position is used as an index to retrieve the view corresponding to the predicted display position in the cache pool, and the retrieved view is used as the first view of the predicted display position.

[0034] In some implementations, if the first view is not obtained from the cache pool, a new view can be created in the first preloading task as the second view corresponding to the predicted display position. The second view is a framework of a view and does not contain any display data.

[0035] S103, if the sliding operation does not reach the predicted display position, waiting for the next started second preloading task, and performing data binding on the second view in the second preloading task.

[0036] In some implementations, the preloading task of data binding for the second view can be determined by judging whether the second view needs to be displayed soon. The data refers to the content displayed in the view, such as pictures, texts, etc.

[0037] That is, it is determined whether the sliding operation reaches the predicted display position, and the preloading task of data binding for the second view is determined. The second view can be data bound in the first preloading task, and the second view can also be data bound in the second preloading task.

[0038] Optionally, the preloading task of data binding for the second view can be determined based on the sliding distance of the sliding operation. If the sliding distance is less than or equal to a set distance threshold, it is determined that the sliding operation reaches the predicted display position, and the second view is data bound in the first preloading task.

[0039] Optionally, if the sliding distance is greater than the set distance threshold, the second view can be added to the cache pool, and the second view can be data bound in the second preloading task, which can reduce the frame loss problem caused by simultaneously creating and binding the view, avoid page lag, and thus improve the smoothness of sliding.

[0040] In the optimization method of the information flow loading component provided in the embodiments of the present application, by monitoring the sliding operation, when the sliding operation is monitored, the first preloading task is started, and the next predicted display position is determined according to the sliding distance of the sliding operation. Then, the first view is obtained from the cache pool according to the predicted display position. If the first view is not obtained from the cache pool, the second view corresponding to the predicted display position is created in the first preloading task, and the second view is data bound in the second preloading task started next time, which can reduce the frame loss problem caused by simultaneously creating and binding the view, improve the sliding smoothness of the information flow loading component, reduce the lag problem of the electronic device, and bring a smooth sliding effect to the user.

[0041] Figure 2 is a flow chart of an optimization method of an information flow loading component according to an example embodiment, as shown in Figure 2 The optimization method of the information flow loading component of the embodiments of the present application includes but is not limited to the following steps:

[0042] S201, the sliding operation at the current time is monitored, the first preloading task of the information flow loading component is started, and the next predicted display position is determined based on the sliding distance of the sliding operation.

[0043] In the embodiments of the present application, the implementation of step S201 can be realized by any one of the embodiments of the present application, and here it is not limited, and will not be repeated.

[0044] S202, obtaining a first view from the first cache area or the second cache area of the cache pool according to the predicted display position.

[0045] In some implementations, the cache pool is divided into the first cache area and the second cache area, the first cache area is a view bound with preloaded data, and the second cache area is a view carrying dirty data. The preloaded data refers to data of the predicted display position, and the dirty data refers to data that cannot be directly used.

[0046] In some implementations, a third view bound with preloaded data of the predicted display position can be queried from the first cache area according to the predicted display position, and the third view is used as the first view. The predicted display position can be used as an index to retrieve the third view bound with the preloaded data of the predicted display position in the first cache area, and the retrieved third view is used as the first view of the predicted display position. Alternatively, if the third view is queried from the first cache area, the first preloading task is ended.

[0047] Alternatively, if the third view is not queried from the first cache area, a fourth view carrying dirty data is queried from the second cache area, and the fourth view is used as the first view. If the fourth view is queried from the second cache area, the dirty data in the fourth view is cleaned, the preloaded data of the display position is re-bound, and the first preloading task is ended.

[0048] S203, if the sliding operation does not reach the predicted display position, waiting for a second preloading task started next time, and performing data binding on a second view in the second preloading task.

[0049] In some implementations, whether the sliding operation reaches the predicted display position can be determined based on a distance between the current real-time position and the predicted display position. Alternatively, the sliding operation can be tracked to determine the real-time position of the sliding operation. For example, if the sliding operation stops at A, the position at A is the real-time position of the sliding operation.

[0050] Further, the distance between the real-time position and the predicted display position is determined. If the distance is less than or equal to a set distance threshold, it is determined that the sliding operation reaches the predicted display position; if the distance is greater than the set distance threshold, it is determined that the sliding operation does not reach the predicted display position.

[0051] In some implementations, if the sliding operation reaches the predicted display position, the second preloading task is not needed, and the second view is directly bound with the preloaded data of the predicted display position. If the sliding operation does not reach the predicted display position, the preloaded data of the predicted display position is determined, and the second view is bound with the preloaded data of the predicted display position in the second preloading task.

[0052] In the optimization method of the information flow loading component provided by the embodiment of the present application, the sliding operation is monitored, when the sliding operation is monitored, the first preloading task is started, and the next predicted display position is determined according to the sliding distance of the sliding operation. Then, the first view is obtained from the first cache area or the second cache area of the cache pool according to the predicted display position, if the first view is not obtained from the cache pool, the second view corresponding to the predicted display position is created in the first preloading task. If the sliding operation reaches the predicted display position, the second view is directly bound with the preloading data of the predicted display position. If the sliding operation does not reach the predicted display position, the second view is data-bound in the second preloading task started next time, which reduces the time consumption of binding the view, reduces the frame loss problem caused by simultaneously creating the view and binding the view, improves the sliding fluency of the information flow loading component, reduces the freezing problem of the electronic device, and brings a smooth sliding effect to the user.

[0053] Figure 3 is a flow chart of an optimization method of an information flow loading component according to an exemplary embodiment, as shown in Figure 3 The optimization method of the information flow loading component of the embodiment of the present application includes but is not limited to the following steps:

[0054] S301, the sliding operation at the current time is monitored, the first preloading task of the information flow loading component is started, and the next predicted display position is determined based on the sliding distance of the sliding operation.

[0055] S302, according to the predicted display position, the third view with the preloading data of the predicted display position bound in the first cache area is queried, and the third view is used as the first view.

[0056] S303, if the third view is queried from the first cache area, the first preloading task is ended.

[0057] S304, if the third view is not queried from the first cache area, the fourth view carrying dirty data is queried from the second cache area, and the fourth view is used as the first view.

[0058] S305, if the fourth view is queried from the second cache area, the dirty data in the fourth view is cleared, the preloading data of the display position is re-bound, and the first preloading task is ended.

[0059] S306, if the first view of the predicted display position is not obtained from the cache pool, the second view corresponding to the predicted display position is created in the first preloading task.

[0060] S307, if the sliding operation reaches the predicted display position, the second view is directly bound with the preloaded data of the predicted display position without waiting for the second preloading task.

[0061] S308, if the sliding operation does not reach the predicted display position, the second view is bound with the preloaded data of the predicted display position in the second preloading task.

[0062] In the optimization method of the information flow loading component provided in the embodiments of the present application, the first preloading task is started when the sliding operation is monitored, and the next predicted display position is determined according to the sliding distance of the sliding operation. Then, the first view is obtained from the cache pool according to the predicted display position. If the first view is not obtained from the cache pool, the second view corresponding to the predicted display position is created in the first preloading task, and the second view is bound with the preloaded data in the second preloading task, which can reduce the frame loss caused by simultaneous creation and binding of the view, improve the smoothness of the sliding of the information flow loading component, reduce the freezing problem of the electronic device, and bring a smooth sliding effect to the user.

[0063] As shown in the flowchart of the optimized information loading component, Figure 4 the predicted display position is determined, and it is judged whether the third view can be obtained from the first cache area as the first view. If the third view is queried from the first cache area, the first preloading task is ended. If the third view is not queried from the first cache area, it is judged whether the fourth view carrying dirty data can be queried from the second cache area as the first view. If the fourth view is queried from the second cache area, the dirty data in the fourth view is cleared, the preloaded data of the display position is re-bound, and the first preloading task is ended.

[0064] If the fourth view is not obtained from the second cache area, the second view corresponding to the predicted display position is created in the first preloading task, and it is judged whether the second view needs to be displayed soon, that is, it is judged whether the sliding operation reaches the predicted display position. If the sliding operation does not reach the predicted display position, the second preloading task is waited for, and the second view is bound with the preloaded data of the predicted display position in the second preloading task. If the sliding operation reaches the predicted display position, the second view is directly bound with the preloaded data of the predicted display position without waiting for the second preloading task.

[0065] In order to realize the above-mentioned embodiments, the present application further provides an optimization device of an information flow loading component.

[0066] Figure 5 The structure diagram of the optimization device of the information flow loading component provided in the embodiments of the present application.

[0067] As Figure 5 shown, the optimization apparatus 500 of the information flow loading component includes:

[0068] A determination module 501 is configured to monitor a sliding operation to a current time, start a first preloading task of the information flow loading component, and determine a next predicted display position based on a sliding distance of the sliding operation.

[0069] An acquisition module 502 is configured to create a second view corresponding to the predicted display position in the first preloading task if a first view of the predicted display position is not acquired from a cache pool.

[0070] A binding module 503 is configured to wait for a second preloading task started next time if the sliding operation does not reach the predicted display position, and perform data binding on the second view in the second preloading task.

[0071] In a possible implementation manner of the embodiment of the present application, the acquisition module 502 is further configured to acquire the first view from the first cache area or the second cache area of the cache pool according to the predicted display position.

[0072] In a possible implementation manner of the embodiment of the present application, the acquisition module 502 is further configured to query a third view carrying preloading data of the predicted display position from the first cache area according to the predicted display position, where the third view is used as the first view; and if the third view is not queried from the first cache area, query a fourth view carrying dirty data from the second cache area, where the fourth view is used as the first view.

[0073] In a possible implementation manner of the embodiment of the present application, the acquisition module 502 is further configured to end the first preloading task if the third view is queried from the first cache area.

[0074] In a possible implementation manner of the embodiment of the present application, the acquisition module 502 is further configured to clean dirty data in the fourth view and re-bind preloading data of the display position if the fourth view is queried from the second cache area, and end the first preloading task.

[0075] In a possible implementation manner of the embodiment of the present application, the binding module 503 is further configured to determine preloading data of the predicted display position, and bind the second view and the preloading data of the predicted display position in the second preloading task.

[0076] In a possible implementation of the embodiment of the application, the binding module 503 is further configured to: if the sliding operation reaches the predicted display position, directly bind the second view and the preloaded data of the predicted display position without waiting for the second preloading task.

[0077] In a possible implementation of the embodiment of the application, the binding module 503 is further configured to: track the sliding operation, determine a real-time position of the sliding operation, determine a distance between the real-time position and the predicted display position, and determine that the sliding operation reaches the predicted display position if the distance is less than or equal to a set distance threshold.

[0078] In the optimization device for the information flow loading component provided by the embodiment of the application, by monitoring the sliding operation, starting the first preloading task when the sliding operation is monitored, and determining the next predicted display position according to the sliding distance of the sliding operation, the first view is obtained from the cache pool according to the predicted display position, if the first view is not obtained from the cache pool, the second view corresponding to the predicted display position is created in the first preloading task, and the data binding of the second view is performed in the second preloading task started next time, which can reduce the frame loss problem caused by simultaneously creating and binding the view, improve the sliding fluency of the information flow loading component, reduce the freezing problem of the electronic device, and bring a smooth sliding effect to the user.

[0079] It should be noted that the foregoing explanation of the optimization method for the information flow loading component is also applicable to the optimization device for the information flow loading component, which will not be described here again.

[0080] To implement the foregoing embodiments, the application further provides an electronic device, including a processor and a memory connected with the processor in communication; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0081] To implement the foregoing embodiments, the application further provides a computer readable storage medium, which stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the method provided in the foregoing embodiments.

[0082] To implement the foregoing embodiments, the application further provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the method provided in the foregoing embodiments.

[0083] The collection, storage, use, processing, transmission, provision, and application of user personal information involved in the present application comply with relevant laws and regulations and do not violate public order and good customs.

[0084] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and not shared or sold outside these legitimate uses. In addition, such collection / sharing should be carried out after the user's informed consent is received, including but not limited to informing the user to read the user agreement / user notice before the user uses the function, and signing the agreement / authorization including authorization of relevant user information. In addition, any necessary steps should be taken to protect and secure access to such personal information data and ensure that other people with access to personal information data comply with their privacy policies and processes.

[0085] The present application contemplates providing an implementation in which users can selectively block the use of, or access to, personal information data. That is, the present application contemplates providing users with control to permit, deny, or limit how their personal information data is collected, used, processed, transferred, and stored. Implementation that provide users such control over their personal information data under applicable privacy laws and / or policies can take a variety of forms depending on how the data is collected and used. For example, the implementation can turn data collection or data processing off or on, and / or delete aggregate or specific data collected.

[0086] In the foregoing various embodiment descriptions, the description referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. Furthermore, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples, without contradiction.

[0087] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0088] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions (or steps) and / or can be implemented entirely in hardware. The various embodiments of the application can be further implemented in a computer program product tangibly embodied in a machine-readable storage medium (e.g., memory) including instructions

[0089] Logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be embodied in computer-readable instructions, modules, segments, or portions of codes, which are executable by a processing system, apparatus, or device, such as a computer based system, processor, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this section, a "computer-readable medium" can be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer readable medium can specifically include a hardware element, such as a memory, a processor, or a combination of hardware elements, which can be tangible in nature. More specific examples (a non-exhaustive list) of the computer readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that can be later executed by a computer. In this context, a "processor" can mean any hardware system, apparatus, or device that can fetch instructions from a computer readable medium and execute the instructions, including a processing system, a processor, or a combination of hardware and software that can fetch instructions from a computer readable medium and execute the instructions.

[0090] It should be understood that aspects of the application can be implemented in hardware, software, firmware, or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As such, in some embodiments, specifically configured hardware can be used, and in another embodiment, software stored in a memory can be used, in combination with a suitably configured general purpose computer. In other embodiments, combinations of dedicated hardware and / or software can be used. For example, a combination of dedicated hardware and / or software can be used to implement the various steps or methods described above. In some embodiments, the various steps or methods described above can be implemented in one or more microprocessors, microcontrollers, microcomputers, programmable logic devices, application specific integrated circuits, or the like. In some embodiments, the various steps or methods described above can be implemented in one or more computers using software.

[0091] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment method can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0092] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0093] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.

Claims

1. A method for optimizing an information flow loading component, the method comprising: The method comprises: ​ monitoring a sliding operation at a current time, starting a first preloading task of an information flow loading component, and determining a next predicted display position based on a sliding distance of the sliding operation; if a first view of the predicted display position is not obtained from a cache pool, creating a second view corresponding to the predicted display position in the first preloading task; if the sliding operation does not reach the predicted display position, waiting for a second preloading task started next time, and performing data binding on the second view in the second preloading task; The method further comprises: obtaining the first view from a first cache area or a second cache area of the cache pool according to the predicted display position.

2. The method of claim 1, wherein, The obtaining the first view from the first cache area or the second cache area according to the predicted display position comprises: querying a third view bound with preloading data of the predicted display position from the first cache area according to the predicted display position, wherein the third view is used as the first view; if the third view is not queried from the first cache area, querying a fourth view carrying dirty data from the second cache area, wherein the fourth view is used as the first view.

3. The method of claim 2, wherein, The method further comprises: if the third view is queried from the first cache area, ending the first preloading task.

4. The method of claim 2, wherein, The method further comprises: if the fourth view is queried from the second cache area, cleaning dirty data in the fourth view, re-binding preloading data of the display position, and ending the first preloading task.

5. The method according to any one of claims 1-4, characterized in that, The performing data binding on the second view in the second preloading task comprises: determining preloading data of the predicted display position, and binding the second view and the preloading data of the predicted display position in the second preloading task.

6. The method of claim 5, wherein, The method further comprises: if the sliding operation reaches the predicted display position, directly binding the second view and the preloading data of the predicted display position without waiting for the second preloading task.

7. The method of claim 5, wherein, The method further comprises: tracking the sliding operation, determining a real-time position of the sliding operation; determining a distance between the real-time position and the predicted display position; if the distance is less than or equal to a set distance threshold, determining that the sliding operation reaches the predicted display position.

8. An apparatus for optimizing information flow loading components, comprising: The device comprises: a determining module configured to monitor a sliding operation at a current time, start a first preloading task of an information flow loading component, and determine a next predicted display position based on a sliding distance of the sliding operation; an obtaining module configured to, if a first view of the predicted display position is not obtained from a cache pool, create a second view corresponding to the predicted display position in the first preloading task; a binding module configured to, if the sliding operation does not reach the predicted display position, wait for a second preloading task started next time, and perform data binding on the second view in the second preloading task; The obtaining module is further configured to: According to the predicted display position, the first view is obtained from the first cache area or the second cache area of the cache pool.

9. The apparatus of claim 8, wherein, The obtaining module is further configured to: According to the predicted display position, a third view carrying preloaded data of the predicted display position is queried from the first cache area, where the third view is the first view; If the third view is not queried from the first cache area, a fourth view carrying dirty data is queried from the second cache area, where the fourth view is the first view.

10. The apparatus of claim 9, wherein, The obtaining module is further configured to: If the third view is queried from the first cache area, the first preloading task is ended.

11. The apparatus of claim 9, wherein, The obtaining module is further configured to: If the fourth view is queried from the second cache area, dirty data in the fourth view is cleaned, preloaded data of the predicted display position is re-bound, and the first preloading task is ended.

12. The apparatus of any one of claims 8-11, wherein, The binding module is further configured to: Preloaded data of the predicted display position is determined, and the second view and the preloaded data of the predicted display position are bound in the second preloading task.

13. The apparatus of claim 12, wherein, The binding module is further configured to: If the sliding operation reaches the predicted display position, the second view and the preloaded data of the predicted display position are directly bound without waiting for the second preloading task.

14. The apparatus of claim 12, wherein, The binding module is further configured to: The sliding operation is tracked to determine a real-time position of the sliding operation; A distance between the real-time position and the predicted display position is determined; If the distance is less than or equal to a set distance threshold, it is determined that the sliding operation reaches the predicted display position.

15. An electronic device, comprising: Comprise: A processor and a memory connected to the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1-7.

16. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-7.

17. A computer program product, characterised in that, A computer program is executed by the processor to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Preloading method and device for webpage information

    CN107066632A

  • Image preloading method and device, electronic equipment and readable storage medium

    CN108733716A