WO2017206417A1 - 页面资源加载方法、装置和系统 - Google Patents

页面资源加载方法、装置和系统 Download PDF

Info

Publication number
WO2017206417A1
WO2017206417A1 PCT/CN2016/102214 CN2016102214W WO2017206417A1 WO 2017206417 A1 WO2017206417 A1 WO 2017206417A1 CN 2016102214 W CN2016102214 W CN 2016102214W WO 2017206417 A1 WO2017206417 A1 WO 2017206417A1
Authority
WO
WIPO (PCT)
Prior art keywords
template file
advertisement
combined
file information
template
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.)
Ceased
Application number
PCT/CN2016/102214
Other languages
English (en)
French (fr)
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.)
Le Holdings Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeTV Information Technology Beijing 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 Le Holdings Beijing Co Ltd, LeTV Information Technology Beijing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017206417A1 publication Critical patent/WO2017206417A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the embodiments of the present invention relate to the field of Internet technologies, and in particular, to a page resource loading method, apparatus, and system.
  • advertisements in the webpage are usually loaded in the form of an advertisement template, and the advertisement material to be presented is presented to the user on the webpage according to the presentation manner defined by the advertisement template file.
  • the advertisement plugin presents the advertisement on the webpage according to the advertisement template file.
  • most of the cases will include multiple types of advertisements, such as advertisements statically embedded in the page, gif advertisements dynamically displayed on the page, flash advertisements, and the like. Each type of ad corresponds to an ad template file.
  • the advertisement plug-in processes a plurality of advertisement template files
  • the plurality of advertisement template files are usually requested to the server multiple times. For example, if the page includes three types of advertisements, the advertisement plug-in needs to request the server three times to download the corresponding three advertisement template files respectively, and the existing advertisement loading method causes the advertisement to load the network resources due to the number of requests and responses. The consumption is large, which also affects the loading speed of other main page resources in the page, so that the overall page loading speed is slow.
  • the multiple times of advertisement loading not only slows itself, but also affects the main page resources, so that the loading speed of the overall page accessed by the user is slow, and the user access experience is poor.
  • the technical problem to be solved by the embodiment of the present invention is to provide a page resource loading method, which can effectively improve the loading speed of the entire page, and reduce the number of requests for the advertisement plug-in to request the advertisement template file from the advertisement server and the occupied network bandwidth resources. .
  • a technical problem to be solved by the embodiment of the present invention is to provide a page resource loading device, which can effectively increase the loading speed of the entire page, and reduce the number of requests for the advertisement plug-in to request the advertisement template file from the advertisement server and the occupied network bandwidth. Resources.
  • a technical problem to be solved by the embodiment of the present invention is to provide a page resource loading system, which can effectively improve the loading speed of the entire page, and reduce the number of requests and the network bandwidth occupied by the advertisement plug-in in requesting the advertisement template file from the advertisement server. Resources.
  • the embodiment of the present invention first provides a page resource loading method, including:
  • the combined template file includes at least two advertisement template files corresponding to the at least two advertisement template file information
  • the combined template file is disassembled into the at least two advertisement template files, and the advertisement is loaded according to the at least two advertisement template files.
  • the splicing the at least two advertisement template file names to form the combined template file information is specifically:
  • the embodiment of the present invention further provides a page resource loading apparatus, including:
  • a template file obtaining module configured to obtain at least two advertisement template file information
  • a request sending module splicing the at least two advertisement template file information to form combined template file information, and then sending an advertisement template request, where the advertisement template request includes the combined template file information;
  • the combination template receiving module receives the combined template file, and the combined template file includes at least two advertisement template files corresponding to the at least two advertisement template file information;
  • Disassembling and loading the module disassembling the combined template file into the at least two advertisement template files, and loading the advertisement according to the at least two advertisement template files.
  • the request sending module includes:
  • the sorting and splicing unit performs hash sorting on the at least two advertisement template file information and splicing into the combined template file information.
  • an embodiment of the present invention further provides an electronic device, including:
  • the first processor ;
  • the first memory stores program instructions executable by the first processor, the first processor invoking the program instructions to perform the method described above.
  • a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to execute The above method.
  • a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the methods described above.
  • an embodiment of the present invention further provides a page resource loading method, including:
  • the advertisement template request includes combined template file information, and the combined template file information includes at least two spliced advertisement template file information;
  • the acquiring the combined template file is specifically: acquiring the combined template file from the cache according to the combined template file information.
  • the acquiring the combined template file is specifically:
  • the at least two advertisement template files are spliced into the combined template file.
  • the obtaining the combined template file further includes:
  • the combined template file information and the combined template file corresponding to the combined template file information are cached.
  • the splicing the at least two advertisement template files into the combined template file is specifically: hashing the at least two advertisement template files to obtain the combined template file.
  • the embodiment of the present invention further provides a page resource loading apparatus, including:
  • an advertisement template request includes combined template file information, where the combined template file information includes at least two spliced advertisement template file information
  • a combined template obtaining module configured to obtain a combined template file according to the combined template file information, where the combined template file includes at least two spliced template templates corresponding to the at least two advertisement template file information;
  • the combined template sending module sends the combined template file.
  • the combined template obtaining module includes: a combined template file acquiring unit, and acquiring the combined template file from the cache according to the combined template file information.
  • the combined template acquisition module includes:
  • the advertisement template file obtaining unit acquires at least two advertisement template files corresponding to the at least two advertisement template file information according to the combined template file information;
  • a splicing unit splicing the at least two advertisement template files into the combined template file.
  • the combined template acquisition module further includes:
  • a cache unit that caches the combined template file information and a combined template file corresponding to the combined template file information.
  • the splicing unit includes:
  • Sorting component hashing the at least two advertisement template files to obtain the combined template file.
  • an embodiment of the present invention further provides an electronic device, including:
  • the second memory stores program instructions executable by the second processor, the second processor invoking the program instructions to perform the method described above.
  • a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to execute The above method.
  • a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the methods described above.
  • the embodiment of the present invention further provides a page resource loading system, including:
  • a template file obtaining module configured to obtain at least two advertisement template file information
  • a request sending module splicing the at least two advertisement template file information to form combined template file information, and then sending an advertisement template request, where the advertisement template request includes the combined template file information;
  • an advertisement template request includes combined template file information, where the combined template file information includes at least two spliced advertisement template file information
  • a combined template obtaining module configured to obtain a combined template file according to the combined template file information, where the combined template file includes at least two spliced template templates corresponding to the at least two advertisement template file information;
  • a combined template sending module sending the combined template file
  • the combination template receiving module receives the combined template file, and the combined template file includes at least two advertisement template files corresponding to the at least two advertisement template file information;
  • Disassembling and loading the module disassembling the combined template file into the at least two advertisement template files, and loading the advertisement according to the at least two advertisement template files.
  • the request sending module includes:
  • the sorting and splicing unit performs hash sorting on the at least two advertisement template file information and splicing into the combined template file information.
  • the combined template obtaining module includes: a combined template file acquiring unit, and acquiring the combined template file from the cache according to the combined template file information.
  • the combined template acquisition module includes:
  • An advertisement template file obtaining unit according to the combined template file information, obtaining and At least two advertisement template files corresponding to two advertisement template file information;
  • a splicing unit splicing the at least two advertisement template files into the combined template file.
  • the combined template acquisition module further includes:
  • a cache unit that caches the combined template file information and a combined template file corresponding to the combined template file information.
  • the splicing unit includes:
  • Sorting component hashing the at least two advertisement template files to obtain the combined template file.
  • the present invention has the following beneficial effects: the page resource loading method, device and system according to the embodiment of the present invention can obtain the combined template file correspondingly only by sending an advertisement template request including the combined template file information, and then After the split template file is disassembled into at least two advertisement template files, the advertisement is loaded according to the at least two advertisement template files.
  • the whole process has fewer links, and only needs to send an advertisement template request, which effectively reduces the network bandwidth resources used by the advertisement template request and improves the loading speed of the entire page resource.
  • FIG. 1 is a flowchart of processing of an embodiment of a page resource loading method according to the present invention.
  • FIG. 2 is a block diagram of a block diagram of an embodiment of a page resource loading apparatus of the present invention.
  • FIG. 3 is a block diagram of an embodiment of a request sending module of a page resource loading device of the present invention.
  • FIG. 4 is a flowchart of processing of another embodiment of a page resource loading method according to the present invention.
  • FIG. 5 is a block diagram of another embodiment of a page resource loading apparatus according to the present invention.
  • FIG. 6 is a block diagram of an embodiment of a combined template acquisition module of a page resource loading apparatus according to the present invention.
  • FIG. 7 is a block diagram of another embodiment of a combined template acquisition module of a page resource loading apparatus according to the present invention.
  • FIG. 8 is a block diagram of a splicing unit in a combined template acquisition module of a page resource loading apparatus according to the present invention.
  • FIG. 9 is a block diagram of a page resource loading system of the present invention.
  • FIG. 10 is a schematic diagram of an embodiment of a request sending module of a page resource loading system according to the present invention. Block diagram.
  • FIG. 11 is a block diagram of an embodiment of a combined template acquisition module of a page resource loading system of the present invention.
  • FIG. 12 is a block diagram of another embodiment of a combined template acquisition module of a page resource loading system of the present invention.
  • FIG. 13 is a block diagram of a splicing unit in a combined template acquisition module of a page resource loading system according to the present invention
  • FIG. 14 is a logic block diagram of an electronic device according to an embodiment of the present invention.
  • Figure 15 is a logic block diagram of an electronic device in accordance with one embodiment of the present invention.
  • the invention relates to a page resource loading method, device and system.
  • a user opens a page on a client through a browser (or other application), and when the page is loaded, the page body resource in the page is loaded (ie, except for the advertisement) Other page information) and advertisements, the page body resources and advertisements are stored on the server.
  • the page resource loading method of the present invention delays the loading time of the advertisement, and then requests the server after loading the main resource of the page. Load the ad.
  • the pages that need to be loaded usually include at least two types of advertisements, and the presentation of these advertisements usually involves two parts of content, one part is advertisement material data, such as specific advertisement text, picture, etc., and the other part is advertisement template data, which is used for Defining how to present the above advertising material, such as displaying the advertisement in a square area at a certain position on the page, or presenting the advertisement in a dynamic manner, or A few advertisement images are displayed in a certain area in turn, that is, the specific presentation manner of the advertisement is limited.
  • advertisement material data such as specific advertisement text, picture, etc.
  • advertisement template data which is used for Defining how to present the above advertising material, such as displaying the advertisement in a square area at a certain position on the page, or presenting the advertisement in a dynamic manner, or A few advertisement images are displayed in a certain area in turn, that is, the specific presentation manner of the advertisement is limited.
  • the server may be a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of computers or network servers.
  • the embodiment of the present invention first provides a method for loading a page resource, and the method for loading a page resource includes:
  • Step S101 acquiring at least two advertisement template file information
  • Step S102 splicing the at least two advertisement template file information to form combined template file information, and sending an advertisement template request, where the advertisement template request includes the combined template file information;
  • Step S103 receiving a combined template file, where the combined template file includes at least two advertisement template files corresponding to the at least two advertisement template file information;
  • Step S104 disassembling the combined template file into the at least two advertisement template files, and loading an advertisement according to the at least two advertisement template files.
  • the page resource loading method of the embodiment of the present invention only needs to send an advertisement template request including the combined template file information, so that the combined template file can be obtained correspondingly, and then the split template file is disassembled into at least two advertisement template files.
  • the advertisement is loaded according to the at least two advertisement template files.
  • the whole process has fewer links, and only needs to send an advertisement template request, which effectively reduces the network bandwidth resources used by the advertisement template request and improves the loading speed of the entire page resource.
  • step S102 the splicing the at least two advertisement template file names to form the combined template file information is specifically:
  • the purpose of splicing in step S102 is to implement a request for all advertisement template files by one request.
  • the server needs to send three requests to the server, respectively requesting to download the three files, which consumes a large amount of network resources.
  • only the sending is required.
  • One request request these three files at the same time, correspondingly, the server will return these three files to the client at one time, reducing resources Consumption.
  • an embodiment of the present invention further provides a page resource loading device, including:
  • the template file obtaining module 10 is configured to obtain at least two advertisement template file information
  • the request sending module 12 is configured to splicing the at least two advertisement template file information to form combined template file information, and then sending an advertisement template request, where the advertisement template request includes the combined template file information;
  • the combined template receiving module 14 receives the combined template file, and the combined template file includes at least two advertising template files corresponding to the at least two advertising template file information;
  • the disassembly and loading module 16 disassembles the combined template file into the at least two advertisement template files, and loads an advertisement according to the at least two advertisement template files.
  • the page resource loading apparatus provided by the embodiment of the present invention can obtain the combined template file correspondingly by sending the advertisement template request including the combined template file information by the request sending module 12, and then disassembling the combined template file into at least two The advertisement template file is then loaded with the advertisement according to the at least two advertisement template files.
  • the whole process has fewer links, and only needs to send an advertisement template request, which effectively reduces the network bandwidth resources used by the advertisement template request and improves the loading speed of the entire page resource.
  • the request sending module 12 includes:
  • the sorting and splicing unit 120 performs hash sorting on the at least two advertisement template file information and splicing into the combined template file information.
  • the embodiment of the present invention further provides a page resource loading method, including:
  • Step S201 Receive an advertisement template request, where the advertisement template request includes combined template file information, where the combined template file information includes at least two spliced advertisement template file information;
  • Step S202 Acquire, according to the combined template file information, a combined template file, where the combined template file includes at least two advertisement template files that are spliced corresponding to the at least two advertisement template file information;
  • Step S203 transmitting the combined template file.
  • the page resource loading method is described from the perspective of the server.
  • only the corresponding advertisement template request sent by the requesting party is received, and the combined template file can be quickly obtained, and then sent back to the requesting party.
  • There are few links in the whole process which can effectively reduce the network bandwidth resources used by sending the combined template files and improve the loading speed of the page resources.
  • the acquiring the combined template file is specifically: acquiring the combined template file from the cache according to the combined template file information.
  • the combined template file itself is saved in a combined form, so that when the combined template file is obtained, it is only required to obtain directly from the cache, and the efficiency is higher.
  • the acquiring the combined template file is specifically:
  • the at least two advertisement template files are spliced into the combined template file.
  • the acquiring the combined template file may further include:
  • the combined template file information and the combined template file corresponding to the combined template file information are cached.
  • the splicing the at least two advertisement template files into the combined template file may be: hashing the at least two advertisement template files to obtain the combined template file.
  • At least two advertisement template files constituting the combined template file are separately saved, so that the at least two advertisement template files need to be acquired first and then spliced to form a combined template file, which is more in processing.
  • Some processing links but it is more conducive to more flexible combination of each advertising template file to obtain various combined template files according to requirements.
  • the cache processing can facilitate the next time the same request is received (that is, the combined template file is requested), and is directly taken out from the cache, and does not need to be spliced again, which is advantageous for improving the acquisition speed of the combined template file.
  • performing hash sorting when splicing the at least two advertisement template files is beneficial to the unified precise query rule, and is beneficial to data exchange processing between the server and the client.
  • the embodiment of the present invention further provides a page resource loading device, including:
  • the request receiving module 20 receives an advertisement template request, the advertisement template request includes combined template file information, and the combined template file information includes at least two spliced advertisement template file information;
  • the combined template obtaining module 22 is configured to obtain a combined template file according to the combined template file information, where the combined template file includes the spliced at least two advertising template files corresponding to the at least two advertising template file information;
  • the combined template sending module 24 transmits the combined template file.
  • the page resource loading device of the embodiment of the present invention only needs to receive the corresponding advertisement template request sent by the requesting party by the request receiving module 20, and can quickly obtain the combined template file and then send it back to the requesting party. There are few links in the whole process, which can effectively reduce the network bandwidth resources used by sending the combined template files and improve the loading speed of the page resources.
  • the combined template obtaining module 22 includes: a combined template file acquiring unit 220, and acquiring the combined template file from the cache according to the combined template file information.
  • the combined template file itself is saved in a combined form, so that when the combined template file is obtained, it is only required to obtain directly from the cache, and the efficiency is higher.
  • the combined template obtaining module 22 includes:
  • the advertisement template file obtaining unit 222 acquires at least two advertisement template files corresponding to the at least two advertisement template file information according to the combined template file information;
  • the splicing unit 224 splices the at least two advertisement template files into the combined template file.
  • the splicing unit 224 may further include:
  • the sorting component 2240 performs hash sorting on the at least two advertisement template files to obtain the combined template file with a uniform rule.
  • the combined template acquisition module 22 may further include:
  • the cache unit 226 caches the combined template file information and the combined template file corresponding to the combined template file information.
  • the combined template acquisition module 22 needs to obtain the combined template file first. Taking at least two advertisement template files and then splicing to form a combined template file, although this method has more processing steps, it is more advantageous to more flexibly combine the advertisement template files according to requirements to obtain various types. Combine template files.
  • the cache processing can facilitate the next time the same request is received (that is, the combined template file is requested), and is directly taken out from the cache, and does not need to be spliced again, which is advantageous for improving the acquisition speed of the combined template file.
  • performing hash sorting when splicing the at least two advertisement template files is beneficial to the unified precise query rule, and is beneficial to data exchange processing between the server and the client.
  • the embodiment of the present invention further provides a page resource loading system 3, which is correspondingly deployed on a server and a client, and specifically combines the foregoing page resource loading devices 1 and 2 to form the page resource loading system 3
  • the page resource loading system includes:
  • the template file obtaining module 30 is configured to obtain at least two advertisement template file information
  • the request sending module 31 is configured to splicing the at least two advertisement template file information to form combined template file information, and then sending an advertisement template request, where the advertisement template request includes the combined template file information;
  • the request receiving module 32 receives an advertisement template request, the advertisement template request includes combined template file information, and the combined template file information includes at least two spliced advertisement template file information;
  • the combined template obtaining module 33 is configured to obtain a combined template file according to the combined template file information, where the combined template file includes at least two spliced template templates corresponding to the at least two advertisement template file information;
  • the combined template sending module 34 sends the combined template file
  • the combined template receiving module 35 receives the combined template file, and the combined template file includes at least two advertising template files corresponding to the at least two advertising template file information;
  • the disassembly and loading module 36 disassembles the combined template file into the at least two advertisement template files, and loads the advertisement according to the at least two advertisement template files.
  • the page resource loading system 3 of the embodiment of the present invention only needs to send a corresponding advertisement template request by the request sending module 31 located on the client, and the request receiving module 32 can quickly obtain the combined template file after receiving the advertisement template request. And then sent back to the client, the client can disassemble the combined template file to load the advertisement. There are few links in the whole process, and only need to send an advertisement template request to get the combined template file, which can effectively reduce the sending request.
  • the network bandwidth resource occupied by the combined template file is summed to improve the loading speed of the page resource.
  • the request sending module 31 includes:
  • the sorting and splicing unit 310 performs hash sorting on the at least two advertisement template file information and splicing into the combined template file information.
  • the combined template obtaining module 33 includes: a combined template file acquiring unit 330, and acquiring the combined template file from the cache according to the combined template file information.
  • the combined template file is saved in a combined form, so that when the combined template file is obtained, it is only required to be directly obtained from the cache, and the efficiency is higher.
  • the combined template acquisition module 33 includes:
  • the advertisement template file obtaining unit 332 acquires at least two advertisement template files corresponding to the at least two advertisement template file information according to the combined template file information;
  • the splicing unit 334 splices the at least two advertisement template files into the combined template file.
  • the splicing unit 334 may further include:
  • the sorting component 3340 performs hash sorting on the at least two advertisement template files to obtain the combined template file.
  • the combined template obtaining module 33 further includes:
  • the cache unit 336 caches the combined template file information and the combined template file corresponding to the combined template file information.
  • the combination template acquisition module 22 needs to acquire the at least two advertisement template files and then perform splicing.
  • Forming a composite template file although this method has more processing steps, it is more advantageous to make a more flexible combination of each advertisement template file according to requirements to obtain various combined template files.
  • the cache processing can facilitate the next time the same request is received (that is, the combined template file is requested), and is directly taken out from the cache, and does not need to be spliced again, which is advantageous for improving the acquisition speed of the combined template file.
  • performing hash sorting when splicing the at least two advertisement template files is beneficial to the unified precise query rule, and is beneficial to data exchange processing between the server and the client.
  • the page resource loading device 1 described above is deployed on the client, and the page resource loading system 3 is constructed together with the above-described page resource loading device 2 deployed on the server.
  • the page resource loading method of the present invention delays the loading time of the advertisement, After loading the page body resource, the server is requested to load the advertisement.
  • the current page is a summary introduction interface of all TV drama programs of LeTV, or a play page of a TV drama.
  • the advertisement server pre-sets an advertisement strategy according to the feature information of the page (for example, what kind of advertisement is presented on a certain page).
  • the template file obtaining module of the client obtains the information of the at least two advertisement template files corresponding to the current page from the server side, and the information of the advertisement template file may specifically be the file name of the advertisement template file, for example, including: a_background_image.js, a_selector_outlink. Js, a_banner_pips.js, etc., for convenience of explanation, set all ad template file names to start with "a";
  • the request sending module of the client splicing the at least two advertisement template file information to form combined template file information, and then sending an advertisement template request, where the advertisement template request includes the combined template file information
  • the sent request is: http: //js.letvcdn.com/js/template/a_banner_pips.js&a_background_image.js&a_selector_outlink.js
  • the combined file name formed by splicing the above three file names is "a_banner_pips.js&a_background_image.js&a_selector_outlink.js”
  • the adjacent two file names are separated by a separator, and the separator may be "&".
  • each file name is sorted according to a hash sorting order, and both the client and the server can better understand the stitching. rule;
  • the request receiving module on the server receives an advertisement template request, the advertisement template request includes combined template file information, and the combined template file information includes at least two spliced advertisement template file information;
  • the combined template obtaining module on the server obtains the combined template file according to the combined template file information, where the combined template file includes the spliced at least two advertising template files corresponding to the at least two advertising template file information;
  • the combined template sending module on the server sends the combined template file to the client
  • the combined template receiving module on the client receives the combined template file, where the combined template file includes at least two advertising template files corresponding to the at least two advertising template file information;
  • the disassembly and loading module on the client disassembles the combined template file into the at least two advertisement template files, and loads the advertisement according to the at least two advertisement template files.
  • Figure 14 is a logic block diagram of an electronic device in accordance with one embodiment of the present invention.
  • the electronic device includes: a first processor 1401;
  • the first memory 1402 stores program instructions executable by the first processor 1401, and the first processor 1401 invokes the program instructions to perform the method illustrated in FIG.
  • Embodiments of the present invention provide a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to perform the method described above.
  • Embodiments of the present invention provide a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the above method.
  • Figure 15 is a logic block diagram of an electronic device in accordance with one embodiment of the present invention.
  • the page resource loading apparatus includes: a second processor 1501;
  • the second memory 1502 stores program instructions executable by the second processor 1501, and the second processor 1501 invokes the program instructions to execute the method illustrated in FIG.
  • Embodiments of the present invention provide a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to perform the method described above.
  • Embodiments of the present invention provide a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the above method.
  • One of ordinary skill in the art can understand that all or part of the above method embodiments are implemented.
  • the foregoing steps may be performed by a hardware associated with a program instruction, and the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiment; and the foregoing storage medium includes: a ROM, A variety of media that can store program code, such as RAM, disk, or optical disk.
  • test apparatus and the like of the display device described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical. Units can be located in one place or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
  • test apparatus and the like of the display device described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical. Units can be located in one place or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

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

Abstract

本发明实施例公开一种页面资源加载方法、装置和系统,其中,所述方法包括:获取至少两个广告模版文件信息;拼接所述至少两个广告模版文件信息形成组合模版文件信息,发送广告模版请求,广告模版请求包括组合模版文件信息;接收组合模版文件,组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;将组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。本发明实施例只需发送一次包括有组合模版文件信息的广告模版请求,即可获得组合模版文件,对组合模版文件拆解后即可加载广告。整个处理过程环节少,仅需发送一次广告模版请求,有效减少占用的网络带宽资源,提高页面资源加载速度。

Description

页面资源加载方法、装置和系统
交叉引用
本申请引用于2016年5月31日提交的专利名称为“页面资源加载方法、装置和系统”的第201610378338X号中国专利申请,其通过引用被全部并入本申请。
技术领域
本发明实施例涉及互联网技术领域,尤其涉及页面资源加载方法、装置和系统。
背景技术
随着智能动终端硬件和性能的不断升级,以及用户对于移动终端智能化需求进一步提高,怎样使移动终端更高效地贴近人的使用习惯和日常生活需要,已经成为了智能终端技术开发所面临的亟待解决的技术课题。
现有技术中,用户免费浏览网页,服务提供商大多会在网页页面中内置有广告,比如图片广告、gif广告、flash广告、视频广告等等。网页中的广告通常是以广告模版的形式来加载,即将要呈现的广告物料根据广告模版文件限定的呈现方式在网页上展示给用户。在网页广告加载具体实现中,由广告插件根据广告模版文件在网页上呈现广告。实际在某一个页面中,多数情况会包括多种类型的广告,比如,静态嵌入在页面中的广告、在页面动态显示的gif广告、flash广告等。每种类型的广告都对应着一个广告模版文件。现有技术中,广告插件处理多个广告模版文件时通常会向服务器分别多次请求该多个广告模版文件。例如,如果页面中包括三种类型的广告,则广告插件需要向服务器请求三次,分别下载对应的三个广告模版文件,现有的广告加载方式因请求和响应次数多使得广告加载对网络资源的消耗较大,也影响了该页面中其他主体页面资源的加载速度,使得整体页面的加载速度较慢。
多次的广告加载不仅自身速度慢,同时影响了主体页面资源,使得用户访问的整体页面的加载速度都缓慢,用户访问体验差。
因此,现有技术还有待于改进和发展。
发明内容
本发明实施例要解决的技术问题是,提供一种页面资源加载方法,其能有效提高整个页面的加载速度,减少广告插件在向广告服务器请求广告模版文件的请求次数和所占用的网络带宽资源。
本发明实施例进一步要解决的技术问题是,提供一种页面资源加载装置,其能有效提高整个页面的加载速度,减少广告插件在向广告服务器请求广告模版文件的请求次数和所占用的网络带宽资源。
本发明实施例进一步要解决的技术问题是,提供一种页面资源加载系统,其能有效提高整个页面的加载速度,减少广告插件在向广告服务器请求广告模版文件的请求次数和所占用的网络带宽资源。
为解决上述技术问题,本发明实施例首先提供一种页面资源加载方法,包括:
获取至少两个广告模版文件信息;
拼接所述至少两个广告模版文件信息形成组合模版文件信息,发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
进一步地,所述拼接所述至少两个广告模版文件名形成组合模版文件信息具体为:
对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
为配合实施上述方法,本发明实施例还提供一种页面资源加载装置,包括:
模版文件获取模块,用于获取至少两个广告模版文件信息;
请求发送模块,拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
组合模版接收模块,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拆解及加载模块,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
进一步地,所述请求发送模块包括:
排序及拼接单元,对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
为配合实施上述方法,本发明实施例还提供一种电子设备,包括:
第一处理器;以及
与所述第一处理器通信连接的第一存储器;其中,
所述第一存储器存储有可被所述第一处理器执行的程序指令,所述第一处理器调用所述程序指令能够执行上述的方法。
一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的方法。
一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述的方法。另一方面,本发明实施例还提供一种页面资源加载方法,包括:
接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
发送所述组合模版文件。
进一步地,所述获取组合模版文件具体为:根据所述组合模版文件信息,从缓存中获取所述组合模版文件。
进一步地,所述获取组合模版文件具体为:
根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
将所述至少两个广告模版文件拼接为所述组合模版文件。
进一步地,所述获取组合模版文件还包括:
缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
进一步地,所述将所述至少两个广告模版文件拼接为所述组合模版文件具体为:对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
为配合实施上述方法,本发明实施例还提供一种页面资源加载装置,包括:
请求接收模块,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
组合模版获取模块,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
组合模版发送模块,发送所述组合模版文件。
进一步地,所述组合模版获取模块包括:组合模版文件获取单元,根据所述组合模版文件信息,从缓存中获取所述组合模版文件。
进一步地,所述组合模版获取模块包括:
广告模版文件获取单元,根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拼接单元,将所述至少两个广告模版文件拼接为所述组合模版文件。
进一步地,所述组合模版获取模块还包括:
缓存单元,缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
进一步地,所述拼接单元包括:
排序组件,对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
为配合实施上述方法,本发明实施例还提供一种电子设备,包括:
第二处理器;以及
与所述第二处理器通信连接的第二存储器;其中,
所述第二存储器存储有可被所述第二处理器执行的程序指令,所述第二处理器调用所述程序指令能够执行上述的方法。
一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的方法。
一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述的方法。第三方面,本发明实施例还提供一种页面资源加载系统,包括:
模版文件获取模块,用于获取至少两个广告模版文件信息;
请求发送模块,拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
请求接收模块,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
组合模版获取模块,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
组合模版发送模块,发送所述组合模版文件;
组合模版接收模块,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拆解及加载模块,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
进一步地,所述请求发送模块包括:
排序及拼接单元,对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
进一步地,所述组合模版获取模块包括:组合模版文件获取单元,根据所述组合模版文件信息,从缓存中获取所述组合模版文件。
进一步地,所述组合模版获取模块包括:
广告模版文件获取单元,根据所述组合模版文件信息,获取与所述至 少两个广告模版文件信息对应的至少两个广告模版文件;
拼接单元,将所述至少两个广告模版文件拼接为所述组合模版文件。
进一步地,所述组合模版获取模块还包括:
缓存单元,缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
进一步地,所述拼接单元包括:
排序组件,对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
通过采用上述技术方案,本发明具有以下有益效果:本发明实施例的页面资源加载方法、装置及系统,只需发送包括有组合模版文件信息的广告模版请求,即可对应获得组合模版文件,进而在将所述组合模版文件拆解为至少两个广告模版文件后再根据所述至少两个广告模版文件来加载广告。整个处理过程环节少,且仅需发送一次广告模版请求,有效减少发送广告模版请求所占用的网络带宽资源,提高整个页面资源的加载速度。
附图说明
图1为本发明页面资源加载方法的一个实施例的处理流程图。
图2为本发明页面资源加载装置的一个实施例的模块框图。
图3为本发明页面资源加载装置的请求发送模块的一个实施例的模块框图。
图4为本发明页面资源加载方法的另一个实施例的处理流程图。
图5为本发明页面资源加载装置的另一个实施例的模块框图。
图6为本发明页面资源加载装置的组合模版获取模块的一个实施例的模块框图。
图7为本发明页面资源加载装置的组合模版获取模块的另一个实施例的模块框图。
图8为本发明页面资源加载装置的组合模版获取模块中的拼接单元的模块框图。
图9为本发明页面资源加载系统的模块框图。
图10为本发明页面资源加载系统的请求发送模块的一个实施例的模 块框图。
图11为本发明页面资源加载系统的组合模版获取模块的一个实施例的模块框图。
图12为本发明页面资源加载系统的组合模版获取模块的另一个实施例的模块框图。
图13为本发明页面资源加载系统的组合模版获取模块中的拼接单元的模块框图;
图14为本发明一个实施例的电子设备的逻辑框图;
图15为本发明一个实施例的电子设备的逻辑框图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为使本发明实施例的目的、技术方案和优点更加清楚明白,下面结合附图对本发明实施例做进一步详细说明。在此,本发明的示意性实施例及其说明用于解释本发明,但并不作为对本发明的限定。
本发明涉及页面资源加载方法、装置和系统,用户在客户端上通过浏览器(或其他的应用)打开某个页面,在加载该页面时,将会加载页面中的页面主体资源(即除广告之外的其他页面信息)和广告,所述页面主体资源和广告均存放在服务器上。为了避免页面中的广告与页面主体资源的加载形成争抢,而使得页面主体资源加载较慢,本发明的页面资源加载方法通过延迟广告的加载时间,在加载页面主体资源结束后再向服务器请求加载广告。
而需要加载的页面中通常包括有至少两种类型的广告,这些广告的呈现通常涉及两部分内容,一部分是广告物料数据,例如具体的广告文字、图片等,另一部分是广告模版数据,用于限定如何呈现上述广告物料,比如在页面的某位置,以方形区域显示广告,或者以动态方式呈现广告,或 者几张广告图片轮流显示在某个区域等,即限定广告的具体呈现方式。
可以理解的是,所述服务器可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量计算机或网络服务器构成的云。
如图1所示,本发明实施例首先提供一种页面资源加载方法,从终端角度而言,所述页面资源加载方法包括:
步骤S101,获取至少两个广告模版文件信息;
步骤S102,拼接所述至少两个广告模版文件信息形成组合模版文件信息,发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
步骤S103,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
步骤S104,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
本发明实施例的页面资源加载方法只需发送包括有组合模版文件信息的广告模版请求,即可对应获得组合模版文件,进而在将所述组合模版文件拆解为至少两个广告模版文件后再根据所述至少两个广告模版文件来加载广告。整个处理过程环节少,且仅需发送一次广告模版请求,有效减少发送广告模版请求所占用的网络带宽资源,提高整个页面资源的加载速度。
而在一个可选的实施例中,步骤S102中,所述拼接所述至少两个广告模版文件名形成组合模版文件信息具体为:
对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
通过对广告模版文件信息进行排序后再拼接成组合模版文件信息,从而建立服务器和客户端都能理解的精准查询规则,使得广告服务器能快速地从缓存中得到相对应的模版文件。
步骤S102中进行拼接的目的是为了通过一次请求,实现对所有的广告模版文件的请求。在传统方式中,如果要向服务器请求三个广告模版文件,则需要向服务器发送三次请求,分别请求下载这三个文件,对网络资源消耗较大;而在本发明实施例中,仅需发送一次请求,同时请求这三个文件,对应地,服务器也会一次性将这三个文件返回给客户端,减少资源 消耗。
为更好地配合实施上述从客户端角度实现的页面资源加载方法,如图2所示,本发明一个实施例还提供一种页面资源加载装置,包括:
模版文件获取模块10,用于获取至少两个广告模版文件信息;
请求发送模块12,拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
组合模版接收模块14,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拆解及加载模块16,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
本发明实施例提供的页面资源加载装置只需通过请求发送模块12发送包括有组合模版文件信息的广告模版请求,即可对应获得组合模版文件,进而在将所述组合模版文件拆解为至少两个广告模版文件后再根据所述至少两个广告模版文件来加载广告。整个处理过程环节少,且仅需发送一次广告模版请求,有效减少发送广告模版请求所占用的网络带宽资源,提高整个页面资源的加载速度。
而在一个可选的实施例中,如图3所示,所述请求发送模块12包括:
排序及拼接单元120,对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
通过排序后拼接获得组合模版文件信息,有效建立服务器和客户端都能理解的精准查询规则,使得广告服务器能快速地从缓存中得到相对应的模版文件。
此外,在另一方面,从服务器角度而言,如图4所示,本发明实施例还提供页面资源加载方法,包括:
步骤S201,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
步骤S202,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
步骤S203,发送所述组合模版文件。
本发明实施例从服务器角度阐述了页面资源加载方法,在本实施例中,仅需接收请求方发出的相应的广告模版请求,即可快捷地获取组合模版文件,进而再发送回请求方。整个处理流程的环节少,能有效减少发送组合模版文件所占用的网络带宽资源,提高页面资源的加载速度。
在一个可选的实施例中,所述获取组合模版文件具体为:根据所述组合模版文件信息,从缓存中获取所述组合模版文件。在本实施例中,组合模版文件本身就是以组合的形式保存,从而在获取组合模版文件时,只需直接从缓存中获取即可,效率更高。
而在另一个可选的实施例中,所述获取组合模版文件具体为:
根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
将所述至少两个广告模版文件拼接为所述组合模版文件。
在本实施例中,所述获取组合模版文件还可进一步包括:
缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
而在具体实施时,所述将所述至少两个广告模版文件拼接为所述组合模版文件可以是:对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
在本实施例中,构成组合模版文件的至少两个广告模版文件是分别保存的,从而需要先获取所述至少两个广告模版文件再进行拼接形成组合模版文件,这种方式虽然在处理上多一些处理环节,但是更有利于根据需求将各广告模版文件进行更为灵活的组合来获得各种组合模版文件。而且,通过缓存处理,能方便下次接收到同样的请求(即请求该拼接后的组合模版文件)时直接从缓存中取出,不需要再次拼接,有利于提升组合模版文件的获取速度。此外,在对所述至少两个广告模版文件进行拼接时进行哈希排序,则有利于统一的精准查询规则,有利于服务器和客户端之间的数据交换处理。
为更好地配合实施上述从服务器角度实现的页面资源加载方法,如图5所示,本发明实施例还提供一种页面资源加载装置,包括:
请求接收模块20,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
组合模版获取模块22,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
组合模版发送模块24,发送所述组合模版文件。
本发明实施例的页面资源加载装置仅需由请求接收模块20接收请求方发出的相应的广告模版请求,即可快捷地获取组合模版文件,进而再发送回请求方。整个处理流程的环节少,能有效减少发送组合模版文件所占用的网络带宽资源,提高页面资源的加载速度。
在一个可选的实施例中,如图6所示,所述组合模版获取模块22包括:组合模版文件获取单元220,根据所述组合模版文件信息,从缓存中获取所述组合模版文件。在本实施例中,组合模版文件本身就是以组合的形式保存,从而在获取组合模版文件时,只需直接从缓存中获取即可,效率更高。
而在另一个可选的实施例中,如图7所示,所述组合模版获取模块22包括:
广告模版文件获取单元222,根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拼接单元224,将所述至少两个广告模版文件拼接为所述组合模版文件。
而在具体实施时,如图8所示,所述拼接单元224又可进一步包括:
排序组件2240,对所述至少两个广告模版文件进行哈希排序,得到具有统一规则的排序的所述组合模版文件。
而且,所述组合模版获取模块22还可进一步包括:
缓存单元226,缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
在本实施例中,由于构成组合模版文件的至少两个广告模版文件是分别保存的,从而组合模版获取模块22在获取组合模版文件时,需要先获 取所述至少两个广告模版文件再进行拼接形成组合模版文件,这种方式虽然在处理上多一些处理环节,但是更有利于根据需求将各广告模版文件进行更为灵活的组合来获得各种组合模版文件。而通过缓存处理,能方便下次接收到同样的请求(即请求该拼接后的组合模版文件)时直接从缓存中取出,不需要再次拼接,有利于提升组合模版文件的获取速度。此外,在对所述至少两个广告模版文件进行拼接时进行哈希排序,则有利于统一的精准查询规则,有利于服务器和客户端之间的数据交换处理。
又一方面,本发明实施例还提供一种页面资源加载系统3,其对应部署在服务器和客户端上,具体是将前述的页面资源加载装置1、2组合而形成所述页面资源加载系统3,如图9所示,所述页面资源加载系统包括:
模版文件获取模块30,用于获取至少两个广告模版文件信息;
请求发送模块31,拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
请求接收模块32,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
组合模版获取模块33,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
组合模版发送模块34,发送所述组合模版文件;
组合模版接收模块35,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拆解及加载模块36,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
本发明实施例的页面资源加载系统3仅需由位于客户端上的请求发送模块31发出相应的广告模版请求,请求接收模块32接收到所述广告模版请求后,即可快捷地获取组合模版文件,进而再发送回客户端,由客户端对组合模版文件进行拆解后即可进行加载广告。整个处理流程的环节少,仅需发送一次广告模版请求,即可获得组合模版文件,能有效减少发送请 求和组合模版文件所占用的网络带宽资源,提高页面资源的加载速度。
在一个实施例中,如图10所示,所述请求发送模块31包括:
排序及拼接单元310,对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
此外,在一个可选实施例中,如图11所示,所述组合模版获取模块33包括:组合模版文件获取单元330,根据所述组合模版文件信息,从缓存中获取所述组合模版文件。在本实施例中,组合模版文件是以组合的形式保存,从而在获取组合模版文件时,只需直接从缓存中获取即可,效率更高。
而在另一个可选实施例中,如图12所示,所述组合模版获取模块33包括:
广告模版文件获取单元332,根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
拼接单元334,将所述至少两个广告模版文件拼接为所述组合模版文件。
其中,如图13所示,所述拼接单元334还可进一步包括:
排序组件3340,对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
此外,所述组合模版获取模块33还包括:
缓存单元336,缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
在本实施例中,由于构成组合模版文件的至少两个广告模版文件是分别保存的,从而组合模版获取模块22在获取组合模版文件时,需要先获取所述至少两个广告模版文件再进行拼接形成组合模版文件,这种方式虽然在处理上多一些处理环节,但是更有利于根据需求将各广告模版文件进行更为灵活的组合来获得各种组合模版文件。而通过缓存处理,能方便下次接收到同样的请求(即请求该拼接后的组合模版文件)时直接从缓存中取出,不需要再次拼接,有利于提升组合模版文件的获取速度。此外,在对所述至少两个广告模版文件进行拼接时进行哈希排序,则有利于统一的精准查询规则,有利于服务器和客户端之间的数据交换处理。
以下通过一个具体实例说明来本发明页面资源加载方法、装置及系统的具体实现过程。
在客户端上部署有上述的页面资源加载装置1,并与在服务器上部署的上述的页面资源加载装置2共同构成所述页面资源加载系统3。
用户在客户端上通过浏览器(或其他的应用)打开某个页面,在加载该页面时,将会加载页面中的广告。为了避免页面中的广告与页面主体资源(即除广告之外的其他页面信息)的加载形成争抢,而使得页面主体资源加载较慢,本发明的页面资源加载方法通过延迟广告的加载时间,在加载页面主体资源结束后再向服务器请求加载广告。
以乐视网为例,当前页面是乐视网的所有电视剧节目的汇总简介界面,或者是某个电视剧的播放页面等。广告服务器根据该页面特征信息,预设有广告策略(比如在某页面对应呈现何种广告)。
具体的加载页面中的广告的处理流程如下:
客户端的模版文件获取模块从服务器侧获取到当前页面对应的至少两个广告模版文件的信息,所述广告模版文件的信息具体可以是广告模版文件的文件名,例如包括:a_background_image.js、a_selector_outlink.js、a_banner_pips.js等,为方便说明,设定所有广告模版文件名均以“a”开头;
由客户端的请求发送模块拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息,例如:所发送请求为:http://js.letvcdn.com/js/template/a_banner_pips.js&a_background_image.js&a_selector_outlink.js其中,将上述三个文件名拼接后形成的组合文件名是“a_banner_pips.js&a_background_image.js&a_selector_outlink.js”,在该组合文件名中,相邻两文件名之间通过分隔符相隔,该分隔符可以是“&”,在以上示例中,各个文件名按照哈希排序顺序排序,客户端和服务器均能更好地理解该拼接规则;
服务器上的请求接收模块接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
服务器上的组合模版获取模块根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
服务器上的组合模版发送模块发送所述组合模版文件至客户端;
客户端上的组合模版接收模块接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
客户端上的拆解及加载模块将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
图14为本发明一个实施例的电子设备的逻辑框图。
参见图14,电子设备包括:第一处理器1401;以及
与第一处理器1401通信连接的第一存储器1402;其中,
第一存储器1402存储有可被第一处理器1401执行的程序指令,第一处理器1401调用所述程序指令能够执行图1所示的方法。
本发明实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的方法。
本发明实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述的方法。
图15为本发明一个实施例的电子设备的逻辑框图。
参见图15,页面资源加载装置包括:第二处理器1501;以及
与第二处理器1501通信连接的第二存储器1502;其中,
第二存储器1502存储有可被第二处理器1501执行的程序指令,第二处理器1501调用所述程序指令能够执行图4所示的方法。
本发明实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的方法。
本发明实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述的方法。本领域普通技术人员可以理解:实现上述方法实施例的全部或部分 步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所描述的显示装置的测试设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所描述的显示装置的测试设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上各实施例仅用以说明本发明的实施例的技术方案,而非对其限制;尽管参照前述各实施例对本发明的实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明的实施例各实施例技术方案的范围。

Claims (21)

  1. 一种页面资源加载方法,其特征在于,包括:
    获取至少两个广告模版文件信息;
    拼接所述至少两个广告模版文件信息形成组合模版文件信息,发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
    接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
  2. 根据权利要求1所述的页面资源加载方法,其特征在于,所述拼接所述至少两个广告模版文件名形成组合模版文件信息具体为:
    对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
  3. 一种页面资源加载装置,其特征在于,包括:
    模版文件获取模块,用于获取至少两个广告模版文件信息;
    请求发送模块,拼接所述至少两个广告模版文件信息形成组合模版文件信息,再发送广告模版请求,所述广告模版请求包括所述组合模版文件信息;
    组合模版接收模块,接收组合模版文件,所述组合模版文件中包括与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    拆解及加载模块,将所述组合模版文件拆解为所述至少两个广告模版文件,根据所述至少两个广告模版文件,加载广告。
  4. 根据权利要求3所述的页面资源加载装置,其特征在于,所述请求发送模块包括:
    排序及拼接单元,对所述至少两个广告模版文件信息进行哈希排序,拼接为所述组合模版文件信息。
  5. 一种页面资源加载方法,其特征在于,包括:
    接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
    根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件 包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    发送所述组合模版文件。
  6. 根据权利要求5所述的页面资源加载方法,其特征在于,所述获取组合模版文件具体为:根据所述组合模版文件信息,从缓存中获取所述组合模版文件。
  7. 根据权利要求5所述的页面资源加载方法,其特征在于,所述获取组合模版文件具体为:
    根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    将所述至少两个广告模版文件拼接为所述组合模版文件。
  8. 根据权利要求7所述的页面资源加载方法,其特征在于,所述获取组合模版文件还包括:
    缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
  9. 根据权利要求7所述的页面资源加载方法,其特征在于,所述将所述至少两个广告模版文件拼接为所述组合模版文件具体为:对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
  10. 一种页面资源加载装置,其特征在于,包括:
    请求接收模块,接收广告模版请求,所述广告模版请求包括组合模版文件信息,所述组合模版文件信息包括拼接的至少两个广告模版文件信息;
    组合模版获取模块,根据所述组合模版文件信息,获取组合模版文件,所述组合模版文件包括拼接的与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    组合模版发送模块,发送所述组合模版文件。
  11. 根据权利要求10所述的页面资源加载装置,其特征在于,所述组合模版获取模块包括:组合模版文件获取单元,根据所述组合模版文件信息,从缓存中获取所述组合模版文件。
  12. 根据权利要求10所述的页面资源加载装置,其特征在于,所述组 合模版获取模块包括:
    广告模版文件获取单元,根据所述组合模版文件信息,获取与所述至少两个广告模版文件信息对应的至少两个广告模版文件;
    拼接单元,将所述至少两个广告模版文件拼接为所述组合模版文件。
  13. 根据权利要求12所述的页面资源加载装置,其特征在于,所述组合模版获取模块还包括:
    缓存单元,缓存所述组合模版文件信息和与所述组合模版文件信息对应的组合模版文件。
  14. 根据权利要求12所述的页面资源加载装置,其特征在于,所述拼接单元包括:
    排序组件,对所述至少两个广告模版文件进行哈希排序,得到所述组合模版文件。
  15. 一种页面资源加载系统,其特征在于,包括客户端和服务器,所述客户端包括权利要求3-4任一所述的页面资源加载装置,所述服务器包括权利要求10-15任一所述的页面资源加载装置。
  16. 一种电子设备,其特征在于,包括:
    第一处理器;以及
    与所述第一处理器通信连接的第一存储器;其中,
    所述第一存储器存储有可被所述处理器执行的程序指令,所述第一处理器调用所述程序指令能够执行如权利要求1至2任一所述的方法。
  17. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如权利要求1至2任一所述的方法。
  18. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至2任一所述的方法。
  19. 一种电子设备,其特征在于,包括:
    第二处理器;以及
    与所述第二处理器通信连接的第二存储器;其中,
    所述第二存储器存储有可被所述处理器执行的程序指令,所述第二处理器调用所述程序指令能够执行如权利要求4至9任一所述的方法。
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如权利要求4至9任一所述的方法。
  21. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求4至9任一所述的方法。
PCT/CN2016/102214 2016-05-31 2016-10-14 页面资源加载方法、装置和系统 Ceased WO2017206417A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610378338.X 2016-05-31
CN201610378338.XA CN106055649A (zh) 2016-05-31 2016-05-31 页面资源加载方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2017206417A1 true WO2017206417A1 (zh) 2017-12-07

Family

ID=57171731

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102214 Ceased WO2017206417A1 (zh) 2016-05-31 2016-10-14 页面资源加载方法、装置和系统

Country Status (2)

Country Link
CN (1) CN106055649A (zh)
WO (1) WO2017206417A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721698A (zh) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 一种资源获取方法、装置、计算机设备及存储介质
WO2022218028A1 (zh) * 2021-04-14 2022-10-20 北京字节跳动网络技术有限公司 页面加载方法、装置、设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116386166B (zh) * 2023-04-14 2025-09-23 广州文远知行科技有限公司 自动驾驶测试异常上传方法、装置和计算机设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120194734A1 (en) * 2011-02-01 2012-08-02 Mcconville Ryan Patrick Video display method
CN103716656A (zh) * 2013-12-11 2014-04-09 乐视网信息技术(北京)股份有限公司 一种视频加载方法及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651550A (zh) * 2008-08-15 2010-02-17 阿里巴巴集团控股有限公司 广告生成及显示方法和系统、广告制作及显示客户端
CN104239308A (zh) * 2013-06-08 2014-12-24 北京齐尔布莱特科技有限公司 一种页面广告请求的访问、整合与优化方法
CN104581398B (zh) * 2013-10-15 2019-03-15 富泰华工业(深圳)有限公司 缓存数据管理系统及方法
CN105760407B (zh) * 2014-12-19 2019-08-06 乐视网信息技术(北京)股份有限公司 一种广告加载方法、装置和设备
CN105491064B (zh) * 2015-12-31 2018-10-12 迈普通信技术股份有限公司 一种推送方法和设备

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120194734A1 (en) * 2011-02-01 2012-08-02 Mcconville Ryan Patrick Video display method
CN103716656A (zh) * 2013-12-11 2014-04-09 乐视网信息技术(北京)股份有限公司 一种视频加载方法及电子设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721698A (zh) * 2021-01-04 2022-07-08 腾讯科技(深圳)有限公司 一种资源获取方法、装置、计算机设备及存储介质
WO2022218028A1 (zh) * 2021-04-14 2022-10-20 北京字节跳动网络技术有限公司 页面加载方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN106055649A (zh) 2016-10-26

Similar Documents

Publication Publication Date Title
CN110096660B (zh) 用于加载页面图片的方法、装置和电子设备
CN104065565B (zh) 推送消息的方法、服务器、客户端装置和系统
CN110247948B (zh) 关于嵌入式媒体提供补充内容
US10803495B2 (en) Advertising creative processing method, advertising creative processing apparatus, and storage medium
CN113608737B (zh) 页面生成方法、装置、设备及介质
JP2022531339A (ja) リソース構成方法、リソース構成装置、コンピューター機器、及びコンピュータープログラム
CN103116645B (zh) 移动设备浏览网页的方法及装置
US8874687B2 (en) System and method for dynamically modifying content based on user expectations
CN104601534A (zh) Cdn系统图像处理的方法及系统
US10467790B2 (en) On-demand image spriting
CN103780685A (zh) 多样化智能设备间自适应数据共享的方法
CN106469073A (zh) 显示应用程序闪屏图像的方法和装置
US11032683B2 (en) Method and apparatus for publishing cloud resource
CN104935666A (zh) 一种用于移动端观看pdf文件的方法及系统
CN108595457A (zh) 一种瀑布流页面的渲染方法和装置
CN104462283A (zh) 在移动终端中进行网页元素请求的方法、装置和客户端
WO2017206417A1 (zh) 页面资源加载方法、装置和系统
US20120054072A1 (en) Automatic content book creation system and method based on a date range
CN104980464B (zh) 一种网络请求处理方法、网络服务器和网络系统
CN105760407B (zh) 一种广告加载方法、装置和设备
US10341454B2 (en) Video and media content delivery network storage in elastic clouds
CN114090083A (zh) 一种可视化组件配置方法、装置、设备及存储介质
JP6262742B2 (ja) データuri増強を利用するプログレッシブ画像処理
US20180192121A1 (en) System and methods thereof for displaying video content
CN104735130B (zh) 一种多媒体文件下载的方法与装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16903799

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16903799

Country of ref document: EP

Kind code of ref document: A1