CN109344344A - Identification method, server and the computer readable storage medium of webpage client - Google Patents

Identification method, server and the computer readable storage medium of webpage client Download PDF

Info

Publication number
CN109344344A
CN109344344A CN201811017039.9A CN201811017039A CN109344344A CN 109344344 A CN109344344 A CN 109344344A CN 201811017039 A CN201811017039 A CN 201811017039A CN 109344344 A CN109344344 A CN 109344344A
Authority
CN
China
Prior art keywords
resource
target
script
image
webpage client
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.)
Pending
Application number
CN201811017039.9A
Other languages
Chinese (zh)
Inventor
林泽全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811017039.9A priority Critical patent/CN109344344A/en
Publication of CN109344344A publication Critical patent/CN109344344A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention is suitable for field of computer technology, provides the identification method, server and medium of a kind of webpage client, comprising: receives the resource access request that webpage client is sent;Unique identification based on the target resource that resource access request carries, obtain the target script for describing target resource, default script based on target script and for generating preset web image generates resource response information, resource response information is sent to webpage client;Receive the target image for generating and returning after the default script in webpage client execution resource response information;Target image is converted to the image of the second preset format, and the coding rule of the image based on the second preset format carries out data block fractionation to the image of the second preset format, the unique identification for the cyclic redundancy check code in obtained file header data block will be split being determined as webpage client, tracks the resource access behavior of webpage client so as to the unique identification based on webpage client comprehensively.

Description

Identification method, server and the computer readable storage medium of webpage client
Technical field
The invention belongs to field of computer technology more particularly to a kind of identification methods of webpage client, server and meter Calculation machine readable storage medium storing program for executing.
Background technique
With the fast development of internet, the main canal that information has become the daily acquisition information of people is obtained by internet Road.In the prior art, people can obtain the information that it wants to know by miscellaneous client from internet, and use The operation behavior of family on the client can reflect the preference of user, therefore, by adding unique identification for client, so it is right It tracks and analyzes using the operation behavior of the user of client, the accurate dispensing to information such as product, advertisements may be implemented.
In the prior art, server-side generallys use cookie technology to distinguish the identity of the user using client, in turn The behavior for the user for using client is tracked.However, since cookie technology allows user to be independently set using permission, Therefore, in the case where user closes cookie function, server-side just can not track the operation behavior of client user, into And lead to not the behavior to client user and tracked comprehensively, reduce the accuracy of information dispensing.
Summary of the invention
It can in view of this, the embodiment of the invention provides a kind of identification method of webpage client, server and computers Read storage medium, with solve existing client identification method can not the behavior to client user tracked comprehensively, into And the problem of causing information to launch accuracy.
The first aspect of the embodiment of the present invention provides a kind of identification method of webpage client, comprising:
Receive the resource access request that webpage client is sent;The resource access request carries target resource to be visited Unique identification;
Based on the unique identification of the target resource, the target script for describing the target resource is obtained, is based on institute Target script and the default script for generating preset web image are stated, resource response information is generated, the resource response is believed Breath is sent to the webpage client;
It receives and after the webpage client executes the default script in the resource response information generates and return Target image;The target image is the image of the first preset format;
The target image is converted to the image of the second preset format, and the image based on second preset format Coding rule carries out data block fractionation to the image of second preset format, will split following in obtained file header data block Ring redundancy detection code is determined as the unique identification of the webpage client.
The second aspect of the embodiment of the present invention provides a kind of server, including memory, processor and is stored in institute The computer program that can be run in memory and on the processor is stated, the processor executes real when the computer program Existing following steps:
Receive the resource access request that webpage client is sent;The resource access request carries target resource to be visited Unique identification;
Based on the unique identification of the target resource, the target script for describing the target resource is obtained, is based on institute Target script and the default script for generating preset web image are stated, resource response information is generated, the resource response is believed Breath is sent to the webpage client;
It receives and after the webpage client executes the default script in the resource response information generates and return Target image;The target image is the image of the first preset format;
The target image is converted to the image of the second preset format, and the image based on second preset format Coding rule carries out data block fractionation to the image of second preset format, will split following in obtained file header data block Ring redundancy detection code is determined as the unique identification of the webpage client.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program realizes following steps when being executed by processor:
Receive the resource access request that webpage client is sent;The resource access request carries target resource to be visited Unique identification;
Based on the unique identification of the target resource, the target script for describing the target resource is obtained, is based on institute Target script and the default script for generating preset web image are stated, resource response information is generated, the resource response is believed Breath is sent to the webpage client;
It receives and after the webpage client executes the default script in the resource response information generates and return Target image;The target image is the image of the first preset format;
The target image is converted to the image of the second preset format, and the image based on second preset format Coding rule carries out data block fractionation to the image of second preset format, will split following in obtained file header data block Ring redundancy detection code is determined as the unique identification of the webpage client.
Implement the identification method, server and computer-readable storage of a kind of webpage client provided in an embodiment of the present invention Medium has the advantages that
The embodiment of the present invention by adding the default script for generating preset web image in resource response information, by This particular attribute can not be drawn to the Web page image of webpage client in user to shield, so that webpage client is every It is secondary receive resource response information after, can return based on default script generate target image, due to web page server will Unique identification of the cyclic redundancy check code obtained after handling target image as webpage client, therefore, webpage clothes Being engaged in device can be based on the unique identification of the webpage client arrived after each resource response solicited message, to the every of webpage client First resource access behavior is recorded, and then comprehensive tracking of the resource access behavior to webpage client may be implemented.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation flow chart of the identification method for webpage client that first embodiment of the invention provides;
Fig. 2 is a kind of implementation flow chart of the identification method for webpage client that second embodiment of the invention provides;
Fig. 3 is a kind of structural block diagram of server provided in an embodiment of the present invention;
Fig. 4 be another embodiment of the present invention provides a kind of server structural block diagram.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Referring to Fig. 1, Fig. 1 is a kind of realization stream of the identification method for webpage client that first embodiment of the invention provides Cheng Tu.In the present embodiment, the executing subject of the identification method of webpage client is web page server.Web page server refers to for mentioning For the server of network information browsing service.The identification method of webpage client as shown in Figure 1 the following steps are included:
S11: the resource access request that webpage client is sent is received;The resource access request carries target to be visited The unique identification of resource.
Webpage client is the browser installed on the subscriber terminal.In practical applications, user terminal can be hand The terminals such as machine, tablet computer, desktop computer, herein with no restrictions.
It, can be in webpage visitor when user wants to access the resource on internet by webpage client in the present embodiment Inputted in the address field at family end target resource to be visited uniform resource locator (Uniform Resource Locator, URL)。
Wherein, URL is used to describe access position and the access method of the resource on internet.In general, being included at least in URL The host name or Internet protocol (Internet of server where the corresponding script file of preset communication protocol, resource Protocol, IP) address, the store path of the corresponding script file of resource or title etc..Preset communication protocol is webpage visitor The communication protocol at family end and web page server agreement is used to inform how webpage client to be opened and the corresponding foot of process resource This document.It should be noted that the corresponding script file of resource stores the script for describing resource;Preset communication protocol It can determines according to actual conditions, for example, preset communication protocol can be hypertext transfer protocol (Hyper-Text Transfer Protocol, HTTP) or File Transfer Protocol (File Transfer Protocol, FTP) etc., it does not do herein Limitation.It is understood that each resource on internet has a unique URL.
In practical applications, user can be manually entered target resource to be visited in the address field of webpage client URL;Target resource to be visited can also be automatically generated by the title of respective resources on webpage clicking client homepage URL.Webpage client generates relevant to the URL of target resource resource access request based on the URL of target resource, and to webpage Server sends the resource access request.
It should be noted that carrying the unique of target resource to be visited in the resource access request that webpage client generates Mark.Wherein, the unique identification of target resource includes the title of web application belonging to target resource and the title of target resource. Illustratively, if the URL that user inputs in the address field of webpage client are as follows: http://www.gacl.cn:8080/ JavaWebDemo1/1.jsp, then it represents that user wants access to entitled on the server of host entitled " www.gacl.cn " " 1.jsp " this web page resources in the web application of " JavaWebDemo1 ".In the URL that webpage client is inputted according to user It is entitled to search host from local system (host) file for the host name " www.gacl.cn " for the server for including The IP address of the web page server of " www.gacl.cn ", after finding the IP address of the web page server, webpage client base It establishes and communicates to connect in the IP address of the web page server and the web page server, and based on http protocol and the web page server It is communicated, specifically, webpage client generates corresponding resource access request based on the URL of target resource, and with data flow Form send the resource access request to web page server, it is raw to shown below the URL that webpage client is inputted based on user At resource access request in partial content:
GET/JavaWebDemo1/1.jsp HTTP/1.1
Host:www.gacl.cn:8080
Wherein, GET sends the mode of resource access request, i.e. mark net for presentation web page client to web page server Page client is to send resource access request to web page server in a manner of GET;/ JavaWebDemo1/1.jsp is for identifying The title of web application belonging to target resource to be visited and the title of target resource, wherein JavaWebDemo1 is target The title of web application belonging to resource, 1.jsp are the title of target resource.
After web page server receives the resource access request of webpage client transmission, resource access request is solved Analysis, extracts the mark of target resource to be visited from resource access request.For example, web page server resolving resource access request In " GET/JavaWebDemo1/1.jsp HTTP/1.1 ", and then obtain web application belonging to target resource to be visited Entitled JavaWebDemo1, the entitled 1.jsp of target resource to be visited.
S12: the unique identification based on the target resource obtains the target script for describing the target resource, base In the target script and default script for generating preset web image, resource response information is generated, the resource is rung Information is answered to be sent to the webpage client.
Web page server after the unique identification for extracting target resource to be visited in the resource access request received, Based on the unique identification of target resource to be visited, the target script for describing target resource is obtained from web page resources library. Wherein, multiple files are stored in web page resources library, different files corresponds to different web applications, in each file Comprising at least one script file, the script in different script files is used to describe the different web pages resource under the web application.
In practical applications, each file stored in web page resources library can be by the name of its corresponding web application Claim to name, each script file can by it includes script described in web page resources title come title.It needs Bright, script file is the document of text formatting, for example, script file can be hypertext markup language (Hyper-Text Markup Language, HTML) format document.
Web page server can be based on the title applied belonging to the target resource for including in unique identification, from web page resources library The file applied belonging to middle lookup target resource, and the title based on the target resource for including in unique identification are provided from target Target script file is searched in the file applied belonging to source, obtains the script in target script file, which is determined as For describing the target script of target resource.Wherein, target script file is title in the file applied belonging to target resource Script file identical with the title of target resource.
After web page server gets the target script for describing target resource, based on the target script and for generating The default script of preset web image generates resource response information.
In practical applications, target script and default script may each be the script described by HTML.Due to really using It is generally contained within the main part of default script in the content for script for generating preset web image, it is therefore, real as the present invention one Example is applied, the default script based on target script and for generating preset web image generates resource response information, specifically may be used With the following steps are included:
The content of main part in the default script is incorporated into the main part in the target script, and to merge Target script addition response header afterwards, obtains the resource response information.
In the present embodiment, the content of main part in default script can be incorporated into target script by web page server Main part, and be the target script addition response header after merging, and then obtain resource response information.Wherein, in script The content of main part refers to the main element by HTML<body>come the content described.Response header is for describing web service The environment of device and information relevant to response entity body.It should be noted that the default foot for generating preset web image Originally it can be stored in advance in web page server.Preset web image is the position drawn by the canvas element<canvas>of HTML The image of bitmap-format.
Illustratively, if being used to describe the script of target resource are as follows:
<html>
<head>
<title>JavaWebDemo1</title>
</head>
<body>
JavaWebDemo1
</body>
</html>
For generating the default script of preset web image are as follows:
<!DOCTYPE HTML>
<html>
<body>
<canvas id="myCanvas">your browser does not support the canvas tag
</canvas>
<script type=" text/javascript ">
Var canvas=document.getElementById (' myCanvas');
Var ctx=canvas.getContext (' 2d');
Ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
</script>
</body>
</html>
Then, the resource response information that web page server generates can be with are as follows:
HTTP/1.1 200OK
Server:Apache-coyote/1.1
Content-length:102//this part is response header
<html>
<head>
<title>JavaWebDemo1</title>
</head>
<body>
JavaWebDemo1
<canvas id="myCanvas">your browser does not support the canvas tag
</canvas>
<script type=" text/javascript ">
Var canvas=document.getElementById (' myCanvas');
Var ctx=canvas.getContext (' 2d');
Ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
</script>
</body>
</html>// this part is response entity
After web page server generates resource response information corresponding with resource access request, which is sent To webpage client.After webpage client receives the resource response information of web page server return, it is based on preset communication protocols View parses resource response information, and executes the script in resource response information.Specifically, webpage client executes resource After target script in response message, it can generate and show the page for describing target resource content;Webpage client executes After default script in resource response information, it can be generated and preset web image pair in the page for describing target resource content The target image answered.Webpage client is executed the target image generated after the default script in resource response information and is sent to Web page server.
S13: it receives and generates and return after the webpage client executes the default script in the resource response information The target image returned;The target image is the image of the first preset format.
In the embodiment of the present invention, after resource response information is sent to webpage client by web page server, webpage visitor is received Family end executes the target image for generating and returning after the default script in resource response information.
It should be noted that the target image that generates is after webpage client executes the default script in resource response information The image of bitmap format, i.e., in the present embodiment, the first preset format is bitmap format.
S14: the target image is converted to the image of the second preset format, and the figure based on second preset format The coding rule of picture carries out data block fractionation to the image of second preset format, will split in obtained file header data block Cyclic redundancy check code be determined as the unique identification of the webpage client.
In the embodiment of the present invention, after web page server receives the target image of webpage client return, by target image Be converted to the image of the second preset format.Wherein, the second preset format is different from the first preset format, and the second preset format can be with It determines according to actual needs, herein with no restrictions, for example, the second preset format can be portable network graphic picture (Portable Network Graphics, PNG) format.
As an embodiment of the present invention, the image that the target image is converted to the second preset format, specifically may be used With the following steps are included:
The target image is encoded using pre-arranged code mode, obtains the image of the second preset format;It is described pre- If coding mode is the corresponding coding mode of image of second preset format.
In the present embodiment, after web page server receives the target image of webpage client return, using pre-arranged code side Formula encodes target image, and then target image is converted to the image of the second preset format.Wherein, pre-arranged code mode For the corresponding coding mode of image of the second preset format.
For example, when the second preset format is PNG format, since the coding mode of the image of PNG format is Base64 volume Code, therefore, web page server can encode target image using Base64 coding mode, and then target image is converted For the image of PNG format.Further, the tool that web page server uses Base64 coding mode to encode target image Body process can be with are as follows: web page server calls canvas.toDataURL method that target image is converted to the image of PNG format.
After target image is converted to the image of the second preset format by web page server, the image based on the second preset format Coding rule data block fractionation is carried out to the image of the second preset format, and the file in obtained multiple data blocks will be split The cyclic redundancy check code of head data block is determined as the unique identification of webpage client.
Specifically, S14 is described in detail so that the second preset format is PNG format as an example below:
The image of the PNG format of one standard is by the data block of PNG file mark and 3 or more according to particular sequential group At specific structure is as follows:
PNG file mark PNG data block …… PNG data block
Wherein, PNG file mark is described by the byte fixed, and is generally as follows:
Decimal number 137 80 78 71 13 10 26 10
Hexadecimal number 89 50 4E 47 0D 0A 1A 0A
The two kinds of data block of the image definition of PNG format, one is critical chunks to be the data block of standard, Another kind is ancillary chunk, is optional data block.Critical chunk defines 4 normal data blocks, is respectively as follows: file header Data block (IHDR), palette data block (PLTE), video data block (IDAT) and image terminate data block (IEND), each The image of PNG format all must include above-mentioned 4 normal data blocks, and PNG read-write software also all has to support these data Block.Wherein, IHDR includes the essential information of the image data stored in PNG file, and is occurred as first data block In PNG file, and there can only be an IHDR in a PNG file;PLTE includes colour relevant to indexed color image Data are converted, it is only related with indexed color image, and is located at before IDAT;IDAT is used to store actual image data, It may include the IDAT of multiple consecutive orders in data flow;IEND must necessarily be placed in file for marking PNG file to be over Tail portion.
And for each data block in the image of PNG format, all it is made of following 4 part:
Wherein, cyclic redundancy check code is that data block type code and data block data are calculated.
It should be noted that the Rendering algorithms due to different user terminals operating system are different, at different browsers image Reason engine parameters are also different, and the drafting of preset web image is also fast with the frame of the main thread for drawing preset web image Rate, the refresh rate etc. of display are related, and therefore, the same set of script for generating preset web image is in different terminals, different viewing Be performed on device rear target image generated coding can difference, in turn, the PNG lattice converted based on target image The coding of the image of formula also difference.
Therefore, after the image that target image is converted to PNG format, data block fractionation is carried out to the image of PNG format, Available at least four data block, respectively file header data block, palette data block, at least one video data block and figure As terminating data block.Since the coding that the image in the image of different PNG formats terminates data block is all identical, and remainder data block Coding it is all different, therefore, the cyclic redundancy check code split in obtained file header data block can be determined as webpage visitor The unique identification at family end.
In the embodiment of the present invention, web page server is after obtaining the unique identification of webpage client, by webpage client Unique identification is back to webpage client, stores webpage client to its unique identification.When webpage client next time to When web page server sends resource access request, the unique identification of webpage client can be carried in resource access request, this Sample, web page server will the unique identification based on the webpage client carried in resource access request to webpage client carry out It distinguishes.
Above as can be seen that a kind of identification method of webpage client provided in this embodiment, is responding webpage client Resource access request when, one section can be added in resource response information for generating the default script of preset web image, this Sample, webpage client can be generated and be returned corresponding with preset web image after executing the default script in resource response information Target image.Since the Rendering algorithms of the operating system of the different terminals for disposing webpage client are different, different web pages The image processing engine parameter of client is also different, therefore, it is same set of generate preset web image script in different terminals, no Be performed on webpage client rear target image generated coding can difference, and then turned based on preset web image Also therefore difference has passed through file in the image of the second preset format to the coding of the image for the second preset format that change obtains The cyclic redundancy check code code of head data block can carry out unique identification to webpage client.Simultaneously as user can not be to net The Web page image of page client is drawn this particular attribute and is shielded, and therefore, webpage client receives resource response every time After information, the target image generated based on default script can be returned to, in this way, web page server can be provided based on every secondary response The unique identification of the webpage client arrived after the solicited message of source remembers the access behavior of resource each time of webpage client Record, and then realize comprehensive tracking of the resource access behavior to webpage client.
Referring to Fig. 2, Fig. 2 is a kind of realization stream of the identification method for webpage client that second embodiment of the invention provides Cheng Tu.Relative to the corresponding embodiment of Fig. 1, in a kind of identification method of webpage client provided in this embodiment, S12 specifically may be used To include S121~S122, details are as follows:
S121: the unique identification that the webpage client whether is carried in the resource access request detected.
In the present embodiment, in order to save the system resource of web page server and webpage client, web page server can be only When webpage client requests resource for the first time, the unique identification of webpage client is generated and returned.Webpage client is receiving After the unique identification that web page server returns, its unique identification is stored, later again to web server request resource when, Its unique identification is carried in resource access request, in this way, web page server can be based on carrying in resource access request Webpage client unique identification to send resource access request webpage client distinguish.
Specifically, in the present embodiment, when web page server receives the resource access request of webpage client transmission, detection Whether the unique identification that sends the webpage client of resource access request is carried in resource access request.In practical applications, net Its unique identification would generally be configured at the preset field of resource access request by page client.Web page server receives resource visit After asking request, whether the value for detecting the preset field of resource access request is sky, if the value of the preset field of resource access request It is not sky, then illustrates the unique identification for carrying webpage client in resource access request;If the predetermined word of resource access request The value of section is sky, then illustrates the unique identification for not carrying webpage client in resource access request, at this point, web page server executes S122。
S122: if not carrying the unique identification of the webpage client in the resource access request, it is based on the mesh The unique identification for marking resource, obtains the target script for describing the target resource, based on the target script and for giving birth to At the default script of preset web image, resource response information is generated, the resource response information is sent to the webpage visitor Family end.
In the present embodiment, if web page server detects the unique mark for not carrying webpage client in resource access request Know, then illustrates that the webpage client is for the first time to web server request resource, at this point, for the identity to the webpage client It is identified, unique identification of the web page server based on target resource, obtains from web page resources library for describing target resource Target script, and the default script based on the target script and for generating preset web image generates resource response information, And the resource response information of generation is sent to webpage client.
It should be noted that web page server generates the concrete mode and the first implementation of resource response information in the present embodiment The concrete mode of web page server generation resource response information is identical in example S12, specifically please refers to S12 in first embodiment Specific descriptions, details are not described herein again.
As another embodiment of the present invention, after S121, the identification method of webpage client can also include:
S123: if carrying the unique identification of the webpage client in the resource access request, it is based on the money The unique identification that source access request carries carries out identity to the webpage client.
In the present embodiment, if web page server detects the unique mark for carrying webpage client in resource access request Know, then illustrates the webpage client not and be for the first time to web server request resource, and in the webpage client for the first time to webpage When server requests resource, web page server returns its unique identification to the webpage client.Therefore, web page server When carrying the unique identification of webpage client in detecting resource access request, directly carried by resource access request The unique identification of webpage client carries out identity to the webpage client for sending resource access request.
Meanwhile the unique identification of target resource that web page server is carried based on resource access request, from web page resources library The middle target script obtained for describing target resource, and resource response information is generated based on target script, and the resource is rung Information is answered to be sent to webpage client.Specifically, web page server can be by adding response header for target script, and then obtain To resource response information.
Above as can be seen that a kind of identification method of webpage client provided in this embodiment, webpage client for the first time When requesting resource, web page server can just add the default script for generating preset web image in resource response information, So that webpage client is based on default script and generates target image, and then web page server carries out a series of processing to target image The unique identification for presentation web page client is obtained afterwards;It, can will be first in the non-resource of requested webpage for the first time of webpage client The unique identification obtained when secondary request resource is directly added in resource request information, in this way, web page server can be based on money The unique identification for the webpage client that source access request carries directly carries out identity validation to webpage client, so that webpage Server in resource response information without adding default script every time, but also webpage client is pre- without being carried out every time If script and generate target image, save the system resource of web page server and webpage client, improve to webpage client The tracking efficiency that the resource access behavior at end is tracked.
Referring to Fig. 3, Fig. 3 show be a kind of server provided in an embodiment of the present invention structural block diagram.In the present embodiment Server is web page server.The each unit that the server includes is used to execute each step in the corresponding embodiment of Fig. 1 to Fig. 2 Suddenly.Referring specifically to the associated description in embodiment corresponding to Fig. 1 to Fig. 2 and Fig. 1 to Fig. 2.For ease of description, only show Part related to the present embodiment is gone out.Referring to Fig. 3, server 300 include: request reception unit 31, the first communication unit 32, Second communication unit 33 and first identifier unit 34.Wherein:
Request reception unit 31 is used to receive the resource access request of webpage client transmission;The resource access request is taken Unique identification with target resource to be visited.
First communication unit 32 is used for the unique identification based on the target resource, obtains for describing the target resource Target script, the default script based on the target script and for generating preset web image, generate resource response information, The resource response information is sent to the webpage client.
Second communication unit 33 be used to receive the webpage client execute it is described default in the resource response information The target image for generating and returning after script;The target image is the image of the first preset format.
First identifier unit 34 is used to be converted to the target image image of the second preset format, and based on described the The coding rule of the image of two preset formats carries out data block fractionation to the image of second preset format, and fractionation is obtained Cyclic redundancy check code in file header data block is determined as the unique identification of the webpage client.
As an embodiment of the present invention, the first communication unit 32 includes detection unit and transmission unit.Wherein:
Detection unit is for the unique identification for whether carrying the webpage client in the resource access request to be detected.
If transmission unit is based on for not carrying the unique identification of the webpage client in the resource access request The unique identification of the target resource obtains the target script for describing the target resource, based on the target script and For generating the default script of preset web image, resource response information is generated, the resource response information is sent to described Webpage client.
As an embodiment of the present invention, server 300 further includes second identifier unit.
If second identifier unit is used in the resource access request carry the unique identification of the webpage client, Identity is carried out to the webpage client based on the unique identification that the resource access request carries.
As an embodiment of the present invention, the target script and the default script are to be retouched by hypertext markup language The script stated;First communication unit 32 is specifically used for:
The content of main part in the default script is incorporated into the main part in the target script, and to merge Target script addition response header afterwards, obtains the resource response information.
As an embodiment of the present invention, first identifier unit 34 is specifically used for:
The target image is encoded using pre-arranged code mode, obtains the image of the second preset format;It is described pre- If coding mode is the corresponding coding mode of image of second preset format.
Above as can be seen that a kind of server provided in this embodiment is in the resource access request for responding webpage client When, one section can be added in resource response information for generating the default script of preset web image, in this way, webpage client exists After executing the default script in resource response information, it can generate and return to target image corresponding with preset web image.Due to Rendering algorithms for disposing the operating system of the different terminals of webpage client are different, the image procossing of different web pages client Engine parameters are also different, therefore, the same set of script for generating preset web image quilt in different terminals, different web pages client After execution the coding of target image generated can difference, and then converted based on preset web image second default The coding of the image of format also difference, thus in the image for passing through the second preset format file header data block cyclic redundancy Detection code code can carry out unique identification to webpage client.Simultaneously as user can not be to the Web page image of webpage client It draws this particular attribute to be shielded, therefore, after webpage client receives resource response information every time, base can be returned to In the target image that default script generates, in this way, web page server can be based on arriving after each resource response solicited message The unique identification of webpage client records the access behavior of resource each time of webpage client, and then realizes to webpage Comprehensive tracking of the resource access behavior of client.
Fig. 4 be another embodiment of the present invention provides a kind of server structural block diagram.As shown in figure 4, the embodiment Server 4 includes: processor 40, memory 41 and is stored in the memory 41 and can run on the processor 40 Computer program 42, such as webpage client identification method program.When processor 40 executes the computer program 42 Realize the step in each embodiment of identification method of above-mentioned each webpage client, such as S11 shown in FIG. 1 to S14.Alternatively, The processor 40 realizes the function of each unit in the corresponding embodiment of above-mentioned Fig. 3 when executing the computer program 42, for example, The function of unit 31 to 34 shown in Fig. 3 does not repeat herein referring specifically to the associated description in the corresponding embodiment of Fig. 3.
Illustratively, the computer program 42 can be divided into one or more units, one or more of Unit is stored in the memory 41, and is executed by the processor 40, to complete the present invention.One or more of lists Member can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer journey Implementation procedure of the sequence 42 in the server 4.For example, the computer program 42 can be divided into request reception unit, First communication unit, the second communication unit and first identifier unit, each unit concrete function are as described above.
The server may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that Fig. 4 is only the example of server 4, does not constitute the restriction to server 4, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the server can also include input-output equipment, network Access device, bus etc..
Alleged processor 40 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 41 can be the internal storage unit of the server 4, such as the hard disk or memory of server 4. The memory 41 is also possible to the External memory equipment of the server 4, such as the plug-in type being equipped on the server 4 is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 41 can also both include the internal storage unit of the server 4 or wrap Include External memory equipment.The memory 41 is for other programs needed for storing the computer program and the server And data.The memory 41 can be also used for temporarily storing the data that has exported or will export.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of identification method of webpage client characterized by comprising
Receive the resource access request that webpage client is sent;The resource access request carries target resource to be visited only One mark;
Based on the unique identification of the target resource, the target script for describing the target resource is obtained, is based on the mesh Script and the default script for generating preset web image are marked, resource response information is generated, the resource response information is sent out It send to the webpage client;
It receives the webpage client and executes the target for generating and returning after the default script in the resource response information Image;The target image is the image of the first preset format;
The target image is converted to the image of the second preset format, and the coding of the image based on second preset format Rule carries out data block fractionation to the image of second preset format, and by splitting, the circulation in obtained file header data block is superfluous Remaining detection code is determined as the unique identification of the webpage client.
2. the identification method of webpage client according to claim 1, which is characterized in that described to be based on the target resource Unique identification, obtain the target script for describing the target resource, it is default based on the target script and for generating The default script of Web page image generates resource response information, the resource response information is sent to the webpage client, wraps It includes:
The unique identification that the webpage client whether is carried in the resource access request detected;
If not carrying the unique identification of the webpage client in the resource access request, only based on the target resource One mark, obtains the target script for describing the target resource, based on the target script and for generating preset web The default script of image generates resource response information, the resource response information is sent to the webpage client.
3. the identification method of webpage client according to claim 2, which is characterized in that the detection resource access After the unique identification for whether carrying the webpage client in request, further includes:
If carrying the unique identification of the webpage client in the resource access request, it is based on the resource access request The unique identification carried carries out identity to the webpage client.
4. the identification method of webpage client according to claim 1, which is characterized in that the target script and described pre- If script is the script described by hypertext markup language;
The default script based on the target script and for generating preset web image generates resource response information, packet It includes:
The content of main part in the default script is incorporated into the main part in the target script, and is after merging The target script addition response header, obtains the resource response information.
5. the identification method of webpage client according to claim 1-4, which is characterized in that described by the mesh Logo image is converted to the image of the second preset format, comprising:
The target image is encoded using pre-arranged code mode, obtains the image of the second preset format;The default volume Code mode is the corresponding coding mode of image of second preset format.
6. a kind of server, which is characterized in that the server includes memory, processor and stores in the memory And the computer program that can be run on the processor, the processor realize following step when executing the computer program It is rapid:
Receive the resource access request that webpage client is sent;The resource access request carries target resource to be visited only One mark;
Based on the unique identification of the target resource, the target script for describing the target resource is obtained, is based on the mesh Script and the default script for generating preset web image are marked, resource response information is generated, the resource response information is sent out It send to the webpage client;
It receives the webpage client and executes the target for generating and returning after the default script in the resource response information Image;The target image is the image of the first preset format;
The target image is converted to the image of the second preset format, and the coding of the image based on second preset format Rule carries out data block fractionation to the image of second preset format, and by splitting, the circulation in obtained file header data block is superfluous Remaining detection code is determined as the unique identification of the webpage client.
7. server according to claim 6, which is characterized in that the unique identification based on the target resource obtains It takes in the target script for describing the target resource, based on the target script and for generating the default of preset web image Script generates resource response information, the resource response information is sent to the webpage client, comprising:
The unique identification that the webpage client whether is carried in the resource access request detected;
If not carrying the unique identification of the webpage client in the resource access request, only based on the target resource One mark, obtains the target script for describing the target resource, based on the target script and for generating preset web The default script of image generates resource response information, the resource response information is sent to the webpage client.
8. server according to claim 7, which is characterized in that whether carried in the detection resource access request After the unique identification of the webpage client, further includes:
If carrying the unique identification of the webpage client in the resource access request, it is based on the resource access request The unique identification carried carries out identity to the webpage client.
9. server according to claim 7, which is characterized in that the target script and the default script are to pass through The script of hypertext markup language description;
The default script based on the target script and for generating preset web image generates resource response information, packet It includes:
The content of main part in the default script is incorporated into the main part in the target script, and is after merging The target script addition response header, obtains the resource response information.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201811017039.9A 2018-09-03 2018-09-03 Identification method, server and the computer readable storage medium of webpage client Pending CN109344344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811017039.9A CN109344344A (en) 2018-09-03 2018-09-03 Identification method, server and the computer readable storage medium of webpage client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811017039.9A CN109344344A (en) 2018-09-03 2018-09-03 Identification method, server and the computer readable storage medium of webpage client

Publications (1)

Publication Number Publication Date
CN109344344A true CN109344344A (en) 2019-02-15

Family

ID=65296912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811017039.9A Pending CN109344344A (en) 2018-09-03 2018-09-03 Identification method, server and the computer readable storage medium of webpage client

Country Status (1)

Country Link
CN (1) CN109344344A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472888A (en) * 2021-07-07 2021-10-01 挂号网(杭州)科技有限公司 Webpage access method, device, server equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394121A (en) * 2014-10-31 2015-03-04 小米科技有限责任公司 Terminal marking method and device
US20160127445A1 (en) * 2014-10-31 2016-05-05 Xiaomi Inc. Methods and devices for identifying terminal
CN106446640A (en) * 2016-10-31 2017-02-22 东软集团股份有限公司 User identification method and server
CN106506614A (en) * 2016-10-31 2017-03-15 珠海市魅族科技有限公司 The generation method of mobile terminal identification code, generating means and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394121A (en) * 2014-10-31 2015-03-04 小米科技有限责任公司 Terminal marking method and device
US20160127445A1 (en) * 2014-10-31 2016-05-05 Xiaomi Inc. Methods and devices for identifying terminal
CN106446640A (en) * 2016-10-31 2017-02-22 东软集团股份有限公司 User identification method and server
CN106506614A (en) * 2016-10-31 2017-03-15 珠海市魅族科技有限公司 The generation method of mobile terminal identification code, generating means and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472888A (en) * 2021-07-07 2021-10-01 挂号网(杭州)科技有限公司 Webpage access method, device, server equipment and storage medium
CN113472888B (en) * 2021-07-07 2024-01-05 挂号网(杭州)科技有限公司 Webpage access method and device, server equipment and storage medium

Similar Documents

Publication Publication Date Title
US10567407B2 (en) Method and system for detecting malicious web addresses
US11563674B2 (en) Content based routing method and apparatus
US7512569B2 (en) User defined components for content syndication
CA2640025C (en) Methods and devices for post processing rendered web pages and handling requests of post processed web pages
US8001551B2 (en) Providing localized resources for client-side script execution
US6973492B2 (en) Method and apparatus for collecting page load abandons in click stream data
US8645916B2 (en) Crunching dynamically generated script files
CN106126693B (en) Method and device for sending related data of webpage
TW201800962A (en) Webpage file sending method, webpage rendering method and device and webpage rendering system
CN111177519B (en) Webpage content acquisition method, device, storage medium and equipment
WO2020207022A1 (en) Scrapy-based data crawling method and system, terminal device, and storage medium
Shekhar et al. WMS and GML based interoperable web mapping system
WO2017124692A1 (en) Method and apparatus for searching for conversion relationship between form pages and target pages
CN108595468A (en) A kind of acquisition methods of web data, device, server, terminal and system
CN110808868B (en) Test data acquisition method and device, computer equipment and storage medium
CN111708962A (en) Rendering method, device and equipment of skeleton screen and storage medium
CN108932640B (en) Method and device for processing orders
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
US20150113383A1 (en) Analysis of web application state
US9396259B1 (en) Capture of web application state
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN113742551A (en) Dynamic data capture method based on script and puppeteer
US9998559B2 (en) Preemptive caching of data
CN109344344A (en) Identification method, server and the computer readable storage medium of webpage client
CN116150513A (en) Data processing method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination