CN106446640B - User knows method for distinguishing and server - Google Patents
User knows method for distinguishing and server Download PDFInfo
- Publication number
- CN106446640B CN106446640B CN201610967523.2A CN201610967523A CN106446640B CN 106446640 B CN106446640 B CN 106446640B CN 201610967523 A CN201610967523 A CN 201610967523A CN 106446640 B CN106446640 B CN 106446640B
- Authority
- CN
- China
- Prior art keywords
- etag
- user
- client
- unique identification
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of users to know method for distinguishing and server, to solve the technical issues of prior art can not carry out user's identification in the case where Cookie is deleted.This method comprises: server receives the resource access request that client is sent, the resource access request includes uniform resource position mark URL;It is the client distributing user unique identification if the resource access request does not include entity indicia ETag, user's unique identification identifies the client for the server;The ETag including user's unique identification is generated, the ETag and the corresponding resource of the URL are back to the client, when accessing the server again so as to the client, sends the resource access request for carrying the ETag to the server.
Description
Technical field
The present invention relates to internet areas, and in particular, to a kind of user knows method for distinguishing and server.
Background technique
Cookie refer to website in order to distinguish user identity conversate tracking and be stored in the number on user local terminal
According to.The most typical application of Cookie is exactly the automatic identification user identity in user's Website login.Alternatively, website can be with benefit
With the habit of Cookie tracking statistic of user accessing website, provide personalized service for user.For example, advertisement launching platform can be with
The identity of user is recorded by Cookie, what advertisement monitoring user has seen, put what advertisement, which net seen
Page, the hobby of user is calculated by these information, and then pushes more accurate advertisement again.
But more and more browsers release the functions such as " seamless browsing ", " privacy mode ", it is clear under these functions
Looking at device will not stored cookie again when browsing webpage.In addition, most users are also got used to deleting in order to avoid information leakage
Cookie.In this case, web page server just can not identify the identity of user by Cookie again.
Summary of the invention
The object of the present invention is to provide a kind of users to know method for distinguishing and server, to solve the prior art in Cookie
The technical issues of can not carrying out user's identification in the case where being deleted.
To achieve the goals above, the present invention provides a kind of user's knowledge method for distinguishing, comprising:
Server receives the resource access request that client is sent, and the resource access request includes uniform resource locator
URL;
It is the client distributing user unique identification, institute if the resource access request does not include entity indicia ETag
It states user's unique identification and identifies the client for the server;
The ETag including user's unique identification is generated, by the ETag including user's unique identification and institute
State the corresponding resource of URL and be back to the client, the ETag for the client it is subsequent send a request to every time it is described
The ETag including user's unique identification is carried when server.
Optionally, the method also includes: if in the resource access request including ETag, determine in the ETag whether
Carry user's unique identification;
It is the client distributing user unique identification if not carrying user's unique identification in the ETag;
The ETag including user's unique identification is generated, and the ETag including user's unique identification is sent
To the client to replace the current ETag of the client.
Optionally, the method also includes: if user's unique identification is carried in the ETag, according to the user
Unique identification identifies the client.
Optionally, the corresponding resource of the URL is picture resource, and described generate includes user's unique identification
ETag, comprising:
It includes that the user is unique that the summary info of user's unique identification and the picture resource, which is spliced into described,
The ETag including user's unique identification is back to the client by the ETag of mark.
Optionally, the corresponding resource of the URL is picture resource, and the ETag further includes the abstract letter of the picture resource
Breath, the method also includes:
Determine the summary info that the picture resource of the URL is corresponded in the server and the summary info in the ETag
It is inconsistent;
The summary info of picture resource after variation and user's unique identification are spliced into new ETag;
Picture resource after the new ETag and variation is back to the client.
Optionally, the corresponding resource of the URL is picture resource, and the ETag further includes the abstract letter of the picture resource
Breath, the method also includes:
Determine the summary info that the picture resource of the URL is corresponded in the server and the summary info in the ETag
Unanimously;
304 status codes are returned to the client, 304 status code is used to indicate the client from local cache
Obtain the picture resource.
The present invention also provides a kind of servers, comprising:
Receiving unit, for receiving the resource access request of client transmission, the resource access request includes unified money
Source finger URL URL;
Allocation unit, for being distributed for the client when the resource access request does not include entity indicia ETag
User's unique identification, user's unique identification identify the client for the server;
Response unit is uniquely marked described including the user for generating the ETag including user's unique identification
The ETag of knowledge and the corresponding resource of the URL are back to the client, and the ETag is subsequent every time for the client
The ETag including user's unique identification is carried when sending a request to the server.
Optionally, the server further include:
First determination unit determines in the ETag whether take when for including ETag in the resource access request
Band user's unique identification;
The allocation unit is used for, and when not carrying user's unique identification in the ETag, is used for client distribution
Family unique identification;
The response unit is used for, and generates the ETag including user's unique identification, and will described include the user
The ETag of unique identification is sent to the client to replace the current ETag of the client.
Optionally, the server further include:
Recognition unit, when for carrying user's unique identification in the ETag, according to user's unique identification
Identify the client.
Optionally, the corresponding resource of the URL is picture resource, the server further include:
Concatenation unit described includes for the summary info of user's unique identification and the picture resource to be spliced into
The ETag is back to the client by the ETag of user's unique identification.
Optionally, the corresponding resource of the URL is picture resource, and the ETag further includes the abstract letter of the picture resource
Breath, the server further include: the second determination unit, for determining the picture resource for corresponding to the URL in the server
Summary info and the summary info in the ETag are inconsistent;Concatenation unit, the abstract for the picture resource after changing are believed
Breath is spliced into new ETag with user's unique identification;
The response unit is used for, and the picture resource after the new ETag and variation is back to the client.
Optionally, the corresponding resource of the URL is picture resource, and the ETag further includes the abstract letter of the picture resource
Breath, the server further include: the second determination unit, for determining the picture resource for corresponding to the URL in the server
Summary info is consistent with the summary info in the ETag;
The response unit is used for, and Xiang Suoshu client returns to 304 status codes, and 304 status code is used to indicate described
Client obtains the picture resource from local cache.
Through the above technical solutions, server receive client transmission resource access request after, can be according to this
User's unique identification in the ETag of resource access request identifies the client, the cache file of ETag and browser
It is stored together, in order to improve the loading speed of resource, user will not usually be emptied the cache file of browser, therefore, In
In the case that Cookie is deleted, server still is able to identify client, solves the prior art in Cookie quilt
Just the technical issues of user's identification can not be carried out after deletion.
Other features and advantages of the present invention will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
The drawings are intended to provide a further understanding of the invention, and constitutes part of specification, with following tool
Body embodiment is used to explain the present invention together, but is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of implementation environment of the embodiment of the present invention;
Fig. 2 is the flow diagram that a kind of user provided in an embodiment of the present invention knows method for distinguishing;
Fig. 3 is the flow diagram that another user provided in an embodiment of the present invention knows method for distinguishing;
Fig. 4 is the flow diagram that another user provided in an embodiment of the present invention knows method for distinguishing;
Fig. 5 A is a kind of structural schematic diagram of server provided in an embodiment of the present invention;
Fig. 5 B is the structural schematic diagram of another server provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing, detailed description of the preferred embodiments.It should be understood that this place is retouched
The specific embodiment stated is merely to illustrate and explain the present invention, and is not intended to restrict the invention.
It is right first below in order to make those skilled in the art be easier to understand technical solution provided in an embodiment of the present invention
Relevant technical term is introduced.
ETag is the entity indicia Entity of URL (Uniform Resoure Locator, uniform resource locator)
Tag.ETag is the component part of the protocol header of HTTP (HyperText Transfer Protocol, hypertext transfer protocol).
In the prior art, ETag is mainly used for that picture repeated downloads is avoided to result in waste of resources, and specific mechanism is as follows: browser first
When a certain webpage of secondary browsing, browser initiates the request of download pictures to server.Server returns to picture, and adds one for picture
A identity ID is as label.In this way, user is refreshing the webpage, when requesting same picture again, browser can should
ID is carried in the ETag of request message.After server receives the request message, the request message is parsed, judges ID and expired
Time directly returns to 304 status codes, instruction if server finds that same user downloaded this picture before expired duration
Browser directly reads the picture of local cache, avoids the wasting of resources.
After the Cookie of client-cache is deleted in the prior art, server can not carry out user's identification, and how sharp
User's identification is carried out with ETag, those skilled in the art do not consider also at present.
Fig. 1 is a kind of schematic diagram of implementation environment of the embodiment of the present invention, as shown in Figure 1, the implementation environment may include
Client 110 and server 120, wherein the client 110 can be smart phone, tablet computer etc..With client in Fig. 1
End 110 is illustrated for laptop.The server 120 can be web page server.
Specifically, which is equipped with browser 1101, when using the browser 1101 browsing webpage, client
End sends resource access request to server 120 by network, to access all kinds of websites.
The embodiment of the present invention provides a kind of user's knowledge method for distinguishing, and the executing subject of this method can be shown in Fig. 1
Server 120.As shown in Fig. 2, this method comprises:
S201, server receive the resource access request that client is sent, and the resource access request includes unified resource
Finger URL URL.
Uniform resource locator is succinct to the position for the resource that can be obtained from internet and one kind of access method
Expression, be the address of standard resource on internet.Each file on internet has a unique URL, it includes
Information indicates how the position of file and browser should handle this document.That is, the resource access request is used for
The corresponding resource of the URL is obtained from server.
S202, the server are distributed when the resource access request does not include entity indicia ETag for the client
User's unique identification, user's unique identification identify the client for the server.
Wherein, which is the request of http protocol, protocol header of the server in the resource access request
In when ETag has not been obtained, it is believed that the client is to access the website for the first time.In this case, which is the client
One user's unique identification of end distribution, is used for the uniquely tagged client.
It is worth noting that, there is following two in the reason of not including ETag in the resource access request, first is that the client
Before from having not visited the server, the browser rs cache second is that client has been emptied after accessing the server, for
Both of these case when server does not obtain ETag in resource access request, thinks that the client is to access for the first time.
S203, the server generate the ETag including user's unique identification, and the ETag and URL is corresponding
Resource be back to the client.
Wherein, the client is after the ETag for receiving server distribution, and when subsequent each access server is equal
The resource access request for carrying the ETag is sent to the server.
Therefore, in a kind of possible implementation of the embodiment of the present invention, if the resource access that the server receives
Include ETag in request, then obtains user's unique identification in the ETag, and according to user's unique identification identification
Client, wherein user's unique identification is that the server distributes to the client.
Specifically, the server is when thinking the client is to access for the first time, according to resource access request to the client
End sends resource access response, carries user's unique identification in the ETag in the protocol header of the resource access response.The resource
Message body portion in access response carries the corresponding resource of the URL.In this way, the client obtains the resource of this request,
And in the subsequent access resource, user's unique identification, server can be carried in the ETag of resource access request
After getting user's unique identification, can to the client carry out user's identification, with the session to the client carry out with
Track.
By adopting the above technical scheme, server, can be according to this after the resource access request for receiving client transmission
User's unique identification in the ETag of resource access request identifies the client, the cache file of ETag and browser
It is stored together, in order to improve the loading speed of resource, user will not usually be emptied the cache file of browser, therefore, In
In the case that Cookie is deleted, server still is able to identify client, solves the prior art in Cookie quilt
Just the technical issues of user's identification can not be carried out after deletion.
In order to make those skilled in the art more understand technical solution provided in an embodiment of the present invention, below to above-mentioned side
Method step is described in detail.
It is worth noting that is carried originally in existing ETag is the summary info of picture resource, server is being obtained
It to after the summary info, can be compared with the summary info of picture resource current in server, if the two summary info
Unanimously, show that picture resource is not changed, server can then return to 304 yards of instruction client acquisition figures in local cache
Piece resource shows that the picture resource of server changes if the two summary info is inconsistent, in this case, service
The summary info of picture resource after variation and the picture resource after variation can be back to client as new ETag by device
End.
That is, the resource access request message that client is sent to server may wrap in existing http protocol
Include ETag.It in this case, include ETag in the resource access request which receives, then the server can determine
User's unique identification whether is carried in the ETag, if not carrying user's unique identification in the ETag, is distributed and is used for the client
Family unique identification, and generating includes that be sent to the client current to replace the client by the ETag of user's unique identification
ETag。
Specifically, in order to guarantee the problem of ETag can result in waste of resources originally to avoid picture repeated downloads, in this hair
In a kind of possible implementation of bright embodiment, when the corresponding resource of URL in resource access request is picture resource, with
The upper generation includes that the ETag of user's unique identification is specifically included: user's unique identification and the picture are provided
The summary info in source is spliced into ETag.In this way, client is accessed again in the resource access request that the server is sent
ETag had not only included the unique identification of user but also had included the summary info of picture resource, so that server both can be according to user
Unique identification identifies client, and the repeated downloads of picture can be avoided according to the summary info of picture resource.
Wherein, the summary info of the picture resource can be the MD5 (Message-Digest of picture resource
Algorithm 5, Message-Digest Algorithm 5) value.
Further, which obtains in ETag after the subsequent resource access request for getting client transmission
Summary info, corresponded in determining the server resource request access in URL picture resource summary info and institute
State summary info in ETag it is inconsistent when, the server is unique by the summary info of the picture resource after variation and the user
Mark is spliced into new ETag, and the picture resource after the new ETag and variation is back to the client.Meanwhile
The server obtains user's unique identification in the ETag of the resource access request, identifies the client, the visit to the client
It asks and is recorded.
Corresponded in determining the server resource request access in URL picture resource summary info with it is described
When summary info in ETag is consistent, the server to the client return 304 status codes, be used to indicate the client from
The picture resource is obtained in local cache, the repetition acquisition for avoiding picture resource results in waste of resources.
Using the above method, the embodiment of the present invention ensure server be based on ETag can be avoided client repeated downloads figure
Under the premise of piece, it is also possible that server can identify client according to ETag, the prior art is solved in Cookie quilt
Just the technical issues of user's identification can not be carried out after deletion.
Fig. 2 is the explanation carried out using server as executing subject to user identification method provided in an embodiment of the present invention,
Fig. 3 is the user identification method shown according to another exemplary embodiment, embodies the interaction between client and server, such as
Shown in Fig. 3, comprising:
S301, user end to server send resource access request, and the resource access request includes unified resource positioning
Accord with URL.
S302, server receive the resource access request, and when the resource access request does not include ETag, for visitor
Family end distributing user unique identification.
Wherein, user's unique identification identifies the client for the server.
S303, server generate the ETag including user's unique identification, and the ETag and URL is corresponding
Resource be back to client.
S304, client receive the corresponding resource of the URL and ETag that server is sent.
Wherein, the ETag includes user's unique identification that server is client distribution.
S305, user end to server send the resource access request including the ETag.
S306, server receive the resource access request including the ETag, and according to the user in the ETag
Unique identification identifies the client.
Using the above method, when the subsequent each picture server of client sends resource access request, asked in resource access
User's unique identification that server distribution is carried in the ETag asked, in this way, server can be to this according to user's unique identification
Client is identified.The cache file of ETag and browser is stored together, in order to improve the loading speed of resource, Yong Hutong
Chang Buhui empties the cache file of browser, and therefore, in the case where Cookie is deleted, server still is able to client
End is identified solve the technical issues of prior art just can not carry out user's identification after Cookie is deleted.
Above-mentioned to be merely illustrative, in some cases, the resource access request that client is sent to server includes
ETag, but the ETag does not carry user's unique identification of the client.It can rectify to guarantee server always for client
True distributing user unique identification, in the embodiment of the present invention, server, can also be really after determining that resource access request includes ETag
Whether the fixed ETag carries user's unique identification, and when the ETag does not carry user's unique identification, is client distributing user
Unique identification, and generate the ETag including user's unique identification and be back to client to replace the current ETag of client.
Ensure that the resource access request of the subsequent transmission of client carries user's unique identification.
Below by taking implementation environment shown in FIG. 1 as an example, to a kind of user provided in an embodiment of the present invention know method for distinguishing into
Row is described in detail, as shown in figure 4, this method comprises:
S401, client 110 send first resource access request to server 120, which includes
The URL of website homepage icon logo.
S402, server 120 receive the first resource access request, and are the 110 distributing user unique identification of client.
The MD5 value of the logo of the website homepage and user's unique identification are spliced by S403, the server 120
ETag。
S404, the server 120 return to the first resource including the logo and ETag and access to the client 110 to be rung
It answers.
S405, the client 110 receive the first resource access response.
S406, the client 110 send Secondary resource access request, the Secondary resource access request to the server 120
URL including the ETag and logo.
S407, the server 120 receive the Secondary resource access request, in the ETag for obtaining the Secondary resource access request
MD5 value and user's unique identification.
S408, the server 120 record the access of the client 110 according to user's unique identification.
In this way, server 120 can carry out only each client for accessing the server 120 according to user's unique identification
One identification.
S409, the server 120 compare the current logo in the website MD5 value and the MD5 value in the ETag it is whether consistent.
Further, if the MD5 value of the current logo in the website is consistent with the MD5 value in the ETag, S410 is thened follow the steps
To S411;If the MD5 value of the current logo in the website and the MD5 value in the ETag are inconsistent, S412 is thened follow the steps to S414.
S410, the server 120 return to the Secondary resource access response including 304 status codes to the client 110.
Wherein, which is used to indicate the client and obtains resource from local cache.
S411, the client 110 receive the Secondary resource access response, and website logo is obtained from local cache, and
Keep current ETag constant.
The MD5 value of the current logo in the website and user's unique identification are spliced into new by S412, the server 120
ETag。
S413, the server 120 are returned including the current logo in 200 status codes, the website and are somebody's turn to do to the client 110
The Secondary resource access response of new ETag.
Wherein, 200 status code is for indicating that request has succeeded.
S414, the client 110 receive the Secondary resource access response, and carry this newly in following resource access request
ETag.
Using the above method, the embodiment of the present invention ensure server be based on ETag can be avoided client repeated downloads figure
Under the premise of piece, it is also possible that server can identify client according to ETag, the prior art is solved in Cookie quilt
Just the technical issues of user's identification can not be carried out after deletion.
It is worth noting that for simple description, therefore, it is stated as a series of dynamic for above method embodiment
It combines, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described.Secondly, this
Field technical staff also should be aware of, and the embodiments described in the specification are all preferred embodiments, and related movement is simultaneously
It is not necessarily necessary to the present invention.
The embodiment of the present invention also provides a kind of server 500, for implementing a kind of above-mentioned side of user's identification shown in Fig. 2
Method, as shown in Figure 5A, which includes:
Receiving unit 510, for receiving the resource access request of client transmission, the resource access request includes unified
Resource Locator URL;
Allocation unit 520, for dividing for the client when the resource access request does not include entity indicia ETag
With user's unique identification, user's unique identification identifies the client for the server;
Response unit 530, for generating the ETag including user's unique identification, by the ETag and URL
Corresponding resource is back to the client, when accessing the server again so as to the client, sends described in carrying
The resource access request of ETag gives the server.
Using above-mentioned server, which, can be according to this after the resource access request for receiving client transmission
User's unique identification in the ETag of resource access request identifies the client, the cache file of ETag and browser
It is stored together, in order to improve the loading speed of resource, user will not usually be emptied the cache file of browser, therefore, In
In the case that Cookie is deleted, server still is able to identify client, solves the prior art in Cookie quilt
Just the technical issues of user's identification can not be carried out after deletion.
Optionally, as shown in Figure 5 B, the server 500 further include: the first determination unit 540, for being visited in the resource
When asking in request including ETag, determine user's unique identification whether is carried in the ETag;The allocation unit 520 is used for, In
It is the client distributing user unique identification when not carrying user's unique identification in the ETag;The response unit 530 is used
In generation includes the ETag of user's unique identification, and the ETag is sent to the client to replace the client
Hold current ETag.That is, server 500 is in addition to being client point in the case where resource access request does not include ETag
With user's unique identification, it can also include the case where ETag in resource access request but the ETag not carry user's unique identification
Under, it is client distributing user unique identification, it is ensured that the resource access request of the subsequent transmission of client carries the user
Unique identification.
Optionally, as shown in Figure 5 B, the server further include: recognition unit 550, for carrying institute in the ETag
When stating user's unique identification, the client is identified according to user's unique identification.
Optionally, as shown in Figure 5 B, the corresponding resource of the URL is picture resource, the server 500 further include: is spelled
Order member 560, for the summary info of user's unique identification and the picture resource to be spliced into ETag, by the ETag
It is back to the client.
Optionally, the corresponding resource of the URL is picture resource, and the ETag further includes the abstract letter of the picture resource
Breath, as shown in Figure 5 B, the server 500 further include: the second determination unit 570 corresponds to institute for determining in the server
Summary info and the summary info in the ETag for stating the picture resource of URL are inconsistent.Then the concatenation unit 560 is also used
In the summary info of the picture resource after variation and user's unique identification are spliced into new ETag;The response unit
530 are used for, and the picture resource after the new ETag and variation is back to the client.
Optionally, second determination unit 570 is also used to, and determines the picture money that the URL is corresponded in the server
The summary info in source is consistent with the summary info in the ETag, and the response unit 530 is used for, and Xiang Suoshu client returns
304 status codes, 304 status code are used to indicate the client and obtain the picture resource from local cache.
In this way, the server may be used also under the premise of ensuring that the server can identify client according to ETag
Can be avoided client repeated downloads picture based on ETag.
It is worth noting that the above dividing elements to server 500, only a kind of logical function partition is practical to realize
When there may be another division manner.Also, the physics realization of above-mentioned each functional unit may also there are many implementation, examples
Such as, above-mentioned concatenation unit 560 specifically can be a central processing unit, be also possible to ASIC (Application Specific
Integrated Circuit, specific integrated circuit).
In addition, affiliated, it will be apparent to those skilled in the art ground to recognize, for convenience and simplicity of description, foregoing description
Server each unit specific work process, can refer to corresponding processes in the foregoing method embodiment, it is no longer superfluous herein
It states.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others
Mode is realized.It, can also be with for example, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the portion of each embodiment the method for the present invention
Step by step.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, RAM (deposit by Random Access Memory, arbitrary access
Reservoir), the various media that can store data such as magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of user knows method for distinguishing characterized by comprising
Server receives the resource access request that client is sent, and the resource access request includes uniform resource position mark URL;
It is the client distributing user unique identification, the use if the resource access request does not include entity indicia ETag
Family unique identification identifies the client for the server;
Generate include user's unique identification ETag, by the ETag including user's unique identification and described
The corresponding resource of URL is back to the client, when accessing the server again so as to the client, sends described in carrying
The resource access request of ETag including user's unique identification gives the server.
2. the method according to claim 1, wherein the method also includes:
If including ETag in the resource access request, determine user's unique identification whether is carried in the ETag;
It is the client distributing user unique identification if not carrying user's unique identification in the ETag;
The ETag including user's unique identification is generated, and the ETag including user's unique identification is sent to institute
Client is stated to replace the current ETag of the client.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
If carrying user's unique identification in the ETag, the client is identified according to user's unique identification.
4. method according to claim 1 or 2, which is characterized in that the corresponding resource of the URL is picture resource, described
Generate the ETag including user's unique identification, comprising:
It includes user's unique identification that the summary info of user's unique identification and the picture resource, which is spliced into described,
ETag.
5. according to the method described in claim 3, it is characterized in that, the corresponding resource of the URL is picture resource, the ETag
It further include the summary info of the picture resource, the method also includes:
Determine that the summary info that the picture resource of the URL is corresponded in the server and the summary info in the ETag are different
It causes;
The summary info of picture resource after variation and user's unique identification are spliced into new ETag;
Picture resource after the new ETag and variation is back to the client.
6. according to the method described in claim 3, it is characterized in that, the corresponding resource of the URL is picture resource, the ETag
It further include the summary info of the picture resource, the method also includes:
Determine the summary info that the picture resource of the URL is corresponded in the server and the summary info one in the ETag
It causes;
304 status codes are returned to the client, 304 status code is used to indicate the client and obtains from local cache
The picture resource.
7. a kind of server characterized by comprising
Receiving unit, for receiving the resource access request of client transmission, the resource access request includes that unified resource is fixed
Position symbol URL;
Allocation unit, for when the resource access request does not include entity indicia ETag, being the client distributing user
Unique identification, user's unique identification identify the client for the server;
Response unit generates the ETag including user's unique identification, by the ETag including user's unique identification
And the corresponding resource of the URL is back to the client, when accessing the server again so as to the client, sends
The resource access request of the ETag including user's unique identification is carried to the server.
8. server according to claim 7, which is characterized in that the server further include:
First determination unit determines in the ETag whether carry use when for including ETag in the resource access request
Family unique identification;
The allocation unit is used for, when not carrying user's unique identification in the ETag, only for the client distributing user
One mark;
The response unit is used for, and generates the ETag including user's unique identification, and will described include that the user will be unique
The ETag of mark is sent to the client to replace the current ETag of the client.
9. server according to claim 8, which is characterized in that the server further include:
Recognition unit when for carrying user's unique identification in the ETag, is identified according to user's unique identification
The client.
10. server according to claim 7 or 8, which is characterized in that the corresponding resource of the URL is picture resource, institute
State server further include:
Concatenation unit includes described for the summary info of user's unique identification and the picture resource to be spliced into described
The ETag of user's unique identification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610967523.2A CN106446640B (en) | 2016-10-31 | 2016-10-31 | User knows method for distinguishing and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610967523.2A CN106446640B (en) | 2016-10-31 | 2016-10-31 | User knows method for distinguishing and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106446640A CN106446640A (en) | 2017-02-22 |
CN106446640B true CN106446640B (en) | 2019-11-08 |
Family
ID=58180483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610967523.2A Active CN106446640B (en) | 2016-10-31 | 2016-10-31 | User knows method for distinguishing and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106446640B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109688178B (en) * | 2017-10-19 | 2022-03-11 | 阿里巴巴集团控股有限公司 | Recommendation method, device and equipment |
CN109344344A (en) * | 2018-09-03 | 2019-02-15 | 平安普惠企业管理有限公司 | Identification method, server and the computer readable storage medium of webpage client |
CN110460685B (en) * | 2019-07-10 | 2022-08-02 | 苏宁云计算有限公司 | User unique identifier processing method and device, computer equipment and storage medium |
CN114650272A (en) * | 2020-12-17 | 2022-06-21 | 上海嗨普智能信息科技股份有限公司 | User unique identifier processing method, device, storage medium and computer device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1819518A (en) * | 2006-02-20 | 2006-08-16 | 北京凯威点告网络技术有限公司 | Method for discriminating user identity in information distributing system |
CN102638581A (en) * | 2012-03-31 | 2012-08-15 | 奇智软件(北京)有限公司 | Cookie information storage method and cookie information storage system |
CN105450770A (en) * | 2015-12-15 | 2016-03-30 | 精硕世纪科技(北京)有限公司 | Cookie stable correction method and system |
US9426200B2 (en) * | 2013-03-12 | 2016-08-23 | Sap Se | Updating dynamic content in cached resources |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104320679B (en) * | 2014-10-11 | 2019-02-15 | 中兴通讯股份有限公司 | A kind of user information acquiring method and server based on HLS protocol |
CN104468807B (en) * | 2014-12-12 | 2018-11-13 | 北京易网无际科技有限公司 | Carry out processing method, high in the clouds device, local device and the system of web cache |
-
2016
- 2016-10-31 CN CN201610967523.2A patent/CN106446640B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1819518A (en) * | 2006-02-20 | 2006-08-16 | 北京凯威点告网络技术有限公司 | Method for discriminating user identity in information distributing system |
CN102638581A (en) * | 2012-03-31 | 2012-08-15 | 奇智软件(北京)有限公司 | Cookie information storage method and cookie information storage system |
US9426200B2 (en) * | 2013-03-12 | 2016-08-23 | Sap Se | Updating dynamic content in cached resources |
CN105450770A (en) * | 2015-12-15 | 2016-03-30 | 精硕世纪科技(北京)有限公司 | Cookie stable correction method and system |
Also Published As
Publication number | Publication date |
---|---|
CN106446640A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528432B (en) | The construction method and device of test scene data bury a test method | |
US10268841B1 (en) | Data anonymity and separation for user computation | |
US10250526B2 (en) | Method and apparatus for increasing subresource loading speed | |
CN106446640B (en) | User knows method for distinguishing and server | |
CN103944944B (en) | Method, electronic equipment and the system of sharing web page link | |
CN106933871B (en) | Short link processing method and device and short link server | |
JP6091579B2 (en) | Method and apparatus for handling nested fragment caching of web pages | |
CN108132814A (en) | Page loading method, device, computer equipment and the storage medium of application program | |
KR102151457B1 (en) | Method and apparatus for reducing page load time in a communication system | |
CN110198328B (en) | Client identification method and device, computer equipment and storage medium | |
CN104202360A (en) | Webpage access method, device and router | |
US20150334172A1 (en) | Methods and apparatus for identifying browser use on a mobile device | |
US9495469B2 (en) | System and method to identify machine-readable codes | |
US20170094004A1 (en) | Browser cache management | |
CN108429785A (en) | A kind of generation method, reptile recognition methods and the device of reptile identification encryption string | |
CN108509806A (en) | A kind of big data precision marketing system and equipment with secret protection | |
CN109829077A (en) | A kind of page display method, device and equipment | |
JP6779307B2 (en) | Method and device for page display | |
CN108880923A (en) | The method and apparatus that policer operation applied to application server is requested | |
US9021110B2 (en) | Consistent association of a user ID with a user | |
KR101265164B1 (en) | System for providing shorten URL browsing with branding , method thereof, and web client thereof | |
CN108055299B (en) | Portal page pushing method, network access server and Portal authentication system | |
CN110020297A (en) | A kind of loading method of web page contents, apparatus and system | |
CN108011936A (en) | Method and apparatus for pushed information | |
EP3151514B1 (en) | A method in a client-server network and client-server network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |