Page display method, computer device and storage medium

CN117290035BActive Publication Date: 2026-09-18TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311204563.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2026-09-18
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

然而,在上述过程中,用户往往需要等待一段时间才能浏览到新的页面,存在页面展示效率较低的问题

Benefits of technology

[0047]The aforementioned page display method, computer device, storage medium, and computer program product allow the terminal to detect triggering operations applied to the first page to trigger the display of a new page. Upon detecting the start of the triggering operation, the terminal can determine the second page to be displayed based on the page control targeted by the triggering operation, request rendering resources for the page elements of the second page from the resource server, and concurrently execute initialization processing for the second page. After the initialization processing is completed and the rendering resources returned by the resource server are obtained, the initialized second page can be rendered based on the rendering resources to obtain the rendered second page, which is then displayed. In this embodiment, by determining the second page to be displayed based on the page control targeted by the triggering operation and requesting rendering resources from the resource server upon detecting the start of the triggering operation, and simultaneously executing the initialization processing for the second page concurrently, rendering resources can be obtained simultaneously during page initialization, improving page rendering efficiency. Furthermore, by requesting the corresponding rendering resources upon detecting the start of the triggering operation, the download of rendering resources can be triggered accordingly after the second page to be viewed is determined, further advancing the time for the terminal to request rendering resources, reducing the waiting time for obtaining rendering resources, and effectively improving page display efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117290035B_ABST
    Figure CN117290035B_ABST
Patent Text Reader

Abstract

The application relates to a page display method, a computer device and a storage medium, and can improve page display efficiency. The method comprises the following steps: detecting a trigger operation for triggering new page display acting on a first page; when it is detected that the trigger operation starts, determining a second page to be displayed according to a page control to which the trigger operation is directed, requesting a resource server to acquire rendering resources of page elements of the second page, and concurrently executing initialization processing on the second page; when the initialization processing is completed and the rendering resources returned by the resource server are acquired, rendering the initialized second page according to the rendering resources, obtaining a rendered second page, and displaying the second page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a page display method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, terminal applications are becoming increasingly popular, and users can browse a variety of information through terminal applications.

[0003] In related technologies, when a user needs to update or switch pages in a terminal application, the application sequentially performs page initialization, page resource download, and page rendering. However, during this process, users often have to wait for a period of time to view the new page, resulting in low page display efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a page display method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve page display efficiency in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a page display method. The method includes:

[0006] Detect triggering operations applied to the first page that are used to display a new page;

[0007] When the trigger operation is detected to have started, the second page to be displayed is determined according to the page control targeted by the trigger operation, and the rendering resources of the page elements of the second page are requested from the resource server; and the initialization process of the second page is executed concurrently.

[0008] Once the initialization process is complete and the rendering resources returned by the resource server are obtained, the initialized second page is rendered according to the rendering resources to obtain the rendered second page, which is then displayed.

[0009] In one embodiment, the triggering operation includes a pressing operation;

[0010] The step of determining the second page to be displayed based on the page control targeted by the trigger operation when the trigger operation is detected includes:

[0011] When a press on the first page is detected, the press position corresponding to the press is determined;

[0012] The page control targeted by the pressing operation is determined based on the pressing position, and the second page to be displayed is determined based on the page control.

[0013] In one embodiment, determining the page control targeted by the press operation based on the press position includes:

[0014] Obtain the location of each clickable control on the first page;

[0015] The position coordinates corresponding to the pressing position are matched with the area where each clickable control is located, and the page control targeted by the pressing operation is obtained based on the matching result.

[0016] In one embodiment, the step of determining the second page to be displayed based on the page control targeted by the triggering operation, requesting rendering resources for the page elements of the second page from the resource server, and concurrently performing initialization processing for the second page includes:

[0017] The first thread determines the second page to be displayed based on the page control targeted by the triggering operation, requests rendering resources of the page elements of the second page from the resource server, and generates a corresponding resource request record; and the second thread concurrently executes the initialization process of the second page.

[0018] The method further includes:

[0019] After the initialization process is completed, the second thread queries the rendering resources based on the resource request record provided by the first thread.

[0020] In one embodiment, the initialization process for the second page includes:

[0021] The second thread obtains the second page creation parameters corresponding to the second page; the page creation parameters include page initialization parameters and the resource request record generated by the first thread;

[0022] The second page is initialized according to the page initialization parameters in the second page creation parameters;

[0023] After the initialization process is completed, the second thread queries the rendering resources based on the resource request record provided by the first thread, including:

[0024] After the initialization process is completed, the rendering resource is queried based on the resource request record in the second page creation parameters.

[0025] In one embodiment, after requesting rendering resources for the page elements of the second page from the resource server, the method further includes:

[0026] If the first thread receives the rendering resource returned by the resource server, it associates the rendering resource with the resource request record and stores it in the storage space shared with the second thread.

[0027] The step of the second thread querying the rendering resource based on the resource request record provided by the first thread includes:

[0028] The second thread queries the storage space for the rendering resource associated with the resource request record.

[0029] In one embodiment, the page controls of the first page include clickable controls that are pre-associated with control attribute information, the control attribute information including a preset page that is displayed when the clickable control is triggered;

[0030] The step of determining the second page to be displayed based on the page control targeted by the triggering operation includes:

[0031] When the triggering operation is applied to the clickable control, the second page to be displayed is determined based on the control attribute information associated with the clickable control.

[0032] In one embodiment, determining the second page to be displayed based on the control attribute information associated with the clickable control includes:

[0033] Read the control code corresponding to the clickable control;

[0034] Based on the control attribute information recorded in the control code, the second page to be displayed is determined.

[0035] Secondly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0036] Detect triggering operations applied to the first page that are used to display a new page;

[0037] When the trigger operation is detected to have started, the second page to be displayed is determined according to the page control targeted by the trigger operation, and the rendering resources of the page elements of the second page are requested from the resource server; and the initialization process of the second page is executed concurrently.

[0038] Once the initialization process is complete and the rendering resources returned by the resource server are obtained, the initialized second page is rendered according to the rendering resources to obtain the rendered second page, which is then displayed.

[0039] Thirdly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0040] Detect triggering operations applied to the first page that are used to display a new page;

[0041] When the trigger operation is detected to have started, the second page to be displayed is determined according to the page control targeted by the trigger operation, and the rendering resources of the page elements of the second page are requested from the resource server; and the initialization process of the second page is executed concurrently.

[0042] Once the initialization process is complete and the rendering resources returned by the resource server are obtained, the initialized second page is rendered according to the rendering resources to obtain the rendered second page, which is then displayed.

[0043] Fourthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0044] Detect triggering operations applied to the first page that are used to display a new page;

[0045] When the trigger operation is detected to have started, the second page to be displayed is determined according to the page control targeted by the trigger operation, and the rendering resources of the page elements of the second page are requested from the resource server; and the initialization process of the second page is executed concurrently.

[0046] Once the initialization process is complete and the rendering resources returned by the resource server are obtained, the initialized second page is rendered according to the rendering resources to obtain the rendered second page, which is then displayed.

[0047] The aforementioned page display method, computer device, storage medium, and computer program product allow the terminal to detect triggering operations applied to the first page to trigger the display of a new page. Upon detecting the start of the triggering operation, the terminal can determine the second page to be displayed based on the page control targeted by the triggering operation, request rendering resources for the page elements of the second page from the resource server, and concurrently execute initialization processing for the second page. After the initialization processing is completed and the rendering resources returned by the resource server are obtained, the initialized second page can be rendered based on the rendering resources to obtain the rendered second page, which is then displayed. In this embodiment, by determining the second page to be displayed based on the page control targeted by the triggering operation and requesting rendering resources from the resource server upon detecting the start of the triggering operation, and simultaneously executing the initialization processing for the second page concurrently, rendering resources can be obtained simultaneously during page initialization, improving page rendering efficiency. Furthermore, by requesting the corresponding rendering resources upon detecting the start of the triggering operation, the download of rendering resources can be triggered accordingly after the second page to be viewed is determined, further advancing the time for the terminal to request rendering resources, reducing the waiting time for obtaining rendering resources, and effectively improving page display efficiency. Attached Figure Description

[0048] Figure 1 This is an application environment diagram of a page display method in one embodiment;

[0049] Figure 2 This is a flowchart illustrating a page display method in one embodiment;

[0050] Figure 3 This is a flowchart illustrating one step in determining a second page in one embodiment;

[0051] Figure 4 This is a flowchart illustrating one step in determining the page control targeted by a press operation in one embodiment;

[0052] Figure 5 This is a flowchart illustrating another page display method in one embodiment;

[0053] Figure 6 This is a flowchart illustrating another page display method in one embodiment;

[0054] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] The page display method provided in this application embodiment can be applied to, for example, Figure 1 The application environment shown may include a terminal and a resource server, with the terminal communicating with the resource server via a network.

[0057] In this application, the terminal can detect a trigger operation applied to the first page to trigger the display of a new page. When the trigger operation is detected, the terminal can determine the second page to be displayed based on the page control targeted by the trigger operation, request the rendering resources of the page elements of the second page from the resource server, and concurrently perform the initialization process of the second page. Then, after the initialization process is completed and the rendering resources returned by the resource server are obtained, the terminal can render the initialized second page based on the rendering resources to obtain the rendered second page and display it.

[0058] The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The resource server can be implemented using a standalone server or a server cluster composed of multiple servers. The resource server can have a corresponding data storage system that can store the data that the resource server needs to process. This data storage system can be integrated on the resource server or placed in the cloud or other network servers.

[0059] In one embodiment, such as Figure 2 As shown, a page display method is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:

[0060] S201, Detect the triggering operation applied to the first page to trigger the display of a new page.

[0061] In a specific implementation, the terminal can display a page. To facilitate differentiation from other subsequent pages, the page currently displayed on the terminal interface is referred to as the first page in this application. In one example, the first page may be a page displayed to the user by an application deployed on the terminal.

[0062] During the display of the first page, the terminal can detect whether there is a triggering operation on the currently displayed first page that triggers the display of a new page. The new page being triggered is a page different from the first page; it can be a completely different page or a page with some content identical to the first page.

[0063] In some embodiments, the triggering operation can be triggered by the user's body, such as a click, drag, swipe, or gesture performed by the user's finger, or by a physical tool, such as a mouse or stylus.

[0064] S202, when the start of the trigger operation is detected, the second page to be displayed is determined according to the page control targeted by the trigger operation, and the rendering resources of the page elements of the second page are requested from the resource server; and the initialization process of the page element frame of the second page is concurrently executed.

[0065] Page elements can be visual objects that constitute the content of a page. Page elements can also be called UI (User Interface) objects. For example, page elements can include specific controls, images, etc. on the page.

[0066] Page initialization can refer to the initialization of fixed content on the page to be displayed. For example, during the initialization process, page element frame parameters can be obtained, and corresponding page element objects can be created by parsing the page element frame parameters. For example, page element frame parameters can include at least one of the following information: layout method of page elements, size of page elements, and position of page elements.

[0067] Rendering resources are used to integrate with the initialized page, rendering specific page elements. In one example, rendering resources may include corresponding image content. Taking the "Discover" page in a music application as an example, this page can display the user's account avatar and a playlist recommendation module. The positions of the account avatar and playlist recommendation module on the page are relatively fixed, but because different users may use different account avatars, and their followed songs or artists may differ, the image of the account avatar and the cover of the playlist recommendation module on the "Discover" page can change accordingly.

[0068] In a specific implementation, the first page may include at least one control, namely a page control. Each page control may have a corresponding control function, such as a page jump function that can be used to trigger a jump to a preset page, or a page refresh function that can be used to trigger an update of the current page content.

[0069] In related technologies, when a user needs to update or switch the current page, a trigger operation can be performed on the target control on the current page. After the trigger operation is completed, the terminal can sequentially execute multiple steps, including initializing the new page to be displayed, downloading rendering resources adapted to the initialized page after initialization, rendering the downloaded rendering resources to the corresponding position on the new page after downloading, and then displaying them. In this process, there are time-consuming steps; for example, loading rendering resources often takes a long time, resulting in low page display efficiency.

[0070] In this embodiment, when a trigger operation is detected, the page control targeted by the trigger operation can be determined accordingly. Based on this page control, a new page to be displayed is determined. For ease of distinction, this new page to be displayed is referred to as the second page. After determining the second page, the terminal can send a resource acquisition request to the resource server to obtain the rendering resources corresponding to the page elements in the second page.

[0071] Furthermore, since rendering resources for page elements are not used during page initialization, in this embodiment, the initialization process for the second page can be performed concurrently while requesting rendering resources from the resource server. This concurrent initialization process for the second page can involve parsing and initializing the page element frame parameters according to a preset initialization process. For example, when a trigger operation is detected to have started, monitoring of the trigger operation can continue; when the trigger operation ends, the page element frame parameters can be read and initialized.

[0072] It is understood that this application can shorten the waiting time spent waiting to obtain rendering resources during serial execution by concurrently executing the initialization process of the second page when requesting rendering resources. Furthermore, by determining the second page based on the page control targeted by the trigger operation when the trigger operation is detected, and then requesting the corresponding rendering resources from the resource server, the download of rendering resources can be triggered accordingly after the second page that the user intends to browse is determined. This further advances the time when the terminal requests to obtain rendering resources, reduces the waiting time for obtaining rendering resources, shortens the page opening time (i.e., the time consumed from when the user clicks on a screen area to when the content of the page is fully displayed), and optimizes the user experience.

[0073] S203: After the initialization process is completed and the rendering resources returned by the resource server are obtained, the second page after initialization is rendered according to the rendering resources to obtain the rendered second page and display it.

[0074] In this step, if the initialization process is completed and the rendering resources returned by the resource server are obtained, the obtained rendering resources can be used to render the initialized second page, so that the rendering resources can be displayed on the corresponding page element objects in the second page, and a second page containing multiple specific page elements can be rendered, and then the second page can be displayed.

[0075] In this embodiment, the terminal can detect a trigger operation applied to the first page to trigger the display of a new page. When the trigger operation is detected, the terminal can determine the second page to be displayed based on the page control targeted by the trigger operation, request rendering resources for the page elements of the second page from the resource server, and concurrently perform initialization processing on the second page. After the initialization processing is completed and the rendering resources returned by the resource server are obtained, the initialized second page can be rendered based on the rendering resources to obtain the rendered second page, which is then displayed. In this embodiment, by determining the second page to be displayed based on the page control targeted by the trigger operation and requesting rendering resources from the resource server when the trigger operation is detected, and simultaneously performing initialization processing on the second page concurrently, rendering resources can be obtained simultaneously during page initialization, improving page rendering efficiency. Furthermore, by requesting the corresponding rendering resources when the trigger operation is detected, the download of rendering resources can be triggered accordingly after the second page to be viewed is determined, further advancing the time when the terminal requests rendering resources, reducing the waiting time for obtaining rendering resources, and effectively improving page display efficiency.

[0076] In one embodiment, the triggering action for displaying a new page may include a press action; such as Figure 3 The step S202, which determines the second page to be displayed based on the page control targeted by the trigger operation when the trigger operation is detected to have started, may include the following steps:

[0077] S301, when the press on the first page is detected, the corresponding press position is determined.

[0078] In practical applications, the terminal can detect user presses triggered on the first page. In one example, the terminal can use a pressure sensor to detect whether a press has occurred on the first page. When the terminal detects that the user has started pressing the first page, it can determine the press location.

[0079] S302, determine the page control targeted by the pressing operation based on the pressing position, and determine the second page to be displayed based on the page control.

[0080] When the terminal obtains the press position corresponding to the user's press operation, it can determine the page control to which the press operation is applied. Specifically, the page control can be associated with a corresponding event, which can also be called a control event. In some cases, the page control mainly responds after the user's operation is completed. For example, for a click event, the event associated with the page control is triggered after the user presses and releases the control (or presses and releases the mouse button on the control).

[0081] This method requires the page controls to respond after the user's operation is completed. If the terminal then triggers the acquisition of rendering resources based on the response provided by the page controls, it will cause a certain delay and increase the waiting time for acquiring rendering resources.

[0082] Based on this, when the first page is detected to be pressed, this application obtains the corresponding pressing position and determines the page control triggered by the user by combining the pressing position, and determines the second page to be displayed based on the page control. Without waiting for the triggering operation to be completely finished, the terminal can know in advance the second page that the user is going to browse and request the corresponding rendering resources accordingly. There is no need to wait for the second page to be created in the background before obtaining the resources, which effectively improves the response efficiency of triggering and obtaining rendering resources.

[0083] In one embodiment, step S302, which determines the page control targeted by the press operation based on the press location, may include the following steps:

[0084] Obtain the location of each clickable control on the first page; match the position coordinates corresponding to the press position with the location of each clickable control, and obtain the page control targeted by the press operation based on the matching results.

[0085] In a specific implementation, the terminal can pre-obtain the location of each clickable control on the first page. For example, the area covered by the clickable control on the first page or the response range of the control in response to the triggered operation can be used as the location of the clickable control.

[0086] After obtaining the press position, the corresponding location can be matched with the area of ​​each clickable control. Based on the matching result, the page control targeted by the press operation can be determined. For example, Figure 4 As shown, for each currently matched clickable control, we can sequentially determine whether its position coordinates are within the area where the current clickable control is located. If so, the current clickable control can be identified as the page control targeted by the press operation.

[0087] In this embodiment, by matching the position coordinates corresponding to the pressing position with the area where each clickable control is located, the page control targeted by the pressing operation can be quickly determined at the beginning of the pressing operation, without waiting for the pressing operation to end and for the corresponding page control to provide response information.

[0088] In one embodiment, S202 determines the second page to be displayed based on the page control targeted by the triggering operation, requests rendering resources for the page elements of the second page from the resource server, and concurrently performs initialization processing on the second page, which may include the following steps:

[0089] The first thread determines the second page to be displayed based on the page control targeted by the triggering operation, requests rendering resources for the page elements of the second page from the resource server, and generates the corresponding resource request record; and the second thread concurrently executes the initialization process for the second page.

[0090] In practice, different threads can be used to acquire rendering resources and initialize the page element framework. In this embodiment, the first thread can determine the second page to be displayed, send a rendering resource acquisition request to the resource server to acquire the rendering resources of the page elements of the second page, and the second thread can concurrently execute the initialization process of the second page.

[0091] Furthermore, the first thread generates a corresponding resource request record. This record indicates that the first thread has sent a resource acquisition request to the resource server, and can subsequently wait for the resource server to respond with the rendering resources returned by the request. In some optional embodiments, the first thread can obtain the identifier and current timestamp of the second page to be displayed, and then combine the identifier of the second page, the current timestamp, and a random array into a unique identifier ID, which serves as the resource request record.

[0092] Accordingly, the method further includes the following steps:

[0093] After initialization is complete, the second thread queries rendering resources based on the resource request record provided by the first thread.

[0094] In practical applications, the first thread and the second thread are independent of each other. To help the second thread determine whether the rendering resources have been obtained, the second thread can obtain the resource request record generated by the first thread. Then, after the initialization process is completed, the second thread can query the resource request record provided by the first thread and determine whether it is possible to start rendering the page element framework using the rendering resources based on the query results.

[0095] In this embodiment, on the one hand, two threads can be used to independently acquire rendering resources and initialize page element frames; on the other hand, the first thread generates resource request records corresponding to rendering resources and provides these records to the second thread, enabling the second thread to promptly determine the acquisition status of rendering resources after completing page initialization and to perform subsequent page rendering, thereby improving the continuity of page display and increasing page display efficiency.

[0096] In one embodiment, the initialization process of the page element frame of the second page may include the following steps:

[0097] The second thread retrieves the creation parameters for the second page; these parameters include page initialization parameters and resource request records generated by the first thread; and the second page is initialized based on the page initialization parameters.

[0098] Specifically, during the initialization process of the second page through the second thread, the second thread can first assemble the second page creation parameters corresponding to the second page. The page initialization parameters in the second page creation parameters can be pre-recorded in the program code, or they can be stored on the server.

[0099] In some optional embodiments, page initialization parameters may include basic page parameters, which may be recorded in the program code, such as the layout, position, and size of page elements; in addition, page initialization parameters may also include fill information, which may be content entered by the user. For example, the user may enter the corresponding account name or search content on the first page (i.e., fill information), and the page content of the second page to be displayed may be adjusted accordingly based on the fill information entered by the user.

[0100] Furthermore, the second page creation parameters also include the resource request record generated by the first thread. This means the second thread can pre-bind the page initialization parameters and the corresponding resource request record to generate the corresponding second page creation parameters. Then, based on the obtained second page creation parameters, the terminal can first initialize the second page according to the page initialization parameters within the second page creation parameters.

[0101] In some optional embodiments, since the first thread and the second thread are independent of each other, in order to avoid the situation where the first thread has not yet obtained the corresponding resource request record when the second thread generates the second page creation parameters, the corresponding resource request record can be generated in advance when the first thread is created or instructed to obtain rendering resources. That is, the resource request record can be generated before the first thread requests to obtain rendering resources. Of course, it can also be generated after the first thread issues the resource acquisition request, to ensure that the resource request record has the corresponding resource request event.

[0102] Accordingly, after the initialization process is complete, the second thread queries the rendering resources based on the resource request record provided by the first thread, which may include the following steps:

[0103] After initialization is complete, the rendering resources are queried based on the resource request records in the creation parameters of the second page.

[0104] After the second thread completes the initialization of the second page, it can read the creation parameters of the second page again, obtain the resource request records in the creation parameters, and query the rendering resources based on the resource request records.

[0105] In this embodiment, by associating and storing the page initialization parameters of the second page with the resource request records generated by the first thread in the second page creation parameters, the corresponding resource request records can be quickly found for rendering resource query after the initialization process of the second page is completed. Even if the user triggers the display of multiple pages sequentially or simultaneously on the terminal, the corresponding resource request records can be efficiently obtained according to the page creation parameters of each page through the method provided in this embodiment.

[0106] In one embodiment, after requesting rendering resources for the page elements of the second page from the resource server, the method further includes:

[0107] If the first thread receives the rendering resources returned by the resource server, it associates the rendering resources with the resource request record and stores them in the storage space shared with the second thread.

[0108] In practical applications, once the first thread determines the second page to be displayed, it can send a resource retrieval request to the resource server in advance, without having to wait until the page initialization is complete before loading and rendering resources. If the first thread receives the rendering resources returned by the server, it can associate the resource request record with the received rendering resources, and then store the rendering resources associated with the resource request record in a shared storage space with the second thread. In one example, this storage space can be a globally shared storage space.

[0109] The process of querying rendering resources by the second thread based on the resource request record provided by the first thread includes:

[0110] The second thread queries the storage space for the rendering resources associated with the resource request record.

[0111] After the first thread saves the rendering resources in the shared storage space, the second thread can directly query and retrieve them from that storage space based on the existing resource request records.

[0112] To enable those skilled in the art to better understand the above steps, the following will be explained... Figure 5 The embodiments of this application are illustrated by way of example.

[0113] Specifically, when the terminal detects that the user presses and releases the screen, the second thread can assemble the page initialization parameters and fill in the information, and populate the resource request record provided by the first thread to obtain the second page creation parameters. Then, the second thread can create a new page in the background, and create the page UI and complete the initialization according to the page initialization parameters in the second page creation parameters.

[0114] Then, the second thread can read the second page creation parameters again and determine whether it carries a resource request record. If not, it can load the rendering resource from the network. If so, it can determine whether the rendering resource associated with the record is saved in the global area (i.e., the storage space shared by the first thread and the second thread).

[0115] If it is determined that the rendering resource associated with the record is not stored in the global area, the second thread can query at preset time intervals until the rendering resource is found or the preset time threshold is exceeded (e.g., query timeout). If it is determined that the rendering resource associated with the record is stored in the global area, the rendering resource can be loaded from the global area, and after displaying the rendering resource on the page UI, the page can be shown to the user.

[0116] In this embodiment, the first thread saves the acquired rendering resources to a shared storage space with the second thread, so that the second thread can promptly query and obtain the corresponding rendering resources after the page initialization is completed.

[0117] In one embodiment, the page controls of the first page include clickable controls that are pre-associated with control attribute information, and the control attribute information includes a preset page that is displayed when the clickable control is triggered.

[0118] Step S202 determines the second page to be displayed based on the page control targeted by the triggering operation, and may include:

[0119] When the trigger operation targets a clickable control, the second page to be displayed is determined based on the control property information associated with the clickable control.

[0120] In practical applications, each clickable control on the first page can be pre-associated with control attribute information. When it is determined that the trigger operation is for a clickable control, the terminal can read the control attribute information associated with that clickable control, determine the preset page to be displayed when the current clickable control is triggered based on the control attribute information, and use the preset page as the second page to be displayed.

[0121] In this embodiment, when the terminal queries the control attribute information that is pre-associated with the clickable control, it can determine the second page that the user intends to open at the beginning of the trigger operation, without having to obtain the page information after the trigger operation is completed or the background page begins page initialization, thus providing a basis for making corresponding rendering resource requests for the second page in advance.

[0122] In one embodiment, determining the second page to be displayed based on the control attribute information associated with the clickable control may include the following steps:

[0123] Read the control code corresponding to the clickable control; determine the second page to be displayed based on the control attribute information recorded in the control code.

[0124] Specifically, when developing the code for clickable controls, developers can write corresponding page information into the control code, such as the page identifier corresponding to the page displayed when the clickable control is triggered. Then, if it is determined that the trigger operation targets a clickable control, the terminal can read the running control code and determine the second page to be displayed based on the control attribute information recorded in the code.

[0125] In this embodiment, by reading the control attribute information recorded in the control code, the terminal can quickly determine the second page corresponding to the clickable control.

[0126] To enable those skilled in the art to better understand the above steps, the following is combined with... Figure 6 The examples are provided for illustration, but it should be understood that this application is not limited thereto.

[0127] like Figure 6 As shown, when the terminal detects that the user presses the screen, the first thread can determine the second page to be displayed in advance based on the press position and the location of each clickable control in the currently displayed first page. Then, it can send a resource acquisition request for the second page to the resource server. After receiving the returned rendering resources, it can store the rendering resources in the global area.

[0128] On the other hand, the second thread can generate second page creation parameters after detecting that the user has released the screen, then create a new page in the background, create the page UI according to the second page creation parameters and complete the initialization, and then render the rendering resources onto the initialized page and display the rendered page to the user.

[0129] The page load time can be calculated as follows when the new page is displayed in the manner described above:

[0130] Page loading time = max((t1+t2+t3+t4),(t10+t11+t5))+t6.

[0131] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0132] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a page display method. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0133] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0134] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0135] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0136] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0138] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0139] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0140] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A page display method, characterized in that, The method includes: Detect triggering operations applied to the first page that are used to display a new page; When the trigger operation is detected to have started, the first thread determines the second page to be displayed based on the page control targeted by the trigger operation, requests rendering resources for the page elements of the second page from the resource server, generates a corresponding resource request record, and the second thread concurrently executes the initialization process for the second page; the initialization process includes initializing the fixed content in the second page according to the page initialization parameters recorded in the program code; After the initialization process is completed, the second thread queries the rendering resource according to the resource request record provided by the first thread. If the second thread determines that it has obtained the rendering resource returned by the resource server, it renders the initialized second page according to the rendering resource to obtain the rendered second page and displays it.

2. The method according to claim 1, characterized in that, The triggering operation includes a pressing operation; The step of determining the second page to be displayed based on the page control targeted by the trigger operation when the trigger operation is detected includes: When a press on the first page is detected, the press position corresponding to the press is determined; The page control targeted by the pressing operation is determined based on the pressing position, and the second page to be displayed is determined based on the page control.

3. The method according to claim 2, characterized in that, The step of determining the page control targeted by the press operation based on the press position includes: Obtain the location of each clickable control on the first page; The position coordinates corresponding to the pressing position are matched with the area where each clickable control is located, and the page control targeted by the pressing operation is obtained based on the matching result.

4. The method according to claim 1, characterized in that, The initialization process for the second page includes: The second thread obtains the second page creation parameters corresponding to the second page; the page creation parameters include page initialization parameters and the resource request record generated by the first thread; The second page is initialized according to the page initialization parameters in the second page creation parameters; After the initialization process is completed, the second thread queries the rendering resources based on the resource request record provided by the first thread, including: After the initialization process is completed, the rendering resource is queried based on the resource request record in the second page creation parameters.

5. The method according to claim 1, characterized in that, After requesting the rendering resources of the page elements of the second page from the resource server, the process further includes: If the first thread receives the rendering resource returned by the resource server, it associates the rendering resource with the resource request record and stores it in the storage space shared with the second thread. The step of the second thread querying the rendering resource based on the resource request record provided by the first thread includes: The second thread queries the storage space for the rendering resource associated with the resource request record.

6. The method according to any one of claims 1 to 5, characterized in that, The page controls of the first page include clickable controls that are pre-associated with control attribute information, and the control attribute information includes a preset page that is displayed when the clickable control is triggered; The step of determining the second page to be displayed based on the page control targeted by the triggering operation includes: When the triggering operation is applied to the clickable control, the second page to be displayed is determined based on the control attribute information associated with the clickable control.

7. The method according to claim 6, characterized in that, The step of determining the second page to be displayed based on the control attribute information associated with the clickable control includes: Read the control code corresponding to the clickable control; Based on the control attribute information recorded in the control code, the second page to be displayed is determined.

8. The method according to claim 1, characterized in that, The triggering operation includes one or more of the following: click operation, drag operation, swipe operation, and gesture operation.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for requesting webpage data

    CN103455353A