CN110971578B - User identity confirmation method and device - Google Patents

User identity confirmation method and device Download PDF

Info

Publication number
CN110971578B
CN110971578B CN201811159386.5A CN201811159386A CN110971578B CN 110971578 B CN110971578 B CN 110971578B CN 201811159386 A CN201811159386 A CN 201811159386A CN 110971578 B CN110971578 B CN 110971578B
Authority
CN
China
Prior art keywords
user
cookie
website
generating
domain name
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
Application number
CN201811159386.5A
Other languages
Chinese (zh)
Other versions
CN110971578A (en
Inventor
李新国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811159386.5A priority Critical patent/CN110971578B/en
Publication of CN110971578A publication Critical patent/CN110971578A/en
Application granted granted Critical
Publication of CN110971578B publication Critical patent/CN110971578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/301Name conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for confirming user identity, which relate to the technical field of data processing and improve the accuracy of user identity confirmation, and the main technical scheme of the invention is as follows: when a request of a user for accessing a first website is received, generating a first cookie of the user under the first website; acquiring a user cookie set corresponding to the second website; detecting whether a second cookie of the user exists in the user cookie set according to the user identification contained in the first cookie; and if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie. The invention is mainly used for confirming the identity of the user.

Description

User identity confirmation method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for confirming a user identity.
Background
With the widespread application of computer and internet technologies, browsers have become indispensable web surfing media in people's daily life, and users can browse news, watch videos, perform online shopping and the like through the browsers. In the process that a user uses the browser, the cookie in the browser records account information and behavior data of the user, so that when the user accesses a webpage, the user can be judged to be a new user who accesses the webpage for the first time or an old user who has accessed the webpage.
However, in the specific implementation process, the inventor finds that due to the fact that websites with different domain names correspond to different cookie data, when a domain name of a web page is modified, cookie data of websites before and after modification cannot be shared, so that when the domain name of the same website page is changed, whether a user accessing the website of a new domain name is a new user or an old user cannot be accurately identified, and further the accuracy of user identity confirmation is low.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for confirming a user identity, and mainly aims to overcome the problem that the accuracy of user identity confirmation is low due to the fact that a user accessing a new domain name website cannot be accurately identified as a new user or an old user when a domain name of a web page is modified, and improve the accuracy of user identity confirmation.
In order to solve the above problems, the present invention mainly provides the following technical solutions:
in one aspect, an embodiment of the present invention provides a method for confirming a user identity, where the method includes:
when a request of a user for accessing a first website is received, generating a first cookie of the user under the first website;
acquiring a user cookie set corresponding to a second website, wherein the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set comprises user cookies which are all accessed to the webpage before the modified webpage domain name;
detecting whether a second cookie of the user exists in the user cookie set according to the user identification contained in the first cookie, wherein the second cookie is a cookie of the user under the second website;
and if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie.
Optionally, after receiving a request of the user to access the first website, the method further includes:
detecting whether the user requests to access the first website for the first time;
the generating a first cookie for the user under the first website comprises:
and if so, generating a first cookie of the user under the first website.
Optionally, the acquiring the user cookie set corresponding to the second website includes:
generating a parameter according to the first cookie, and adding the parameter to the second website as the identification information of the first cookie;
and redirecting to the second website and acquiring the user cookie set corresponding to the second website.
Optionally, the associating the first cookie with the second cookie includes:
and establishing a mapping relation between the first cookie and the second cookie according to the user identification.
Optionally, the method further includes:
if the second cookie of the user does not exist in the user cookie set, determining that the user is a new user and generating the second cookie;
and associating the first cookie with the second cookie according to the user identification information.
In a second aspect, the present invention further provides an apparatus for confirming a user identity, where the apparatus includes:
the device comprises a generating unit, a searching unit and a displaying unit, wherein the generating unit is used for generating a first cookie of a user under a first website when receiving a request of the user for accessing the first website;
an obtaining unit, configured to obtain a user cookie set corresponding to a second website, where the first website and the second website are websites corresponding to a modified webpage domain name and a modified webpage domain name respectively, and the user cookie set includes user cookies that have access to the webpage before the modified webpage domain name;
a detecting unit, configured to detect whether a second cookie of the user exists in the user cookie set according to the user identifier included in the first cookie, where the second cookie is a cookie of the user under the second website;
an association unit, configured to associate the first cookie with a second cookie if the second cookie of the user exists in the user cookie set;
and the confirmation unit is used for confirming the identity of the user by using the associated first cookie.
Optionally, the detecting unit is further configured to detect whether the user requests to access the first website for the first time;
the generating unit is specifically configured to generate a first cookie of the user under the first website if the user requests to access the first website for the first time.
Optionally, the obtaining unit includes:
the generating module is used for generating parameters according to the first cookie;
the adding module is used for adding the parameter as the identification information of the first cookie to the second website;
the redirection module is used for redirecting to the second website;
and the acquisition module is used for acquiring the user cookie set corresponding to the second website.
Optionally, the associating unit is specifically configured to establish a mapping relationship between the first cookie and the second cookie according to the user identifier.
Alternatively to this, the first and second parts may,
the determining unit is further configured to determine that the user is a new user and generate a second cookie if the second cookie of the user does not exist in the user cookie set;
the association unit is further configured to associate the first cookie with the second cookie according to the user identification information.
In order to achieve the above object, according to a third aspect of the present invention, a storage medium is provided, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the above method for confirming the identity of a user.
In order to achieve the above object, according to a fourth aspect of the present invention, there is provided a processor for executing a program, wherein the program executes the method for confirming the identity of the user described above.
By the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
the method and the device for confirming the user identity provided by the embodiment of the invention have the advantages that as the cookies of the user under different websites corresponding to different domain names can not be shared in the prior art, and the problem that whether the user is a new user or not can not be accurately identified when the domain name of the webpage is modified is caused, when the request of the user for accessing the new address after the domain name is modified is received, generating a first cookie of the user under the new domain name website, triggering and acquiring a user cookie set under an old website before domain name modification, because the user cookie set comprises all user cookies accessing the old website and the cookies comprise the user identification, thereby detecting whether a second cookie of the user under the old website exists in the user cookie set according to the user identification contained in the first cookie, and associating the first cookie with the second cookie when present to facilitate validating the identity of the user using the associated first cookie. Compared with the prior art, the method has the advantages that when the user requests to access the new address after the domain name is modified, whether the user is a new user or not is directly judged according to the user cookie under the new address, so that the old user who accesses the old website before the domain name is modified and accesses the new website for the first time is judged as the new user by mistake, the user cookie under the old website can be obtained when the user requests to access the new website, the user identity is judged according to the user cookie, the problem that the user identity confirmation accuracy is low due to the fact that whether the user is a new user or not cannot be accurately identified is solved, and the accuracy of the user identity confirmation is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flowchart of a method for confirming a user identity according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another method for confirming the identity of a user according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a device for confirming a user identity according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating another apparatus for confirming user identity according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a method for confirming user identity, as shown in figure 1, when a user requests to access a website after domain name modification, the method improves the accuracy of user identity confirmation by acquiring a user cookie set under an old website before domain name modification and determining whether the user is a new user according to the user cookie set, and the embodiment of the invention provides the following specific steps:
101. when a request of a user for accessing a first website is received, a first cookie of the user under the first website is generated.
The first cookie is a file used for recording user information, behavior data and the like of a user under a first website, and is cached in the browser. It should be noted that, when a user accesses a website under a certain domain name for the first time, a cookie of the user under the domain name is generated and stored, and when the user accesses the website again, the cookie does not need to be generated, so that after receiving a user access request in this step, a preset interface may be called to detect whether a user cookie of the user under the website is cached in a browser, and if not, it indicates that the user accesses the website for the first time and generates a first cookie of the user.
102. And acquiring a user cookie set corresponding to the second website.
The first website and the second website are respectively corresponding websites after and before modification of a webpage domain name, and the user cookie set comprises all user cookies which access the webpage before the modification of the webpage domain name. Further, in this step, after the first cookie is generated in the above step, the acquisition of the user cookie set corresponding to the second website may be triggered, and specifically, the loading of the second website may be triggered in a redirection manner, and the retrieval of the user cookie set under the website from the browser cache by invoking a preset interface is triggered, but is not limited thereto.
It should be noted that in the internet, cookies corresponding to different domain names of users are different and cannot be shared, so when a domain name of a web page is modified, cookies corresponding to the web page are different when the user accesses a website before and after the domain name is modified, and therefore when the user accesses a website of a new domain name, if the user directly judges whether the user currently requesting access is a new user according to a user cookie set under the website of the new domain name, a situation that an old user who has accessed the website of the old domain name before and accesses the website of the new domain name for the first time is mistaken as the new user exists. Therefore, the user cookie set under the website before the domain name is modified is acquired in the step, so that the identity of the currently accessed user can be conveniently judged according to the user cookie set.
103. And detecting whether a second cookie of the user exists in the user cookie set or not according to the user identification contained in the first cookie.
Wherein the second cookie is a cookie of the user at the second website. The user identifier may be hardware information of a device used by the user when accessing, an IP address of the device, and the like, which is not specifically limited in this embodiment of the present invention. It should be noted that when the user accesses the website under each domain name, each user cookie contains the user identifier of the user, so that it is possible to determine whether the user has previously accessed the website before domain name modification by detecting whether the user identifier in the user cookie currently requesting to access the new domain name website exists in the user cookies accessing the old domain name website. Specifically, the step may be to query whether the user identifier exists in the user cookie set by using a query function carrying the user identifier in the first cookie, so as to determine that the user has accessed the web page before modifying the domain name of the web page.
104. And if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie.
Specifically, the first cookie and the second cookie are associated, and a mapping relationship between the first cookie and the second cookie may be created according to a user identifier, but is not limited to this. The identification of the user identity by using the associated first cookie may be to identify whether the user is a new or old user, or to identify behavior data of the user when the user accesses a website before, and the like.
The embodiment of the invention provides a method for confirming the user identity, which comprises the steps of generating a first cookie of a user under a new domain name website when receiving a request of the user for accessing the new website after the domain name is modified, triggering and acquiring a user cookie set under an old website before the domain name is modified, detecting whether a second cookie of the user under the old website exists in the user cookie set according to the user identification contained in the first cookie because the user cookie set contains all user cookies accessing the old website and the cookies contain user identifications, and associating the first cookie with the second cookie when the second cookie exists so as to confirm the user identity by using the associated first cookie. Compared with the prior art, the method has the advantages that when the user requests to access the new address after the domain name is modified, whether the user is a new user or not is directly judged according to the user cookie under the new address, so that the old user who accesses the old website before the domain name is modified and accesses the new website for the first time is judged as the new user by mistake, the user cookie under the old website can be obtained when the user requests to access the new website, the user identity is judged according to the user cookie, the problem that the user identity confirmation accuracy is low due to the fact that whether the user is a new user or not cannot be accurately identified is solved, and the accuracy of the user identity confirmation is improved.
To explain in more detail below, an embodiment of the present invention provides another method for confirming an identity of a user, and specifically as shown in fig. 2, the method includes:
201. when a request of a user for accessing a first website is received, detecting whether the user requests to access the first website for the first time.
It should be noted that, when a user requests to access a website, the user identifier corresponding to the user may be carried, for example, hardware information of a device used when the user accesses, an IP address of the device, and the like, and when the user accesses the website, a cookie of the user may be generated and stored in the browser, so that in this step, it may be detected whether a cookie of the user under the website is stored in the browser according to the user identifier, and further, whether the cookie of the user is stored in the browser is detected, so as to further detect whether the cookie of the user under the website is stored in the browser
202. And if so, generating a first cookie of the user under the first website.
The concept explanation of the first cookie may refer to the corresponding description in step 101, and is not repeated herein.
For the embodiment of the present invention, if it is detected in step 201 that the user is not the first access, the user may be directly determined as the old user without generating the first cookie. By detecting whether the user accesses the new domain name modified new address for the first time and then determining whether to generate the first cookie and executing the subsequent steps, the problem of resource waste caused by the fact that the user is an old user under the new domain name, still generates the new cookie and obtains the user cookie under the old domain name for judgment is avoided, and therefore the accuracy of user identity confirmation is guaranteed and resources are saved.
203. And generating parameters according to the first cookie, and adding the parameters to the second website as the identification information of the first cookie.
The first website and the second website are respectively corresponding websites after the modification of the domain name of the webpage and before the modification. The parameter generated according to the first cookie in this step may specifically be a randomly generated coefficient, or may also be preset that each different website corresponds to different parameters, which is not specifically limited in the embodiment of the present invention.
204. And redirecting to the second website and acquiring the user cookie set corresponding to the second website.
And the user cookie set comprises all user cookies which have visited the webpage before the domain name of the webpage is modified.
It should be noted that, redirection from the first website to the second website requires configuration in the first website in advance, and adding the second website in the redirection configuration window, so as to implement the jump from the first website to the second website. The redirection mode in this step may be a redirection mode in the prior art, such as a 302redirect (temporary transfer) mode, which is not specifically limited in this embodiment of the present invention.
For example, a user requests access to a website with a modified domain name: https:// www.gome.com.cn/? And cmpid-dh _360_ yx _ mz & smid-532074657 z299wz1cymfz2o2z0z, so that after receiving the access request, the server generates a parameter k-1 according to the cookie of the user at the new address and adds the parameter to a second website pre-stored in a redirection window due to the configuration in the webpage in advance: https:// www.guomei.com.cn/? And (3) cmpid is dh _360_ yx _ mz & smid is 532074657z299wz1cymfz2o2z0z _ k is 1, and the website is jumped to and the webpage content corresponding to the website is loaded and displayed.
According to the embodiment of the invention, when the user accesses the new domain name modified new address, the new domain name is redirected to the old domain name before the domain name is modified, and the cookie under the new domain name is added to the URL of the web page of the old domain name, so that the user identity is recorded and identified according to the cookie under the old domain name, the problem of user identity identification errors caused by directly identifying all users as new users according to the cookie under the new domain name can be avoided, and the website access data is faulted, so that the accuracy of user identity confirmation and the comprehensiveness of the website data are improved.
205. And detecting whether a second cookie of the user exists in the user cookie set or not according to the user identification contained in the first cookie.
Wherein the second cookie is a cookie of the user under the second website. The specific implementation manner of this step may refer to the corresponding description in step 103, and is not described herein again.
206a, if the first cookie exists, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie.
In the prior art, when a user requests to access a new address with a modified domain name, whether the user is a new user or an old user can be directly confirmed according to a first cookie of the user in the new address, behavior data of the user and the like can be extracted, and the user identity data and the like can be identified according to the associated first cookie when the user accesses the new address by associating the first cookie of the user in the new address with a second cookie of the old address.
For the embodiment of the present invention, the step 206 may specifically include: and establishing a mapping relation between the first cookie and the second cookie according to the user identification. The mapping relation between the first cookie and the second cookie is established through the identification of the user, so that the first cookie and the second cookie are communicated, and the user identity, the user behavior data and the like are identified according to the data information stored by the two cookies.
And a step 206b, which is parallel to the step 206a, of determining that the user is a new user and generating a second cookie if the second cookie of the user does not exist in the user cookie set.
It should be noted that, if the redirection processing is not performed and the user cookie set under the old website is acquired when the user requests to access the first website after modifying the domain name of the web page, all users accessing the first website will be identified as new users at this time, so that the user identity that has accessed the web page before modifying the domain name is identified incorrectly. In the embodiment of the invention, the user is confirmed to be a new user only when the cookie of the user under the second website does not exist in the user cookie set, so that the accuracy of user identity identification can be improved.
207b, associating the first cookie with the second cookie according to the user identification information.
For the embodiment of the invention, the server can accurately identify the identity of the user and continuously store the behavior data of the user when the user accesses the new web address before and after the domain name modification by associating the cookies respectively corresponding to the new and old web addresses of the user before and after the domain name modification.
In addition, for the embodiment of the present invention, the method may further include: after a preset time interval, when a request of a user for accessing a first website is received, loading the first website and generating a first cookie; the user identity is identified based on the first cookie. Wherein the preset time interval may be three months, four months, etc. For the embodiment of the invention, after a certain time, most users log in a new domain name website during the period and associate cookies under the new domain name website with cookies under an old domain name website, so that redirection setting can be cancelled and a user cookie set under a second website is not acquired any more, and therefore, when the users request to access the first website, the webpages are directly loaded and displayed according to the first website, and the user identity data is directly recorded and identified according to the first cookies of the users at the moment, so that the users can be accurately identified, and resources are saved.
However, it should be noted that the specific implementation described in the above application scenarios is only an example, and is not the only specific implementation of the embodiment of the present invention, and is only one of the optimized implementations of the method according to the present invention.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention further provides a device for confirming a user identity, which is used to implement the method shown in fig. 1. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 3, the apparatus includes: a generating unit 31, an acquiring unit 32, a detecting unit 33, an associating unit 34, a confirming unit 35, wherein
The generating unit 31 is configured to generate a first cookie of the user under the first website when a request for accessing the first website is received.
An obtaining unit 32, configured to obtain a user cookie set corresponding to a second website, where the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set includes user cookies that have all accessed the webpage before the modified webpage domain name.
A detecting unit 33, configured to detect whether a second cookie of the user exists in the user cookie set according to the user identifier included in the first cookie, where the second cookie is a cookie of the user under the second website.
An associating unit 34, configured to associate the first cookie with the second cookie if the second cookie of the user exists in the user cookie set.
A confirming unit 35, configured to confirm the identity of the user by using the associated first cookie.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention further provides another device for confirming a user identity, which is used to implement the method shown in fig. 2. The embodiment of the apparatus corresponds to the embodiment of the method, and for convenience of reading, details in the embodiment of the apparatus are not repeated one by one, but it should be clear that the apparatus in the embodiment can correspondingly implement all the contents in the embodiment of the method. As shown in fig. 4, the apparatus includes: a generating unit 41, an obtaining unit 42, a detecting unit 43, an associating unit 44, a confirming unit 45, wherein
A generating unit 41, configured to generate a first cookie of a user under a first website when receiving a request of the user to access the first website.
An obtaining unit 42, configured to obtain a user cookie set corresponding to a second website, where the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set includes user cookies that have all accessed the webpage before the modified webpage domain name.
A detecting unit 43, configured to detect whether a second cookie of the user exists in the user cookie set according to the user identifier included in the first cookie, where the second cookie is a cookie of the user under the second website.
An associating unit 44, configured to associate the first cookie with the second cookie if the second cookie of the user exists in the user cookie set.
A confirming unit 45, configured to confirm the identity of the user by using the associated first cookie.
Further, in the above-mentioned case,
the detecting unit 43 may be further configured to detect whether the user requests to access the first website for the first time.
The generating unit 41 may be specifically configured to generate a first cookie of the user under the first website if the first cookie is true.
Further, in the above-mentioned case,
the generating unit 41 may be further configured to generate a parameter according to the first cookie, and add the parameter to the second website as the identification information of the first cookie.
Further, the apparatus further comprises:
a redirecting unit 46, configured to redirect to the second website and obtain the set of user cookies corresponding to the second website.
Further, in the above-mentioned case,
the associating unit 44 may be specifically configured to establish a mapping relationship between the first cookie and the second cookie according to the user identifier.
The confirming unit 45 may be further configured to determine that the user is a new user and generate the second cookie if the second cookie of the user does not exist in the user cookie set.
The embodiment of the invention provides another user identity confirmation device. The device comprises: the device comprises a generating unit, an acquiring unit, a detecting unit, a correlating unit and a determining unit. The method comprises the steps of generating a first cookie of a user under a new domain name website when a request of the user for accessing the new website after domain name modification is received, triggering and obtaining a user cookie set under an old website before domain name modification, detecting whether a second cookie of the user under the old website exists in the user cookie set according to a user identification contained in the first cookie, and associating the first cookie with the second cookie when the second cookie exists so as to conveniently confirm the identity of the user by using the associated first cookie. Compared with the prior art, the method has the advantages that when the user requests to access the new address after the domain name is modified, whether the user is a new user or not is directly judged according to the user cookie under the new address, so that the old user who accesses the old website before the domain name is modified and accesses the new website for the first time is judged as the new user by mistake, the user cookie under the old website can be obtained when the user requests to access the new website, the user identity is judged according to the user cookie, the problem that the user identity confirmation accuracy is low due to the fact that whether the user is a new user or not cannot be accurately identified is solved, and the accuracy of the user identity confirmation is improved.
The text processing device comprises a processor and a memory, wherein the generating unit 31, the acquiring unit 32, the detecting unit 33, the associating unit 34, the determining unit 35 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the accuracy of the user identity confirmation is improved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the method for confirming the identity of a user.
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for confirming the identity of a user is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: when a request of a user for accessing a first website is received, generating a first cookie of the user under the first website; acquiring a user cookie set corresponding to a second website, wherein the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set comprises user cookies which are all accessed to the webpage before the modified webpage domain name; detecting whether a second cookie of the user exists in the user cookie set according to the user identification contained in the first cookie, wherein the second cookie is a cookie of the user under the second website; and if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie.
Further, after receiving a request of the user to access the first website, the method further includes:
detecting whether the user requests to access the first website for the first time;
the generating a first cookie for the user under the first web address comprises:
and if so, generating a first cookie of the user under the first website.
Further, the acquiring the user cookie set corresponding to the second website includes:
generating a parameter according to the first cookie, and adding the parameter to the second website as the identification information of the first cookie;
and redirecting to the second website and acquiring the user cookie set corresponding to the second website.
Further, the associating the first cookie with the second cookie comprises:
and establishing a mapping relation between the first cookie and the second cookie according to the user identification.
Further, the method further comprises:
if the second cookie of the user does not exist in the user cookie set, determining that the user is a new user and generating the second cookie;
and associating the first cookie with the second cookie according to the user identification information.
An embodiment of the present invention further provides a computer program product, which, when executed on a data processing apparatus, is adapted to execute a program that initializes the following method steps: when a request of a user for accessing a first website is received, generating a first cookie of the user under the first website; acquiring a user cookie set corresponding to a second website, wherein the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set comprises user cookies which are all accessed to the webpage before the modification of the webpage domain name; detecting whether a second cookie of the user exists in the user cookie set according to the user identification contained in the first cookie, wherein the second cookie is a cookie of the user under the second website; and if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie.
Further, after receiving a request of the user to access the first website, the method further includes:
detecting whether the user requests to access the first website for the first time;
the generating a first cookie for the user under the first web address comprises:
and if so, generating a first cookie of the user under the first website.
Further, the acquiring the user cookie set corresponding to the second website includes:
generating a parameter according to the first cookie, and adding the parameter to the second website as the identification information of the first cookie;
and redirecting to the second website and acquiring the user cookie set corresponding to the second website.
Further, the associating the first cookie with the second cookie comprises:
and establishing a mapping relation between the first cookie and the second cookie according to the user identification.
Further, the method further comprises:
if the second cookie of the user does not exist in the user cookie set, determining that the user is a new user and generating the second cookie;
and associating the first cookie with the second cookie according to the user identification information.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A method for validating the identity of a user, the method comprising:
when a request of a user for accessing a first website is received, generating a first cookie of the user under the first website;
acquiring a user cookie set corresponding to a second website, wherein the first website and the second website are websites respectively corresponding to a modified webpage domain name and a modified webpage domain name, and the user cookie set comprises user cookies which are all accessed to the webpage before the modified webpage domain name;
detecting whether a second cookie of the user exists in the user cookie set according to the user identification contained in the first cookie, wherein the second cookie is a cookie of the user under the second website;
if so, associating the first cookie with the second cookie, and confirming the identity of the user by using the associated first cookie;
if the user does not exist, determining that the user is a new user, generating the second cookie, and associating the first cookie with the second cookie according to the user identification information;
the method further comprises the following steps:
after a preset time interval, when a request of a user for accessing a first website is received, loading the first website and generating a first cookie;
the user identity is identified based on the first cookie.
2. The method of claim 1, wherein after receiving a request from a user to access a first website, the method further comprises:
detecting whether the user requests to access the first website for the first time;
the generating a first cookie for the user under the first web address comprises:
and if so, generating a first cookie of the user under the first website.
3. The method of claim 1, wherein obtaining the set of user cookies corresponding to the second web address comprises:
generating a parameter according to the first cookie, and adding the parameter to the second website as the identification information of the first cookie;
and redirecting to the second website and acquiring the user cookie set corresponding to the second website.
4. The method of any of claims 1-3, wherein associating the first cookie with the second cookie comprises:
and establishing a mapping relation between the first cookie and the second cookie according to the user identification.
5. An apparatus for confirming an identity of a user, the apparatus comprising:
the device comprises a generating unit, a searching unit and a displaying unit, wherein the generating unit is used for generating a first cookie of a user under a first website when receiving a request of the user for accessing the first website;
an obtaining unit, configured to obtain a user cookie set corresponding to a second website, where the first website and the second website are websites corresponding to a modified webpage domain name and a modified webpage domain name respectively, and the user cookie set includes user cookies that have access to the webpage before the modified webpage domain name;
a detecting unit, configured to detect whether a second cookie of the user exists in the user cookie set according to the user identifier included in the first cookie, where the second cookie is a cookie of the user under the second website;
an association unit, configured to associate the first cookie with a second cookie if the second cookie of the user exists in the user cookie set;
a confirming unit, configured to confirm the identity of the user by using the associated first cookie;
a determining unit, configured to determine that the user is a new user and generate a second cookie if the second cookie of the user does not exist in the user cookie set;
the association unit is further configured to associate the first cookie with the second cookie according to the user identification information;
the device further comprises:
after a preset time interval, when a request of a user for accessing a first website is received, loading the first website and generating a first cookie;
the user identity is identified based on the first cookie.
6. The apparatus of claim 5,
the detection unit is further configured to detect whether the user requests to access the first website for the first time;
the generating unit is specifically configured to generate a first cookie of the user under the first website if the user requests to access the first website for the first time.
7. The apparatus of claim 5, wherein the obtaining unit comprises:
the generating module is used for generating parameters according to the first cookie;
the adding module is used for adding the parameter as the identification information of the first cookie to the second website;
the redirection module is used for redirecting to the second website;
and the acquisition module is used for acquiring the user cookie set corresponding to the second website.
8. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the method for confirming the identity of a user according to any one of claims 1 to 4.
9. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of validating the identity of a user according to any one of claims 1 to 4.
CN201811159386.5A 2018-09-30 2018-09-30 User identity confirmation method and device Active CN110971578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811159386.5A CN110971578B (en) 2018-09-30 2018-09-30 User identity confirmation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811159386.5A CN110971578B (en) 2018-09-30 2018-09-30 User identity confirmation method and device

Publications (2)

Publication Number Publication Date
CN110971578A CN110971578A (en) 2020-04-07
CN110971578B true CN110971578B (en) 2022-07-05

Family

ID=70028891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811159386.5A Active CN110971578B (en) 2018-09-30 2018-09-30 User identity confirmation method and device

Country Status (1)

Country Link
CN (1) CN110971578B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667932A (en) * 2020-12-25 2021-04-16 浙江蓝卓工业互联网信息技术有限公司 Dynamic redirection method and device under micro-service architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178717A (en) * 2007-12-05 2008-05-14 优视动景(北京)技术服务有限公司 Method for adaptation processing web page and web page adaptation device
CN103491146A (en) * 2013-09-10 2014-01-01 百川通联(北京)网络技术有限公司 Method, device and system for releasing network information
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
CN106919595A (en) * 2015-12-25 2017-07-04 阿里巴巴集团控股有限公司 A kind of method, device and electronic equipment mapped for Cookie
CN107948167A (en) * 2017-11-29 2018-04-20 浙江数链科技有限公司 A kind of method and apparatus of single-sign-on

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10108982B2 (en) * 2013-02-26 2018-10-23 Oath (Americas) Inc. Systems and methods for accessing first party cookies
CN104486458B (en) * 2014-12-15 2019-01-08 北京国双科技有限公司 The data processing method and device of cross-domain session
CN105430012B (en) * 2015-12-25 2018-07-24 无锡天脉聚源传媒科技有限公司 A kind of multi-site synchronizes the method and device of login
CN107436873B (en) * 2016-05-25 2021-05-07 北京奇虎科技有限公司 Website jumping method, device and transfer device
CN108255878B (en) * 2016-12-29 2022-05-27 北京国双科技有限公司 User information processing method and related device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101178717A (en) * 2007-12-05 2008-05-14 优视动景(北京)技术服务有限公司 Method for adaptation processing web page and web page adaptation device
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
CN103491146A (en) * 2013-09-10 2014-01-01 百川通联(北京)网络技术有限公司 Method, device and system for releasing network information
CN106919595A (en) * 2015-12-25 2017-07-04 阿里巴巴集团控股有限公司 A kind of method, device and electronic equipment mapped for Cookie
CN107948167A (en) * 2017-11-29 2018-04-20 浙江数链科技有限公司 A kind of method and apparatus of single-sign-on

Also Published As

Publication number Publication date
CN110971578A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN110968824A (en) Page data processing method and device
CN109298987B (en) Method and device for detecting running state of web crawler
CN107147645B (en) Method and device for acquiring network security data
CN110971571A (en) Website domain name verification method and related device
CN109600272B (en) Crawler detection method and device
CN112954043B (en) Method for identifying user based on website access log and computer equipment
JP2018515845A (en) Method and apparatus for recording and restoring click position on web page
EP3435253B1 (en) Method and device for page display
CN106657422B (en) Method, device and system for crawling website page and storage medium
US20170237825A1 (en) Resource Download Method, Electronic Device, and Apparatus
CN110971578B (en) User identity confirmation method and device
CN114329281A (en) Rendering server, webpage rendering method and webpage rendering device
CN107704464B (en) Method and device for analyzing path of static resource
CN106911636B (en) Method and device for detecting whether backdoor program exists in website
CN108255878B (en) User information processing method and related device
CN110889065B (en) Page stay time determination method, device and equipment
CN106611118B (en) Method and device for applying login credentials
CN110708270B (en) Abnormal link detection method and device
CN108984572B (en) Website information pushing method and device
CN108228613B (en) Data reading method and device
CN111240750B (en) Awakening method and device for target application program
CN109426540B (en) Element click condition detection method and device, storage medium and processor
CN110858852B (en) Method and device for acquiring registered domain name
CN110968754A (en) Detection method and device for crawler page turning strategy
CN109299117B (en) Data request processing method and device, storage medium and processor

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
GR01 Patent grant
GR01 Patent grant