Page loading method, page loading device, electronic equipment and storage medium

By preloading the replacement page and loading the replacement page when a load request is received, the problem of slow page loading in electronic devices is solved, achieving faster page loading speed and improved user experience.

CN119440662APending Publication Date: 2025-02-14SHENZHEN FALCON NETWORK MEDIA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411515438.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Pages load slowly in electronic devices, affecting user experience and page exposure.

Method used

By determining the target page, the replacement page is preloaded (which displays the same content as the target page), and when a request to load the target page is received, the replacement page is loaded to improve the page loading speed.

Benefits of technology

This method can significantly shorten page loading time, improve user experience, and improve page loading speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440662A_ABST
    Figure CN119440662A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a page loading method, a page loading device, electronic equipment and a storage medium. The page loading method comprises the steps of determining a target page displayed after a current page; a replacement page is preloaded, and the display content of the replacement page is the same as that of the target page; and loading the replacement page under the condition that a request for loading the target page is received. According to the method, the page loading speed can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a page loading method, a page loading device, an electronic device and a storage medium. Background Art

[0002] When using electronic devices, we often face the problem of slow page loading, which will affect the user experience and the page exposure rate. Summary of the invention

[0003] The embodiments of the present application provide a page loading method, a page loading device, an electronic device and a storage medium, which can improve the page loading speed.

[0004] In a first aspect, an embodiment of the present application provides a page loading method, comprising: determining a target page to be displayed after a current page; preloading a replacement page, wherein the replacement page has the same display content as the target page; and loading the replacement page upon receiving a request to load the target page.

[0005] In some implementations, the preloading of the replacement page includes: creating an empty page; obtaining target information, wherein the target information is related to the target page; and initializing the empty page using the target information to obtain the replacement page.

[0006] In some implementations, the target information includes view information corresponding to the target page.

[0007] In some implementations, loading the replacement page includes: starting the target page; and during the starting process of the target page, replacing the target page with the replacement page.

[0008] In some implementations, replacing the target page with the replacement page during the startup process of the target page includes: intercepting when the stub component creates the target page; and completing the startup process by replacing the target page with the replacement page.

[0009] In some implementations, intercepting when the instrumentation component creates the target page includes: intercepting when the mInstrumentation.newActivity method creates the Activity component corresponding to the target page; and setting the baseContext of the Activity corresponding to the target page to null.

[0010] In some implementations, determining a target page that needs to be displayed after the current page includes: acquiring an object indicated in the current page; and when the time for which the object is indicated exceeds a preset value, determining a target page associated with the object.

[0011] In a second aspect, an embodiment of the present application provides a page loading device, the device comprising:

[0012] A determination module, used to determine a target page to be displayed after the current page;

[0013] a preloading module, configured to preload a replacement page, wherein the replacement page has the same display content as the target page; and

[0014] The loading module is used to load the replacement page when a request to load the target page is received.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the operations in the method described in the first aspect when executing the computer program.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the operations in the method described in the first aspect are implemented.

[0017] In summary, the embodiments of the present application disclose a page loading method, a page loading device, an electronic device, and a storage medium. The page loading method includes: determining a target page to be displayed after a current page; preloading a replacement page, wherein the replacement page has the same display content as the target page; and loading the replacement page when a request to load the target page is received. The method can improve the page loading speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A schematic diagram showing a flow chart of a page loading method provided by some embodiments of the present application;

[0020] Figure 2A schematic diagram of a process of preloading a replacement page provided in some embodiments of the present application is shown;

[0021] Figure 3 A schematic diagram of a process of loading a replacement page provided in some embodiments of the present application is shown;

[0022] Figure 4 An example diagram of a page loading process provided by some embodiments of the present application is shown;

[0023] Figure 5 A schematic diagram showing the structure of a page loading device provided in some embodiments of the present application is shown;

[0024] Figure 6 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application is shown. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] Figure 1 A schematic flow chart of a page loading method provided by some embodiments of the present application is shown. Although a logical order is shown in the flow chart, in some cases, the operations shown or described may be performed in an order different from that shown in the accompanying drawings. The flow chart of the page loading method may be as follows:

[0027] S101: Determine a target page to be displayed after the current page.

[0028] In some embodiments, determining a target page to be displayed after the current page may include: acquiring an object indicated in the current page; and when the time for which the object is indicated exceeds a preset value, determining a target page associated with the object.

[0029] The indicated object in the current page may be the content displayed in the current page, for example, a poster, banner, video or similar content displayed in the current page. The indicated object in the current page may also be the focus position in the current page, where the focus position is the selected control in the current page, for example, a button, image, banner or similar content selected in the current page.

[0030] When the time an object is indicated exceeds a preset value, it indicates that the target page associated with the object is more likely to be triggered. For example, if the display time of the poster in the current page exceeds the preset value and it is not closed or swiped away, it indicates that the poster is more likely to be clicked next. The target page associated with the poster can be the purchase page of the product displayed on the poster, the drama page, etc. For example, the focus position of the current page is a recommended banner of a TV series. When the residence time of the recommended banner after being selected exceeds the preset value, it indicates that the banner is more likely to be clicked next. The target page associated with the banner can be the play page of the TV series displayed on the banner.

[0031] The page loading method provided in this embodiment can determine the target page associated with the object according to the duration for which the object is indicated in the current page.

[0032] In other embodiments, the target page may also be determined in other ways. For example, the target page may be predefined for the current page; or the target page may be a page recorded and stored according to the user's historical habits.

[0033] S102: preload a replacement page, wherein the display content of the replacement page is the same as that of the target page.

[0034] Since the target page is a page that may be triggered after the current page, the target page may not be triggered when the target page is determined. If the content of the target page is loaded only after the loading request for the target page is actually received, the process takes a long time and will result in a poor user experience.

[0035] In order to improve the user experience, the replacement page is preloaded, and the display content of the replacement page is the same as the display content of the target page. The preloading of the replacement page may include obtaining resource data related to the display content of the target page.

[0036] The specific process of preloading the replacement page will be described in detail later.

[0037] S103: When a request to load the target page is received, a replacement page is loaded.

[0038] Wherein, the request for loading the target page may be a request for jumping from the current page to the target page. In some embodiments, the request may be a trigger request for an indicated object in the current page.

[0039] The page loading method provided in this embodiment can preload a replacement page in advance before receiving a request to load the target page, and the display content of the replacement page is the same as that of the target page. After receiving a request to load the target page, the replacement page is loaded to display the content of the target page. Therefore, the page loading method provided in this embodiment can shorten the time from receiving a request to load the target page to displaying the content of the target page.

[0040] In summary, the page loading method provided in some embodiments of the present application can determine a target page to be displayed after the current page; preload a replacement page, wherein the replacement page has the same display content as the target page; and load the replacement page when a request to load the target page is received. This method can improve the page loading speed.

[0041] Figure 2 A schematic diagram of a process of preloading a replacement page provided by some embodiments of the present application is shown. Although a logical order is shown in the flowchart, in some cases, the operations shown or described may be performed in an order different from that shown in the drawings. Operation S102 may include:

[0042] S201. Create an empty page.

[0043] S202: Acquire target information, wherein the target information is related to the target page.

[0044] The target information may include view information corresponding to the target page. The view information may be used to design and layout the display content of the target page. The view information may include information about display pictures, buttons, switches, progress bars, adjustment bars, or other components in the target page, may include animation effects, and may also include styles and themes.

[0045] The target information may also include window information, context information, and bound application information corresponding to the target page.

[0046] S203: Initialize the empty page using the target information to obtain a replacement page.

[0047] Since the target information includes information related to the display content of the target page, the replacement page obtained by initializing the blank page using the target information has the same display content as the target page.

[0048] Initialization of an empty page includes preloading target information. For pages that take a long time to load target information, preloading the target information in advance can save time in the page display process.

[0049] The page loading method provided in this embodiment creates an empty page, obtains the target information corresponding to the target page, and uses the target information to initialize the empty page to complete the preloading of the replacement page. This method can complete the time-consuming preloading of the target information during the preloading process of the replacement page, so that the page can be quickly displayed during the subsequent loading process of the replacement page.

[0050] Figure 3 A schematic diagram of a process of loading a replacement page provided by some embodiments of the present application is shown. Although a logical order is shown in the flowchart, in some cases, the operations shown or described may be performed in an order different from that shown in the drawings. Operation S103 may include:

[0051] S301, start the target page.

[0052] S302: During the startup of the target page, the target page is replaced with a replacement page.

[0053] The target page startup process may include the page management service responding to the target page startup request and creating the target page. In this process, the replacement page is used to replace the target page to complete the subsequent page display process.

[0054] In some embodiments, operation S302 may include:

[0055] (1) Intercept when the instrumentation component creates the target page.

[0056] Among them, the plug-in component can be used to monitor user interaction events, and its functions may include page creation, destruction, etc. In the conventional page display process, when the plug-in component completes the creation of the target page and loads the target information, the created page can be displayed to the user. In this embodiment, when the plug-in component creates the target page, it is intercepted to prevent its subsequent page display process such as loading the target information.

[0057] In some embodiments, intercepting when the instrumentation component creates the target page may include: intercepting when the mInstrumentation.newActivity method creates an activity component (Activity) corresponding to the target page; and setting the baseContext of the Activity corresponding to the target page to null.

[0058] Among them, mInstrumentation.newActivity is the function of creating an Activity by the instrumentation component in the Android system. When the system calls this function to create the Activity instance corresponding to the target page, the function call is intercepted through reflection technology, and at the same time, the baseContext of the target page is set to null, that is, the context information bound to the target page is released.

[0059] (2) The replacement page replaces the target page to complete the startup process.

[0060] After intercepting the mInstrumentation.newActivity function call through reflection technology, the display method of the replacement page is executed in the next page display process.

[0061] The page loading method provided in this embodiment intercepts the process of creating a target page by the plug-in component, and then uses a replacement page to replace the target page to complete the startup process. Thereafter, the life cycle of the replacement page is handed over to the system for management, thereby avoiding life cycle risk issues.

[0062] Figure 4 An example diagram of the page loading process provided by some embodiments of the present application is shown. The system's page management service can be responsible for the management of page threads, including the creation and termination of page threads. The preload detection module 401 can be used to monitor the current focus position and determine the target page. For example, if the focus falls on a poster for a long time in the current page, then the poster is more likely to be clicked next, and the target page is determined to be the page associated with the poster. The preloader can be responsible for monitoring the focus, and after determining the target page, a preload task can be issued.

[0063] The preloading execution module 402 can receive the preloading task issued by the preloading detection module 401 and specifically execute the preloading task. The preloading execution module 402 instantiates an empty page, that is, creates an empty page. Then, the baseContext context information of the application is bound, the target information related to the target application is obtained, and the replacement page is obtained. And the view information therein is preloaded according to the preloading task.

[0064] The interception module 403 can receive the interception request for the creation function instrumentation of the target page issued by the preload detection module 401, and perform the interception, and set the baseContext bound to the target page to null. In this process, the page thread is prevented from completing the target page to execute the mInstrumentation.newActivity method. In the subsequent execution page startup process, the preloaded replacement page output by the preload execution module 402 is received, and the page is displayed.

[0065] Figure 5 The schematic diagram of the structure of the page loading device provided by some embodiments of the present application is shown. The page loading device 500 may specifically include:

[0066] The determination module 501 may be used to determine a target page to be displayed after the current page.

[0067] The preloading module 502 may be used to preload a replacement page, wherein the display content of the replacement page is the same as that of the target page.

[0068] The loading module 503 may be used to load a replacement page when a request to load a target page is received.

[0069] The page loading device 500 provided in some embodiments of the present application may determine the target page displayed after the current page by the determination module 501. Then, the page loading device 500 may preload a replacement page by the preloading module 502, wherein the display content of the replacement page is the same as that of the target page. Then, the page loading device 500 may load the replacement page by the loading module 503 upon receiving a request to load the target page.

[0070] In some embodiments, the preloading module 502 may include a first creation unit, a first acquisition unit, and a first initialization unit. The first creation unit may be used to create an empty page. The first acquisition unit may be used to acquire target information, wherein the target information is related to the target page. The first initialization unit may be used to initialize the empty page using the target information to obtain a replacement page.

[0071] In some embodiments, the target information includes view information corresponding to the target page.

[0072] In some embodiments, the loading module 503 may include a first startup unit and a first replacement unit. The first startup unit may be used to start the target page. The first replacement unit may be used to replace the target page with a replacement page during the startup process of the target page.

[0073] In some embodiments, the first replacement unit may include a first interception subunit and a first replacement subunit. The first interception subunit may be used to intercept when the plugging component creates the target page. The first replacement subunit may be used to replace the target page to complete the startup process.

[0074] In some embodiments, the first interception subunit may be used to intercept when the mInstrumentation.newActivity method creates the Activity component corresponding to the target page; and to clear the baseContext corresponding to the Activity of the target page.

[0075] In some embodiments, the determination module 501 may include a second acquisition unit and a first preloading unit. The second acquisition unit may be used to acquire the indicated object in the current page. The first preloading unit may be used to preload a replacement page associated with the object when the object has been indicated for a time exceeding a preset value.

[0076] In addition, the present application also provides an electronic device, Figure 6 The following is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application, specifically:

[0077] The electronic device 600 may include one or more processors 601 of processing cores, one or more computer-readable storage media memories 602 and other components. Those skilled in the art will appreciate that Figure 6 The structure of the electronic device 600 shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0078] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device 600. By running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the electronic device 600 and processes data, thereby monitoring the electronic device 600 as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

[0079] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device 600, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0080] Specifically in this embodiment, the processor 601 in the electronic device 600 will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the applications stored in the memory 602, thereby implementing the operations in any page loading method provided in the embodiments of the present application.

[0081] The specific process of the electronic device 600 executing the page loading method can be referred to Figures 1 to 3 The description in , this application will not be repeated here.

[0082] Those skilled in the art will appreciate that all or part of the operations in the various methods of the above embodiments may be accomplished through instructions, or through instruction-controlled related hardware. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0083] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to perform operations in any page loading method provided in the present application.

[0084] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0085] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0086] Since the instructions stored in the computer-readable storage medium can execute the operations in any page loading method provided in the present application, the beneficial effects that can be achieved by any page loading method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0087] The page loading method, page loading device, electronic device and storage medium provided by the present application are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A page loading method, characterized in that: include: Determine the target page to be displayed after the current page; Preloading a replacement page, wherein the display content of the replacement page is the same as that of the target page; as well as When a request to load the target page is received, the replacement page is loaded.

2. The method according to claim 1, characterized in that in, The preloading replacement page includes: Create an empty page; Acquiring target information, wherein the target information is related to the target page; and The empty page is initialized using the target information to obtain the replacement page.

3. The method according to claim 2, characterized in that in, The target information includes view information corresponding to the target page.

4. The method according to claim 1, characterized in that in, The loading of the replacement page comprises: Launching the target page; and During the activation of the target page, the target page is replaced by the replacement page.

5. The method according to claim 4, characterized in that in, The step of replacing the target page with the replacement page during the startup of the target page includes: Intercepting when the instrumentation component creates the target page; and The replacement page replaces the target page to complete the boot process.

6. The method according to claim 5, characterized in that in, The intercepting when the plugging component creates the target page includes: Intercept when the mInstrumentation.newActivity method creates the Activity component corresponding to the target page; and Set the baseContext of the Activity corresponding to the target page to empty.

7. The method according to claim 1, characterized in that in, The determining of the target page to be displayed after the current page includes: Obtaining the indicated object in the current page; and When the time for which the object is indicated exceeds a preset value, the target page associated with the object is determined.

8. A page loading device, characterized in that: The device comprises: A determination module, used to determine a target page to be displayed after the current page; a preloading module, configured to preload a replacement page, wherein the replacement page has the same display content as the target page; and The loading module is used to load the replacement page when a request to load the target page is received.

9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the operations in the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the operations in the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Interface display control method and device, electronic equipment and storage medium

    CN120234079A