CN115048596A - Page loading method, device, equipment, medium and program product - Google Patents

Page loading method, device, equipment, medium and program product Download PDF

Info

Publication number
CN115048596A
CN115048596A CN202210552196.XA CN202210552196A CN115048596A CN 115048596 A CN115048596 A CN 115048596A CN 202210552196 A CN202210552196 A CN 202210552196A CN 115048596 A CN115048596 A CN 115048596A
Authority
CN
China
Prior art keywords
page
target
loading
blank
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210552196.XA
Other languages
Chinese (zh)
Inventor
王成文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210552196.XA priority Critical patent/CN115048596A/en
Publication of CN115048596A publication Critical patent/CN115048596A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The embodiment of the specification discloses a page loading method, a page loading device, page loading equipment, a page loading medium and a page loading program product. Wherein, the method comprises the following steps: the method comprises the steps of obtaining a page request instruction for loading a target page based on a jump link, wherein the target page is a page of a target application in an un-started state, creating a blank page object for a home page of the target application in response to the page request instruction, and then loading the target page of the target application after the creation of the blank page object corresponding to the home page is completed.

Description

Page loading method, device, equipment, medium and program product
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a page loading method, apparatus, device, medium, and program product.
Background
With the development of communication technology and the popularization of computer technology, various application programs have come into the daily lives of people. At present, a client-side update drainage scene needs to be realized through an external link calling end, namely links are put in other applications, and after clicking, a user can call a target application and enter a target page. Under these scenarios, the target application may initialize the application home page after starting, and then load the target page.
Disclosure of Invention
When a target application is started in an external link calling end scene, a blank page object is used for replacing loading of a home page, and then the target page is directly opened, so that starting time consumption in the external link calling end scene is reduced, and efficiency of loading the target page in the target application in the external link calling end scene is improved. The technical scheme is as follows:
in a first aspect, an embodiment of the present specification provides a page loading method, including:
acquiring a page request instruction for loading a target page based on the jump link; the target page is a page of a target application in an un-started state;
responding to the page request instruction, and creating a blank page object for the home page of the target application;
and after the blank page object corresponding to the home page is established, loading the target page.
In a possible implementation manner, the target application includes at least one component, and each of the components corresponds to one page; the creating a blank page object for the top page of the target application includes:
and respectively creating a corresponding blank page object for each component in the at least one component, and determining a first page from the page corresponding to the at least one component.
In a possible implementation manner, the creating a corresponding blank page object for each component in the at least one component respectively includes:
creating at least one blank page object based on the at least one component;
and randomly and correspondingly arranging the at least one blank page object on each component in the at least one component.
In a possible implementation manner, after the creating of the blank page object corresponding to the top page is completed and the target page is loaded, the method further includes:
creating a page object corresponding to the home page;
replacing a blank page object corresponding to the home page with a page object corresponding to the home page;
rendering the first page replacing the blank page object according to a preset rule.
In a possible implementation manner, the rendering the top page, which replaces the blank page object, according to a preset rule includes:
requesting network data; the network data comprises target home page data corresponding to the home page;
judging whether the network data request is successful or not;
and if the network data request is successful, rendering the first page replacing the blank page object by using the network data.
In a possible implementation manner, after determining whether the network data request is successful, the method further includes:
if the network data request fails, reading the cache data; the cache data comprises cache home page data corresponding to the home page;
rendering the first page replacing the blank page object based on the cache data.
In a possible implementation manner, after reading the cached data if the network data request fails, the method further includes: and displaying error prompt information on the home page.
In a possible implementation manner, after rendering the top page that has replaced the blank page object according to a preset rule, the method further includes:
acquiring a first instruction for exiting the target page;
and loading the rendered first page in response to the first instruction.
In a possible implementation manner, after the loading the rendered top page in response to the first instruction, the method further includes:
acquiring a second instruction for loading a page corresponding to a specified component in the at least one component; the page corresponding to the designated component does not comprise the home page;
and responding to the second instruction, and loading the page corresponding to the specified component based on the blank page object corresponding to the specified component.
In a second aspect, an embodiment of the present specification provides a page loading apparatus, including:
the first acquisition module is used for acquiring a page request instruction for loading a target page based on the jump link; the target page is a page of a target application in an un-started state;
a first creating module, configured to create a blank page object for a home page of the target application in response to the page request instruction;
and the first loading module is used for loading the target page after the blank page object corresponding to the home page is established.
In a possible implementation manner, the target application includes at least one component, and each of the components corresponds to one page; the first creating module is specifically configured to:
and respectively creating a corresponding blank page object for each component in the at least one component, and determining a home page from the page corresponding to the at least one component.
In a possible implementation manner, the first creating module includes:
a creating unit for creating at least one blank page object based on the at least one component;
and the setting unit is used for randomly and correspondingly setting the at least one blank page object on each component in the at least one component.
In a possible implementation manner, the page loading apparatus further includes:
the second creating module is used for creating a page object corresponding to the home page;
a replacing module, configured to replace a blank page object corresponding to the home page with a page object corresponding to the home page;
and the rendering module is used for rendering the first page replacing the blank page object according to a preset rule.
In a possible implementation manner, the rendering module includes:
a request unit for requesting network data; the network data comprises target home page data corresponding to the home page;
a judging unit, configured to judge whether the request of the network data is successful;
a first rendering unit, configured to render the top page replacing the blank page object by using the network data if the network data request is successful.
In a possible implementation manner, the rendering module further includes:
a reading unit, configured to read cache data if the network data request fails; the cache data comprises cache home page data corresponding to the home page;
and a second rendering unit, configured to render the top page that has replaced the blank page object based on the cache data.
In a possible implementation manner, the page loading apparatus further includes:
and the error reporting module is used for displaying error reporting prompt information on the home page.
In a possible implementation manner, the page loading apparatus further includes:
the second acquisition module is used for acquiring a first instruction for exiting the target page;
and the second loading module is used for responding to the first instruction and loading the rendered home page.
In a possible implementation manner, the page loading apparatus further includes:
a third obtaining module, configured to obtain a second instruction for loading a page corresponding to a specified component in the at least one component; the page corresponding to the designated component does not comprise the home page;
and a third loading module, configured to respond to the second instruction, and load a page corresponding to the specified component based on the blank page object corresponding to the specified component.
In a third aspect, an embodiment of the present specification provides an electronic device, including: a processor and a memory;
the processor is connected with the memory;
the memory is used for storing executable program codes;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to perform the method provided by the first aspect of the embodiments of the present specification or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present specification provides a computer storage medium storing a plurality of instructions, where the instructions are adapted to be loaded by a processor and to execute a method provided by the first aspect of the present specification or any one of the possible implementation manners of the first aspect.
In a fifth aspect, an embodiment of the present specification provides a computer program product including instructions, which, when the computer program product runs on a computer or a processor, causes the computer or the processor to execute the page loading method provided by the first aspect or any one of the possible implementation manners of the first aspect of the present specification.
In the embodiment of the description, a page request instruction for loading a target page of a target application in an un-started state is acquired based on a jump link, a blank page object is created for a home page of the target application in response to the page request instruction, and the target page is loaded after the creation of the blank page object corresponding to the home page is completed, that is, in a scene of an outer link calling end, the target page of the target application is loaded after the blank page object replaces the loading of the home page in the target application, so that the starting time consumption in the scene of the outer link calling end is reduced, and the efficiency of loading the target page in the target application in the scene of the outer link calling end is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an architecture of a page loading system according to an exemplary embodiment of the present specification;
fig. 2A is a schematic diagram illustrating a process for implementing page loading in an external link call end scene provided in the related art;
fig. 2B is a schematic diagram of an implementation scenario of page loading according to an exemplary embodiment of the present specification;
fig. 3 is a schematic diagram of an implementation process of page loading in an external link call end scene according to an exemplary embodiment of the present specification;
fig. 4 is a flowchart illustrating a page loading method according to an exemplary embodiment of the present specification;
FIG. 5 is a component diagram of a target application provided in an exemplary embodiment of the present description;
FIG. 6 is a flowchart illustrating another page loading method according to an exemplary embodiment of the present disclosure;
FIG. 7 is a flowchart illustrating an implementation of a top page rendering according to an exemplary embodiment of the present disclosure;
FIG. 8 is a flowchart illustrating another page loading method according to an exemplary embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a page loading apparatus according to an exemplary embodiment of the present specification;
fig. 10 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure.
The terms "first," "second," "third," and the like in the description and in the claims, as well as in the drawings described above, are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a page loading system according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the page loading system may include: a terminal 110 and a server 120. Wherein:
the terminal 110 may be a user terminal, and specifically includes one or more user terminals. A user version of software (target application) may be installed in the terminal 110, and is configured to obtain a page request instruction for loading a target page of the target application in an un-started state based on the jump link, create a blank page object for a top page of the target application in response to the page request instruction, and load the target page after creation of the blank page object corresponding to the top page is completed. That is, the terminal 110 may enable the user to load the page in the target application in the context of the out-link call-out terminal, for example, the user may open the target page in the application B (target application) installed on the terminal 110 based on the application a installed on the terminal 110, or call out the target application installed on the terminal 110 and open the target page in the target application based on a message pushed by the system installed on the terminal 110. Any of the clients in the terminal 110 may establish a data relationship with the network, and establish a data connection relationship with the server 120 through the network, such as sending a network data request, receiving network data, and the like. Any user side of the terminal 110 may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, and the like, which are installed with user version software (target application).
The server 120 may be a server capable of providing network data corresponding to a plurality of applications, and may receive data such as a network data request sent by any user side of the terminal 110 through a network, and query the network data and the like corresponding to a page identifier of a target application (for example, but not limited to, a home page identifier of the target application) carried in the network data request. The server 120 may also send the network data to any one of the clients in the terminal 110, so that the client can use the network data to render a corresponding page in a target application installed on the client. The server 120 may be, but is not limited to, a hardware server, a virtual server, a cloud server, and the like.
The network may be a medium that provides a communication link between server 120 and any of the clients in terminal 110, or may be the internet containing network devices and transmission media, without limitation. The transmission medium may be a wired link (such as, but not limited to, coaxial cable, fiber optic cable, and Digital Subscriber Line (DSL), etc.) or a wireless link (such as, but not limited to, wireless fidelity (WIFI), bluetooth, and mobile device network, etc.).
It is understood that the number of terminals 110 and servers 120 in the page loading system shown in fig. 1 is merely an example, and any number of clients and servers may be included in the page loading system in a specific implementation. The examples in this specification are not particularly limited thereto. For example, but not limited to, the terminal 110 may be a terminal cluster composed of a plurality of user terminals, and the server 120 may be a server cluster composed of a plurality of servers.
Next, with reference to fig. 1, an overall process of loading a target page of a target application in an out-link call-end scenario in the related art is described. Fig. 2A is a schematic diagram of a process for implementing page loading in an external link call end scene provided in the related art. As shown in fig. 2A, after a User starts a target application (201, starts the target application) in an external link call-end scene, for example, after the target application installed on the terminal 110 is opened by clicking a jump link on the terminal 110, the terminal 110 first creates a main tab (component) of the target application, i.e., a User Interface (UI) skeleton of the target application (202, creates the main tab), then initializes a home page of the target application (203, loads the home page), and after the initialization of the home page is completed, the target page of the target application can be opened (204, loads the target page). The whole process of starting the target application through the jump link and loading the target page is long in time consumption, so that the efficiency of loading the target page is too low, and the stability of a user side and the efficiency of pulling new and guiding are influenced.
Illustratively, an application a and an application B (target application) are installed on a terminal corresponding to the user a, and the user a may click a jump link 211, which is shown in the left diagram of fig. 2B and is used for opening a commodity detail page (target page) of the application B (target application), sent by the user in a chat interface 210 with friends in the target application a, so as to jump to a commodity detail page 220 (target page) of the application B (target application) shown in the right diagram of fig. 2B, that is, the target page of the target application is opened in the context of an external link call end.
While the embodiment of the present specification uses the whole implementation process of page loading in the outer link call-end scenario shown in fig. 3, i.e., after the user launches the target application in the out-link call-end scenario (302, launch target application), and the terminal 110 has created the main tab (component) of the target application (304, create main tab), the first page of the target application may not be loaded first, instead, the created blank page is replaced (306, create blank page), then the target page is loaded directly (308, load target page), and after the target page load is complete, the home page corresponding to the target is created (310, the home page is loaded), the created home page replaces the blank page for occupying the place, therefore, the target page of the target application can be returned to the home page after exiting, the starting time consumption of the target application is reduced, and the efficiency of loading the target page in the external link calling terminal scene is improved.
The page loading method provided by the embodiment of the present specification is described next with reference to fig. 1 to 3. Specifically, refer to fig. 4, which is a flowchart illustrating a page loading method according to an exemplary embodiment of the present disclosure. As shown in fig. 4, the page loading method includes the following steps:
step 402, acquiring a page request instruction for loading the target page based on the jump link.
Specifically, the jump link includes an address path to be jumped, an identifier of a target page, and the like. The user may start the target application by clicking a jump link related to the target application in a non-target application installed on the terminal 110 or by a message (jump link) related to the target application pushed based on a system installed on the terminal 110, and trigger a page request instruction for loading the target page. The target page is a page of the target application in an un-started state. The above-mentioned non-started state is used to characterize a state in which the target application is not running in either the background or the front end.
In step 404, a blank page object is created for the top page of the target application in response to the page request command.
Specifically, in the outer link calling end scene, since the target page can be loaded only after the top page of the target application is loaded, after the page request instruction for loading the target page is acquired based on the jump link, a blank page object can be created for the top page of the target application in response to the page request instruction, that is, the created blank page is used to replace the top page for loading, so that the time consumption of the top page loading before the target page loading is reduced.
Optionally, the target application includes at least one component (main tab), and each of the components (main tabs) corresponds to a page. The at least one component (primary tag) is a User Interface (UI) framework of the target application. In order to facilitate loading of a page corresponding to each of the at least one component (main tag) after the target page exits in the target application, a blank page may be used to occupy at least one page corresponding to the at least one component (main tag) of the target application before the target page is loaded, that is, after a page request instruction for loading the target page is acquired based on the jump link, a corresponding blank page object may be created for each of the at least one component respectively in response to the page request instruction, and a top page may be determined from the page corresponding to the at least one component. The method is equivalent to creating at least one blank page object based on the at least one component, randomly and correspondingly setting the at least one blank page object on each component in the at least one component, that is, setting a corresponding blank page object on each component in the at least one component, and then finding a preset top page (for example, but not limited to, a default top page) from a page corresponding to the at least one component or determining a page currently selected by a user from the page corresponding to the at least one component as the top page, and the like.
Exemplarily, fig. 5 is a component diagram of a target application provided in an exemplary embodiment of the present specification. As shown in fig. 5, the target application includes at least one component (main tab) 510, and the at least one component (main tab) 510 includes a "home" component 511, a "true scent" component 512, an "order" component 513, and a "my" component 514. The user may select a designated component (e.g., "home" component 511) by a clicking operation to cause terminal 110 to display a page corresponding to the designated component (e.g., page 520 corresponding to "home" component 511).
And step 406, after the blank page object corresponding to the home page is created, loading the target page.
Specifically, after the blank page object corresponding to the home page is created, the loading of the target page may be directly triggered, that is, the target page data corresponding to the target page may be obtained from the server through the network, so as to load the target page according to the latest target page data corresponding to the target page, or the page data corresponding to the target page cached on the terminal may be directly read, so as to load the target page according to the page data corresponding to the cached target page.
Optionally, after the corresponding blank page object is created for each component of the at least one component of the target application and the top page is determined from the page corresponding to the at least one component, the terminal 110 may directly load the target page of the target application, that is, directly open the target page.
In the embodiment of the description, a page request instruction for loading a target page of a target application in an un-started state is acquired based on a jump link, a blank page object is created for a home page of the target application in response to the page request instruction, and the target page is loaded after the creation of the blank page object corresponding to the home page is completed, that is, in a scene of an outer link calling end, the target page of the target application is loaded after the blank page object replaces the loading of the home page in the target application.
In order to ensure that the user can normally return to the first page of the target application after exiting the target page, that is, after exiting the target page, the user cannot see blank pages or flash when pages are loaded, and the like, the embodiments of the present specification provide another page loading method. Referring to fig. 6 in particular, fig. 6 schematically illustrates a flow chart of another page loading method provided in the embodiment of the present specification. As shown in fig. 6, the page loading method includes the following steps:
step 602, a page request instruction for loading the target page is obtained based on the jump link.
Specifically, step 602 is identical to step 402, and is not described herein again.
Step 604, creating a blank page object for the top page of the target application in response to the page request command.
Specifically, step 604 is identical to step 404, and is not described herein again.
And step 606, after the blank page object corresponding to the home page is created, loading the target page.
Specifically, step 606 is identical to step 406, and is not described herein again.
In step 608, a page object corresponding to the home page is created.
Specifically, after the target page is loaded, the page object corresponding to the home page may be created in the background according to the configuration information corresponding to the home page of the target application stored on the terminal 110. The configuration information includes page object information corresponding to the home page. The page object information includes basic elements of a page, actions of the page, and the like, where the basic elements of the page are used to represent a basic frame of the page, including functional module identifiers and characters in the page, and the embodiment of this specification does not limit this.
And step 610, replacing the blank page object corresponding to the first page with the page object corresponding to the first page.
Specifically, after the page object corresponding to the top page, that is, the real page object, is created, the page object corresponding to the top page may be used to replace a blank page object corresponding to the top page created before the target page is loaded.
And step 612, rendering the first page of the replaced blank page object according to a preset rule.
Specifically, in order to improve the performance of initializing the top page, after replacing the blank page object corresponding to the top page with the page object corresponding to the top page, the top page with the replaced blank page object may be rendered according to a preset rule. Specifically, refer to fig. 7, which is a schematic flow chart illustrating implementation of top page rendering according to an exemplary embodiment of the present disclosure. As shown in fig. 7, the process of rendering the top page of the replaced blank page object according to the preset rule in step 612 includes the following steps:
step 702, network data is requested.
Specifically, after the blank page object corresponding to the first page is replaced by the page object corresponding to the first page, a network data request may be sent to the server through the network. The network data comprises target home page data corresponding to a home page of the target application. The target home page data is used for representing the latest page data corresponding to the home page.
Step 704, determine whether the network data request is successful.
Specifically, the network data includes page information such as all elements corresponding to a page, where the elements include characters, images, and the like in the page, and this is not limited in this embodiment of the specification.
Optionally, after the terminal sends the network data request to the server, whether the network data request is successful may be determined according to a network connection condition between the terminal and the server. For example, but not limited to, if the terminal can normally connect to the network, that is, the network connection between the terminal and the server is normal, it may be determined that the network data request is successful; if the terminal cannot connect to the network or the network connection between the terminal and the server is poor, it may be determined that the network data request fails.
Optionally, the terminal may further determine whether the network data request is successful by determining whether the network data sent by the server is received within a preset time period from the request of the network data, that is, if the terminal receives the network data sent by the server within the preset time period from the request of the network data, it may determine that the network data request is successful; if the terminal does not receive the network data sent by the server within a preset time period from the request of the network data, the failure of the network data request can be judged. The preset time period may be 0.001s, 0.1s, 1s, etc., which is not limited in the embodiments of the present specification.
In step 706, if the network data request is successful, the first page of the replaced blank page object is rendered using the network data.
Specifically, if the network data request is successful, the received network data may be analyzed, and then the first page of the replaced blank page object is rendered by using the analyzed page information including elements, actions, and the like.
In step 708, if the network data request fails, the cached data is read.
Specifically, the cache data includes cache home page data corresponding to the home page. The cache home page data is used for representing page data of a home page stored on the terminal.
Step 710, rendering the first page of the replaced blank page object based on the cache data.
Specifically, if the network data request fails, after the cache data is read, the cache data may be analyzed, and then the first page of the replaced blank page object is rendered by using the page information, including the cached elements, actions, and the like, obtained through analysis. Namely, if the network request fails, the cache data rendering home page can be read as a pocket bottom, and the home page is prevented from being empty under the condition of network errors.
Optionally, if the network data request fails, after reading the cached data, adding error notification information to a top page of the target application, and after the user exits from the target page, displaying the top page of the replaced blank page object rendered by using the cached data and the error notification information to the user together, so that the user intuitively knows that the data displayed in the top page is not the latest data. The error notification information may be a text, a picture, a voice, a video, or the like related to an error notification or a network data request failure, which is not limited in the embodiments of the present specification.
Illustratively, the error prompt message may be "network data request failed", "request for network refresh", or the like.
The embodiment of the specification obtains a page request instruction for loading a target page of a target application in an un-started state based on a jump link, responds to the page request instruction, creates a blank page object for a home page of the target application, loads the target page after the creation of the blank page object corresponding to the home page is completed, creates a page object corresponding to the home page in the background after the loading of the target page is completed, replaces the blank page object corresponding to the home page with the page object corresponding to the home page, and renders the home page with the replaced blank page object according to a preset rule, so that the home page of the target application can be normally returned after the target page is exited in an external link calling-end scene, namely, after the target page is exited, a user cannot see phenomena such as blank pages or flickering when the pages are loaded, and the method can prevent the first page from being rendered without reading the cache data under the condition of a network error and the normal network condition of the terminal, thereby reducing the time consumption for initializing (loading) the first page and improving the performance of initializing (loading) the first page.
Fig. 8 is a flowchart illustrating another page loading method provided by an embodiment of the present specification. As shown in fig. 8, the page loading method includes the following steps:
step 802, a page request instruction for loading a target page is obtained based on a jump link.
Specifically, step 802 is identical to step 402, and is not described herein again.
Step 804, in response to the page request command, a blank page object is created for the top page of the target application.
Specifically, step 804 is identical to step 404, and is not described herein again.
Step 806, after the creation of the blank page object corresponding to the home page is completed, the target page is loaded.
Specifically, step 806 is identical to step 406, and is not described herein again.
Step 808, creating a page object corresponding to the home page.
Specifically, step 808 is identical to step 608, and is not described herein again.
And 810, replacing the blank page object corresponding to the home page with the page object corresponding to the home page.
Specifically, step 810 is identical to step 610, and is not described herein again.
And step 812, rendering the first page of the replaced blank page object according to a preset rule.
Specifically, step 812 is identical to step 612, and is not described herein again.
At step 814, a first instruction to exit the target page is obtained.
Specifically, after rendering the top page of the replaced blank page object according to the preset rule is completed, the user may input an operation (for example, but not limited to clicking, pulling down, sliding operation, and the like) for exiting the target page in the target page of the target application, so that the terminal may obtain the first instruction for exiting the target page.
At step 816, the rendered top page is loaded in response to the first instruction.
Specifically, after the terminal acquires a first instruction for exiting the target page from the target page, the terminal can respond to the first instruction and load the top page rendered in the background, so that the top page can be returned normally when the target page exits, and the situation that a user firstly sees a blank page after exiting the target page is avoided.
Step 818, a second instruction for loading a page corresponding to a specified component of the at least one component is obtained.
Specifically, after exiting the target page, when the terminal displays the rendered top page that has been loaded, the user may select one component from at least one component of the target application, that is, the specified component inputs an operation (for example, but not limited to, a click operation, a pull-up operation, and the like) for loading the page corresponding to the specified component, so that the terminal may obtain the second instruction for loading the page corresponding to the specified component in the at least one component. The page corresponding to the specified component does not include the home page of the target application, that is, the specified component does not include the component corresponding to the home page of the target application.
In step 820, in response to the second instruction, the page corresponding to the specified component is loaded based on the blank page object corresponding to the specified component.
Specifically, after the terminal acquires the second instruction for loading the page corresponding to the specified component in the at least one component, the terminal may exit the top page and load the page corresponding to the specified component in response to the second instruction, that is, replace the blank page corresponding to the specified component with the page corresponding to the loaded specified component.
In the embodiment of the description, the target page loading of the target application is completed in an outer link calling end scene, the page object corresponding to the home page is created in the background, the blank page object corresponding to the home page is replaced by the page object corresponding to the home page, then the home page of the replaced blank page object is rendered according to the preset rule, the first instruction for exiting the target page can be obtained, the rendered home page is loaded in response to the first instruction, the home page of the target application can be ensured to be normally returned after exiting the target page, the time consumed for initializing (loading) the home page is reduced, and the performance of initializing (loading) the home page is improved. Meanwhile, after the target page exits, when the terminal displays the rendered top page which is loaded completely, a second instruction for loading the page corresponding to the specified component in at least one component is obtained, and in response to the second instruction, the page corresponding to the specified component is loaded based on the blank page object corresponding to the specified component, so that the target page which exits under the scene of the outer link calling end is realized, and after the top page is returned, other pages except the top page can be opened more quickly based on the second instruction triggered by the user operation.
Referring to fig. 9, fig. 9 is a schematic diagram of a page loading apparatus according to an exemplary embodiment of the present disclosure. The page loading apparatus 900 includes:
a first obtaining module 910, configured to obtain a page request instruction for loading a target page based on a jump link; the target page is a page of a target application in an un-started state;
a first creating module 920, configured to create a blank page object for the top page of the target application in response to the page request instruction;
the first loading module 930 is configured to load the target page after the creation of the blank page object corresponding to the home page is completed.
In a possible implementation manner, the target application includes at least one component, and each of the components corresponds to one page; the first creating module 920 is specifically configured to:
and respectively creating a corresponding blank page object for each component in the at least one component, and determining a home page from the page corresponding to the at least one component.
In a possible implementation manner, the first creating module 920 includes:
a creating unit for creating at least one blank page object based on the at least one component;
and the setting unit is used for randomly and correspondingly setting the at least one blank page object on each component in the at least one component.
In a possible implementation manner, the page loading apparatus 900 further includes:
a second creating module, configured to create a page object corresponding to the home page;
a replacing module, configured to replace a blank page object corresponding to the home page with a page object corresponding to the home page;
and the rendering module is used for rendering the first page replacing the blank page object according to a preset rule.
In a possible implementation manner, the rendering module includes:
a request unit for requesting network data; the network data comprises target home page data corresponding to the home page;
a judging unit, configured to judge whether the request of the network data is successful;
a first rendering unit, configured to render the top page replacing the blank page object by using the network data if the network data request is successful.
In a possible implementation manner, the rendering module further includes:
a reading unit, configured to read the cache data if the network data request fails; the cache data comprises cache home page data corresponding to the home page;
and a second rendering unit, configured to render the top page that has replaced the blank page object based on the cache data.
In a possible implementation manner, the page loading apparatus 900 further includes:
and the error reporting module is used for displaying error reporting prompt information on the home page.
In a possible implementation manner, the page loading apparatus 900 further includes:
the second acquisition module is used for acquiring a first instruction for exiting the target page;
and the second loading module is used for responding to the first instruction and loading the rendered home page.
In a possible implementation manner, the page loading apparatus 900 further includes:
a third obtaining module, configured to obtain a second instruction for loading a page corresponding to a specified component in the at least one component; the page corresponding to the designated component does not comprise the home page;
and a third loading module, configured to respond to the second instruction, and load a page corresponding to the specified component based on the blank page object corresponding to the specified component.
The division of each module in the page loading apparatus is only for illustration, and in other embodiments, the page loading apparatus may be divided into different modules as needed to complete all or part of the functions of the page loading apparatus. The implementation of each module in the page loading apparatus provided in the embodiments of the present specification may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. The computer program, when executed by a processor, implements all or part of the steps of the page loading method described in the embodiments of the present specification.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. As shown in fig. 10, the electronic device 1000 may include: at least one processor 1010, at least one communication bus 1020, a user interface 1030, at least one network interface 1040, memory 1050. A communication bus 1020 may be used for implementing connection communication of the above components.
User interface 1030 may include a Display screen (Display) and a Camera (Camera), and optional user interfaces may also include standard wired interfaces and wireless interfaces.
The network interface 1040 may optionally include a bluetooth module, a Near Field Communication (NFC) module, a Wireless Fidelity (Wi-Fi) module, and the like.
Processor 1010 may include one or more processing cores, among other things. The processor 1010 interfaces with various components throughout the electronic device 1000 using various interfaces and circuitry to perform various functions of the routing electronic device 1000 and to process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1050 and invoking data stored in the memory 1050. Optionally, the processor 1010 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1010 may be integrated with one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1010, but may be implemented by a single chip.
The Memory 1050 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 1050 includes non-transitory computer-readable media. The memory 1050 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1050 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as an acquire function, create function, load function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1050 may alternatively be at least one memory device located remotely from the processor 1010. As shown in fig. 10, memory 1050, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
In particular, the processor 1010 may be configured to invoke program instructions stored in the memory 1050 and to perform the following operations in particular:
acquiring a page request instruction for loading a target page based on a jump link; the target page is a page of a target application in an un-started state.
And responding to the page request instruction, and creating a blank page object for the home page of the target application.
And after the blank page object corresponding to the home page is established, loading the target page.
In some possible embodiments, the target application includes at least one component, each of the components corresponding to a page; when the processor 1010 creates a blank page object for the top page of the target application, the processor is specifically configured to execute:
and respectively creating a corresponding blank page object for each component in the at least one component, and determining a first page from the page corresponding to the at least one component.
In some possible embodiments, when the processor 1010 respectively creates a corresponding blank page object for each component in the at least one component, the processor is specifically configured to:
at least one blank page object is created based on the at least one component.
And randomly and correspondingly arranging the at least one blank page object on each component in the at least one component.
In some possible embodiments, after the processor 1010 finishes creating the blank page object corresponding to the first page and loads the target page, the processor is further configured to:
and creating a page object corresponding to the home page.
And replacing the blank page object corresponding to the first page by the page object corresponding to the first page.
Rendering the first page replacing the blank page object according to a preset rule.
In some possible embodiments, when the processor 1010 renders the top page replacing the blank page object according to a preset rule, the processor is specifically configured to perform:
requesting network data; the network data includes target home page data corresponding to the home page.
And judging whether the network data request is successful or not.
And if the network data request is successful, rendering the first page replacing the blank page object by using the network data.
In some possible embodiments, after the processor 1010 determines whether the network data request is successful, the processor is further configured to:
if the network data request fails, reading the cache data; the cache data includes cache home page data corresponding to the home page.
Rendering the first page replacing the blank page object based on the cache data.
In some possible embodiments, the processor 1010 is further configured to, after reading the cache data if the network data request fails, perform:
and displaying error prompt information on the home page.
In some possible embodiments, after rendering the top page replacing the blank page object according to a preset rule, the processor 1010 is further configured to:
and acquiring a first instruction for exiting the target page.
And loading the rendered first page in response to the first instruction.
In some possible embodiments, the processor 1010, in response to the first instruction, is further configured to, after loading the rendered first page:
acquiring a second instruction for loading a page corresponding to a specified component in the at least one component; the page corresponding to the designated component does not include the home page.
And responding to the second instruction, and loading the page corresponding to the specified component based on the blank page object corresponding to the specified component.
The present specification also provides a computer readable storage medium having stored therein instructions, which when executed on a computer or processor, cause the computer or processor to perform one or more of the steps of the above embodiments. The constituent modules of the page loading apparatus may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The processes or functions described above in accordance with the embodiments of the present specification are all or partially generated when the above computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., a flexible Disk, a hard Disk, a magnetic tape), an optical medium (e.g., a Digital Versatile Disk (DVD)), a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. And the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks. The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
The above-described embodiments are merely preferred embodiments of the present disclosure, and are not intended to limit the scope of the present disclosure, and various modifications and improvements made to the technical solutions of the present disclosure by those skilled in the art without departing from the design spirit of the present disclosure should fall within the protection scope defined by the claims.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. Additionally, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

Claims (13)

1. A method of page loading, the method comprising:
acquiring a page request instruction for loading a target page based on a jump link; the target page is a page of a target application in an un-started state;
responding to the page request instruction, and creating a blank page object for the home page of the target application;
and after the blank page object corresponding to the home page is established, loading the target page.
2. The method of claim 1, said target application comprising at least one component, one page for each said component; the creating a blank page object for the home page of the target application includes:
and respectively creating a corresponding blank page object for each component in the at least one component, and determining a first page from the page corresponding to the at least one component.
3. The method of claim 2, said creating a corresponding blank page object for each of said at least one component, respectively, comprising:
creating at least one blank page object based on the at least one component;
and randomly and correspondingly setting the at least one blank page object on each component in the at least one component.
4. The method according to any one of claims 1-3, after said target page is loaded after the creation of the blank page object corresponding to the home page is completed, said method further comprising:
creating a page object corresponding to the home page;
replacing a blank page object corresponding to the home page with a page object corresponding to the home page;
rendering the first page replacing the blank page object according to a preset rule.
5. The method of claim 4, wherein the rendering the top page replacing the blank page object according to a preset rule comprises:
requesting network data; the network data comprises target home page data corresponding to the home page;
judging whether the network data request is successful or not;
if the network data request is successful, rendering the first page of the replaced blank page object by using the network data.
6. The method of claim 5, after determining whether the request for network data is successful, the method further comprising:
if the network data request fails, reading cache data; the cache data comprises cache home page data corresponding to the home page;
rendering the first page that has replaced the blank page object based on the cached data.
7. The method of claim 6, wherein after reading the cached data if the network data request fails, the method further comprises: and displaying error prompt information on the home page.
8. The method of claim 4, after the rendering the top page that has replaced the blank page object according to a preset rule, the method further comprising:
acquiring a first instruction for exiting the target page;
loading the rendered top page in response to the first instruction.
9. The method of claim 8, after said loading the rendered top page in response to the first instruction, the method further comprising:
acquiring a second instruction for loading a page corresponding to a specified component in the at least one component; the page corresponding to the specified component does not comprise the home page;
and responding to the second instruction, and loading the page corresponding to the specified component based on the blank page object corresponding to the specified component.
10. A page loading apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a page request instruction for loading a target page based on the jump link; the target page is a page of a target application in an un-started state;
a first creating module, configured to create a blank page object for a top page of the target application in response to the page request instruction;
and the first loading module is used for loading the target page after the blank page object corresponding to the home page is established.
11. An electronic device, comprising: a processor and a memory;
the processor is connected with the memory;
the memory for storing executable program code;
the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the method of any one of claims 1-9.
12. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1-9.
13. A computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to carry out the page loading method according to any one of claims 1 to 9.
CN202210552196.XA 2022-05-20 2022-05-20 Page loading method, device, equipment, medium and program product Pending CN115048596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210552196.XA CN115048596A (en) 2022-05-20 2022-05-20 Page loading method, device, equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210552196.XA CN115048596A (en) 2022-05-20 2022-05-20 Page loading method, device, equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN115048596A true CN115048596A (en) 2022-09-13

Family

ID=83159418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210552196.XA Pending CN115048596A (en) 2022-05-20 2022-05-20 Page loading method, device, equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115048596A (en)

Similar Documents

Publication Publication Date Title
CN110795195B (en) Webpage rendering method and device, electronic equipment and storage medium
US11785072B2 (en) Method, apparatus, and system for pushing application program, and device
JP7167222B2 (en) APPLET DATA ACQUISITION METHOD, APPARATUS, DEVICE, AND STORAGE MEDIUM
JP7412594B2 (en) Data processing method, data processing device, computer equipment, and computer program
CN110780930B (en) Method and device for starting Android system, electronic equipment and storage medium
CN102043645B (en) Plug-in loading method and device
CN110007936B (en) Data processing method and device
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
CN108549586B (en) Information processing method and device
CN103975301B (en) The method for carrying out Event Service to local client computer application by home server
US20170188214A1 (en) Method and electronic device for sharing multimedia information
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN107168648B (en) File storage method and device and terminal
CN115048596A (en) Page loading method, device, equipment, medium and program product
JP2019536173A (en) Reduce application resource usage
CN115225950A (en) Video playing control method and device
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development
CN114090118A (en) Method, device and equipment for starting small program and storage medium
CN103914289A (en) Desktop application access method and device
CN113434234A (en) Page jump method, device, computer readable storage medium and processor
CN111984278A (en) Method and device for acquiring animation image
CN112015507A (en) Application guide method and device
CN112612531A (en) Application program starting method and device, electronic equipment and storage medium
CN112559213B (en) Application communication method, device, computer equipment and storage medium
CN111190661B (en) Data processing method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination