CN112650549A - Page jump method, device, terminal and storage medium - Google Patents

Page jump method, device, terminal and storage medium Download PDF

Info

Publication number
CN112650549A
CN112650549A CN202011539416.2A CN202011539416A CN112650549A CN 112650549 A CN112650549 A CN 112650549A CN 202011539416 A CN202011539416 A CN 202011539416A CN 112650549 A CN112650549 A CN 112650549A
Authority
CN
China
Prior art keywords
page
preloading
loading
data
jumped
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
CN202011539416.2A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011539416.2A priority Critical patent/CN112650549A/en
Publication of CN112650549A publication Critical patent/CN112650549A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a page jump method, a device, a terminal and a storage medium, wherein the page jump method comprises the following steps: loading a pre-loading plug-in preset in a current page; loading a pre-loading module which is preset for each page to be jumped corresponding to the current page and is used for executing the pre-loading of the page to be jumped; after a jump request for requesting jumping from a current page to a target page is detected, a preloading module corresponding to the target page is called based on a preloading plug-in to obtain first preloading data for executing preloading of the target page; and performing preloading of the target page based on the first preloading data to realize jumping from the current page to the target page. Therefore, the method and the device can reduce the development difficulty of the fast-jump page, reduce the coupling between page codes and facilitate the maintenance and operation of the page. The invention also relates to the technical field of block chains.

Description

Page jump method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of application program display, in particular to a page jump method, a page jump device, a page jump terminal and a storage medium.
Background
The realization of the jump between computer software pages is a very common function in a computer software program, and the jump speed between the software pages is an important index for measuring the performance of software. However, the jumping between software pages mainly involves loading the pages to be jumped (e.g., initializing an interface of the pages to be jumped, parsing html codes for executing the pages to be jumped, parsing js codes for executing the pages to be jumped, etc.), so in order to increase the jumping speed between software pages, one places part of the loading task of the pages to be jumped in the current page during page jumping (i.e., pre-loading the pages to be jumped on the current page during page jumping), thereby increasing the jumping speed between pages. However, since the page to be jumped needs to be preloaded in the current page, a developer needs to insert data and code related to the page to be jumped in the code of the current page (for example, code for inserting a URL and parameters of an initialization interface for entering the page to be jumped), which is equivalent to the need for the developer to perform customized development on the page to be jumped, the developer needs to understand the development logic of the page to be jumped, high requirements are made on the developer, and the data and code related to the page to be jumped are inserted in the code of the current page, which easily causes the coupling of the code between the pages, and is not beneficial to the maintenance and operation of the page. Therefore, the current page jump mode has the problems of high development difficulty and easy code coupling between pages.
Disclosure of Invention
The invention aims to solve the technical problems that the development difficulty of the current page jump mode is high, and the code coupling between pages is easy to cause.
In order to solve the technical problem, a first aspect of the present invention discloses a page jump method, including:
loading a pre-loading plug-in preset in a current page;
loading a pre-loading module which is arranged for each page to be jumped corresponding to the current page in advance and is used for executing the pre-loading of the page to be jumped;
after a jump request for requesting jump from the current page to a target page is detected, calling a preloading module corresponding to the target page based on the preloading plug-in to obtain first preloading data for executing preloading of the target page, wherein the target page determines a certain page to be jumped from all the pages to be jumped according to the jump request;
and performing preloading of the target page based on the first preloading data to realize jumping from the current page to the target page.
The second aspect of the present invention discloses a page jump apparatus, which comprises:
the loading module is used for loading a pre-loading plug-in preset in the current page;
the loading module is also used for loading a preloading module which is arranged for each page to be jumped corresponding to the current page in advance and is used for executing the preloading of the page to be jumped;
the calling module is used for calling a preloading module corresponding to a target page based on the preloading plug-in after a jump request for requesting jump from the current page to the target page is detected so as to obtain first preloading data for executing preloading of the target page, wherein the target page is a certain page to be jumped which is determined from all the pages to be jumped according to the jump request;
and the execution module is used for executing the preloading of the target page based on the first preloading data so as to realize the jump from the current page to the target page.
The third aspect of the present invention discloses a page jump terminal, which comprises:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute part or all of the steps in the page jump method disclosed by the first aspect of the invention.
In a fourth aspect of the present invention, a computer storage medium is disclosed, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, the computer instructions are used to perform some or all of the steps in the page jump method disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the corresponding preloading module is arranged for each page to be jumped, and then the preloading module of the target page (the page to be jumped) is utilized to preload the target page after the jump request is detected, so that when the rapid jump between the pages is realized, a page developer is not required to perform customized development aiming at the target page, the development difficulty of the rapidly jumped page is reduced, the coupling between page codes can be reduced, and the maintenance and the operation of the page are facilitated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flowchart of a page jump method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a page jump apparatus disclosed in the embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a page jump terminal disclosed in the embodiments of the present invention;
fig. 4 is a schematic structural diagram of a computer storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular 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, apparatus, article, or article that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a page jump method, a device, a terminal and a storage medium, wherein a corresponding preloading module is arranged for each page to be jumped, and then the preloading module of a target page (the page to be jumped) is utilized to preload the target page after a jump request is detected, so that when the rapid jump between pages is realized, page developers are not required to perform customized development aiming at the target page, the development difficulty of the rapidly jumped page is reduced, the coupling between page codes can be reduced, and the maintenance and the operation of the page are facilitated. The following are detailed below.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a page jump method according to an embodiment of the present invention. As shown in fig. 1, the page jump method may include the following operations:
101. and loading the preloading plug-in preset in the current page.
In step 101, the preloading plug-in may be a page plug-in specially designed for the current page to perform preloading of each page to be jumped.
102. And loading a preloading module which is preset for each page to be jumped corresponding to the current page and is used for executing preloading of the page to be jumped.
In step 102, the current page and the page to be jumped may be H5 pages or web pages. Taking the current page and the page to be jumped as H5 pages as an example, usually, one H5 page only corresponds to one html file and one js file (two files in total), but in the embodiment of the present invention, a corresponding api. js file (i.e., a preloading module) is also set for each H5 page, and thus one H5 page corresponds to three files. Therein, information related to the preloading of the H5 page (e.g., code for performing interface initialization of the H5 page, an address for storing html code of the H5 page, an address for storing js code of the H5 page, etc.) will be stored in the api. Assuming that the files corresponding to the page a originally are two files, namely, a.html and a.js, after the setting of the preloading module is completed, the files corresponding to the page a are changed into three files, namely, the file a.html, the file a.js and the file a-api.js. After the corresponding api.js file is set for the page, when a developer needs to realize the preloading of the page, the api.js file corresponding to the page can be directly called to finish the preloading of the page, and codes related to preloading are not required to be inserted into a front page according to the development logic of the skipped page, so that the development difficulty is greatly reduced, and the coupling between page codes can be reduced.
For example, in actual project development, an a page and a B page may be developed by different developers, the two developers do not understand development logic of an opposite page, if a corresponding api.js file is not set for a page, to implement pre-loading of jumping from the a page to the B page, the developer of the a page needs to write a code for pre-loading the B page in a code of the a page, which is equivalent to requiring the developer of the a page to perform customized development for the B page in the a page, and needs the developer of the a page to know the development logic of the B page, which greatly improves development difficulty of the a page, increases development time of the a page, and is not favorable for maintenance and operation of the a page in the a page. After the corresponding api.js file is set for the page, as the api.js file of the B page is written by a developer of the B page, the pre-loading of jumping from the A page to the B page is realized, the developer of the A page does not need to know the development logic of the B page, and only needs to directly call the written B-api.js file, so that the pre-loading of the B page can be realized, the development difficulty of the A page is greatly reduced, and the coupling between the codes of the A page and the B page can be reduced.
103. After a jump request for requesting jump from a current page to a target page is detected, a preloading module corresponding to the target page is called based on a preloading plug-in so as to obtain first preloading data for executing preloading of the target page.
In step 103, the target page may be a certain page to be skipped which is determined from all pages to be skipped according to the skip request, for example, the skip request may carry a page number corresponding to the certain page to be skipped. The user may trigger the jump request by clicking a link in the current page for the target page or inputting a jump page operation (e.g., a specific gesture operation such as left-sliding, right-sliding, etc.). After detecting the jump request, triggering the preloading plug-in to start calling the api.js file (namely the preloading module) of the target page so as to obtain the first preloading data. For example, the api.js file of the target page includes code for executing interface initialization of the H5 page (generally, the url for initializing the interface and the entry references, for example, the url for the interface is:/csp/upl/eloan/internalRiskCheck, and the entry references for the interface are the object format in JS language: { speedTip: false, speedAgain: false, speed: false, and timektip: false }), and the requested data can be used as the preloaded data of the target page according to the url for initializing the interface and the entry references. For another example, if the api.js file of the target page includes an address for storing an html code of the target page, the html code of the target page may be obtained according to the address of the html code of the target page, and the obtained html code is used as the preloaded data of the target page.
104. And performing preloading of the target page based on the first preloading data to realize jumping from the current page to the target page.
In the above step 104, different preloading operations (described later) may be performed according to the type of the obtained first preload data. For example, if the first pre-loading data includes data requested according to url and entry of the initialization interface, the interface initialization of the target page may be performed using the requested data, thereby completing the pre-loading of the target page. In this way, when jumping from the current page to the target page, since the partial jump operation is completed, the time required for jumping can be reduced, and the jump speed of the page can be increased.
It can be seen that, by implementing the page jump method described in fig. 1, the corresponding pre-loading module is set for each page to be jumped, and then, after the jump request is detected, the pre-loading module of the target page (the page to be jumped to) is used for pre-loading the target page, so that when the fast jump between the pages is realized, a page developer is not required to perform customized development for the target page, the development difficulty of the fast jump page is reduced, the coupling between page codes can be reduced, and the maintenance and operation of the page are facilitated.
In an optional embodiment, the page jump method further includes:
after the current page loading is finished, judging whether each page to be jumped meets a preset pre-loading condition in advance;
when the page to be skipped is judged to meet the pre-loading condition in advance, calling a pre-loading module corresponding to the page to be skipped based on a pre-loading plug-in so as to obtain second pre-loading data for executing the pre-loading of the page to be skipped;
and after a jump request for requesting jump from a current page to a target page is detected, calling a preloading module corresponding to the target page based on a preloading plug-in to obtain first preloading data for executing preloading of the target page, wherein the page jump method further comprises the following steps:
judging whether the target page has corresponding second pre-loading data or not;
when the target page is judged to have the corresponding second pre-loading data, pre-loading of the target page is executed based on the second pre-loading data so as to finish jumping from the current page to the target page;
and when judging that the target page does not have corresponding second preloading data, triggering and executing a preloading module corresponding to the target page based on the preloading plug-in so as to obtain operation for executing the first preloading data of the preloading of the target page.
In this alternative embodiment, among all the pages to be jumped, the request of preloading data of part of the pages to be jumped may not depend on the operation of the current page (i.e. meet the preset pre-loading condition), for example, the entry of the initialization interface of some pages to be jumped may not depend on the operation of the current page (i.e. need not trigger the plug-in to perform the request of preloading data after the user triggers the jump request). For the part of the pages to be skipped which meet the pre-loading condition, after the current page is loaded, the pre-loading modules of the pages are called to obtain corresponding second pre-loading data, then when the page needs to be skipped, whether the target page (the page to be skipped) has the corresponding second pre-loading data is judged, and if the target page exists, the pre-loading of the target page is carried out by using the existing second pre-loading data. The type and the obtaining mode of the second preloaded data may refer to the type and the obtaining mode of the first preloaded data, and are not described in detail for avoiding repetition. Because the second pre-loading data is acquired before the jump request is triggered, the time for acquiring the pre-loading data can be directly subtracted when the target page is jumped, the page jump speed is further increased, and the page jump time is shortened.
Therefore, by implementing the optional embodiment, the second pre-loading data of the page to be skipped, which meets the pre-loading condition, can be obtained in advance after the current page is loaded, and then when the page needs to be skipped, the pre-loading is directly performed based on the second pre-loading data to complete the page skipping, so that the time for obtaining the pre-loading data can be directly reduced when the target page is skipped, the page skipping speed is further increased, and the page skipping time is shortened.
In an optional embodiment, after the current page is loaded, determining whether each page to be jumped meets a preset pre-loading condition in advance includes:
after the current page is loaded, judging whether an interface of each page to be jumped is associated with a component for acquiring user input in the current page;
when judging that the interface of the page to be jumped is associated with a component for acquiring user input in the current page, determining that the page to be jumped does not meet a preset pre-loading condition in advance;
and when judging that the interface of the page to be jumped is not associated with the part for acquiring the user input in the current page, determining that the page to be jumped meets the pre-loading condition in advance.
In this optional embodiment, each interface of the page to be jumped has a corresponding entry, for example, url of the interface is: csp/upl/eloan/internalRiskCheck, entry into interface is object format in JS language: { speedTip: false, speedgain: false, speed: false }). And each component for acquiring the user input in the current page also has a corresponding argument, for example, if one component in the page is a text input box, the argument of the text input box may be a text character input in the text input box by the user. Assuming that the entry of the page to be jumped participates in the exit of the component for acquiring the user input in the current page, it can be determined that the page to be jumped is associated with the component for acquiring the user input in the current page, that is, the request of the pre-loading data of the page to be jumped must depend on the operation of the current page, the request of the pre-loading data of the page to be jumped cannot be completed in advance after the loading of the current page is completed, and it can be determined that the page to be jumped does not meet the pre-loading condition in advance.
Therefore, by implementing the optional embodiment, whether each page to be jumped meets the pre-loading condition or not can be judged by judging whether each page to be jumped is associated with the part of the current page or not, and a basis is provided for realizing the pre-loading of the page to be jumped in advance.
In an optional embodiment, after determining that the interface of the page to be skipped is not associated with the component for acquiring the user input in the current page, before determining that the page to be skipped meets the pre-loading condition in advance, the page skipping method further includes:
calculating a storage space required for storing all the entries of the interface of the page to be jumped;
obtaining a cache space corresponding to the preloaded plug-in;
judging whether the storage space is larger than or equal to the cache space;
when the storage space is judged to be not more than the cache space, triggering and executing the operation of determining that the page to be jumped meets the pre-loading condition;
and when the storage space is judged to be larger than or equal to the cache space, triggering and executing the operation of determining that the page to be jumped does not meet the preset pre-loading condition in advance.
In this alternative embodiment, when performing the pre-loading of the page, the second pre-loading data obtained by the pre-loading is usually stored in the cache space of the pre-loading plug-in. The cache space of the preloaded plug-in is usually not very large because smooth running of the current page is ensured, and if the second preloaded data of the page to be skipped is too large, the running of the current page is easily affected, and even the page to be skipped can not be successfully preloaded in advance. Therefore, when the second pre-loading data comprises the url of the page initialization interface and the entry parameter, the storage space required for storing all the entry parameters can be calculated, and if the cache space of the pre-loading plug-in fails to meet the required storage space, even if the request of the pre-loading data of the page to be jumped does not depend on the operation of the current page, the pre-loading of the page to be jumped cannot be performed (namely, the page to be jumped does not meet the pre-loading condition in advance), so that the normal operation of page jump can be ensured.
Therefore, by implementing the optional embodiment, when the second pre-loading data comprises the url of the page initialization interface and the entry parameter, the storage space required for storing all the entry parameters can be calculated, and then whether the page to be skipped meets the pre-loading condition is determined according to whether the cache space of the pre-loading plug-in can meet the required storage space, so that the normal operation of the pre-loading can be ensured, and the normal operation of the page skipping is ensured.
In an alternative embodiment, calculating the memory space required for storing all entries of the interface of the page to be jumped includes:
determining the data type of each entry parameter of the interface of the page to be jumped;
determining a sub-storage space required for storing each parameter according to the data type of each parameter;
and determining the storage space required for storing all the access parameters according to the sub-storage space corresponding to each access parameter.
In this alternative embodiment, in the computer system, storage spaces with different sizes are usually preset for data of different data types, for example, data of char type usually requires a storage space of 1 byte, data of int type usually requires a storage space of 4 bytes, data of double type usually requires a storage space of 8 bytes, data of long type usually requires a storage space of 8 bytes, and so on. And the data type of each parameter of the page interface is designed by the developer when the page development is completed. After the data type of each parameter is determined, the required sub-storage space of the parameter can be determined, and then the required sub-storage spaces of each parameter are added, so that the storage space required for storing all parameters can be obtained. For example, there are 3 entries, the data types of the 3 entries are char, int, and long, respectively, the sub-storage spaces corresponding to the 3 entries are 1 byte, 4 bytes, and 8 bytes, respectively, and finally, the 3 entries are added to obtain the storage space (i.e., 13 bytes) required for storing all entries.
Therefore, by implementing the optional embodiment, the storage space required by all the entries of the interface for storing the page to be skipped can be accurately calculated, so that whether the page to be skipped meets the pre-loading condition or not can be accurately judged, the normal operation of pre-loading in advance can be ensured, and the normal operation of page skipping is ensured.
In an optional embodiment, the first pre-loading data comprises interface initialization data for executing interface initialization of the target page and/or network call data for executing network call of the target page and/or js code for interpreting execution in the target page and/or html code for interpreting execution in the target page;
and performing preloading of the target page based on the first preloading data, including:
when the first pre-loading data comprises interface initialization data, executing interface initialization of the target page based on the interface initialization data to finish pre-loading of the target page;
when the first pre-loading data comprises network calling data, executing network calling of the target page based on the network calling data to complete pre-loading of the target page;
when the first pre-loading data comprises js codes, analyzing and executing the js codes to finish the pre-loading of the target page;
when the first pre-loading data comprises html codes, performing parsing execution on the html codes to complete pre-loading of the target page.
In the optional embodiment, the jumping work between the pages mainly includes loading the page to be jumped, and in the process of loading the page, the operations of initializing an interface of the page to be jumped, analyzing an html code of the page to be jumped, analyzing a js code of the page to be jumped, and the like are executed. The target page is preloaded through the preloading data, so that part of the loading work of the target page, which is supposed to be carried out in the page jump process, can be placed in the preloading process to be executed, the page jump time can be reduced, and the page jump speed is improved. For example, when the first pre-loading data includes interface initialization data, interface initialization of the target page may be completed during pre-loading, so that interface initialization is not required when the target page is loaded, and when the first pre-loading data includes network call data, network call of the target page may be completed during pre-loading, so that network call is not required when the target page is loaded.
Therefore, by implementing the optional embodiment, different loading works are completed in the preloading according to different data contained in the preloading data, and a part of the loading work of the target page, which should be performed in the page jump process, can be placed in the preloading process to be completed, so that the page jump time can be reduced, and the page jump speed can be improved.
In an optional embodiment, the second pre-loading data comprises interface initialization data for executing interface initialization of the target page and/or network call data for executing network call of the target page and/or js code for interpreting execution in the target page and/or html code for interpreting execution in the target page;
and performing preloading of the target page based on the second preloading data, including:
when the second pre-loading data comprises interface initialization data, executing interface initialization of the target page based on the interface initialization data to complete pre-loading of the target page;
when the second pre-loading data comprises network calling data, executing network calling of the target page based on the network calling data to complete pre-loading of the target page;
when the second pre-loading data comprises js codes, analyzing and executing the js codes to finish the pre-loading of the target page;
when the second preloading data comprises html codes, performing parsing execution on the html codes to finish preloading of the target page.
In this alternative embodiment, the description of the portion related to the second preloaded data may refer to the description of the portion related to the first preloaded data, and in order to avoid repetition, the description is omitted here.
Optionally, it is also possible: and uploading a page jump result obtained based on the page jump method to a block chain.
Specifically, the page jump result obtained based on the page jump method, specifically, the page jump result is obtained by running the page jump method, and is used for recording a page jump condition in a page jump process, for example, first pre-loading data obtained after calling a pre-loading module, pre-loading completion time, and the like. Uploading the page jump result to the block chain can ensure the safety and the fair transparency to the user. The user can download the page jump result from the blockchain to verify whether the page jump result of the page jump method is tampered. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
It can be seen that, in the page jump method described in the first embodiment, the corresponding pre-loading module is set for each page to be jumped, and then the pre-loading module of the target page (the page to be jumped to) is used for pre-loading the target page after the jump request is detected, so that when the fast jump between the pages is realized, a page developer is not required to perform customized development on the target page, the development difficulty of the fast jump page is reduced, the coupling between page codes can be reduced, and the maintenance and operation of the pages are facilitated. And second pre-loading data of the page to be skipped, which meets the pre-loading condition, can be obtained in advance after the current page is loaded, and then the page is directly pre-loaded based on the second pre-loading data when the page needs to be skipped, so that the page skipping is completed, the page skipping speed is further increased, and the page skipping time is shortened. And whether each page to be jumped meets the pre-loading condition or not can be judged by judging whether each page to be jumped is associated with the part of the current page or not, so that a basis is provided for realizing the pre-loading of the page to be jumped in advance. And when the second pre-loading data comprises url and entry parameters of the page initialization interface, calculating a storage space required for storing all entry parameters, and then determining whether the page to be jumped meets the pre-loading condition in advance according to whether the cache space of the pre-loading plug-in can meet the required storage space. And according to different data contained in the preloaded data, completing different loading work in the preloading.
Example two
Referring to fig. 2, fig. 2 is a schematic structural diagram of a page jump apparatus according to an embodiment of the present invention. As shown in fig. 2, the page jump apparatus may include:
a loading module 201, configured to load a pre-loading plug-in preset in a current page;
the loading module 201 is further configured to load a pre-loading module, which is preset for each page to be skipped corresponding to the current page and is used for executing pre-loading of the page to be skipped;
the calling module 202 is used for calling a preloading module corresponding to a target page based on a preloading plug-in after a jump request for requesting jump from a current page to the target page is detected, so as to obtain first preloading data for executing preloading of the target page;
and the execution module 203 is used for executing the preloading of the target page based on the first preloading data so as to realize the jump from the current page to the target page.
For the specific description of the page jump apparatus, reference may be made to the specific description of the page jump method, which is not described in detail herein.
It can be seen that, with the page jump apparatus described in fig. 2, by setting a corresponding pre-loading module for each page to be jumped, and then, after detecting a jump request, pre-loading the target page by using the pre-loading module of the target page (the page to be jumped to) so as to implement quick jump between pages, it is not necessary for page developers to perform customized development for the target page, thereby reducing the development difficulty of the page to be jumped quickly, reducing the coupling between page codes, and facilitating maintenance and operation of the page.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a page jump terminal according to an embodiment of the present invention. As shown in fig. 3, the page jump terminal may include:
a memory 301 storing executable program code;
a processor 302 coupled to the memory 301;
the processor 302 calls the executable program code stored in the memory 301 to execute the steps in the page jump method disclosed in the embodiment of the present invention.
Example four
The embodiment of the invention discloses a computer storage medium 401, wherein a computer instruction is stored in the computer storage medium 401, and when the computer instruction is called, the computer instruction is used for executing steps in a page jump method disclosed by the embodiment of the invention.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other disk memories, CD-ROMs, or other magnetic disks, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the page jump method, apparatus, terminal and storage medium disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used for illustrating the technical solutions of the present invention, not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A page jump method, characterized in that the method comprises:
loading a pre-loading plug-in preset in a current page;
loading a pre-loading module which is arranged for each page to be jumped corresponding to the current page in advance and is used for executing the pre-loading of the page to be jumped;
after a jump request for requesting jump from the current page to a target page is detected, calling a preloading module corresponding to the target page based on the preloading plug-in to obtain first preloading data for executing preloading of the target page, wherein the target page is a certain page to be jumped determined from all the pages to be jumped according to the jump request; and performing preloading of the target page based on the first preloading data to realize jumping from the current page to the target page.
2. The page jump method of claim 1, further comprising:
after the current page is loaded, judging whether each page to be jumped meets a preset pre-loading condition in advance;
when the page to be skipped is judged to meet the pre-loading condition, calling a pre-loading module corresponding to the page to be skipped based on the pre-loading plug-in so as to obtain second pre-loading data for executing pre-loading of the page to be skipped;
and after detecting a jump request for requesting jump from the current page to the target page, before the preloading module corresponding to the target page is called based on the preloading plug-in to obtain first preloading data for executing preloading of the target page, the method further comprises:
judging whether the target page has corresponding second pre-loading data or not;
when the target page is judged to have corresponding second preloading data, preloading of the target page is executed based on the second preloading data, so that jumping from the current page to the target page is completed;
and when judging that the target page does not have corresponding second preloading data, triggering and executing the preloading module corresponding to the target page based on the preloading plug-in so as to obtain operation for executing the first preloading data of the preloading of the target page.
3. The page jump method according to claim 2, wherein said determining whether each page to be jumped satisfies a preset pre-loading condition after the current page is loaded, comprises:
after the current page is loaded, judging whether an interface of each page to be jumped is associated with a component for acquiring user input in the current page;
when judging that the interface of the page to be jumped is associated with the part for acquiring the user input in the current page, determining that the page to be jumped does not meet a preset pre-loading condition in advance;
and when judging that the interface of the page to be jumped is not associated with the part for acquiring the user input in the current page, determining that the page to be jumped meets the pre-loading condition in advance.
4. The page jump method according to claim 3, wherein after determining that the interface of the page to be jumped is not associated with the component for acquiring the user input in the current page, and before determining that the page to be jumped satisfies the pre-loading condition, the method further comprises:
calculating a storage space required for storing all the entries of the interface of the page to be jumped;
obtaining a cache space corresponding to the preloading plug-in;
judging whether the storage space is larger than or equal to the cache space;
when the storage space is judged to be not larger than the cache space, triggering and executing the operation of determining that the page to be jumped meets the pre-loading condition;
and when the storage space is judged to be larger than or equal to the cache space, triggering and executing the operation of determining that the page to be jumped does not meet the preset pre-loading condition.
5. The page jump method according to claim 4, wherein said calculating a memory space required for storing all entries of the interface of the page to be jumped comprises:
determining the data type of each entry parameter of the interface of the page to be jumped;
determining a sub-storage space required for storing each parameter according to the data type of each parameter;
and determining a storage space required for storing all the access parameters according to the sub-storage space corresponding to each access parameter.
6. The page jump method according to any of claims 1 to 5, characterized in that said first preloading data comprise interface initialization data for performing interface initialization of said target page and/or network call data for performing network call of said target page and/or js code for interpreting execution in said target page and/or html code for interpreting execution in said target page;
and the performing of the preloading of the target page based on the first preloading data comprises:
when the first pre-loading data comprises the interface initialization data, executing interface initialization of the target page based on the interface initialization data to finish pre-loading of the target page;
when the first pre-loading data comprises the network calling data, executing the network calling of the target page based on the network calling data to finish the pre-loading of the target page;
when the first pre-loading data comprises the js code, analyzing and executing the js code to finish the pre-loading of the target page;
when the first preloading data comprises the html codes, performing parsing execution on the html codes to finish preloading of the target page.
7. The page jump method according to any of claims 2 to 5, wherein said second pre-loaded data comprises interface initialization data for performing interface initialization of said target page and/or network call data for performing network call of said target page and/or js code for interpreting execution in said target page and/or html code for interpreting execution in said target page;
and the performing of the preloading of the target page based on the second preloading data comprises:
when the second preloading data comprises the interface initialization data, executing interface initialization of the target page based on the interface initialization data to finish preloading of the target page;
when the second pre-loading data comprises the network calling data, executing the network calling of the target page based on the network calling data to finish the pre-loading of the target page;
when the second preloading data comprises the js code, analyzing and executing the js code to finish preloading of the target page;
when the second preloading data comprises the html codes, performing parsing execution on the html codes to finish preloading of the target page.
8. A page jump apparatus, characterized in that the apparatus comprises:
the loading module is used for loading a pre-loading plug-in preset in the current page;
the loading module is also used for loading a preloading module which is arranged for each page to be jumped corresponding to the current page in advance and is used for executing the preloading of the page to be jumped;
the calling module is used for calling a preloading module corresponding to a target page based on the preloading plug-in after a jump request for requesting jump from the current page to the target page is detected so as to obtain first preloading data for executing preloading of the target page, wherein the target page is a certain page to be jumped which is determined from all the pages to be jumped according to the jump request;
and the execution module is used for executing the preloading of the target page based on the first preloading data so as to realize the jump from the current page to the target page.
9. A page jump terminal, characterized in that the terminal comprises:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the page jump method according to any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a page jump method according to any one of claims 1 to 7.
CN202011539416.2A 2020-12-23 2020-12-23 Page jump method, device, terminal and storage medium Pending CN112650549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011539416.2A CN112650549A (en) 2020-12-23 2020-12-23 Page jump method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011539416.2A CN112650549A (en) 2020-12-23 2020-12-23 Page jump method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112650549A true CN112650549A (en) 2021-04-13

Family

ID=75359743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011539416.2A Pending CN112650549A (en) 2020-12-23 2020-12-23 Page jump method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112650549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265535A (en) * 2021-12-21 2022-04-01 百度在线网络技术(北京)有限公司 Push message landing page display method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154313A1 (en) * 2011-09-19 2015-06-04 Beijing Qihoo Technology Company Limited A method, device, browser and program for accessing web page
CN109213952A (en) * 2018-08-02 2019-01-15 平安科技(深圳)有限公司 Page access processing method, device, computer equipment and storage medium
CN110008429A (en) * 2019-04-09 2019-07-12 吉旗(成都)科技有限公司 A kind of method for page jump and device, storage medium and terminal
CN111046308A (en) * 2019-11-06 2020-04-21 天津幸福生命科技有限公司 Page loading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154313A1 (en) * 2011-09-19 2015-06-04 Beijing Qihoo Technology Company Limited A method, device, browser and program for accessing web page
CN109213952A (en) * 2018-08-02 2019-01-15 平安科技(深圳)有限公司 Page access processing method, device, computer equipment and storage medium
CN110008429A (en) * 2019-04-09 2019-07-12 吉旗(成都)科技有限公司 A kind of method for page jump and device, storage medium and terminal
CN111046308A (en) * 2019-11-06 2020-04-21 天津幸福生命科技有限公司 Page loading method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何淼 等: "一例WEB页面图片本地预加载实现", 电脑知识与技术, no. 05, 15 February 2010 (2010-02-15), pages 1123 - 1124 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114265535A (en) * 2021-12-21 2022-04-01 百度在线网络技术(北京)有限公司 Push message landing page display method, device, equipment and medium
CN114265535B (en) * 2021-12-21 2024-02-27 百度在线网络技术(北京)有限公司 Floor page display method, device, equipment and medium for push message

Similar Documents

Publication Publication Date Title
CN107392619B (en) Intelligent contract processing method and device
CN110941528B (en) Log buried point setting method, device and system based on fault
CN110704304B (en) Application program testing method and device, storage medium and server
CN115686631B (en) Random instruction generation method and device based on knowledge base and storage medium
CN106843901B (en) Page rendering and verification method and device
CN111753302A (en) Method and device for detecting code bugs, computer readable medium and electronic equipment
CN108108169B (en) Multi-branch construction method and system based on Jenkins
CN112882732A (en) Method and device for updating function codes in Software Development Kit (SDK)
CN112650549A (en) Page jump method, device, terminal and storage medium
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN110362416B (en) Page component loading method and device, electronic equipment and storage medium
CN113468212A (en) Event execution method and device and electronic equipment
CN110347601B (en) Interrupt processing method and device for script process
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN111240728A (en) Application program updating method, device, equipment and storage medium
CN111625225A (en) Program specified data output method and device
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN110688320A (en) Global variable detection method and device and terminal equipment
CN113158177A (en) Dynamic measurement method, device, equipment and storage medium
CN109426546B (en) Application starting method and device, computer storage medium and equipment
CN110688198A (en) System calling method and device and electronic equipment
CN111427623B (en) Program exit method, device, computer equipment and storage medium
CN113282363A (en) Method and device for optimizing hybrid APP
CN114489698A (en) Application program installation method and device
CN109408063B (en) Instruction pile inserting method and device based on virtual machine

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