CN104735041A - Method and device for having access to offline resources - Google Patents

Method and device for having access to offline resources Download PDF

Info

Publication number
CN104735041A
CN104735041A CN201310724351.2A CN201310724351A CN104735041A CN 104735041 A CN104735041 A CN 104735041A CN 201310724351 A CN201310724351 A CN 201310724351A CN 104735041 A CN104735041 A CN 104735041A
Authority
CN
China
Prior art keywords
offline resources
address information
offline
terminal equipment
attribute information
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.)
Granted
Application number
CN201310724351.2A
Other languages
Chinese (zh)
Other versions
CN104735041B (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.)
Huawei Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201310724351.2A priority Critical patent/CN104735041B/en
Publication of CN104735041A publication Critical patent/CN104735041A/en
Application granted granted Critical
Publication of CN104735041B publication Critical patent/CN104735041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/59Providing operational support to end devices by off-loading in the network or by emulation, e.g. when they are unavailable

Abstract

The embodiment of the invention provides a method and device for having access to offline resources. The method includes the steps that in the webpage parsing process, the address information of target offline resources matched with the equipment attribute information of terminal equipment is obtained from a plurality of offline resources, wherein the offline resources are built by a webpage server for webpage and are required in the process of having access to the webpage in an offline mode; the offline resources are matched with the equipment attribute information respectively; the target offline resources are downloaded to the terminal equipment according to the address information of the target offline resources. By means of the method and device for having access to the offline resources, different offline service requirements of the terminal equipment with different configuration are met.

Description

Offline resources acquisition methods and device
Technical field
The embodiment of the present invention relates to the communication technology, particularly relates to a kind of offline resources acquisition methods and device.
Background technology
Internet off-line application technology can provide offline service for user, enables user continue the service using network application to provide when not networking.
HTML5 standard indicates resource file (offline resources) required when network application works offline by offline resources list (manifest) file introduced, and offline resources, when user uses network application online, is cached to subscriber equipment by browser; When user's off-line uses network application, browser loads this offline resources automatically, allows user under off-line state, continue the service using network application to provide.
But the manifest file that HTML5 standard provides cannot support the different off-line demand for services of multiple terminal equipments with different configuration.
Summary of the invention
The embodiment of the present invention provides a kind of offline resources acquisition methods and device, to support the different off-line demand for services of multiple terminal equipments with different configuration.
First aspect, the embodiment of the present invention provides a kind of offline resources acquisition methods, and described method comprises:
In the process that webpage is resolved, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
According to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
According to first aspect, in the first possible implementation of first aspect, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately;
According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
According to the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, described first offline resources instruction file comprises multiple condition query statement, each condition query statement comprises the address information of each offline resources, and the querying condition information matched with described address information;
The described device attribute information according to terminal equipment, obtains the address information with the target offline resources of the device attribute information match of described terminal equipment, comprising:
Travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.
The implementation possible according to the first or the second of first aspect, in the third possible implementation of first aspect, the address information of described target offline resources is specially the second offline resources instruction file, includes described address information in described second offline resources instruction file.
According to first aspect, in the 4th kind of possible implementation of first aspect, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match;
According to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
Second aspect, the embodiment of the present invention provides a kind of offline resources acquisition device, and described device comprises:
Address information acquisition module, for in the process of resolving webpage, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
Offline resources download module, for the address information of the described target offline resources according to described address information acquisition module acquisition, downloads to described target offline resources in described terminal equipment.
According to second aspect, in the first possible implementation of second aspect, described address information acquisition module, specifically for:
Obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises each self-corresponding address information of described multiple offline resources;
According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
According to the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, described first offline resources instruction file comprises multiple condition query statement, each condition query statement comprises the address information corresponding to each offline resources, and the querying condition information matched with described address information;
Described address information acquisition module, specifically for:
Travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.
The implementation possible according to the first or the second of second aspect, in the third possible implementation of second aspect, the address information of described target offline resources is specially the second offline resources instruction file, and described second offline resources instruction file comprises address information.
According to second aspect, in the 4th kind of possible implementation of second aspect, described address information acquisition module, specifically for:
Obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match;
According to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
The offline resources acquisition methods that the embodiment of the present invention provides and device, by in the process of resolving webpage, from web page server be described webpage set up, respectively with multiple offline resources of multiple device attribute information match, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, and described target offline resources is downloaded in described terminal equipment, with the offline service demand of support terminal equipment, achieve the different off-line demand for services supporting multiple terminal equipments with different configuration.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of the offline resources acquisition methods that Fig. 1 provides for the embodiment of the present invention;
Another flow chart of the offline resources acquisition methods that Fig. 2 provides for the embodiment of the present invention;
The another flow chart of the offline resources acquisition methods that Fig. 3 provides for the embodiment of the present invention;
A flow chart again of the offline resources acquisition methods that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the offline resources acquisition device that Fig. 5 provides for the embodiment of the present invention;
Another structural representation of the offline resources acquisition device that Fig. 6 provides for the embodiment of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The flow chart of the offline resources acquisition methods that Fig. 1 provides for the embodiment of the present invention.Described method can be used for the scene that the support of offline service needs has multiple terminal equipments of distinct device attribute information.As shown in Figure 1, described method comprises:
101, in the process that webpage is resolved, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match.
102, according to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Particularly, the offline resources acquisition methods that the embodiment of the present invention provides specifically is performed by offline resources acquisition device, and described offline resources acquisition device can be the browser that described terminal equipment uses.Device attribute information can be such as screen size, resolution, processor or memory size, also can be name of product, the model of terminal equipment; It is evident that, same device attribute information can multiple terminal equipments of corresponding different product model.
Web page server obtains the distinct device attribute information of multiple terminal equipment in advance, and be described webpage set up respectively with multiple offline resources of the device attribute information match of each terminal equipment; Optionally, offline resources can with a more than device attribute information match, such as this offline resources is the public resource described in a described more than device attribute information offline access required for webpage.Web page server sets up described multiple offline resources for described webpage in advance; Described in terminal equipment online access during webpage, web page server only need provide the address information of multiple offline resources, and from described multiple offline resources, obtain the address information with the target offline resources of the device attribute information match of terminal equipment by described offline resources acquisition device, when avoiding webpage described in terminal equipment online access, web page server specifies the defect of offline resources for terminal equipment in real time, thus effectively can reduce the live load of web page server.
When described in terminal equipment online access during webpage, described offline resources acquisition device, in the process of resolving webpage, obtains the address information with the target offline resources of the device attribute information match of terminal equipment from described multiple offline resources; Described target offline resources, according to the address information of described target offline resources, downloads in described terminal equipment by described offline resources acquisition device.
When described in terminal equipment offline access during webpage, described offline resources acquisition device loads described target offline resources automatically, the offline service making terminal equipment can use described webpage under off-line state to provide.
The offline resources acquisition methods that the embodiment of the present invention provides, by in the process of resolving webpage, from web page server be described webpage set up, respectively with multiple offline resources of multiple device attribute information match, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, and described target offline resources is downloaded in described terminal equipment, with the offline service demand of support terminal equipment, achieve the different off-line demand for services supporting multiple terminal equipments with different configuration.
On the basis of above-described embodiment, described offline resources acquisition device web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the implementation with the address information of the target offline resources of the device attribute information match of terminal equipment, at least can comprise following two kinds of modes:
Mode 1:
Another flow chart of the offline resources acquisition methods that Fig. 2 provides for the embodiment of the present invention.The offline resources acquisition methods that the embodiment of the present invention provides is on the basis of embodiment of the method shown in Fig. 1, limits the technical characteristic of step 101 in Fig. 1, and as shown in Figure 2, the offline resources acquisition methods that the embodiment of the present invention provides comprises:
201, obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately.
202, according to the device attribute information of described terminal equipment, the address information with the target offline resources of the device attribute information match of described terminal equipment is obtained.
102, according to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Particularly, described offline resources acquisition device obtains the first offline resources instruction file of described webpage, and described first offline resources instruction file comprises described multiple offline resources address information separately; And according to the device attribute information of described terminal equipment, in multiple offline resources included in described first offline resources instruction file address information separately, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
The another flow chart of the offline resources acquisition methods that Fig. 3 provides for the embodiment of the present invention.The offline resources acquisition methods that the embodiment of the present invention provides is on the basis of embodiment of the method shown in Fig. 2, limits the technical characteristic of step 202 in Fig. 2, and as shown in Figure 3, the offline resources acquisition methods that the embodiment of the present invention provides comprises:
201, obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately.
301, each condition query statement that described first offline resources instruction file comprises is traveled through, if judge querying condition information included in a condition query statement and the device attribute information matches of terminal equipment, then obtain the address information of target offline resources included in described condition query statement.
102, according to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Particularly, described first offline resources instruction file comprises multiple condition query statement, and each condition query statement comprises the address information of each offline resources, and the querying condition information matched with described address information; Described offline resources acquisition device is according to the device attribute information of described terminal equipment, travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.When judging to know the device attribute information of terminal equipment and current querying condition information match, then stop coupling action below.Optionally, independent a line can be occupied respectively by each condition query statement in described offline resources instruction file, clearly distinguish each condition query statement with enable.It is pointed out that each condition query statement in order to can clearly distinguish in described offline resources instruction file, also isolated marks can be set between each condition query statement.Condition query statement have recorded the matching relationship of the address information of offline resources and the device attribute information of terminal equipment, and for example, the form of condition query statement can be:
@condition:<Device> [and< expression formula >] * { };
The form of this condition query statement is explained as follows:
(1) terminal equipment (Device) can be display (screen), TV (tv), projecting apparatus (projection) or mobile phone (handset), and the present invention is not construed as limiting this, as long as support the terminal equipment of offline access webpage function.
(2) " <Device> [and< expression formula >] " is a Device expression formula.
(3) " * " represents that condition query statement can comprise multiple Device expression formula, and uses ", " to separate different Device expression formulas, between the Device expression formula separated be or relation.
(4) " [] " expression " and< expression formula > " is optional.
(5) " and " is keyword, represents the equipment also comprised in " <> "; Other keywords also comprise " not " (getting rid of certain equipment), " only " (limiting certain equipment) etc.
(6) " expression formula " is for representing querying condition information, comprises device attribute and property value thereof, and it is placed in a pair round parentheses.
(7) comprise the address information of offline resources in { }, separate with ", " between multiple address information.
Below by two specific embodiments, the form of condition query statement and application are specifically described, exemplarily set up following condition query statement:
Example 1:@condition screen and (min-width:1024px) and (max-width:1280px) { style/link.css, image/resource.png}
Condition query statement shown in example 1 represents: when the screen width that device attribute information is display be more than or equal to 1024px, be less than or equal to 1280px time, with the address information of the offline resources of this device attribute information match be: style/link.css, image/resource.png.
Example 2:@condition screen and (max-width:1024px), tv and (min-width:960px) { style/link.css, image/resource.png}
Condition query statement shown in example 2 represents: when the screen width that device attribute information is display is less than or equal to 1024px, or, when the screen width that device attribute information is television set is more than or equal to 960px, with the address information of the offline resources of this device attribute information match be: style/link.css, image/resource.png.
Described offline resources acquisition device, according to the device attribute information of terminal equipment, travels through each condition query statement that described offline resources instruction file comprises; Optionally ,@condition is for identifying each condition query statement; When traveling through each condition query statement, querying condition information included in the device attribute information of terminal equipment and condition query statement is contrasted, know device attribute information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in this condition query statement; According to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Optionally, the address information of described target offline resources is specially the second offline resources instruction file, includes the address of described target offline resources in described second offline resources instruction file.
Particularly, by another offline resources instruction file nested in offline resources instruction file, make different device attribute information more accurate with the matching condition of multiple offline resources respectively, logic is more clear, also be convenient to web page server to the exploitation of offline resources instruction file and maintenance simultaneously, reduce the cost developing and safeguard code.Exemplarily provide the nested application of condition query statement, as follows:
Example 3:@condition screen and (min-width:1024px) and (max-width:1280px) { PC.manifest}
Condition query statement shown in example 3 represents: when the screen width that device attribute information is display be more than or equal to 1024px, be less than or equal to 1280px time, with the address information of the target offline resources of this device attribute information match be: PC.manifest; Wherein, in PC.manifest, include the address information of target offline resources, such as: style/link.css, image/resource.png.Described offline resources acquisition device resolves PC.manifest, obtains the address information of the target offline resources that PC.manifest comprises; And according to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
The offline resources acquisition methods that the embodiment of the present invention provides, comprising web page server by indicating file at the offline resources corresponding with described webpage is that described webpage is set up, respectively with multiple offline resources of multiple device attribute information match, the offline resources instruction file of described webpage is obtained in the process that webpage is resolved, in multiple offline resources included in described offline resources instruction file address information separately, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment, and described target offline resources is downloaded in described terminal equipment, with the offline service demand of support terminal equipment, achieve the different off-line demand for services supporting multiple terminal equipments with different configuration.
Mode 2:
A flow chart again of the offline resources acquisition methods that Fig. 4 provides for the embodiment of the present invention.The offline resources acquisition methods that the embodiment of the present invention provides is on the basis of embodiment of the method shown in Fig. 1, limits the technical characteristic of step 101 in Fig. 1, and as shown in Figure 4, the offline resources acquisition methods that the embodiment of the present invention provides comprises:
401, obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match.
402, according to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
102, according to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Particularly, described offline resources acquisition device obtains offline resources indicator element corresponding to described webpage, described offline resources indicator element comprises multiple offline resources instruction file, comprise each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file, described multiple offline resources instruction file respectively with multiple device attribute information match; Described offline resources acquisition device is according to the device attribute information of terminal equipment, in described offline resources indicator element in included multiple offline resources instruction file, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.Offline resources indicator element comprises the matching relationship of the device attribute information of offline resources instruction file and terminal equipment, and for example, the form of offline resources indicator element can be:
<manifest>
<source media=“(min-width:45em)”src=“pad.manifest”>
<source media=“(min-width:18em)”src=“mobile.manifest”>
</manifest>
Offline resources indicator element is for comprising <source> element; Media attribute given query conditional information in <source> element, src attribute specifies the address information of offline resources instruction file.This offline resources indicator element represents: when device attribute information be screen width be more than or equal to 45em time, indicate file to be pad.manifest with the offline resources of this device attribute information match; When device attribute information be screen width be more than or equal to 18em time, indicate file to be mobile.manifest with the offline resources of this device attribute information match.When judging to know that this device attribute information and current queries conditional information match, then stop coupling action below.
The offline resources acquisition methods that the embodiment of the present invention provides, indicating file with multiple offline resources of multiple device attribute information match respectively by comprising at the offline resources indicator element corresponding with described webpage, in each described offline resources instruction file, comprising each self-corresponding address information of described multiple offline resources respectively; According to the device attribute information of terminal equipment, in described offline resources indicator element in included multiple offline resources instruction file, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further; Described target offline resources is downloaded in described terminal equipment, with the offline service demand of support terminal equipment, achieves the different off-line demand for services supporting multiple terminal equipments with different configuration.
The structural representation of the offline resources acquisition device that Fig. 5 provides for the embodiment of the present invention.As shown in Figure 5, the offline resources acquisition device 500 that the embodiment of the present invention provides, comprising: address information acquisition module 501 and offline resources download module 502, wherein:
Address information acquisition module 501, for in the process of resolving webpage, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
Offline resources download module 502, for the address information of the described target offline resources according to described address information acquisition module 501 acquisition, downloads to described target offline resources in described terminal equipment.
The offline resources acquisition device 500 that the embodiment of the present invention provides, by address information acquisition module 501 in the process that webpage is resolved, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match; The address information of the described target offline resources obtained according to described address information acquisition module 501 by offline resources download module 502, is downloaded to described target offline resources in described terminal equipment.
The offline resources acquisition device 500 that the embodiment of the present invention provides, may be used for the technical scheme performing embodiment of the method shown in Fig. 1, it realizes principle and technique effect is similar, does not repeat them here.
Optionally, described address information acquisition module 501, specifically for: the first offline resources instruction file obtaining described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately; According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
Further alternative, described first offline resources instruction file comprises multiple condition query statement, and each condition query statement comprises the address information corresponding to each offline resources, and the querying condition information matched with described address information; Described address information acquisition module 501, specifically for: travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.
Further alternative, the address information of described target offline resources is specially the second offline resources instruction file, and described second offline resources instruction file comprises address information.
Optionally, described address information acquisition module 501, specifically for: obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match; According to the device attribute information of terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
Another structural representation of the offline resources acquisition device that Fig. 6 provides for the embodiment of the present invention.As shown in Figure 6, the offline resources acquisition device 600 that the embodiment of the present invention provides, comprising: processor 601, memory 602 and communication interface 603, also comprise communication bus 604; Processor 601, memory 602 and communication interface 603 are interconnected by bus 604.
Above-mentioned processor 601 can be general processor, comprises central processing unit (CentralProcessing Unit is called for short CPU), network processing unit (Network Processor is called for short NP) etc.; Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC) (ASIC), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete hardware components.
Memory 602, for depositing program.Particularly, program can comprise program code, and described program code comprises computer-managed instruction.Memory 602 may comprise high-speed RAM, still may comprise nonvolatile memory (non-volatile memory), such as at least one magnetic disc store.
Described communication interface 603 is for the communication of described offline resources acquisition device 600 with other equipment rooms; Can be received by described communication interface or send packet.
When described offline resources acquisition device 600 runs, communicate between processor 601 with memory 602, the program deposited in processor 601 execute store 602, perform the offline resources acquisition methods that the embodiment of the present invention provides, described method comprises:
In the process that webpage is resolved, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
According to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
Optionally, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately;
According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
Further alternative, described first offline resources instruction file comprises multiple condition query statement, and each condition query statement comprises the address information of each offline resources, and the querying condition information matched with described address information;
The described device attribute information according to described terminal equipment, obtains the address information with the target offline resources of the device attribute information match of described terminal equipment, comprising:
Travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.
Further alternative, the address information of described target offline resources is specially the second offline resources instruction file, includes the address of described target offline resources in described second offline resources instruction file.
Optionally, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match;
According to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
In several embodiment provided by the present invention, should be understood that, disclosed apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various can be program code stored medium.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by device is divided into different functional modules, to complete all or part of function described above.The specific works process of the device of foregoing description, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. an offline resources acquisition methods, is characterized in that, comprising:
In the process that webpage is resolved, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
According to the address information of described target offline resources, described target offline resources is downloaded in described terminal equipment.
2. method according to claim 1, it is characterized in that, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately;
According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
3. according to the method that claim 2 is stated, it is characterized in that, described first offline resources instruction file comprises multiple condition query statement, and each condition query statement comprises the address information of each offline resources, and the querying condition information matched with described address information;
The described device attribute information according to described terminal equipment, obtains the address information with the target offline resources of the device attribute information match of described terminal equipment, comprising:
Travel through each condition query statement that described first offline resources instruction file comprises, if judge querying condition information included in a condition query statement and the device attribute information matches of terminal equipment, then obtain the address information of target offline resources included in described condition query statement.
4. according to the method that Claims 2 or 3 is stated, it is characterized in that, the address information of described target offline resources is specially the second offline resources instruction file, includes the address of described target offline resources in described second offline resources instruction file.
5. method according to claim 1, it is characterized in that, described web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment, comprising:
Obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match;
According to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
6. an offline resources acquisition device, is characterized in that, comprising:
Address information acquisition module, for in the process of resolving webpage, web page server set up for described webpage, in multiple offline resources required for webpage described in offline access, obtain the address information with the target offline resources of the device attribute information match of terminal equipment; Described multiple offline resources respectively with multiple device attribute information match;
Offline resources download module, for the address information of the described target offline resources according to described address information acquisition module acquisition, downloads to described target offline resources in described terminal equipment.
7. device according to claim 6, is characterized in that, described address information acquisition module, specifically for:
Obtain the first offline resources instruction file of described webpage, described first offline resources instruction file comprises described multiple offline resources address information separately;
According to the device attribute information of described terminal equipment, obtain the address information with the target offline resources of the device attribute information match of described terminal equipment.
8. according to the device that claim 7 is stated, it is characterized in that, described first offline resources instruction file comprises multiple condition query statement, and each condition query statement comprises the address information corresponding to each offline resources, and the querying condition information matched with described address information;
Described address information acquisition module, specifically for:
Travel through each condition query statement that described first offline resources instruction file comprises, know querying condition information included in a condition query statement and the device attribute information matches of terminal equipment if judge, then obtain the address information of target offline resources included in described condition query statement.
9. according to the device that claim 7 or 8 is stated, it is characterized in that, the address information of described target offline resources is specially the second offline resources instruction file, includes the address of described target offline resources in described second offline resources instruction file.
10. device according to claim 6, is characterized in that, described address information acquisition module, specifically for:
Obtain the offline resources indicator element that described webpage is corresponding, described offline resources indicator element comprises multiple offline resources instruction file, comprises each self-corresponding address information of described multiple offline resources respectively in each described offline resources instruction file; Described multiple offline resources instruction file respectively with multiple device attribute information match;
According to the device attribute information of described terminal equipment, obtain and indicate file with the offline resources of the device attribute information match of described terminal equipment, and obtain the address information with the target offline resources of the device attribute information match of described terminal equipment further.
CN201310724351.2A 2013-12-24 2013-12-24 Offline resources acquisition methods and device Active CN104735041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310724351.2A CN104735041B (en) 2013-12-24 2013-12-24 Offline resources acquisition methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310724351.2A CN104735041B (en) 2013-12-24 2013-12-24 Offline resources acquisition methods and device

Publications (2)

Publication Number Publication Date
CN104735041A true CN104735041A (en) 2015-06-24
CN104735041B CN104735041B (en) 2018-12-14

Family

ID=53458479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310724351.2A Active CN104735041B (en) 2013-12-24 2013-12-24 Offline resources acquisition methods and device

Country Status (1)

Country Link
CN (1) CN104735041B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055588A (en) * 2016-05-20 2016-10-26 青岛海信电器股份有限公司 Off-line resource processing method and apparatus
CN106331049A (en) * 2015-07-03 2017-01-11 阿里巴巴集团控股有限公司 Resource caching method, cache resource updating method, client, server and system
CN111428117A (en) * 2019-01-09 2020-07-17 百度在线网络技术(北京)有限公司 Data acquisition method and device for application program
CN113873013A (en) * 2018-12-25 2021-12-31 创新先进技术有限公司 Offline packet reassembly method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101997853A (en) * 2009-08-31 2011-03-30 中兴通讯股份有限公司 Data downloading method and terminal
CN102571941A (en) * 2011-12-27 2012-07-11 优视科技有限公司 Cloud point-to-point data transmission method and system
CN103248666A (en) * 2012-02-14 2013-08-14 深圳市腾讯计算机系统有限公司 System, method and device for offline resource download
US20130263272A1 (en) * 2009-01-17 2013-10-03 Stopthehacker.com, Jaal LLC Automated identidication of phishing, phony and malicious web sites
CN103391312A (en) * 2013-06-26 2013-11-13 北京奇虎科技有限公司 Resource offline downloading method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130263272A1 (en) * 2009-01-17 2013-10-03 Stopthehacker.com, Jaal LLC Automated identidication of phishing, phony and malicious web sites
CN101997853A (en) * 2009-08-31 2011-03-30 中兴通讯股份有限公司 Data downloading method and terminal
CN102571941A (en) * 2011-12-27 2012-07-11 优视科技有限公司 Cloud point-to-point data transmission method and system
CN103248666A (en) * 2012-02-14 2013-08-14 深圳市腾讯计算机系统有限公司 System, method and device for offline resource download
CN103391312A (en) * 2013-06-26 2013-11-13 北京奇虎科技有限公司 Resource offline downloading method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331049A (en) * 2015-07-03 2017-01-11 阿里巴巴集团控股有限公司 Resource caching method, cache resource updating method, client, server and system
CN106055588A (en) * 2016-05-20 2016-10-26 青岛海信电器股份有限公司 Off-line resource processing method and apparatus
CN113873013A (en) * 2018-12-25 2021-12-31 创新先进技术有限公司 Offline packet reassembly method and system
CN113873013B (en) * 2018-12-25 2023-06-16 创新先进技术有限公司 Offline package reorganization method and system
CN111428117A (en) * 2019-01-09 2020-07-17 百度在线网络技术(北京)有限公司 Data acquisition method and device for application program
CN111428117B (en) * 2019-01-09 2023-05-16 百度在线网络技术(北京)有限公司 Application program data acquisition method and device

Also Published As

Publication number Publication date
CN104735041B (en) 2018-12-14

Similar Documents

Publication Publication Date Title
CN108255847B (en) Page generation method and device
CN102694861B (en) A kind of terminal application software sorting technique, Apparatus and system based on cloud
CN105446750B (en) The method and apparatus that WebApp starting runs, generates image file
CN103747112A (en) CDN back-to-source method, first server and system thereof
CN104601736A (en) Method and device for realizing short uniform resource locator (URL) service
CN103731487A (en) Download method, device, system and router for resource file
CN103699597A (en) Method for downloading file through browser and browser
CN113014681A (en) Network card binding method and device of multi-network card server, electronic equipment and storage medium
CN104735041A (en) Method and device for having access to offline resources
CN103686809A (en) Method and system for providing mobile terminal fault problem solution and mobile terminal
CN104219230A (en) Method and device for identifying malicious websites
CN105049290A (en) Method and device for monitoring page access
CN109753424B (en) AB test method and device
CN104408193B (en) The processing method and processing device of data visualization model
JP6779307B2 (en) Method and device for page display
CN105205100A (en) Data synchronization method based on MTP between terminals and terminals
CN110647634A (en) Method and device for searching media resource, storage medium and electronic device
CN103678535A (en) Browser and downloading method thereof
CN104572707A (en) Preferable object information providing method and device
CN107766230A (en) A kind of method and apparatus tested based on configuration file
JP2013232894A (en) Router equipment, method therefor and system
CN105245622A (en) Configurable data processing method and system and mobile platform
CN103246501A (en) Method and client-side for sharing application
CN104572981A (en) Web page caching method and mobile terminal device
CN108614844B (en) Multimedia file generation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171026

Address after: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop

Applicant after: HUAWEI terminal (Dongguan) Co., Ltd.

Address before: 518129 Longgang District, Guangdong, Bantian HUAWEI base B District, building 2, building No.

Applicant before: Huawei Device Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: Huawei Device Co., Ltd.

Address before: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee before: HUAWEI terminal (Dongguan) Co., Ltd.

CP01 Change in the name or title of a patent holder