A page display method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202210800021.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-06
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-07-06
AI Technical Summary
然而,这种手动确定出的预加载信息的准确性严重依赖于对业务经验的判断,并且在应用软件的迭代更新过程中难以维护,无法有效保证预加载视图的使用率和命中率,进而无法保证页面的展示速度
[0017]第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例任一所述的页面展示方法。
Smart Images

Figure CN115291982B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to computer technology, and more particularly to a page display method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of computer technology, pages can be quickly displayed by preloading views, thereby improving the startup speed of application software and the smoothness of page scrolling, and thus enhancing the user experience.
[0003] Currently, preloading information, such as which views need to be preloaded, the order in which views are preloaded, and the number of views to be preloaded, is usually determined manually based on business experience. However, the accuracy of this manually determined preloading information heavily relies on judgment based on business experience, and it is difficult to maintain during application software iterations and updates. This makes it impossible to effectively guarantee the usage rate and hit rate of preloaded views, and consequently, the page display speed cannot be guaranteed. Summary of the Invention
[0004] This disclosure provides a page display method, apparatus, device, and storage medium to effectively ensure the utilization and hit rate of preloaded views, thereby ensuring page display speed and improving user experience.
[0005] In a first aspect, embodiments of this disclosure provide a page display method, including:
[0006] In response to a target page loading request, retrieve the set of target view information created during the historical display of the target page;
[0007] Based on the target view information set corresponding to the target page, determine the preloading information corresponding to the first view to be preloaded, and preload the first view based on the preloading information;
[0008] In response to the view creation trigger operation corresponding to the target page, a target view in the target page is created based on the preloaded first view, and the created target page is displayed.
[0009] Secondly, embodiments of this disclosure also provide a page display device, including:
[0010] The target view information set acquisition module is used to retrieve the target view information set created during the historical display of the target page in response to the target page loading request.
[0011] The first view preloading module is used to determine the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page, and preload the first view based on the preloading information.
[0012] The target page display module is used to respond to the view creation trigger operation corresponding to the target page, create a target view in the target page based on the preloaded first view, and display the created target page.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method as described in any of the embodiments of this disclosure.
[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the page display method as described in any of the embodiments of this disclosure.
[0018] In this embodiment, in response to a target page loading request, a set of target view information created during the historical display of the target page is obtained. This set of target view information actually created when the target page was previously displayed. This set of target view information can more accurately represent the actual display situation of the current software version. Therefore, based on the target view information set corresponding to the target page, the preloading information corresponding to the first view to be preloaded can be dynamically and accurately determined, realizing the automatic determination of preloading information without manual intervention. Based on the preloading information, the first view is preloaded, so that more and more accurate first views can be preloaded within a limited preloading time. Then, in response to the view creation trigger operation corresponding to the target page, more target views that need to be created from the target page can be directly retrieved from the preloaded first views. This can effectively ensure the utilization rate and hit rate of preloaded views, thereby ensuring the page display speed and improving the user experience. Attached Figure Description
[0019] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 This is a schematic flowchart of a page display method provided in an embodiment of this disclosure;
[0021] Figure 2 This is a schematic flowchart of a page display method provided in an embodiment of this disclosure;
[0022] Figure 3 This is a schematic flowchart of a page display method provided in an embodiment of this disclosure;
[0023] Figure 4 This is a schematic diagram of the structure of a page display device provided in an embodiment of this disclosure;
[0024] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0025] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0026] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0027] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0029] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0030] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0031] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0032] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0033] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0035] Figure 1 This is a flowchart illustrating a page display method provided in an embodiment of the present disclosure. This embodiment is applicable to displaying any type of page in application software. The method can be executed by a page display device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.
[0036] like Figure 1 As shown, the page display method specifically includes the following steps:
[0037] S110. In response to the target page loading request, obtain the target view information set created when the target page was displayed in history.
[0038] The target page can refer to the currently displayed page that requires preloading views. This embodiment allows setting the page requiring preloading views based on business needs. For example, the application's homepage can be used as the page requiring preloading views to improve homepage display speed and reduce startup time; a page that supports scrolling can also be used to improve page scrolling smoothness. The page format corresponding to the page requiring preloading views can vary; for example, a pop-up floating window can also be used as a page requiring preloading views. The target view information set can refer to the collection of view information created each time the target page is historically displayed. Each time the target page is displayed before the current moment, a corresponding target view information set is cached. Different pages correspond to different usage scenarios, so under the same usage scenario, i.e., for the same page, the view information created each time the page is displayed is collected and cached as a view information set. In this embodiment, the target view information set can be the user profile corresponding to the target page for the current user of the application, used to store the view information created on the target page.
[0039] Specifically, for a user currently using the application, if a user's action to open a target page is detected—such as clicking the application icon or a link to the target page—the client's main thread can generate a target page loading request and send it to the server to display the loaded target page. When the client's asynchronous sub-thread detects a target page loading request, it can retrieve a set of target view information created during each historical display of the target page from the cache database. The number of such sets can be one or more.
[0040] For example, before S110, it may also include: collecting the set of view information created each time a page is displayed, and caching the set of view information collected each time a page is displayed; correspondingly, S110 may include: determining the target view information set corresponding to the target page based on the view information set corresponding to each currently cached page and the target page identifier corresponding to the target page.
[0041] The target page identifier refers to information used to uniquely identify the target page, distinguishing different pages from different usage scenarios. Specifically, during user interaction with the application, a set of view information can be collected for each page requiring pre-loading of views during each display. This collected set of view information for that page during that display is stored in a cache database. For example, each collected page identifier and its corresponding set of view information can be cached, and a mapping relationship between page identifiers and view information sets can be established. Thus, when a target page needs to be displayed, the mapping relationship between the currently cached page identifiers and view information sets, along with the target page identifier, can determine the various target view information sets corresponding to the target page. This means that all target view information sets collected during previous displays of the target page are cached. Each time a target page is displayed, a new set of target view information exists.
[0042] It should be noted that different pages display different content and create different views. Therefore, different pages need to preload different views. So it is necessary to collect view information sets, i.e., profiles, for different pages separately to ensure high utilization and high hit rate of preloading for each page.
[0043] S120. Based on the target view information set corresponding to the target page, determine the preloading information corresponding to the first view to be preloaded, and preload the first view based on the preloading information.
[0044] The first view can refer to a view that needs to be preloaded asynchronously by a child thread during the main thread's loading of the target page. There can be multiple first views. The preloading information for each first view can include: the target view name, target view priority, and the number of target views. The target view priority information indicates the order in which the first views are preloaded. The number of target views indicates the number of first views that need to be preloaded. The target page can contain multiple identical views.
[0045] Specifically, the client's asynchronous sub-thread can perform view statistics on the set of all target view information corresponding to the target page obtained from the cache database, select historically frequently occurring views as the first views, and determine the preloading information corresponding to each first view. Based on the preloading information corresponding to each first view, the corresponding first view is preloaded, and each preloaded first view can be stored in the cache pool. Thus, the asynchronous sub-thread can create the views needed for the target page to be displayed in advance, thereby improving the display speed of the target page.
[0046] It's important to note that if the target page's functionality or user habits change during application software updates, the view information displayed on the target page will also change. A new set of target view information will be cached when the target page is displayed, allowing it to more accurately represent the actual display of the current software version. Furthermore, different users have different usage habits; for example, on the same page, user A in different regions might see a different view. Figure 1 User B is showing the video. Figure 2 Therefore, the target view information set collected will differ depending on the user's usage habits, allowing the target view information set to more accurately represent the personalized display for the current user. Thus, based on the cached target view information set, the first view that needs to be preloaded each time can be dynamically and accurately determined, enabling the loading of more and more accurate first views within a limited preloading time, thereby improving the utilization and hit rate of preloaded views.
[0047] S130. In response to the view creation trigger operation corresponding to the target page, create the target view in the target page based on the preloaded first view, and display the created target page.
[0048] Specifically, when the client's main thread needs to create a target view for the target page, it can directly retrieve the various first views preloaded by the asynchronous sub-thread and create all target views on the target page. For example, for each target view to be created on the target page, the target view is matched with each preloaded first view; if a match is successful, the successfully matched first view is used as the target view, thus it can be retrieved directly from the cache pool without creating the target view. If a match fails, a new target view needs to be created. After all target views are created, the target page can be displayed. The more target views directly retrieved from the preloaded first views, the more view creation time can be saved, thus allowing the target page to be displayed faster and improving the display speed. It should be noted that after the target page is displayed, the information of each target view created during the current display (including each preloaded view and each newly created view) can be collected and cached. This allows for real-time caching of the target view information set for each display, ensuring the utilization and hit rate of preloaded views in subsequent displays of the target page.
[0049] Utilization rate can refer to the frequency of use of preloaded views. For example, the ratio of the number of views used to the number of preloaded views can be determined as the utilization rate. A lower utilization rate means fewer preloaded views are actually consumed, resulting in a waste of runtime resources. Hit rate can refer to the probability of retrieving a view from the cache pool. For example, the ratio of the number of cache hits to the number of view creations can be determined as the hit rate. A higher hit rate means that when creating the target view on the target page, it can be retrieved directly from the cache pool, resulting in shorter main thread execution time. Therefore, this embodiment, by utilizing the target view information set from the historical display of the target page, can more accurately preload the first usable view on the target page, improving the utilization rate and hit rate of preloaded views.
[0050] The technical solution of this disclosure, in response to a target page loading request, obtains a set of target view information created during the historical display of the target page, that is, a set of target view information actually created when the target page was previously displayed. This set of target view information can more accurately represent the actual display situation of the current software version. Therefore, based on the target view information set corresponding to the target page, the preloading information corresponding to the first view to be preloaded can be dynamically and accurately determined, realizing the automatic determination of preloading information without manual intervention. Based on the preloading information, the first view is preloaded, so that more and more accurate first views can be preloaded within a limited preloading time. Then, in response to the view creation trigger operation corresponding to the target page, more target views that need to be created in the target page can be directly retrieved from the preloaded first views, thereby effectively ensuring the utilization rate and hit rate of preloaded views, thus ensuring the page display speed and improving the user experience.
[0051] Based on the above technical solution, the step of S120, "determining the preloading information corresponding to the first view to be preloaded according to the target view information set corresponding to the target page", may include: if it is detected that the number of sets of target view information corresponding to the target page is greater than or equal to the preset number of sets, then the preloading information corresponding to the first view to be preloaded is determined according to each target view information set corresponding to the target page.
[0052] Specifically, after obtaining all target view information sets corresponding to the target page from the cache database, it can be checked whether the number of target view information sets is greater than or equal to the preset set size X. This determines whether the target page has been displayed X times before the current moment. If so, it indicates that the obtained target view information sets are sufficient. In this case, intelligent preloading can be performed based on the obtained target view information sets to further ensure the accuracy of the preloaded views. If the number of target view information sets is less than the preset set size X, it indicates that the target page has not been displayed X times yet, and the collected target view information sets are insufficient to support intelligent preloading. In this case, view preloading can be performed based on the original preloading method, such as preloading views manually specified in the configuration file. This allows view preloading to be achieved even when the collected target view information sets are insufficient, such as when the application software is used for the first time, ensuring the adaptability and accuracy of the preloaded views.
[0053] Based on the above technical solution, the "preloading the first view based on preloading information" in S120 may include: determining the preloading order of the first view based on the target view priority information corresponding to each first view to be preloaded; and preloading each first view based on the preloading order, according to the target view name information and the number of target views corresponding to each first view.
[0054] Specifically, the preloading order of each first view can be sorted based on the priority information of the target view corresponding to each first view, resulting in a preloading order with decreasing priority. Then, according to the preloading order, preloading is performed sequentially based on the target view name and number of target views corresponding to each first view. For example, the corresponding first view can be found based on the target view name, and the first view with the specified number of target views can be loaded. This allows for prioritizing the loading of the most important first views, such as the first-hit first view, within a limited preloading time, and loading an appropriate number of first views. This avoids situations where the hit rate is low due to too few first views or the utilization rate is low due to too many first views, thereby further improving the hit rate and utilization rate of preloaded views.
[0055] Figure 2 This is a flowchart illustrating a page display method provided in an embodiment of this disclosure. Based on the aforementioned embodiments, this disclosure optimizes the step of "collecting the set of view information created each time a page is displayed," and further optimizes the step of "caching the set of view information collected each time a page is displayed." Explanations of terms that are the same as or corresponding to those in the aforementioned embodiments are not repeated here.
[0056] like Figure 2 As shown, the page display method specifically includes the following steps:
[0057] S210. If multiple second views are created in the currently displayed page, the view information corresponding to each second view is determined based on the view creation method, view creation sequence number and view creation count corresponding to each second view.
[0058] The currently displayed page can refer to the page currently being displayed in the application software. The second view can refer to a view within the currently displayed page. There can be multiple second views. The view creation method can be any method used to create the view. View creation methods can include creating a new view using the `new` method or initializing the view using the `layoutId`. For example, creating a new view using `new XXXView(context)`. Initializing the view using the `layoutId` is: `val view = LayoutInflater.from(context).inflate(layoutId)`. The view creation sequence number corresponding to the second view can refer to the creation order of the second views within the currently displayed page, indicating the order in which the views were created. Each time a second view is created within the currently displayed page, the view creation sequence number increments by 1. A larger view creation sequence number indicates that the second view was created earlier. The view creation count corresponding to the second view can refer to the number of times the same view has been created within the currently displayed page. Each time the same second view is created, the view creation count corresponding to that second view increments by 1. The view information corresponding to the second view can refer to the preload information used when preloading the second view. The view information corresponding to the second view may include: the name of the second view, the priority of the second view, and the number of second views. The priority of the second view can be used to characterize the preloading order of the second views. For example, the higher the priority of the second view, the more important the second view is, and the higher it should be preloaded, so as to improve the utilization rate and hit rate of preloading.
[0059] Specifically, after the page is displayed, that is, when the user enters the usage scenario corresponding to the currently displayed page, the view creation method, view creation sequence number and view creation count of each second view created during the current display can be collected in real time, and the view information corresponding to each second view can be determined based on this information.
[0060] For example, S210 may include: for each second view, determining the second view name information corresponding to the second view based on the view creation method corresponding to the second view; determining the second view priority information corresponding to the second view based on the view creation sequence number of the second view in the current display page; and determining the second view quantity information corresponding to the second view based on the number of times the second view is created in the current display page.
[0061] Specifically, for each second view, if the view is created using the `new` method, the class name (`className`) is used as the second view's name information, allowing it to be created via class name reflection. For example, the class name of the second view might be `XXXView`. If the view is created using the `InflateView` method based on the layout identifier (`layoutId`), the layout name (`layoutName`) corresponding to the layout identifier (`layoutId`) is obtained and used as the second view's name information. It's important to note that during software iteration, `layoutId` is automatically generated and prone to change, while `layoutName` is the layout name and typically remains unchanged, making it more stable than `layoutId`. Therefore, `layoutName` allows for more accurate lookup of the corresponding second view, ensuring the accuracy of preloaded views. If the same second view is created only once on the current display page, the view creation sequence number corresponding to that creation is determined as the second view's priority information. If the same second view is created multiple times on the current display page, the creation sequence numbers of each creation are averaged, and the average value is used to determine the priority information of that second view. The number of times the second view is created on the current display page can be used as the quantity information of that second view, that is, the number of times the second view is included on the current display page.
[0062] S220. Based on the view information corresponding to all the second views, generate a set of view information corresponding to the currently displayed page.
[0063] Specifically, all view information corresponding to all second views in the currently displayed page can be combined to obtain the set of view information collected during the current display. For example, the set of view information corresponding to the currently displayed page is: {["className":"com.ss.android.buzz.section.content.BuzzFeedContentView","count":5,"layoutName":"","priority":21]、["className":"","count":2,"layoutName":"feed_buzz_video_feed_card_layout_vertical_with_section2","priority":22]…}.
[0064] It should be noted that if only one second view is created in the current display page, the view information corresponding to the second view can be directly used as the view information set corresponding to the current display page. In other words, there is only one view information in this view information set.
[0065] S230. If it is detected that the page display duration corresponding to the current display page is greater than or equal to the preset duration and the total number of views created in the current display page is greater than or equal to the preset number of views, then the set of view information collected in the current display page will be cached.
[0066] Here, page display duration refers to the total time a page is displayed from the start to the end of its display. The end time of display refers to the moment the user closes the page. The preset duration is the minimum duration for a page to be effectively displayed. The preset number of views refers to the minimum total number of views contained in a valid page.
[0067] Specifically, the system can obtain the page display duration and the total number of views created on the currently displayed page, and check if the page display duration is greater than or equal to a preset duration. If so, it indicates that the currently collected view information set conforms to normal user behavior and is valid. Simultaneously, it can check if the total number of views is greater than or equal to a preset number of views. If so, it indicates that the currently displayed page seen by the user is a normal page, not an abnormal one. By exporting the view information set collected in the current display page to a local cache database when the page display duration is greater than or equal to the preset duration and the total number of views is greater than or equal to the preset number of views, the system ensures the validity of the cached view information set and, consequently, the accuracy of subsequent preloading of views on the page.
[0068] For example, after S230, the method may further include: if it is detected that the number of sets of view information corresponding to the currently cached currently displayed page is greater than a preset number of sets, then determine the difference between the number of sets of view information and the preset number of sets; sort each set of view information based on the cache time corresponding to each set of view information, and delete the set of view information with the largest number of differences in cache time.
[0069] Here, the preset number of sets N can refer to the maximum number of view information sets cached for each page in the cache database. Specifically, each time the same page is displayed, one view information set corresponding to that page is cached. Since the most recently cached view information set better represents the current usage state of the page, view information sets cached earlier are less meaningful. Therefore, when the number of view information sets corresponding to the currently cached previously displayed page exceeds the preset number of sets, view information sets with a difference in cache time can be deleted. This way, only the N most recently cached view information sets are stored, thereby reducing cache space while ensuring the accuracy of subsequent view preloading.
[0070] It should be noted that this embodiment can determine the view to be preloaded based on the N most recently cached view information sets. Thus, during the software iteration and update process, the view information set corresponding to the old function will be replaced by the view information set corresponding to the new function, thereby ensuring that the preloaded view matches the function currently being used by the user, and thus improving the robustness of preloading.
[0071] S240. In response to the target page loading request, determine the target view information set corresponding to the target page based on the view information set corresponding to each currently cached page and the target page identifier corresponding to the target page.
[0072] S250. Based on the target view information set corresponding to the target page, determine the preloading information corresponding to the first view to be preloaded, and preload the first view based on the preloading information.
[0073] S260. In response to the view creation trigger operation corresponding to the target page, create the target view in the target page based on the preloaded first view, and display the created target page.
[0074] The technical solution of this disclosure determines the view information corresponding to each second view based on the view creation method, view creation sequence number, and view creation count corresponding to each second view created on the currently displayed page. Based on the view information corresponding to each second view, a set of view information corresponding to the currently displayed page is generated, thereby enabling real-time collection of the view information set for each page displayed each time. When it is detected that the page display duration corresponding to the currently displayed page is greater than or equal to a preset duration and the total number of views created on the currently displayed page is greater than or equal to a preset number of views, the set of view information collected in that instance on the currently displayed page is cached. This ensures that the cached set of view information is valid, thereby guaranteeing the accuracy of subsequent preloaded views.
[0075] Figure 3 This is a flowchart illustrating a page display method provided in an embodiment of this disclosure. Based on the aforementioned embodiments, this disclosure optimizes the step of "determining the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page." Explanations of terms that are the same as or corresponding to those in the aforementioned embodiments are not repeated here.
[0076] like Figure 3 As shown, the page display method specifically includes the following steps:
[0077] S310. In response to the target page loading request, obtain the target view information set created when the target page was displayed in history.
[0078] S320. Based on the set of target view information corresponding to the target page, determine the number of times each third view created during the historical display of the target page is displayed, and based on the number of times it is displayed, determine the first view to be preloaded from the third views.
[0079] The third view can refer to any view included in the target view information set, that is, a view created when the target page was previously displayed. The number of times a third view is displayed can be the number of times the target page has displayed a third view in all its historical display counts. The number of times a third view is displayed can be used to characterize the frequency of its occurrence. The more times a third view is displayed, the higher its frequency of occurrence.
[0080] Specifically, for each third view, it can be checked whether the target view information set corresponding to the target page contains that third view. If so, the display count of that third view is incremented by 1. Thus, the number of target view information sets containing that third view can be used as the display count for that third view. This display count more accurately represents the current usage of that third view. Based on the display counts for each third view, the first view to be preloaded can be accurately determined from among the various third views. This ensures the utilization and hit rate of preloaded views, thereby guaranteeing page display speed and improving user experience.
[0081] For example, "determining the first view to be preloaded from the third views based on the number of times it is displayed" in S320 may include: determining the third view whose number of displays is greater than or equal to a preset number of displays as the first view to be preloaded; if there is a third view that has been displayed for the most recent consecutive preset number of times, then the third view is also used as the first view to be preloaded.
[0082] Specifically, each third view that has been displayed more than or equal to a preset number of times can be designated as the first view to be preloaded. Alternatively, this embodiment can divide the number of times each third view has been displayed by the number of target view information sets to obtain the frequency of occurrence for each third view, and then designate each third view with a frequency greater than or equal to a preset frequency as the first view to be preloaded. By using third views with more displays or higher frequencies as the first view, the utilization and hit rate of the preloaded first view can be improved, thereby increasing page display efficiency.
[0083] During software iteration, if the old version uses view A and the new version uses view B, and the preset set size N is 30 and the preset number of times is 15 (i.e., the preset frequency is 50%), then view B will only be determined as the first view to be loaded after 15 displays. At this point, the convergence speed is too slow. Therefore, it is possible to check whether each third view has been displayed in the most recent consecutive preset number of times C, that is, whether the same third view exists in the most recently cached C sets of target view information, and whether the third view does not exist in the previously cached sets of target view information. If so, it indicates that the third view is the view used by the new version. At this time, the third view can also be directly used as the first view to be preloaded, thereby speeding up the convergence speed and further ensuring the utilization and hit rate of the first view after preloading.
[0084] It should be noted that if a third view exists in the previously cached set of target view information, but does not exist in the most recently cached C sets of target view information, it means that the new version no longer uses this third view, and there is no need to preload the third view in this case.
[0085] S330. Obtain the view information corresponding to the first view from the set of target view information containing the first view, and determine the preload information corresponding to the first view based on the view information corresponding to the first view.
[0086] Specifically, for each first view, the view information corresponding to that first view can be obtained from the set of target view information containing that first view. Each view information may include: the view name information, view priority information, and view quantity information corresponding to the first view. Based on the fusion processing of the view information corresponding to the first view, the preload information corresponding to the first view is determined.
[0087] For example, "determining the preload information corresponding to the first view based on the view information corresponding to the first view" in S330 may include: obtaining the target view name information corresponding to the first view; averaging the view priority information corresponding to the first view to determine the target view priority information corresponding to the first view; and averaging the view quantity information corresponding to the first view to determine the target view quantity information corresponding to the first view.
[0088] Specifically, the view name information corresponding to the first view can be used as the target view name information corresponding to the first view. The average value of the view priority information corresponding to the first view is used as the target view priority information. The average value of the number of views corresponding to the first view is used as the target view number information.
[0089] S340. Preload the first view based on the preload information.
[0090] Specifically, based on the priority information of the target view corresponding to each first view, the first views are sorted from high to low priority to obtain a preloading order with decreasing priority. Following this preloading order, each first view and its corresponding number of views are created based on the target view name and number of target views. This allows for the priority loading of the most important first views within a limited preloading time, and the loading of an appropriate number of first views. This avoids situations where the hit rate is low due to loading too few first views or the utilization rate is low due to loading too many first views, thereby further improving the hit rate and utilization rate of preloaded views.
[0091] S350, In response to the view creation trigger operation corresponding to the target page, create the target view in the target page based on the preloaded first view, and display the created target page.
[0092] The technical solution of this disclosure determines the number of times each third view created during the historical display of the target page is displayed based on the set of target view information corresponding to the target page. Based on the number of displays, the first view to be preloaded can be accurately determined from each third view, thereby ensuring the utilization rate and hit rate of the preloaded view, thus ensuring the page display speed and improving the user experience.
[0093] Figure 4 This is a schematic diagram of the structure of a page display device provided in an embodiment of the present disclosure, such as... Figure 4 As shown, the device specifically includes: a target view information set acquisition module 410, a first view preloading module 420, and a target page display module 430.
[0094] The target view information set acquisition module 410 is used to acquire the target view information set created during the historical display of the target page in response to the target page loading request; the first view preloading module 420 is used to determine the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page, and preload the first view based on the preloading information; the target page display module 430 is used to create the target view in the target page based on the preloaded first view in response to the view creation trigger operation corresponding to the target page, and display the created target page.
[0095] The technical solution provided in this disclosure, in response to a target page loading request, obtains a set of target view information created during the historical display of the target page, that is, a set of target view information actually created when the target page was previously displayed. This set of target view information can more accurately represent the actual display situation of the current software version. Therefore, based on the target view information set corresponding to the target page, the preloading information corresponding to the first view to be preloaded can be dynamically and accurately determined, realizing the automatic determination of preloading information without manual intervention. Based on the preloading information, the first view is preloaded, so that more and more accurate first views can be preloaded within a limited preloading time. Then, in response to the view creation trigger operation corresponding to the target page, more target views that need to be created in the target page can be directly retrieved from the preloaded first views, thereby effectively ensuring the utilization rate and hit rate of preloaded views, thus ensuring the page display speed and improving the user experience.
[0096] Based on the above technical solution, the device also includes:
[0097] The view information collection module is used to collect the view information collection created for each page during each display, before retrieving the target view information collection created when the target page is displayed in response to a target page loading request.
[0098] The view information collection caching module is used to cache the view information collection collected each time a page is displayed.
[0099] The target view information set acquisition module 410 is specifically used to: determine the target view information set corresponding to the target page based on the view information set corresponding to each currently cached page and the target page identifier corresponding to the target page.
[0100] Based on the above technical solutions, the view information collection module includes:
[0101] The view information determination unit is used to determine the view information corresponding to each second view based on the view creation method, view creation sequence number and view creation count of each second view if multiple second views are created in the currently displayed page.
[0102] The view information set generation unit is used to generate a view information set corresponding to the currently displayed page based on the view information corresponding to all the second views.
[0103] Based on the above technical solutions, the view information corresponding to the second view includes: the second view name information, the second view priority information, and the second view quantity information.
[0104] The view information determination unit is specifically used for: for each second view, determining the second view name information corresponding to the second view based on the view creation method corresponding to the second view; determining the second view priority information corresponding to the second view based on the view creation sequence number of the second view in the current display page; and determining the second view quantity information corresponding to the second view based on the number of times the second view is created in the current display page.
[0105] Based on the above technical solutions, the view information collection caching module is specifically used for:
[0106] If it is detected that the page display duration corresponding to the currently displayed page is greater than or equal to the preset duration and the total number of views created in the currently displayed page is greater than or equal to the preset number of views, then the set of view information collected in the current display page will be cached.
[0107] Based on the above technical solutions, the device also includes:
[0108] The view information set deletion module is used to: after caching the view information set collected in the current display page, if it is detected that the number of view information sets corresponding to the current display page in the current cache is greater than a preset number of sets, determine the difference between the number of view information sets and the preset number of sets; sort the view information sets according to the caching time corresponding to each view information set, and delete the view information sets with the earliest caching time and the number of differences.
[0109] Based on the above technical solutions, the first view preloading module 420 is specifically used for:
[0110] If the number of sets of target view information corresponding to the target page is greater than or equal to the preset number of sets, then the preload information corresponding to the first view to be preloaded is determined according to each set of target view information corresponding to the target page.
[0111] Based on the above technical solutions, the first view preloading module 420 includes:
[0112] The first view determination unit is used to determine the number of times each third view created during the historical display of the target page is displayed based on the target view information set corresponding to the target page, and to determine the first view to be preloaded from the third views based on the number of times it is displayed.
[0113] The preload information determining unit is used to obtain each view information corresponding to the first view from each target view information set containing the first view, and to determine the preload information corresponding to the first view based on the each view information corresponding to the first view.
[0114] Based on the above technical solutions, the first view determining unit is specifically used for:
[0115] The third view that has been displayed more than or equal to a preset number of times is determined as the first view to be preloaded; if there is a third view that has been displayed for the most recent preset number of consecutive times, then the third view is also used as the first view to be preloaded.
[0116] Based on the above technical solutions, the pre-loaded information determination unit is specifically used for:
[0117] Obtain the target view name information corresponding to the first view; perform average processing on the priority information of each view corresponding to the first view to determine the priority information of the target view corresponding to the first view; perform average processing on the number information of each view corresponding to the first view to determine the number information of the target view corresponding to the first view.
[0118] Based on the above technical solutions, the first view preloading module 420 is also specifically used for:
[0119] Based on the priority information of the target view corresponding to each of the first views to be preloaded, the preloading order of the first views is determined; based on the preloading order, each of the first views is preloaded according to the target view name information and the number of target views corresponding to each of the first views.
[0120] The page display device provided in this disclosure can execute the page display method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the page display method.
[0121] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0122] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 5 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 5 The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0123] like Figure 5 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.
[0124] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0125] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0126] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0127] The electronic device provided in this embodiment and the page display method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0128] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the page display method provided in the above embodiments.
[0129] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0130] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0131] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0132] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0133] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to a target page loading request, acquire a set of target view information created during the historical display of the target page; determine preloading information corresponding to a first view to be preloaded based on the set of target view information corresponding to the target page, and preload the first view based on the preloading information; in response to a view creation trigger operation corresponding to the target page, create a target view in the target page based on the preloaded first view, and display the created target page.
[0134] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0136] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0137] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0138] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0139] According to one or more embodiments of this disclosure, [Example 1] provides a page display method, including:
[0140] In response to a target page loading request, retrieve the set of target view information created during the historical display of the target page;
[0141] Based on the target view information set corresponding to the target page, determine the preloading information corresponding to the first view to be preloaded, and preload the first view based on the preloading information;
[0142] In response to the view creation trigger operation corresponding to the target page, a target view in the target page is created based on the preloaded first view, and the created target page is displayed.
[0143] According to one or more embodiments of this disclosure, [Example 2] provides a page display method, which further includes:
[0144] Optionally, before retrieving the target page's historical display set in response to a target page load request, the following may also be included:
[0145] Collect the set of view information created each time a page is displayed, and cache the set of view information collected each time a page is displayed;
[0146] The set of target view information created when obtaining the historical display of the target page includes:
[0147] Based on the set of view information corresponding to each currently cached page and the target page identifier corresponding to the target page, determine the set of target view information corresponding to the target page.
[0148] According to one or more embodiments of this disclosure, [Example 3] provides a page display method, which further includes:
[0149] Optionally, the collection of view information created each time a page is displayed includes:
[0150] If multiple second views are created in the currently displayed page, the view information corresponding to each second view is determined based on the view creation method, view creation sequence number, and view creation count of each second view.
[0151] Based on the view information corresponding to all the second views, a set of view information corresponding to the currently displayed page is generated.
[0152] According to one or more embodiments of this disclosure, [Example 4] provides a page display method, which further includes:
[0153] Optionally, the view information corresponding to the second view includes: the second view name information, the second view priority information, and the second view quantity information.
[0154] The process of determining the view information corresponding to each second view based on the view creation method, view creation sequence number, and view creation count for each second view includes:
[0155] For each second view, the second view name information corresponding to that second view is determined based on the view creation method corresponding to the second view;
[0156] Based on the view creation sequence number of the second view in the currently displayed page, determine the priority information of the second view corresponding to the second view;
[0157] Based on the number of times the second view is created on the currently displayed page, the number of second views corresponding to this second view is determined.
[0158] According to one or more embodiments of this disclosure, Example 5 provides a page display method, which further includes:
[0159] Optionally, caching the set of view information collected each time a page is displayed includes:
[0160] If it is detected that the page display duration corresponding to the currently displayed page is greater than or equal to the preset duration and the total number of views created in the currently displayed page is greater than or equal to the preset number of views, then the set of view information collected in the current display page will be cached.
[0161] According to one or more embodiments of this disclosure, Example Six provides a page display method, which further includes:
[0162] Optionally, after caching the set of view information collected in the current display page, the following may also be included:
[0163] If it is detected that the number of sets of view information corresponding to the currently displayed page in the current cache is greater than the preset number of sets, then the difference between the number of sets of view information and the preset number of sets is determined.
[0164] Based on the cache time corresponding to each of the view information sets, the view information sets are sorted, and the view information sets with the earliest cache time and the number of differences are deleted.
[0165] According to one or more embodiments of this disclosure, [Example Seven] provides a page display method, which further includes:
[0166] Optionally, determining the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page includes:
[0167] If the number of sets of target view information corresponding to the target page is greater than or equal to the preset number of sets, then the preload information corresponding to the first view to be preloaded is determined according to each set of target view information corresponding to the target page.
[0168] According to one or more embodiments of this disclosure, [Example Eight] provides a page display method, which further includes:
[0169] Optionally, determining the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page includes:
[0170] Based on the target view information set corresponding to the target page, determine the number of times each third view created during the historical display of the target page is displayed, and based on the number of times it is displayed, determine the first view to be preloaded from the third views;
[0171] From the set of target view information containing the first view, obtain the view information corresponding to the first view, and determine the preload information corresponding to the first view based on the view information corresponding to the first view.
[0172] According to one or more embodiments of this disclosure, [Example Nine] provides a page display method, which further includes:
[0173] Optionally, determining the first view to be preloaded from the third view based on the number of displays includes:
[0174] The third view whose display count is greater than or equal to a preset number is determined as the first view to be preloaded;
[0175] If there is a third view that has been displayed for the most recent consecutive preset number of times, then this third view will also be used as the first view to be preloaded.
[0176] According to one or more embodiments of this disclosure, Example 10 provides a page display method, which further includes:
[0177] Optionally, determining the preloading information corresponding to the first view based on the view information corresponding to the first view includes:
[0178] Obtain the target view name information corresponding to the first view;
[0179] The priority information of each view corresponding to the first view is averaged to determine the priority information of the target view corresponding to the first view.
[0180] The number of views corresponding to the first view is averaged to determine the number of target views corresponding to the first view.
[0181] According to one or more embodiments of this disclosure, Example 11 provides a page display method, which further includes:
[0182] Optionally, preloading the first view based on the preloading information includes:
[0183] Based on the priority information of the target view corresponding to each of the first views to be preloaded, the preloading order of the first views is determined.
[0184] Based on the preloading order, each first view is preloaded according to the target view name information and the number of target views corresponding to each first view.
[0185] According to one or more embodiments of this disclosure, [Example Twelve] provides a page display device, including:
[0186] The target view information set acquisition module is used to retrieve the target view information set created during the historical display of the target page in response to the target page loading request.
[0187] The first view preloading module is used to determine the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page, and preload the first view based on the preloading information.
[0188] The target page display module is used to respond to the view creation trigger operation corresponding to the target page, create a target view in the target page based on the preloaded first view, and display the created target page.
[0189] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0190] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0191] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A page display method, characterized in that, include: In response to a target page loading request, a set of target view information created during the historical display of the target page is obtained. The set of target view information is a collection of various view information created on the target page each time the target page is historically displayed. The set of target view information is used to characterize the content displayed on the target page. Based on the target view information set corresponding to the target page, determine the preloading information corresponding to the first view to be preloaded, and preload the first view based on the preloading information; In response to the view creation trigger operation corresponding to the target page, a target view in the target page is created based on the preloaded first view, and the created target page is displayed; The step of determining the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page includes: Based on the target view information sets corresponding to the target page, determine the number of times each third view created during the historical display of the target page is displayed, and based on the number of times it is displayed, determine the first view to be preloaded from the third views; wherein, the third view refers to the view contained in the target view information set, and the number of times the third view is displayed refers to the number of target view information sets containing the third view. From the set of target view information containing the first view, obtain the view information corresponding to the first view, and determine the preloading information corresponding to the first view based on the view information corresponding to the first view; wherein, each view information corresponding to the first view includes: view name information, view priority information, and view quantity information corresponding to the first view; the preloading information includes: target view name information, target view priority information, and target view quantity information corresponding to the first view; the target view quantity information refers to the number of the first view that needs to be preloaded.
2. The page display method according to claim 1, characterized in that, Before retrieving the target view information set created when retrieving the target page's historical display in response to a target page load request, it also includes: Collect the set of view information created each time a page is displayed, and cache the set of view information collected each time a page is displayed; The set of target view information created when obtaining the historical display of the target page includes: Based on the set of view information corresponding to each currently cached page and the target page identifier corresponding to the target page, determine the set of target view information corresponding to the target page.
3. The page display method according to claim 2, characterized in that, The collection of view information created each time a page is displayed includes: If multiple second views are created in the currently displayed page, the view information corresponding to each second view is determined based on the view creation method, view creation sequence number, and view creation count of each second view. Based on the view information corresponding to all the second views, a set of view information corresponding to the currently displayed page is generated.
4. The page display method according to claim 3, characterized in that, The view information corresponding to the second view includes: the name of the second view, the priority of the second view, and the number of second views. The process of determining the view information corresponding to each second view based on the view creation method, view creation sequence number, and view creation count for each second view includes: For each second view, the second view name information corresponding to that second view is determined based on the view creation method corresponding to the second view; Based on the view creation sequence number of the second view in the currently displayed page, determine the priority information of the second view corresponding to the second view; Based on the number of times the second view is created on the currently displayed page, the number of second views corresponding to this second view is determined.
5. The page display method according to claim 2, characterized in that, The step of caching the set of view information collected each time a page is displayed includes: If it is detected that the page display duration corresponding to the currently displayed page is greater than or equal to the preset duration and the total number of views created in the currently displayed page is greater than or equal to the preset number of views, then the set of view information collected in the current display page will be cached.
6. The page display method according to claim 5, characterized in that, After caching the set of view information collected in the current display page, it also includes: If it is detected that the number of sets of view information corresponding to the currently displayed page in the current cache is greater than the preset number of sets, then the difference between the number of sets of view information and the preset number of sets is determined. Based on the cache time corresponding to each of the view information sets, the view information sets are sorted, and the view information sets with the earliest cache time and the number of differences are deleted.
7. The page display method according to claim 1, characterized in that, The step of determining the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page includes: If the number of sets of target view information corresponding to the target page is greater than or equal to the preset number of sets, then the preload information corresponding to the first view to be preloaded is determined according to each set of target view information corresponding to the target page.
8. The page display method according to claim 1, characterized in that, The step of determining the first view to be preloaded from the third view based on the number of displays includes: The third view whose display count is greater than or equal to a preset number is determined as the first view to be preloaded; If there is a third view that has been displayed for the most recent consecutive preset number of times, then this third view will also be used as the first view to be preloaded.
9. The page display method according to claim 1, characterized in that, The step of determining the preloading information corresponding to the first view based on the view information corresponding to the first view includes: Obtain the target view name information corresponding to the first view; The priority information of each view corresponding to the first view is averaged to determine the priority information of the target view corresponding to the first view. The number of views corresponding to the first view is averaged to determine the number of target views corresponding to the first view.
10. The page display method according to any one of claims 1-9, characterized in that, The preloading of the first view based on the preloading information includes: Based on the priority information of the target view corresponding to each of the first views to be preloaded, the preloading order of the first views is determined. Based on the preloading order, each first view is preloaded according to the target view name information and the number of target views corresponding to each first view.
11. A page display device, characterized in that, include: The target view information set acquisition module is used to acquire the target view information set created during the historical display of the target page in response to the target page loading request. The target view information set is a collection of various view information created on the target page each time the target page is historically displayed. The target view information set is used to characterize the displayed content on the target page. The first view preloading module is used to determine the preloading information corresponding to the first view to be preloaded based on the target view information set corresponding to the target page, and to preload the first view based on the preloading information. The target page display module is used to respond to the view creation trigger operation corresponding to the target page, create a target view in the target page based on the preloaded first view, and display the created target page. The first view preloading module includes: The first view determination unit is used to determine the number of times each third view created during the historical display of the target page is displayed based on the target view information set corresponding to the target page, and to determine the first view to be preloaded from the third views based on the number of times of display; wherein, the third view refers to the view contained in the target view information set, and the number of times the third view is displayed refers to the number of target view information sets containing the third view. The preloading information determining unit is configured to obtain each view information corresponding to the first view from each set of target view information containing the first view, and determine the preloading information corresponding to the first view based on each view information corresponding to the first view; wherein, each view information corresponding to the first view includes: view name information, view priority information, and view quantity information corresponding to the first view; the preloading information includes: target view name information, target view priority information, and target view quantity information corresponding to the first view; the target view quantity information refers to the number of the first view that needs to be preloaded.
12. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the page display method as described in any one of claims 1-10.
13. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the page display method as described in any one of claims 1-10.
Citation Information
Patent Citations
Resource preloading method and device and storage medium
CN111639276A
Page display method and related equipment
CN113961278A