Information flow loading method and device, user equipment and storage medium
By predicting the display area during sliding operation and preloading the list items, the problem of unsmooth sliding operation is solved, and user experience and satisfaction are improved.
Patent Information
- Application Number
- CN202311161688.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2025-03-11
AI Technical Summary
When the user's sliding operation is not smooth, it will lead to a decline in user experience, resulting in dissatisfaction and mood impact, and may even lead to user loss.
By predicting the newly added display area on the list control when the user slides, the main thread is called to preload the corresponding list item and cache the preloaded list item in the cache, so that the list item is directly read and loaded from the cache when the slide operation is completed.
It improves the smoothness of sliding operations, avoids sliding lag, improves user experience and satisfaction, and reduces the risk of user churn.
Smart Images

Figure CN119597177A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to an information flow loading method, device, user equipment and storage medium. Background Art
[0002] When a user browses an information stream using a device, after browsing the information stream displayed on the current interface, the user can usually obtain more information streams by sliding operations to browse more content.
[0003] However, if the sliding operation is not smooth, the user will feel lag and delay, which will not only affect the user experience and cause user dissatisfaction, but may also affect the user's mood, resulting in reduced user productivity and efficiency, and may even cause user loss and no longer use the device.
[0004] Therefore, ensuring the smoothness of sliding operations is an important part of improving user experience and satisfaction. Summary of the invention
[0005] The present disclosure provides an information flow loading method, device, user equipment and storage medium to solve the deficiencies in the related art.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for loading an information stream is provided, the method comprising:
[0007] In response to a sliding operation of a user on a list control included in a target interface, sliding the list control, and predicting a newly added first display area on the list control according to the sliding operation;
[0008] Calling the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control, and caching the preloaded first list item in the cache corresponding to the target interface;
[0009] In response to the sliding operation on the list control being completed, the first list item is read from the cache corresponding to the target interface, and the first list item is loaded in the first display area to display the information flow corresponding to the first list item in the first display area.
[0010] Optionally, the calling of the main thread of the target interface to preload the first list item corresponding to the first display area newly added on the list control includes:
[0011] Determine whether resources required for preloading a first list item corresponding to a newly added first display area on the list control exceed currently remaining available resources of the main thread;
[0012] If the resources required for preloading the first list item do not exceed the currently remaining available resources of the main thread, the main thread of the target interface is called to preload the first list item corresponding to the newly added first display area on the list control.
[0013] Optionally, the method further includes:
[0014] If the first list item corresponding to the first display area is not read from the cache corresponding to the target interface, the first list item is loaded in real time.
[0015] Optionally, predicting a first display area newly added on the list control according to the sliding operation includes:
[0016] According to the sliding parameter corresponding to the sliding operation, a first display area newly added to the list control when the sliding operation on the list control is completed is calculated.
[0017] Optionally, the sliding parameter includes one or more of the following combinations:
[0018] Slide direction, slide distance, touch pressure, touch duration.
[0019] Optionally, before calling the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control, the method further includes:
[0020] Determine whether the messages currently to be processed by the main thread of the target interface have reached a threshold;
[0021] If the messages currently to be processed by the main thread of the target interface do not reach a threshold, a preloaded message is sent to the main thread based on a message processing mechanism supported by the main thread, so that the main thread processes the preloaded message to preload the first list item corresponding to the newly added first display area on the list control, and cache the first list item corresponding to the first display area in a cache corresponding to the target interface.
[0022] Optionally, the method further includes:
[0023] If the messages currently to be processed by the main thread of the target interface reach the threshold, then after a preset interval, determine again whether the messages currently to be processed by the main thread of the target interface reaches the threshold, and stop when the number of determinations exceeds the specified number.
[0024] Optionally, preloading the first list item corresponding to the newly added first display area on the list control, and caching the preloaded first list item in a cache corresponding to the target interface includes:
[0025] In the secondary cache corresponding to the target interface, create a first list item corresponding to the first display area newly added on the list control;
[0026] The first list item is cached in a first-level cache corresponding to the target interface.
[0027] Optionally, the method further includes:
[0028] In response to a second display area on the list control sliding out from the target interface, a second list item corresponding to the second display area is cached in a cache corresponding to the target interface.
[0029] Optionally, the list control includes a ListView control or a GridView control.
[0030] Optionally, the information flow includes one or more of the following combinations:
[0031] Text message, picture message or video message.
[0032] Optionally, the message processing mechanism includes a Handler mechanism.
[0033] According to a second aspect of an embodiment of the present disclosure, an information stream loading device is provided, the device comprising:
[0034] A prediction module, configured to slide the list control in response to a user's sliding operation on the list control included in the target interface, and predict a newly added first display area on the list control according to the sliding operation;
[0035] a preloading module, configured to call the main thread of the target interface to preload a first list item corresponding to the first display area newly added on the list control, and cache the preloaded first list item in a cache corresponding to the target interface;
[0036] A loading module is used to read the first list item from the cache corresponding to the target interface in response to the completion of the sliding operation on the list control, and load the first list item in the first display area to display the information flow corresponding to the first list item in the first display area.
[0037] Optionally, the preloading module includes:
[0038] A resource determination submodule, used to determine whether the resources required for preloading the first list item corresponding to the newly added first display area on the list control exceed the currently remaining available resources of the main thread;
[0039] The preloading submodule is used to call the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control if the resources required for preloading the first list item do not exceed the currently remaining available resources of the main thread.
[0040] Optionally, the device further comprises:
[0041] The real-time module is used to load the first list item in real time if the first list item corresponding to the first display area is not read from the cache corresponding to the target interface.
[0042] Optionally, the prediction module includes:
[0043] The calculation submodule is used to calculate, according to the sliding parameters corresponding to the sliding operation, a first display area newly added to the list control when the sliding operation of the list control is completed.
[0044] Optionally, the device further comprises:
[0045] A message determination module, used to determine whether the message currently to be processed by the main thread of the target interface reaches a threshold;
[0046] A message processing module is used to send a preloaded message to the main thread if the messages currently to be processed by the main thread of the target interface do not reach a threshold, based on the message processing mechanism supported by the main thread, so that the main thread processes the preloaded message, so as to preload the first list item corresponding to the newly added first display area on the list control, and cache the first list item corresponding to the first display area in the cache corresponding to the target interface.
[0047] Optionally, the device further comprises:
[0048] The polling module is used to determine whether the messages currently to be processed by the main thread of the target interface have reached the threshold after a preset interval if the messages currently to be processed by the main thread of the target interface have reached the threshold, and stop when the number of determined times exceeds the specified number.
[0049] Optionally, the preloading module further includes:
[0050] A secondary cache submodule, used to create a first list item corresponding to the newly added first display area on the list control in the secondary cache corresponding to the target interface;
[0051] The first-level cache submodule is used to cache the first list item into the first-level cache corresponding to the target interface.
[0052] According to a third aspect of an embodiment of the present disclosure, a user equipment is provided, including:
[0053] processor;
[0054] a memory for storing processor-executable instructions;
[0055] Wherein, the processor is used to implement the above-mentioned information flow loading method.
[0056] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the above-mentioned information flow loading method.
[0057] The technical solution provided by the embodiments of the present disclosure may at least include the following beneficial effects:
[0058] According to an embodiment of the present disclosure, a newly added first display area on a list control is predicted according to the user's sliding operation, and then the first list item corresponding to the first display area is preloaded and cached by calling the main thread, so that when the sliding operation is completed, the first list item can be directly read from the cache and displayed in the first display area. Since the predicted first list item is preloaded during the sliding process, the first list item can be directly read from the cache when the sliding operation is completed and displayed in the first display area, which improves the smoothness of sliding and avoids the impact of sliding jams on user experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0060] Figure 1 It is a schematic flow chart of an information flow loading method according to an embodiment of the present disclosure.
[0061] Figure 2 It is a schematic diagram of an information flow loading method according to an embodiment of the present disclosure.
[0062] Figure 3 It is a schematic diagram of another information flow loading method according to an embodiment of the present disclosure.
[0063] Figure 4 It is a schematic flow chart of another information flow loading method according to an embodiment of the present disclosure.
[0064] Figure 5It is a schematic diagram of another information flow loading method according to an embodiment of the present disclosure.
[0065] Figure 6 It is a schematic block diagram of an information stream loading device according to an embodiment of the present disclosure.
[0066] Figure 7 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0067] Figure 8 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0068] Fig. 9 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0069] Fig.10 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0070] Fig.11 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0071] Fig.12 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0072] Fig.13 It is a schematic block diagram of another information stream loading device according to an embodiment of the present disclosure.
[0073] Fig.14 It is a schematic block diagram of a device for information stream loading according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0075] In the related art, when a user uses an application installed on a device, he can browse the information stream provided by the application, and the list control included in the application interface can usually be used as a carrier for displaying the information stream. By sliding the list control, the user can load more information streams and browse more content.
[0076] However, when an application provides an information stream to a list control for display, the application itself usually completes the loading process. However, if there is too much content to load, it will take up too much time in the main thread, resulting in the information stream still not loading smoothly after the user has swiped, greatly affecting the user experience. In addition, the application may freeze due to excessive resources consumed during loading, which also affects the user experience.
[0077] It can be seen that in the embodiments of the above-mentioned related technologies, in the process of loading the information stream, especially when there is too much information stream content to be loaded, the sliding smoothness will be reduced, affecting the user experience.
[0078] The information flow loading method provided by the present disclosure is introduced below through specific embodiments.
[0079] See also Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of an information flow loading method according to an embodiment of the present disclosure. Figure 1 As shown, the information flow loading method may include the following steps:
[0080] In step 102, in response to a user's sliding operation on a list control included in a target interface, the list control is slid, and a newly added first display area on the list control is predicted according to the sliding operation.
[0081] For example, Figure 2 For example, Figure 2 It is a schematic diagram of an information flow loading method according to an embodiment of the present disclosure.
[0082] like Figure 2 As shown, assuming that the target interface is an interface of a news application, when the user places a finger on the screen and slides the finger from the bottom of the screen to the top of the screen, more news content can be loaded at the bottom of the screen.
[0083] Among them, the change of the display position of the news content in the interface is realized through the list control contained in the interface. As mentioned above, the list control can be used as a carrier for displaying news content, and the user's sliding operation on the screen is actually a sliding operation on the list control.
[0084] like Figure 2 As shown on the left, before the user performs a sliding operation, news content 1 to news content 6 are displayed in the interface. When the user wants to browse new news content, he can slide up to slide news content 2 to news content 6 upward, thereby adding a display area at the bottom of the interface, and the newly added display area can be used to display the newly added news content 7.
[0085] Therefore, when the user completes the sliding operation, Figure 2 As shown on the right, the news contents displayed in the interface are 2 to 7.
[0086] It should be noted that, as mentioned above, in order to display the newly added news content 7 in the newly added display area, the list item corresponding to the newly added display area is required to be used as a carrier of the news content 7. For the relevant description of the list item, please refer to the subsequent steps 104 and 106.
[0087] In an illustrated implementation manner, in step 102, predicting a newly added first display area on the list control according to the sliding operation may include:
[0088] According to the sliding parameter corresponding to the sliding operation, a first display area newly added to the list control when the sliding operation on the list control is completed is calculated.
[0089] For example, when a user slides a list control, the sliding parameters corresponding to the user's sliding operation can be obtained, and by calculating the sliding parameters, the first display area newly added by the list control when the sliding operation of the list control is completed is predicted, thereby determining the first display area. In addition, the first list item corresponding to the first display area can be preloaded by calling the main thread of the target interface.
[0090] In one embodiment shown, the sliding parameter includes one or more combinations of the following:
[0091] Slide direction, slide distance, touch pressure, touch duration.
[0092] For example, the possible position of the first display area can be determined according to the sliding direction, such as the top of the screen, the bottom of the screen, the left side of the screen, the right side of the screen, etc. The size of the first display area can be determined according to the sliding distance. The larger the sliding distance, the larger the first display area can be. The size of the first display area can also be calculated based on a preset formula according to the touch pressure or the touch duration.
[0093] In step 104, the main thread of the target interface is called to preload the first list item corresponding to the newly added first display area on the list control, and the preloaded first list item is cached in the cache corresponding to the target interface.
[0094] For example, Figure 3 For example, Figure 3 It is a schematic diagram of another information flow loading method according to an embodiment of the present disclosure.
[0095] like Figure 3As shown, the main thread of the target interface can be called to preload the first list item corresponding to the newly added display area 7 on the list control through the main thread, and after the preloading is completed, the first list item that has been preloaded is cached in the cache corresponding to the target interface. In addition, the above-mentioned device can include but is not limited to electronic devices such as mobile phones, tablet computers, wearable devices, sensors, and Internet of Things devices.
[0096] In an embodiment shown, in step 104, the main thread of calling the target interface preloads the first list item corresponding to the newly added first display area on the list control, which may include:
[0097] Determine whether resources required for preloading a first list item corresponding to a newly added first display area on the list control exceed currently remaining available resources of the main thread;
[0098] If the resources required for preloading the first list item do not exceed the currently remaining available resources of the main thread, the main thread of the target interface is called to preload the first list item corresponding to the newly added first display area on the list control.
[0099] For example, it is possible to determine the resources required to preload the first list item corresponding to the newly added first display area on the list control and the currently remaining available resources of the main thread, and determine whether the resources required to preload the first list item exceed the currently remaining available resources of the main thread.
[0100] Continuing with the example, if the resources required to preload the first list item do not exceed the currently remaining available resources of the main thread, the main thread of the target interface is called to preload the first list item corresponding to the newly added first display area on the list control.
[0101] In the above process, by comparing the resources required for preloading the first list item and the currently remaining available resources of the main thread, the main thread can be used to complete the preloading of the first list item when the current main thread has the resources required for preloading the first list item, thereby ensuring that the priority of preloading the resources required for the first list item is higher than other background tasks, avoiding the occurrence of freezes on the target interface. In addition, by comparing resources, it is possible to prevent the main thread from consuming too many resources to preload the first list item, thereby strengthening the management of resource usage.
[0102] In one embodiment shown, before step 104, the method may further include:
[0103] Determine whether the messages currently to be processed by the main thread of the target interface have reached a threshold;
[0104] If the messages currently to be processed by the main thread of the target interface do not reach a threshold, a preloaded message is sent to the main thread based on a message processing mechanism supported by the main thread, so that the main thread processes the preloaded message to preload the first list item corresponding to the newly added first display area on the list control, and cache the first list item corresponding to the first display area in a cache corresponding to the target interface.
[0105] For example, before preloading the first list item, whether to notify the main thread to preload can be determined based on the busyness of the main thread. The busyness of the main thread can be determined by determining whether the messages currently to be processed by the main thread of the target interface reach a threshold.
[0106] by Figure 4 For example, Figure 4 FIG. 1 is a schematic flow chart of another information flow loading method according to an embodiment of the present disclosure. Figure 4 As shown, the information flow loading method may include the following steps:
[0107] In step 402, it may be determined whether the number of messages currently to be processed by the main thread of the target interface reaches a threshold.
[0108] If the number of messages to be processed by the main thread of the target interface does not reach the threshold, it means that the main thread is not currently busy and the main thread can be used to complete preloading.
[0109] In step 404, the preloaded message may be sent to the main thread based on a message processing mechanism supported by the main thread.
[0110] In step 406, the main thread may process the preload message and preload the first list item corresponding to the newly added first display area on the list control.
[0111] In step 408 , the main thread may cache the first list item corresponding to the first display area in a cache corresponding to the target interface.
[0112] In one embodiment shown, the message processing mechanism includes a Handler mechanism.
[0113] The above-mentioned Handler (message processing) mechanism is a message passing mechanism in the Android system, which can effectively solve the problem of communication between threads. By passing the message created in the working thread (child thread) to the main thread, data interaction and message passing between threads can be realized.
[0114] In one embodiment shown, the method further includes:
[0115] If the messages currently to be processed by the main thread of the target interface reach the threshold, then after a preset interval, determine again whether the messages currently to be processed by the main thread of the target interface reaches the threshold, and stop when the number of determinations exceeds the specified number.
[0116] For example, Figure 4 For example, in step 410, if the messages currently to be processed by the main thread of the target interface reach the threshold, it means that the main thread is currently busy. After a preset interval, it can be determined again whether the messages currently to be processed by the main thread of the target interface reach the threshold.
[0117] In step 412, if the messages currently to be processed by the main thread of the target interface still reach the threshold and the main thread is still busy, you can continue to determine whether the messages currently to be processed by the main thread of the target interface reach the threshold until the number of determinations exceeds the specified number.
[0118] In the process of the above sliding list control, whether to use the main thread to complete preloading can be determined based on whether the messages currently to be processed by the main thread reach a threshold. By avoiding the busy period of the main thread and preloading based on the idle period of the main thread, the resources of the main thread can be fully utilized and the efficiency of resource loading can be improved.
[0119] In an illustrated embodiment, in step 104, preloading a first list item corresponding to a newly added first display area on the list control, and caching the preloaded first list item in a cache corresponding to the target interface, includes:
[0120] In the secondary cache corresponding to the target interface, create a first list item corresponding to the first display area newly added on the list control;
[0121] The first list item is cached in a first-level cache corresponding to the target interface.
[0122] For example, the main thread may first create a list item corresponding to the newly added display area 7 on the list control in the secondary cache corresponding to the target interface, and then cache the list item in the primary cache corresponding to the target interface.
[0123] In the above process, through the combination of the second-level cache and the first-level cache, the advantage of the second-level cache providing an additional cache level can be used to help improve the overall cache hit rate and reduce the access to the main memory. In addition, since the second-level cache has a large capacity, it can adapt to the situation where the content to be loaded is too large. By forming a hierarchical cache structure, the advantages of fast access and large capacity can be taken into account.
[0124] In step 106, in response to the sliding operation on the list control being completed, the first list item is read from the cache corresponding to the target interface, and the first list item is loaded in the first display area to display the information flow corresponding to the first list item in the first display area.
[0125] For example, if Figure 3 As shown, when the sliding operation on the list control is completed, the first list item corresponding to the newly added display area 7 can be read from the cache corresponding to the target interface. In addition, the first list item can be loaded in the newly added display area 7 to display the information flow corresponding to the first list item in the newly added display area 7.
[0126] For example, for the aforementioned Figure 2 In the news application shown in , when the user finishes sliding the application interface, the first list item has been preloaded during the sliding process, so the first list item can be directly read from the cache corresponding to the target interface. Since the first list item contains data content related to the news content 7 to be loaded, by loading the first list item in the newly added display area 7, the news content 7 corresponding to the first list item can be displayed in the newly added display area 7.
[0127] In one embodiment shown, after step 104, the method further includes:
[0128] If the first list item corresponding to the first display area is not read from the cache corresponding to the target interface, the first list item is loaded in real time.
[0129] For example, if the first list item corresponding to the first display area cannot be read from the cache corresponding to the target interface when the sliding operation on the list control is completed, it means that the first list item is not preloaded. At this time, the first list item can be loaded in real time.
[0130] In one embodiment shown, the method further includes:
[0131] In response to a second display area on the list control sliding out from the target interface, a second list item corresponding to the second display area is cached in a cache corresponding to the target interface.
[0132] When the user slides the target interface, new content slides into the target interface and original content slides out of the target interface. The part that slides into the target interface can be the newly added first display area, and the part that slides out of the target interface can be the second display area. The second list item corresponding to the display area can be cached in the cache corresponding to the target interface.
[0133] For example, Figure 5 For example, Figure 5 FIG. 1 is a schematic diagram of another information flow loading method according to an embodiment of the present disclosure. Figure 5 As shown, the second display area that slides out is display area 1, and the list items corresponding to display area 1 can be cached in the cache corresponding to the target interface.
[0134] In the above process, since the second list item that slides out does not disappear directly but is cached in the cache corresponding to the target interface, when the user wants to slide to browse the previous information flow, the previous content can be quickly loaded to avoid lag.
[0135] In one embodiment shown, the list control includes a ListView control or a GridView control.
[0136] The ListView control can display specific content in the form of a list, and can display it adaptively according to the length of the data. The GridView control can display data in the form of a grid, displaying the data in multiple cells according to the specified number of rows and columns, so that the data is arranged in a regular manner.
[0137] In one embodiment shown, the information flow includes one or more combinations of the following:
[0138] Text message, picture message or video message.
[0139] For example, the information flow that the user browses in the target interface may be text information, picture information, or video information.
[0140] It can be seen from the above embodiments that by predicting the newly added first display area on the list control according to the user's sliding operation, and then calling the main thread to preload and cache the first list items corresponding to the first display area, when the sliding operation is completed, the first list items can be directly read from the cache and displayed in the first display area. Since the predicted first list items are preloaded during the sliding process, the first list items can be directly read from the cache when the sliding operation is completed and displayed in the first display area, which improves the smoothness of sliding and avoids the impact of sliding jams on user experience and satisfaction.
[0141] Corresponding to the aforementioned embodiments of the information flow loading method, the present disclosure also provides embodiments of the information flow loading device.
[0142] See also Figure 6 , Figure 6 FIG. 1 is a schematic block diagram of an information stream loading device according to an embodiment of the present disclosure. Figure 6 As shown, the device may include:
[0143] A prediction module 602 is used to slide the list control included in the target interface in response to a user's sliding operation on the list control, and predict a newly added first display area on the list control according to the sliding operation;
[0144] A preloading module 604 is used to call the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control, and cache the preloaded first list item in a cache corresponding to the target interface;
[0145] The loading module 606 is used to read the first list item from the cache corresponding to the target interface in response to the completion of the sliding operation on the list control, and load the first list item in the first display area to display the information flow corresponding to the first list item in the first display area.
[0146] See also Figure 7 , Figure 7 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Figure 7 As shown, the preloading module 604 may include:
[0147] The resource determination submodule 702 is used to determine whether the resources required for preloading the first list item corresponding to the newly added first display area on the list control exceed the currently remaining available resources of the main thread;
[0148] The preloading submodule 704 is used to call the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control if the resources required for preloading the first list item do not exceed the currently remaining available resources of the main thread.
[0149] See also Figure 8 , Figure 8 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Figure 8 As shown, the device also includes:
[0150] The real-time module 802 is configured to load the first list item in real time if the first list item corresponding to the first display area is not read from the cache corresponding to the target interface.
[0151] See also Fig. 9 , Fig. 9 is based on Figure 6A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Fig. 9 As shown, the prediction module 602 may further include:
[0152] The calculation submodule 902 is used to calculate, according to the sliding parameters corresponding to the sliding operation, a first display area newly added to the list control when the sliding operation of the list control is completed.
[0153] See also Fig.10 , Fig.10 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Fig.10 As shown, the device also includes:
[0154] A message determination module 1002 is used to determine whether the message currently to be processed by the main thread of the target interface reaches a threshold;
[0155] The message processing module 1004 is used to send a preloaded message to the main thread if the messages currently to be processed by the main thread of the target interface do not reach a threshold, based on the message processing mechanism supported by the main thread, so that the main thread processes the preloaded message, so as to preload the first list item corresponding to the newly added first display area on the list control, and cache the first list item corresponding to the first display area in the cache corresponding to the target interface.
[0156] See also Fig.11 , Fig.11 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Fig.11 As shown, the device also includes:
[0157] The polling module 1102 is used to determine whether the messages currently to be processed by the main thread of the target interface have reached the threshold after a preset interval if the messages currently to be processed by the main thread of the target interface have reached the threshold, and stop when the number of determined times exceeds the specified number.
[0158] See also Fig.12 , Fig.12 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Fig.12 As shown, the preloading module 604 may further include:
[0159] The secondary cache submodule 1202 is used to create a first list item corresponding to the newly added first display area on the list control in the secondary cache corresponding to the target interface;
[0160] The first-level cache submodule 1204 is used to cache the first list item into the first-level cache corresponding to the target interface.
[0161] See also Fig.13 , Fig.13 is based on Figure 6 A schematic block diagram of another information stream loading device is shown based on the embodiment shown. Fig.13 As shown, the device also includes:
[0162] The slide-out module 1302 is used to slide out from the target interface in response to the second display area on the list control, and cache the second list items corresponding to the second display area into the cache corresponding to the target interface.
[0163] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the relevant method, and will not be elaborated here.
[0164] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0165] Accordingly, the present disclosure also provides a user equipment, including:
[0166] processor;
[0167] a memory for storing processor-executable instructions;
[0168] Wherein, the processor is used to implement the above-mentioned information flow loading method.
[0169] Correspondingly, the present disclosure also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned information flow loading method is implemented.
[0170] like Fig.14 As shown, Fig.141 is a schematic block diagram of an apparatus 1400 for information stream loading according to an embodiment of the present disclosure. For example, the apparatus 1400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0171] Reference Fig.14 , the device 1400 may include one or more of the following components: a processing component 1402 , a memory 1404 , a power component 1406 , a multimedia component 1408 , an audio component 1410 , an input / output (I / O) interface 1412 , a sensor component 1414 , and a communication component 1416 .
[0172] The processing component 1402 generally controls the overall operation of the device 1400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1402 may include one or more processors 1420 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1402 may include one or more modules to facilitate the interaction between the processing component 1402 and other components. For example, the processing component 1402 may include a multimedia module to facilitate the interaction between the multimedia component 1408 and the processing component 1402.
[0173] The memory 1404 is configured to store various types of data to support operations on the device 1400. Examples of such data include instructions for any application or method operating on the device 1400, contact data, phone book data, messages, pictures, videos, etc. The memory 1404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0174] The power supply component 1406 provides power to the various components of the device 1400. The power supply component 1406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1400.
[0175] The multimedia component 1408 includes a screen that provides an output interface between the device 1400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1408 includes a front camera and / or a rear camera. When the device 1400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0176] The audio component 1410 is configured to output and / or input audio signals. For example, the audio component 1410 includes a microphone (MIC), and when the device 1400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1404 or sent via the communication component 1416. In some embodiments, the audio component 1410 also includes a speaker for outputting audio signals.
[0177] I / O interface 1412 provides an interface between processing component 1402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0178] The sensor assembly 1414 includes one or more sensors for providing various aspects of the status assessment of the device 1400. For example, the sensor assembly 1414 can detect the open / closed state of the device 1400, the relative positioning of components, such as the display and keypad of the device 1400, the sensor assembly 1414 can also detect the position change of the device 1400 or a component of the device 1400, the presence or absence of user contact with the device 1400, the orientation or acceleration / deceleration of the device 1400, and the temperature change of the device 1400. The sensor assembly 1414 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1414 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1414 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0179] The communication component 1416 is configured to facilitate wired or wireless communication between the device 1400 and other devices. The device 1400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 1416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0180] In an exemplary embodiment, the device 1400 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the methods described in any of the above embodiments.
[0181] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1404 including instructions, and the instructions can be executed by a processor 1420 of the device 1400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0184] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0185] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
Claims
1. A method for loading an information stream, characterized in that: The method comprises: In response to a sliding operation of a user on a list control included in a target interface, sliding the list control, and predicting a newly added first display area on the list control according to the sliding operation; Calling the main thread of the target interface to preload the first list item corresponding to the newly added first display area on the list control, and caching the preloaded first list item in the cache corresponding to the target interface; In response to the sliding operation on the list control being completed, the first list item is read from the cache corresponding to the target interface, and the first list item is loaded in the first display area to display the information flow corresponding to the first list item in the first display area.
2. The method according to claim 1, characterized in that The main thread calling the target interface preloads the first list item corresponding to the first display area newly added on the list control, including: Determine whether resources required for preloading a first list item corresponding to a newly added first display area on the list control exceed currently remaining available resources of the main thread; If the resources required for preloading the first list item do not exceed the currently remaining available resources of the main thread, the main thread of the target interface is called to preload the first list item corresponding to the newly added first display area on the list control.
3. The method according to claim 1, characterized in that The method further comprises: If the first list item corresponding to the first display area is not read from the cache corresponding to the target interface, the first list item is loaded in real time.
4. The method according to claim 1, characterized in that: The predicting a first display area newly added on the list control according to the sliding operation includes: According to the sliding parameter corresponding to the sliding operation, a first display area newly added to the list control when the sliding operation on the list control is completed is calculated.
5. The method according to claim 4, characterized in that The sliding parameters include one or more of the following combinations: Slide direction, slide distance, touch pressure, touch duration.
6. The method according to claim 1, characterized in that Before calling the main thread of the target interface to preload the first list item corresponding to the first display area newly added on the list control, the method further includes: Determine whether the messages currently to be processed by the main thread of the target interface have reached a threshold; If the messages currently to be processed by the main thread of the target interface do not reach a threshold, a preloaded message is sent to the main thread based on a message processing mechanism supported by the main thread, so that the main thread processes the preloaded message to preload the first list item corresponding to the newly added first display area on the list control, and cache the first list item corresponding to the first display area in a cache corresponding to the target interface.
7. The method according to claim 6, characterized in that The method further comprises: If the messages currently to be processed by the main thread of the target interface reach the threshold, then after a preset interval, determine again whether the messages currently to be processed by the main thread of the target interface reaches the threshold, and stop when the number of determinations exceeds the specified number.
8. The method according to claim 1, characterized in that The preloading of the first list item corresponding to the newly added first display area on the list control, and caching the preloaded first list item in a cache corresponding to the target interface, includes: In the secondary cache corresponding to the target interface, create a first list item corresponding to the first display area newly added on the list control; The first list item is cached in a first-level cache corresponding to the target interface.
9. The method according to claim 1, characterized in that: The method further comprises: In response to a second display area on the list control sliding out from the target interface, a second list item corresponding to the second display area is cached in a cache corresponding to the target interface.
10. The method according to claim 1, characterized in that The list control includes a ListView control or a GridView control.
11. The method according to claim 1, characterized in that: The information flow includes one or more of the following combinations: Text message, picture message or video message.
12. The method according to claim 6, characterized in that The message processing mechanism includes a Handler mechanism.
13. An information stream loading device, characterized in that: The device comprises: A prediction module, configured to slide the list control in response to a user's sliding operation on the list control included in the target interface, and predict a newly added first display area on the list control according to the sliding operation; a preloading module, configured to call the main thread of the target interface to preload a first list item corresponding to the first display area newly added on the list control, and cache the preloaded first list item in a cache corresponding to the target interface; A loading module is used to read the first list item from the cache corresponding to the target interface in response to the completion of the sliding operation on the list control, and load the first list item in the first display area to display the information flow corresponding to the first list item in the first display area.
14. A user equipment, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is used to implement the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Intelligent loading system and method, storage medium and equipment
CN108196929A
Resource loading method and device
CN108572965A
ViewGroup dynamic layout method and device and electronic device
CN108958831A
List loading method, device and equipment and computer readable storage medium
CN109669740A
Multimedia data processing method, computer and readable storage medium
CN112784074A