CN113568674A - Page data loading method, page data loading device and electronic equipment - Google Patents

Page data loading method, page data loading device and electronic equipment Download PDF

Info

Publication number
CN113568674A
CN113568674A CN202110730141.9A CN202110730141A CN113568674A CN 113568674 A CN113568674 A CN 113568674A CN 202110730141 A CN202110730141 A CN 202110730141A CN 113568674 A CN113568674 A CN 113568674A
Authority
CN
China
Prior art keywords
page
target
page data
data
data link
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
CN202110730141.9A
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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN202110730141.9A priority Critical patent/CN113568674A/en
Publication of CN113568674A publication Critical patent/CN113568674A/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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The embodiment of the invention provides a method for loading page data, a device for loading page data and electronic equipment, wherein the method comprises the following steps: under the condition that a target page is loaded by a target application, acquiring a page data link of at least one lower page, wherein the lower page is a page to which the target application skips after a first operation is performed on the target page by a user, and the lower page is provided with a webpage view control; acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control; and loading the target page data of the target lower page into the webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page. The embodiment of the invention avoids the process of downloading the target page data according to the page data link after the target application jumps to the lower-level page, and improves the page loading speed.

Description

Page data loading method, page data loading device and electronic equipment
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method for loading page data, an apparatus for loading page data, and an electronic device.
Background
The WebView (webpage view) control is a control which is very commonly used in APP (Application program, Application), and the main function of the WebView control is to perform response interaction with a front-end page, quickly and timely realize the scheduled function, and the WebView control is equivalent to an enhanced built-in browser. Specifically, the APP can directly load the webpage through the WebView control.
In the process of loading the webpage by using the WebView control in the APP, the WebView control is required to be used for downloading webpage data, and then the webpage is loaded by loading the downloaded webpage data. The web page data here are typically CSS (Cascading Style Sheets) files and js (javascript) files. In the process, the time consumption for downloading the webpage data is long, so that the webpage loading speed is too low, and the user experience is greatly influenced. In order to solve the problems, a mode of pre-embedding the CSS file and the JS file in the APP is generally adopted, and the process of downloading the CSS file and the JS file is directly avoided.
However, with the increase of the traffic related to the APP, a large number of CSS files and JS files may appear, how to manage these files to ensure normal operation of the APP becomes a difficult problem, and meanwhile, the APP is too large in size due to the large number of CSS files and JS files, and the APP needs to be downloaded or updated with a large amount of traffic.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are provided to provide a method for loading page data, an apparatus for loading page data, and an electronic device, which overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a method for loading page data, where the method includes:
the method comprises the steps that under the condition that a target page is loaded by a target application, a page data link of at least one lower page is obtained, wherein the lower page is a page after the target application skips after a first operation is carried out on the target page by a user, and the lower page is provided with a webpage view control;
acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control;
and loading the target page data of the target lower page into a webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page, wherein the target lower page is one of the at least one lower page.
Optionally, the obtaining a page data link of at least one lower level page when the target application loads the target page includes:
under the condition that a target application loads a target page, acquiring target parameters of the target page, wherein the target parameter indication comprises a page identifier of the target page;
sending the target parameter to a target server so that the target server determines a page data link of at least one lower page corresponding to the target parameter according to the received target parameter;
and receiving a page data link of at least one lower-level page sent by the target server.
Optionally, the target parameter further includes: a page identifier of a superior page, wherein the superior page is a previous page from which the target application jumps to the target page; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
Optionally, the target parameter further includes: and the target server determines that page data links are not completely the same according to the page identification of the same target page and different control parameters.
Optionally, the obtaining target page data of each lower level page according to the page data link includes:
selecting a webpage view control in an idle state in a webpage view cache pool established in advance;
downloading target page data indicated by each page data link through a webpage view control in an idle state;
and before the target application jumps from the target page to a target lower-level page, prohibiting the target page data from being loaded.
Optionally, a preset number of initialized web view controls are stored in the web view cache pool.
In a second aspect, an embodiment of the present invention further provides an apparatus for loading page data, where the apparatus includes:
the system comprises a first obtaining module and a second obtaining module, wherein the first obtaining module is used for obtaining a page data link of at least one lower page under the condition that a target page is loaded by a target application, the lower page is a page after a target application jumps after a first operation is carried out on the target page by a user, and the lower page is provided with a webpage view control;
the second obtaining module is used for obtaining target page data of each lower level page according to the page data link, wherein the target page data comprise data required to be loaded by the webpage view control;
a loading module, configured to load, when the target application jumps from the target page to a target lower page, target page data of the target lower page into a web view control of the target lower page, where the target lower page is one of the at least one lower page.
Optionally, the first obtaining module includes:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target parameter of a target page under the condition that the target application loads the target page, and the target parameter indication comprises a page identifier of the target page;
the sending unit is used for sending the target parameters to a target server so that the target server determines page data links of at least one lower page corresponding to the target parameters according to the received target parameters;
and the receiving unit is used for receiving the page data link of at least one lower-level page sent by the target server.
Optionally, the target parameter further includes: a page identifier of a superior page, wherein the superior page is a previous page from which the target application jumps to the target page; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
Optionally, the target parameter further includes: and the target server determines that page data links are not completely the same according to the page identification of the same target page and different control parameters.
Optionally, the second obtaining module includes:
the selection unit is used for selecting the webpage view control in an idle state in a webpage view cache pool established in advance;
the downloading unit is used for downloading the target page data indicated by each page data link through the webpage view control in the idle state;
and the forbidding unit is used for forbidding loading the target page data before the target application jumps from the target page to a target lower-level page.
Optionally, a preset number of initialized web view controls are stored in the web view cache pool.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for loading the page data when executing the program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for loading page data as described in the first aspect.
In the embodiment of the invention, under the condition that a target page is loaded by a target application, a page data link of at least one lower page is obtained, wherein the lower page is a page after the target application skips after a first operation is performed on the target page by a user, and the lower page is provided with a webpage view control. And preparing for loading the page data indicated by the page data link after the target application jumps to the lower-level page by acquiring the page data link. And acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control. And acquiring data to be loaded by the webpage view control in the lower page in advance before the target application jumps to the lower page, namely target page data. And loading the target page data of the target lower page into the webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page, wherein the target lower page is one of at least one lower page. The embodiment of the invention avoids the process of downloading the target page data according to the page data link after the target application jumps to the lower-level page, thereby improving the page loading speed; meanwhile, the problem that the volume of the application program is too large due to the fact that a large number of CSS files and JS files are built in is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention 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 that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flowchart illustrating steps of a method for loading page data according to an embodiment of the present invention;
fig. 2 is a flowchart of an actual application of the method for loading page data according to the embodiment of the present invention;
fig. 3 is a block diagram illustrating a structure of an apparatus for loading page data according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 some, not all, embodiments of the present invention. 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.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a method for loading page data, where the method may include:
step 101: and acquiring the page data link of at least one lower level page under the condition that the target application loads the target page.
In this step, the target application may be any application installed on the electronic device, such as shopping, working, and leisure and entertainment applications installed on a smart phone. The target page may be any page in the target application, for example, the target page may be a first page in the target application, but is not limited thereto. The lower page is a page after the target application skips after the user performs the first operation on the target page, and the lower page is provided with a webpage view control. The first operation may be clicking, sliding, long-pressing, and the like, and when the user performs the first operation on the target page, the user triggers a control on the target page, so that the target application makes a page jump. If the webpage view control is arranged in the skipped page, the skipped page can be regarded as a lower-level page. For example, the destination page may be a list page in the destination application, the list page including information for a plurality of items. And the user clicks the information of one article, so that the target application jumps to the detail page of the article, and if the detail page is provided with the webpage view control, the detail page is a next-level page.
Each lower level page corresponds to a page data link, and the page data link is a network link of page data required to be loaded by the lower level page. Specifically, the page data link is a URL (Uniform Resource Locator) pointing to the page data.
Step 102: and acquiring target page data of each lower level page according to the page data link.
In this step, the target page data includes data that needs to be loaded by the web view control, where the data that needs to be loaded by the web view control includes at least a CSS file and a JS file. The page data to which the page data link points includes at least target page data. For example, a corresponding URL is set for a certain lower level page, and the URL points to the CSS file and the JS file to be loaded by the web view control in the lower level page. Therefore, the CSS file and the JS file to be loaded by the webpage view control in the lower-level page can be downloaded according to the URL. Of course, the data that the web page view control needs to load may also include an HTML (hypertext Markup Language) file.
Step 103: and loading the target page data of the target lower page into the webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page.
In this step, after the user performs the first operation on the target page, the target application jumps from the target page to the target lower-level page. The number of the lower pages of the target page can be one or more, each lower page corresponds to respective target page data under the condition that the number of the lower pages of the target page is multiple, and the target page data corresponding to the target lower page is loaded through the webpage view control of the target lower page under the condition that the target lower page is jumped to.
In the embodiment of the invention, under the condition that the target page is loaded by the target application, the page data link of at least one lower page is obtained, wherein the lower page is a page after the target application skips after the first operation is performed on the target page by a user, and the lower page is provided with a webpage view control. And preparing for loading the page data indicated by the page data link after the target application jumps to the lower-level page by acquiring the page data link. And acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control. And acquiring data to be loaded by the webpage view control in the lower page in advance before the target application jumps to the lower page, namely target page data. And loading the target page data of the target lower page into the webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page, wherein the target lower page is one of at least one lower page. The embodiment of the invention avoids the process of downloading the target page data according to the page data link after the target application jumps to the lower-level page, thereby improving the page loading speed; meanwhile, the problem that the volume of the application program is too large due to the fact that a large number of CSS files and JS files are built in is avoided.
Optionally, in a case that the target application loads the target page, acquiring a page data link of at least one lower level page includes:
and under the condition that the target application loads the target page, acquiring target parameters of the target page, wherein the target parameters at least comprise a page identifier of the target page.
It should be noted that each page in the target application has a unique page identifier, that is, a unique page can be determined in the target application by a page identifier. The page identifier may be a page attribute of the target page, and the page identifier may be obtained by obtaining the corresponding page attribute. Here, the page identifier may be a unique identifier formed by any one or more combinations of numbers, letters, and special symbols.
And sending the target parameters to a target server so that the target server determines the page data link of at least one lower-level page corresponding to the target parameters according to the received target parameters.
It should be noted that the target server may receive information transmitted by the electronic device in which the target application is installed. Preferably, the target server is a backend server corresponding to the target application. The target server stores a plurality of groups of target parameters in advance, wherein each group of target parameters corresponds to at least one page data link. Preferably, all page data links corresponding to the same set of target parameters are stored in the same list; that is, each set of target parameters corresponds to a list, and all page data links corresponding to the set of target parameters are stored in the list. It can be understood that, since the target application has been developed, the relationship between the pages in the target application and the page condition of each page can be easily known, where the page condition includes information such as a page identifier, a control used by each page, and data to be loaded. Based on the information, the corresponding relation between the target parameter and the page data link is preset on the target server side. For example, the page identifier aa of the top page in the target application, and the lower page of the top page includes a first page with the page identifier bb and a second page with the page identifier cc. And the page data link of the target page data required to be loaded by the webpage view control in the first page is mm. And the page data link of the target page data required to be loaded by the webpage view control in the second page is nn. One set of target parameters set on the target server is aa, and the corresponding relations between aa and mm and nn are set.
And receiving the page data link of at least one lower-level page sent by the target server.
It should be noted that the target server sends the page data links of all the lower pages corresponding to the target parameters to the target application.
In the embodiment of the invention, the page data link of each lower-level page corresponding to the target page is stored in the target server in advance. The page data link of each lower page is acquired from the target server by the aid of the page identifier of the target page, and the page data link of each lower page can be prevented from being built in the target application.
Optionally, the target parameters further include: the page identification of the upper page, wherein the upper page is a previous page of the target page which is jumped to by the target application; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
It should be noted that different pages in the target application may jump to the same page. Because the jump paths are different, that is, the pages before jumping to the same page are different, the controls and data loaded on the same page are not completely the same. At this time, the same page loaded with different controls and different data will correspond to different lower level pages. That is, the respective page data links corresponding to the first target parameter and the second target parameter in the target server are not completely the same, and the first target parameter and the second target parameter include the page identifier of the same target page and the page identifiers of different upper-level pages. That is, each set of target parameters on the target server includes a page identifier combination composed of two page identifiers, where one page identifier is a page identifier of the target page and the other page identifier is a page identifier of a higher-level page before the target page is skipped to. Moreover, the combinations of page identifiers in different sets of target parameters are not identical. And after receiving the target parameters, the target server determines the page data link of at least one lower-level page according to the page identification combination.
For example, the page identifier of the target page is aa, the first page with the page identifier bb in the target application can directly jump to the target page, the second page with the page identifier cc can also directly jump to the target page, and then the first page and the second page are both upper-level pages of the target page. If the page identifications included in the target parameter are aa and bb, the target application jumps from the first page to the target page, and at this time, the page data link of the lower page corresponding to the target parameter is mm, wherein the mm represents a plurality of different page data links. If the page identifiers included in the target parameter are aa and cc, the target application jumps from the second page to the target page, and at this time, the page data link of the lower-level page corresponding to the target parameter is nn, where nn represents a plurality of different page data links. Here, mm and nn are not identical for each characterized page data link.
In the embodiment of the invention, the target parameters comprise the page identifier of the previous page jumped to the target page in the target application and the page identifier of the target page, and the page identifier of the previous page is taken into consideration as a jump path. And determining the page data link of the lower-level page based on the jump path, so that the actual requirement can be better met.
Optionally, the target parameters further include: and the control parameters are used for indicating user operation, wherein the page data links determined by the target server according to the page identification of the same target page and different control parameters are not identical.
It should be noted that the control parameter indicating the user operation is a parameter of a control triggered by the user when the target page is operated, and may include at least a control identifier. Each control in the target page has a unique control identification, and the corresponding control can be determined through the control parameters.
It can be understood that when the user performs some operations on the target page, the page jump of the target application is not caused, but the control and data currently displayed on the target page are changed. At this time, the lower page corresponding to the current target page may be changed. Therefore, in order to accurately acquire the lower page corresponding to the current state of the target page, the page identifier of the target page and the control parameter are jointly used as the target parameter, and the page data link of the corresponding lower page is acquired from the target server. Here, it is necessary to set page data links of corresponding lower pages in the target server in advance for different target parameters according to the relationship between pages in the target application.
For example, the target page is a lottery page with a lottery function, and when the user just jumps to the lottery page, the target page corresponds to a plurality of lower pages. And when the user triggers the lottery function of the lottery page, information and controls for displaying the lottery result are added to the lottery page. If the user wins a prize, the control added with the display comprises a prize getting control with a prize getting function. The user can jump the target application from the lottery drawing page to the lottery drawing page by triggering the lottery drawing control, wherein the lottery drawing page is a next-level page corresponding to the lottery drawing page after the user triggers the lottery drawing function. It should be noted that, when the user does not trigger the lottery function of the lottery page, the user cannot jump from the lottery page to the prize drawing page, so that the lower page corresponding to the lottery page does not include the prize drawing page at this time. That is, the prize drawing page is a lower page newly added after the user operates the prize drawing page. Based on the situation, the page data link of the lower page corresponding to the first target parameter preset in the target server does not include the page data link of the prize-winning page, the page data link of the lower page corresponding to the second target parameter includes the page data link of the prize-winning page, and the first target parameter and the second target parameter include the same page identifier and different control parameters.
In the embodiment of the invention, the target parameters comprise control parameters used for indicating user operation and page identifications of the target pages, and the target pages operated by different users are used as target pages in different states. The page data link of the lower-level page is determined based on the target pages in different states, so that the actual requirements can be better met.
Optionally, obtaining target page data of each lower level page according to the page data link includes:
and selecting a webpage view control in an idle state in a webpage view cache pool created in advance.
It should be noted that the preset number of web view controls that have been initialized are stored in the web view cache pool. Specifically, a cache pool is created, a preset number of web view controls are created in the cache pool, and the web view controls are initialized. The number of the webpage view controls can be one or more. Here, the operating state of the web view control includes an idle state and a non-idle state. Specifically, in the process of downloading the page data by the web page view control according to the page data link, the working state of the web page view control is a non-idle state continuously. The working state of the web page view control when not used is an idle state.
And downloading the target page data indicated by each page data link through the webpage view control in the idle state.
It should be noted that the working state of the web view control in the web view cache pool changes with time, and the working state of the web view control is a non-idle state in the process of downloading the target page data indicated by the page data link. After the downloading is completed, the working state of the web page view control is converted into an idle state, and at this time, if target page data indicated by a certain page data link is not downloaded, the web page view control in the idle state is used for downloading the target page data aiming at the page data link. Preferably, an HTML page template may be created in advance, and after the web page view control in the idle state is selected, the target page data indicated by each page data link is downloaded by using the HTML page template to load the page data.
It will be appreciated that the target page data indicated by all the page data links needs to be downloaded. The downloaded target page data may be stored in a cache of the electronic device in which the target application is installed, but is not limited thereto.
And before the target application jumps from the target page to the target lower-level page, the target page data is prohibited from being loaded.
It should be noted that before the target application jumps from the target page to the target lower page, to avoid loading the downloaded target page data, the target page data needs to be prohibited from being loaded. For example, the HTML page template is processed by the preload tag, only the target page data can be downloaded, and the downloaded target page data is not loaded immediately. I.e. the logic within the page is not triggered, the page is not rendered, and there is no performance consumption.
In the embodiment of the invention, the webpage view cache pool in which the webpage view control is stored is created in advance, and the target page data is downloaded based on the initialized webpage view control in the view cache pool, so that the loading speed of the target lower-level page can be further improved.
As shown in fig. 2, a flowchart of an actual application of the method for loading page data according to the embodiment of the present invention includes:
step 201: opening a target page in a target application; the target page may be any page in the target application, and may be, for example, a home page, a list page, a detail page, and the like.
Step 202: and starting the preloading service, carrying the corresponding parameters, and requesting a preloading list on the server. Here, the parameter requesting the preloading list is the target parameter in the above embodiment of the present invention, and the preloading list includes the page data link of at least one lower level page corresponding to the target parameter, which is not described herein again to avoid repetition.
Step 203: and starting a WebView cache pool service, taking out the initialized and idle WebView control from the WebView cache pool, and downloading the CSS file and the JS file by adopting the taken-out WebView control according to the page data link in the preloading list, namely the target page data in the embodiment of the invention. When the target application jumps to any lower page from the target page, taking the jumped lower page as the target lower page as an example for explanation, and loading the downloaded CSS file and JS file corresponding to the target lower page into the WebView control of the target lower page. Certainly, the HTML file is small, so that the HTML file can be downloaded when the target lower-level page is jumped to, and the HTML file is loaded when the WebView control loads the CSS file and the JS file.
The embodiment of the invention avoids the process of downloading the target page data according to the page data link after the target application jumps to the lower-level page, thereby improving the page loading speed; meanwhile, the problem that the volume of the application program is too large due to the fact that a large number of CSS files and JS files are built in is avoided.
The method for loading page data according to the embodiment of the present invention is described above, and an apparatus for loading page data according to the embodiment of the present invention is described below with reference to the accompanying drawings.
Referring to fig. 3, an embodiment of the present invention further provides an apparatus for loading page data, where the apparatus includes:
the first obtaining module 31 is configured to obtain a page data link of at least one lower page when a target page is loaded by a target application, where the lower page is a page to which the target application jumps after a first operation is performed on the target page by a user, and the lower page is provided with a web view control;
the second obtaining module 32 is configured to obtain target page data of each lower page according to the page data link, where the target page data includes data that needs to be loaded by the web view control;
the loading module 33 is configured to load the target page data of the target lower page into the web page view control of the target lower page when the target application jumps from the target page to the target lower page, where the target lower page is one of the at least one lower page.
Optionally, the first obtaining module 31 includes:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target parameter of a target page under the condition that the target application loads the target page, and the target parameter indication comprises a page identifier of the target page;
the sending unit is used for sending the target parameters to the target server so that the target server determines the page data link of at least one lower-level page corresponding to the target parameters according to the received target parameters;
and the receiving unit is used for receiving the page data link of at least one lower-level page sent by the target server.
Optionally, the target parameters further include: the page identification of the upper page, wherein the upper page is a previous page of the target page which is jumped to by the target application; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
Optionally, the target parameters further include: and the control parameters are used for indicating user operation, wherein the page data links determined by the target server according to the page identification of the same target page and different control parameters are not identical.
Optionally, the second obtaining module 32 includes:
the selection unit is used for selecting the webpage view control in an idle state in a webpage view cache pool established in advance;
the downloading unit is used for downloading the target page data indicated by each page data link through the webpage view control in the idle state;
and the forbidding unit is used for forbidding loading the target page data before the target application jumps from the target page to the target lower-level page.
Optionally, a preset number of web view controls that have been initialized are stored in the web view cache pool.
The device for loading page data provided by the embodiment of the present invention can implement each process implemented by the method for loading page data in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In the embodiment of the invention, under the condition that a target page is loaded by a target application, a page data link of at least one lower page is obtained, wherein the lower page is a page after the target application skips after a first operation is performed on the target page by a user, and the lower page is provided with a webpage view control. And preparing for loading the page data indicated by the page data link after the target application jumps to the lower-level page by acquiring the page data link. And acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control. And acquiring data to be loaded by the webpage view control in the lower page in advance before the target application jumps to the lower page, namely target page data. And loading the target page data of the target lower page into the webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page, wherein the target lower page is one of at least one lower page. The embodiment of the invention avoids the process of downloading the target page data according to the page data link after the target application jumps to the lower-level page, thereby improving the page loading speed; meanwhile, the problem that the volume of the application program is too large due to the fact that a large number of CSS files and JS files are built in is avoided.
On the other hand, the embodiment of the invention also provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for loading the page data when executing the program stored in the memory.
For example, fig. 4 shows a schematic physical structure diagram of an electronic device.
As shown in fig. 4, the electronic device may include: a processor (processor)410, a communication Interface 420, a memory (memory)430 and a communication bus 440, wherein the processor 410, the communication Interface 420 and the memory 430 are communicated with each other via the communication bus 440. The processor 410 may call logic instructions in the memory 430 to perform the following method:
under the condition that a target page is loaded by a target application, acquiring a page data link of at least one lower page, wherein the lower page is a page to which the target application jumps after a first operation is performed on the target page by a user, and the lower page is provided with a webpage view control;
acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control;
and under the condition that the target application jumps from the target page to the target lower page, loading the target page data of the target lower page into the webpage view control of the target lower page, wherein the target lower page is one of at least one lower page.
In addition, the logic instructions in the memory 430 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In still another aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the method for loading page data provided in the foregoing embodiments, for example, the method includes:
under the condition that a target page is loaded by a target application, acquiring a page data link of at least one lower page, wherein the lower page is a page to which the target application jumps after a first operation is performed on the target page by a user, and the lower page is provided with a webpage view control;
acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control;
and under the condition that the target application jumps from the target page to the target lower page, loading the target page data of the target lower page into the webpage view control of the target lower page, wherein the target lower page is one of at least one lower page.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. 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 description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A method for loading page data, the method comprising:
the method comprises the steps that under the condition that a target page is loaded by a target application, a page data link of at least one lower page is obtained, wherein the lower page is a page after the target application skips after a first operation is carried out on the target page by a user, and the lower page is provided with a webpage view control;
acquiring target page data of each lower level page according to the page data link, wherein the target page data comprises data required to be loaded by the webpage view control;
and loading the target page data of the target lower page into a webpage view control of the target lower page under the condition that the target application jumps from the target page to the target lower page, wherein the target lower page is one of the at least one lower page.
2. The method according to claim 1, wherein obtaining the page data link of at least one lower page in case of loading the target page by the target application comprises:
under the condition that a target page is loaded by a target application, acquiring target parameters of the target page, wherein the target parameters at least comprise a page identifier of the target page;
sending the target parameter to a target server so that the target server determines a page data link of at least one lower page corresponding to the target parameter according to the received target parameter;
and receiving a page data link of at least one lower-level page sent by the target server.
3. The method of claim 2, wherein the target parameters further comprise: a page identifier of a superior page, wherein the superior page is a previous page from which the target application jumps to the target page; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
4. The method of claim 2, wherein the target parameters further comprise: and the target server determines that page data links are not completely the same according to the page identification of the same target page and different control parameters.
5. The method according to claim 1, wherein said obtaining target page data of each of said lower pages according to said page data link comprises:
selecting a webpage view control in an idle state in a webpage view cache pool established in advance;
downloading target page data indicated by each page data link through a webpage view control in an idle state;
and before the target application jumps from the target page to a target lower-level page, prohibiting the target page data from being loaded.
6. The method of claim 5, wherein a preset number of web view controls that have been initialized are stored in the web view cache pool.
7. An apparatus for loading page data, the apparatus comprising:
the system comprises a first obtaining module and a second obtaining module, wherein the first obtaining module is used for obtaining a page data link of at least one lower page under the condition that a target page is loaded by a target application, the lower page is a page after a target application jumps after a first operation is carried out on the target page by a user, and the lower page is provided with a webpage view control;
the second obtaining module is used for obtaining target page data of each lower level page according to the page data link, wherein the target page data comprise data required to be loaded by the webpage view control;
a loading module, configured to load, when the target application jumps from the target page to a target lower page, target page data of the target lower page into a web view control of the target lower page, where the target lower page is one of the at least one lower page.
8. The apparatus of claim 7, wherein the first obtaining module comprises:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a target parameter of a target page under the condition that the target page is loaded by a target application, and the target parameter at least comprises a page identifier of the target page;
the sending unit is used for sending the target parameters to a target server so that the target server determines page data links of at least one lower page corresponding to the target parameters according to the received target parameters;
and the receiving unit is used for receiving the page data link of at least one lower-level page sent by the target server.
9. The apparatus of claim 8, wherein the target parameters further comprise: a page identifier of a superior page, wherein the superior page is a previous page from which the target application jumps to the target page; and the target server determines that the page data links are not completely the same according to the page identification of the same target page and the page identifications of different upper-level pages.
10. The apparatus of claim 8, wherein the target parameters further comprise: and the target server determines that page data links are not completely the same according to the page identification of the same target page and different control parameters.
11. The apparatus of claim 7, wherein the second obtaining module comprises:
the selection unit is used for selecting the webpage view control in an idle state in a webpage view cache pool established in advance;
the downloading unit is used for downloading the target page data indicated by each page data link through the webpage view control in the idle state;
and the forbidding unit is used for forbidding loading the target page data before the target application jumps from the target page to a target lower-level page.
12. The apparatus according to claim 11, wherein the web view cache pool stores a preset number of web view controls that have been initialized.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method of loading page data according to any one of claims 1 to 6 when executing a program stored on a memory.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of loading page data according to any one of claims 1 to 6.
CN202110730141.9A 2021-06-29 2021-06-29 Page data loading method, page data loading device and electronic equipment Pending CN113568674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110730141.9A CN113568674A (en) 2021-06-29 2021-06-29 Page data loading method, page data loading device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110730141.9A CN113568674A (en) 2021-06-29 2021-06-29 Page data loading method, page data loading device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113568674A true CN113568674A (en) 2021-10-29

Family

ID=78163152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110730141.9A Pending CN113568674A (en) 2021-06-29 2021-06-29 Page data loading method, page data loading device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113568674A (en)

Cited By (3)

* 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
CN114489641A (en) * 2021-12-31 2022-05-13 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN114510284A (en) * 2021-12-30 2022-05-17 阿里巴巴(中国)有限公司 Page loading method and device, electronic equipment and readable storage medium

Cited By (5)

* 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
CN114510284A (en) * 2021-12-30 2022-05-17 阿里巴巴(中国)有限公司 Page loading method and device, electronic equipment and readable storage medium
CN114489641A (en) * 2021-12-31 2022-05-13 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN114489641B (en) * 2021-12-31 2022-11-08 北京五八信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113568674A (en) Page data loading method, page data loading device and electronic equipment
CN106775836B (en) Interface display method and interface display device
US9808719B2 (en) Video game awarding benefits for qualified resource fusion
JP5439620B1 (en) A system that recommends electronic content
CN111104635B (en) Method and device for generating form webpage
CN106844635B (en) Method and device for editing elements in webpage
JP5740066B1 (en) Information processing apparatus and game program
KR101777244B1 (en) Recording medium which stores game program, and game device
RU2640720C2 (en) Method and device for web application control
CN106649446B (en) Information pushing method and device
US20140349770A1 (en) Information processing device, and non-transitory computer-readable storage medium storing game program
JP5276687B2 (en) Server device, information processing terminal, and content distribution system
CN108038009B (en) Front-end and back-end interaction method and device based on Web application and computer equipment
WO2016018291A1 (en) Modifying web pages based upon importance ratings and bandwidth
CN105528132A (en) Text input box display method and apparatus applied to browser
CN112632420A (en) Interface skipping method and device, storage medium and electronic device
CN108319474B (en) Page information generation method, device and equipment
CN106649299B (en) Method and device for lazy loading of webpage block
CN111191163B (en) Method, device, equipment and storage medium for updating webpage form data
CN115186207A (en) Method and device for loading page resources and electronic equipment
JP2015060586A (en) Server and method for imparting compensation to user
JP5774244B1 (en) Information processing apparatus and game program
US20140279284A1 (en) Non-transitory computer-readable storage medium storing game program, and information processing device
CN113157374A (en) Page mode switching method, device, equipment and storage medium
CN109101502B (en) Page flow configuration method, switching method and device

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