Optimization method and device of information flow loading component, electronic equipment and storage medium

By monitoring the sliding operation and starting preloading tasks in the information flow loading component, creating and binding views, the problems of lag and frame drops during the sliding process are solved, and the smoothness and user experience are improved.

CN119883395AActive Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The information flow loading component may experience lag or delay during the sliding process, and the preloading mechanism itself may also cause frame drop problems, affecting the smoothness of the sliding.

Method used

By monitoring the sliding operation, the preload task is started and the predicted display position is determined based on the sliding distance. If a view of the predicted display location is not obtained from the cache pool, the view is created in the preload task and data binding is performed in the next preload task.

Benefits of technology

It reduces the frame loss problem caused by simultaneously creating and binding views, improves the sliding fluency of the information flow loading component, reduces the lag problem of electronic devices, and brings a silky sliding effect to users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883395A_ABST
    Figure CN119883395A_ABST
Patent Text Reader

Abstract

The invention provides an optimization method and device for an information flow loading component, electronic equipment and a storage medium. The method comprises the steps of monitoring a sliding operation at a current moment, 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 the first view of the predicted display position is not obtained from the cache pool, creating a second view corresponding to the predicted display position in the first preloading task; and if the sliding operation does not reach the predicted display position, waiting for a second pre-loading task started next time, and carrying out data binding on the second view in the second pre-loading task. Therefore, according to the scheme, data binding is carried out on the second view in the second pre-loading task started next time, the frame loss problem caused by simultaneous view creation and view binding can be reduced, the sliding fluency of the information flow loading component is improved, the problem of jamming is avoided, and a smooth sliding effect is brought to a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to an optimization method, device, electronic device and storage medium for an information flow loading component. Background Art

[0002] Preloading of information flow loading components refers to a mechanism that loads list items or grid items in advance during the sliding process of the information flow loading component to alleviate the lag or delay during the sliding process, but the preloading mechanism itself may also cause lag or delay. Summary of the invention

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

[0004] To this end, the first purpose of this application is to propose an optimization method for information flow loading components to reduce the frame loss problem caused by creating and binding views at the same time, improve the sliding smoothness of the information flow loading component, and at the same time reduce the lag problem of electronic devices, giving users a silky sliding effect.

[0005] The second objective of the present application is to provide an optimization device for an information flow loading component.

[0006] The third objective of the present application is to provide an electronic device.

[0007] A fourth objective 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-mentioned purpose, the first aspect embodiment of the present application proposes an optimization method for an information flow loading component, including: monitoring the sliding operation at the current moment, starting the first preloading task of the information flow loading component, and determining the next predicted display position based on the sliding distance of the sliding operation; if the first view of the predicted display position is not obtained from the 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 the second preloading task to be started next time, and data binding the second view in the second preloading task.

[0010] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes an optimization device for an information flow loading component, including: a determination module, used to monitor the sliding operation at the current moment, start the first preloading task of the information flow loading component, and determine the next predicted display position based on the sliding distance of the sliding operation; an acquisition module, used to create a second view corresponding to the predicted display position in the first preloading task if the first view of the predicted display position is not obtained from the cache pool; a binding module, used to wait for the next second preloading task to be started if the sliding operation does not reach the predicted display position, and data bind the second view in the second preloading task.

[0011] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor; and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor can execute the optimization method of the information flow loading component described in the first aspect embodiment above.

[0012] To achieve the above objectives, the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored, and the computer instructions are used to enable the computer to execute the optimization method of the information flow loading component described in the first aspect of the present application.

[0013] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the optimization method of the information flow loading component described 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 monitor the sliding operation, and when the sliding operation is detected, 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, a 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 creating and binding views at the same time, improve the sliding smoothness of the information flow loading component, and reduce the jamming problem of the electronic device, bringing a silky sliding effect to the user.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0017] Figure 1 A schematic diagram of a flow chart of an optimization method for an information flow loading component provided in an embodiment of the present application;

[0018] Figure 2 A flowchart of another method for optimizing an information flow loading component provided in an embodiment of the present application;

[0019] Figure 3 A flowchart of another method for optimizing an information flow loading component provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of a process for loading and configuring optimization information provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of the structure of an optimization device for an information flow loading component provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0023] The following describes the optimization method and device of the information flow loading component of the embodiment of the present application with reference to the accompanying drawings.

[0024] Figure 1 is a flow chart showing an optimization method of an information flow loading component according to an exemplary embodiment. Figure 1 As shown, 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:

[0025] S101, monitoring the sliding operation at the current moment, starting the first preloading task of the information flow loading component, and determining the next predicted display position based on the 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 in the embodiment of the present application is an electronic device with a touch function, and such electronic device can be operated and controlled by means of fingers or stylus. Optionally, the electronic device may include a user terminal, a computer and other intelligent devices. Among them, the user terminal includes but is not limited to a mobile phone, a tablet computer, an intelligent voice interaction device, etc.

[0027] It is understandable that the purpose of preloading tasks is to alleviate the jamming or delay during the sliding operation, ensure the smoothness of the sliding of the electronic device, and provide users with better visual effects. Among them, such electronic devices are equipped with touch screens, and various operations such as browsing web pages, typing, drawing, etc. can be completed by sliding and dragging fingers.

[0028] In some implementations, an under-screen sensor may be provided under the touch screen of the electronic device to monitor the sliding operation through the under-screen sensor. For example, the sliding operation at the current moment may be identified by acquiring user gesture data, such as sliding, zooming, etc.

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

[0030] In some implementations, after the sliding operation at the current moment is detected, the sliding distance can be determined based on the trajectory of the sliding operation. Optionally, the sliding distance of the sliding operation can be calculated based on the starting coordinate position when the sliding operation starts and the ending coordinate position when the sliding operation ends.

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

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

[0033] In some implementations, the first view may be obtained from the cache pool according to the predicted display position. Optionally, a correspondence between the display position and the view may be pre-established, and then after the predicted display position is obtained, the predicted display position is used as an index to retrieve a 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 may be created in the first preloading task as the second view corresponding to the predicted display position, wherein the second view is a frame of a view and does not contain any display data.

[0035] S103: If the sliding operation does not reach the predicted display position, wait for the second preloading task to be started next time, and perform data binding on the second view in the second preloading task.

[0036] In some implementations, the preloading task of data binding to the second view may be determined by determining whether the second view needs to be displayed soon, wherein 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 a preloading task for data binding the second view is determined. The second view may be data bound in the first preloading task, or may be data bound in the second preloading task.

[0038] Optionally, a preloading task for data binding the second view may 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 then data binding is performed on the second view in the first preloading task.

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

[0040] In the optimization method of the information flow loading component provided in the embodiment of the present application, by monitoring the sliding operation, when the sliding operation is detected, 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, a 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 creating and binding views at the same time, improve the sliding smoothness of the information flow loading component, and reduce the jamming problem of electronic devices, bringing a silky sliding effect to users.

[0041] Figure 2 is a flow chart showing an optimization method of an information flow loading component according to an exemplary embodiment. Figure 2 As shown, 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:

[0042] S201, monitoring the sliding operation at the current moment, starting the first preloading task of the information flow loading component, and determining the next predicted display position based on the sliding distance of the sliding operation.

[0043] In the embodiment of the present application, the implementation method of step S201 can be implemented by any method in the embodiments of the present application, which is not limited here and will not be repeated.

[0044] S202: Acquire a first view from a first buffer area or a second buffer area of ​​a buffer pool according to the predicted display position.

[0045] In some implementations, the cache pool is divided into a first cache area and a second cache area, the first cache area contains views bound to preloaded data, and the second cache area contains views carrying dirty data, where preloaded data refers to data at a display location, and dirty data refers to data that cannot be used directly.

[0046] In some implementations, a third view of the preloaded data bound to the predicted display position may be queried from the first cache area according to the predicted display position, wherein the third view is used as the first view. The predicted display position may be used as an index to retrieve the third view of the preloaded data bound to 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. Optionally, if the third view is queried from the first cache area, the first preloading task is terminated.

[0047] Optionally, if the third view is not found in the first cache area, a fourth view carrying dirty data is found in the second cache area, wherein the fourth view is used as the first view. If the fourth view is found in the second cache area, the dirty data in the fourth view is cleared, the preloaded data of the display position is rebound, and the first preload task is terminated.

[0048] S203: If the sliding operation does not reach the predicted display position, wait for the second preloading task to be started next time, and perform data binding on the second view in the second preloading task.

[0049] In some implementations, it may be determined whether the sliding operation reaches the predicted display position based on the distance between the current real-time position and the predicted display position. Optionally, the sliding operation may be tracked to determine the real-time position of the sliding operation. For example, if the sliding operation stops at position A, the position at position 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 has reached the predicted display position; if the distance is greater than the set distance threshold, it is determined that the sliding operation has reached the predicted display position.

[0051] In some implementations, if the sliding operation reaches the predicted display position, the second view is directly bound to the preloaded data of the predicted display position without waiting for the second preloading task. 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 to 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 in the embodiment of the present application, by monitoring the sliding operation, when the sliding operation is detected, 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 to the preloaded 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 that is started next time, which reduces the time consumption of binding the view, reduces the frame loss problem caused by creating and binding the view at the same time, improves the sliding smoothness of the information flow loading component, and reduces the jamming problem of the electronic device, bringing a silky sliding effect to the user.

[0053] Figure 3 is a flow chart showing an optimization method of an information flow loading component according to an exemplary embodiment. Figure 3 As shown, 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, monitoring the sliding operation at the current moment, starting the first preloading task of the information flow loading component, and determining the next predicted display position based on the sliding distance of the sliding operation.

[0055] S302: According to the predicted display position, query the first cache area for a third view of the preloaded data bound to the predicted display position, wherein the third view serves as the first view.

[0056] S303: If the third view is found in the first cache area, the first preloading task is terminated.

[0057] S304: If the third view is not found in the first cache area, a fourth view carrying dirty data is searched from the second cache area, wherein the fourth view is used as the first view.

[0058] S305: If the fourth view is found from the second cache area, the dirty data in the fourth view is cleared, and the preloaded 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, create a second view corresponding to the predicted display position in the first preloading task.

[0060] S307: If the sliding operation reaches the predicted display position, the second view is directly bound to the preloaded data of the predicted display position without waiting for the second preload task.

[0061] S308: If the sliding operation does not reach the predicted display position, wait for the second preloading task to be started next time, and perform data binding on the second view in the second preloading task.

[0062] In the optimization method of the information flow loading component provided in the embodiment of the present application, by monitoring the sliding operation, when the sliding operation is detected, 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, a 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 creating and binding views at the same time, improve the sliding smoothness of the information flow loading component, and reduce the jamming problem of electronic devices, bringing a silky sliding effect to users.

[0063] For example, Figure 4 The flowchart of the optimization information loading component shown in the figure determines the predicted display position and determines 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 terminated. If the third view is not queried in the first cache area, it is determined 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, and the preloaded data of the display position is rebound to terminate the first preloading task.

[0064] If the fourth view is not obtained from the second cache area, a second view corresponding to the predicted display position is created in the first preloading task, and it is determined whether the second view needs to be displayed soon, that is, whether the sliding operation reaches the predicted display position. If the sliding operation does not reach the predicted display position, wait for the second preloading task to be started next time, and bind the second view to the preloaded data of the predicted display position in the second preloading task. If the sliding operation reaches the predicted display position, there is no need to wait for the second preloading task, and the second view is directly bound to the preloaded data of the predicted display position.

[0065] In order to implement the above embodiment, the present application also proposes an optimization device for an information flow loading component.

[0066] Figure 5 A schematic diagram of the structure of an optimization device for an information flow loading component provided in an embodiment of the present application.

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

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

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

[0070] The binding module 503 is used to wait for the second preloading task to be started next time if the sliding operation does not reach the predicted display position, and to 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 an embodiment of the present application, the acquisition module 502 is further used to: query, according to the predicted display position, from the first cache area a third view of preloaded data bound to the predicted display position, wherein the third view serves as the first view; if the third view is not found in the first cache area, query from the second cache area a fourth view carrying dirty data, wherein the fourth view serves as the first view.

[0073] In a possible implementation of the embodiment of the present application, the acquisition module 502 is further configured to: terminate the first preloading task if the third view is found in the first cache area.

[0074] In a possible implementation of the embodiment of the present application, the acquisition module 502 is also used to: if the fourth view is queried from the second cache area, clear the dirty data in the fourth view, rebind the preloaded data of the display position, and end the first preloading task.

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

[0076] In a possible implementation of an embodiment of the present application, the binding module 503 is further used to: if the sliding operation reaches the predicted display position, there is no need to wait for the second preloading task, and directly bind the second view to the preloaded data of the predicted display position.

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

[0078] In the optimization device of the information flow loading component provided in the embodiment of the present application, by monitoring the sliding operation, when the sliding operation is detected, 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, a 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 creating and binding views at the same time, improve the sliding smoothness of the information flow loading component, and reduce the jamming problem of electronic devices, bringing a silky sliding effect to users.

[0079] It should be noted that the above explanation of the embodiment of the optimization method of the information flow loading component is also applicable to the optimization device of the information flow loading component of this embodiment, and will not be repeated here.

[0080] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.

[0081] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.

[0082] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.

[0083] The collection, storage, use, processing, transmission, provision and application of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0084] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0085] This application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, this application is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting data. In addition, when applicable, personal identifiers are removed from such personal information to protect the privacy of users.

[0086] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0087] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0088] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0089] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0090] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0091] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

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

[0093] The storage medium mentioned above may 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 can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for optimizing an information flow loading component, characterized in that: The method comprises: Monitoring the sliding operation at the current moment, starting the first preloading task of the information flow loading component, and determining the next predicted display position based on the sliding distance of the sliding operation; If the first view of the predicted display position is not obtained from the 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, wait for the second preloading task to be started next time, and perform data binding on the second view in the second preloading task.

2. The method according to claim 1, characterized in that: The method further comprises: The first view is acquired from a first buffer area or a second buffer area of ​​the buffer pool according to the predicted display position.

3. The method according to claim 2, characterized in that The acquiring the first view from the first cache area or the second cache area of ​​the cache pool according to the predicted display position includes: According to the predicted display position, querying the first cache area for a third view bound with the preloaded data of the predicted display position, wherein the third view serves as the first view; If the third view is not found in the first cache area, a fourth view carrying dirty data is queried from the second cache area, wherein the fourth view serves as the first view.

4. The method according to claim 3, characterized in that The method further comprises: If the third view is found in the first cache area, the first preloading task is terminated.

5. The method according to claim 3, characterized in that: The method further comprises: If the fourth view is found from the second cache area, dirty data in the fourth view is cleared, and the preloaded data of the display position is rebound, and the first preloading task is ended.

6. The method according to any one of claims 1 to 5, characterized in that The performing data binding on the second view in the second preloading task includes: The preloaded data of the predicted display position is determined, and the second view is bound to the preloaded data of the predicted display position in the second preloading task.

7. The method according to claim 6, characterized in that The method further comprises: If the sliding operation reaches the predicted display position, the second view is directly bound to the preloaded data of the predicted display position without waiting for the second preloading task.

8. The method according to claim 6, characterized in that The method further comprises: Tracking the sliding operation to determine the 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, it is determined that the sliding operation reaches the predicted display position.

9. An optimization device for an information flow loading component, characterized in that: The device comprises: A determination module, configured to monitor a sliding operation at a current moment, 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 the first view of the predicted display position is not acquired from the cache pool; A binding module is used to wait for the second preloading task to be started next time if the sliding operation does not reach the predicted display position, and to perform data binding on the second view in the second preloading task.

10. The device according to claim 9, characterized in that The acquisition module is further used for: The first view is acquired from a first buffer area or a second buffer area of ​​the buffer pool according to the predicted display position.

11. The device according to claim 10, characterized in that The acquisition module is further used for: According to the predicted display position, querying the first cache area for a third view bound with the preloaded data of the predicted display position, wherein the third view serves as the first view; If the third view is not found in the first cache area, a fourth view carrying dirty data is queried from the second cache area, wherein the fourth view serves as the first view.

12. The device according to claim 11, characterized in that The acquisition module is further used for: If the third view is found in the first cache area, the first preloading task is terminated.

13. The device according to claim 11, characterized in that The acquisition module is further used for: If the fourth view is found from the second cache area, dirty data in the fourth view is cleared, and the preloaded data of the display position is rebound, and the first preloading task is ended.

14. The device according to any one of claims 9 to 13, characterized in that The binding module is further used for: The preloaded data of the predicted display position is determined, and the second view is bound to the preloaded data of the predicted display position in the second preloading task.

15. The device according to claim 14, characterized in that The binding module is further used for: If the sliding operation reaches the predicted display position, the second view is directly bound to the preloaded data of the predicted display position without waiting for the second preloading task.

16. The device according to claim 14, characterized in that The binding module is further used for: Tracking the sliding operation to determine the 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, it is determined that the sliding operation reaches the predicted display position.

17. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.

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

Citation Information

Patent Citations

  • Preloading method and device for webpage information

    CN107066632A

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

    CN108733716A

  • List item preloading method and device, equipment and storage medium

    CN109614195A

  • Control display control method and device

    CN112540761A

  • Optimizing media presentation within an application

    US20190005048A1