A page display method and device, computer equipment and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2022-08-25
- Publication Date
- 2026-06-09
AI Technical Summary
但是这种更新标题栏的方式并不能保证用户能够看到最新的信息,导致信息获取不及时
[0050]本公开实施例提供的页面展示方法,可以在本次启动目标应用程序的时候,分别获取用于对标题栏进行更新的标题栏配置信息、以及与标题栏中的目标标题对应的子页面页面内容。在获取了标题栏配置信息后,可以在本次使用目标应用程序的过程中,利用获取到的标题栏配置信息对标题栏进行更新渲染,从而可以在本次使用目标应用程序时就能够展示出最新的标题栏,使得用户能够更加及时地获取到最新的信息,提高用户获取信息的效率。另外,如果本次要展示的首屏展示页面为目标标题对应的子页面,相当于提前获取到了首屏展示页面的页面内容,那么可以在获取标题栏配置信息和页面内容成功的情况下,直接利用获取的标题栏配置信息对标题栏进行渲染,同时利用获取的页面内容对子页面进行渲染,可以更加快速地展示出目标页面,从而可以进一步地提高用户获取信息的效率。
Smart Images

Figure CN115344803B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of information processing technology, and more specifically, to a page display method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Some pages in an application often contain multiple subpages, such as the "Following" page, "Recommended" page, and "Trending Searches" page below the homepage. The parent page of each subpage typically has a title bar corresponding to its subpage. Clicking on a title in the title bar will display the subpage corresponding to that title.
[0003] To display the latest information more promptly, the title bar is frequently updated. The typical process involves first retrieving configuration information for the title bar update, and then updating it the next time the application is launched. However, this method of updating the title bar does not guarantee that users will see the latest information, resulting in delayed information access. Summary of the Invention
[0004] This disclosure provides at least one page display method, apparatus, computer device, and storage medium.
[0005] In a first aspect, embodiments of this disclosure provide a page display method, the method comprising:
[0006] In response to the launch event of the target application, the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar are obtained respectively.
[0007] Determine whether the first screen of the target application is a subpage corresponding to the target title;
[0008] In response to the first screen display page being a subpage corresponding to the target title, the target page is rendered and displayed based on the obtained title bar configuration information and the subpage content.
[0009] In one optional implementation, the method further includes:
[0010] In response to the fact that the first screen display page is not a subpage corresponding to the target title, the page content corresponding to the first screen display page is loaded based on the link corresponding to the first screen display page.
[0011] In one optional implementation, obtaining the title bar configuration information of the target page in the target application includes:
[0012] Send a configuration information retrieval request to the server;
[0013] In response to receiving the title bar configuration information returned by the server based on the configuration information acquisition request within a preset time, the title bar configuration information is used as the title bar configuration information of the target page;
[0014] In response to not receiving the title bar configuration information returned by the server within the preset time, or determining that obtaining the title bar configuration information failed, the title bar configuration information stored locally is obtained; the title bar configuration information stored locally includes: fallback title bar configuration information, or historical title bar configuration information obtained during the historical use of the target application;
[0015] The locally stored title bar configuration information is determined as the title bar configuration information.
[0016] In one optional implementation, obtaining the locally stored title bar configuration information includes:
[0017] Read the historical title bar configuration information from the preset storage space;
[0018] In response to the historical title bar configuration information being available, the historical title bar configuration information is determined as the title bar configuration information;
[0019] In response to the historical title bar configuration information being unavailable, obtain the fallback title bar configuration information; and determine the fallback title bar configuration information as the title bar configuration information.
[0020] In an optional implementation, before determining the locally stored title bar configuration information as the title bar configuration information, the method further includes:
[0021] Determine whether the title bar configuration information returned by the server has been received;
[0022] In response to not receiving the title bar configuration information returned by the server, the locally stored title bar configuration information is determined to be the title bar configuration information.
[0023] In an optional implementation, the method further includes: displaying loading prompt information at the position of the title bar of the target page and the position of the subpage content before successfully acquiring the title bar configuration information and the subpage content; the loading prompt information is used to indicate that the title bar configuration information and the subpage content have not been successfully loaded.
[0024] In an optional implementation, the method further includes: monitoring the acquisition status of the title bar configuration information and the subpage content;
[0025] In response to the successful acquisition of the title bar configuration information, the loading prompt information corresponding to the title bar position is hidden, and the title bar of the target page is rendered based on the title bar configuration information;
[0026] Determining whether the first screen display page of the target application is a subpage corresponding to the target title includes:
[0027] In response to the successful acquisition of the title bar configuration information, the loading prompt information corresponding to the position of the subpage content is hidden, and it is determined whether the first screen display page of the target application is a subpage corresponding to the target title.
[0028] In an optional implementation, the method further includes: displaying preset functional controls in a first area of the target page before successfully obtaining the title bar configuration information and the subpage content;
[0029] And / or, after successfully obtaining the title bar configuration information and the subpage content, display the search bar in the second area of the target page.
[0030] In one optional implementation, a search bar is displayed on the target page; in the first display state of the target page, the search bar, the title bar, and the subpage container for carrying the page content are arranged sequentially from the first end to the second end of the target page.
[0031] After rendering and displaying the target page, the method further includes:
[0032] In response to a sliding operation in a first direction from the second end to the first end satisfying a preset condition, the target page is controlled to change from a first display state to a second display state; and in the second display state, the title bar and the subpage container are arranged sequentially in the direction from the first end to the second end, and the display position of the title bar in the second display state is the same as the display position of the search bar in the first display state; the display position of the subpage container in the second display state includes: the display position of the title bar in the first display state and the display position of the subpage container in the first display state.
[0033] In an optional implementation, the method further includes: responding to a sliding operation in a first direction from the second end to the first end not satisfying the preset condition, controlling the title bar to slide from its display position in the first display state to the display position of the search bar in the first display state, and controlling the title bar to gradually cover the search bar as the sliding distance of the sliding operation gradually increases, until the sliding operation satisfies the preset condition and the title bar completely covers the search bar; and...
[0034] The subpage container is controlled to slide from its display position in the first display state to the display position of the title bar in the first display state. As the sliding distance of the sliding operation gradually increases, the subpage container is controlled to gradually cover the display position of the title bar in the first display state until the sliding operation meets the preset condition, and the subpage container covers the original position of the title bar and the original position of the subpage container.
[0035] In one optional implementation, the title bar configuration information includes the page type of each subpage;
[0036] The method further includes:
[0037] When the page type includes a plain text Lynx page or a global wide area network web page, and the Lynx page and the web page cannot be scrolled up in tandem, the display height information of the subpage is determined based on the position change information of the title bar in the target page and the height information of the target page.
[0038] Alternatively, the display height information of the subpage can be determined based on the height information of the target page and the preset bottom reserved height information in the subpage;
[0039] Based on the display height information of the subpage, the page content of the subpage is displayed.
[0040] In an optional implementation, when the page type includes a global wide area network web page, the method further includes:
[0041] During the process of switching from a non-web page to a web page, the visibility state of the web page is obtained;
[0042] When the visible state indicates that the web page is visible, the hardware acceleration mechanism is activated, and the page content of the web page is obtained using the target hardware corresponding to the hardware acceleration mechanism.
[0043] When the visibility status indicates that the web page is not visible, the hardware acceleration mechanism is turned off.
[0044] Secondly, embodiments of this disclosure also provide a page display device, including:
[0045] The first acquisition module is used to, in response to the launch event of the target application, acquire from the server the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar.
[0046] The first determining module is used to determine whether the first screen display page of the target application is a subpage corresponding to the target title;
[0047] The rendering module is used to render and display the target page in response to the first screen display page being a subpage corresponding to the target title, based on the obtained title bar configuration information and the content of the subpage.
[0048] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0049] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0050] The page display method provided in this disclosure can obtain title bar configuration information for updating the title bar and the subpage content corresponding to the target title in the title bar when the target application is launched. After obtaining the title bar configuration information, the title bar can be updated and rendered using the obtained title bar configuration information during the use of the target application. This allows the latest title bar to be displayed when the target application is used, enabling users to obtain the latest information more promptly and improving the efficiency of information acquisition. In addition, if the first screen to be displayed is a subpage corresponding to the target title, which is equivalent to obtaining the page content of the first screen in advance, then if the title bar configuration information and page content are successfully obtained, the title bar can be rendered directly using the obtained title bar configuration information, and the subpage can be rendered using the obtained page content. This allows for faster display of the target page, further improving the efficiency of information acquisition for users.
[0051] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0052] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0053] Figure 1 A flowchart of a page display method provided by an embodiment of this disclosure is shown;
[0054] Figure 2 A flowchart is shown illustrating a page display method provided in an embodiment of this disclosure when the subpage corresponding to the target title is a recommendation page;
[0055] Figure 3 A flowchart is shown illustrating another page display method provided in this disclosure when the subpage corresponding to the target title is a recommendation page;
[0056] Figure 4 This illustration shows a schematic diagram of the effect of the target page in the first display state provided by an embodiment of the present disclosure;
[0057] Figure 5 A flowchart is shown illustrating another page display method provided in this disclosure when the subpage corresponding to the target title is a recommendation page;
[0058] Figure 6 This document shows a flowchart illustrating whether the process of determining whether the acquisition of title bar configuration information has ended, as provided in an embodiment of this disclosure.
[0059] Figure 7 This illustration shows the effect diagram of the target page in the second display state provided by the embodiments of this disclosure;
[0060] Figure 8 This diagram illustrates the positional changes of the child page containers in the AppbarLayout and CoordinatorLayout during the upward swiping of the target page provided in the embodiments of this disclosure.
[0061] Figure 9A flowchart illustrating the page switching provided in an embodiment of this disclosure is shown;
[0062] Figure 10 A schematic diagram of a page display device provided in an embodiment of this disclosure is shown;
[0063] Figure 11 A schematic diagram of a computer device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0065] Research has revealed that the title bar update process typically involves retrieving configuration information during the previous application cold start and then updating the title bar the next time the application is launched. For example, if an activity launches at a certain time (and its corresponding title needs to be displayed in the title bar), the user needs to launch the application once at that time to obtain the title bar configuration information containing the activity's title. Then, the title will only be visible on the next launch of the application. Similarly, for new users, the first launch of the application only displays the default title bar; a second launch is required to see the updated title bar. Therefore, this method of updating the title bar does not guarantee that users will see the latest information, leading to untimely information access.
[0066] Based on this, this disclosure provides a page display method. In this embodiment, when the target application is launched, title bar configuration information for updating the title bar and the subpage content corresponding to the target title in the title bar are obtained. After obtaining the title bar configuration information, the title bar can be updated and rendered using the obtained title bar configuration information during the use of the target application. This allows the latest title bar to be displayed during the use of the target application, enabling users to obtain the latest information more promptly and improving the efficiency of information retrieval. Furthermore, if the first screen to be displayed is a subpage corresponding to the target title, which is equivalent to obtaining the page content of the first screen in advance, then, if the title bar configuration information and page content are successfully obtained, the title bar can be rendered directly using the obtained title bar configuration information, and the subpage can be rendered using the obtained page content. This allows for faster display of the target page, further improving the efficiency of information retrieval for users.
[0067] The deficiencies of the above solutions and the proposed solutions are the result of the inventor's practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.
[0068] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0069] To facilitate understanding of this embodiment, a page display method disclosed in this disclosure will first be described in detail. The execution subject of the page display method provided in this disclosure is generally a computer device with certain computing power.
[0070] The page display method provided in the embodiments of this disclosure will be described below.
[0071] See Figure 1 The diagram shows a flowchart of a page display method provided in an embodiment of this disclosure. The method includes steps S101 to S103, wherein:
[0072] S101: In response to the launch event of the target application, obtain the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar.
[0073] In this embodiment of the disclosure, the launch event of the target application can refer to a cold start, that is, the process of launching the target application when there is no background process of the target application. The target page of the target application can display a title bar. The title bar can include multiple titles. After a user triggers any title in the title bar, the subpage corresponding to that title can be displayed in the subpage display area of the target page. After launch, the first page displayed on the target page (i.e., the first screen display page) can be one of the subpages corresponding to a title.
[0074] The title bar configuration information can include configuration information for the subpages corresponding to each title. Based on the title bar configuration information, configurations can be made for each title and its corresponding subpages.
[0075] The title bar configuration information can specifically include the subpage name, subpage identifier, subpage path, and subpage type. The subpage name can be displayed as the title in the title bar. For example, the `tab_name` field can be set in the configuration information to represent the subpage name. Based on the subpage identifier, the page content corresponding to the subpage can be retrieved from the server. For example, the `tab_id` field can be set in the configuration information to represent the subpage identifier. The subpage path information is essentially the subpage's tracking information. Based on the subpage's tracking information, the parent page of the subpage can be determined. For example, the `source` field can be set in the configuration information to represent the subpage's path. For instance, using `source = main_recommend`, it can be determined that this tracking information comes from the recommendation page under the homepage. The subpage's page type can include a native page, a World Wide Web (web) page, or a plain text Lynx page. For example, the `tab_type` field can be set in the configuration information to represent the subpage's page type.
[0076] The title bar configuration information can also include links to subpages. When the subpage type is a native page, the page content corresponding to the native subpage can be retrieved from the server based on the native subpage's identifier information. When the subpage type is a web page or a Lynx page, the page content corresponding to the web page or Lynx page can be retrieved based on the page link. For example, the `tab_schema` field can be set in the configuration information to represent the subpage's page link.
[0077] During a cold start, the latest title bar configuration information and the content of the subpage corresponding to the target title in the title bar can be obtained. In one implementation, both the title bar configuration information and the content of the subpage corresponding to the target title in the title bar can be obtained simultaneously. That is, both the title bar configuration information and the content of the subpage corresponding to the target title are obtained through a single interface. In another implementation, the title bar configuration information and the content of the subpage corresponding to the target title can be obtained separately from the server. Specifically, in one method, the title bar configuration information can be obtained using a configuration retrieval interface, and the content of the subpage corresponding to the target title can be obtained using a page content retrieval interface. In this method, the information retrieval interfaces are separate, which facilitates subsequent information maintenance; furthermore, the two interfaces can retrieve information separately, eliminating the need to retrieve the content of the subpage corresponding to the target title only after the title bar configuration information is successfully obtained, thus reducing user waiting time.
[0078] S102: Determine whether the first screen display page of the target application is a subpage corresponding to the target title.
[0079] In this embodiment, a default homepage can be set, for example, the default homepage can be a recommendation page. Here, the subpage corresponding to the target title can be the default homepage. Considering that the homepage to be displayed may change in some cases—for example, the default homepage might be a recommendation page, while in other cases it might be an activity page—in one approach, the homepage display configuration information can be used to determine whether it is a subpage corresponding to the target title.
[0080] S103: In response to the first screen display page being a subpage corresponding to the target title, the target page is rendered and displayed based on the obtained title bar configuration information and the subpage content.
[0081] When the first screen displays the subpage corresponding to the target title, it means that the content of the subpage corresponding to the target title has been obtained during the cold start process. At this time, the content of the subpage corresponding to the target title can be rendered directly on the target page, thereby reducing the waiting time for users from starting the target application to seeing the subpage corresponding to the target title.
[0082] In one implementation, if the first screen display page is not the subpage corresponding to the target title, it indicates that the display configuration information for the first screen display page has changed. For example, this time the launch will display the activity page instead of the default recommendation page. In this case, in response to the first screen display page not being the subpage corresponding to the target title, the page content corresponding to the first screen display page is loaded based on the link corresponding to the first screen display page.
[0083] Subpages that do not correspond to the target title can include web pages or Lynx pages. Based on the aforementioned methods for obtaining page content for these two page types, the page content corresponding to the first-screen display page can be loaded according to the link corresponding to the first-screen display page.
[0084] Figure 2 The flowchart illustrates a page display method when the subpage corresponding to the target title is a recommendation page. Figure 2 The corresponding specific process includes, for example, the following steps a1 to a3:
[0085] a1: When the target application starts, it can send a request to the server to retrieve information.
[0086] Information retrieval requests can include configuration information retrieval requests for the title bar configuration information of the homepage in the target application, and content retrieval requests for the page content corresponding to the recommendation page.
[0087] a2: After successfully obtaining the title bar configuration information, the configuration information can be saved locally, and the first subpage and the title bar can be rendered and displayed based on the obtained configuration information can be shown. The first subpage shown here can refer to a subpage that does not contain any page content.
[0088] a3: Determine whether the first subpage, i.e. the first screen displayed, is a recommended page.
[0089] a31: If the first subpage is a recommendation page, then display the content of the retrieved recommendation page.
[0090] a32: If the first subpage is not a recommended page, then load the page link corresponding to the non-recommended page (the non-recommended page can include web pages or Lynx pages).
[0091] To further optimize the user experience, in one implementation, a time threshold for obtaining title bar configuration information can be set. Specifically, in the step of retrieving the title bar configuration information of the target page in the target application from the server, a configuration information retrieval request can be sent to the server; in response to receiving the title bar configuration information returned by the server based on the configuration information retrieval request within a preset time, the title bar configuration information is used as the title bar configuration information of the target page.
[0092] In practice, the time taken to retrieve title bar configuration information may exceed the preset time. Reasons for this could include poor network signal or no network connection. By setting a preset time for retrieving title bar configuration information, the request can be stopped if the preset time is exceeded, thus preventing excessively long waiting times for users caused by unrestricted retrieval of title bar configuration information.
[0093] To ensure the title bar is displayed on the target page, if the time taken to retrieve the title bar configuration information exceeds a preset time, or if it is determined that retrieving the title bar configuration information failed, the target page can be rendered and displayed based on the locally stored title bar configuration information and the page content. In one implementation, in response to not receiving the title bar configuration information returned by the server within a preset time, or if it is determined that retrieving the title bar configuration information failed, the locally stored title bar configuration information can be retrieved; and the locally stored title bar configuration information can be determined as the title bar configuration information corresponding to the target page.
[0094] Here, failure to retrieve title bar configuration information can mean that title bar configuration information matching the target page was not retrieved. Specifically, this can include situations such as not retrieving title bar configuration information (e.g., the title bar configuration information does not exist) or the title bar configuration information not matching the target page.
[0095] Locally stored title bar configuration information includes: fallback title bar configuration information, or historical title bar configuration information obtained during the target application's historical usage.
[0096] The catch-all title bar configuration information can be pre-set and stored locally. This configuration information can be fixed. It can also be written into the target application's code, updating only when the target application is updated. Furthermore, the catch-all title bar configuration information generally only includes the configuration information for the preset title; for example, it could only contain the configuration information for the title "Recommended".
[0097] In this embodiment of the disclosure, the latest title bar configuration information can be saved locally each time it is obtained. Historical title bar configuration information can be stored locally after the latest title bar configuration information is obtained during the historical usage of the target application.
[0098] In one implementation, when the locally stored title bar configuration information includes catch-all title bar configuration information and historical title bar configuration information, the usage priority of different title bar configuration information in the locally stored title bar configuration information can be set. For example, the usage priority of historical title bar configuration information can be set to be higher than that of catch-all title bar configuration information. This is mainly because historical title bar configuration information can be updated during the use of the target application, while catch-all title bar configuration information is updated with updates to the target application. Therefore, the update frequency of historical title bar configuration information may be greater than that of catch-all title bar configuration information.
[0099] In one implementation, the step of obtaining the title bar configuration information stored locally may specifically include: reading historical title bar configuration information from a preset storage space; determining the historical title bar configuration information as the title bar configuration information corresponding to the target page in response to the historical title bar configuration information being available; obtaining fallback title bar configuration information in response to the historical title bar configuration information being unavailable; and determining the fallback title bar configuration information as the title bar configuration information corresponding to the target page.
[0100] In other words, if no title bar configuration information is received from the server within a preset time, or if it is determined that obtaining the title bar configuration information failed, the system first determines whether the historical title bar configuration information is available, based on the priority information between historical title bar configuration information and fallback title bar configuration information. If the historical title bar configuration information is unavailable, then the fallback title bar configuration information is obtained.
[0101] In one approach, the availability of historical title bar configuration information can be determined based on whether the historical title bar configuration information matches the current business requirements. For example, if the current business requires displaying titles related to the latest current events, but the historical title bar configuration information corresponds to outdated current events content, then obviously the target page cannot be rendered based on that historical title bar configuration information.
[0102] This implementation method can, to a certain extent, ensure that the obtained title bar configuration information is the title bar configuration information that differs least from the latest title bar configuration information.
[0103] In other implementations, the fallback title bar configuration information can be directly obtained and used as the title bar configuration information corresponding to the target page; alternatively, historical title bar configuration information can be directly obtained and used as the title bar configuration information corresponding to the target page. By directly obtaining either the fallback or historical title bar configuration information, the title bar configuration information can be quickly acquired, allowing for rapid rendering and display of the target page.
[0104] Considering that in practice, there might be situations where no title bar configuration information is received from the server within a preset time, or where obtaining title bar information has failed, and before the locally stored title bar configuration information is determined to be the title bar configuration information corresponding to the target page, the server's title bar configuration information is received again. It's also possible that no title bar configuration information is received from the server within a preset time, or where obtaining title bar information has failed, and before the locally stored title bar configuration information is determined to be the title bar configuration information corresponding to the target page, the server's title bar configuration information has still not been received. Therefore, in one implementation, it can be determined whether the title bar configuration information returned by the server has been received before determining the locally stored title bar configuration information to be the title bar configuration information corresponding to the target page. In response to receiving the title bar configuration information returned by the server, the server's returned title bar configuration information can be preferentially determined to be the title bar configuration information corresponding to the target page. In response to not receiving the title bar configuration information returned by the server, the locally stored title bar configuration information can be determined to be the title bar configuration information corresponding to the target page.
[0105] By implementing the above methods, before determining the locally stored title bar configuration information as the title bar configuration information corresponding to the target page, it is possible to determine again whether the title bar configuration information returned by the server has been received. This ensures that if the title bar configuration information returned by the server is received, the title bar is rendered and displayed based on the latest title bar configuration information.
[0106] Figure 3 This diagram illustrates an alternative page display method when the subpage corresponding to the target title is a recommendation page. Figure 3 The corresponding specific process includes, for example, the following steps b1 to b7:
[0107] b1: When the target application starts, it can send a request to the server to retrieve information.
[0108] Information retrieval requests can include configuration information retrieval requests for the title bar configuration information of the homepage in the target application, and content retrieval requests for the page content corresponding to the recommendation page.
[0109] b2: Determine if the configuration information request timed out.
[0110] In other words, it determines whether the server has received the title bar configuration information returned by the request based on the configuration information within a preset time. For example, the preset time can be set to two seconds.
[0111] b3: If the configuration information request does not time out, determine whether the title bar configuration information was successfully obtained.
[0112] b31: If the title bar configuration information is successfully obtained, it means that the title bar configuration information corresponding to the target page has been obtained. The obtained title bar configuration information can be saved locally and used as the title bar configuration information corresponding to the target page.
[0113] b32: If the title bar configuration information is not successfully obtained, it means that the title bar configuration information corresponding to the target page has not been obtained. In this case, the title bar configuration information stored locally can be obtained.
[0114] b4: If the configuration information request times out, the title bar configuration information can be retrieved from the preset storage space. The title bar configuration information in the local storage can include historical title bar configuration information obtained during the target application's historical usage.
[0115] b5: Determine whether the historical title bar configuration information included in the locally stored title bar configuration information is available.
[0116] b51: If it is in an unavailable state, it can read the locally stored fallback title bar configuration information and use the fallback title bar configuration information as the title bar configuration information of the target page.
[0117] b52: If it is available, the historical title bar configuration information can be used as the title bar configuration information for the target page.
[0118] b6: Displays the first subpage and renders the title bar based on the retrieved title bar configuration information. The first subpage displayed here can refer to a subpage that does not contain any page content.
[0119] b7: Determine whether the first subpage, i.e. the first screen display page, is a recommended page.
[0120] b71: If the first subpage is a recommendation page, then display the content of the retrieved recommendation page.
[0121] b72: If the first subpage is not a recommended page, then load the page link corresponding to the non-recommended page (the non-recommended page can include web pages or Lynx pages).
[0122] In practice, there may be situations where the title bar configuration information has not been fully retrieved before the target page is rendered and displayed. To improve user experience, one implementation can include a waiting mechanism: before successfully retrieving the title bar configuration information and page content, a loading indicator is displayed at the position of the title bar and the position of the page content on the target page. This loading indicator serves to show that the title bar configuration information and page content have not yet been successfully loaded.
[0123] The aforementioned waiting mechanism can indicate to users that the page is currently loading, reducing the potential negative user experience when they are unaware of the loading details.
[0124] During the loading indicator display, the system can also monitor the title bar configuration information and the page content retrieval status. Specifically, in response to successful retrieval of the title bar configuration information, the loading indicator corresponding to the title bar position can be hidden, and the title bar of the target page can be rendered based on the title bar configuration information. At this point, the complete title bar can be displayed on the target page.
[0125] Furthermore, in response to the successful acquisition of the title bar configuration information, it can also hide the loading prompt information corresponding to the position of the page content, and determine whether the first screen display page of the target application is a subpage corresponding to the target title.
[0126] The process of determining whether the target application's first screen display page is a subpage corresponding to the target title can be referred to the aforementioned content and will not be repeated here.
[0127] The aforementioned monitoring process can occur during the display of loading prompts, that is, during the period when the title bar configuration information has not yet been successfully loaded. Therefore, in one implementation, after sending a configuration information retrieval request to the server, it is determined whether the process of retrieving the title bar configuration information has ended. The criteria for determining whether the process of retrieving the title bar configuration information has ended may include whether the title bar configuration information corresponding to the target page has been retrieved. The process of retrieving the title bar configuration information corresponding to the target page can be referred to the preceding text and will not be repeated here.
[0128] In response to the incomplete process of obtaining title bar configuration information, the system listens for whether the title bar configuration information was successfully obtained. If successful acquisition is not detected, the system continues to listen for success and displays a loading indicator at the title bar location to indicate that the title bar configuration information has not yet been successfully loaded. If successful acquisition is detected, the system hides the loading indicator at the title bar location and renders the title bar of the target page based on the title bar configuration information. It may also hide the loading indicator at the location of the page content and determine whether the first screen of the target application is a subpage corresponding to the target title.
[0129] In response to whether the process of obtaining the title bar configuration information has ended, the target page is rendered and displayed based on the title bar configuration information and the page content.
[0130] In one implementation, in addition to displaying the title bar and subpage content, the target page can also display preset functional controls, a search bar, etc.
[0131] In practice, preset functional controls can be displayed in the first area of the target page before the title bar configuration information and page content are successfully obtained; and / or, a search bar can be displayed in the second area of the target page after the title bar configuration information and page content are successfully obtained.
[0132] Preset function controls can be permanently displayed in the first area. Furthermore, these preset function controls do not change regardless of changes in the title bar configuration information or page content. Therefore, preset function controls can be displayed in the first area of the target page before the title bar configuration information and page content are successfully obtained. The display position and / or display method of the search bar can change with the display position of the title bar and page content (the specific process will be detailed later). Therefore, the search bar can be displayed in the second area of the target page after the title bar configuration information and page content are successfully obtained.
[0133] The first and second regions can be located in different areas of the target page. For example, such as... Figure 4As shown, the first area can be located at the bottom of the target page. This area displays several preset functional controls. These controls may include "Home," "Find Games," "Community," and "My Account." Triggering different controls enables different functions. For example, while displaying other pages (such as a search page), triggering the "Home" control will directly redirect to the homepage. Triggering the "Find Games" control will display a list of games containing all published titles. The second area can be located at the top of the target page. This area displays a search bar. Entering search information in the search bar will redirect to the search page, displaying the search results corresponding to the search information. Figure 4 In addition, a status bar can be displayed at the top of the target page. The status bar can display system time, network signal strength, battery level, etc. The display position of the status bar and the types of information displayed in it can remain fixed.
[0134] Figure 5 This diagram illustrates an alternative page display method when the subpage corresponding to the target title is a recommendation page. Figure 5 The corresponding specific process includes, for example, the following steps c1 to c4:
[0135] c1: When the target application starts, it can send a request to the server to retrieve information.
[0136] Information retrieval requests can include configuration information retrieval requests for the title bar configuration information of the homepage in the target application, and content retrieval requests for the page content corresponding to the recommendation page.
[0137] c2: Displays preset function controls at the bottom of the target page.
[0138] c3: Determines whether the process of retrieving title bar configuration information has ended. The process of determining whether the process of retrieving title bar configuration information has ended will be... Figure 6 The specific procedures are detailed below.
[0139] c31: If the process of obtaining the title bar configuration information is complete, the title bar can be rendered and displayed based on the obtained title bar configuration information, and the first subpage and search bar can be displayed on the target page. For example, the first area can be located at the top of the target page. When the status bar is displayed on the target page, the first area can be located below the status bar and above the title bar.
[0140] c32: If the process of obtaining the title bar configuration information is not yet complete, the acquisition status of the title bar configuration information can be monitored. If the acquisition status indicates that the title bar configuration information has not been successfully obtained, a loading indicator message can be displayed at the position of the title bar and the position of the page content on the target page. If the acquisition status indicates that the title bar configuration information has been successfully obtained, the loading indicator message corresponding to the title bar position can be hidden. Then, the steps of rendering and displaying the title bar based on the obtained title bar configuration information, and displaying the first subpage and search bar on the target page can be executed. The first subpage displayed here can refer to a subpage that does not include the page content.
[0141] c4: Determine whether the first subpage, i.e. the first screen displayed, is a recommended page.
[0142] c41: If the first subpage is a recommendation page, then display the content of the retrieved recommendation page.
[0143] c42: If the first subpage is not a recommended page, then load the page link corresponding to the non-recommended page (the non-recommended page can include web pages or Lynx pages).
[0144] Figure 6 The flowchart illustrates whether the process of retrieving title bar configuration information has ended. Figure 6 The corresponding specific process includes, for example, the following steps d1 to d5:
[0145] d1: At the start of the process of obtaining the title bar configuration information, determine whether the configuration information request has timed out.
[0146] In other words, it determines whether the server has received the title bar configuration information returned by the request based on the configuration information within a preset time. For example, the preset time can be set to two seconds.
[0147] d2: If the configuration information request does not time out, determine whether the title bar configuration information was successfully obtained.
[0148] d21: If the title bar configuration information is successfully obtained, it means that the title bar configuration information corresponding to the target page has been obtained. The obtained title bar configuration information can then be saved locally, and the process of obtaining the title bar configuration information ends.
[0149] d22: If the title bar configuration information is not successfully obtained, it means that the title bar configuration information corresponding to the target page has not been obtained. In this case, the title bar configuration information stored locally can be obtained.
[0150] d4: If the configuration information request times out, the locally stored title bar configuration information can be obtained from a preset storage space. The locally stored title bar configuration information can include historical title bar configuration information obtained during the historical usage of the target application.
[0151] d5: Determine whether the historical title bar configuration information included in the locally stored title bar configuration information is in an available state.
[0152] d51: If it is in an unavailable state, the locally stored fallback title bar configuration information can be read, and the fallback title bar configuration information can be used as the title bar configuration information corresponding to the target page, and the process of obtaining the title bar configuration information ends.
[0153] d52: If it is in an available state, the historical title bar configuration information can be used as the title bar configuration information corresponding to the target page, and the process of obtaining the title bar configuration information ends.
[0154] In an embodiment of the present disclosure, when the sub - page is a native page, the sub - page can be联动displayed with the rendered title bar, that is, when a target operation (such as a sliding operation) is triggered, the sub - page can move together with the title bar. In a specific implementation, the target page can include a CoordinatorLayout. The CoordinatorLayout can be used as a parent container. The sub - components in the CoordinatorLayout can include a search bar, an AppbarLayout, and a sub - page container. The sub - page container can be bound to the AppbarLayout, and coordinated by the parent container CoordinatorLayout, so as to实现联动when sliding.
[0155] Among them, the AppbarLayout can be used as the parent container of the title bar. The AppbarLayout can be divided into three regions, specifically including a first transparent region, a second transparent region, and a title bar region. The title bar region can be used to display the title bar. The first transparent region and the second transparent region can reveal the controls set in the lower layer. The AppbarLayout can be联动as a head sub - component, that is, the AppbarLayout can move jointly with the sub - page container. The sub - page container can be used to carry page content.
[0156] In one implementation, a search bar can be displayed on the target page. The target page can have different display states. The display states of the target page can include the display mode of the search bar, and the display positions of different display objects (that is, the search bar, the title bar, and the sub - page container). Among them, the display mode of the search bar can include being displayed in the form of a search box or being displayed in the form of a control.
[0157] After rendering and displaying the target page, it can respond to the sliding operation from the second end to the first end in the first direction and control the target page to change from the first display state to the second display state when the preset conditions are met; and in the second display state, the title bar and the subpage container are arranged in sequence from the first end to the second end, and the display position of the title bar in the second display state is the same as the display position of the search bar in the first display state.
[0158] The first display state of the target page may include a search bar displayed as a search box. Furthermore, in the first display state of the target page, the search bar, title bar, and subpage container for carrying page content are arranged sequentially from the first edge to the second edge of the target page. For example, in the first display state of the target page, the search bar, title bar, and subpage container for carrying page content are arranged sequentially from the top to the bottom of the target page. See [link to target page in first display state] for more information. Figure 4 .
[0159] The second display state of the target page may include a search bar displayed as a control. Furthermore, in the second display state of the target page, the title bar and subpage containers can be arranged sequentially from the first end to the second end. For example, in the second display state of the target page, the title bar and subpage containers can be arranged sequentially from the top to the bottom of the target page. The display position of the title bar in the second display state is the same as the display position of the search bar in the first display state. In the second display state of the target page, the search bar, as a control, can be displayed at a preset position on the target page, for example, after the title bar. The display position of the subpage containers in the second display state includes the display position of the title bar and the display position of the subpage containers in the first display state. The target page in the second display state can be seen in [reference needed]. Figure 7 .
[0160] Here, the preset condition may include the sliding distance in the first direction from the second end to the first end being equal to a preset distance.
[0161] In the first display state of the target page, the search bar can be displayed through the transparent area of the aforementioned AppbarLayout. In a specific implementation, the first transparent area, the second transparent area, and the title bar in the AppbarLayout can be arranged sequentially from the first end to the second end. In the first display state of the target page, the search bar can be displayed through the second transparent area. During a swipe operation from the second end to the first end in the first direction, the AppbarLayout can move from the second end to the first end in the first direction. When the swipe operation meets preset conditions, the first transparent area, the second transparent area, and the title bar can move in the first direction, eventually causing the title bar to completely cover the search bar, and the second transparent area to reveal the display object originally beneath the first transparent area. In one implementation, the display object beneath the first transparent area can be the status bar. In this case, the second transparent area can reveal the status bar originally beneath the first transparent area.
[0162] The sliding operation from the second end to the first end in the first direction can be a continuous process. Before the sliding distance from the second end to the first end in the first direction equals a preset distance, in response to the sliding operation from the second end to the first end in the first direction not meeting the preset condition, the title bar can be controlled to slide from its display position in the first display state to the display position of the search bar in the first display state. As the sliding distance of the sliding operation gradually increases, the title bar is controlled to gradually cover the search bar until the sliding operation meets the preset condition and the title bar completely covers the search bar. Additionally, the subpage container can be controlled to slide from its display position in the first display state to the display position of the title bar in the first display state. As the sliding distance of the sliding operation gradually increases, the subpage container is controlled to gradually cover the display position of the title bar in the first display state until the sliding operation meets the preset condition and the subpage container covers the original position of the title bar and the original position of the subpage container.
[0163] In other words, as the sliding distance gradually increases, before the sliding distance in the first direction from the second end to the first end is less than a preset distance, the position of the search bar remains unchanged in the first display state, while the title bar gradually moves in the first direction from the second end to the first end. When the sliding distance in the first direction from the second end to the first end equals the preset distance, the title bar completely covers the search bar. At this point, the title bar is displayed in the position of the search bar, and the search bar is no longer displayed in its original position. In specific implementations, the search bar can be displayed as a control at a preset position on the target page. For example, as shown... Figure 7 As shown, the search bar can be displayed as a search button behind the title bar.
[0164] Furthermore, as the sliding distance of the swipe operation gradually increases, before the sliding distance in the first direction from the second end to the first end is less than the preset distance, the child page containers in the CoordinatorLayout gradually move along with the title bar in the first direction from the second end to the first end. When the sliding distance in the first direction from the second end to the first end equals the preset distance, the child page containers cover the original position of the title bar and the original position of the child page containers.
[0165] Figure 8 The diagram illustrates the positional changes of child page containers within the AppbarLayout and CoordinatorLayout as the target page is swiped upwards. Figure 8 As shown, in the first display state of the target page, the first transparent area in the AppbarLayout is used to reveal the status bar at the top of the target page, and the second transparent area is used to reveal the search bar below the status bar. The title bar is located below the search bar. The child page container is located below the title bar. After swiping upwards, when the swipe distance meets a preset distance, the target page changes from the first display state to the second display state. In the second display state of the target page, the child page containers in both the AppbarLayout and the CoordinatorLayout move upwards by a preset distance. The second transparent area moves to the original position of the first transparent area, and at this time, the second transparent area is used to reveal the status bar. The title bar moves to the original position of the second transparent area. The title bar covers the search bar. The child page container covers the original positions of the title bar and the original positions of the child page container.
[0166] In the above process, the height of the child page container can be equal to the difference between the height of the parent container (i.e., the CoordinatorLayout) and the minimum display height of the AppbarLayout. The minimum display height of the AppbarLayout can be equal to the difference between its maximum display height and the scrollable distance. The maximum display height of the AppbarLayout can be equal to the sum of the heights of the first transparent area, the second transparent area, and the title bar. In a specific implementation, the scrollable distance can be set to the height of the title bar, i.e., a preset distance is the height of the title bar. Since the height of the parent container and the maximum display height of the AppbarLayout are fixed, knowing the scrollable distance allows us to know the height of the child page container and the minimum display height of the AppbarLayout. To ensure that the first child component in the AppbarLayout is scrollable, and that the scrollable distance is the height of the title bar, in one implementation, the height of the first transparent area can be set to the height of the title bar. The height of the second transparent area can be set to the height of the status bar.
[0167] The previous section described how a subpage can be linked to the rendered title bar when it's a native page. Besides native pages, subpages can also be web pages or Lynx pages. Generally, when a subpage is a web page or Lynx page, the title bar cannot be linked like a native page; that is, the search bar cannot be collapsed. This may result in some page content at the bottom of the subpage not being displayed, meaning some areas of the page content are not fully displayed. In specific implementations, for web pages, if it's a client-defined WebView, linking is possible; for Lynx pages, if the underlying component supports a nested sliding mechanism, linking is also supported. Because of the aforementioned limitations in achieving linking effects in web and Lynx pages, one implementation can solve the problem of the bottom not being fully displayed without requiring a linked upward swipe.
[0168] The following section describes how to ensure that the bottom of a page can fully display its content when the subpage is a web page or a Lynx page.
[0169] In one implementation, the title bar configuration information may include the page type of each subpage. If the page type includes a Lynx page or a web page, and the Lynx page and web page cannot be scrolled up in tandem, the display height information of the subpage is determined based on the position change information of the title bar in the target page and the height information of the target page; or, the display height information of the subpage is determined based on the height information of the target page and the preset bottom reserved height information in the subpage; based on the display height information of the subpage, the page content of the subpage is displayed.
[0170] In this implementation, two solutions are provided for Lynx pages and web pages respectively to address the issue of insufficient display of page content at the bottom. Specifically, one approach is to first determine the position change information of the title bar; then, based on the title bar position change information and the height information of the target page (which can refer to the screen height), determine the remaining height information within the target page; and finally, based on the remaining height information, determine the display height information of the subpage. Alternatively, during the subpage creation process, a reserved height is set at the bottom of the subpage; then, based on the height information of the target page and the preset reserved bottom height information within the subpage, the display height information of the subpage is determined.
[0171] When a subpage is a web page, there's a flickering issue where, when switching from the web page to another page and then back to it, the web page initially displays a black background before showing the content. This flickering occurs when the web page's WebView is nested within a ViewPager and uses hardware acceleration for rendering. Hardware acceleration refers to utilizing the operating system's hardware, specifically the graphics processing unit (GPU), to render the page. When the web page is re-displayed, hardware acceleration resources need to be prepared again, and a black background is displayed before hardware rendering is successful, resulting in the flickering issue.
[0172] Based on this, in one implementation, such as Figure 9 As shown, the visibility state of a web page can be obtained during the transition from a non-web page to a web page. When the web page is minimized or in a background tab, it can be considered invisible; when the web page is open, it can be considered visible.
[0173] When the web page is visible, the hardware acceleration mechanism is enabled, and the page content is obtained using the target hardware corresponding to the hardware acceleration mechanism; when the web page is not visible, the hardware acceleration mechanism is disabled.
[0174] In the above implementation, when the web page is visible, hardware acceleration is enabled to ensure smooth scrolling. When the web page is invisible, hardware acceleration is disabled to avoid the aforementioned page flickering problem.
[0175] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0176] Based on the same inventive concept, this disclosure also provides a page display device corresponding to the page display method. Since the principle of the device in this disclosure for solving the problem is similar to the page display method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0177] Reference Figure 10 The diagram shown is an architectural schematic of a page display device provided in an embodiment of this disclosure. The device includes: a first acquisition module 1001, a first determination module 1002, and a rendering module 1003; wherein,
[0178] The first acquisition module 1001 is used to acquire, in response to the launch event of the target application, the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar.
[0179] The first determining module 1002 is used to determine whether the first screen display page of the target application is a subpage corresponding to the target title;
[0180] The rendering module 1003 is used to render and display the target page in response to the first screen display page being a subpage corresponding to the target title, based on the obtained title bar configuration information and the subpage content.
[0181] In one optional embodiment, the apparatus further includes:
[0182] The loading module is used to load the page content corresponding to the first screen display page based on the link corresponding to the first screen display page when the first screen display page is not the subpage corresponding to the target title.
[0183] In one optional implementation, the first acquisition module 1001 is specifically used for:
[0184] Send a configuration information retrieval request to the server;
[0185] In response to receiving the title bar configuration information returned by the server based on the configuration information acquisition request within a preset time, the title bar configuration information is used as the title bar configuration information of the target page;
[0186] In response to not receiving the title bar configuration information returned by the server within the preset time, or determining that obtaining the title bar configuration information failed, the title bar configuration information stored locally is obtained; the title bar configuration information stored locally includes: fallback title bar configuration information, or historical title bar configuration information obtained during the historical use of the target application;
[0187] The locally stored title bar configuration information is determined as the title bar configuration information.
[0188] In one optional implementation, the first acquisition module 1001 is specifically used for:
[0189] Read the historical title bar configuration information from the preset storage space;
[0190] In response to the historical title bar configuration information being available, the historical title bar configuration information is determined as the title bar configuration information;
[0191] In response to the historical title bar configuration information being unavailable, obtain the fallback title bar configuration information; and determine the fallback title bar configuration information as the title bar configuration information.
[0192] In an optional implementation, before determining the locally stored title bar configuration information as the title bar configuration information, the device further includes:
[0193] The second determining module is used to determine whether the title bar configuration information returned by the server has been received;
[0194] The third determining module is used to determine the locally stored title bar configuration information as the title bar configuration information in response to the absence of the title bar configuration information returned by the server.
[0195] In one optional embodiment, the apparatus further includes:
[0196] The first display module is used to display loading prompt information at the position of the title bar and the position of the page content on the target page before successfully obtaining the title bar configuration information and the page content; the loading prompt information is used to indicate that the title bar configuration information and the page content have not been successfully loaded.
[0197] In one optional embodiment, the apparatus further includes:
[0198] The monitoring module is used to monitor the title bar configuration information and the acquisition status of the page content;
[0199] The hidden module is used to respond to the successful acquisition of the title bar configuration information by hiding the loading prompt information corresponding to the title bar position, and rendering the title bar of the target page based on the title bar configuration information.
[0200] The first determining module 1002 is specifically used for:
[0201] In response to the successful acquisition of the title bar configuration information, the loading prompt information corresponding to the position of the page content is hidden, and it is determined whether the first screen display page of the target application is a subpage corresponding to the target title.
[0202] In one optional embodiment, the apparatus further includes:
[0203] The second display module is used to display preset functional controls in the first area of the target page before successfully obtaining the title bar configuration information and the page content;
[0204] And / or, after successfully obtaining the title bar configuration information and the page content, display a search bar in the second area of the target page.
[0205] In one optional implementation, a search bar is displayed on the target page; in the first display state of the target page, the search bar, the title bar, and the subpage container for carrying the page content are arranged sequentially from the first end to the second end of the target page.
[0206] After rendering and displaying the target page, the device further includes:
[0207] A first control module is configured to control the target page to change from a first display state to a second display state in response to a sliding operation in a first direction from the second end to the first end satisfying a preset condition; and in the second display state, the title bar and the subpage container are arranged sequentially in the direction from the first end to the second end, and the display position of the title bar in the second display state is the same as the display position of the search bar in the first display state; the display position of the subpage container in the second display state includes: the display position of the title bar in the first display state and the display position of the subpage container in the first display state.
[0208] In one optional embodiment, the apparatus further includes:
[0209] The second control module is configured to, in response to a sliding operation in a first direction from the second end to the first end not meeting the preset condition, control the title bar to slide from its display position in the first display state to the display position of the search bar in the first display state, and as the sliding distance of the sliding operation gradually increases, control the title bar to gradually cover the search bar until the sliding operation meets the preset condition and the title bar completely covers the search bar; and
[0210] The subpage container is controlled to slide from its display position in the first display state to the display position of the title bar in the first display state. As the sliding distance of the sliding operation gradually increases, the subpage container is controlled to gradually cover the display position of the title bar in the first display state until the sliding operation meets the preset condition, and the subpage container covers the original position of the title bar and the original position of the subpage container.
[0211] In one optional implementation, the title bar configuration information includes the page type of each subpage;
[0212] The device further includes:
[0213] The fourth determining module is used to determine the display height information of the subpage based on the position change information of the title bar in the target page and the height information of the target page when the page type includes a plain text Lynx page or a global wide area network web page, and the Lynx page and the web page cannot be scrolled up in a linked manner.
[0214] Alternatively, the display height information of the subpage can be determined based on the height information of the target page and the preset bottom reserved height information in the subpage;
[0215] The third display module is used to display the page content of the subpage based on the display height information of the subpage.
[0216] In an optional implementation, when the page type includes a global wide area network web page, the apparatus further includes:
[0217] The second acquisition module is used to acquire the visibility state of the web page during the process of switching from a non-web page to a web page;
[0218] The enabling module is used to enable the hardware acceleration mechanism when the visible state indicates that the web page is visible, and to obtain the page content of the web page using the target hardware corresponding to the hardware acceleration mechanism.
[0219] The shutdown module is used to disable the hardware acceleration mechanism when the visibility state indicates that the web page is not visible.
[0220] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0221] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 11 The diagram shows the structure of a computer device 1100 provided in this embodiment of the present disclosure, including a processor 1101, a memory 1102, and a bus 1103. The memory 1102 stores execution instructions and includes main memory 11021 and external memory 11022. The main memory 11021, also called internal memory, is used to temporarily store computational data in the processor 1101 and data exchanged with external memory 11022 such as a hard disk. The processor 1101 exchanges data with the external memory 11022 through the main memory 11021. When the computer device 1100 is running, the processor 1101 and the memory 1102 communicate through the bus 1103, causing the processor 1101 to execute the following instructions:
[0222] In response to the launch event of the target application, the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar are obtained respectively.
[0223] Determine whether the first screen of the target application is a subpage corresponding to the target title;
[0224] In response to the first screen display page being a subpage corresponding to the target title, the target page is rendered and displayed based on the obtained title bar configuration information and the subpage content.
[0225] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the page display method described in the above method embodiments. The storage medium can be either volatile or non-volatile computer-readable storage.
[0226] This disclosure also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the page display method in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0227] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0228] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0229] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0230] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0231] If the functionality is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0232] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A page display method, characterized in that, The method includes: In response to the launch event of the target application, the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar are obtained respectively. Determine whether the first screen of the target application is a subpage corresponding to the target title; In response to the first screen display page being a subpage corresponding to the target title, the target page is rendered and displayed based on the obtained title bar configuration information and the subpage content; The process of obtaining the title bar configuration information of the target page in the target application includes: Send a configuration information retrieval request to the server; In response to receiving the title bar configuration information returned by the server based on the configuration information acquisition request within a preset time, the title bar configuration information is used as the title bar configuration information of the target page; In response to not receiving the title bar configuration information returned by the server within the preset time, or determining that obtaining the title bar configuration information failed, the title bar configuration information stored locally is obtained; the title bar configuration information stored locally includes: fallback title bar configuration information, or historical title bar configuration information obtained during the historical use of the target application; The locally stored title bar configuration information is determined as the title bar configuration information of the target page.
2. The method according to claim 1, characterized in that, The method further includes: In response to the fact that the first screen display page is not a subpage corresponding to the target title, the page content corresponding to the first screen display page is loaded based on the link corresponding to the first screen display page.
3. The method according to claim 1, characterized in that, The step of obtaining the title bar configuration information stored locally includes: Read the historical title bar configuration information from the preset storage space; In response to the historical title bar configuration information being available, the historical title bar configuration information is determined as the title bar configuration information of the target page; In response to the historical title bar configuration information being unavailable, obtain the fallback title bar configuration information; and determine the fallback title bar configuration information as the title bar configuration information of the target page.
4. The method according to claim 1, characterized in that, Before determining the locally stored title bar configuration information as the title bar configuration information of the target page, the method further includes: Determine whether the title bar configuration information returned by the server has been received; In response to not receiving the title bar configuration information returned by the server, the locally stored title bar configuration information is determined as the title bar configuration information of the target page.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: displaying loading prompt information at the position of the title bar of the target page and the position of the subpage content before successfully obtaining the title bar configuration information and the subpage content; the loading prompt information is used to indicate that the title bar configuration information and the subpage content have not been successfully loaded.
6. The method according to claim 5, characterized in that, The method further includes: monitoring the title bar configuration information and the acquisition status of the subpage content; In response to the successful acquisition of the title bar configuration information, a loading prompt message is displayed hidden in the position of the title bar, and the title bar of the target page is rendered based on the title bar configuration information; Determining whether the first screen display page of the target application is a subpage corresponding to the target title includes: In response to the successful acquisition of the title bar configuration information, a loading prompt message is displayed hidden in the position of the subpage content, and it is determined whether the first screen display page of the target application is a subpage corresponding to the target title.
7. The method according to claim 6, characterized in that, The method further includes: displaying preset functional controls in the first area of the target page before successfully obtaining the title bar configuration information and the subpage content; And / or, after successfully obtaining the title bar configuration information and the subpage content, display the search bar in the second area of the target page.
8. The method according to any one of claims 1 to 4, characterized in that, A search bar is displayed on the target page; in the first display state of the target page, the search bar, the title bar, and the subpage container for carrying the subpage content are arranged sequentially from the first end to the second end of the target page. After rendering and displaying the target page, the method further includes: In response to a sliding operation in a first direction from the second end to the first end satisfying a preset condition, the target page is controlled to change from a first display state to a second display state; and in the second display state, the title bar and the subpage container are arranged sequentially in the direction from the first end to the second end, and the display position of the title bar in the second display state is the same as the display position of the search bar in the first display state; the display position of the subpage container in the second display state includes: the display position of the title bar in the first display state and the display position of the subpage container in the first display state.
9. The method according to claim 8, characterized in that, The method further includes: responding to a sliding operation in a first direction from the second end to the first end not satisfying the preset condition, controlling the title bar to slide from its display position in the first display state to the display position of the search bar in the first display state, and controlling the title bar to gradually cover the search bar as the sliding distance of the sliding operation gradually increases, until the sliding operation satisfies the preset condition, and the title bar completely covers the search bar; and The subpage container is controlled to slide from its display position in the first display state to the display position of the title bar in the first display state. As the sliding distance of the sliding operation gradually increases, the subpage container is controlled to gradually cover the display position of the title bar in the first display state until the sliding operation meets the preset condition, and the subpage container covers the display position of the title bar in the first display state and the display position of the subpage container in the first display state.
10. The method according to claim 1, characterized in that, The title bar configuration information includes the page type of each subpage; The method further includes: When the page type includes a plain text Lynx page or a global wide area network web page, and the plain text Lynx page and the global wide area network web page cannot be scrolled up in a linked manner, the display height information of the subpage is determined based on the position change information of the title bar in the target page and the height information of the target page. Alternatively, the display height information of the subpage can be determined based on the height information of the target page and the preset bottom reserved height information in the subpage; Based on the display height information of the subpage, the page content of the subpage is displayed.
11. The method according to claim 10, characterized in that, When the page type includes a global wide area network web page, the method further includes: During the process of switching from a non-global WAN web page to a global WAN web page, the visibility status of the global WAN web page is obtained; When the visibility status indicates that the global wide area network web page is visible, the hardware acceleration mechanism is activated, and the page content of the global wide area network web page is obtained using the target hardware corresponding to the hardware acceleration mechanism. When the visibility status indicates that the global wide area network web page is not visible, the hardware acceleration mechanism is turned off.
12. A page display device, characterized in that, include: The first acquisition module is used to acquire the title bar configuration information of the target page in the target application and the subpage content corresponding to the target title in the title bar in response to the launch event of the target application. The first determining module is used to determine whether the first screen display page of the target application is a subpage corresponding to the target title; The rendering module is used to render and display the target page in response to the first screen display page being a subpage corresponding to the target title, based on the obtained title bar configuration information and the subpage content; Specifically, the first acquisition module is used for: Send a configuration information retrieval request to the server; In response to receiving the title bar configuration information returned by the server based on the configuration information acquisition request within a preset time, the title bar configuration information is used as the title bar configuration information of the target page; In response to not receiving the title bar configuration information returned by the server within the preset time, or determining that obtaining the title bar configuration information failed, the title bar configuration information stored locally is obtained; the title bar configuration information stored locally includes: fallback title bar configuration information, or historical title bar configuration information obtained during the historical use of the target application; The locally stored title bar configuration information is determined as the title bar configuration information of the target page.
13. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the machine-readable instructions, when executed by the processor, perform the steps of the page display method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the page display method as described in any one of claims 1 to 11.