CN111273964B - Data loading method and device - Google Patents

Data loading method and device Download PDF

Info

Publication number
CN111273964B
CN111273964B CN202010093271.1A CN202010093271A CN111273964B CN 111273964 B CN111273964 B CN 111273964B CN 202010093271 A CN202010093271 A CN 202010093271A CN 111273964 B CN111273964 B CN 111273964B
Authority
CN
China
Prior art keywords
data
service
url
service data
loading
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.)
Active
Application number
CN202010093271.1A
Other languages
Chinese (zh)
Other versions
CN111273964A (en
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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202010093271.1A priority Critical patent/CN111273964B/en
Publication of CN111273964A publication Critical patent/CN111273964A/en
Application granted granted Critical
Publication of CN111273964B publication Critical patent/CN111273964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The present disclosure provides a data loading method and apparatus, including: responding to clicking operation of a target link, obtaining a hypertext markup language (html) document corresponding to the target link, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL; and loading the service data on the service template interface after loading the service template interface according to the html document and receiving the service data corresponding to the data resource acquisition request.

Description

Data loading method and device
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a data loading method and device.
Background
After a general user clicks a certain link, the user side can acquire a hypertext markup language (Hyper Text Markup Language, html) document corresponding to the link from a server according to the link clicked by the user, analyze the html document, acquire page data, and load a page according to the acquired page data; after the page data is loaded, the server is sent to obtain corresponding service data according to a uniform resource locator (Uniform Resource Locator, URL) obtained by analyzing the html document, and after the service data returned by the server is received, the returned service data is loaded in the page.
However, in this process, the user end parses the html document, loads the page according to the page data, and obtains the service data sequentially, and after the user end initiates the service data obtaining request to the server, it still needs to wait for a period of time for the server to return the service data, so this method easily causes slow loading of the service data.
Disclosure of Invention
The embodiment of the disclosure at least provides a data loading method and device.
In a first aspect, an embodiment of the present disclosure provides a data loading method, including:
responding to clicking operation of a target link, obtaining a hypertext markup language (html) document corresponding to the target link, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL;
and loading the service data on the service template interface after loading the service template interface according to the html document and receiving the service data corresponding to the data resource acquisition request.
In a possible implementation manner, the determining, according to the target link, at least one first URL corresponding to the target link includes:
and searching the at least one first URL configured for the target link in advance according to the target link.
In a possible implementation manner, after the service template interface is loaded according to the html document and the service data corresponding to the data resource obtaining request is received, loading the service data on the service template interface includes:
after loading the business template interface corresponding to the html document, determining a second URL corresponding to the html document; the second URL belongs to the at least one first URL;
and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, the loading, at the service template interface, the service data corresponding to the received second URL includes:
after a data resource acquisition request is initiated based on the at least one first URL, acquiring service data corresponding to the second URL from service data corresponding to the data resource acquisition request cached locally, and loading the received service data corresponding to the second URL on the service template interface.
In a possible embodiment, the method further comprises:
if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be larger than the preset time interval, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
In a possible embodiment, the method further comprises:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
In a second aspect, an embodiment of the present disclosure further provides a data loading apparatus, including:
the processing module is used for responding to clicking operation of a target link, acquiring a hypertext markup language (html) document corresponding to the target link, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL;
and the loading module is used for loading the service data on the service template interface after the service template interface is loaded according to the html document and the service data corresponding to the data resource acquisition request is received.
In a possible implementation manner, the processing module is configured to, when determining, according to the target link, at least one first URL corresponding to the target link:
and searching the at least one first URL configured for the target link in advance according to the target link.
In a possible implementation manner, the loading module is configured to, after loading the service template interface according to the html document and receiving service data corresponding to the data resource obtaining request, load the service data on the service template interface when:
after loading the business template interface corresponding to the html document, determining a second URL corresponding to the html document; the second URL belongs to the at least one first URL;
and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, the loading module is configured to, when the service template interface loads the received service data corresponding to the second URL:
after a data resource acquisition request is initiated based on the at least one first URL, acquiring service data corresponding to the second URL from service data corresponding to the data resource acquisition request cached locally, and loading the received service data corresponding to the second URL on the service template interface.
In a possible embodiment, the processing module is further configured to:
if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be larger than the preset time interval, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
In a possible embodiment, the processing module is further configured to:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
In a third aspect, embodiments of the present disclosure further provide a computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect, or any of the possible implementations of the first aspect.
In a fourth aspect, the presently disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the first aspect, or any of the possible implementations of the first aspect.
According to the data loading method provided by the embodiment of the disclosure, after the clicking operation for the target link is detected, the html document corresponding to the target link is acquired from the server, the service template interface is loaded according to the html document, the URL corresponding to the target link is determined while the html document is acquired, the data resource acquisition request is initiated according to the URL, the service data can be directly loaded according to the received service data after the service template interface is loaded, and the waiting time in the data loading process is reduced and the data loading efficiency is improved because the service template interface and the service data request are synchronously carried out.
In one implementation manner of the embodiment of the disclosure, when a time interval between a receiving time and a current time of service data is greater than a preset time interval, the service data cached in the local is deleted, and a request for acquiring the service data is reinitiated, so that instantaneity of service data loaded on an interface is ensured.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
FIG. 1 illustrates a flow chart of a data loading method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a business template page schematic diagram provided by an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a data loading apparatus provided by an embodiment of the present disclosure;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
In general, after clicking a link of a user terminal, a user may initiate a page data loading request to a server, and the server may return corresponding page data to the user terminal according to the page data loading request, where the page data is generally in the form of an html document, and after receiving the html document, the user terminal may load a corresponding page according to the html document, where the page does not include specific service data, for example, the page loaded by the html document may include personal information, but only includes attributes such as name, gender, age, and the like, and does not include specific attribute values; therefore, the user end is required to analyze the html document to acquire the URL, and then initiate a data acquisition request according to the URL to acquire the corresponding service data.
In this process, since the loading of the page data and the obtaining of the service data are sequentially performed, after the user side initiates the data obtaining request, the server searches for and returns the corresponding service data according to the received data obtaining request, and in this process, time is required to wait from when the user clicks the link to when the user side initiates the data obtaining request, from when the server receives the data obtaining request to when the server returns the service data to the user side, so that the method is easy to cause slow loading of the service data.
Based on the above, according to the data loading method provided by the present disclosure, after the clicking operation for the target link is detected, the html document corresponding to the target link is obtained from the server, and the service template interface is loaded according to the html document, while the html document is obtained, the URL corresponding to the target link is determined, and the data resource obtaining request is initiated according to the URL, and after the service template interface is loaded, the service data can be directly loaded according to the received service data, and because the service template interface and the requested service data are synchronously carried out, the waiting time in the data loading process is reduced, and the data loading efficiency is improved.
In addition, in the related art, in order to improve the data loading efficiency, a preloading mode is adopted, all the linked service data corresponding to the current page are stored locally in advance, and when a user clicks any link in the current page, the service data stored locally is directly obtained. In this implementation manner, if the user browses the current page for too long, the service data cached in the local area cannot be updated, so that when the user browses the page for a period of time, the data loaded by the clicked link is stored in the local area in advance, and the real-time performance of the data is poor.
In one implementation manner of the embodiment of the disclosure, when a time interval between a receiving time and a current time of service data is greater than a preset time interval, the service data cached in the local is deleted, and a request for acquiring the service data is reinitiated, so that instantaneity of service data loaded on an interface is ensured.
The present invention is directed to a method for manufacturing a semiconductor device, and a semiconductor device manufactured by the method.
The following description of the embodiments of the present disclosure will be made clearly and fully with reference to the accompanying drawings in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present disclosure. The components of the present disclosure, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
For the sake of understanding the present embodiment, first, a detailed description will be given of a data loading method disclosed in the present embodiment, and an execution main body of the data loading method provided in the present embodiment is generally an electronic device with a display capability and a certain computing capability, where the electronic device may be, for example, a smart phone, a personal computer, a tablet computer, or the like.
Referring to fig. 1, a flowchart of a data loading method according to an embodiment of the present disclosure is shown, where the method is applied to a user terminal, and includes the following steps:
step 101, responding to clicking operation of a target link, obtaining a hypertext markup language (html) document corresponding to the target link, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL.
Step 102, loading the service data on the service template interface after loading the service template interface according to the html document and receiving the service data corresponding to the data resource acquisition request.
Among them, click operations on the target link include, but are not limited to, single click, double click, long press, heavy press, and the like. After detecting the clicking operation for the target link, the hypertext link html document corresponding to the target link can be obtained from the server according to the target link, wherein the html document contains page data of a page corresponding to the target link. After receiving the html document returned by the server, the user end can analyze the html document and load a corresponding service template page according to the analyzed html document.
In one possible implementation manner, the html document corresponding to each link may also be stored locally at the user end, and after detecting the clicking operation for the target link, the html document corresponding to the target link may be searched locally.
Specifically, the user side may create a web page view Webview container, then parse the html document based on Webview, and load page data contained in the html document.
The service template page contains the attribute corresponding to the target link, but the service template page does not contain the specific attribute value of the attribute, and an exemplary service template page may be shown in fig. 2, where the attributes of "name", "gender" and "age" are shown in the figure, but the attribute value of each attribute belongs to service data, and the attribute value is null when the service template page is loaded.
When determining at least one first uniform resource locator URL corresponding to the target link based on the target link, the at least one first URL configured for the target link in advance may be searched according to the target link. Specifically, the user terminal may parse the URL of the currently displayed page, and then determine at least one first URL configured for the target link.
It should be noted that, the html document corresponding to the target link is obtained, the service template interface is loaded according to the html document, at least one first uniform resource fee URL corresponding to the target link is determined based on the target link, and the data resource obtaining request is initiated based on the at least one first URL and is executed in parallel at the user side.
After the service template interface is loaded according to the html document and the service data corresponding to the data resource acquisition request is received, when the service template interface is loaded with the service data, the method specifically can be executed in such a way that after the service template interface corresponding to the html document is loaded, a second URL corresponding to the html document is determined, and then the service data corresponding to the received second URL is loaded in the service template interface. Wherein the second URL belongs to one of the first URLs.
In practical application, there may be M types of service data in the page corresponding to the target link, but after the user clicks the target link, the service data required to be currently displayed in the page may be only N types of service data in the M types of service data, so when the service data is loaded, the method provided by the embodiment of the present disclosure loads only the service data corresponding to the second URL.
After the user side initiates the data resource acquisition request based on the first URL, the initiated data resource acquisition request may be cached locally, and if the service data corresponding to any data resource request is received, the received service data is cached locally.
In a possible implementation manner, the loading the service data corresponding to the received second URL in the service template page may be that after the data resource acquisition request is initiated based on at least one first URL, the service data corresponding to the second URL is acquired from the service data corresponding to the data resource acquisition request cached to the local, and the service data corresponding to the received second URL is loaded in the service template interface.
Wherein, the service data corresponding to the data resource obtaining request cached to the local comprises two possible cases, one possible case is that the data resource obtaining request is initiated based on the second URL, and the service data corresponding to the second URL is already received before the service template page is loaded, the received service data is cached in the local (the first URL comprises the second URL, and thus, initiating the data resource obtaining request based on the first URL comprises initiating the data resource obtaining request based on the second URL); another possible case is that the data resource obtaining request is initiated based on the second URL, and the service data corresponding to the second URL is not received before the service template page is loaded, and after the user side waits for a period of time, the service data corresponding to the second URL is received and cached to the local, and then obtained from the local.
Aiming at the first situation, when the service data corresponding to the second URL is loaded in the service template interface, the service data corresponding to the second URL can be directly obtained from the service data cached in the local; for the second case, the user side may wait for the server to return the service data, and after receiving the returned service data, acquire the service data from the local cache when the service data needs to be loaded in the service template interface.
In a possible implementation manner, when the user side obtains the service data corresponding to the second URL to be loaded into the service template interface from the service data cached in the local, the user side may periodically obtain the service data corresponding to the second URL if the service data corresponding to the second URL is stored in the local cache, and load the obtained service data in the service template interface; if the local service data does not include the service data corresponding to the second URL, but the local cache stores the data resource acquisition request initiated based on the second URL, in this case, whether the service data corresponding to the data resource acquisition request is received may be detected from the local cache at intervals of a preset duration.
For example, if the time required for the user side to load the service template interface is 10ms, the time required for initiating the data resource acquisition request until the service data returned by the server is received is 20ms, and if the service template interface is loaded first and then the data resource acquisition request is initiated, the time required for the user side to receive the service data is 10ms+20ms=30ms; based on the method provided by the disclosure, the user side initiates the data resource acquisition request while loading the service template interface, so that the user side can acquire the service data only by waiting for 10ms after loading the service template interface, and the time required for receiving the service data by the user side is 20ms, so that the method provided by the disclosure can improve the data loading efficiency.
In practical application, after the Webview loads the service template interface, the Webview can request service data through the JS based on the second URL, but at the same time, the user side intercepts the JS request and then judges whether the data resource acquisition request cached in the local is matched with the JS request, if the data resource acquisition request matched with the JS request exists in the local, and the service data corresponding to the data resource acquisition request is cached in the local, the service data is directly used as the service data corresponding to the JS request, and the service data is loaded in the service template interface; if there is a data resource acquisition request matched with the JS request in the local area, but the service data corresponding to the data resource acquisition request is not cached in the local area, the user side may wait for the server to return the service data corresponding to the data resource acquisition request, and load the received service data in the service template interface after receiving the service data returned by the server.
In another possible implementation manner of the disclosure, if the data resource acquisition request is initiated based on the second URL and the service data corresponding to the second URL is not received before the service template page is loaded, if the time interval between the initiation time corresponding to the data resource acquisition request and the current time exceeds the preset time interval, the data resource acquisition request is initiated again based on the second URL.
In another implementation manner, if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be greater than the preset time interval, in order to ensure the real-time performance of the data, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
In summary, the service data loaded on the service template interface may include the following cases:
in the first case, a data resource acquisition request is initiated based on the second URL, and service data fed back by the server based on the data resource acquisition request is not received.
And secondly, a data resource acquisition request is initiated based on the second URL, service data corresponding to the data resource acquisition request is stored in a local cache, and the time interval between the receiving time of the service data and the current time is smaller than or equal to a preset time interval.
And thirdly, initiating a data resource acquisition request based on the second URL, wherein business data corresponding to the data resource acquisition request is stored in a local cache, and the time interval between the receiving time of the business data and the current time is larger than a preset time interval.
Because the service data acquisition and the service template loading interface are synchronously executed, if the loading time process of the service template interface is 10S, for example, and the time required for acquiring the service data is 2S, when the service template interface loads the service data, the locally cached service data is 8S service data before the current moment, and because the data change is more frequent, when the time interval between the receiving moment of the service data and the current moment is greater than the preset time interval, the data resource acquisition request can be initiated again based on the second URL so as to acquire the service data corresponding to the second URL again, thereby further ensuring the real-time performance of the service data.
In one possible implementation manner, after receiving the service data corresponding to any data resource request, the service data corresponding to the data resource acquisition request may be cached locally, and in order to improve the utilization rate of the cached service data locally, when a time interval between a time point of receiving the service data and a current time point is greater than a preset time interval, the cached service data and the data resource acquisition request corresponding to the service data may be deleted.
According to the data loading method provided by the embodiment of the disclosure, after the clicking operation for the target link is detected, the html document corresponding to the target link is acquired from the server, the service template interface is loaded according to the html document, the URL corresponding to the target link is determined while the html document is acquired, the data resource acquisition request is initiated according to the URL, the service data can be directly loaded according to the received service data after the service template interface is loaded, and the waiting time in the data loading process is reduced and the data loading efficiency is improved because the service template interface and the service data request are synchronously carried out.
In one implementation manner of the embodiment of the disclosure, when a time interval between a receiving time and a current time of service data is greater than a preset time interval, the service data cached in the local is deleted, and a request for acquiring the service data is reinitiated, so that instantaneity of service data loaded on an interface is ensured.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, the embodiments of the present disclosure further provide a data loading device corresponding to the data loading method, and since the principle of the device in the embodiments of the present disclosure for solving the problem is similar to that of the data loading method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, a schematic diagram of a data loading device according to an embodiment of the disclosure is shown, where the device includes: a processing module 301, a loading module 302; wherein,
the processing module 301 is configured to respond to a click operation of a target link, obtain a hypertext markup language html document corresponding to the target link, and load a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL;
and the loading module 302 is configured to load the service data on the service template interface after the service template interface is loaded according to the html document and the service data corresponding to the data resource acquisition request is received.
In a possible implementation manner, the processing module 301 is configured to, when determining, according to the target link, at least one first URL corresponding to the target link:
and searching the at least one first URL configured for the target link in advance according to the target link.
In a possible implementation manner, the loading module 302 is configured to, after loading the service template interface according to the html document and receiving the service data corresponding to the data resource obtaining request, load the service data on the service template interface when:
after loading the business template interface corresponding to the html document, determining a second URL corresponding to the html document; the second URL belongs to the at least one first URL;
and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, the loading module 302 is configured to, when the service template interface loads the received service data corresponding to the second URL:
after a data resource acquisition request is initiated based on the at least one first URL, acquiring service data corresponding to the second URL from service data corresponding to the data resource acquisition request cached locally, and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, the processing module 301 is further configured to:
if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be larger than the preset time interval, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
In a possible implementation manner, the processing module 301 is further configured to:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
Based on the same technical concept, the embodiment of the application also provides electronic equipment. Referring to fig. 4, a schematic structural diagram of an electronic device according to an embodiment of the present application includes a processor 401, a memory 402, and a bus 403. The memory 402 is configured to store execution instructions, including a memory 4021 and an external memory 4022; the memory 4021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 401 and data exchanged with the external memory 4022 such as a hard disk, the processor 401 exchanges data with the external memory 4022 through the memory 4021, and when the electronic device 400 operates, the processor 401 and the memory 402 communicate with each other through the bus 403, so that the processor 401 executes the following instructions:
responding to clicking operation of a target link, obtaining a hypertext markup language (html) document corresponding to the target link, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request based on the at least one first URL;
and loading the service data on the service template interface after loading the service template interface according to the html document and receiving the service data corresponding to the data resource acquisition request.
In a possible implementation manner, in the instructions executed by the processor 401, the determining, according to the target link, at least one first URL corresponding to the target link includes:
and searching the at least one first URL configured for the target link in advance according to the target link.
In a possible implementation manner, in the instructions executed by the processor 401, after the service template interface is loaded according to the html document and the service data corresponding to the data resource obtaining request is received, loading the service data on the service template interface includes:
after loading the business template interface corresponding to the html document, determining a second URL corresponding to the html document; the second URL belongs to the at least one first URL;
and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, in the instructions executed by the processor 401, the loading, at the service template interface, the service data corresponding to the received second URL includes:
after a data resource acquisition request is initiated based on the at least one first URL, acquiring service data corresponding to the second URL from service data corresponding to the data resource acquisition request cached locally, and loading the received service data corresponding to the second URL on the service template interface.
In a possible implementation manner, in an instruction executed by the processor 401, the method further includes:
if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be larger than the preset time interval, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
In a possible implementation manner, in an instruction executed by the processor 401, the method further includes:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data loading method described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The computer program product of the data loading method provided in the embodiments of the present disclosure includes a computer readable storage medium storing program codes, where the instructions included in the program codes may be used to execute the steps of the data loading method described in the above method embodiments, and specifically, reference may be made to the above method embodiments, which are not described herein.
The disclosed embodiments also provide a computer program which, when executed by a processor, implements any of the methods of the previous embodiments. The computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, but the present disclosure is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, it is not limited to the disclosure: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (9)

1. The data loading method is characterized by being applied to a user side and comprising the following steps:
responding to clicking operation of a target link, the user side obtains a hypertext markup language html document corresponding to the target link from a server, and locally loads a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request to the server based on the at least one first URL;
after the user side loads the service template interface according to the html document and receives service data corresponding to the data resource acquisition request, the user side locally loads the service data on the service template interface; wherein, the request of the business data and the loading of the business template interface are synchronously executed;
after the user side loads the service template interface according to the html document and receives the service data corresponding to the data resource obtaining request, the user side loads the service data on the service template interface, including:
after loading the service template interface corresponding to the html document, the user side determines a second URL corresponding to the html document; the second URL belongs to the at least one first URL;
and the user side loads the received service data corresponding to the second URL on the service template interface.
2. The method according to claim 1, wherein determining at least one first URL corresponding to the target link according to the target link comprises:
and searching the at least one first URL configured for the target link in advance according to the target link.
3. The method according to claim 1, wherein loading the service data corresponding to the received second URL at the service template interface includes:
after a data resource acquisition request is initiated based on the at least one first URL, acquiring service data corresponding to the second URL from service data corresponding to the data resource acquisition request cached locally, and loading the received service data corresponding to the second URL on the service template interface.
4. A method according to claim 3, characterized in that the method further comprises:
if the time interval between the receiving time and the current time of the service data corresponding to the second URL cached locally is detected to be larger than the preset time interval, a data resource acquisition request is initiated again based on the second URL, and the received service data is loaded on the service template interface.
5. The method according to claim 1, wherein the method further comprises:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
6. A data loading device, applied to a user terminal, comprising:
the processing module is used for responding to clicking operation of a target link, acquiring a hypertext markup language (html) document corresponding to the target link from a server, and loading a service template interface according to the html document; and determining at least one first Uniform Resource Locator (URL) corresponding to the target link based on the target link, and initiating a data resource acquisition request to the server based on the at least one first URL;
the loading module is used for loading the service template interface according to the html document, and loading the service data on the service template interface after receiving the service data corresponding to the data resource acquisition request; wherein, the request of the business data and the loading of the business template interface are synchronously executed;
the loading module is used for loading the service data on the service template interface after loading the service template interface according to the html document and receiving the service data corresponding to the data resource acquisition request, wherein the loading module is used for:
after loading the business template interface corresponding to the html document, determining a second URL corresponding to the html document; the second URL belongs to the at least one first URL; and loading the received service data corresponding to the second URL on the service template interface.
7. The apparatus of claim 6, wherein the processing module is further configured to:
the data resource acquisition request is cached locally; after receiving the service data corresponding to the data resource acquisition request, caching the service data corresponding to the data resource acquisition request in a local area;
and deleting the cached service data and the data resource acquisition request corresponding to the service data when the time interval between the moment of receiving the service data and the current moment is detected to be larger than the preset time interval.
8. A computer device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via the bus when the computer device is running, said machine readable instructions when executed by said processor performing the steps of the data loading method according to any of claims 1 to 5.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the data loading method according to any of claims 1 to 5.
CN202010093271.1A 2020-02-14 2020-02-14 Data loading method and device Active CN111273964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010093271.1A CN111273964B (en) 2020-02-14 2020-02-14 Data loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010093271.1A CN111273964B (en) 2020-02-14 2020-02-14 Data loading method and device

Publications (2)

Publication Number Publication Date
CN111273964A CN111273964A (en) 2020-06-12
CN111273964B true CN111273964B (en) 2024-03-08

Family

ID=70997139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010093271.1A Active CN111273964B (en) 2020-02-14 2020-02-14 Data loading method and device

Country Status (1)

Country Link
CN (1) CN111273964B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111880860A (en) * 2020-07-28 2020-11-03 北京浪潮数据技术有限公司 Service processing method, device and related equipment
CN112395533A (en) * 2020-11-18 2021-02-23 北京字节跳动网络技术有限公司 Page loading method and device, computer equipment and readable storage medium

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093193B1 (en) * 2000-10-30 2006-08-15 Microsoft Corporation String template pages for generating HTML document
CN101165685A (en) * 2006-10-19 2008-04-23 国际商业机器公司 Dynamic web page generation method and system
KR20090069589A (en) * 2007-12-26 2009-07-01 (주) 디아이지 커뮤니케이션 System and method for transcoding webpage by mobile environment
CN103455473A (en) * 2012-05-30 2013-12-18 刘继业 WEB form definition and application method based on hypertext markup language (HTML)
CN103500199A (en) * 2013-09-24 2014-01-08 北京大学 Webpage rendering accelerating method and system based on pre-loaded Cloud template
CN103984686A (en) * 2013-02-07 2014-08-13 阿里巴巴集团控股有限公司 Page-switching method and device
CN104933020A (en) * 2015-07-17 2015-09-23 北京奇虎科技有限公司 Method and device for generating target documents based on template
CN105630992A (en) * 2015-12-25 2016-06-01 网易(杭州)网络有限公司 Scene display method and device in static page
WO2017107620A1 (en) * 2015-12-23 2017-06-29 北京奇虎科技有限公司 Method and system for loading page data
CN107122398A (en) * 2017-03-17 2017-09-01 武汉斗鱼网络科技有限公司 A kind of data display chart generation method and system
CN107291940A (en) * 2017-07-07 2017-10-24 腾讯科技(深圳)有限公司 Content of pages management method, device and associated server
CN108287839A (en) * 2017-01-09 2018-07-17 阿里巴巴集团控股有限公司 A kind of page loading method and equipment
CN109036397A (en) * 2018-06-29 2018-12-18 百度在线网络技术(北京)有限公司 The method and apparatus of content for rendering
CN109684586A (en) * 2018-11-21 2019-04-26 平安科技(深圳)有限公司 Page layout optimization display methods, device, computer equipment and storage medium
CN110168539A (en) * 2017-01-13 2019-08-23 微软技术许可有限责任公司 Fast Page load in mixing application
CN110162720A (en) * 2019-04-16 2019-08-23 平安科技(深圳)有限公司 Webpage loading method, device, computer equipment and storage medium
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020188633A1 (en) * 2001-06-06 2002-12-12 Craig Davis Generating HTML using templates and cached files
US20150188981A1 (en) * 2013-12-31 2015-07-02 Huawei Technologies Co., Ltd. Page processing method, apparatus, and system
CN107526751A (en) * 2016-06-22 2017-12-29 广州市动景计算机科技有限公司 Loading method, client, web page server and the programmable device of webpage

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093193B1 (en) * 2000-10-30 2006-08-15 Microsoft Corporation String template pages for generating HTML document
CN101165685A (en) * 2006-10-19 2008-04-23 国际商业机器公司 Dynamic web page generation method and system
KR20090069589A (en) * 2007-12-26 2009-07-01 (주) 디아이지 커뮤니케이션 System and method for transcoding webpage by mobile environment
CN103455473A (en) * 2012-05-30 2013-12-18 刘继业 WEB form definition and application method based on hypertext markup language (HTML)
CN103984686A (en) * 2013-02-07 2014-08-13 阿里巴巴集团控股有限公司 Page-switching method and device
CN103500199A (en) * 2013-09-24 2014-01-08 北京大学 Webpage rendering accelerating method and system based on pre-loaded Cloud template
CN104933020A (en) * 2015-07-17 2015-09-23 北京奇虎科技有限公司 Method and device for generating target documents based on template
WO2017107620A1 (en) * 2015-12-23 2017-06-29 北京奇虎科技有限公司 Method and system for loading page data
CN105630992A (en) * 2015-12-25 2016-06-01 网易(杭州)网络有限公司 Scene display method and device in static page
CN108287839A (en) * 2017-01-09 2018-07-17 阿里巴巴集团控股有限公司 A kind of page loading method and equipment
CN110168539A (en) * 2017-01-13 2019-08-23 微软技术许可有限责任公司 Fast Page load in mixing application
CN107122398A (en) * 2017-03-17 2017-09-01 武汉斗鱼网络科技有限公司 A kind of data display chart generation method and system
CN107291940A (en) * 2017-07-07 2017-10-24 腾讯科技(深圳)有限公司 Content of pages management method, device and associated server
CN109036397A (en) * 2018-06-29 2018-12-18 百度在线网络技术(北京)有限公司 The method and apparatus of content for rendering
CN109684586A (en) * 2018-11-21 2019-04-26 平安科技(深圳)有限公司 Page layout optimization display methods, device, computer equipment and storage medium
CN110162720A (en) * 2019-04-16 2019-08-23 平安科技(深圳)有限公司 Webpage loading method, device, computer equipment and storage medium
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110618850A (en) * 2019-08-30 2019-12-27 北京浪潮数据技术有限公司 UI (user interface) loading method and system and related device
CN110688600A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium

Also Published As

Publication number Publication date
CN111273964A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN106294648B (en) Processing method and device for page access path
US9729499B2 (en) Browser and method for domain name resolution by the same
US9426200B2 (en) Updating dynamic content in cached resources
US20170323025A1 (en) Browser acceleration method and browser device having accelerator
CN104572777B (en) Webpage loading method and device based on UIWebView component
CN109684575A (en) Processing method and processing device, storage medium, the computer equipment of web data
CN110245069B (en) Page version testing method and device and page display method and device
CN105095280A (en) Caching method and apparatus for browser
CN103530292A (en) Webpage displaying method and device
CN111273964B (en) Data loading method and device
CN110990736A (en) Page loading method and device, terminal equipment and storage medium
CN111638922A (en) Page resource loading method and device
CN104980512A (en) Method and equipment for providing target object based on mobile application
CN105528369B (en) Webpage code-transferring method, device and server
CN108256014A (en) Page display method and device
US20180357326A1 (en) Systems and methods for prefetching dynamic urls
US11720407B2 (en) Resource pre-fetch using age threshold
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN104915404A (en) Method and device for accessing invalid website
US10095791B2 (en) Information search method and apparatus
CN113438302A (en) Dynamic resource multi-level caching method, system, computer equipment and storage medium
US9253279B2 (en) Preemptive caching of data
CN106919600A (en) One kind failure network address access method and terminal
CN112672187B (en) Page generation method and device, computer equipment and readable storage medium
KR101175168B1 (en) Apparatus and method for searching a plurality of web-sites through a web-site in the terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant