A kind of page acquisition methods and deviceTechnical field
Embodiments of the present invention are related to technical field of network security, more specifically, embodiments of the present invention are related to oneKind page acquisition methods and device.
Background technique
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.HereinDescription recognizes it is the prior art not because not being included in this section.
Currently, the mode that the common page obtains are as follows:
The page address that the browser component of browser or APP are submitted according to user in user equipment, it is (super by HTTPText transfer protocol) agreement is to the transmission HTPP request of the server end of network side, and the request is for obtaining the corresponding page;NetworkThe server end of side extracts corresponding page data according to the HTTP request, and passes through http protocol for the page data of extractionRespond to the browser or browser component in user equipment;The page that browser or browser component respond server endFace data is spliced into the corresponding page and shows.
The data transmitted under http protocol are clear data, i.e., server end using http protocol to browser orThe page data of browser component response is clear data, and some network attack equipment or software may intercept server responsePage data, and the page data is distorted, the page data after distorting is sent to user equipment, this will result inUser equipment can not normally show the page, alternatively, the problem of including various junk information in the page of display.
Currently, http protocol is replaced with HTTPS agreement in order to avoid the above problem, in response to HTTPS request, serviceDevice end encrypts corresponding page data, and encrypted page data is responded to browser or browser component,After page data is decrypted in browser or browser component, carries out the page and show.
But http protocol is replaced with into HTTPS agreement and is related to O&M configuration modification, code revision and the network equipmentThe operations such as energy optimization, the change for needing to carry out in network side is more, higher cost.
Summary of the invention
In the prior art, due to by http protocol replace with HTTPS agreement be related to O&M configuration modification, code revision andThe operations such as performance of network equipments optimization, the change for needing to carry out in network side is more, higher cost.Thus, it is also very desirable to a kind ofIt can either the save the cost page acquisition methods that the page can be prevented to be tampered again.
In the present context, embodiments of the present invention are intended to provide a kind of page acquisition methods and device.
In the first aspect of embodiment of the present invention, a kind of page acquisition methods are provided, comprising:
It intercepts the hypertext for obtaining specified page and passes protocol HTTP request;
Specified encryption identification is added in the HTTP request;
The HTTP request for adding specified encryption identification is sent to network side.
In the second aspect of embodiment of the present invention, a kind of page acquisition device is provided, comprising:
Interception module, for intercepting the hypertext biography protocol HTTP request for obtaining specified page;
Adding module, for specified encryption identification to be added in the HTTP request;
Sending module, for the HTTP request for adding specified encryption identification to be sent to network side.
In the third aspect of embodiment of the present invention, another page acquisition methods are provided, comprising:
Receive the HTTP request for the acquisition specified page that user equipment is sent;
When determining in the HTTP request comprising specified encryption identification, specified cipher mode accordingly is obtained;
The corresponding page data of the specified page is encrypted according to the specified cipher mode of the acquisition;
The encrypted page data is returned into the user equipment.
In the fourth aspect of embodiment of the present invention, another page acquisition device is provided, comprising:
Receiving module, the HTTP request of the acquisition specified page for receiving user equipment transmission;
Module being obtained, when for determining in the HTTP request comprising specified encryption identification, obtaining corresponding specified encryptionMode;
Encrypting module, for the specified cipher mode according to the acquisition by the corresponding page data of the specified page intoRow encryption;
Sending module, for the encrypted page data to be returned to the user equipment.
In the 5th aspect of embodiment of the present invention, a kind of page acquisition equipment is provided, for example, may include storageDevice and processor, wherein processor can be used for reading the program in memory, execute following process:
It intercepts the hypertext for obtaining specified page and passes protocol HTTP request;
Specified encryption identification is added in the HTTP request;
The HTTP request for adding specified encryption identification is sent to network side.
In the 6th aspect of embodiment of the present invention, provides another page and obtain equipment, for example, may include depositingReservoir and processor, wherein processor can be used for reading the program in memory, execute following process:
Receive the HTTP request for the acquisition specified page that user equipment is sent;
When determining in the HTTP request comprising specified encryption identification, specified cipher mode accordingly is obtained;
The corresponding page data of the specified page is encrypted according to the specified cipher mode of the acquisition;
The encrypted page data is returned into the user equipment.
In the 7th aspect of embodiment of the present invention, a kind of program product is provided comprising program code, when describedWhen program product is run, said program code is for executing following procedure:
It intercepts the hypertext for obtaining specified page and passes protocol HTTP request;
Specified encryption identification is added in the HTTP request;
The HTTP request for adding specified encryption identification is sent to network side.
In the eighth aspect of embodiment of the present invention, another program product is provided comprising program code works as instituteWhen stating program product operation, said program code is for executing following procedure:
Receive the HTTP request for the acquisition specified page that user equipment is sent;
When determining in the HTTP request comprising specified encryption identification, specified cipher mode accordingly is obtained;
The corresponding page data of the specified page is encrypted according to the specified cipher mode of the acquisition;
The encrypted page data is returned into the user equipment.
The page acquisition methods and device of embodiment, user equipment add in the HTTP request of interception according to the present inventionEncryption identification, and the HTTP request for adding encryption identification is sent to network side, network side will be according to the encryption in HTTP requestIt identifies the corresponding encrypted page data of cipher mode and returns to user equipment, that is, on the basis of http protocol, pass throughHTTP request obtains encrypted page data from network side, thus the page quilt that can either prevent user equipment requests from obtainingIt distorts, and being capable of save the cost.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, above-mentioned and other mesh of exemplary embodiment of the invention, feature and advantage will become prone to understand.In the accompanying drawings, if showing by way of example rather than limitation of the inventionDry embodiment, in which:
Fig. 1 schematically shows the application scenarios schematic diagram of embodiment according to the present invention;
Fig. 2 schematically shows the one embodiment flow diagrams of page acquisition methods of embodiment according to the present invention;
Fig. 3 schematically shows the stream for the method that encrypted page data is decrypted in mode of the present inventionJourney schematic diagram;
Fig. 4 schematically shows another embodiment flow diagram of page acquisition methods of embodiment according to the present invention;
Fig. 5 schematically shows the process determined in embodiment of the present invention comprising specified encryption identification in HTTP requestSchematic diagram;
Fig. 6, which is schematically shown in embodiment of the present invention, shows the process that load resource white list returns to user equipmentIt is intended to;
Fig. 7 schematically shows the process that encrypted page data is returned to user equipment in embodiment of the present inventionSchematic diagram;
Fig. 8 schematically shows the page acquisition methods that the user equipment of embodiment of the present invention offer is interacted with network sideAn embodiment process schematic diagram;
Fig. 9 schematically shows the page that the user equipment that embodiment provides according to the present invention is interacted with network side and obtainsTake the flow diagram of another embodiment of method.
Figure 10 schematically shows the structural schematic diagram of page acquisition device according to an embodiment of the invention;
Figure 11 schematically shows the structural schematic diagram of page acquisition device according to another embodiment of the present invention;
Figure 12 schematically shows the structural schematic diagram of the page acquisition device of another embodiment according to the present invention;
Figure 13 schematically shows the structural schematic diagram of page acquisition device according to yet another embodiment of the invention;
Figure 14 schematically shows the program product according to an embodiment of the invention for User Page acquisition methodsSchematic diagram;
The program product for page acquisition methods that Figure 15 schematically shows another embodiment according to the present invention showsIt is intended to.
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing thisA little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with anyMode limits the scope of the invention.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and energyIt is enough that the scope of the present disclosure is completely communicated to those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, methodOr computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete softwareThe form that (including firmware, resident software, microcode etc.) or hardware and software combine.
Embodiment according to the present invention proposes a kind of page acquisition methods and device.
Herein, it is to be understood that any number of elements in attached drawing be used to example rather than limit and it is anyName is only used for distinguishing, without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Summary of the invention
The inventors discovered that in the prior art, in order to avoid page caused by the page acquisition modes based on http protocolHttp protocol is replaced with HTTPS agreement by the problem of face is tampered.But http protocol is replaced with into HTTPS agreement and is related to transportingThe operations such as configuration modification, code revision and performance of network equipments optimization are tieed up, the change for needing to carry out in network side is more, costIt is higher.Therefore, lack a kind of improved page acquisition methods in the prior art, can either save the cost can prevent page quilt againIt distorts.
For this purpose, the present invention provides a kind of page acquisition methods and devices, wherein the page based on user equipment side obtainsMethod may include: interception for obtaining the hypertext biography protocol HTTP request of specified page;Specified encryption identification is added toIn the HTTP request;The HTTP request for adding specified encryption identification is sent to network side;The page based on network side obtainsMethod may include: to receive the HTTP request for the acquisition specified page that user equipment is sent;Described in determinationWhen in HTTP request comprising specified encryption identification, specified cipher mode accordingly is obtained;According to the specified encryption side of the acquisitionFormula encrypts the corresponding page data of the specified page;The encrypted page data is returned to the user to setIt is standby.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiment party of the inventionFormula.
Application scenarios overview
Referring initially to Fig. 1, as shown in Figure 1, the application scenarios for page acquisition methods provided in an embodiment of the present invention are illustratedFigure, includinguser equipment 101 andserver 102, whereinserver 102 is located at network side, includes browsing inuser equipment 101Device (or browser component in APP) and network middle layer.More specifically, when the operating system ofuser equipment 101 is AndroidIt, can be using customized component as network middle layer, when the operating system ofuser equipment 101 is IOS operation system when operating systemWhen system, the NSPprotocol that can carry IOS system is as network middle layer.
What network middle layer interception browser or browser component in user equipment were sent is used to obtain specified pageHypertext pass protocol HTTP request;Specified encryption identification is added in the HTTP request;Specified encryption identification will be addedHTTP request be sent to theserver 102 ofnetwork side.Server 102 receives the super of the acquisition specified page that user equipment is sentText transfer protocol HTTP request;When determining in the HTTP request comprising specified encryption identification, corresponding specified encryption is obtainedMode;The corresponding page data of the specified page is encrypted according to the specified cipher mode of the acquisition;Described it will addPage data after close returns to the user equipment.It is also mountable inuser equipment 101 to have answering with browsing pages functionWith program, here without limitation.
Illustrative methods
Below with reference to the application scenarios of Fig. 1, the page of illustrative embodiments according to the present invention is described with reference to Fig. 2~Fig. 9Face acquisition methods.It should be noted which is shown only for the purpose of facilitating an understanding of the spirit and principles of the present invention for above-mentioned application scenarios,Embodiments of the present invention are not limited in this respect.On the contrary, embodiments of the present invention can be applied to applicable appointWhat scene.
Fig. 2 is a kind of flow diagram of one embodiment of page acquisition methods provided by the invention, is mainly set including userThe standby process that the page is obtained from network side, executing subject can be theuser equipment 101 in application scenarios overview, as shown in Fig. 2,A kind of page acquisition methods provided in an embodiment of the present invention, include the following steps:
Step 201, it intercepts the hypertext for obtaining specified page and passes protocol HTTP request.
When it is implemented, after monitoring that browser or browser component are based on http protocol sending HTTP request, interceptionThe HTTP request, to handle the HTTP request.
Step 202, specified encryption identification is added in the HTTP request.
In this step, encryption identification is added in the HTTP request of interception, preferably specified encryption identification can be added to instituteState the head of HTTP request.Wherein, user equipment and network side are made an appointment the corresponding cipher mode of different encryption identifications, userEncryption identification is added in HTTP request by equipment, when network side receives the HTTP request of addition encryption identification, according to preservationEncryption identification and cipher mode corresponding relationship and the encryption identification in HTTP request, determine the corresponding encryption of encryption identificationMode.Wherein, specific cipher mode can refer to existing Encryption Algorithm, and similarly, corresponding manner of decryption is see also existingDecipherment algorithm, be not detailed here.Encryption identification in the embodiment of the present invention is preferred for indicating to obtain according to the encryption markKnow corresponding cipher mode and carry out encrypted page data, i.e., if carrying the mark in HTTP request, then it represents that acquisitionPage data is to use the encrypted page data of cipher mode corresponding to the encryption identification.This is only to for encryption identificationA kind of preferred limited way, in addition to this, the encryption identification in the embodiment of the present invention can be also used for indicate obtain unencryptionPage data, alternatively, carrying out encrypted page number using a kind of preset default encryption mode for indicating to obtainAccording to, that is, the encryption identification in the present invention can be used for indicating whether the page data of request needs to encrypt, using preset oneThe encryption of kind default behavior is encrypted using a certain mode in preset a variety of cipher modes.
Step 203, the HTTP request for adding specified encryption identification is sent to network side.
In this step, the HTTP request for adding specified encryption identification is sent to network based on http protocol by user equipmentSide.
The HTTP request for adding encryption identification is sent to network on the basis of http protocol by the embodiment that Fig. 2 is providedSide, to obtain the corresponding encrypted page data of the requested page from network side, so as to prevent user equipment requestsThe page be tampered, also, still communicated using http protocol, do not need to replace with http protocol into HTTPS agreement, savedAbout cost.
After executingstep 203, the HTTP request that network side is sent for user equipment can return to user equipment requestsThe corresponding page data of the page, at this point, page acquisition methods provided in an embodiment of the present invention further include the following contents:
Step 204, intercept that the network side sends to specify the encrypted page data of cipher mode, the page numberAccording to for the corresponding page data of the specified page.
Wherein, the specified cipher mode is the corresponding cipher mode of the specified encryption identification.
Step 205, according to the corresponding manner of decryption of the specified cipher mode, the encrypted page data is carried outDecryption processing.
Step 206, the specified page is generated according to the page data after decryption processing and shown.
When it is implemented, network side returns after user equipment sends the HTTP request for adding specified encryption identification to network sideIt returns according to respective encrypted mode (specified cipher mode corresponding with specified encryption identification) encrypted page data.UserEquipment obtains page data after the encryption that network side returns, and according to specified cipher mode pair corresponding with specified encryption identificationThe manner of decryption answered, the encrypted page data returned to network side are decrypted, and generate according to the page data after decryptionSpecified page is simultaneously shown.Specifically, can refer to the prior art in such a way that page data generates the page, it is not detailed here.
The embodiment of the present invention, the page data transmitted between user equipment and network side are encrypted page data,The page of user equipment requests can be prevented to be maliciously tampered, communicated, kept away based on http protocol between user equipment and network sideExempt to have saved cost using HTTPS agreement.
Specifically, network side returns to the html data that the corresponding page data of specified page includes the specified page, instituteStating html data includes text data, the chained address JS and resource data chained address.Wherein, the Chinese name of HTML is super literaryThis markup language, full name in English are HyperText Markup Language, and JS is JavaScript (a kind of scripting language)It abridges, the text data in the embodiment of the present invention in html data is the corresponding data of text in the page, resource data linkAddress is the corresponding chained addresses of resources such as picture, video, audio in the page, and the chained address JS is in the page by JS script controlThe chained address of the corresponding JS perform script in the part of system, such as the link of the corresponding JS perform script of submitting button in the pageAddress.Preferably, the content provided using Fig. 3, according to the corresponding manner of decryption of the specified cipher mode, to the encryptionPage data afterwards is decrypted:
Step 301, according to the corresponding manner of decryption of the specified cipher mode, the encrypted page data is carried outDecryption, the html data after obtaining the decryption of the specified page.
In this step, page data after encryption is decrypted, the html data after obtaining the corresponding decryption of specified page.
Step 302, according to the chained address JS in the html data, the chained address JS is obtained from the network sideIt is corresponding according to the specified encrypted JS data of cipher mode.
When it is implemented, network side, which pre-saves JS, links corresponding JS data, and the JS number that network side pre-savesAccording to the JS data to carry out encrypted JS data and unencryption according to each cipher mode.User equipment is according to html dataIn the chained address JS, from network side obtain the chained address JS it is corresponding according to the encrypted JS data of specified cipher mode.Wherein, different according to the chained address JS of the encrypted JS data of different cipher modes for same JS data, unencryptionThe chained address JS of the JS data and the chained address JS of the encrypted JS data are also different, such as: the JS data of unencryptionChained address be a, the chained addresses of the encrypted JS data is Xa, wherein X is for indicating that different cipher modes, X areWhen 1, cipher mode is the first cipher mode, and X indicates second of cipher mode when being 2, and so on, it is certainly, encryptedThe form of the chained address of JS data may be other forms, here without limitation.
In the embodiment of the present invention, the chained address JS that network side returns to user equipment is that specified cipher mode is correspondingThe chained address JS, user equipment can be obtained directly according to the chained address JS according to the encrypted JS number of specified cipher modeAccording to.
Step 303, according to the corresponding manner of decryption of the specified cipher mode, to described according to the specified encryption sideThe encrypted JS data of formula are decrypted, and obtain the JS data of the specified page.
Step 304, according to the resource data chained address in the html data, the resource is obtained from the network sideThe corresponding resource data in data link address.
Specifically, obtaining the corresponding number of resources in resource data chained address from network side according to resource data chained addressAccording to.Wherein, the sequencing ofstep 302 and step 304 can also can first carry outstep 304, then executestep 302 without limitation,Or step 302 and step 304 are performed simultaneously.
It is preferably carried out mode as one kind, page acquisition methods provided in an embodiment of the present invention also intercept the network sideSend with specify the encrypted load resource white list of cipher mode;According to the corresponding decryption side of the specified cipher modeFormula is decrypted the encrypted load resource white list, the load resource white list after being decrypted, described to addCarrying includes trusted chained address in the specified page in resource white list.Wherein, it loads in resource white list CSP and includesTrusted chained address in specified page, i.e. chained address in CSP are the higher chained address of security level, in CSPChained address includes resource data link address.It, can basis in the following way after load resource white list after being decryptedResource data chained address in the html data obtains the corresponding money in the resource data chained address from the network sideSource data:
When determining that the resource data chained address is the resource data chained address in the load resource white list, fromThe server obtains the corresponding resource data in the resource data chained address.
This mode for obtaining the corresponding resource data of resource data link address, it is ensured that resource data chained addressReliability further increases the safety of the resource data of acquisition.
Fig. 4 is a kind of flow diagram of one embodiment of page acquisition methods provided by the invention, mainly includes network sideTo the process of user equipment back page data, executing subject can be theserver 102 in application scenarios overview, such as Fig. 4 instituteShow, a kind of page acquisition methods provided in an embodiment of the present invention include the following steps:
Step 401, the HTTP request for the acquisition specified page that user equipment is sent is received.
Step 402, judge whether comprising specified encryption identification in the HTTP request, if so, step 403 is executed, it is noThen, step 406 is executed.
When it is implemented, whether the head that can determine whether HTTP request includes specified encryption identification.
Step 403, specified cipher mode accordingly is obtained.
In this step, when in HTTP request comprising specified encryption identification, determine corresponding with the specified encryption identificationSpecified cipher mode, wherein the corresponding relationship of encryption identification and cipher mode is stored in advance in network side, if specified cipher modeCurrent meaning is the page data for obtaining unencryption, then given step 406.
Step 404, the corresponding page data of the specified page is added according to the specified cipher mode of the acquisitionIt is close.
In this step, according to specified cipher mode, the corresponding page data of specified page is encrypted, wherein to pageThe explanation of face data can refer to the explanation in the page acquisition methods of user equipment side to page data, be not described herein.
Step 405, the encrypted page data is returned into the user equipment.
It, can be by the http response of the HTTP request sent for user equipment side, by the encrypted page in this stepData return to user equipment.Encrypted page data can be specifically edited into behind the head of http response.
Step 406, the page data of the corresponding unencryption of the specified page is returned into the user equipment.
In this step, encryption identification is not carried in HTTP request, it may be determined that user terminal is obtained by HTTP request not to be addedClose page data, at this time can be by the http response of the HTTP request sent for user equipment side, by the page of unencryptionData return to user equipment.
When it is implemented, the content of Fig. 5 offer can be used, determine in the HTTP request comprising specified encryption identification:
Step 501, whether the specific field for judging the head of the HTTP request is preset value, if so, executingstep502, otherwise, executestep 503.
Step 502, it determines in the HTTP request comprising specified encryption identification.
Step 503, it determines in the HTTP request not comprising specified encryption identification.
Be preferably carried out mode as one kind, can also by for specified page load resource white list with it is encryptedPage data returns to user equipment together, the content that can specifically provide according to Fig. 6, and load resource white list is returned to userEquipment:
Step 601, load resource white list is obtained from the head of the http response message for the HTTP request.
Wherein, illustrating for load resource white list can refer to user equipment for load resource white listIllustrate, is not described herein.
Step 602, load resource white list is encrypted according to the specified cipher mode of the acquisition.
Wherein, corresponding specified cipher mode acquired in specified cipher mode, that is, step 403 of acquisition
Step 603, the encrypted load resource white list is returned into the user equipment.
In the prior art, load resource white list can be carried and return to use on the head of the http response message by network sideFamily equipment, but the load resource white list can't be encrypted.This preferred embodiment loads the white name of resource by interceptionSingly, after and encrypting to load resource white list according to specified cipher mode and page data returns to user equipment together, thusGuarantee load resource white list not by malicious attack.When it is implemented, can be by encrypted load resource white list and page numberAccording to being added to behind the head of http response side by side, user equipment is returned to.
The content that can be provided according to Fig. 7, returns to the user equipment for the encrypted page data:
Step 701, the corresponding chained address JS of the specified cipher mode of the acquisition is determined, wherein the JS chain ground connectionThe corresponding JS data in location are the corresponding JS data of the specified page, and the JS data add according to the specified of the acquisition in advanceClose mode is encrypted.
When it is implemented, network side is directed to same JS data, the JS data are saved after the encryption of different cipher modes,The corresponding chained address JS, that is, the form of the corresponding chained address JS of the encrypted JS data of different cipher modes is different.It is specific to explain the detailed description that can refer to forstep 302, it is not described herein.Network side has pre-saved each JS numberIt, can be according to the specified page and user that user equipment requests obtain according to, cipher mode and the corresponding relationship of the chained address JSThe specified cipher mode of equipment side instruction obtains the corresponding JS chain of JS data of the specified corresponding specified page of cipher modeIt is grounded location.
Step 702, the corresponding chained address JS of the specified cipher mode that will acquire is placed on the HTLM of the specified pageIn data.
In this step, page data includes html data, and html data includes the chained address JS.
Step 703, it is returned after the HTLM data of the specified page being encrypted according to the specified cipher mode of the acquisitionTo the user equipment.
Wherein, for any JS data, the corresponding JS of the encrypted any JS data of different cipher modes is usedChained address is different, any JS data of unencryption and carries out encrypted described appoint according to each cipher mode in advanceOne JS data are stored in advance in backup server CND.Network side includes former server and multiple backup servers, and each standbyThe page data in former server is backed up in part server in advance, when it is implemented, user equipment is preferably and away from nearestA server (former server or backup server) communicated, with from the server obtain user equipment requests the pageCorresponding page data.
Fig. 8 is the process of page acquisition methods one embodiment provided by the invention interacted based on user equipment with network sideSchematic diagram, main includes the process interacted between network side and user equipment, is included the following steps:
Step 801, user equipment interception passes protocol HTTP request for obtaining the hypertext of specified page.
Step 802, specified encryption identification is added in the HTTP request by user equipment.
In this step, specified encryption identification is added to the head of the HTTP request.
Step 803, the HTTP request for adding specified encryption identification is sent to network side by user equipment.
Step 804, network side receives the HTTP request for the acquisition specified page that user equipment is sent.
Step 805, when network side is determined in the HTTP request comprising specified encryption identification, corresponding specified encryption is obtainedMode.
In this step, determined in the HTTP request in the following way comprising specified encryption identification:
Whether the specific field for judging the head of the HTTP request is preset value;If so, determining the HTTP requestIn include specified encryption identification.
Step 806, network side is according to the specified cipher mode of the acquisition by the corresponding page data of the specified pageIt is encrypted.
Step 807, the encrypted page data is returned to the user equipment by network side.
When it is implemented, the user equipment can be returned to the encrypted page data in the following way: reallyThe corresponding chained address JS of specified cipher mode of the fixed acquisition, wherein the corresponding JS data in the chained address JS are instituteThe corresponding JS data of specified page are stated, and the JS data are encrypted according to the specified cipher mode of the acquisition in advance;It willThe corresponding chained address JS of specified cipher mode obtained is placed in the HTLM data of the specified page;By the specific pageThe HTLM data in face return to the user equipment after encrypting according to the specified cipher mode of the acquisition;Wherein, for anyJS data, it is different using the corresponding chained address JS of the encrypted any JS data of different cipher modes, unencryptionAny JS data and in advance according to each cipher mode carry out encrypted any JS data be stored in advance in it is standbyIn part server.
Step 808, user equipment intercept that the network side sends to specify the encrypted page data of cipher mode, instituteStating page data is the corresponding page data of the specified page.
Step 809, user equipment is according to the corresponding manner of decryption of the specified cipher mode, to the encrypted pageData are decrypted.
Preferably, implementation steps 809 in the following way:
According to the corresponding manner of decryption of the specified cipher mode, the encrypted page data is decrypted, is obtainedHtml data to after the decryption of the specified page;According to the chained address JS in the html data, from the network sideIt is corresponding according to the specified encrypted JS data of cipher mode to obtain the chained address JS;According to the specified encryptionThe corresponding manner of decryption of mode has been decrypted according to the specified encrypted JS data of cipher mode to described, has obtained instituteState the JS data of specified page;And according to the resource data chained address in the html data, institute is obtained from the network sideState the corresponding resource data in resource data chained address.
Step 810, user equipment generates the specified page according to the page data after decryption processing and shows.
The page data in embodiment that Fig. 8 is provided includes the hypertext markup language html data of the specified page,The html data includes text data, the chained address JS and resource data chained address.
Fig. 9 is that the process for another embodiment of page acquisition methods that user equipment provided by the invention is interacted with network side is shownIt is intended to, main includes the process interacted between network side and user equipment, is included the following steps:
Step 901, user equipment interception passes protocol HTTP request for obtaining the hypertext of specified page.
Step 902, specified encryption identification is added to the head of the HTTP request by user equipment.
Step 903, the HTTP request for adding specified encryption identification is sent to network side by user equipment.
Step 904, network side receives the HTTP request for the acquisition specified page that user equipment is sent.
Step 905, it when network side determines that the head of the HTTP request includes specified encryption identification, obtains corresponding specifiedCipher mode.
Step 906, network side is according to the specified cipher mode of the acquisition by the corresponding page data of the specified pageIt is encrypted.
Step 907, network side obtains the load white name of resource from the head of the http response message for the HTTP requestIt is single.
It wherein, include trusted chained address in the specified page in the load resource white list.
Step 908, load resource white list is encrypted according to the specified cipher mode of the acquisition.
Step 909, network side compiles the encrypted page data and the encrypted load resource white listIt collects to behind the head for the http response message of the HTTP request, and edited http response message is returned toThe user equipment.
Step 910, user equipment intercept http response message, and from the head of the http response message behind acquisition withThe specified encrypted page data of cipher mode and encrypted load resource white list.
Step 911, user equipment is according to the corresponding manner of decryption of the specified cipher mode, to the encrypted pageData and encrypted load resource white list are decrypted.
Preferably, implementation steps 911 in the following way:
According to the corresponding manner of decryption of the specified cipher mode, the encrypted page data is decrypted, is obtainedHtml data to after the decryption of the specified page;According to the chained address JS in the html data, from the network sideIt is corresponding according to the specified encrypted JS data of cipher mode to obtain the chained address JS;According to the specified encryptionThe corresponding manner of decryption of mode has been decrypted according to the specified encrypted JS data of cipher mode to described, has obtained instituteState the JS data of specified page;And determine that the resource data chained address is the number of resources in the load resource white listWhen according to chained address, the corresponding resource data in the resource data chained address is obtained from the server.
Step 912, user equipment generates the finger according to page data and load resource white list after decryption processingDetermine the page and shows.
Example devices
After describing the page acquisition methods of exemplary embodiment of the invention, next, with reference to Figure 10~Figure 11The page acquisition device of exemplary embodiment of the invention is described.
Figure 10 is the structural representation provided in an embodiment of the present invention for being set to one of user equipment page acquisition deviceFigure, may include following module as shown in Figure 10:
First interception module 1001, for intercepting the hypertext biography protocol HTTP request for obtaining specified page;
Addingmodule 1002, for specified encryption identification to be added in the HTTP request;
Sendingmodule 1003, for the HTTP request for adding specified encryption identification to be sent to network side.
Preferably, page acquisition device provided in an embodiment of the present invention further include:
Second interception module 1004, for intercepting that the network side sends to specify the encrypted page number of cipher modeAccording to the page data is the corresponding page data of the specified page;
Deciphering module 1005, for according to the corresponding manner of decryption of the specified cipher mode, to the encrypted pageFace data is decrypted;
Display module 1006, for generating the specified page according to the page data after decryption processing and showing, whereinThe specified cipher mode is the corresponding cipher mode of the specified encryption identification.
Preferably, in page acquisition device provided in an embodiment of the present invention, the page data includes the specified pageHypertext markup language html data, the html data include text data, the chained address JS and resource data chain ground connectionLocation.
Preferably, thedeciphering module 1005 includes:
First decryption unit 10051, for according to the corresponding manner of decryption of the specified cipher mode, after the encryptionPage data be decrypted, the html data after obtaining the decryption of the specified page;
First acquisition unit 10052, for being obtained from the network side according to the chained address JS in the html dataThe chained address JS is corresponding according to the specified encrypted JS data of cipher mode;
Second decryption unit 10053, for according to the corresponding manner of decryption of the specified cipher mode, to it is described according toThe encrypted JS data of specified cipher mode are decrypted, and obtain the JS data of the specified page;
Second acquisition unit 10054, for according to the resource data chained address in the html data, from the networkSide obtains the corresponding resource data in the resource data chained address.
Preferably,second interception module 1004 is also used to, intercept that the network side sends to specify cipher modeEncrypted load resource white list;
Thedeciphering module 1005 is also used to, according to the corresponding manner of decryption of the specified cipher mode, to the encryptionLoad resource white list afterwards is decrypted, and includes trusted in the specified page in the load resource white listChained address.
Preferably,second acquisition unit 10054 is specifically used for, and determines the resource data chained address for load moneyWhen resource data chained address in the white list of source, the corresponding resource in the resource data chained address is obtained from the serverData.
Preferably, the addingmodule 1002 is specifically used for, and specified encryption identification is added to the head of the HTTP requestPortion.
Figure 11 is a kind of structural schematic diagram of the page acquisition device provided in an embodiment of the present invention for being set to network side, such asMay include following module shown in Figure 11:
Receiving module 1101 is asked for receiving the hypertext transfer protocol HTTP of acquisition specified page of user equipment transmissionIt asks;
Module 1102 being obtained, when for determining in the HTTP request comprising specified encryption identification, being obtained corresponding specifiedCipher mode;
Encrypting module 1103, for the specified cipher mode according to the acquisition by the corresponding page number of the specified pageAccording to being encrypted;
Sendingmodule 1104, for the encrypted page data to be returned to the user equipment.
Preferably, theacquisition module 1102 includes:
Judgingunit 11021, for judging whether the specific field on head of the HTTP request is preset value;
Determination unit 11022, for determining in the HTTP request and including when the judgement of judgingunit 11021 isSpecified encryption identification.
Preferably, theacquisition module 1102 is also used to, from the head of the http response message for the HTTP requestObtain load resource white list;
Theencrypting module 1103 is also used to, and is carried out according to the specified cipher mode of the acquisition to load resource white listEncryption;
The sendingmodule 1104 is also used to, and the encrypted load resource white list is returned to the user and is setIt is standby.
Preferably, the sendingmodule 1104 includes:
Determination unit 11041, the corresponding chained address JS of specified cipher mode for determining the acquisition, wherein instituteStating the corresponding JS data in the chained address JS is the corresponding JS data of the specified page, and the JS data are obtained according to described in advanceThe specified cipher mode taken is encrypted;
Placement unit 11042, the corresponding chained address JS of specified cipher mode for will acquire are placed on described specifiedIn the HTLM data of the page;
Return unit 11043, for the specified cipher mode by the HTLM data of the specified page according to the acquisitionThe user equipment is returned to after encryption;Wherein, for any JS data, described appoint using different cipher modes are encryptedThe corresponding chained address JS of one JS data is different, any JS data of unencryption and in advance according to each cipher mode intoThe encrypted any JS data of row are stored in advance in backup server.
Example devices
After the page acquisition methods and device for describing exemplary embodiment of the invention, next, introducing basisThe page acquisition device of another exemplary embodiment of the invention, the page acquisition device are located at user equipment side.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method orProgram product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, completeThe embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite hereReferred to as circuit, " module " or " system ".
In some possible embodiments, page acquisition device according to the present invention can include at least at least oneManage unit and at least one storage unit.Wherein, the storage unit is stored with program code, when said program code quiltWhen the processing unit executes, so that the processing unit executes root described in above-mentioned " illustrative methods " part of this specificationAccording to the present invention is based on the steps in the page acquisition methods of the various illustrative embodiments of subscriber terminal side.For example, the placeReason unit can execute step 201 as shown in Figure 2, intercept the hypertext biography agreement HTTP for obtaining specified page and askIt asks,step 202, specified encryption identification is added in the HTTP request,step 203, specified encryption identification will be addedHTTP request is sent to network side.
Thepage acquisition device 120 of this embodiment according to the present invention is described referring to Figure 12.Figure 12 is shownPage acquisition device 120 be only an example, should not function to the embodiment of the present invention and use scope bring any limitSystem.
As shown in figure 12,page acquisition device 120 is showed in the form of universal computing device.Page acquisition device 120Component can include but is not limited to: at least one above-mentionedprocessing unit 1201, at least one above-mentionedstorage unit 1202, connection are notThe bus 1203 of homologous ray component (includingprocessing unit 1201 and storage unit 1202).
Bus 1203 indicates one of a few class bus structures or a variety of, including memory bus or memory controlDevice, peripheral bus, processor or the local bus using any bus structures in a variety of bus structures.
Storage unit 1202 may include the readable medium of form of volatile memory, such as random access memory(RAM) 12021 and/orcache memory 12022, it can further include read-only memory (ROM) 12023.
Storage unit 1202 can also include program/utility with one group of (at least one)program module 1202412025,such program module 12024 includes but is not limited to: operating system, one or more application program, other programsIt may include the realization of network environment in module and program data, each of these examples or certain combination.
Page acquisition device 120 can also be logical with one or more external equipments 1204 (such as keyboard, sensing equipment etc.)Letter, can also be enabled a user to one or more equipment interact withpage acquisition device 120 communicate, and/or with make thisAny equipment (such as the router, modulatedemodulate thatpage acquisition device 120 can be communicated with one or more of the other calculating equipmentAdjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 1205.Also,page acquisition device 120Network adapter 1206 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public affairs can also be passed throughCommon network network, such as internet) communication.As shown in figure 12,network adapter 1206 obtains dress with for the page by bus 1203Set 120 other modules communication.It will be appreciated that though being not shown in the figure, can be used in conjunction withpage acquisition device 120 other hardPart and/or software module, including but not limited to: microcode, device driver, redundant processing unit, external disk drive array,RAID system, tape drive and data backup storage system etc..
Next, introducing the page acquisition device of another exemplary embodiment according to the present invention, which obtains dressSetting in network side.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method orProgram product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, completeThe embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite hereReferred to as circuit, " module " or " system ".
In some possible embodiments, page acquisition device according to the present invention can include at least at least oneManage unit and at least one storage unit.Wherein, the storage unit is stored with program code, when said program code quiltWhen the processing unit executes, so that the processing unit executes root described in above-mentioned " illustrative methods " part of this specificationAccording to the step in the page acquisition methods of the various illustrative embodiments of inventive network side.For example, the processing unit canTo execute step 401 as shown in Figure 4, the hypertext transfer protocol HTTP for the acquisition specified page that user equipment is sent is receivedStep 402 whether request judges comprising specified encryption identification in the HTTP request, if so, step 403 is executed, otherwise,Step 406 is executed, step 403, specified cipher mode accordingly is obtained, step 404, according to the specified cipher mode of the acquisitionThe corresponding page data of the specified page is encrypted, step 405, the encrypted page data is returned to describedStep 406 the page data of the corresponding unencryption of the specified page is returned to the user equipment by user equipment.
Thepage acquisition device 130 of this embodiment according to the present invention is described referring to Figure 13.Figure 13 is shownPage acquisition device 130 be only an example, should not function to the embodiment of the present invention and use scope bring any limitSystem.
As shown in figure 13,page acquisition device 130 is showed in the form of universal computing device.Page acquisition device 130Component can include but is not limited to: at least one above-mentionedprocessing unit 1301, at least one above-mentioned storage unit 1302, connection are notThe bus 1303 of homologous ray component (includingprocessing unit 1301 and storage unit 1302).
Bus 1303 indicates one of a few class bus structures or a variety of, including memory bus or memory controlDevice, peripheral bus, processor or the local bus using any bus structures in a variety of bus structures.
Storage unit 1302 may include the readable medium of form of volatile memory, such as random access memory(RAM) 13021 and/orcache memory 13022, it can further include read-only memory (ROM) 13023.
Storage unit 1302 can also include program/utility with one group of (at least one)program module 1302413025,such program module 13024 includes but is not limited to: operating system, one or more application program, other programsIt may include the realization of network environment in module and program data, each of these examples or certain combination.
Page acquisition device 130 can also be logical with one or more external equipments 1304 (such as keyboard, sensing equipment etc.)Letter, can also be enabled a user to one or more equipment interact withpage acquisition device 130 communicate, and/or with make thisAny equipment (such as the router, modulatedemodulate thatpage acquisition device 130 can be communicated with one or more of the other calculating equipmentAdjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 1305.Also,page acquisition device 130Network adapter 1306 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public affairs can also be passed throughCommon network network, such as internet) communication.As shown in figure 13,network adapter 1306 obtains dress with for the page by bus 1303Set 130 other modules communication.It will be appreciated that though being not shown in the figure, can be used in conjunction withpage acquisition device 130 other hardPart and/or software module, including but not limited to: microcode, device driver, redundant processing unit, external disk drive array,RAID system, tape drive and data backup storage system etc..
Exemplary process product
In some possible embodiments, the various aspects of page acquisition methods provided by the invention are also implemented asA kind of form of program product comprising program code, when described program product is run on a computing device, described programCode is for making the computer equipment execute described in above-mentioned " illustrative methods " part of this specification base according to the present inventionStep in the page acquisition methods of the various illustrative embodiments of user equipment side, for example, the computer equipment canTo executestep 201 as shown in Figure 2, intercepts the hypertext for obtaining specified page and pass protocol HTTP request,step202, specified encryption identification is added in the HTTP request,step 203, the HTTP request for adding specified encryption identification is sent outGive network side.
Above procedure product can be using any combination of one or more readable mediums.Readable medium can be readable letterNumber medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, redThe system of outside line or semiconductor, device or device, or any above combination.The more specific example of readable storage medium storing program for executing(non exhaustive list) includes: the electrical connection with one or more conducting wires, portable disc, hard disk, random access memory(RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact discRead memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
As shown in figure 14, theprogram product 140 of embodiment according to the present invention obtained for the page is described, it canTo use portable compact disc read only memory (CD-ROM) and including program code, and can run on the terminal device.SoAnd program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be it is any include or storage programTangible medium, the program can be commanded execution system, device or device use or in connection.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carryingReadable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letterNumber, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any canRead medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use orProgram in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to ---Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languagesCode, described program design language include object oriented program language-Java, C++ etc., further include conventionalProcedural programming language-such as " C " language or similar programming language.Program code can be fully in userIt calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculatingUpper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to farJourney calculates in the situation of equipment, and remote computing device can pass through the network of any kind --- including local area network (LAN) or extensivelyDomain net (WAN)-be connected to user calculating equipment, or, it may be connected to external computing device (such as utilize Internet serviceProvider is connected by internet).
In other possible embodiments, the various aspects of page acquisition methods provided by the invention can also be realizedFor a kind of form of program product comprising program code, when described program product is run on a computing device, the journeySequence code is for executing the computer equipment described in above-mentioned " illustrative methods " part of this specification according to the present inventionStep in the page acquisition methods of the various illustrative embodiments of network side, for example, the computer equipment can executeStep 401 as shown in Figure 4 receives the HTTP request for the acquisition specified page that user equipment is sent,Step 402, judge whether comprising specified encryption identification in the HTTP request, if so, otherwise executing step 403 executes stepRapid 406, step 403, specified cipher mode accordingly is obtained, it step 404, will be described according to the specified cipher mode of the acquisitionThe corresponding page data of specified page is encrypted, and step 405, the encrypted page data is returned to the user and is setIt is standby, step 406, the page data of the corresponding unencryption of the specified page is returned into the user equipment.
Above procedure product can be using any combination of one or more readable mediums.Readable medium can be readable letterNumber medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, redThe system of outside line or semiconductor, device or device, or any above combination.The more specific example of readable storage medium storing program for executing(non exhaustive list) includes: the electrical connection with one or more conducting wires, portable disc, hard disk, random access memory(RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact discRead memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
As shown in figure 15, theprogram product 150 of embodiment according to the present invention obtained for the page is described, it canTo use portable compact disc read only memory (CD-ROM) and including program code, and can run on the terminal device.SoAnd program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be it is any include or storage programTangible medium, the program can be commanded execution system, device or device use or in connection.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carryingReadable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letterNumber, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any canRead medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use orProgram in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to ---Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languagesCode, described program design language include object oriented program language-Java, C++ etc., further include conventionalProcedural programming language-such as " C " language or similar programming language.Program code can be fully in userIt calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculatingUpper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to farJourney calculates in the situation of equipment, and remote computing device can pass through the network of any kind --- including local area network (LAN) or extensivelyDomain net (WAN)-be connected to user calculating equipment, or, it may be connected to external computing device (such as utilize Internet serviceProvider is connected by internet).
It should be noted that although being referred to several modules of device in the above detailed description, this division is onlyIt is illustratively not enforceable.In fact, embodiment according to the present invention, the spy of two or more above-described modulesFunction of seeking peace can embody in a module.Conversely, the feature and function of an above-described module can be furtherIt is divided by multiple modules and embodies.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that orHint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desiredAs a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by oneStep is decomposed into execution of multiple steps.
Although detailed description of the preferred embodimentsthe spirit and principles of the present invention are described by reference to several, it should be appreciated that, thisIt is not limited to the specific embodiments disclosed for invention, does not also mean that the feature in these aspects cannot to the division of various aspectsCombination is benefited to carry out, this to divide the convenience merely to statement.The present invention is directed to cover appended claims spirit andIncluded various modifications and equivalent arrangements in range.