CN114741629A - Page loading method, device, equipment and medium - Google Patents

Page loading method, device, equipment and medium Download PDF

Info

Publication number
CN114741629A
CN114741629A CN202110018206.7A CN202110018206A CN114741629A CN 114741629 A CN114741629 A CN 114741629A CN 202110018206 A CN202110018206 A CN 202110018206A CN 114741629 A CN114741629 A CN 114741629A
Authority
CN
China
Prior art keywords
data
page
target application
preloading
file
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
CN202110018206.7A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110018206.7A priority Critical patent/CN114741629A/en
Publication of CN114741629A publication Critical patent/CN114741629A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a page loading method, device, equipment and medium. The page loading method comprises the following steps: in response to receiving a page loading instruction, acquiring file response data and preloading data from a server, wherein the page loading instruction is used for requesting to load a target application page, the file response data comprises a page file of the target application page, and the preloading data comprises user data of the target application page; and under the condition of acquiring the file response data and the pre-loading data, loading the target application page according to the file response data and the pre-loading data. According to the embodiment of the disclosure, the page loading time can be shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.

Description

Page loading method, device, equipment and medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a page loading method, apparatus, device, and medium.
Background
With the development of the internet technology, the characteristics of long development period, slow realization, high updating iteration cost, difficulty in shunting, branch realization and the like in the traditional native development technology become the limitation of software development, so that the cross-platform hybrid development technology can be carried along. Hybrid development (Hybrid), cross-platform development (read-Native) and other technologies, and the characteristics of application construction, cross-platform, fast achievement, benefit of iterative diversion and the like close to the Native development technology gradually become mainstream selection.
However, when the electronic device displays the cross-platform hybrid development page, a certain time is required to load the page. When a user opens a cross-platform hybrid development page on an electronic device, the long loading waiting time can affect the use experience of the user.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides a page loading method, apparatus, device and medium.
In a first aspect, the present disclosure provides a page loading method, including:
in response to receiving a page loading instruction, acquiring file response data and preloading data from a server, wherein the page loading instruction is used for requesting to load a target application page, the file response data comprises a page file of the target application page, and the preloading data comprises user data of the target application page;
and under the condition of acquiring the file response data and the pre-loading data, loading the target application page according to the file response data and the pre-loading data.
In a second aspect, the present disclosure provides a page loading apparatus, including:
the server comprises a first obtaining unit and a second obtaining unit, wherein the first obtaining unit is configured to respond to the received page loading instruction, obtain file response data from the server, the page loading instruction is used for requesting to load a target application page, and the file response data comprises a page file of the target application page;
a second obtaining unit configured to obtain, in response to receiving the page loading instruction, preloaded data from the server while obtaining the file response data from the server, the preloaded data including user data of the target application page;
and the first loading unit is configured to load the target application page according to the file response data and the pre-loading data under the condition that the file response data and the pre-loading data are obtained.
In a third aspect, the present disclosure provides a page loading device, including:
a processor;
a memory for storing executable instructions;
the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the page loading method according to the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the page loading method of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the page loading method, the page loading device, the page loading equipment and the page loading medium can synchronously acquire the file response data of the page file including the target application page and the pre-loading data of the user data including the target application page from the server in response to the received page loading instruction after receiving the page loading instruction for requesting to load the target application page, so that the acquisition of the user data can be started in parallel with the acquisition of the page file, namely the acquisition of the user data in advance, and the target application page can be loaded by directly utilizing the acquired file response data and the pre-loading data under the condition of acquiring the file response data and the pre-loading data, so that the page loading time is shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is an architecture diagram of a page load according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a page loading method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another page loading method according to the embodiment of the present disclosure;
fig. 4 is a schematic flowchart of another page loading method provided in the embodiment of the present disclosure;
fig. 5 is a schematic flowchart of another page loading method according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of another page loading method according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of another page loading method according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a page loading apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a page loading device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
With the development of the internet technology, the characteristics of long development period, slow realization, high updating iteration cost, difficulty in shunting, branch realization and the like in the traditional native development technology become the limitation of software development, so that the cross-platform hybrid development technology can be carried along. The cross-platform Hybrid development technology is gradually becoming a mainstream choice from the original Hybrid technology to the later read-Native technology, and therefore, the application scenarios of the technologies in each large application program (APP) are increasing.
However, no matter the cross-platform Hybrid development page is manufactured by using the Hybrid technology, the read-Native technology or other cross-platform Hybrid development technologies, the electronic device needs a certain time to load when displaying the cross-platform Hybrid development page.
Taking a loading process of a typical Hybrid page as an example, after a user triggers to load a page, the electronic device needs to create a Hybrid container process first, load the Hybrid page file, then request a server Application Program Interface (API) to load a part of user data, and finally start to render the page.
According to the loading process, the applicant finds that the initialization of the webview needs about 80-200ms when the page is loaded, and the time for one-time service-side API request needs about 100-1000 ms, and therefore the initialization time of the webview is almost equivalent to the time for the service-side API request.
Based on the above findings, the applicant provides a page loading method capable of effectively increasing the loading speed of a page, so as to reduce the loading waiting time of a user and improve the use experience of the user.
The page loading method provided by the present disclosure may be applied to the architecture shown in fig. 1, and is specifically described in detail with reference to fig. 1.
Fig. 1 shows an architecture diagram of a page load provided by an embodiment of the present disclosure.
As shown in fig. 1, the architecture diagram may include at least one electronic device 101 at a client side and at least one server 102 at a server side. The electronic device 101 may establish a connection with the server 102 through a network Protocol, such as hypertext Transfer Protocol over Secure Socket Layer (HTTPS), and perform information interaction. The electronic device 101 may be a device with a communication function, such as a mobile phone, a tablet computer, a desktop computer, a notebook computer, a vehicle-mounted terminal, a wearable device, an all-in-one machine, and a smart home device, and may also be a device simulated by a virtual machine or a simulator. The server 102 may be a device with storage and computing functions, such as a cloud server or a server cluster.
Based on the above architecture, a user can open a target application page of a specific APP on the electronic device 101, which is made by using a cross-platform hybrid development technology. The electronic device 101 may load and present the target application page to the user.
Therefore, in order to reduce the loading waiting time of the user and improve the use experience of the user, the electronic device 101 may obtain the page file and the user data in parallel in the page loading process, so as to achieve the preloading of the user data and improve the loading speed of the page. Specifically, when a user triggers opening of a target application page within an APP, the electronic device may receive a page load instruction requesting loading of the target application page. After receiving the page loading instruction, the electronic device can respond to the received page loading instruction and synchronously acquire the file response data of the page file comprising the target application page and the pre-loading data of the user data comprising the target application page from the server, so that the acquisition of the user data can be started in parallel with the acquisition of the page file, namely the user data can be acquired in advance, and the target application page can be loaded by directly utilizing the acquired file response data and the pre-loading data under the condition of acquiring the file response data and the pre-loading data, so that the page loading time is shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.
According to the above architecture, the page loading method provided by the embodiment of the present disclosure is described below with reference to fig. 2 to 7. In the embodiment of the present disclosure, the page loading method may be executed by the electronic device 101 in the client illustrated in fig. 1. The electronic device can be a mobile phone, a tablet computer, a desktop computer, a notebook computer, a vehicle-mounted terminal, a wearable device, an all-in-one machine, an intelligent household device and other devices with communication functions, and can also be a virtual machine or simulator simulation device.
Fig. 2 shows a flowchart of a page loading method provided by the embodiment of the present disclosure. As shown in fig. 2, the page loading method may include the following steps.
S210, responding to the received page loading instruction, and acquiring file response data and preloading data from the server.
Specifically, when a user wants to view a target application page of a target APP, a display triggering operation may be input in a target APP interface on the electronic device to trigger the electronic device to display the target application page of the target APP.
The target application page can be any one of a Hybrid page, a read-Native page, a high-performance cross-platform development (flute) page and other cross-platform mixed development pages.
Optionally, the presentation trigger operation may be a trigger operation of a target application page entry. The target application page entry may be a target application page entry icon, a target application page entry link, a target application page entry control, or the like, and may also be an entry in another form as long as the entry can be used to trigger the electronic device to display the target application page.
Further, when the electronic device detects a display trigger operation input by a user, it may be determined that a page loading instruction corresponding to the display trigger operation is received. The page loading instruction is used for requesting the electronic equipment to load a target application page so as to display a target application interface. The electronic device may synchronize the retrieval of the file response data and the pre-loaded data from the server after determining that the presentation trigger operation is received, to advance the retrieval of the user data to begin in parallel with the retrieval of the file response data.
In the embodiment of the present disclosure, the server may be the server 102 in the server illustrated in fig. 1. The server may be a cloud server or a server cluster or other devices with storage and computing functions.
In embodiments of the present disclosure, the document response data may include a pagefile of the target application page. The number of the page files can be 1 or more than 1.
Further, the obtaining, by the electronic device, the file response data from the server may specifically include: generating a file acquisition request according to file request configuration information corresponding to a target application page; sending a file acquisition request to a server, wherein the file acquisition request is used for enabling the server to feed back file response data of a page file comprising a target application page; and receiving file response data fed back by the server.
Specifically, the file request configuration information corresponding to the target application page may include an acquisition address of a page file of the target application page. The electronic equipment can respond to the received page loading instruction, directly acquire the acquisition address of the page file of the target application page from the local, generate a file acquisition request for acquiring the page file according to the acquisition address of the page file, then send the file acquisition request carrying the acquisition address of the page file to the server, enable the server to respond to the file acquisition request, inquire file response data comprising the page file according to the acquisition address of the page file, and feed the file response data back to the electronic equipment.
In some embodiments, the page file of the target application page may include an HTML file, and may further include at least one of a JS file, a CSS file, and a picture file.
Specifically, in the process of loading the page file of the target application page, the HTML file needs to be loaded first, and then the HTML file needs to be parsed, so as to load the JS file, the CSS file, and the picture file under the HTML file. Therefore, the file obtaining request may include a plurality of subfile obtaining requests, one file obtaining request may carry an obtaining address of one file and be used to obtain the file corresponding to the obtained address, and the electronic device may sequentially generate and send each subfile obtaining request to the server as needed, so that the server feeds back the file corresponding to each subfile obtaining request.
For example, the file request configuration information corresponding to the target application page may include an acquisition address of an HTML file of the target application page. The electronic equipment can respond to the received page loading instruction, directly acquire the acquisition address of the HTML file of the target application page from the local, generate a subfile acquisition request carrying the acquisition address of the HTML file according to the acquisition address of the HTML file, and then send the subfile acquisition request carrying the acquisition address of the HTML file to the server, so that the server queries the HTML file according to the acquisition address of the HTML file and feeds the HTML file back to the electronic equipment. After receiving the HTML file fed back by the server, the electronic device may parse the HTML file, generate a subfile acquisition request carrying an acquisition address of the file according to the acquisition address of the file carried in the HTML file, such as an acquisition address of a JS file, a CSS file, or a picture file, and then send the subfile acquisition request carrying the acquisition address of the file to the server, so that the server queries a corresponding file according to the acquisition address of the file, and feeds back the queried file to the electronic device. Thus, the electronic device can sequentially acquire each file included in the file response data from the server.
In other embodiments, the electronic device may obtain the file response data from the server through a container process corresponding to the target application page in response to receiving the page load instruction.
Optionally, the obtaining of the file response data from the server may specifically include: creating a container process corresponding to a target application page; generating a file acquisition request corresponding to a target application page through a container process; sending a file acquisition request to the server through the container process, wherein the file acquisition request is used for enabling the server to feed back file response data; and receiving the file response data fed back by the server through the container process.
Specifically, in response to receiving the page loading instruction, the electronic device may create a container process corresponding to the target application page through a page jump protocol, such as schema. After the container process corresponding to the target application page is created, the container process may generate a file acquisition request according to the file request configuration information corresponding to the target application page, and then send the file acquisition request to the server and receive file response data fed back by the server through a network component of the container process itself.
Further, in order to enable the container process to load the pagefile, the file response data may be data that the container process can recognize.
It should be noted that the method for the container process to obtain the file response data from the server is similar to the method for the electronic device to obtain the file response data from the server, and is not described herein again.
In embodiments of the present disclosure, the preloaded data may include user data for the target application page. The number of user data may be 1 or more.
Further, the obtaining, by the electronic device, the preloaded data from the server may specifically include: generating a preloaded data acquisition request according to target preloading request configuration information corresponding to a target application page; sending a preloaded data acquisition request to a server, wherein the preloaded data acquisition request is used for enabling the server to feed back preloaded data; and receiving the preloaded data fed back by the server.
Specifically, the target preload request configuration information may include a request address and request parameters of the user data. The electronic device may, in response to receiving the page loading instruction, obtain the file response data from the server, directly obtain a request address and a request parameter of the preloadable user data of the target application page from the local, generate a preload data obtaining request for obtaining the preloadable user data according to the request address and the request parameter of the preloadable user data, and then send the preload data obtaining request to the server, so that the server, in response to the preload data obtaining request, queries preload data including the preloadable user data according to the request address and the request parameter of the preloadable user data, and feeds the preload data back to the electronic device.
In some embodiments, a plurality of pre-loading request configuration information may be pre-stored in the electronic device, and one pre-loading request configuration information corresponds to one application page.
Optionally, before generating the preloaded data acquisition request according to the target preload request configuration information corresponding to the target application page, the page loading method may further include: and inquiring target preloading request configuration information corresponding to the target application page in the pre-stored preloading request configuration information.
Further, when the electronic device creates the container process through the schema and loads the application pages, the page identifier of each application page is used. Therefore, each application page can be provided with a unique page identifier, and the preloading request configuration information corresponding to one application page can be stored locally in the electronic device in association with the page identifier of the corresponding application page.
Specifically, the electronic device may, in response to receiving the page loading instruction, acquire a page identifier of the target application page, locally query target preloading request configuration information stored in association with the page identifier of the target application page, and generate a preloaded data acquisition request according to the target preloading request configuration information, so as to acquire preloaded data from the server by using the preloaded data acquisition request.
In other embodiments, the electronic device may obtain the file response data through the container process corresponding to the target application page, and simultaneously obtain the preloaded data instead of the container process corresponding to the target application page, so as to achieve parallel obtaining of the file response data and the preloaded data, and further achieve parallel loading of the page file and the user data.
In these embodiments, in order to enable the electronic device to obtain the preloaded data instead of the container process corresponding to the target application page, the electronic device may obtain, in advance, the preloaded request configuration information of each application page related to the target APP. The preloading request configuration information may be information written in a Domain Specific Language (DSL), such as JSON language, and may be used to describe request information of the preloadable user data of the corresponding application page.
Optionally, the target preload request configuration information may include at least one of a request address and a request parameter of the preloadable user data.
Optionally, the target preload request configuration information may further include at least one of a request address, a request mode, a pre-storage duration, and a request parameter of the user data that can be preloaded.
In the following, the details of the configuration information of the preload request are described by taking the example of obtaining the preload data of the Hybrid page.
In the preload request configuration information, a page identifier of an application page corresponding to the preload request configuration information may be defined first, so as to store the page identifier and the preload request configuration information in an associated manner.
It should be noted that the page identifier may be a page address of the application page, a page code of the application page, or other character strings, as long as the character string is a unique character string representing the application page, and is not limited herein.
The request mode may characterize a method for the electronic device to obtain the user data from the server. For example, the request mode may include a "POST" mode, a "GET" mode, and the like.
The request address may include a server API address for obtaining user data.
The pre-storage duration may represent a duration that the user data may be cached in the electronic device after the electronic device acquires the user data each time.
The request parameters may include keywords for the user data, which may include data type and value of the user data.
Alternatively, the data types may include static data and dynamic data. Under the condition that the data type is static data, the value of the user data can be directly obtained from the local; when the data type is dynamic data, the value of the user data needs to be obtained by analyzing from a Uniform Resource Locator (URL) address.
Therefore, the electronic equipment can analyze the complete preloading request configuration information required by acquiring the user data, and further generate the preloading data acquisition request based on the preloading request configuration information.
It should be noted that, when the target application page is a read-Native page or a Flutter page, the specific content of the request address, the request mode, the pre-storage duration and the request parameter in the pre-loading request configuration information may need to be adjusted, which is not limited herein.
Returning to fig. 2, in S220, in the case of acquiring the file response data and the preload data, the target application page is loaded according to the file response data and the preload data.
In some embodiments, when the electronic device determines that the file response data and the preloaded data have been acquired, page rendering may be performed according to the file response data and the preloaded data to load the target application page.
In other embodiments, in a case that the electronic device obtains the file response data through the container process corresponding to the target application page, S220 may specifically include: and loading the target application page through the container process according to the file response data and the preloading data.
Specifically, when the electronic device obtains the file response data through the container process corresponding to the target application page, the container process may perform page rendering according to the file response data and the preloaded data to load the target application page when obtaining the file response data and determining that the electronic device obtains the preloaded data.
In the embodiment of the disclosure, after receiving a page loading instruction for requesting to load a target application page, in response to the received page loading instruction, file response data of a page file including the target application page and pre-loading data of user data including the target application page are synchronously acquired from a server, so that the acquisition of the user data can be started in parallel with the acquisition of the page file, that is, the user data is acquired in advance, and under the condition that the file response data and the pre-loading data are acquired, the target application page can be loaded by directly using the acquired file response data and the pre-loading data, so that the page loading time is shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.
The page loading process of the embodiment shown in fig. 2 will be described below by taking fig. 3 as an example.
Fig. 3 shows a flowchart of another page loading method provided by the embodiment of the present disclosure. As shown in fig. 3, the page loading process may include:
s301, the electronic device can receive a page loading instruction corresponding to a display triggering operation input by a user in the target APP interface.
The target application page can be any one of a Hybrid page, a read-Native page, a flute page and other cross-platform mixed development pages.
After the electronic device receives the page load instruction, two sets of steps S302a-S303a and S302b-S303b can be synchronously executed in response to the page load instruction.
First, S302a-S303a will be explained.
S302a, the electronic device may generate a file acquisition request according to the file request configuration information corresponding to the target application page through the container process corresponding to the target application page.
And the development technology type of the container process corresponding to the target application page is the same as the development technology type of the target application page.
S303a, the electronic device may send a file obtaining request to the server through the container process corresponding to the target application page.
The file acquisition request is used for enabling the server to feed back file response data of the page file comprising the target application page.
After the server receives the file acquisition request, the server may perform S304a-305 a. Wherein S304a-305a may include:
s304a, the server may query the file response data of the pagefile including the target application page in response to the file retrieval request.
S305a, the server may feed back the file response data to the container process corresponding to the target application page of the electronic device.
Next, S302b-S303b will be explained.
S302b, the electronic device may generate a preloaded data obtaining request according to the target preloading request configuration information corresponding to the target application page.
S303b, the electronic device may send a preloaded data acquisition request to the server.
Wherein the preloaded data acquisition request is used for enabling the server to feed back the preloaded data.
After the server receives the preloaded data acquisition request, the server may perform S304b-305 b. Wherein S304b-305b may include:
s304b, the server may query the preloaded data including the user data of the target application page in response to the preloaded data acquisition request.
S305b, the server may feed back the preloaded data to the electronic device.
After the electronic device receives the file response data and the preloaded data fed back by the server, the electronic device may perform S306. Wherein, S306 may include:
s306, the electronic equipment can perform page rendering according to the file response data and the pre-loading data through the container process corresponding to the target application page, and load the target application page.
Therefore, in the embodiments, when the cross-platform mixed development page such as the Hybrid page, the read-Native page and the Flutter page is loaded, the file response data and the preloaded data can be synchronously acquired, so that the acquisition of the preloaded data is started in parallel with the acquisition of the file response data, the cross-platform mixed development page can be displayed more quickly, the page loading time is shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.
In another embodiment of the present disclosure, in order to improve reliability of obtaining preloaded data, the generating a preloaded data obtaining request according to target preloaded request configuration information corresponding to a target application page as described above may further include:
and under the condition that the target preloading request configuration information comprises the pre-storage duration and the historical user data does not comprise the preloading data, generating a preloading data acquisition request according to the target preloading request configuration information.
Specifically, after the electronic device queries target preload request configuration information corresponding to a target application page, it may be determined whether the target preload request configuration information includes a pre-storage duration, and if the target preload request configuration information includes the pre-storage duration, it is determined that preload data corresponding to the target preload request configuration information is cacheable data, and the preload data may be cached in the electronic device.
Generally, after the electronic device obtains the cacheable preload data, the preload data and the target preload request configuration information corresponding to the preload data may be stored in association with each other as historical user data, and the storage duration of the preload data is set as the pre-storage duration in the target preload request configuration information for subsequent search by the electronic device.
Therefore, when the electronic device determines that the queried target preload request configuration information includes the pre-stored duration, the electronic device may query the historical user data for preload data stored in association with the target preload request configuration information, and if the preload data is not queried, the electronic device may determine that the historical user data does not include the preload data, and generate the preload data acquisition request according to the target preload request configuration information.
In other embodiments of the present disclosure, the generating a preloaded data obtaining request according to the target preload request configuration information corresponding to the target application page may further include:
and under the condition that the target preloading request configuration information comprises a pre-storage time length, the historical user data comprises preloading data, and the storage time length of the preloading data is greater than the pre-storage time length, generating a preloading data acquisition request according to the target preloading request configuration information.
Specifically, when the electronic device determines that the queried target preload request configuration information includes the pre-stored duration, the electronic device may query, in the historical user data, preload data stored in association with the target preload request configuration information, and if the preload data is queried, the electronic device may determine that the historical user data includes the preload data, that is, the electronic device has cached the preload data. At this time, in order to further improve the reliability of the preloaded data, the storage duration of the preloaded data may be compared with the pre-storage duration in the target preload request configuration information, and if the storage duration of the preloaded data is greater than the pre-storage duration, it is indicated that the preloaded data is expired data, and the electronic device needs to acquire the preloaded data again, and at this time, the electronic device may generate a preloaded data acquisition request according to the target preload request configuration information.
In still other embodiments of the present disclosure, the generating a preloaded data obtaining request according to the target preload request configuration information corresponding to the target application page may further include:
and under the condition that the target preloading request configuration information does not comprise the pre-stored time length, generating a preloading data acquisition request according to the target preloading request configuration information.
Specifically, after the electronic device queries target preloading request configuration information corresponding to a target application page, it may be determined whether the target preloading request configuration information includes a pre-stored time length, and if the target preloading request configuration information does not include the pre-stored time length, it is determined that preloading data corresponding to the target preloading request configuration information is uncacheable data, and the preloading data is not cached in the electronic device. At this time, the electronic device may directly generate the preloaded data acquisition request according to the target preload request configuration information.
In still other embodiments of the present disclosure, after querying target preload request configuration information corresponding to a target application page, the page loading method may further include:
and under the condition that the target preloading request configuration information comprises a pre-storage time length, the historical user data comprises preloading data, and the storage time length of the preloading data is less than or equal to the pre-storage time length, determining to acquire the preloading data.
Specifically, when the electronic device determines that the queried target preloading request configuration information includes a pre-storage time length and determines that the historical user data includes the preloading data, if it is further determined that the storage time length of the preloading data is less than or equal to the pre-storage time length, it is indicated that the electronic device caches the non-expired preloading data, at this time, the electronic device does not need to acquire the preloading data again, and can directly determine to acquire the preloading data for direct acquisition in a subsequent need.
Therefore, in the embodiments, the electronic device may first determine whether the preloaded data is cacheable data by using a pre-storage duration, and if the preloaded data is not cacheable data, generate a preloaded data acquisition request to acquire the preloaded data; if the preloaded data is cacheable data, whether a preloaded data acquisition request needs to be generated to acquire the preloaded data can be judged according to whether the storage time length of the preloaded data in the electronic equipment exceeds the pre-storage time length, further, when the storage time length is less than or equal to the pre-storage time length, repeated acquisition of the preloaded data can be avoided, and when the storage time length is greater than the pre-storage time length, the preloaded data is acquired again, so that the page loading time is further reduced, and meanwhile, the reliability of acquiring the preloaded data is improved.
In another embodiment of the present disclosure, in order to improve the reliability of page loading, the electronic device needs to load the target application page when it is determined that the preloaded data includes user data to be loaded of all the target application pages.
In some embodiments, S220 may specifically include: and under the condition that the pre-loading data comprises the user data to be loaded of the target application page, loading the target application page according to the file response data and the pre-loading data.
In other embodiments, after obtaining the file response data and the preloading data from the server, the page loading method may further include: under the condition that the file response data and the preloading data are obtained and the preloading data do not comprise target user data in the user data to be loaded, obtaining the target user data from the server; and loading the target application page according to the file response data, the preloading data and the target user data.
The page loading method provided in the present embodiment will be described below by taking fig. 4 as an example.
Fig. 4 shows a flowchart of another page loading method provided by the embodiment of the present disclosure. As shown in fig. 4, the page loading method may include the following steps.
And S410, responding to the received page loading instruction, and acquiring the file response data and the preloading data from the server.
The page loading instruction may be used to request loading of the target application page, the file response data may include a page file of the target application page, and the preload data may include user data of the target application page.
It should be noted that S410 is similar to S210 in the embodiment shown in fig. 2, and is not repeated herein.
S420, under the condition that the file response data and the pre-loading data are obtained, whether the pre-loading data comprise user data to be loaded of the target application page is determined, if yes, S430 is executed, and if not, S440 is executed.
In the embodiment of the present disclosure, the number of user data to be loaded may be 1 or more than 1.
After the electronic device acquires the preload data, the preload data and the target preload request configuration information corresponding to the preload data can be associated and temporarily stored in the electronic device.
In some embodiments, after acquiring the file response data and the preloaded data, according to the file response data, such as the to-be-loaded request configuration information corresponding to the to-be-loaded user data included in the page file, in the temporarily stored target preloaded request configuration information, it is queried whether target preloaded request configuration information identical to the to-be-loaded request configuration information exists, if so, it is determined that the preloaded data includes the to-be-loaded user data of the target application page, and if not, it is determined that the preloaded data does not include the to-be-loaded user data of the target application page.
In other embodiments, when the electronic device acquires the file response data through the container process corresponding to the target application page, the electronic device may receive the file response data fed back by the server through the container process corresponding to the target application page, and generate a page data acquisition request according to the to-be-loaded request configuration information corresponding to the to-be-loaded user data of the target application page through the container process corresponding to the target application page, where the page data acquisition request may be used to enable the electronic device to feed back the to-be-loaded user data of the target application page. The electronic equipment can respond to the page data acquisition request, inquire whether the target preloading request configuration information carried by the page data acquisition request exists in the temporary stored target preloading request configuration information, and if so, determine that the preloading data comprises the user data to be loaded, namely, the electronic equipment acquires the user data to be loaded; if the preloaded data does not exist, the preloaded data is determined to not include the user data to be loaded, namely the electronic equipment does not acquire the user data to be loaded.
For example, the target preload request configuration information may be used as a KEY (KEY), the preload data may be used as a VALUE (VALUE) to be associated and temporarily stored in the electronic device, the electronic device may generate a page data acquisition request through a container process corresponding to the target application page, and the container process corresponding to the target application page may send the page data acquisition request to the electronic device through a JSBridge request manner or an Ajax request manner, so that the electronic device determines whether the preload data includes user data to be loaded of the target application page. After receiving the page data acquisition request, the electronic device may query whether a KEY identical to the configuration information of the request to be loaded carried by the page data acquisition request exists, and if so, determine that the preloaded data includes user data to be loaded; if not, it is determined that the preloaded data does not include user data to be loaded.
And S430, loading the target application page according to the file response data and the preloading data.
In some embodiments, if the electronic device determines that the preloaded data includes user data to be loaded of the target application page, the electronic device may load the target application page directly according to the file response data and the preloaded data.
In other embodiments, when the electronic device loads the target application page through the container process corresponding to the target application page, if the electronic device determines that the preloaded data includes user data to be loaded of the target application page, the electronic device may feed back the user data to be loaded of the target application page to the container process corresponding to the target application page, and load the target application page through the container process corresponding to the target application page according to the file response data and the preloaded data.
It should be noted that the method for loading the target application page by the electronic device and the container process corresponding to the target application page is similar to S220 in the embodiment shown in fig. 2, and details are not repeated here.
And S440, acquiring target user data from the server.
In some embodiments, if the electronic device determines that the preloaded data does not include target user data in the user data to be loaded, the electronic device may generate a data to be loaded acquisition request according to target data to be loaded request configuration information corresponding to the target user data, and send the data to be loaded acquisition request to the server, where the data to be loaded acquisition request is used for the server to feed back the target user data, and the electronic device may further receive the target user data fed back by the server.
In other embodiments, in the case that the electronic device loads the target application page through the container process corresponding to the target application page, if the electronic device determines that the preloaded data does not include the target user data in the user data to be loaded, the electronic device may feed back the user data to be loaded of the target application page to the container process corresponding to the target application page, and the electronic equipment can also generate a data to be loaded acquisition request according to the target to-be-loaded request configuration information corresponding to the target user data through the container process corresponding to the target application page, and then sending a data to be loaded acquisition request to the server through the container process corresponding to the target application page, wherein the data to be loaded acquisition request is used for enabling the server to feed back target user data, and the electronic equipment can also receive the target user data fed back by the server through the container process corresponding to the target application page.
And S450, loading the target application page according to the file response data, the preloading data and the target user data.
In some embodiments, after the target user data is obtained, the electronic device may perform page rendering according to the file response data, the preloading data, and the target user data to load the target application page.
In other embodiments, when the electronic device loads the target application page through the container process corresponding to the target application page, the electronic device may further perform page rendering according to the file response data, the preloading data, and the target user data through the container process corresponding to the target application page, so as to load the target application page.
Therefore, in the embodiment of the disclosure, only part of the user data can be preloaded, so that the security of the user data is improved, and under the condition that only part of the user data is preloaded, the user data which is not preloaded can be acquired after the file response data is acquired, so that the reliability of page loading is improved.
The page loading process of the embodiment shown in fig. 4 will be described below by taking fig. 5 as an example.
Fig. 5 shows a flowchart of a further page loading method provided by the embodiment of the present disclosure. As shown in fig. 5, the page loading process may include:
s501, the electronic device can receive a page loading instruction corresponding to a display triggering operation input by a user in a target APP interface.
The target application page can be any one of a Hybrid page, a read-Native page, a flute page and other cross-platform mixed development pages.
After the electronic device receives the page load instruction, two sets of steps S502a-S503a and S502b-S503b can be synchronously executed in response to the page load instruction.
First, S502a-S503a will be explained.
S502a, the electronic device may generate a file acquisition request according to the file request configuration information corresponding to the target application page through the container process corresponding to the target application page.
And the development technology type of the container process corresponding to the target application page is the same as the development technology type of the target application page.
S503a, the electronic device may send a file obtaining request to the server through the container process corresponding to the target application page.
The file acquisition request is used for enabling the server to feed back file response data of the page file comprising the target application page.
After the server receives the file acquisition request, the server may perform S504a-505 a. Wherein, S504a-505a may include:
s504a, the server may query the file response data of the pagefile including the target application page in response to the file retrieval request.
S505a, the server may feed back the file response data to the container process corresponding to the target application page of the electronic device.
Next, S502b-S503b will be explained.
S502b, the electronic device may generate a preloaded data obtaining request according to the target preloading request configuration information corresponding to the target application page.
S503b, the electronic device may send a preloaded data acquisition request to the server.
Wherein the preloaded data acquisition request is used for enabling the server to feed back the preloaded data.
After the server receives the preloaded data acquisition request, the server may perform S504b-505 b. Wherein, S504b-505b may include:
s504b, the server may query the preloaded data including the user data of the target application page in response to the preloaded data acquisition request.
S505b, the server may feed back the preloaded data to the electronic device.
After the electronic device receives the file response data and the preloaded data fed back by the server, the electronic device may perform S506. Wherein, S506 may include:
s506, the electronic device can generate and send a page data acquisition request through a container process corresponding to the target application page, and the electronic device can determine whether the preloaded data includes user data to be loaded of the target application page in response to the page data acquisition request, and if so, execute S507a, and if not, execute S507 b.
S507a, the electronic device may feed back the user data to be loaded of the target application page to the container process corresponding to the target application page, perform page rendering according to the file response data and the preloaded data through the container process corresponding to the target application page, and load the target application page.
S507b, the electronic device may feed back the user data to be loaded of the target application page to the container process corresponding to the target application page, and generate a data to be loaded acquisition request according to the target request configuration information to be loaded corresponding to the target user data by using the container process corresponding to the target application page.
S508b, the electronic device may send a request for obtaining data to be loaded to the server through the container process corresponding to the target application page.
The data to be loaded acquisition request is used for enabling the server to feed back target user data.
S509b, the server may query the target user data in response to the data to be loaded obtaining request.
S510b, the server may feed back the target user data to the electronic device.
And S511b, the electronic device can render the page according to the file response data, the preloading data and the target user data through the container process corresponding to the target application page, and load the target application page.
In another embodiment of the present disclosure, in order to avoid repeated acquisition of data, after acquiring the file response data and the preload data from the server, the page loading method may further include: and waiting to acquire the pre-loading data when the file response data is acquired and the pre-loading data is not acquired.
The page loading method provided in the present embodiment will be described below by taking fig. 6 as an example.
Fig. 6 shows a flowchart of a further page loading method provided by the embodiment of the present disclosure. As shown in fig. 6, the page loading method may include the following steps.
S610, responding to the received page loading instruction, and acquiring the file response data and the preloading data from the server.
The page loading instruction may be used to request loading of the target application page, the file response data may include a page file of the target application page, and the preload data may include user data of the target application page.
It should be noted that S610 is similar to S210 in the embodiment shown in fig. 2, and is not described herein again.
S620, under the condition that the file response data is acquired, whether the preloading data is acquired is determined, if yes, S640 is executed, and if not, S630 is executed.
In some embodiments, after the electronic device acquires the file response data, it may be queried whether the preloaded data corresponding to the preloaded data acquisition request exists, if so, it is determined that the preloaded data is acquired, and if not, it is determined that the preloaded data is not acquired.
In other embodiments, after the electronic device acquires the file response data through the container process corresponding to the target application page, a page data acquisition request may be generated and sent according to the to-be-loaded request configuration information corresponding to the to-be-loaded user data of the target application page through the container process corresponding to the target application page, and the page data acquisition request may be used to enable the electronic device to feed back the to-be-loaded user data of the target application page. The electronic device can respond to the page data acquisition request, inquire whether the preloaded data corresponding to the preloaded data acquisition request exists, if so, determine to acquire the preloaded data, and if not, determine not to acquire the preloaded data.
And S630, waiting for acquiring the preloading data.
In the event that the electronic device determines that the preloaded data is not acquired, it may wait to acquire the preloaded data.
And S640, loading the target application page according to the file response data and the preloading data.
And under the condition that the electronic equipment determines to acquire the pre-loading data, loading the target application page according to the file response data and the pre-loading data.
It should be noted that S640 is similar to S220 in the embodiment shown in fig. 2 and S420-S450 in the embodiment shown in fig. 4, and is not repeated here.
Therefore, in the embodiments, when the file response data is acquired and the preloaded data is acquired, the time for acquiring the preloaded data is saved, and the time for loading the page can be further reduced; when the file response data is acquired and the preloading data is not acquired, the time for acquiring the file response data is saved, and the page loading time can be further reduced. In conclusion, the page loading time can be reduced by the embodiment of the disclosure, so that the loading waiting time of the user is reduced, and the use experience of the user is improved.
The page loading process of the embodiment shown in fig. 6 will be described below by taking fig. 7 as an example.
Fig. 7 shows a flowchart of a further page loading method provided by the embodiment of the present disclosure. As shown in fig. 7, the page loading process may include:
s701, the electronic device can receive a page loading instruction corresponding to a display triggering operation input by a user in a target APP interface.
The target application page can be any one of a Hybrid page, a read-Native page, a flute page and other cross-platform mixed development pages.
After the electronic device receives the page load instruction, two steps S702a-S703a and S702b-S703b may be performed synchronously in response to the page load instruction.
First, S702a to S703a will be explained.
S702a, the electronic device may generate a file acquisition request according to the file request configuration information corresponding to the target application page through the container process corresponding to the target application page.
And the development technology type of the container process corresponding to the target application page is the same as the development technology type of the target application page.
S703a, the electronic device may send a file obtaining request to the server through the container process corresponding to the target application page.
The file acquisition request is used for enabling the server to feed back file response data of the page file comprising the target application page.
After the server receives the file acquisition request, the server may perform S704a-705 a. Wherein, S704a-705a may include:
s704a, the server may query the file response data of the pagefile including the target application page in response to the file obtaining request.
S705a, the server may feed back the file response data to the container process corresponding to the target application page of the electronic device.
Next, S702b-S703b will be explained.
S702b, the electronic device may generate a preloaded data obtaining request according to the target preloading request configuration information corresponding to the target application page.
S703b, the electronic device may send a preloaded data acquisition request to the server.
Wherein the preloaded data acquisition request is used for enabling the server to feed back the preloaded data.
When the server receives the preloaded data acquisition request, the server may perform S704b-705 b. Wherein, S704b-705b may include:
s704b, the server may query the preloaded data including the user data of the target application page in response to the preloaded data acquisition request.
S705b, the server may feed back the preload data to the electronic device.
If the electronic device receives the file response data after S703b before S705b, S706 may be performed. Wherein, S706 may include:
s706, the electronic device may generate and send a page data obtaining request through a container process corresponding to the target application page, and after receiving the page data obtaining request, the electronic device may wait to receive the preloaded data.
After the electronic device receives the file response data and the preloaded data fed back by the server, the electronic device may perform S707. Wherein S707 may include:
and S707, the electronic device may generate and send a page data acquisition request through the container process corresponding to the target application page, after receiving the page data acquisition request, the electronic device feeds back the pre-loading data to the container process corresponding to the target application page, performs page rendering according to the file response data and the pre-loading data through the container process corresponding to the target application page, and loads the target application page.
In order to verify the effect of the embodiment of the present disclosure, the same page may be loaded by using the existing page loading method and the page loading method provided by the embodiment of the present disclosure, and the following data is obtained (the existing page loading method is a control group, and the page loading method provided by the embodiment of the present disclosure is an experimental group):
group of First screen data is time consuming Reporting log quantity
Control group 231.256ms 100271 strip
Experimental group 66.682ms 120043 strip
As can be seen from the above table, the time for loading the page by using the page loading method provided by the embodiment of the present disclosure is reduced by about 71% compared with the time for loading the page by using the existing page loading method. In summary, the embodiment of the present disclosure can start acquiring user data in parallel with acquiring a page file when loading a page, thereby shortening the page loading time, reducing the loading waiting time of a user, and improving the use experience of the user.
Fig. 8 shows a schematic structural diagram of a page loading apparatus according to an embodiment of the present disclosure.
In the embodiment of the present disclosure, the page loading apparatus may be disposed in the electronic device 101 in the client illustrated in fig. 1. The electronic device can be a mobile phone, a tablet computer, a desktop computer, a notebook computer, a vehicle-mounted terminal, a wearable device, an all-in-one machine, an intelligent household device and other devices with communication functions, and can also be a virtual machine or simulator simulation device.
As shown in fig. 8, the page loading apparatus 800 may include a first obtaining unit 810, a second obtaining unit 820, and a first loading unit 830.
The first obtaining unit 810 may be configured to obtain, from the server, file response data in response to receiving a page load instruction, the page load instruction being for requesting loading of a target application page, the file response data including a page file of the target application page.
The second obtaining unit 820 may be configured to obtain the preloaded data from the server while obtaining the file response data from the server in response to receiving the page load instruction, the preloaded data including user data of the target application page.
The first loading unit 830 may be configured to load the target application page according to the file response data and the preloaded data when the file response data and the preloaded data are acquired.
In the embodiment of the disclosure, after receiving a page loading instruction for requesting to load a target application page, in response to the received page loading instruction, file response data of a page file including the target application page and pre-loading data of user data including the target application page are synchronously acquired from a server, so that the acquisition of the user data can be started in parallel with the acquisition of the page file, that is, the user data is acquired in advance, and under the condition that the file response data and the pre-loading data are acquired, the target application page can be loaded by directly using the acquired file response data and the pre-loading data, so that the page loading time is shortened, the loading waiting time of a user is reduced, and the use experience of the user is improved.
In some embodiments of the present disclosure, the second obtaining unit 820 may include a first generating subunit, a first transmitting subunit, and a first receiving subunit.
The first generating subunit may be configured to generate the preloaded data acquisition request according to target preloading request configuration information corresponding to the target application page.
The first sending subunit may be configured to send a preloaded data acquisition request to the server, the preloaded data acquisition request being used for causing the server to feed back the preloaded data.
The first receiving subunit may be configured to receive the preloaded data fed back by the server.
In some embodiments of the present disclosure, the second obtaining unit 820 may further include a first querying subunit, and the first querying subunit may be configured to query, in the pre-stored preload request configuration information, target preload request configuration information corresponding to the target application page.
In some embodiments of the present disclosure, the target preload request configuration information may include at least one of a request address, a request manner, a pre-storage duration, and a request parameter.
In some embodiments of the present disclosure, the first generating subunit may be further configured to generate the preload data acquisition request according to the target preload request configuration information, in a case where the target preload request configuration information includes a pre-stored time length and the historical user data does not include the preload data.
In other embodiments of the present disclosure, the first generating subunit may be further configured to generate the preloaded data acquisition request according to the target preload request configuration information when the target preload request configuration information includes a pre-storage time length, the historical user data includes preloaded data, and the storage time length of the preloaded data is greater than the pre-storage time length.
In still other embodiments of the present disclosure, the second obtaining unit 820 may further include a first determining subunit, and the first determining subunit may be configured to determine to obtain the preloaded data when the target preload request configuration information includes a pre-stored time length, the historical user data includes preloaded data, and the storage time length of the preloaded data is less than or equal to the pre-stored time length.
In some embodiments of the present disclosure, the first loading unit 830 may be further configured to load the target application page according to the file response data and the preloaded data, in case that it is determined that the preloaded data includes user data to be loaded of the target application page.
In some embodiments of the present disclosure, the page loading apparatus 800 may further include a third obtaining unit and a second loading unit.
The third obtaining unit may be configured to obtain the target user data from the server when the file response data and the preloaded data are obtained and the preloaded data do not include the target user data in the user data to be loaded; .
The second loading unit may be configured to load the target application page according to the file response data, the preload data, and the target user data.
In some embodiments of the present disclosure, the page loading apparatus 800 may further include a first control unit, and the first control unit may be configured to wait to acquire the preloaded data when the file response data is acquired and the preloaded data is not acquired.
In some embodiments of the present disclosure, the first obtaining unit 810 may include a first creating subunit, a second generating subunit, a second transmitting subunit, and a second receiving subunit.
The first creating subunit may be configured to create a container process corresponding to the target application page.
The second generating subunit may be configured to generate, by the container process, a file acquisition request corresponding to the target application page.
The second sending subunit may be configured to send, to the server through the container process, a file obtaining request for causing the server to feed back the file response data.
The second receiving subunit may be configured to receive, by the container process, file response data fed back by the server.
In some embodiments of the present disclosure, the first loading unit 830 may be further configured to load the target application page through the container process according to the file response data and the preload data.
It should be noted that the page loading apparatus 800 shown in fig. 8 may execute each step in the method embodiments shown in fig. 2 to fig. 7, and implement each process and effect in the method embodiments shown in fig. 2 to fig. 7, which is not described herein again.
Embodiments of the present disclosure also provide a page loading device, which may include a processor and a memory, and the memory may be used to store executable instructions. The processor may be configured to read the executable instructions from the memory and execute the executable instructions to implement the page loading method in the foregoing embodiments.
Fig. 9 shows a schematic structural diagram of a page loading device provided by an embodiment of the present disclosure. Referring now specifically to fig. 9, a schematic block diagram of a page loading apparatus 900 suitable for use in implementing embodiments of the present disclosure is shown.
The page loading apparatus 900 in the embodiment of the present disclosure may be an electronic apparatus. The electronic devices may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), wearable devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like.
Alternatively, the page loading device 900 may be the electronic device 101 in the client shown in fig. 1.
It should be noted that the page loading apparatus 900 shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of the embodiments of the present disclosure.
As shown in fig. 9, the page loading apparatus 900 may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage device 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the information processing apparatus 900 are also stored. The processing apparatus 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
Generally, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the page loading apparatus 900 to perform wireless or wired communication with other apparatuses to exchange data. While FIG. 9 illustrates a page loading apparatus 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
The embodiment of the present disclosure also provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to implement the page loading method in the foregoing embodiment.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. The above-described functions defined in the information display method of the embodiment of the present disclosure are executed when the computer program is executed by the processing apparatus 901.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP, and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be included in the page loading apparatus; or may exist separately without being assembled into the page loading device.
The computer readable medium carries one or more programs which, when executed by the page loading device, cause the page loading device to perform:
in response to receiving a page loading instruction, acquiring file response data and preloading data from a server, wherein the page loading instruction is used for requesting to load a target application page, the file response data comprises a page file of the target application page, and the preloading data comprises user data of the target application page; and under the condition of acquiring the file response data and the pre-loading data, loading the target application page according to the file response data and the pre-loading data.
In embodiments of the present disclosure, computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (15)

1. A page loading method is characterized by comprising the following steps:
in response to receiving a page loading instruction, acquiring file response data and preloading data from a server, wherein the page loading instruction is used for requesting to load a target application page, the file response data comprises a page file of the target application page, and the preloading data comprises user data of the target application page;
and loading the target application page according to the file response data and the preloading data under the condition of acquiring the file response data and the preloading data.
2. The method of claim 1, wherein obtaining preloaded data from a server comprises:
generating a preloaded data acquisition request according to target preloading request configuration information corresponding to the target application page;
sending the preloading data acquisition request to the server, wherein the preloading data acquisition request is used for enabling the server to feed back the preloading data;
receiving the preloading data fed back by the server.
3. The method according to claim 2, wherein before generating the preloaded data acquisition request according to the target preload request configuration information corresponding to the target application page, the method further comprises:
and inquiring the target preloading request configuration information corresponding to the target application page in the pre-stored preloading request configuration information.
4. The method of claim 2, wherein the target preload request configuration information comprises at least one of a request address, a request mode, a pre-stored duration, and a request parameter.
5. The method according to claim 2, wherein the generating a preloaded data acquisition request according to the target preload request configuration information corresponding to the target application page includes:
and under the condition that the target preloading request configuration information comprises pre-storage duration and the historical user data does not comprise the preloading data, generating the preloading data acquisition request according to the target preloading request configuration information.
6. The method according to claim 2, wherein the generating a preloaded data acquisition request according to the target preload request configuration information corresponding to the target application page comprises:
and under the condition that the target preloading request configuration information comprises a pre-storage time length, the historical user data comprises the preloading data, and the pre-storage time length of the preloading data is greater than the pre-storage time length, generating the preloading data acquisition request according to the target preloading request configuration information.
7. The method of claim 2, further comprising:
and under the condition that the target preloading request configuration information comprises a pre-storing time length, the historical user data comprises the preloading data, and the pre-storing time length of the preloading data is less than or equal to the pre-storing time length, determining to acquire the preloading data.
8. The method of claim 1, wherein loading the target application page according to the file response data and the preload data comprises:
and under the condition that the preloading data comprises user data to be loaded of the target application page, loading the target application page according to the file response data and the preloading data.
9. The method of claim 8, wherein after the obtaining of the file response data and the preload data from the server, the method further comprises:
under the condition that the file response data and the preloading data are obtained and the preloading data do not comprise target user data in the user data to be loaded, obtaining the target user data from a server;
and loading the target application page according to the file response data, the preloading data and the target user data.
10. The method of claim 1, wherein after the obtaining of the file response data and the preload data from the server, the method further comprises:
and waiting to acquire the preloading data under the condition that the file response data is acquired and the preloading data is not acquired.
11. The method of claim 1, wherein the obtaining the file response data from the server comprises:
creating a container process corresponding to the target application page;
generating a file acquisition request corresponding to the target application page through the container process;
sending the file acquisition request to the server through the container process, wherein the file acquisition request is used for enabling the server to feed back the file response data;
and receiving the file response data fed back by the server through the container process.
12. The method of claim 11, wherein loading the target application page according to the file response data and the preload data comprises:
and loading the target application page through the container process according to the file response data and the preloading data.
13. A page loading apparatus, comprising:
a first obtaining unit, configured to obtain, in response to receiving a page load instruction, file response data from a server, where the page load instruction is used to request loading of a target application page, and the file response data includes a page file of the target application page;
a second obtaining unit configured to obtain, in response to receiving the page loading instruction, preloaded data from the server while obtaining the file response data from the server, the preloaded data including user data of the target application page;
and the first loading unit is configured to load the target application page according to the file response data and the preloading data under the condition that the file response data and the preloading data are obtained.
14. A page loading apparatus, comprising:
a processor;
a memory for storing executable instructions;
wherein the processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the page loading method of any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the page loading method of any of the preceding claims 1-12.
CN202110018206.7A 2021-01-07 2021-01-07 Page loading method, device, equipment and medium Pending CN114741629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110018206.7A CN114741629A (en) 2021-01-07 2021-01-07 Page loading method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110018206.7A CN114741629A (en) 2021-01-07 2021-01-07 Page loading method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114741629A true CN114741629A (en) 2022-07-12

Family

ID=82274108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110018206.7A Pending CN114741629A (en) 2021-01-07 2021-01-07 Page loading method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114741629A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019024754A1 (en) * 2017-08-04 2019-02-07 阿里巴巴集团控股有限公司 Page loading method, device, and system
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
CN111079048A (en) * 2019-12-04 2020-04-28 北京达佳互联信息技术有限公司 Page loading method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019024754A1 (en) * 2017-08-04 2019-02-07 阿里巴巴集团控股有限公司 Page loading method, device, and system
CN109582899A (en) * 2018-10-26 2019-04-05 平安科技(深圳)有限公司 Page loading method, device, computer equipment and storage medium
CN111079048A (en) * 2019-12-04 2020-04-28 北京达佳互联信息技术有限公司 Page loading method and device

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
US11017153B2 (en) Optimizing loading of web page based on aggregated user preferences for web page elements of web page
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
US11687715B2 (en) Summary generation method and apparatus
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN113590974B (en) Recommendation page configuration method and device, electronic equipment and computer readable medium
CN112269959A (en) Display content control method and device, readable medium and electronic equipment
CN111597107A (en) Information output method and device and electronic equipment
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN110619101B (en) Method and apparatus for processing information
CN111597439A (en) Information processing method and device and electronic equipment
CN112307393A (en) Information issuing method and device and electronic equipment
CN112084441A (en) Information retrieval method and device and electronic equipment
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
CN114741629A (en) Page loading method, device, equipment and medium
CN113360704A (en) Voice playing method and device and electronic equipment
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
CN112948108B (en) Request processing method and device and electronic equipment
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN111857879B (en) Data processing method, device, electronic equipment and computer readable medium
CN111953741A (en) Information pushing method and device and electronic equipment
CN116360660A (en) Page resource preloading method, device, equipment and storage medium
CN111381993A (en) Data packet processing method and device and electronic equipment

Legal Events

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