CN102882974B - Method for saving website access resource by website identification version number - Google Patents
Method for saving website access resource by website identification version number Download PDFInfo
- Publication number
- CN102882974B CN102882974B CN201210389871.8A CN201210389871A CN102882974B CN 102882974 B CN102882974 B CN 102882974B CN 201210389871 A CN201210389871 A CN 201210389871A CN 102882974 B CN102882974 B CN 102882974B
- Authority
- CN
- China
- Prior art keywords
- data
- website
- version number
- page
- characters string
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000008859 change Effects 0.000 claims description 24
- 230000000052 comparative effect Effects 0.000 claims description 6
- 238000012217 deletion Methods 0.000 claims description 5
- 230000037430 deletion Effects 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 5
- 230000002427 irreversible effect Effects 0.000 claims description 3
- 230000001737 promoting effect Effects 0.000 abstract 1
- 230000004044 response Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a method and a system for saving website access resource by a website identification version number. The method comprises the following steps of: generating an encrypted character string by encrypting the website identification version number; judging whether data of a web page requested by a client browser is updated by comparing the encrypted character string submitted by the client browser with the encrypted character string newly generated by a website server; and if the data are not updated, directly promoting the client browser to display the web page in a cache memory by using the website server without performing corresponding logical operation, so that bandwidth resources and computational resources of the website sever are saved. The system consists of the client browser, the website server and a data server, wherein the website server mainly comprises a request receiver, an analyzer, a website identification version number generator, an encryptor, a comparator, a logic-arithmetic unit and a data transmitter.
Description
Technical field
The present invention relates to network communication technology field, particularly relate to a kind of method of being saved website visiting resource by data identification version number.
Background technology
For a website, client browser is filed a request to Website server, Website server will do a series of process according to this request: obtain related data from database server, play up and will form corresponding pagefile, and return to client browser.Therefore user's visit capacity of website is larger, so the bandwidth resources that consume of Website server and computational resource also larger.
In order to save the bandwidth resources that Website server consumes, current industry also works out certain methods to reduce volume of transmitted data and the operand of Website server, but all there are some defects.
As the implementation method that Spring Framework in Java provides, need Website server after the generation of having played up content of pages, carry out MD5 code encryption to the complete page byte data being about to return client browser, the character string utilizing md5 encryption to complete is as the identifier of ETAG.This processing mode requires the request for each client browser, Website server must complete all logical operations, comprise the content playing up accession page, after completing these, ETAG with browser transmission compares mutually, can judge that whether this page is by client-cache, therefore, this method can't save the computational resource of Website server, especially when high access, because Website server needs all must process all logical operations to each request, although decrease taking internet transmission bandwidth resources, but Website server access pressure is reduced and there is no help.
Patent " supplying method of WEB page data, WEB server and WEB application system " (number of patent application: 200910252576.6), this patent proposes a kind of method: when the request to the page that WEB server acquisition client sends, WEB server first judges whether the element data providing same page to client, if provided, WEB server only provides the current service data of identical WEB page to client, reduce the mutual data volume between WEB server and client by this method, thus avoid the waste to bandwidth resources.But the problem of the method is that the logic of client displayed page is complicated, client browser obtains new business datum from WEB server, then the element data obtained with client browser before synthesizes, form new WEB page, this needs client browser to perform a large amount of JavaScript logical operation, synthesizes final displayed page, for different browsers various in client, need to make a large amount of tests and amendment in compatible, realize difficulty higher; In addition, when after the website version that WEB server is upgraded new, its page elements data also change simultaneously, need the notice all page elements data of browser update all and business datum, processing mode more complicated.And no matter whether WEB server provided identical WEB page to client browser, WEB server all must be each to client browser transport service data, this reduce realize in mutual data volume insufficient.
Therefore, how fully, save access resources, particularly bandwidth resources and the computational resource of Website server quickly, for high access website be very necessary.
Summary of the invention
For effectively reducing Website server access resources occupation problem, the present invention proposes a kind of method and system of being saved website visiting resource by website identification version number.
The invention discloses a kind of method of being saved website visiting resource by website identification version number, technical scheme is as follows, comprising:
Website server receives the request of client browser, and according to the data needed in request, accessing database server, obtains the data identification version number of many corresponding data record and current website orientation version number.
Described data identification version number is combined with data record ID by versions of data number, just can form unique data identification version number, record current versions of data number therewith in order to identification data record.Described versions of data number refers in a database, and after certain data record changes, database is the mark that data record generates unique versions of data by the trigger that predefined is good.
Data identification version number and current website orientation version number according to fixing order composition website identification version number, and take the mode of One-Way Encryption to website identification version number, generate unique encryption character string.
Website server sends client browser to the data of encrypted characters string and displayed page.The corresponding relation of encrypted characters string and displayed page set up by browser, and, by by displayed page as the document object in javascript, adopt key-value pair (KEY: encrypted characters string, VALUE:document object (corresponding displayed page)) mode buffer memory in a browser.When the different URL of repeatedly request server, client browser in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page.
When browser proposes identical accessing page request (URL and submit to content consistent) to Website server again, browser sends the encrypted characters string obtained before to Website server.
After Website server receives client browser requests, again according to the data needed in requests for page, accessing database server, obtain the data record ID, versions of data number and the current site released version number that need to show, after they are combined into website identification version number in a fixed order, One-Way Encryption is carried out to website identification version number, generates new encrypted characters string.
Then newly-generated encrypted characters string and the encrypted characters string received from client browser are compared, if after come to the same thing, then Website server directly notifies that client browser extracts the document object of this encrypted characters string of correspondence in buffer memory, thus shows the corresponding page.If the relatively rear result of encrypted characters string is different, then Website server again generates the new page according to new data acquisition system and sends client browser to, and sends the new encrypted characters string of browser to simultaneously.
The information that client returns according to server, or be illustrated in the content of pages in browser rs cache, or show the content of pages that server newly sends, and preserve new encrypted characters string and new displayed page and corresponding relation between the two.
In order to solve the problem, the invention also discloses a kind of system of being saved website visiting resource by website identification version number, native system comprises client browser, Website server and database servers group.
Client browser comprises multi-page buffer, renderer.
Multi-page buffer, for the page that buffer memory Website server returns.By by displayed page as the document object in javascript, adopt key-value pair (KEY: encrypted characters string, VALUE:document object (corresponding displayed page)) mode be buffered in browser multipage buffer, when the different URL of repeatedly request server, multi-page buffer in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page.
Renderer, for showing the page that Website server returns, or shows the page called from multi-page buffer.
Website server mainly comprises request receiver, analyzer, website identification version number maker, encryption equipment, comparator, logical-arithmetic unit, data transmitter.
Request receiver, receives the page request of client browser, wherein includes the same page encrypted characters string of browser buffer memory last time for Website server, and gives analyzer the solicited message received.
Analyzer, for according to the data needed in the browse request page, thus the data message that when determining to prepare accessing database server, needs obtain, then accessing database server, obtain related data Record ID, the versions of data number required for page presentation, and current site released version number, and these data messages are sent to website identification version number maker.
Website identification version number maker, after receiving data record ID that analyzer sends, versions of data number, current site released version number, first the versions of data number of data record ID and this data record is synthesized data identification version number according to fixing der group, again data identification version number and website orientation version number are combined into website identification version number in a fixed order, then newly-generated website version number are sent to encryption equipment.
Encryption equipment, for carrying out One-Way Encryption to website identification version number, forms encrypted characters string.
Comparator, for comparing newly-generated encrypted characters string and the same page encrypted characters string received from client browser.Comparative result is different, then carry out work by logical-arithmetic unit, if identical, then and calling data transmitter.
Logical-arithmetic unit, for when the relatively rear result of encrypted characters string is different, then Website server carries out logical operation according to new data acquisition system again, generates the new page, and new page data and new encrypted characters string are sent to data transmitter.
Data transmitter, when coming to the same thing after the comparison, directly notifies that client browser extracts the document object of this encrypted characters string of correspondence in multipage buffer, thus shows the corresponding page.When result is different after the comparison, the new page data received and new encrypted characters string are sent to client browser.
Database server, for the various data messages of managing web.
The present invention compared with prior art, its remarkable advantage:
1, differentiate whether content of pages upgrades by website identification version number, the encrypted characters string of Website server and the newly-generated encrypted characters string of Website server is sent to compare client browser, if comparative result is identical, prompting client browser is directly used the buffer memory page by Website server, saves the bandwidth resources of Website server.
2, after receiving the page request of client browser because of Website server, first encrypted characters string is compared to judge whether content of pages upgrades, solve in the prior art, after Website server must first complete all logical operations, just judge that whether this page is by the problem of client browser buffer memory, saved the computational resource of Website server.
3, (number of patent application: Problems existing 200910252576.6): cannot solve element data and change, when business datum does not change, client browser shows the synchronized update of content to patent " supplying method of WEB page data, WEB server and WEB application system ".The inventive method to change and business datum does not have vicissitudinous situation at Website page element data, by comparing encrypted characters Chuan Zhong website orientation version number, when ensureing that encrypted characters string changes, browser can show the up-to-date page immediately, improves the real-time exhibition effect of browser.
4, the present invention takes the mode of One-Way Encryption to website identification version number, generates encrypted characters string, hacker cannot be guessed by encrypted characters string content and original website identification version number, is conducive to the safety improving transfer of data.
5, the present invention is by displayed page as the document object in javascript, adopts the mode buffer memory of key-value pair in a browser.Like this when the different URL of repeatedly request server, client browser in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page, is conducive to the access speed improving browser further, reduces taking Website server access resources.
6, highly versatile of the present invention, avoids and needs to consider problem compatible between various different browsers in existing patented method, be conveniently applied in various third party website.
Accompanying drawing explanation
Fig. 1 is embodiment of the present invention handling process.
Fig. 2 is embodiment of the present invention encrypted characters string product process.
Fig. 3 is embodiment of the present invention system construction drawing.
Embodiment
For making the object of embodiments of the invention, technical scheme and advantage clearly, simplicity of explanation is done to some terms related in the embodiment of the present invention below.
Whether ETAG:ETAG is the Entity Tag of URL, change for indicating URL object, distinguishes different language and Session etc.Http protocol specification definition ETAG be " the entity value of requested variable ", ETAG be one can with the mark of Web resource associations (token), typical Web resource can be a Web page, also may be JSON or XML document.
HTTP conditional code 304 Not Modified: be called for short 304 states, represents that corresponding WEB resource is not modified.Client has the document of buffering, and have issued an opportunistic request (be generally to provide If-Modified-Since head and represent that client only wants the document upgraded than the scheduled date).Server tells client, and originally the document of buffering can also continue to use.When Website server returns HTTP response and conditional code is 304, client browser uses the page presentation of buffer memory to user.
HTTP conditional code 200 OK: be called for short 200 states, represent client browser requests success, this response returns by the head response desired by request or data volume.
Ajax: i.e. " Asynchronous JavaScript and XML " (asynchronous JavaScript and XML), refers to a kind of web development technologies creating interaction network page application.By Ajax technology, to service end request URL, and at the concrete page that the corresponding access of client-cache obtains.
Versions of data number: in a database, every bar data represent certain entity, usually in a database, the content of each data entity there occurs one-shot change, data entity version number there occurs change, therefore adding data entity is one-shot change, Update Table physical contents is also one-shot change, deleting data entity is also one-shot change, for deletion data entity, do not take really to go to delete data entity in a database, but simply the flag bit in data entity is labeled as deletion, as long as therefore every bar data exist, the data identification version number that capital has oneself unique.After data change, database is that it generates unique versions of data number by the trigger that predefined is good, according to the difference of versions of data number, just can be identified data entity by the versions of data field in data entity and whether there occurs change.Therefore when versions of data that same record obtains for twice is number identical, then can judge that this data entity does not change, when the versions of data of to get for twice is number different, just can there occurs change by decision data entity.
Data record ID: for a certain bar data record, the how uniqueness of identification data record? by distributing a unique data record ID to each data record, just same data record can be determined whether according to whether data record ID is identical.
Data identification version number: versions of data number combines with data record ID, just can form unique data identification version number, record current versions of data number therewith in order to identification data record.When a data record changes, form unitary data identification version number, it is made up of by permanent order the versions of data number of a data Record ID and this data record, when many data record change, form multivariate data identification version number, it is made up of in a fixed order multiple unitary data identification version number.
Website orientation version number: when all data in website and arithmetic logic all do not change, but web site contents upgrading, make page presentation content there occurs change, therefore identifies the version number that website itself upgrades and needs provide.
Encrypted characters string: many data in usual meeting display data storehouse on Website page, when therefore judging whether content of pages changes, many relevant data record of Website server comprehensive descision are needed whether to change, website also may there occurs upgrading simultaneously simultaneously, also need to judge whether content there occurs change according to website orientation version number, therefore each page needs to provide a specific method, the data identification version number of many data record and website orientation version number according to relating to this page generate unique encryption character string, in order to judge whether the data of the page change.And this ad hoc approach performs because of the first step being placed on Servers-all logical operation, thus when page data is not updated, Website server operand can be reduced, save server computational resource.
Consult shown in Fig. 1, the process flow of the embodiment of the present invention, specifically comprises the following steps:
Step 100: client browser proposes access request to Website server.
Step 101: after the request of Website server to browser is analyzed, accessing database server, obtains data record ID and the versions of data number of required data in displayed page, and current website orientation version number.Wherein, the form of versions of data number is taked to start with [0000000001] at present, and each amendment data record then adds the mode of 1.The form of data record ID is taked to start with [0000000001] mode that each interpolation data record then adds 1 at present.The generating mode that current web released version number is taked change each time from the first edition is reached the standard grade all with 1 for step-length adds up, then first time reaches the standard grade version number for [0000000001].
Data identification version number generating mode combines in a fixed order with data record ID and versions of data number.Data ID as a data record self is [0000015321], and the number of times be modified is 2 times, then the data identification version number of these data is [00000153210000000002].
Data identification version number and website orientation version number are according to prior permanent order composition website identification version number, and by carrying out One-Way Encryption to website identification version number, generate unique encryption character string, send the data of the page to client browser, and the unique encryption character string that affix generates in transferring content.
In embodiments of the present invention, employing be md5 encryption, to ensure the irreversible of data.The actual algorithm also can taking other satisfactory encryption.
Step 102: client browser adopts Ajax technology to obtain server back page content, content of pages is showed user, server is returned the displayed page that encrypted characters string and server return simultaneously and set up one-to-one relationship, and displayed page is adopted the mode buffer memory of key-value pair (KEY: encrypted characters string, VALUE:document object (corresponding displayed page)) in a browser as the document object in javascript.So when repeatedly request server URL, client browser in fact can the multiple different document object of buffer memory (corresponding multiple difference needs the page shown).To utilize encrypted characters string just can obtain corresponding document object as key and resolve to content of pages show browser when needs.
Step 103: (URL and the parameter of browser submission are all identical with parameter with the URL submitted to last time when user proposes identical accessing page request again, in general when browser is not closed and interval time is less than a given time, this condition all can be satisfied) time, client browser on the Header head of " IF-NONE-MATCH ", the corresponding encrypted characters obtained before should be serially added into, and submit to Website server.
Step 104: Website server is analyzed request, generates new website identification version number again, and re-encrypted generates new encrypted characters string, and the encrypted characters string then submitted to client browser compares.
Step 105: whether identically compare encrypted characters string.If identical, carry out step 106.If not identical, carry out step 107.
Step 106: if encrypted characters string comparative result is identical, then represent that the data identification version number obtained in client browser Twice requests is identical, the data returned also should be identical, and the page that so client browser Twice requests returns also should be identical.Website server directly returns 304 states, and does not transmit displayed page content.
Partial code as follows can be for reference:
// obtain encrypted characters string content
byte[] body = responseWrapper.toByteArray();
intstatusCode = responseWrapper.getStatusCode();
// judge conditional code whether in normal range (NR)
if(isEligibleForEtag(request, responseWrapper, statusCode, body)) {
// first get inside response
etag
String responseETag = responseWrapper.getEtag();
if(responseETag ==
null) {
responseETag = generateETagHeaderValue(body);
response.setHeader(
HEADER_ETAG, responseETag);
}
// compare with the encrypted characters string of browser
String requestETag = request.getHeader(
HEADER_IF_NONE_MATCH);
if(responseETag.equals(requestETag)) {
if(logger.isTraceEnabled()) {
logger.trace("ETag [" + responseETag + "] equal to
If-None-Match, sending 304");}
// identical when, directly arranging back page data length is 0
response.setContentLength(0);
// and the conditional code arranged in HTTP response is 304:NOT_MODIFIED
response.setStatus(
HttpServletResponse.
SC_NOT_MODIFIED); }
else{
// different when, export page content-data to browser
copyBodyToResponse(body, response);}
}
else{
// non-normal range directly exports page content-data
if(logger.isTraceEnabled()) {
logger.trace("Response with status code [" +
statusCode + "] not eligible for ETag");
}
copyBodyToResponse(body, response);}。
Step 107: if encrypted characters string comparative result is different, then Website server returns 200 states, simultaneously again new according to new data genaration displayed page, then sends client browser to new encrypted characters string and new displayed page content.
Step 108: the HTTP conditional code that client browser returns according to Website server judges, if 304 states, then illustrates that the displayed page that encrypted characters string is corresponding is buffered in client browser.Request encrypted characters string extracting directly can be utilized to the document object of buffer memory before by the javascript code in client browser, and become content of pages to show document analysis of object.If 200 states, then client browser shows the new page that Website server returns, and is buffered in client browser by new displayed page and new encrypted characters string, and the mode of buffer memory is identical with the treatment step in step 102.
In order to prevent the page of client-cache too much, here the page of client-cache has the upper limit, current employing be definite value 10, if the client browser page that buffer memory 10 is different, then the page of the buffer memory that the access time is more ancient then can be abandoned, and namely utilizes javascript the document object of this page and corresponding encrypted characters string directly to be removed.This page again request server time, also can not add corresponding encrypted characters string, perform a series of process as brand-new access request.
Consult shown in Fig. 2, embodiment of the present invention encrypted characters string product process, its step is as follows:
Step 200: after Website server receives the page request of browser, accessing database server, obtains relevant data record ID, versions of data number and website orientation version number.
Step 201: when page presentation wall scroll data record, only needs the mode the versions of data of wall scroll data record ID and this data record number is merged by character string with permanent order to link together, forms data identification version number.
When page presentation many data record, one by one the versions of data of many data Record IDs and corresponding data record number by being merged into multiple unitary data identification version number with the order specified, then these unitary data identification version numbers are merged into multivariate data identification version number in a fixed order.
During character string connects, data identification character string is necessary for permanent order, to ensure twice same client-requested, desired by the data that obtain be same, therefore should be noted that, all data acquisition systems obtained should be the set of order, time as Query Database, if the outcome expectancy of inquiry is the set of many records, then the SQL text of Query Database must add order, as ORDER DESC or ORDER ASC etc.To ensure that querying condition is identical, the content returned also should be identical.
Step 202: data identification version number and website orientation version number synthesize website identification version number according to fixing der group.
Step 203: One-Way Encryption is carried out to website identification version number.
Step 204: generate new unique encryption character string.
The generation of unique encryption character string must meet following principle, first encrypted characters string is necessary for One-Way Encryption, original data identification version number to ensure that hacker cannot be guessed by encrypted characters string content, secondly the generation of encrypted characters string needs to ensure that data identification version number and the website identification version number character string order of connection are followed fixing order and arranged, be combined into website identification version number, to ensure following constraint.
If there are 2 website identification version number, be respectively x, y, if x equals y, then encrypted characters string f (x) formed after One-Way Encryption equals f (y), if x is not equal to y, encrypted characters string f (x) then after One-Way Encryption is not equal to f (y), to guarantee the comparison by encrypting later character string, just can know that whether 2 website identification version number are identical, also just meaning whether the page can knowing website there occurs change.Current md5 encryption mode can be satisfied the demand.
Consult shown in Fig. 3, embodiment of the present invention system configuration comprises: browser 30, Website server 31, database server 32.
Client browser comprises multi-page buffer 300, renderer 301.
Multi-page buffer 300, for the page that buffer memory Website server returns.By by displayed page as the document object in javascript, adopt key-value pair (KEY: encrypted characters string, VALUE:document object (corresponding displayed page)) mode be buffered in multi-page buffer, when the different URL of repeatedly request server, multi-page buffer in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page.
Renderer 301, for receiving the return information of Website server 31, if what return is " 304 state ", then the page called from multi-page buffer 300 also plays up display.If what return is " 200 state ", then shows the new page that Website server returns, and new displayed page and new encrypted characters string are buffered in multipage buffer 300.
Website server 31 mainly comprises request receiver 310, analyzer 311, website identification version number maker 312, encryption equipment 313, comparator 314, logical-arithmetic unit 315, data transmitter 316.
Request receiver 310, receives the page request of client browser 30 for Website server 31, wherein include the same page encrypted characters string of browser buffer memory last time, and gives analyzer 311 the solicited message received.
Analyzer 311, for according to the data needed in the browse request page, thus the data message that when determining to prepare accessing database server, needs obtain, then accessing database server, obtain related data Record ID, the versions of data number required for page presentation, and current site released version number, and these data messages are sent to website identification version number maker 312.
Website identification version number maker 312, after receiving data record ID that analyzer 311 sends, versions of data number, current site released version number, when only there is wall scroll data record and changing, only need the mode the versions of data of wall scroll data record ID and this data record number is merged by character string with permanent order to link together, form data identification version number.When there is many data record in the page, first one by one the versions of data number of many data Record IDs and corresponding data record is merged into multiple unitary data identification version number by permanent order, then multiple unitary data identification version number is merged into a multivariate data identification version number according to fixing order.Again final data identification version number and website orientation version number are combined into website identification version number in a fixed order, then newly-generated website version number are sent to encryption equipment 313.
Encryption equipment 313, for carrying out One-Way Encryption to website identification version number, forms encrypted characters string, employing be md5 encryption, to ensure the irreversible of data.
Comparator 314, for comparing newly-generated encrypted characters string with the corresponding same page encrypted characters string received from client browser 30.Comparative result is different, then carry out work by logical-arithmetic unit 315, if identical, then and calling data transmitter 316.
Logical-arithmetic unit 315, for when the relatively rear result of encrypted characters string is different, then again carries out logical operation according to new data acquisition system, generates the new page, new page data and new encrypted characters string are sent to data transmitter 316.
Data transmitter 316, when coming to the same thing after the comparison, return " 304 state " to client browser 30, notice client browser 30 extracts the document object of this encrypted characters string of correspondence in multipage buffer 300, thus shows the corresponding page.When result is different after the comparison, return " 200 state " to client browser 30, new page data and new encrypted characters string are sent to client browser 30.
Database server 31, for the various data messages of managing web.Wherein, versions of data number is generated automatically by trigger.When certain record in database is newly added, amendment, or after logic deletion (being labeled as deletion state with marker bit), database trigger can be performed automatically, and gives unique versions of data number that this data record is new.
The present invention is by data identification version number, judge whether the page of client browser requests there occurs Data Update, if do not upgraded, Website server will not carry out corresponding logical operation, direct prompting client browser shows the page in buffer memory, saves bandwidth resources and the computational resource of Website server.
The developer of this area can carry out various change and modification to embodiments of the invention and not depart from the spirit and scope of the present invention.Like this, if these amendments in the embodiment of the present invention and modification belong within the claims in the present invention and equivalent scope thereof, then the embodiment in the present invention also comprises these and changes and modification.
Claims (6)
1. saved a method for website visiting resource by website identification version number, it is characterized in that, comprising:
Website server receives the request of client browser, according to the data needed in requests for page, database server obtains corresponding data record ID, versions of data number, website orientation version number, by after permanent order sequence, website identification version number is formed to them, carry out One-Way Encryption, generate unique encrypted characters string;
Website server sends client browser to the data of encrypted characters string and displayed page;
The corresponding relation of encrypted characters string and displayed page set up by browser, and displayed page is cached, when the different URL of repeatedly request server, client browser in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page;
When browser proposes identical accessing page request to Website server, browser sends the encrypted characters string obtained before to Website server simultaneously;
Website server generates new encrypted characters string after receiving client browser requests, then newly-generated encrypted characters string and the encrypted characters string received from client browser is compared;
If after come to the same thing, then Website server directly notifies that the page that client browser extracts in buffer memory is shown; If the relatively rear result of encrypted characters string is different, then the page that Website server is again new according to new data genaration sends client browser to, and sends the new encrypted characters string of browser to simultaneously;
When certain data record in database is newly added, amendment, or after logic is deleted, database trigger can be performed automatically, give unique versions of data number that this data record one is new, after Website server receives the request of client browser, accessing database immediately, obtains this versions of data number;
Versions of data number combines with data record ID, just can form unique data identification version number, record current versions of data number therewith in order to identification data record; When a data record changes, form unitary data identification version number, it is made up of by permanent order the versions of data number of a data Record ID and this data record, when many data record change, form multivariate data identification version number, it is made up of in a fixed order multiple unitary data identification version number.
2. the method for claim 1, it is characterized in that, the corresponding relation of encrypted characters string and displayed page set up by browser, and, by by displayed page as the document object in javascript, adopt key-value pair mode buffer memory in a browser, wherein key-value pair comprises, KEY: encrypted characters string, VALUE:document object.
3. the method for claim 1, is characterized in that, data identification version number and website orientation version number form website identification version number in a fixed order.
4. the method for claim 1, is characterized in that, to website identification version number, employing be md5 encryption, to ensure the irreversible of data.
5. saved a system for website visiting resource by website identification version number, it is characterized in that, comprising:
Become by client browser, Website server and database servers group;
Client browser comprises multi-page buffer, renderer;
Multi-page buffer, for the page that buffer memory Website server returns, by by displayed page as the document object in javascript, the mode of key-value pair is adopted to be buffered in browser multipage buffer, when the different URL of repeatedly request server, multi-page buffer in fact can the multiple different document object of buffer memory, corresponding multiple different displayed page;
Renderer, for showing the page that Website server returns, or shows the page called from multi-page buffer;
Website server mainly comprises request receiver, analyzer, website identification version number maker, encryption equipment, comparator, logical-arithmetic unit, data transmitter;
Request receiver, receives the page request of client browser, wherein includes the same page encrypted characters string of browser buffer memory last time for Website server, and gives analyzer the solicited message received;
Analyzer, for according to the data needed in the browse request page, thus the data message that when determining to prepare accessing database server, needs obtain, then accessing database server, obtain related data Record ID, the versions of data number required for page presentation, and current site released version number, and these data messages are sent to website identification version number maker;
Website identification version number maker, after receiving data record ID that analyzer sends, versions of data number, current site released version number, when only there is wall scroll data record and changing, only need the mode the versions of data of wall scroll data record ID and this data record number is merged by character string with permanent order to link together, form data identification version number; When there are many data record and changing, first one by one the versions of data number of wall scroll data record ID and corresponding data record is merged into multiple unitary data identification version number by permanent order, then multiple unitary data identification version number is merged into a multivariate data identification version number according to fixing order; Again final data identification version number and website orientation version number are combined into website identification version number in a fixed order; Then newly-generated website version number is sent to encryption equipment;
Encryption equipment, for carrying out One-Way Encryption to website identification version number, forms encrypted characters string;
Comparator, for comparing newly-generated encrypted characters string and the same page encrypted characters string received from client browser; Comparative result is different, then carry out work by logical-arithmetic unit, if identical, then and calling data transmitter;
Logical-arithmetic unit, for when the relatively rear result of encrypted characters string is different, then Website server carries out logical operation according to new data acquisition system again, generates the new page, and new page data and new encrypted characters string are sent to data transmitter;
Data transmitter, when coming to the same thing after the comparison, directly notifies that client browser extracts the document object of this encrypted characters string of correspondence in multipage buffer, thus shows the corresponding page; When result is different after the comparison, the new page data received and new encrypted characters string are sent to client browser;
Database server, for the various data messages of managing web.
6. system as claimed in claim 5, it is characterized in that, in database server, versions of data number is generated automatically by trigger; When certain data record in database is newly added, amendment, or after logic deletion, database trigger can be performed automatically, and gives unique versions of data number that this data record is new.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210389871.8A CN102882974B (en) | 2012-10-15 | 2012-10-15 | Method for saving website access resource by website identification version number |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210389871.8A CN102882974B (en) | 2012-10-15 | 2012-10-15 | Method for saving website access resource by website identification version number |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102882974A CN102882974A (en) | 2013-01-16 |
CN102882974B true CN102882974B (en) | 2015-04-29 |
Family
ID=47484116
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210389871.8A Expired - Fee Related CN102882974B (en) | 2012-10-15 | 2012-10-15 | Method for saving website access resource by website identification version number |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102882974B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103593406A (en) * | 2013-10-17 | 2014-02-19 | 北京奇虎科技有限公司 | Static resource identifier processing method and device |
CN104820676B (en) * | 2015-04-14 | 2018-06-19 | 天脉聚源(北京)教育科技有限公司 | A kind of method and device for judging version number's size |
CN104811394A (en) * | 2015-04-21 | 2015-07-29 | 深圳市出众网络有限公司 | Method and system for saving traffic for accessing server |
CN105592132B (en) * | 2015-07-09 | 2019-05-10 | 中国银联股份有限公司 | Pass through the method for network provided data |
CN105119917B (en) * | 2015-08-21 | 2018-03-06 | 福建天晴数码有限公司 | Strengthen the method and system of Information Security |
CN106489145B (en) * | 2015-12-28 | 2019-07-26 | 华为技术有限公司 | Access method, device and the Web site system of web site |
CN106156291A (en) * | 2016-06-29 | 2016-11-23 | 深圳市彬讯科技有限公司 | The caching method of static resource and system thereof based on Localstroage |
CN107357876A (en) * | 2017-07-06 | 2017-11-17 | 校脸科技(北京)有限公司 | A kind of web access methods and device |
CN108415976B (en) * | 2018-02-09 | 2021-11-09 | 西安博达软件股份有限公司 | Method for rapidly publishing website file based on CMS system |
US10924570B2 (en) * | 2018-05-04 | 2021-02-16 | Microsoft Technology Licensing, Llc | Notification updates for saved sites |
CN109522060A (en) * | 2018-10-16 | 2019-03-26 | 深圳壹账通智能科技有限公司 | The restoring method and terminal device of business scenario |
CN109933349A (en) * | 2019-01-28 | 2019-06-25 | 优信拍(北京)信息科技有限公司 | A kind of method to be timely updated based on vue spa, system and equipment |
CN112149008B (en) * | 2020-09-18 | 2022-09-23 | 四川工商学院 | Method for calculating document version set |
CN113254484A (en) * | 2021-06-17 | 2021-08-13 | 杭州天谷信息科技有限公司 | Client-based data encryption caching method and system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724297A (en) * | 2012-05-25 | 2012-10-10 | 上海传漾网络科技有限公司 | Method for increasing access speed in browser/server (BS) architecture advertisement management system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2299824C (en) * | 2000-03-01 | 2012-02-21 | Spicer Corporation | Network resource control system |
-
2012
- 2012-10-15 CN CN201210389871.8A patent/CN102882974B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102724297A (en) * | 2012-05-25 | 2012-10-10 | 上海传漾网络科技有限公司 | Method for increasing access speed in browser/server (BS) architecture advertisement management system |
Non-Patent Citations (1)
Title |
---|
Etag与HTTP缓存机制;CSDN;《http://blog.csdn.net/kikikind/article/details/6266101》;20110321;第1-3页 * |
Also Published As
Publication number | Publication date |
---|---|
CN102882974A (en) | 2013-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102882974B (en) | Method for saving website access resource by website identification version number | |
US11569982B2 (en) | Blockchain compression using summary and padding blocks | |
EP1886470B1 (en) | Method and system for object prediction | |
CN103209223B (en) | distributed application session information sharing method, system and application server | |
CN105095226B (en) | Web page resources loading method and device | |
US8825749B2 (en) | Method of tracking offline user interaction in a rendered document on a mobile device | |
CN102333092B (en) | Network user identification method and application server | |
CN101267299B (en) | A method and system for securely display data on the webpage | |
WO2016026384A1 (en) | Client page display method, device and system | |
CN102985921B (en) | There is the client terminal device high speed caching electronic document resources of e-sourcing data base | |
EP2180663B1 (en) | Trickle sync protocol | |
EP2773080A1 (en) | Sharing control system and method for network resources download information | |
CN108093015B (en) | File transmission system | |
CN103685511B (en) | Data distributing method, device and system | |
US20130227004A1 (en) | Methods for optimizing a web content proxy server and devices thereof | |
CN103795767A (en) | Synchronization method and system for cross-application session information | |
WO2013078797A1 (en) | Network file transmission method and system | |
CN106790334A (en) | A kind of page data transmission method and system | |
CN107844488B (en) | Data query method and device | |
CN108134811B (en) | Method, device and system for distributing or downloading target file | |
CN106161623A (en) | Caching server, renewal server and data-updating method | |
CN103401931A (en) | Method and system for downloading file | |
CN114039801B (en) | Short link generation method, short link analysis system, short link analysis equipment and storage medium | |
JP6261325B2 (en) | Web font distribution method and system therefor | |
CN112187916B (en) | Cross-system data synchronization 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 | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20171130 Address after: Huidalu 210000 Jiangsu province Nanjing Jiangbei District No. 6 Beidou No. 2 building, building 70 room Patentee after: BAIZHUO NETWORK TECHNOLOGY CO.,LTD. Address before: A software building Spark Road 210061 in Jiangsu province Nanjing City high-tech zones 12F Patentee before: FOCUS TECHNOLOGY Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150429 |