WO2013044569A1 - Network user identification method and application server thereof - Google Patents

Network user identification method and application server thereof Download PDF

Info

Publication number
WO2013044569A1
WO2013044569A1 PCT/CN2011/085016 CN2011085016W WO2013044569A1 WO 2013044569 A1 WO2013044569 A1 WO 2013044569A1 CN 2011085016 W CN2011085016 W CN 2011085016W WO 2013044569 A1 WO2013044569 A1 WO 2013044569A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
agent
information
application server
cookie
Prior art date
Application number
PCT/CN2011/085016
Other languages
French (fr)
Chinese (zh)
Inventor
郑芳只
罗峰
黄苏支
Original Assignee
北京亿赞普网络技术有限公司
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 北京亿赞普网络技术有限公司 filed Critical 北京亿赞普网络技术有限公司
Publication of WO2013044569A1 publication Critical patent/WO2013044569A1/en

Links

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
    • 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/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • 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

Definitions

  • the present application relates to the field of network communication technologies, and in particular, to a method for network user identification and an application server thereof. Background technique
  • the rapid growth of Internet scale and coverage has brought about information overload problems: excessive information and reduced.
  • the first step in recommending information to the user is to identify the user, because only each user is identified, and the information can be further mined, calculated, and recommended based on the user's past behavior.
  • a typical user identification method of the prior art is user identification based on a cookie (a small text file for storing user private information).
  • a cookie a small text file for storing user private information.
  • user cookies are obtained by customizing the Apache log format or JavaScript, a very effective means of user identification has been found.
  • the cookie can be considered to be bound to a certain access client computer without being cleared, so the accuracy of cookie-based user identification is relatively high.
  • cookie-based user identification is of course also flawed. Because the browser automatically saves the cookie to a local directory corresponding to the client, the most common defect is that the cookie is deleted by the client user and the client user cannot The original record implementation corresponds; at the same time, because the client computer will be shared, or the client user will access the website on different computers, the cookie cannot directly correspond to the client user.
  • the technical problem to be solved by the present application is to provide a method for network user identification and an application server, which can improve the accuracy of user identification when a cookie is deleted.
  • the present application discloses a method for network user identification, including the following steps:
  • the corresponding user identity certificate is obtained according to the user identifier and the user agent of the corresponding client user;
  • the information of the corresponding client user is identified.
  • the step of querying the corresponding user identity certificate according to the user identifier and the user agent of the corresponding client user includes:
  • the remote server is queried whether there is a corresponding client user
  • the user identity of the client user is obtained according to the user identifier and the user agent;
  • a new client user's user identity is generated in the remote server according to the user identity and the user agent.
  • the method further Includes:
  • the latest user agent is obtained according to the user identity certificate in the cookie.
  • the step of obtaining the latest user agent according to the user identity certificate in the cookie includes:
  • the local cache user information of the application server is obtained according to the local cache query result of the application server, where the local cache user information of the application server includes a user agent;
  • Matching the user agent in the local cache user information of the application server with the user agent in the user's online behavior information If the matching is successful, the user agent in the locally cached user information of the application server is used as the latest user agent. If the matching fails, updating the user agent in the locally cached user information of the application server according to the user agent in the online behavior information of the user;
  • the identification information of the corresponding client user is queried in the remote server according to the user identity certificate in the cookie, and the remote storage user information is obtained according to the query result, where the remote storage user information includes the user agent;
  • the method further includes:
  • the user identity, the user identity, and the current user agent are stored in association on the application server side and/or the remote server side in the presence of the user identity certificate.
  • the user identifier comprises: a network user name, and/or a user IP address of the dedicated line user.
  • the application also discloses an application server, including:
  • the first querying device is configured to: when the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user identifier of the corresponding client user and the user agent, the query is used accordingly Household identification certificate;
  • a recovery device configured to restore a corresponding cookie according to the user identity certificate
  • the identifying means is configured to identify the information of the corresponding client user according to the user identity certificate in the restored cookie.
  • the first query device includes:
  • a first cache searching module configured to query, according to the user identifier and the user agent, whether the corresponding client user exists in the local cache of the application server;
  • a first obtaining module configured to acquire, according to the user identifier and the user agent, a user identity certificate of the client user when the cache hit succeeds;
  • a first query requesting module configured to send a first query request to the remote server when the cache hit fails
  • the remote server includes:
  • a first remote querying device configured to query, according to the first query request, by the user identifier and the user agent, whether a corresponding client user exists in the remote server;
  • a certificate obtaining device configured to obtain a user identity certificate of the client user according to the user identifier and the user agent when a corresponding client user exists in the remote server;
  • a certificate generating device configured to generate a user identity certificate of a new client user according to the user identifier and the user agent in the remote server when the corresponding client user does not exist in the remote server;
  • a first returning device configured to return the user identity certificate outputted by the certification obtaining device or the certification generating device to the application server.
  • the application server further includes:
  • the user agent obtaining means is configured to obtain the latest user agent according to the user identity certificate in the cookie when the cookie exists in the online behavior information of the user before the first querying device performs the query operation.
  • the user agent obtaining device includes:
  • a second cache lookup module configured to query, in the local cache of the application server, whether a corresponding client user exists according to the user identity certificate in the cookie
  • a second obtaining module configured to obtain local cache user information of the application server according to the local cache query result of the application server, where the local cache user information of the application server includes a user agent
  • a local matching module configured to match a user agent in the local cache user information of the application server with a user agent in the online behavior information of the user, and if the matching is successful, the user in the local cache user information of the application server
  • the agent acts as the latest user agent; if the match fails, the user agent in the locally cached user information of the application server is updated according to the user agent in the user's online behavior information;
  • a second query requesting module configured to send a second query request to the remote server when the cache hit fails
  • the remote server includes:
  • a second remote search device configured to: when the cache hit fails, query the identification information of the corresponding client user in the remote server according to the user identity certificate in the cookie, and obtain remote storage user information according to the query result, where the remote storage user
  • the information includes a user agent
  • a remote matching device configured to match a user agent in the remote storage user information with a user agent in the user online behavior information, and if the matching is successful, use the user agent in the remote storage user information as the latest a user agent; if the matching fails, updating the user agent in the remote storage user information according to the user agent in the user online behavior information; and the second returning device is configured to output the latest information of the remote matching device User agent, returned to the application server.
  • the application server further includes:
  • the association storage device is configured to store the user identity certificate, the user identifier, and the current user agent on the application server side in the presence of the user identity certificate.
  • the user identifier comprises: a network user name, and/or a user IP of the leased line user.
  • the present application also provides a computer readable recording medium on which a program for performing the above-described method of network user identification is recorded. Compared with the prior art, the present application has the following advantages:
  • the application first recovers the deleted cookie according to the user identifier and the user agent, and then identifies the information of the corresponding client user according to the user identity certificate in the restored cookie;
  • the accuracy of the identification is higher than the accuracy of the user identification based on the IP+ user agent, so the application can improve the accuracy of the user identification in the case where the cookie is deleted;
  • the application can overcome the problem of low user identification accuracy caused by the cookie deletion problem in the prior art, accurately locate and track the client-based user; thus, the user can further recommend the most effective and valuable value according to the recognition result.
  • Information which can solve the problem of user information overload and reduce the cost of users enjoying information;
  • the application can also obtain the latest user agent according to the user identity certificate in the cookie, and obtain the corresponding user identity certificate according to the user identifier of the corresponding client user and the latest user agent query, so as to avoid the user agent changing the cookie.
  • the impact of recovery can further improve the accuracy of user identification.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for network user identification according to the present application;
  • FIG. 2 is a flow chart of a remote server querying based on a user identifier and a user agent according to the present application
  • Embodiment 3 is a flowchart of Embodiment 2 of a method for network user identification according to the present application;
  • FIG. 4 is a flow chart of a remote server querying based on a user identity certificate in a cookie
  • FIG. 5 is an example of a user identification timing chart of the present application.
  • FIG. 6 is a schematic diagram of interaction between a client 6A and an application server 6B according to the present application
  • FIG. 7 is a structural diagram of an application server embodiment of the present application. detailed description
  • One of the core concepts of the embodiment of the present application is that, in the case that the client user cookie is deleted, the deleted cookie is restored on the application server according to the user identifier and the user agent; specifically, when the cookie is in the corresponding client user
  • the corresponding server user identification UID, User Identification
  • the corresponding user identity certificate is restored according to the user identity certificate.
  • the cookie finally identifies the information of the corresponding client user according to the user identity certificate in the restored cookie.
  • the present application can improve the accuracy of user identification in the case where the cookie is deleted.
  • cookies In order to identify the user and perform session (session) tracking, some websites use cookies to store user private information (usually encrypted) on the client; wherein the most important user private information in the cookie is the user identity that is uniquely identified by the user. prove.
  • the application server assigns a unique user identity to the client user, generates a cookie according to the user identity certificate, and then passes the cookie to the response message.
  • Client user The browser will automatically save the cookie to a local directory. In this way, the cookie can be passed to the application server in each subsequent access request, and the application server can know which client user the access request was sent based on the user identity in the cookie.
  • Embodiment 1 of a method for network user identification is shown, which may specifically include:
  • Step 101 When the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user identifier of the corresponding client user and the user agent, the corresponding user ID is obtained. Bright.
  • the application server may, according to the packet data in the user access request, parse the online behavior information of the user according to the packet data in the user access request, where the user online behavior information may generally include the user IP ( User—ip), User Agent (UA, User Agent), cookie, access to website domain (host), access to website page information (Uniform Resource Locator), and/or user's last referee.
  • User—ip User IP
  • U Agent User Agent
  • host access to website domain
  • Uniform Resource Locator Uniform Resource Locator
  • User agents are information that helps the server identify the operating system and version of its client, CPU type, browser and version, browser rendering engine, browser language, browser plug-in, and so on.
  • the cookie data does not carry the cookie.
  • the user's cookie is deleted by the client user, and another possibility is that the client The user's identity is a new user or the first time the site is accessed. At this time, the identity of the client user can be identified by applying the present application, further recovering the user and generating a new user.
  • the user ID of the private line user can be used as the user identifier of the client user because the user IP address is fixed and does not change, and the unique user can be identified.
  • ADSL Asymmetric Digital Subscriber Line
  • the IP since the IP is dynamic, it cannot be uniquely marked, and the ADSL account network user name (user_name) is fixed, and The unique user can be identified, so at this time, the ADSL account network user name can be used as the user identifier of the client user.
  • the AAA Authentication, Authorization, Accounting, Accounting
  • the application server receives the accounting
  • the user basic information may be parsed according to the billing message, and the user basic information may specifically include a network user name (ie, an ADSL account network user name) and/or a user IP address.
  • the application server may obtain the network user name or user IP as the user identifier directly from the user basic information for the client user, and access the online behavior from the user.
  • the user agent is obtained from the information, and then, according to the corresponding user identifier and the user agent, the corresponding user identity certificate can be obtained by querying the application server.
  • the user identity certificate, the user identifier, and the current user agent may be stored in association in an offline situation, and correspondingly, the method It can also include:
  • the user identity, the user identity, and the current user agent are stored in association at the application server and/or the remote server.
  • the user identification can be queried by performing a query matching in the application server and/or the remote server-side database by using the combined keyword of the user identifier and the current user agent.
  • the application server may not be able to directly obtain the network user name and user agent. Then, according to the user IP association, the network user name and user agent need to be found, and then the corresponding user identity is obtained according to the corresponding user identifier and user agent query. Proof can be.
  • the user identity certificate, the user identifier, and the current user agent may be associated and stored in an offline situation, and the method may also be performed.
  • the user IP, the user identity, the user identity, and the current user agent are stored in association at the application server and/or the remote server.
  • the step 101 may further include: when the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user
  • the identifier and the user agent query whether the corresponding client user exists in the local cache of the application server. If the cache hit succeeds, the user identity of the client user is obtained according to the user identifier and the user agent.
  • the local cache of the application server only retains recent data, such as retaining only
  • the data of 1 day or 2 days can also retain only the online user data that is currently online, and the rest of the historical data is stored in the remote server, for example, the user who is currently offline.
  • the preferred embodiment searches the local cache of the application server for the client user based on the user identifier and the user agent. If it can be found, it indicates that the client user recently appears in the application server, and thus can obtain the unique identifier as the user.
  • the user identification (the user identification in the cookie information, as part of the cookie content), also proves that the client user deleted the cookie information and needs to further restore the cookie.
  • the step of obtaining the corresponding user identity certificate according to the user identifier of the corresponding client user and the user agent query may further include:
  • the user identifier and the user agent are queried according to the user identifier to check whether there is a corresponding client user; it should be noted that when the cache hit fails, that is, when the application server's local cache cannot be found. , indicating that the client user has not appeared in the application server recently, so it is necessary to query the historical data of the remote server;
  • the user identity of the client user is obtained according to the user identifier and the user agent; that is, when there is no corresponding client user in the remote server, in the remote server
  • a user identity certificate of a new client user is generated according to the user identifier and the user agent.
  • a cookie is generated based on the user identity and then the cookie is passed to the application server in the response message.
  • the remote server may include a UDC (user data center).
  • UDC user data center
  • the corresponding client user can be found in the UDC database based on the network user name and the user agent, and if found, the user information [network user name, user agent, user-ip, and user identity certificate] is obtained, and the user identity is obtained. Prove feedback to the application server, also said If the client user deletes the cookie information, the user's cookie needs to be further restored. If it is not found, the client user is a new user, and the application server is accessed for the first time. Therefore, a user who globally uniquely identifies a user is assigned. The identity certificate, and initialize the user information [network user name, user agent, user-ip and user identity certificate], and feed the user identity certificate to the application server.
  • a flow chart of a remote server based on a user identifier and a user agent is performed, which may specifically include:
  • Step 201 Receive an adaptation message from an application server, where the adaptation message includes a network user name and a user agent.
  • Step 202 Query whether there is a corresponding client user in the database based on the network user name and the user agent, and if yes, go to step 203; otherwise, go to step 204;
  • Step 203 Obtain user information: a network user name, a user agent, a cookie, and go to step 206;
  • the client user When the client user exists, it indicates that the client user has entered the application server, the user cookie is deleted, and the cookie can be recovered through the network user name and the user agent.
  • Step 204 Generate, according to the network user name and the user agent, a user unique identifier user identity certificate in the database;
  • Step 205 filling the network user name, user agent, cookie in the user table entry of the database, and proceeds to step 206;
  • Step 206 Return the user identity certificate in the cookie to the application server.
  • Step 102 Restore a corresponding cookie according to the user identity certificate;
  • the step of restoring the corresponding cookie according to the user identity certificate may be: the application server generates a corresponding cookie according to the user identity certificate, and grows the cookie to the client. In this way, when the client user accesses the application server again, the client user will carry the cookie information, so that the application server knows which client user sent the access request.
  • the planting process may be: storing a cookie in a fixed text of a client through a P3P protocol (Private preference platform, Platform for Privacy Preferences), where P3P allows a network site to announce them. An agreement collected about browsing users' intent to use them.
  • Step 103 Identify, according to the user identity certificate in the restored cookie, the information of the corresponding client user.
  • the information of the client user as a result of the identification may typically include one or more of the following information:
  • it may include a network user name, a user IP, a user agent, a cookie, and the like.
  • it may include an interest group, a delivery advertisement status, and the like.
  • the user unique identifier may be selected in the following order: When the user registers to log in, the user ID is taken as the user, and when the user browses in the unlogged state, the user's The cookie is used, and the method is used when the user is not logged in and the cookie is deleted, so as to improve the accuracy of the user identification.
  • the prior art can perform user identification based on the IP+ user agent in the case where the cookie is deleted, since the IP and the user agent are constantly changing, the user cannot be accurately located and identified, resulting in low accuracy of recognition.
  • the application first recovers the deleted cookie according to the user identifier and the user agent, and then identifies the information of the corresponding client user according to the user identity certificate in the restored cookie; The accuracy of the user identification is higher than the accuracy of the user identification based on the IP+ user agent, so the application can improve the accuracy of the user identification in the case where the cookie is deleted.
  • Embodiment 2 of a method for network user identification according to the present application is shown, which may specifically include:
  • Step 301 When a cookie exists in the online behavior information of the user, obtain the latest user agent according to the user identity certificate in the cookie;
  • Step 302 When the cookie does not exist in the online behavior information of the user of the corresponding client user, the user identity certificate is obtained according to the user identifier of the corresponding client user and the latest user agent, and the corresponding user identity certificate is obtained;
  • Step 303 Restore the corresponding cookie according to the user identity certificate
  • Step 304 Identify, according to the user identity certificate in the restored cookie, the information of the corresponding client user.
  • the user agent represents browser information, plug-in information, operating system information, etc.
  • the user agent content will change, such as version upgrade, install plug-in, or plug-in upgrade, etc., resulting in user agent content. A change has occurred.
  • the embodiment obtains the latest user agent according to the user identity certificate in the cookie, and updates the user agent in real time to ensure that the user agent is always in the latest state, so that According to the user ID of the corresponding client user and the latest user agent query, the corresponding user identity certificate is obtained to avoid the change of the user agent and affect the cookie recovery, thereby further improving the accuracy of the user identification.
  • the step of obtaining the latest user agent according to the user identity certificate in the cookie may further include:
  • the local cache user information of the application server is obtained according to the local cache query result of the application server, where the local cache user information of the application server may include a user agent;
  • the user agent in the local cache user information of the application server is updated according to the user agent in the user's online behavior information. It should be noted that the matching failure indicates that the user agent has changed, so it needs to be performed. Update
  • the identification information of the corresponding client user is queried in the remote server according to the user identity certificate in the cookie, and the remote storage user information is obtained according to the query result, where the remote storage user information may include a user agent;
  • the user agent in the remote storage user information is updated according to the user agent in the user's online behavior information.
  • the match identification indicates that the user agent has changed, so an update is required.
  • the remote server may include a UDC (user data center).
  • UDC user data center
  • a corresponding client user can be found based on a cookie in the UDC's database.
  • a flow chart of a remote server based on a user identity certificate in a cookie is shown in the following, and specifically includes:
  • Step 401 Receive an adaptation message from an application server, where the adaptation message includes a cookie.
  • Step 402 Query, according to the user identity certificate in the cookie, the identification information of the corresponding client user in the database;
  • the presence of a cookie indicates that the corresponding client user has accessed the application server.
  • Step 403 Obtain user information according to the query result.
  • Step 404 the user agent in the user information is matched with the user agent in the user's online behavior information, if the matching fails, step 405 is performed; if the matching is successful, step 407 is performed; Step 405: Update the user agent in the online behavior information of the user as the latest user agent to the corresponding user entry.
  • the user entry is used to store user information in a database
  • Step 406 Return the latest user agent to the application server.
  • Step 407 The user agent in the user information is used as the latest user agent, and is returned to the application server.
  • the application server receives the latest user agent
  • the user identity certificate, the user identity, and the latest user agent may be stored in association.
  • the application server and the UDC update and associate the user information of the client user to improve the accuracy and real-time of the subsequent user identification.
  • the user identity certificate, the user identity, and the current user agent are stored in association
  • the execution entity of the association store may include one or more of an application server and a UDC, and in addition, the user identity
  • the execution subject performs corresponding update and association processing.
  • the application of the present application in the actual application is shown in FIG. 5, and the user identification timing diagram may specifically include: Step (1), AAA Server receiving The charging request from the client user obtains the fee or balance of the user account according to the network user name in the charging request, and determines whether the client user is allowed to access the Internet further. If allowed, perform step (2) and (3), otherwise, the client user is denied access to the Internet due to insufficient fees;
  • Step (2) allowing the client user to access the Internet
  • Step (3) When the user's fee and balance allow the user to access the Internet, the AAA Server synchronizes the basic information of the user to the Web server (that is, the application server in this embodiment), and the basic information of the user is parsed by the Web server, that is, the network user name.
  • Step (4) when the client user browses the Internet, the Web Server according to the corresponding access request
  • the user online behavior information may be analyzed, where the user online behavior information may include: a user IP, a user agent, a cookie, a website i or a name, a website page information, a referer information, and the like;
  • the Web Server determines the cookie information. If the cookie exists, the Web Server queries the user information through the user identity certificate in the cookie, and queries whether the client user exists. If yes, the matching user's online behavior carries the user agent and passes the user identity certificate. The user agent in the user identity information is matched, and if the matching is successful, the user agent does not change; if the matching is unsuccessful, the user is carried in the Internet to carry the user agent to update the user agent information in the query result, and step (7) is performed; If yes, perform step (5);
  • the Web Server obtains the network user name and the user agent through the IP association, and then queries the network user name and the user agent to check whether the client user exists. If yes, the user identity information is obtained, that is, through the network user. Name and user agent associate the user, and perform step (7); if not, perform step (5);
  • Step (5) UDC (user data center, user data center) according to the message type, the partition is based on the network user name + user agent query, or based on the user identity certificate (user_id) query;
  • the query based on the user identity certificate may include: querying the client user by using the user identity certificate [indicating that the client user has entered the system], obtaining the network user name and the user agent in the user information, and the user carrying the network user this time The name is matched with the user agent. If the matching is successful, step (6) is performed; if the matching is unsuccessful, the network user name and the latest user agent are updated to the user information [user-agent change, association processing], and steps are performed (6) );
  • the query based on the network user name + user agent may specifically include: querying by using the network user name and the user agent. If the database does not exist, it indicates that the client user is a new user, that is, the first time entering the system, the client needs to be the client. The user newly produces a new user identity certificate; if it exists, it indicates that the client user has deleted the planting cookie, so it can be associated with the user agent through the network user name to obtain the user's original user identity certificate, and turn (6);
  • Step (6) the UDC synchronizes the association result to the Web server for convenient service processing
  • Step (7) the Web Server performs user behavior identification according to the identified user information, User interest analysis and accumulation, and analyze the user's required information and interesting information from the user's accumulated information, website content, time and other dimensions, and send it to the user;
  • Steps (8) and (9) when the client user is not accessing the Internet for the first time, since the Web server has stored the user information in the local cache of the application server, the associated storage structure based on the local cache of the application server can be performed.
  • Step (10) when the client user goes offline, the AAA Server synchronizes the corresponding offline message to the Web Server;
  • Step (11) when the Web Server receives the offline message, parses the corresponding user information: the network user name, the user IP, and the offline state; and, for the information persistence requirement, the user information is synchronized to the UDC. , ;
  • Step (12) for the requirement of information persistence, the Web Server synchronizes the user information of the client to the UDC, so as to store the latest user information in the user table in the UDC database to avoid user information loss. happening.
  • any of the foregoing method steps of the user identification method may be implemented as executable software instructions stored on a computer readable medium, wherein the computer readable medium may also include a transmission type medium.
  • FIG. 6 a schematic diagram of interaction between the client 6A and the application server 6B is shown.
  • the user's online behavior information may be parsed according to the packet data in the access request.
  • the application server 6B may directly return a response to the client 6A according to the cookie.
  • the present application further discloses an application server embodiment. Referring to FIG. 7, specifically, the method may include:
  • the first querying device 701 is configured to: when the cookie is in the online behavior of the user of the corresponding client user When the information does not exist, according to the user ID and user agent of the corresponding client user, the query obtains the corresponding user identity certificate;
  • the recovery device 702 is configured to restore the corresponding cookie according to the user identity certificate
  • the identifying means 703 is configured to identify the information of the corresponding client user according to the user identity certificate in the restored cookie.
  • the user identifier may include: a network user name, and/or a user IP of the private line user.
  • the first querying apparatus 701 may further include:
  • a first cache searching module configured to query, according to the user identifier and the user agent, whether the corresponding client user exists in the local cache of the application server;
  • the obtaining module is configured to obtain the user identity of the client user according to the user identifier and the user agent when the cache hit succeeds.
  • the first querying apparatus 701 may further include: a first query requesting module, configured to send a first query request to the remote server when the cache hit fails;
  • the remote server may specifically include:
  • a first remote querying device configured to query, according to the first query request, by the user identifier and the user agent, whether a corresponding client user exists in the remote server;
  • a certificate obtaining device configured to obtain a user identity certificate of the client user according to the user identifier and the user agent when a corresponding client user exists in the remote server;
  • a certificate generating device configured to generate a user identity certificate of a new client user according to the user identifier and the user agent in the remote server when the corresponding client user does not exist in the remote server;
  • a first returning device configured to return the user identity certificate outputted by the certification obtaining device or the certification generating device to the application server.
  • the application server may further include: a user agent obtaining means, configured to be a cookie before the first querying device performs the query operation When the user's online behavior information exists, the latest user agent is obtained according to the user identity certificate in the cookie.
  • the user agent obtaining apparatus may further include:
  • a second cache lookup module configured to query, according to the user identity certificate in the cookie, whether the corresponding client user exists in the local cache of the application server;
  • a second obtaining module configured to obtain local cache user information of the application server according to a local cache query result of the application server, where the local cache user information of the application server includes a user agent;
  • a local matching module configured to match a user agent in the local cache user information of the application server with a user agent in the online behavior information of the user, and if the matching is successful, the user in the local cache user information of the application server
  • the agent acts as the latest user agent; if the match fails, the user agent in the locally cached user information of the application server is updated according to the user agent in the user's online behavior information;
  • a second query requesting module configured to send a second query request to the remote server when the cache hit fails
  • the remote server includes:
  • a second remote search device configured to: when the cache hit fails, query the identification information of the corresponding client user in the remote server according to the user identity certificate in the cookie, and obtain remote storage user information according to the query result, where the remote storage user
  • the information includes a user agent
  • a remote matching device configured to match a user agent in the remote storage user information with a user agent in the user online behavior information, and if the matching is successful, use the user agent in the remote storage user information as the latest a user agent; if the matching fails, updating the user agent in the remote storage user information according to the user agent in the user online behavior information; and the second returning device is configured to output the latest information of the remote matching device User agent, returned to the application server.
  • the application server may further include: an association storage device, configured to be in the application server end in the presence of the user identity certificate
  • an association storage device configured to be in the application server end in the presence of the user identity certificate
  • the user identity certificate, the user identity, and the current user agent are stored in association.
  • the present application also provides a computer readable recording medium on which a program for performing the above-described method of network user identification is recorded.
  • a program for performing the above-described method of network user identification is recorded.
  • the computer readable recording medium includes any mechanism for storing or transmitting information in a form readable by a computer (e.g., a computer).
  • a machine-readable medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium, an optical storage medium, a flash storage medium, an electrical, optical, acoustic, or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.).
  • This application can be used in a variety of general purpose or special purpose computing system environments or configurations.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.
  • component refers to related entities applied to a computer, such as hardware, a combination of hardware and software, software or software in execution, etc.
  • a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable component, a thread of execution, a program, and/or a computer.

Landscapes

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

Abstract

The present invention provides a network user identification method and an application server thereof. The method specifically comprises: when a cookie does not exist in user network-accessing behavior information of a corresponding client user, obtaining a corresponding user identity through query according to a user identifier and a user agent of the corresponding client user; recovering the corresponding cookie according to the user identity; and obtaining the information of the corresponding client user through identification according to the user identity in the recovered cookie. The present invention can improve user identification accuracy under the condition that the cookie is deleted.

Description

说 明 书 一种网络用户识别的方法及其应用服务器 技术领域  Method for network user identification and application server thereof
本申请涉及网络通信技术领域,特别是涉及一种网络用户识别的方法及 其应用服务器。 背景技术  The present application relates to the field of network communication technologies, and in particular, to a method for network user identification and an application server thereof. Background technique
目前, 互联网规模和覆盖面的迅速增长带来了信息超载问题: 过量信息 而降低。 为了降低用户享用信息的成本, 需要向用户推荐所需要的信息。 其 中, 向用户推荐信息的第一步就是识别用户, 因为只有识别了每个用户, 才 能进一步根据用户以往行为, 进行挖掘、 计算和推荐信息。  At present, the rapid growth of Internet scale and coverage has brought about information overload problems: excessive information and reduced. In order to reduce the cost of the user's enjoyment of information, it is necessary to recommend the required information to the user. Among them, the first step in recommending information to the user is to identify the user, because only each user is identified, and the information can be further mined, calculated, and recommended based on the user's past behavior.
以网站为例, 在识别了每个用户后, 不但能够更加清晰地了解到底有多 少用户访问了网站, 分辨他们是谁 (用户 ID、 邮箱、 性别年龄等); 同时也能 够更好地跟踪这些用户,发现他们的行为特征、兴趣爱好及个性化的设置等, 以便于更好地把握用户需求, 提升用户体验。  Taking the website as an example, after identifying each user, it is not only clearer how many users have visited the website, but also who they are (user ID, email, gender age, etc.); Users, find their behavior characteristics, hobbies and personalized settings, in order to better grasp the user needs and enhance the user experience.
现有技术一种典型的用户识别方法是基于 cookie (用于存储用户私有信 息的小文本文件)的用户识别。当通过自定义 Apache日志格式或者 JavaScript 的方法获得用户 cookie 时, 其实已经找到了一个非常有效的用户识别的手 段。 cookie在未被清除的前提下可以认为是跟某个访问客户端电脑绑定的, 所以基于 cookie的用户识别的准确度比较高。  A typical user identification method of the prior art is user identification based on a cookie (a small text file for storing user private information). When user cookies are obtained by customizing the Apache log format or JavaScript, a very effective means of user identification has been found. The cookie can be considered to be bound to a certain access client computer without being cleared, so the accuracy of cookie-based user identification is relatively high.
但是, 基于 cookie 的用户识别当然也存在缺陷, 由于浏览器会自动把 cookie保存到客户端本地对应的某个目录下, 所以最常见的缺陷就是 cookie 被客户端用户删除而导致客户端用户无法与原先记录实现对应; 同时由于客 户端电脑会被共用, 或者客户端用户会在不同的电脑上访问网站, 这个时候 cookie就无法直接对应到该客户端用户。  However, cookie-based user identification is of course also flawed. Because the browser automatically saves the cookie to a local directory corresponding to the client, the most common defect is that the cookie is deleted by the client user and the client user cannot The original record implementation corresponds; at the same time, because the client computer will be shared, or the client user will access the website on different computers, the cookie cannot directly correspond to the client user.
总之, 需要本领域技术人员迫切解决的一个技术问题就是: 如何能够在 cookie被删除的情况下, 实现较高精度的用户识别。 发明内容 In summary, a technical problem that needs to be solved urgently by those skilled in the art is: How to achieve higher-precision user identification in the case where a cookie is deleted. Summary of the invention
本申请所要解决的技术问题是提供一种网络用户识别的方法、一种应用 服务器, 能够在 cookie被删除的情况下, 提高用户识别的准确度。 为了解决上述问题, 本申请公开了一种网络用户识别的方法, 包括如下 步骤:  The technical problem to be solved by the present application is to provide a method for network user identification and an application server, which can improve the accuracy of user identification when a cookie is deleted. In order to solve the above problem, the present application discloses a method for network user identification, including the following steps:
当 cookie在相应客户端用户的用户上网行为信息中不存在时,依据相应 客户端用户的用户标识和用户代理, 查询得到相应的用户身份证明;  When the cookie does not exist in the online behavior information of the user of the corresponding client user, the corresponding user identity certificate is obtained according to the user identifier and the user agent of the corresponding client user;
依据所述用户身份证明恢复相应的 cookie;  Recovering the corresponding cookie according to the user identity certificate;
依据所述恢复后 cookie中的用户身份证明,识别得到相应客户端用户的 信息。  According to the user identity certificate in the recovered cookie, the information of the corresponding client user is identified.
优选的, 所述依据相应客户端用户的用户标识和用户代理, 查询得到相 应的用户身份证明的步骤, 具体包括:  Preferably, the step of querying the corresponding user identity certificate according to the user identifier and the user agent of the corresponding client user includes:
依据用户标识和用户代理,在应用服务器的本地緩存中查询是否存在相 应的客户端用户;  Query whether there is a corresponding client user in the local cache of the application server according to the user identifier and the user agent;
在緩存命中成功时,依据所述用户标识和用户代理获取该客户端用户的 用户身份证明;  When the cache hit succeeds, obtaining the user identity certificate of the client user according to the user identifier and the user agent;
在緩存命中失败时,依据所述用户标识和用户代理在远程服务器中查询 是否存在相应的客户端用户;  When the cache hit fails, according to the user identifier and the user agent, the remote server is queried whether there is a corresponding client user;
在远程服务器中存在相应的客户端用户时,依据所述用户标识和用户代 理获取该客户端用户的用户身份证明;  When a corresponding client user exists in the remote server, the user identity of the client user is obtained according to the user identifier and the user agent;
在远程服务器中不存在相应的客户端用户时,在远程服务器中依据所述 用户标识和用户代理产生一个新客户端用户的用户身份证明。  When there is no corresponding client user in the remote server, a new client user's user identity is generated in the remote server according to the user identity and the user agent.
优选的,在所述当 cookie在相应客户端用户的用户上网行为信息中不存 在时, 依据相应客户端用户的用户标识和用户代理, 查询得到相应的用户身 份证明的步骤之前, 所述方法还包括:  Preferably, before the step of obtaining the corresponding user identity certificate according to the user identifier and the user agent of the corresponding client user, when the cookie does not exist in the online behavior information of the user of the corresponding client user, the method further Includes:
当 cookie在所述用户上网行为信息中存在时, 依据 cookie中的用户身 份证明获取最新的用户代理。 优选的, 所述依据 cookie 中的用户身份证明获取最新的用户代理的步 骤, 包括: When the cookie exists in the user's online behavior information, the latest user agent is obtained according to the user identity certificate in the cookie. Preferably, the step of obtaining the latest user agent according to the user identity certificate in the cookie includes:
依据 cookie 中的用户身份证明在应用服务器的本地緩存中查询是否存 在相应的客户端用户;  Query whether the corresponding client user exists in the local cache of the application server according to the user identity certificate in the cookie;
在緩存命中成功时,依据应用服务器的本地緩存查询结果获取应用服务 器的本地緩存用户信息, 所述应用服务器的本地緩存用户信息中包括有用户 代理;  When the cache hit succeeds, the local cache user information of the application server is obtained according to the local cache query result of the application server, where the local cache user information of the application server includes a user agent;
将应用服务器的本地緩存用户信息中的用户代理与所述用户上网行为 信息中的用户代理进行匹配, 若匹配成功, 则以所述应用服务器的本地緩存 用户信息中的用户代理作为最新的用户代理; 若匹配失败, 则依据所述用户 上网行为信息中的用户代理对所述应用服务器的本地緩存用户信息中的用 户代理进行更新;  Matching the user agent in the local cache user information of the application server with the user agent in the user's online behavior information. If the matching is successful, the user agent in the locally cached user information of the application server is used as the latest user agent. If the matching fails, updating the user agent in the locally cached user information of the application server according to the user agent in the online behavior information of the user;
在緩存命中失败时,依据 cookie中的用户身份证明在远程服务器中查询 相应的客户端用户的识别信息, 并依据查询结果获取远程存储用户信息, 所 述远程存储用户信息中包括有用户代理;  When the cache hit fails, the identification information of the corresponding client user is queried in the remote server according to the user identity certificate in the cookie, and the remote storage user information is obtained according to the query result, where the remote storage user information includes the user agent;
将所述远程存储用户信息中的用户代理与所述用户上网行为信息中的 用户代理进行匹配, 若匹配成功, 则以所述远程存储用户信息中的用户代理 作为最新的用户代理; 若匹配失败, 则依据所述用户上网行为信息中的用户 代理对所述远程存储用户信息中的用户代理进行更新。  Matching the user agent in the remote storage user information with the user agent in the online behavior information of the user, and if the matching is successful, using the user agent in the remote storage user information as the latest user agent; if the matching fails And updating the user agent in the remote storage user information according to the user agent in the user online behavior information.
优选的, 所述方法还包括:  Preferably, the method further includes:
在用户身份证明存在的情况下,在应用服务器端和 /或远程服务器端对所 述用户身份证明、 用户标识和当前用户代理进行关联存储。  The user identity, the user identity, and the current user agent are stored in association on the application server side and/or the remote server side in the presence of the user identity certificate.
优选的, 所述用户标识包括: 网络用户名, 和 /或, 专线用户的用户 IP 地址。 另一方面, 本申请还公开了一种应用服务器, 包括:  Preferably, the user identifier comprises: a network user name, and/or a user IP address of the dedicated line user. In another aspect, the application also discloses an application server, including:
第一查询装置,用于当 cookie在相应客户端用户的用户上网行为信息中 不存在时, 依据相应客户端用户的用户标识和用户代理, 查询得到相应的用 户身份证明; The first querying device is configured to: when the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user identifier of the corresponding client user and the user agent, the query is used accordingly Household identification certificate;
恢复装置, 用于依据所述用户身份证明恢复相应的 cookie;  a recovery device, configured to restore a corresponding cookie according to the user identity certificate;
识别装置, 用于依据所述恢复后 cookie中的用户身份证明,识别得到相 应客户端用户的信息。  The identifying means is configured to identify the information of the corresponding client user according to the user identity certificate in the restored cookie.
优选的, 所述第一查询装置, 包括:  Preferably, the first query device includes:
第一緩存查找模块,用于依据用户标识和用户代理在应用服务器的本地 緩存中查询是否存在相应的客户端用户;  a first cache searching module, configured to query, according to the user identifier and the user agent, whether the corresponding client user exists in the local cache of the application server;
第一获取模块, 用于在緩存命中成功时, 依据所述用户标识和用户代理 获取该客户端用户的用户身份证明;  a first obtaining module, configured to acquire, according to the user identifier and the user agent, a user identity certificate of the client user when the cache hit succeeds;
第一查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第一查 询请求;  a first query requesting module, configured to send a first query request to the remote server when the cache hit fails;
所述远程服务器包括:  The remote server includes:
第一远程查询装置, 用于依据所述第一查询请求, 通过所述用户标识和 用户代理在远程服务器中查询是否存在相应的客户端用户;  a first remote querying device, configured to query, according to the first query request, by the user identifier and the user agent, whether a corresponding client user exists in the remote server;
证明获取装置, 用于在远程服务器中存在相应的客户端用户时, 依据所 述用户标识和用户代理获取该客户端用户的用户身份证明;  a certificate obtaining device, configured to obtain a user identity certificate of the client user according to the user identifier and the user agent when a corresponding client user exists in the remote server;
证明产生装置, 用于在远程服务器中不存在相应的客户端用户时, 在远 程服务器中依据所述用户标识和用户代理产生一个新客户端用户的用户身 份证明;  a certificate generating device, configured to generate a user identity certificate of a new client user according to the user identifier and the user agent in the remote server when the corresponding client user does not exist in the remote server;
第一返回装置, 用于将所述证明获取装置或证明产生装置输出的用户身 份证明, 返回给所述应用服务器。  And a first returning device, configured to return the user identity certificate outputted by the certification obtaining device or the certification generating device to the application server.
优选的, 所述应用服务器还包括:  Preferably, the application server further includes:
用户代理获取装置, 用于在第一查询装置执行查询操作前, 当 cookie 在所述用户上网行为信息中存在时,依据 cookie中的用户身份证明获取最新 的用户代理。  The user agent obtaining means is configured to obtain the latest user agent according to the user identity certificate in the cookie when the cookie exists in the online behavior information of the user before the first querying device performs the query operation.
优选的, 所述用户代理获取装置, 包括:  Preferably, the user agent obtaining device includes:
第二緩存查找模块,用于依据 cookie中的用户身份证明在应用服务器的 本地緩存中查询是否存在相应的客户端用户; 第二获取模块, 用于在緩存命中成功时, 依据应用服务器的本地緩存查 询结果获取应用服务器的本地緩存用户信息, 所述应用服务器的本地緩存用 户信息中包括有用户代理; a second cache lookup module, configured to query, in the local cache of the application server, whether a corresponding client user exists according to the user identity certificate in the cookie; a second obtaining module, configured to obtain local cache user information of the application server according to the local cache query result of the application server, where the local cache user information of the application server includes a user agent;
本地匹配模块, 用于将应用服务器的本地緩存用户信息中的用户代理与 所述用户上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述应用 服务器的本地緩存用户信息中的用户代理作为最新的用户代理; 若匹配失 败, 则依据所述用户上网行为信息中的用户代理对所述应用服务器的本地緩 存用户信息中的用户代理进行更新;  a local matching module, configured to match a user agent in the local cache user information of the application server with a user agent in the online behavior information of the user, and if the matching is successful, the user in the local cache user information of the application server The agent acts as the latest user agent; if the match fails, the user agent in the locally cached user information of the application server is updated according to the user agent in the user's online behavior information;
第二查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第二查 询请求;  a second query requesting module, configured to send a second query request to the remote server when the cache hit fails;
所述远程服务器包括:  The remote server includes:
第二远程查找装置, 用于在緩存命中失败时,依据 cookie中的用户身份 证明在远程服务器中查询相应的客户端用户的识别信息, 并依据查询结果获 取远程存储用户信息, 所述远程存储用户信息中包括有用户代理;  a second remote search device, configured to: when the cache hit fails, query the identification information of the corresponding client user in the remote server according to the user identity certificate in the cookie, and obtain remote storage user information according to the query result, where the remote storage user The information includes a user agent;
远程匹配装置, 用于将所述远程存储用户信息中的用户代理与所述用户 上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述远程存储用户 信息中的用户代理作为最新的用户代理; 若匹配失败, 则依据所述用户上网 行为信息中的用户代理对所述远程存储用户信息中的用户代理进行更新; 第二返回装置, 用于将所述远程匹配装置输出的最新的用户代理, 返回 给所述应用服务器。  a remote matching device, configured to match a user agent in the remote storage user information with a user agent in the user online behavior information, and if the matching is successful, use the user agent in the remote storage user information as the latest a user agent; if the matching fails, updating the user agent in the remote storage user information according to the user agent in the user online behavior information; and the second returning device is configured to output the latest information of the remote matching device User agent, returned to the application server.
优选的, 所述应用服务器还包括:  Preferably, the application server further includes:
关联存储装置, 用于在用户身份证明存在的情况下, 在应用服务器端对 所述用户身份证明、 用户标识和当前用户代理进行关联存储。  The association storage device is configured to store the user identity certificate, the user identifier, and the current user agent on the application server side in the presence of the user identity certificate.
优选的, 所述用户标识包括: 网络用户名, 和 /或, 专线用户的用户 IP。 本申请还提供了一种在其上记录有用于执行上述网络用户识别的方法 的程序的计算机可读记录介质。 与现有技术相比, 本申请具有以下优点: Preferably, the user identifier comprises: a network user name, and/or a user IP of the leased line user. The present application also provides a computer readable recording medium on which a program for performing the above-described method of network user identification is recorded. Compared with the prior art, the present application has the following advantages:
本申请在 cookie被删除的情况下,首先依据用户标识和用户代理恢复被 删除的 cookie, 然后依据所述恢复后 cookie中的用户身份证明, 识别得到相 应客户端用户的信息; 由于基于 cookie的用户识别的准确度高于基于 IP+用 户代理的用户识别的准确度, 故本申请能够在 cookie被删除的情况下,提高 用户识别的准确度;  In the case where the cookie is deleted, the application first recovers the deleted cookie according to the user identifier and the user agent, and then identifies the information of the corresponding client user according to the user identity certificate in the restored cookie; The accuracy of the identification is higher than the accuracy of the user identification based on the IP+ user agent, so the application can improve the accuracy of the user identification in the case where the cookie is deleted;
其次,由于本申请能够克服现有技术中 cookie删除问题带来的用户识别 准确度欠高的问题, 精准定位和跟踪基于客户端的用户; 这样, 能够进一步 依据识别结果, 为用户推荐最有效和价值信息, 从而能够解决用户信息过载 问题, 降低用户享用信息成本;  Secondly, since the application can overcome the problem of low user identification accuracy caused by the cookie deletion problem in the prior art, accurately locate and track the client-based user; thus, the user can further recommend the most effective and valuable value according to the recognition result. Information, which can solve the problem of user information overload and reduce the cost of users enjoying information;
再者, 本申请还能依据 cookie中的用户身份证明获取最新的用户代理, 并依据相应客户端用户的用户标识和最新的用户代理查询得到相应的用户 身份证明, 以避免用户代理发生变化对 cookie恢复的影响,从而能够进一步 提高用户识别的准确度。 附图说明  Furthermore, the application can also obtain the latest user agent according to the user identity certificate in the cookie, and obtain the corresponding user identity certificate according to the user identifier of the corresponding client user and the latest user agent query, so as to avoid the user agent changing the cookie. The impact of recovery can further improve the accuracy of user identification. DRAWINGS
图 1是本申请一种网络用户识别的方法实施例 1的流程图;  1 is a flowchart of Embodiment 1 of a method for network user identification according to the present application;
图 2是本申请一种远程服务器基于用户标识和用户代理进行查询的流程 图;  2 is a flow chart of a remote server querying based on a user identifier and a user agent according to the present application;
图 3是本申请一种网络用户识别的方法实施例 2的流程图;  3 is a flowchart of Embodiment 2 of a method for network user identification according to the present application;
图 4是本申请一种远程服务器基于 cookie中用户身份证明进行查询的流 程图;  4 is a flow chart of a remote server querying based on a user identity certificate in a cookie;
图 5是本申请一种用户识别时序图示例;  FIG. 5 is an example of a user identification timing chart of the present application; FIG.
图 6是本申请一种客户端 6A和应用服务器 6B的交互示意图; 图 7是本申请一种应用服务器实施例的结构图。 具体实施方式  FIG. 6 is a schematic diagram of interaction between a client 6A and an application server 6B according to the present application; FIG. 7 is a structural diagram of an application server embodiment of the present application. detailed description
为使本申请的上述目的、 特征和优点能够更加明显易懂, 下面结合附图 和具体实施方式对本申请作进一步详细的说明。 本申请实施例的核心构思之一在于,在客户端用户 cookie被删除的情况 下, 在应用服务器端依据用户标识和用户代理恢复被删除的 cookie; 具体而 言, 当 cookie在相应客户端用户的用户上网行为信息中不存在时, 首先依据 相应客户端用户的用户标识和用户代理,在应用服务器端查询得到相应的用 户身份证明 (UID, User Identification ), 然后依据所述用户身份证明恢复相 应的 cookie, 最后依据所述恢复后 cookie中的用户身份证明, 识别得到相应 客户端用户的信息。 这样, 本申请能够在 cookie被删除的情况下, 提高用户 识别的准确度。 The above described objects, features and advantages of the present application will become more apparent and understood. One of the core concepts of the embodiment of the present application is that, in the case that the client user cookie is deleted, the deleted cookie is restored on the application server according to the user identifier and the user agent; specifically, when the cookie is in the corresponding client user When the user's online behavior information does not exist, firstly, according to the user identifier and the user agent of the corresponding client user, the corresponding server user identification (UID, User Identification) is obtained, and then the corresponding user identity certificate is restored according to the user identity certificate. The cookie finally identifies the information of the corresponding client user according to the user identity certificate in the restored cookie. Thus, the present application can improve the accuracy of user identification in the case where the cookie is deleted.
首先, 关于 cookie的起源进行一个简单的介绍。 某些网站为了辨别用户 身份、 进行 session (会话)跟踪, 故利用 cookie在客户端上储存用户私有 信息 (通常经过加密); 其中, cookie 中最重要的用户私有信息就是作为用 户唯一标识的用户身份证明。  First, a brief introduction to the origin of cookies. In order to identify the user and perform session (session) tracking, some websites use cookies to store user private information (usually encrypted) on the client; wherein the most important user private information in the cookie is the user identity that is uniquely identified by the user. prove.
在实际中, 在客户端用户首次访问网站的应用服务器时, 应用服务器会 针对该客户端用户分配一个独一无二的用户身份证明, 并依据该用户身份证 明生成 cookie, 然后在响应消息中将 cookie传递给客户端用户。 浏览器会自 动把 cookie保存到本地对应的某个目录下。 这样, 只需在后续的每次访问请 求中把 cookie传递给应用服务器, 应用服务器就能够依据 cookie中的用户 身份证明知道这次访问请求是哪个客户端用户发送的。  In practice, when the client user first accesses the application server of the website, the application server assigns a unique user identity to the client user, generates a cookie according to the user identity certificate, and then passes the cookie to the response message. Client user. The browser will automatically save the cookie to a local directory. In this way, the cookie can be passed to the application server in each subsequent access request, and the application server can know which client user the access request was sent based on the user identity in the cookie.
下面通过较优实施例具体介绍本申请的技术方案, 需要说明的是, 较 优实施例并不应理解为对本申请的限制。 另外, 在附图的流程图示出的步 骤可以在诸如一组计算机可执行指令的计算机系统中执行, 并且, 虽然在 流程图中示出了逻辑顺序, 但是在某些情况下, 可以以不同于此处的顺序 执行所示出或描述的步骤。 参照图 1 , 示出了本申请一种网络用户识别的方法实施例 1的流程图, 具体可以包括:  The technical solutions of the present application are specifically described below through the preferred embodiments. It should be noted that the preferred embodiments are not to be construed as limiting the present application. Additionally, the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although the logical order is illustrated in the flowchart, in some cases, may be different The steps shown or described are performed in the order herein. Referring to FIG. 1 , a flowchart of Embodiment 1 of a method for network user identification according to the present application is shown, which may specifically include:
步骤 101、当 cookie在相应客户端用户的用户上网行为信息中不存在时, 依据相应客户端用户的用户标识和用户代理, 查询得到相应的用户身份证 明。 Step 101: When the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user identifier of the corresponding client user and the user agent, the corresponding user ID is obtained. Bright.
具体地, 应用服务器在接收到客户端用户的访问请求时, 可以依据用户 访问请求中的报文数据, 解析得到相应的用户上网行为信息, 其中, 所述用 户上网行为信息通常可以包括用户 IP( user— ip )、用户代理( UA, User Agent )、 cookie、 访问网站域名 ( host )、 访问网站页面信息 (统一资源定位符 )和 / 或用户上次来源 (referer )。  Specifically, the application server may, according to the packet data in the user access request, parse the online behavior information of the user according to the packet data in the user access request, where the user online behavior information may generally include the user IP ( User—ip), User Agent (UA, User Agent), cookie, access to website domain (host), access to website page information (Uniform Resource Locator), and/or user's last referee.
其中, 用户代理是指能够帮助服务器识别其客户端用户的操作系统及版 本、 CPU 类型、 浏览器及版本、 浏览器渲染引擎、 浏览器语言、 浏览器插 件等的信息。  User agents are information that helps the server identify the operating system and version of its client, CPU type, browser and version, browser rendering engine, browser language, browser plug-in, and so on.
如果应用服务器解析的用户上网行为信息中不存在 cookie, 则认为报文 数据中没有携带 cookie, 此时, 一种可能性是用户的 cookie被客户端用户删 除, 还有一种可能性是该客户端用户的身份是新用户或者首次访问该网站。 此时, 可以应用本申请对该客户端用户的身份进行识别, 进一步恢复用户和 产生新用户。  If there is no cookie in the user's online behavior information parsed by the application server, it is considered that the cookie data does not carry the cookie. At this time, one possibility is that the user's cookie is deleted by the client user, and another possibility is that the client The user's identity is a new user or the first time the site is accessed. At this time, the identity of the client user can be identified by applying the present application, further recovering the user and generating a new user.
对于一个上网用户而言, 其用户标识是唯一的, 且不发生变化的。 具体 地, 在实际中, 对于专线用户的用户标识而言, 由于其用户 IP地址是固定 的, 不发生变化的, 能够标识唯一的用户, 故此时用户 IP地址可以作为客 户端用户的用户标识。对于 ADSL(非对称数字用户环路, Asymmetric Digital Subscriber Line )等非专线用户而言, 由于 IP是动态的, 无法进行唯一标示, 而 ADSL的账号网络用户名 (user— name ) 固定不变, 且能够标识唯一的用 户, 故此时, ADSL的账号网络用户名可以作为客户端用户的用户标识。  For an Internet user, its user ID is unique and does not change. Specifically, in practice, the user ID of the private line user can be used as the user identifier of the client user because the user IP address is fixed and does not change, and the unique user can be identified. For non-dedicated users such as ADSL (Asymmetric Digital Subscriber Line), since the IP is dynamic, it cannot be uniquely marked, and the ADSL account network user name (user_name) is fixed, and The unique user can be identified, so at this time, the ADSL account network user name can be used as the user identifier of the client user.
在实际中, 在接收到客户端用户的上网请求时, AAA (验证、 授权和记 贝长, Authentication, Authorization, Accounting )服务器会生成相应的计费 报文; 而应用服务器在接收到所述计费报文后, 可以根据所述计费报文, 解 析得到相应的用户基本信息, 所述用户基本信息具体可以包括网络用户名 (即 ADSL的账号网络用户名 )和 /或用户 IP地址。  In practice, when receiving the Internet access request from the client user, the AAA (Authentication, Authorization, Accounting, Accounting) server generates a corresponding accounting message; and the application server receives the accounting After the fee packet, the user basic information may be parsed according to the billing message, and the user basic information may specifically include a network user name (ie, an ADSL account network user name) and/or a user IP address.
在某些情况下, 应用服务器可以针对客户端用户, 直接从所述用户基本 信息中获取网络用户名或用户 IP作为用户标识, 以及从所述用户上网行为 信息中获取用户代理, 然后, 依据相应的用户标识和用户代理, 在应用服务 器端查询得到相应的用户身份证明即可。 In some cases, the application server may obtain the network user name or user IP as the user identifier directly from the user basic information for the client user, and access the online behavior from the user. The user agent is obtained from the information, and then, according to the corresponding user identifier and the user agent, the corresponding user identity certificate can be obtained by querying the application server.
此种情况下, 为了便于在线查询, 在本申请的一种优选实施例中, 可以 在离线情况下, 对所述用户身份证明、 用户标识和当前用户代理进行关联存 储, 相应地, 所述方法还可以包括:  In this case, in order to facilitate online query, in a preferred embodiment of the present application, the user identity certificate, the user identifier, and the current user agent may be stored in association in an offline situation, and correspondingly, the method It can also include:
在用户身份证明存在的情况下,在应用服务器和 /或远程服务器端对所述 用户身份证明、 用户标识和当前用户代理进行关联存储。  In the case where the user identity exists, the user identity, the user identity, and the current user agent are stored in association at the application server and/or the remote server.
这样, 只需以用户标识与当前用户代理的组合关键字, 在应用服务器和 /或远程服务器端的数据库中进行查询匹配即可查询到用户身份证明。  In this way, the user identification can be queried by performing a query matching in the application server and/or the remote server-side database by using the combined keyword of the user identifier and the current user agent.
在某些特殊情况下,应用服务器可能无法直接获取网络用户名和用户代 理, 则需要依据用户 IP 关联, 查找到网络用户名和用户代理, 然后, 依据 相应的用户标识和用户代理查询得到相应的用户身份证明即可。  In some special cases, the application server may not be able to directly obtain the network user name and user agent. Then, according to the user IP association, the network user name and user agent need to be found, and then the corresponding user identity is obtained according to the corresponding user identifier and user agent query. Proof can be.
此种情况下, 为了便于在线查询, 在本申请的一种优选实施例中, 还可 以在离线情况下, 对所述用户身份证明、 用户标识和当前用户代理进行关联 存储, 所述方法还可以包括:  In this case, in order to facilitate the online query, in a preferred embodiment of the present application, the user identity certificate, the user identifier, and the current user agent may be associated and stored in an offline situation, and the method may also be performed. Includes:
在用户身份证明存在的情况下,在应用服务器和 /或远程服务器端对所述 用户 IP、 用户身份证明、 用户标识和当前用户代理进行关联存储。  In the case where the user identity exists, the user IP, the user identity, the user identity, and the current user agent are stored in association at the application server and/or the remote server.
如下示出了此种情况下一种存储结构的示例:  An example of a storage structure in this case is shown below:
typedef struct user— identification— info— s  Typedef struct user— identification— info— s
{  {
char user_name[USER_NAME_MAX_LEN] ;/*网络用户名 */ char UA[UA— MAX— LEN];/*UA*/  Char user_name[USER_NAME_MAX_LEN] ;/*network username */ char UA[UA— MAX— LEN];/*UA*/
unsigned int user— ip;/*用户 ip*/  Unsigned int user— ip;/*user ip*/
unsigned long long user— id;/*UID*/  Unsigned long long user— id;/*UID*/
} user— identification— info— t; 在本申请一种优选实施例中, 所述步骤 101可以进一步包括: 当 cookie在相应客户端用户的用户上网行为信息中不存在时,依据用户 标识和用户代理,在应用服务器的本地緩存中查询是否存在相应的客户端用 户, 若緩存命中成功, 则依据所述用户标识和用户代理获取该客户端用户的 用户身份证明。 In a preferred embodiment of the present application, the step 101 may further include: when the cookie does not exist in the online behavior information of the user of the corresponding client user, according to the user The identifier and the user agent query whether the corresponding client user exists in the local cache of the application server. If the cache hit succeeds, the user identity of the client user is obtained according to the user identifier and the user agent.
需要说明的是, 应用服务器的本地緩存仅保留近期的数据, 例如仅保留 It should be noted that the local cache of the application server only retains recent data, such as retaining only
1天或 2天的数据, 也可以仅保留当前正在上网的, 在线的用户数据; 而其 余历史数据均保存在远程服务器中, 例如当前已断网离线的用户。 The data of 1 day or 2 days can also retain only the online user data that is currently online, and the rest of the historical data is stored in the remote server, for example, the user who is currently offline.
本优选实施例在应用服务器的本地緩存进行查找基于用户标识和用户 代理的客户端用户, 如果能查找到, 则表明该客户端用户近期出现在应用服 务器中, 于是, 可以获取作为用户唯一标志的用户身份证明 (用户身份证明 在 cookie信息中, 作为 cookie内容一部分信息), 同时也证明该客户端用户 删除了 cookie信息, 需要进一步恢复 cookie。 在本申请的另一种优选实施例中, 所述依据相应客户端用户的用户标识 和用户代理查询得到相应的用户身份证明的步骤, 还可以包括:  The preferred embodiment searches the local cache of the application server for the client user based on the user identifier and the user agent. If it can be found, it indicates that the client user recently appears in the application server, and thus can obtain the unique identifier as the user. The user identification (the user identification in the cookie information, as part of the cookie content), also proves that the client user deleted the cookie information and needs to further restore the cookie. In another preferred embodiment of the present application, the step of obtaining the corresponding user identity certificate according to the user identifier of the corresponding client user and the user agent query may further include:
在緩存命中失败时,依据所述用户标识和用户代理在远程服务器中查询 是否存在相应的客户端用户; 需要说明的是, 在緩存命中失败, 也即当应用 服务器的本地緩存中查找不到时,表示客户端用户近期没有出现该应用服务 器中, 因此需要去远程服务器的历史数据中查询;  When the cache hit fails, the user identifier and the user agent are queried according to the user identifier to check whether there is a corresponding client user; it should be noted that when the cache hit fails, that is, when the application server's local cache cannot be found. , indicating that the client user has not appeared in the application server recently, so it is necessary to query the historical data of the remote server;
在远程服务器中存在相应的客户端用户时,依据所述用户标识和用户代 理获取该客户端用户的用户身份证明; 也即, 在远程服务器中不存在相应的 客户端用户时,在远程服务器中依据所述用户标识和用户代理产生一个新客 户端用户的用户身份证明。  When a corresponding client user exists in the remote server, the user identity of the client user is obtained according to the user identifier and the user agent; that is, when there is no corresponding client user in the remote server, in the remote server A user identity certificate of a new client user is generated according to the user identifier and the user agent.
在实际应用中, 还会依据该用户身份证明生成 cookie, 然后在响应消息 中将 cookie传递给应用服务器。  In the actual application, a cookie is generated based on the user identity and then the cookie is passed to the application server in the response message.
在具体实现中,所述远程服务器可以包括 UDC(用户数据中心, user data center )。 例如, 可以在 UDC的数据库中基于网络用户名和用户代理查找相 应的客户端用户, 如果查找到, 则获取用户信息 【网络用户名、 用户代理、 user— ip和用户身份证明】, 并将用户身份证明反馈给应用服务器, 同时也说 明该客户端用户删除了 cookie信息, 需要进一步恢复用户 cookie; 如果没有 查找到, 则说明该客户端用户是新用户, 第一次访问应用服务器, 于是, 会 分配一个全局唯一标识一个用户的用户身份证明, 并初始化用户信息【网络 用户名、 用户代理、 user— ip和用户身份证明】, 同时将用户身份证明反馈给 应用服务器。 In a specific implementation, the remote server may include a UDC (user data center). For example, the corresponding client user can be found in the UDC database based on the network user name and the user agent, and if found, the user information [network user name, user agent, user-ip, and user identity certificate] is obtained, and the user identity is obtained. Prove feedback to the application server, also said If the client user deletes the cookie information, the user's cookie needs to be further restored. If it is not found, the client user is a new user, and the application server is accessed for the first time. Therefore, a user who globally uniquely identifies a user is assigned. The identity certificate, and initialize the user information [network user name, user agent, user-ip and user identity certificate], and feed the user identity certificate to the application server.
参照图 2, 示出了本申请一种远程服务器基于用户标识和用户代理进行 查询的流程图, 具体可以包括:  Referring to FIG. 2, a flow chart of a remote server based on a user identifier and a user agent is performed, which may specifically include:
步骤 201、 接收来自应用服务器的适配消息, 所述适配消息中包括有网 络用户名和用户代理;  Step 201: Receive an adaptation message from an application server, where the adaptation message includes a network user name and a user agent.
步骤 202、 基于网络用户名和用户代理在数据库中查询是否存在相应的 客户端用户, 若是, 则执行步骤 203; 否则, 执行步骤 204;  Step 202: Query whether there is a corresponding client user in the database based on the network user name and the user agent, and if yes, go to step 203; otherwise, go to step 204;
步骤 203、 获取用户信息: 网络用户名、 用户代理、 cookie, 并转向步 骤 206;  Step 203: Obtain user information: a network user name, a user agent, a cookie, and go to step 206;
客户端用户存在时, 说明该客户端用户已经进入到应用服务器内部, 用 户 cookie被删除, 于是可以通过网络用户名和用户代理来恢复 cookie。  When the client user exists, it indicates that the client user has entered the application server, the user cookie is deleted, and the cookie can be recovered through the network user name and the user agent.
步骤 204、 根据网络用户名和用户代理, 在数据库中产生用户唯一标识 用户身份证明;  Step 204: Generate, according to the network user name and the user agent, a user unique identifier user identity certificate in the database;
步骤 205、 在数据库的用户表项中填充网络用户名、 用户代理、 cookie, 并转向步骤 206;  Step 205, filling the network user name, user agent, cookie in the user table entry of the database, and proceeds to step 206;
步骤 206、 将 cookie中的用户身份证明返回给应用服务器。 步骤 102、 依据所述用户身份证明恢复相应的 cookie;  Step 206: Return the user identity certificate in the cookie to the application server. Step 102: Restore a corresponding cookie according to the user identity certificate;
在具体实现中,所述依据所述用户身份证明恢复相应的 cookie的步骤可 以为, 应用服务器依据用户身份证明生成相应的 cookie, 并种植到客户端。 这样, 当客户端用户当用户再次访问应用服务器时, 会携带 cookie信息, 使 得应用服务器知道这次访问请求是哪个客户端用户发送的。 其中, 所述种植 过程可以为,通过 P3P协议(隐私偏好平台, Platform for Privacy Preferences ) 将 cookie存储在客户端的固定文本, 这里, P3P是允许网络站点来宣告它们 收集的关于浏览用户他们的意向使用的信息的一个协议。 步骤 103、 依据所述恢复后 cookie中的用户身份证明, 识别得到相应客 户端用户的信息。 In a specific implementation, the step of restoring the corresponding cookie according to the user identity certificate may be: the application server generates a corresponding cookie according to the user identity certificate, and grows the cookie to the client. In this way, when the client user accesses the application server again, the client user will carry the cookie information, so that the application server knows which client user sent the access request. The planting process may be: storing a cookie in a fixed text of a client through a P3P protocol (Private preference platform, Platform for Privacy Preferences), where P3P allows a network site to announce them. An agreement collected about browsing users' intent to use them. Step 103: Identify, according to the user identity certificate in the restored cookie, the information of the corresponding client user.
在实际中,作为识别结果的客户端用户的信息通常可以包括如下信息中 的一者或多者:  In practice, the information of the client user as a result of the identification may typically include one or more of the following information:
( 1 )用户识别信息:  (1) User identification information:
具体可以包括网络用户名、 用户 IP、 用户代理、 cookie等。  Specifically, it may include a network user name, a user IP, a user agent, a cookie, and the like.
( 2 )基 信息静态属性:  (2) Base information static attributes:
具体可以包括: 年龄、 教育程度、 薪资情况、 学校和职业等。  These can include: age, education, salary, school and occupation.
( 3 )动态信息:  (3) Dynamic information:
具体可以包括兴趣组、 投送广告状态等。  Specifically, it may include an interest group, a delivery advertisement status, and the like.
在实际应用中, 对于一个需要用户 ID注册登录的网站来说, 用户唯一 标识符的选择可以遵从以下顺序: 当用户注册登录时以用户 ID为准, 当用 户在未登录状态浏览时以用户的 cookie为准, 当用户未登录且 cookie被删 除的情况下使用本方法, 以提高用户识别的准确度。  In a practical application, for a website that requires a user ID to register and log in, the user unique identifier may be selected in the following order: When the user registers to log in, the user ID is taken as the user, and when the user browses in the unlogged state, the user's The cookie is used, and the method is used when the user is not logged in and the cookie is deleted, so as to improve the accuracy of the user identification.
虽然现有技术在 cookie被删除的情况下, 可以基于 IP+用户代理进行用 户识别, 但是由于 IP和用户代理均是不断变化的, 所以不能精准定位和识 别出用户, 导致识别的准确度欠高。 而本申请在 cookie被删除的情况下, 首 先依据用户标识和用户代理恢复被删除的 cookie , 然后依据所述恢复后 cookie中的用户身份证明,识别得到相应客户端用户的信息;由于基于 cookie 的用户识别的准确度高于基于 IP+用户代理的用户识别的准确度, 故本申请 能够在 cookie被删除的情况下, 提高用户识别的准确度。  Although the prior art can perform user identification based on the IP+ user agent in the case where the cookie is deleted, since the IP and the user agent are constantly changing, the user cannot be accurately located and identified, resulting in low accuracy of recognition. In the case where the cookie is deleted, the application first recovers the deleted cookie according to the user identifier and the user agent, and then identifies the information of the corresponding client user according to the user identity certificate in the restored cookie; The accuracy of the user identification is higher than the accuracy of the user identification based on the IP+ user agent, so the application can improve the accuracy of the user identification in the case where the cookie is deleted.
进一步,由于本申请能够克服现有技术中 cookie删除问题带来的用户识 别准确度欠高的问题, 精准定位和跟踪基于客户端的用户; 这样, 能够进一 步依据识别结果, 为用户推荐最有效和价值信息, 从而能够解决用户信息过 载问题, 降低用户享用信息成本。 参照图 3 , 示出了本申请一种网络用户识别的方法实施例 2的流程图, 具体可以包括: Further, since the application can overcome the problem of low user identification accuracy caused by the cookie deletion problem in the prior art, accurately locate and track the client-based user; thus, the user can further recommend the most effective and valuable value according to the recognition result. Information, which can solve the problem of user information overload and reduce the cost of users enjoying information. Referring to FIG. 3, a flowchart of Embodiment 2 of a method for network user identification according to the present application is shown, which may specifically include:
步骤 301、 当 cookie在所述用户上网行为信息中存在时, 依据 cookie中 的用户身份证明获取最新的用户代理;  Step 301: When a cookie exists in the online behavior information of the user, obtain the latest user agent according to the user identity certificate in the cookie;
步骤 302、当 cookie在相应客户端用户的用户上网行为信息中不存在时, 依据相应客户端用户的用户标识和最新的用户代理, 查询得到相应的用户身 份证明;  Step 302: When the cookie does not exist in the online behavior information of the user of the corresponding client user, the user identity certificate is obtained according to the user identifier of the corresponding client user and the latest user agent, and the corresponding user identity certificate is obtained;
步骤 303、 依据所述用户身份证明恢复相应的 cookie;  Step 303: Restore the corresponding cookie according to the user identity certificate;
步骤 304、 依据所述恢复后 cookie中的用户身份证明, 识别得到相应客 户端用户的信息。  Step 304: Identify, according to the user identity certificate in the restored cookie, the information of the corresponding client user.
由于用户代理表示浏览器信息、 插件信息、 操作系统信息等, 这样, 当 其中任何信息发生变化时, 用户代理内容都会发生变化, 比如版本升级, 安 装插件、 或插件升级等行为都会导致用户代理内容发生变化。  Since the user agent represents browser information, plug-in information, operating system information, etc., when any of the information changes, the user agent content will change, such as version upgrade, install plug-in, or plug-in upgrade, etc., resulting in user agent content. A change has occurred.
为了避免用户代理内容发生变化对 cookie 恢复的影响, 本实施例依据 cookie中的用户身份证明获取最新的用户代理, 实时更新所述用户代理, 以 保证所述用户代理总是为最新的状态, 以便于依据相应客户端用户的用户标 识和最新的用户代理查询得到相应的用户身份证明, 以避免用户代理发生变 化, 对 cookie恢复产生影响, 从而能够进一步提高用户识别的准确度。  In order to avoid the impact of the change of the user agent content on the cookie recovery, the embodiment obtains the latest user agent according to the user identity certificate in the cookie, and updates the user agent in real time to ensure that the user agent is always in the latest state, so that According to the user ID of the corresponding client user and the latest user agent query, the corresponding user identity certificate is obtained to avoid the change of the user agent and affect the cookie recovery, thereby further improving the accuracy of the user identification.
在本申请的一种优选实施例中,所述依据 cookie中的用户身份证明获取 最新的用户代理的步骤, 可以进一步包括:  In a preferred embodiment of the present application, the step of obtaining the latest user agent according to the user identity certificate in the cookie may further include:
依据 cookie 中的用户身份证明在应用服务器的本地緩存中查询是否存 在相应的客户端用户;  Query whether the corresponding client user exists in the local cache of the application server according to the user identity certificate in the cookie;
在緩存命中成功时,依据应用服务器的本地緩存查询结果获取应用服务 器的本地緩存用户信息, 所述应用服务器的本地緩存用户信息中可以包括有 用户代理;  When the cache hit succeeds, the local cache user information of the application server is obtained according to the local cache query result of the application server, where the local cache user information of the application server may include a user agent;
将应用服务器的本地緩存用户信息中的用户代理与所述用户上网行为 信息中的用户代理进行匹配, 若匹配成功, 则以所述应用服务器的本地緩存 用户信息中的用户代理作为最新的用户代理; 需要说明的是, 匹配成功可以 说明用户代理没有发生变化,使用应用服务器的本地緩存用户信息中用户代 理就可以; Matching the user agent in the local cache user information of the application server with the user agent in the user's online behavior information. If the matching is successful, the user agent in the locally cached user information of the application server is used as the latest user agent. It should be noted that the match can be successful. Note that the user agent has not changed, and the user agent in the local cache user information of the application server can be used;
若匹配失败, 则依据所述用户上网行为信息中的用户代理对所述应用服 务器的本地緩存用户信息中的用户代理进行更新; 需要说明的是, 匹配失败 说明用户代理发生了变化, 故需要进行更新;  If the matching fails, the user agent in the local cache user information of the application server is updated according to the user agent in the user's online behavior information. It should be noted that the matching failure indicates that the user agent has changed, so it needs to be performed. Update
在緩存命中失败时,依据 cookie中的用户身份证明在远程服务器中查询 相应的客户端用户的识别信息, 并依据查询结果获取远程存储用户信息, 所 述远程存储用户信息中可以包括有用户代理;  When the cache hit fails, the identification information of the corresponding client user is queried in the remote server according to the user identity certificate in the cookie, and the remote storage user information is obtained according to the query result, where the remote storage user information may include a user agent;
将所述远程存储用户信息中的用户代理与所述用户上网行为信息中的 用户代理进行匹配, 若匹配成功, 则以所述远程存储用户信息中的用户代理 作为最新的用户代理; 这里, 匹配成功说明用户代理没有发生变化, 故使用 远程存储用户信息中用户代理即可;  Matching the user agent in the remote storage user information with the user agent in the user online behavior information, and if the matching is successful, using the user agent in the remote storage user information as the latest user agent; here, matching Successfully stated that the user agent has not changed, so the user agent in the remote storage user information can be used;
若匹配失败, 则依据所述用户上网行为信息中的用户代理对所述远程存 储用户信息中的用户代理进行更新。 这里, 匹配识别说明用户代理发生了变 化, 故需要进行更新。  If the matching fails, the user agent in the remote storage user information is updated according to the user agent in the user's online behavior information. Here, the match identification indicates that the user agent has changed, so an update is required.
在具体实现中,所述远程服务器可以包括 UDC(用户数据中心, user data center )。例如,可以在 UDC的数据库中基于 cookie查找相应的客户端用户。  In a specific implementation, the remote server may include a UDC (user data center). For example, a corresponding client user can be found based on a cookie in the UDC's database.
参照图 4, 示出了本申请一种远程服务器基于 cookie中用户身份证明进 行查询的流程图, 具体可以包括:  Referring to FIG. 4, a flow chart of a remote server based on a user identity certificate in a cookie is shown in the following, and specifically includes:
步骤 401、 接收来自应用服务器的适配消息, 所述适配消息中包括有 cookie;  Step 401: Receive an adaptation message from an application server, where the adaptation message includes a cookie.
步骤 402、 基于 cookie中用户身份证明在数据库中查询相应的客户端用 户的识别信息;  Step 402: Query, according to the user identity certificate in the cookie, the identification information of the corresponding client user in the database;
cookie存在则表示相应的客户端用户已经访问过应用服务器。  The presence of a cookie indicates that the corresponding client user has accessed the application server.
步骤 403、 依据查询结果, 获取用户信息;  Step 403: Obtain user information according to the query result.
步骤 404、 将所述用户信息中的用户代理与所述用户上网行为信息中的 用户代理进行匹配, 若匹配失败, 则执行步骤 405; 若匹配成功, 则执行步 骤 407; 步骤 405、 将所述用户上网行为信息中的用户代理作为最新用户代理, 更新到相应的用户表项中; Step 404, the user agent in the user information is matched with the user agent in the user's online behavior information, if the matching fails, step 405 is performed; if the matching is successful, step 407 is performed; Step 405: Update the user agent in the online behavior information of the user as the latest user agent to the corresponding user entry.
这里, 用户表项用于在数据库中存储用户信息;  Here, the user entry is used to store user information in a database;
步骤 406、 将最新用户代理返回给应用服务器;  Step 406: Return the latest user agent to the application server.
步骤 407、 将所述用户信息中的用户代理作为最新用户代理, 返回给应 用服务器。  Step 407: The user agent in the user information is used as the latest user agent, and is returned to the application server.
需要说明的是, 在应用服务器接收到最新用户代理后, 可以对所述用户 身份证明、 用户标识和最新用户代理进行关联存储。 这样, 在用户代理发生 变化时, 应用服务器和 UDC均对客户端用户的用户信息进行了更新和关联 存储, 以提高接下来用户识别的准确性和实时性。  It should be noted that after the application server receives the latest user agent, the user identity certificate, the user identity, and the latest user agent may be stored in association. In this way, when the user agent changes, the application server and the UDC update and associate the user information of the client user to improve the accuracy and real-time of the subsequent user identification.
所以, 本申请中对所述用户身份证明、 用户标识和当前用户代理进行关 联存储, 所述关联存储的执行主体可以包括应用服务器和 UDC中的一者或 多者, 另外, 在所述用户身份证明、 用户标识和当前用户代理中任一者发生 变化时, 所述执行主体都会进行相应的更新和关联处理。 为使本领域技术人员更好地理解本申请, 以下通过图 5所示用户识别时 序图说明本申请在实际中的应用, 所述用户识别时序图具体可以包括: 步骤 ( 1 )、 AAA Server接收来自客户端用户的计费请求, 根据该计费请 求中的网络用户名来获取用户账户的费用或余额, 并判断是否允许该客户端 用户的进一步上网, 如果允许, 则执行步骤(2 )和(3 ), 否则, 由于费用 不足拒绝该客户端用户上网;  Therefore, in the present application, the user identity certificate, the user identity, and the current user agent are stored in association, and the execution entity of the association store may include one or more of an application server and a UDC, and in addition, the user identity When the proof, the user ID, and any of the current user agents change, the execution subject performs corresponding update and association processing. For a better understanding of the present application, the application of the present application in the actual application is shown in FIG. 5, and the user identification timing diagram may specifically include: Step (1), AAA Server receiving The charging request from the client user obtains the fee or balance of the user account according to the network user name in the charging request, and determines whether the client user is allowed to access the Internet further. If allowed, perform step (2) and (3), otherwise, the client user is denied access to the Internet due to insufficient fees;
步骤(2 )、 允许该客户端用户上网;  Step (2), allowing the client user to access the Internet;
步骤( 3 )、 当用户的费用和余额允许用户上网时, AAA Server将用户基 本信息同步到 Web Server (即本实施例中的应用服务器), 由 Web Server解 析出用户基本信息, 即网络用户名、 用户 IP和上下线状态, 并把所述用户 基本信息緩存在本地服务器上; 其中, 网络用户名是标志用户的唯一标识, 是不会发生变化的;  Step (3): When the user's fee and balance allow the user to access the Internet, the AAA Server synchronizes the basic information of the user to the Web server (that is, the application server in this embodiment), and the basic information of the user is parsed by the Web server, that is, the network user name. The user IP and the online and offline status, and cache the basic information of the user on the local server; wherein, the network user name is a unique identifier of the user, and does not change;
步骤(4 )、 当客户端用户上网浏览时, Web Server依据相应的访问请求 解析出用户上网行为信息, 其中, 所述用户上网行为信息具体可以包括: 用 户 IP、 用户代理、 cookie、 访问网站 i或名、 访问网站页面信息、 访问 referer 信息等; Step (4), when the client user browses the Internet, the Web Server according to the corresponding access request The user online behavior information may be analyzed, where the user online behavior information may include: a user IP, a user agent, a cookie, a website i or a name, a website page information, a referer information, and the like;
同时, Web Server判断 cookie信息, 如果 cookie存在, 则 Web Server 通过 cookie中用户身份证明查询用户信息, 查询该客户端用户是否存在,如 果存在, 则匹配用户上网行为中携带用户代理和通过用户身份证明查询用户 身份信息中用户代理进行匹配,如果匹配成功,说明用户代理没有发生变化; 如果匹配不成功, 则把用户上网中携带用户代理更新查询结果中用户代理信 息, 执行步骤(7 ); 如果不存在, 则执行步骤(5 );  At the same time, the Web Server determines the cookie information. If the cookie exists, the Web Server queries the user information through the user identity certificate in the cookie, and queries whether the client user exists. If yes, the matching user's online behavior carries the user agent and passes the user identity certificate. The user agent in the user identity information is matched, and if the matching is successful, the user agent does not change; if the matching is unsuccessful, the user is carried in the Internet to carry the user agent to update the user agent information in the query result, and step (7) is performed; If yes, perform step (5);
如果 cookie不存在, 则 Web Server通过 IP关联, 首先获取得到网络用 户名和用户代理, 然后通过网络用户名和用户代理查询该客户端用户是否存 在, 如果存在, 则获取用户身份证明信息, 即通过网络用户名和用户代理把 用户关联起来, 并执行步骤(7 ); 如果不存在, 则执行步骤(5 );  If the cookie does not exist, the Web Server obtains the network user name and the user agent through the IP association, and then queries the network user name and the user agent to check whether the client user exists. If yes, the user identity information is obtained, that is, through the network user. Name and user agent associate the user, and perform step (7); if not, perform step (5);
步骤(5 )、 UDC (用户数据中心, user data center )根据消息类型, 区 分是基于网络用户名 +用户代理的查询, 还是基于用户身份证明 (user— id ) 的查询;  Step (5), UDC (user data center, user data center) according to the message type, the partition is based on the network user name + user agent query, or based on the user identity certificate (user_id) query;
基于用户身份证明的查询具体可以包括: 通过用户身份证明进行查询该 客户端用户 【说明该客户端用户曾经进入系统中】, 获取到用户信息中网络 用户名和 用户代理, 和用户本次携带网络用户名和用户代理进行匹配, 若 匹配成功, 则执行步骤(6 ); 若匹配不成功, 则将网络用户名和最新用户代 理更新到用户信息中 [user-agent变化, 关联处理】, 并执行步骤( 6 );  The query based on the user identity certificate may include: querying the client user by using the user identity certificate [indicating that the client user has entered the system], obtaining the network user name and the user agent in the user information, and the user carrying the network user this time The name is matched with the user agent. If the matching is successful, step (6) is performed; if the matching is unsuccessful, the network user name and the latest user agent are updated to the user information [user-agent change, association processing], and steps are performed (6) );
基于网络用户名 +用户代理的查询具体可以包括: 通过网络用户名和用 户代理来查询, 如果数据库中不存在, 则表示该客户端用户为新用户, 即第 一次进入系统,需要为该客户端用户新生产一个新用户身份证明;如果存在, 则表示该客户端用户把已经将种植 cookie删除 ,故可以通过网络用户名和用 户代理关联起来, 获取用户的原有用户身份证明, 转(6 );  The query based on the network user name + user agent may specifically include: querying by using the network user name and the user agent. If the database does not exist, it indicates that the client user is a new user, that is, the first time entering the system, the client needs to be the client. The user newly produces a new user identity certificate; if it exists, it indicates that the client user has deleted the planting cookie, so it can be associated with the user agent through the network user name to obtain the user's original user identity certificate, and turn (6);
步骤(6 )、 UDC把关联结果同步到 Web server, 便于业务处理; 步骤(7 )、 Web Server依据识别得到的用户信息, 进行用户行为识别、 用户兴趣分析和积累, 并从用户积累信息、 网站内容、 时间等多个维度, 分 析出用户所需要信息和感兴趣的信息, 投送给用户; Step (6), the UDC synchronizes the association result to the Web server for convenient service processing; Step (7), the Web Server performs user behavior identification according to the identified user information, User interest analysis and accumulation, and analyze the user's required information and interesting information from the user's accumulated information, website content, time and other dimensions, and send it to the user;
步骤(8 )和(9 )、 当客户端用户非第一次上网时, 由于 Web Server已 经将用户信息存储到应用服务器的本地緩存,故基于应用服务器的本地緩存 的关联存储结构, 就可以进行业务处理;  Steps (8) and (9), when the client user is not accessing the Internet for the first time, since the Web server has stored the user information in the local cache of the application server, the associated storage structure based on the local cache of the application server can be performed. Business processing
步骤(10 )、 当该客户端用户下线时, AAA Server会把相应的下线消息 同步到 Web Server;  Step (10), when the client user goes offline, the AAA Server synchronizes the corresponding offline message to the Web Server;
步骤( 11 )、 当 Web Server接收到下线消息时, 解析出相应的用户信息: 网络用户名、 用户 IP和下线状态; 并且, 为了信息持久化的需求, 会把该 用户信息同步到 UDC, ;  Step (11), when the Web Server receives the offline message, parses the corresponding user information: the network user name, the user IP, and the offline state; and, for the information persistence requirement, the user information is synchronized to the UDC. , ;
步骤(12 )、 为了信息持久化的需求, Web Server把该客户端的用户信 息同步到 UDC上,以便于把用户最新信息存储在 UDC的数据库中的用户表 项中, 以避免发生用户信息丟失的情况。  Step (12), for the requirement of information persistence, the Web Server synchronizes the user information of the client to the UDC, so as to store the latest user information in the user table in the UDC database to avoid user information loss. Happening.
需要说明的是, 前述用户识别方法实施例中的任何一个方法步骤均可作 为存储在计算机可读介质上的可执行软件指令, 其中, 所述计算机可读介质 也可以包括传输型介质。  It should be noted that any of the foregoing method steps of the user identification method may be implemented as executable software instructions stored on a computer readable medium, wherein the computer readable medium may also include a transmission type medium.
为了说明前述用户识别方法实施例的应用环境, 参照图 6, 示出了本申 请一种客户端 6A和应用服务器 6B的交互示意图, 其中, 应用服务器 6B在 接收到客户端 6A的访问请求时, 可以依据所述访问请求中的报文数据, 解 析得到相应的用户上网行为信息,当 cookie在相应客户端用户的用户上网行 为信息中存在时, 应用服务器 6B可以直接依据 cookie向客户端 6A返回响 应信息; 当 cookie在相应客户端用户的用户上网行为信息中不存在时,应用 服务器 6B则会首先依据用户标识和用户代理恢复被删除的 cookie, 然后依 据恢复后 cookie中的用户身份证明, 向客户端 6A返回响应信息。 与前述方法实施例相应, 本申请还公开了一种应用服务器实施例, 参照 图 7, 具体可以包括:  In order to explain the application environment of the foregoing user identification method embodiment, referring to FIG. 6, a schematic diagram of interaction between the client 6A and the application server 6B is shown. When the application server 6B receives the access request of the client 6A, The user's online behavior information may be parsed according to the packet data in the access request. When the cookie exists in the user's online behavior information of the corresponding client user, the application server 6B may directly return a response to the client 6A according to the cookie. Information; when the cookie does not exist in the user's online behavior information of the corresponding client user, the application server 6B first restores the deleted cookie according to the user identifier and the user agent, and then according to the user identity certificate in the restored cookie, to the client End 6A returns a response message. Corresponding to the foregoing method embodiments, the present application further discloses an application server embodiment. Referring to FIG. 7, specifically, the method may include:
第一查询装置 701 , 用于当 cookie在相应客户端用户的用户上网行为信 息中不存在时, 依据相应客户端用户的用户标识和用户代理, 查询得到相应 的用户身份证明; The first querying device 701 is configured to: when the cookie is in the online behavior of the user of the corresponding client user When the information does not exist, according to the user ID and user agent of the corresponding client user, the query obtains the corresponding user identity certificate;
恢复装置 702, 用于依据所述用户身份证明恢复相应的 cookie;  The recovery device 702 is configured to restore the corresponding cookie according to the user identity certificate;
识别装置 703 , 用于依据所述恢复后 cookie中的用户身份证明, 识别得 到相应客户端用户的信息。  The identifying means 703 is configured to identify the information of the corresponding client user according to the user identity certificate in the restored cookie.
在本申请实施例中, 优选的是, 所述用户标识可以包括: 网络用户名, 和 /或, 专线用户的用户 IP。  In the embodiment of the present application, preferably, the user identifier may include: a network user name, and/or a user IP of the private line user.
在本申请的一种优选实施例中, 所述第一查询装置 701 , 可以进一步包 括:  In a preferred embodiment of the present application, the first querying apparatus 701 may further include:
第一緩存查找模块,用于依据用户标识和用户代理在应用服务器的本地 緩存中查询是否存在相应的客户端用户;  a first cache searching module, configured to query, according to the user identifier and the user agent, whether the corresponding client user exists in the local cache of the application server;
获取模块, 用于在緩存命中成功时, 依据所述用户标识和用户代理获取 该客户端用户的用户身份证明。  The obtaining module is configured to obtain the user identity of the client user according to the user identifier and the user agent when the cache hit succeeds.
在本申请的另一种优选实施例中, 所述第一查询装置 701还可以包括: 第一查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第一查 询请求;  In another preferred embodiment of the present application, the first querying apparatus 701 may further include: a first query requesting module, configured to send a first query request to the remote server when the cache hit fails;
此时, 所述远程服务器具体可以包括:  In this case, the remote server may specifically include:
第一远程查询装置, 用于依据所述第一查询请求, 通过所述用户标识和 用户代理在远程服务器中查询是否存在相应的客户端用户;  a first remote querying device, configured to query, according to the first query request, by the user identifier and the user agent, whether a corresponding client user exists in the remote server;
证明获取装置, 用于在远程服务器中存在相应的客户端用户时, 依据所 述用户标识和用户代理获取该客户端用户的用户身份证明;  a certificate obtaining device, configured to obtain a user identity certificate of the client user according to the user identifier and the user agent when a corresponding client user exists in the remote server;
证明产生装置, 用于在远程服务器中不存在相应的客户端用户时, 在远 程服务器中依据所述用户标识和用户代理产生一个新客户端用户的用户身 份证明;  a certificate generating device, configured to generate a user identity certificate of a new client user according to the user identifier and the user agent in the remote server when the corresponding client user does not exist in the remote server;
第一返回装置, 用于将所述证明获取装置或证明产生装置输出的用户身 份证明, 返回给所述应用服务器。  And a first returning device, configured to return the user identity certificate outputted by the certification obtaining device or the certification generating device to the application server.
在本申请的另一种优选实施例中, 所述应用服务器还可以包括: 用户代理获取装置, 用于在第一查询装置执行查询操作前, 当 cookie 在所述用户上网行为信息中存在时,依据 cookie中的用户身份证明获取最新 的用户代理。 In another preferred embodiment of the present application, the application server may further include: a user agent obtaining means, configured to be a cookie before the first querying device performs the query operation When the user's online behavior information exists, the latest user agent is obtained according to the user identity certificate in the cookie.
在本申请的再一种优选实施例中, 所述用户代理获取装置, 可以进一步 包括:  In still another preferred embodiment of the present application, the user agent obtaining apparatus may further include:
第二緩存查找模块,用于依据 cookie中的用户身份证明在应用服务器的 本地緩存中查询是否存在相应的客户端用户;  a second cache lookup module, configured to query, according to the user identity certificate in the cookie, whether the corresponding client user exists in the local cache of the application server;
第二获取模块, 用于在緩存命中成功时, 依据应用服务器的本地緩存查 询结果获取应用服务器的本地緩存用户信息, 所述应用服务器的本地緩存用 户信息中包括有用户代理;  a second obtaining module, configured to obtain local cache user information of the application server according to a local cache query result of the application server, where the local cache user information of the application server includes a user agent;
本地匹配模块, 用于将应用服务器的本地緩存用户信息中的用户代理与 所述用户上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述应用 服务器的本地緩存用户信息中的用户代理作为最新的用户代理; 若匹配失 败, 则依据所述用户上网行为信息中的用户代理对所述应用服务器的本地緩 存用户信息中的用户代理进行更新;  a local matching module, configured to match a user agent in the local cache user information of the application server with a user agent in the online behavior information of the user, and if the matching is successful, the user in the local cache user information of the application server The agent acts as the latest user agent; if the match fails, the user agent in the locally cached user information of the application server is updated according to the user agent in the user's online behavior information;
第二查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第二查 询请求;  a second query requesting module, configured to send a second query request to the remote server when the cache hit fails;
所述远程服务器包括:  The remote server includes:
第二远程查找装置, 用于在緩存命中失败时,依据 cookie中的用户身份 证明在远程服务器中查询相应的客户端用户的识别信息, 并依据查询结果获 取远程存储用户信息, 所述远程存储用户信息中包括有用户代理;  a second remote search device, configured to: when the cache hit fails, query the identification information of the corresponding client user in the remote server according to the user identity certificate in the cookie, and obtain remote storage user information according to the query result, where the remote storage user The information includes a user agent;
远程匹配装置,用于将所述远程存储用户信息中的用户代理与所述用户 上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述远程存储用户 信息中的用户代理作为最新的用户代理; 若匹配失败, 则依据所述用户上网 行为信息中的用户代理对所述远程存储用户信息中的用户代理进行更新; 第二返回装置, 用于将所述远程匹配装置输出的最新的用户代理, 返回 给所述应用服务器。  a remote matching device, configured to match a user agent in the remote storage user information with a user agent in the user online behavior information, and if the matching is successful, use the user agent in the remote storage user information as the latest a user agent; if the matching fails, updating the user agent in the remote storage user information according to the user agent in the user online behavior information; and the second returning device is configured to output the latest information of the remote matching device User agent, returned to the application server.
在本申请实施例中, 优选的是, 所述应用服务器还可以包括: 关联存储装置, 用于在用户身份证明存在的情况下, 在应用服务器端对 所述用户身份证明、 用户标识和当前用户代理进行关联存储。 In the embodiment of the present application, the application server may further include: an association storage device, configured to be in the application server end in the presence of the user identity certificate The user identity certificate, the user identity, and the current user agent are stored in association.
对于应用服务器实施例而言, 由于其与方法实施例基本相似, 所以描述 的比较简单, 相关之处参见方法实施例的部分说明即可。  For the application server embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
基于以上内容,本申请还提供了一种在其上记录有用于执行上述网络用 户识别的方法的程序的计算机可读记录介质。 其中, 所述网络用户识别的方 法的具体内容可参见方法实施例所述的内容, 在此不作贅述。  Based on the above, the present application also provides a computer readable recording medium on which a program for performing the above-described method of network user identification is recorded. For details of the method for the network user identification, refer to the content of the method embodiment, which is not described herein.
所述计算机可读记录介质包括用于以计算机 (例如计算机 )可读的形式 存储或传送信息的任何机制。 例如, 机器可读介质包括只读存储器(ROM )、 随机存取存储器( RAM )、 磁盘存储介质、 光存储介质、 闪速存储介质、 电、 光、 声或其他形式的传播信号 (例如, 载波、 红外信号、 数字信号等)等。  The computer readable recording medium includes any mechanism for storing or transmitting information in a form readable by a computer (e.g., a computer). For example, a machine-readable medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium, an optical storage medium, a flash storage medium, an electrical, optical, acoustic, or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.).
本申请可用于众多通用或专用的计算系统环境或配置中。 例如: 个人计 算机、服务器计算机、手持设备或便携式设备、平板型设备、 多处理器系统、 基于微处理器的系统、 置顶盒、 可编程的消费电子设备、 网络个人计算机、 小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。  This application can be used in a variety of general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, networked personal computers, small computers, mainframe computers, A distributed computing environment, including any of the above systems or devices.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述, 例如程序模块。 一般地, 程序模块包括执行特定任务或实现特定抽象数据类 型的例程、 程序、 对象、 组件、 数据结构等等。 也可以在分布式计算环境中 实践本申请, 在这些分布式计算环境中, 由通过通信网络而被连接的远程处 理设备来执行任务。 在分布式计算环境中, 程序模块可以位于包括存储设备 在内的本地和远程计算机存储介质中。  The application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
在本申请中, "组件"、 "装置"、 "系统,,等等指应用于计算机的相关实体, 如硬件、 硬件和软件的组合、 软件或执行中的软件等。 详细地说, 例如, 组 件可以、 但不限于是运行于处理器的过程、 处理器、 对象、 可执行组件、 执 行线程、 程序和 /或计算机。  In the present application, "component", "device", "system," and the like refer to related entities applied to a computer, such as hardware, a combination of hardware and software, software or software in execution, etc. In detail, for example, A component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable component, a thread of execution, a program, and/or a computer.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明 的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见 即可。  The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments can be referred to each other.
以上对本申请所提供的一种网络用户识别的方法及其应用服务器, 进行 了详细介绍, 本文中应用了具体个例对本申请的原理及实施方式进行了阐 述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想; 同时, 对于本领域的一般技术人员, 依据本申请的思想, 在具体实施方式及应用范 围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above is a method for network user identification provided by the application and an application server thereof. In the detailed description, the principles and implementations of the present application are explained in the specific examples. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas; and, for a person of ordinary skill in the art The present invention is not limited by the scope of the present application.

Claims

权 利 要 求 书 Claim
1、 一种网络用户识别的方法, 其特征在于, 包括如下步骤: A method for network user identification, comprising the steps of:
当 cookie在相应客户端用户的用户上网行为信息中不存在时,依据相应 客户端用户的用户标识和用户代理, 查询得到相应的用户身份证明;  When the cookie does not exist in the online behavior information of the user of the corresponding client user, the corresponding user identity certificate is obtained according to the user identifier and the user agent of the corresponding client user;
依据所述用户身份证明恢复相应的 cookie;  Recovering the corresponding cookie according to the user identity certificate;
依据所述恢复后 cookie中的用户身份证明,识别得到相应客户端用户的 信息。  According to the user identity certificate in the recovered cookie, the information of the corresponding client user is identified.
2、 如权利要求 1 所述的方法, 其特征在于, 所述依据相应客户端用户 的用户标识和用户代理, 查询得到相应的用户身份证明的步骤, 具体包括: 依据用户标识和用户代理,在应用服务器的本地緩存中查询是否存在相 应的客户端用户;  The method according to claim 1, wherein the step of obtaining a corresponding user identity certificate according to the user identifier and the user agent of the corresponding client user comprises: according to the user identifier and the user agent, Query whether there is a corresponding client user in the local cache of the application server;
在緩存命中成功时,依据所述用户标识和用户代理获取该客户端用户的 用户身份证明;  When the cache hit succeeds, obtaining the user identity certificate of the client user according to the user identifier and the user agent;
在緩存命中失败时,依据所述用户标识和用户代理在远程服务器中查询 是否存在相应的客户端用户;  When the cache hit fails, according to the user identifier and the user agent, the remote server is queried whether there is a corresponding client user;
在远程服务器中存在相应的客户端用户时,依据所述用户标识和用户代 理获取该客户端用户的用户身份证明;  When a corresponding client user exists in the remote server, the user identity of the client user is obtained according to the user identifier and the user agent;
在远程服务器中不存在相应的客户端用户时,在远程服务器中依据所述 用户标识和用户代理产生一个新客户端用户的用户身份证明。  When there is no corresponding client user in the remote server, a new client user's user identity is generated in the remote server according to the user identity and the user agent.
3、 如权利要求 1所述的方法, 其特征在于, 在所述当 cookie在相应客 户端用户的用户上网行为信息中不存在时,依据相应客户端用户的用户标识 和用户代理, 查询得到相应的用户身份证明的步骤之前, 所述方法还包括: 当 cookie在所述用户上网行为信息中存在时, 依据 cookie中的用户身 份证明获取最新的用户代理。  3. The method according to claim 1, wherein when the cookie does not exist in the online behavior information of the user of the corresponding client user, the query is obtained according to the user identifier of the corresponding client user and the user agent. Before the step of authenticating the user identity, the method further comprises: when the cookie exists in the online behavior information of the user, obtaining the latest user agent according to the user identity certificate in the cookie.
4、 如权利要求 3所述的方法, 其特征在于, 所述依据 cookie中的用户 身份证明获取最新的用户代理的步骤, 包括:  4. The method according to claim 3, wherein the step of obtaining the latest user agent according to the user identity certificate in the cookie comprises:
依据 cookie 中的用户身份证明在应用服务器的本地緩存中查询是否存 在相应的客户端用户;  Query whether the corresponding client user exists in the local cache of the application server according to the user identity certificate in the cookie;
在緩存命中成功时,依据应用服务器的本地緩存查询结果获取应用服务 权 利 要 求 书 器的本地緩存用户信息, 所述应用服务器的本地緩存用户信息中包括有用户 代理; When the cache hit succeeds, the application service is obtained according to the local cache query result of the application server. The local cache user information of the requester, the local cache user information of the application server includes a user agent;
将应用服务器的本地緩存用户信息中的用户代理与所述用户上网行为 信息中的用户代理进行匹配, 若匹配成功, 则以所述应用服务器的本地緩存 用户信息中的用户代理作为最新的用户代理; 若匹配失败, 则依据所述用户 上网行为信息中的用户代理对所述应用服务器的本地緩存用户信息中的用 户代理进行更新;  Matching the user agent in the local cache user information of the application server with the user agent in the user's online behavior information. If the matching is successful, the user agent in the locally cached user information of the application server is used as the latest user agent. If the matching fails, updating the user agent in the locally cached user information of the application server according to the user agent in the online behavior information of the user;
在緩存命中失败时,依据 cookie中的用户身份证明在远程服务器中查询 相应的客户端用户的识别信息, 并依据查询结果获取远程存储用户信息, 所 述远程存储用户信息中包括有用户代理;  When the cache hit fails, the identification information of the corresponding client user is queried in the remote server according to the user identity certificate in the cookie, and the remote storage user information is obtained according to the query result, where the remote storage user information includes the user agent;
将所述远程存储用户信息中的用户代理与所述用户上网行为信息中的 用户代理进行匹配, 若匹配成功, 则以所述远程存储用户信息中的用户代理 作为最新的用户代理; 若匹配失败, 则依据所述用户上网行为信息中的用户 代理对所述远程存储用户信息中的用户代理进行更新。  Matching the user agent in the remote storage user information with the user agent in the online behavior information of the user, and if the matching is successful, using the user agent in the remote storage user information as the latest user agent; if the matching fails And updating the user agent in the remote storage user information according to the user agent in the user online behavior information.
5、 如权利要求 1至 4中任一项所述的方法, 其特征在于, 还包括: 在用户身份证明存在的情况下,在应用服务器端和 /或远程服务器端对所 述用户身份证明、 用户标识和当前用户代理进行关联存储。  The method according to any one of claims 1 to 4, further comprising: authenticating the user identity on the application server side and/or the remote server end in the presence of the user identity certificate, The user ID is stored in association with the current user agent.
6、 如权利要求 1至 4中任一项所述的方法, 其特征在于, 所述用户标 识包括: 网络用户名, 和 /或, 专线用户的用户 IP地址。  The method according to any one of claims 1 to 4, wherein the user identification comprises: a network user name, and/or a user IP address of the private line user.
7、 一种应用服务器, 其特征在于, 包括:  7. An application server, comprising:
第一查询装置,用于当 cookie在相应客户端用户的用户上网行为信息中 不存在时, 依据相应客户端用户的用户标识和用户代理, 查询得到相应的用 户身份证明;  The first querying device is configured to: when the cookie does not exist in the online behavior information of the user of the corresponding client user, obtain a corresponding user identity certificate according to the user identifier and the user agent of the corresponding client user;
恢复装置, 用于依据所述用户身份证明恢复相应的 cookie;  a recovery device, configured to restore a corresponding cookie according to the user identity certificate;
识别装置, 用于依据所述恢复后 cookie中的用户身份证明,识别得到相 应客户端用户的信息。  The identifying means is configured to identify the information of the corresponding client user according to the user identity certificate in the restored cookie.
8、 如权利要求 7所述的应用服务器, 其特征在于, 所述第一查询装置, 包括: 权 利 要 求 书 第一緩存查找模块,用于依据用户标识和用户代理在应用服务器的本地 緩存中查询是否存在相应的客户端用户; The application server according to claim 7, wherein the first querying device comprises: The first cache lookup module is configured to query, in the local cache of the application server, whether a corresponding client user exists according to the user identifier and the user agent;
第一获取模块, 用于在緩存命中成功时, 依据所述用户标识和用户代理 获取该客户端用户的用户身份证明;  a first obtaining module, configured to acquire, according to the user identifier and the user agent, a user identity certificate of the client user when the cache hit succeeds;
第一查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第一查 询请求;  a first query requesting module, configured to send a first query request to the remote server when the cache hit fails;
所述远程服务器包括:  The remote server includes:
第一远程查询装置, 用于依据所述第一查询请求, 通过所述用户标识和 用户代理在远程服务器中查询是否存在相应的客户端用户;  a first remote querying device, configured to query, according to the first query request, by the user identifier and the user agent, whether a corresponding client user exists in the remote server;
证明获取装置, 用于在远程服务器中存在相应的客户端用户时, 依据所 述用户标识和用户代理获取该客户端用户的用户身份证明;  a certificate obtaining device, configured to obtain a user identity certificate of the client user according to the user identifier and the user agent when a corresponding client user exists in the remote server;
证明产生装置, 用于在远程服务器中不存在相应的客户端用户时, 在远 程服务器中依据所述用户标识和用户代理产生一个新客户端用户的用户身 份证明;  a certificate generating device, configured to generate a user identity certificate of a new client user according to the user identifier and the user agent in the remote server when the corresponding client user does not exist in the remote server;
第一返回装置, 用于将所述证明获取装置或证明产生装置输出的用户身 份证明, 返回给所述应用服务器。  And a first returning device, configured to return the user identity certificate outputted by the certification obtaining device or the certification generating device to the application server.
9、 如权利要求 7所述的应用服务器, 其特征在于, 还包括:  9. The application server of claim 7, further comprising:
用户代理获取装置, 用于在第一查询装置执行查询操作前, 当 cookie 在所述用户上网行为信息中存在时,依据 cookie中的用户身份证明获取最新 的用户代理。  The user agent obtaining means is configured to obtain the latest user agent according to the user identity certificate in the cookie when the cookie exists in the online behavior information of the user before the first querying device performs the query operation.
10、 如权利要求 9所述的应用服务器, 其特征在于, 所述用户代理获取 装置, 包括:  The application server according to claim 9, wherein the user agent obtaining means comprises:
第二緩存查找模块,用于依据 cookie中的用户身份证明在应用服务器的 本地緩存中查询是否存在相应的客户端用户;  a second cache lookup module, configured to query, according to the user identity certificate in the cookie, whether the corresponding client user exists in the local cache of the application server;
第二获取模块, 用于在緩存命中成功时, 依据应用服务器的本地緩存查 询结果获取应用服务器的本地緩存用户信息, 所述应用服务器的本地緩存用 户信息中包括有用户代理;  a second obtaining module, configured to obtain local cache user information of the application server according to a local cache query result of the application server, where the local cache user information of the application server includes a user agent;
本地匹配模块, 用于将应用服务器的本地緩存用户信息中的用户代理与 权 利 要 求 书 所述用户上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述应用 服务器的本地緩存用户信息中的用户代理作为最新的用户代理; 若匹配失 败, 则依据所述用户上网行为信息中的用户代理对所述应用服务器的本地緩 存用户信息中的用户代理进行更新; a local matching module, configured to use a user agent in the local cache user information of the application server The user agent in the online behavior information of the user performs matching, and if the matching is successful, the user agent in the locally cached user information of the application server is used as the latest user agent; if the matching fails, according to the user The user agent in the online behavior information updates the user agent in the locally cached user information of the application server;
第二查询请求模块, 用于在緩存命中失败时, 向远程服务器发送第二查 询请求;  a second query requesting module, configured to send a second query request to the remote server when the cache hit fails;
所述远程服务器包括:  The remote server includes:
第二远程查找装置, 用于在緩存命中失败时,依据 cookie中的用户身份 证明在远程服务器中查询相应的客户端用户的识别信息, 并依据查询结果获 取远程存储用户信息, 所述远程存储用户信息中包括有用户代理;  a second remote search device, configured to: when the cache hit fails, query the identification information of the corresponding client user in the remote server according to the user identity certificate in the cookie, and obtain remote storage user information according to the query result, where the remote storage user The information includes a user agent;
远程匹配装置,用于将所述远程存储用户信息中的用户代理与所述用户 上网行为信息中的用户代理进行匹配, 若匹配成功, 则以所述远程存储用户 信息中的用户代理作为最新的用户代理; 若匹配失败, 则依据所述用户上网 行为信息中的用户代理对所述远程存储用户信息中的用户代理进行更新; 第二返回装置, 用于将所述远程匹配装置输出的最新的用户代理, 返回 给所述应用服务器。  a remote matching device, configured to match a user agent in the remote storage user information with a user agent in the user online behavior information, and if the matching is successful, use the user agent in the remote storage user information as the latest a user agent; if the matching fails, updating the user agent in the remote storage user information according to the user agent in the user online behavior information; and the second returning device is configured to output the latest information of the remote matching device User agent, returned to the application server.
11、 如权利要求 7至 10中任一项所述的应用服务器, 其特征在于, 还 包括:  The application server according to any one of claims 7 to 10, further comprising:
关联存储装置, 用于在用户身份证明存在的情况下, 在应用服务器端对 所述用户身份证明、 用户标识和当前用户代理进行关联存储。  The association storage device is configured to store the user identity certificate, the user identifier, and the current user agent on the application server side in the presence of the user identity certificate.
12、 如权利要求 7至 10中任一项所述的应用服务器, 其特征在于, 所 述用户标识包括: 网络用户名, 和 /或, 专线用户的用户 IP。  The application server according to any one of claims 7 to 10, wherein the user identifier comprises: a network user name, and/or a user IP of the private line user.
13、一种在其上记录有用于执行权利要求 1所述方法的程序的计算机可 读记录介质。  A computer readable recording medium having recorded thereon a program for executing the method of claim 1.
PCT/CN2011/085016 2011-09-30 2011-12-30 Network user identification method and application server thereof WO2013044569A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110300817.7 2011-09-30
CN201110300817.7A CN102333092B (en) 2011-09-30 2011-09-30 Network user identification method and application server

Publications (1)

Publication Number Publication Date
WO2013044569A1 true WO2013044569A1 (en) 2013-04-04

Family

ID=45484697

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/085016 WO2013044569A1 (en) 2011-09-30 2011-12-30 Network user identification method and application server thereof

Country Status (2)

Country Link
CN (1) CN102333092B (en)
WO (1) WO2013044569A1 (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297405B (en) * 2012-03-02 2017-01-18 阿里巴巴集团控股有限公司 User identification and information delivery method and device
CN103051637A (en) * 2012-12-31 2013-04-17 北京亿赞普网络技术有限公司 User identification method and device
CN103179188B (en) * 2013-01-17 2015-11-25 北京亿赞普网络技术有限公司 user identification method and device
CN103093377B (en) * 2013-01-21 2016-02-10 北京亿赞普网络技术有限公司 A kind of advertisement placement method and system
CN103237094B (en) * 2013-04-17 2016-04-13 北京亿赞普网络技术有限公司 A kind of method and device identifying user
CN103427994A (en) * 2013-07-30 2013-12-04 北京亿赞普网络技术有限公司 Method and device for user recognition
CN103559467B (en) * 2013-11-05 2016-01-20 张良 Second-generation resident identification card reading system
CN104320456B (en) * 2014-10-22 2018-04-20 迈普通信技术股份有限公司 A kind of page push method and relevant device
CN105577735A (en) * 2014-11-07 2016-05-11 阿里巴巴集团控股有限公司 Browser-based user behavior tracking method and device
CN104639387B (en) * 2014-12-09 2019-03-01 北京京东尚科信息技术有限公司 A kind of user network behavior tracking method and apparatus
US20160343030A1 (en) * 2014-12-31 2016-11-24 Yahoo! Inc. Mitigating at least some effects of cookie churn
CN105337990B (en) * 2015-11-20 2019-06-21 北京奇虎科技有限公司 The method of calibration and device of user identity
CN106933922A (en) * 2015-12-31 2017-07-07 北京国双科技有限公司 The method and apparatus for storing ID
CN107659602B (en) * 2016-07-26 2020-12-29 株式会社理光 Method, device and system for associating user access records
CN106599981A (en) * 2017-02-28 2017-04-26 四川建筑职业技术学院 Identity certificate card positioning system
CN109246163B (en) * 2017-07-10 2022-02-08 中国电信股份有限公司 Terminal information identification method and device
CN107613015A (en) * 2017-10-11 2018-01-19 成都知道创宇信息技术有限公司 A kind of website registered user visits source acquisition methods first
CN109257078B (en) * 2018-09-19 2020-06-05 北京邮电大学 QoS-based SLNR (Signal to noise ratio) rule optimized multi-user communication method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128390A1 (en) * 2002-12-31 2004-07-01 International Business Machines Corporation Method and system for user enrollment of user attribute storage in a federated environment
CN101160599A (en) * 2004-12-17 2008-04-09 塔科达有限公司 Audience targeting with universal profile synchronization
CN101291220A (en) * 2007-04-16 2008-10-22 华为技术有限公司 System, device and method for identity security authentication
CN101388773A (en) * 2007-09-12 2009-03-18 中国移动通信集团公司 Identity management platform, service server, uniform login system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040128390A1 (en) * 2002-12-31 2004-07-01 International Business Machines Corporation Method and system for user enrollment of user attribute storage in a federated environment
CN101160599A (en) * 2004-12-17 2008-04-09 塔科达有限公司 Audience targeting with universal profile synchronization
CN101291220A (en) * 2007-04-16 2008-10-22 华为技术有限公司 System, device and method for identity security authentication
CN101388773A (en) * 2007-09-12 2009-03-18 中国移动通信集团公司 Identity management platform, service server, uniform login system and method

Also Published As

Publication number Publication date
CN102333092A (en) 2012-01-25
CN102333092B (en) 2014-05-28

Similar Documents

Publication Publication Date Title
WO2013044569A1 (en) Network user identification method and application server thereof
US8180376B1 (en) Mobile analytics tracking and reporting
US10999384B2 (en) Method and system for identifying website visitors
US7310687B2 (en) Methods and systems for managing class-based condensation
US9141669B2 (en) Configuring an origin server content delivery using a pulled data list
EP2263163B1 (en) Content management
EP2043011B1 (en) Server directed client originated search aggregator
US8838679B2 (en) Providing state service for online application users
RU2630380C2 (en) System and advertising push method (push) based on home gateway
WO2015157646A1 (en) Url prefetching
US20210258404A1 (en) Generation of a media profile
WO2013181972A1 (en) Method and device for identifying network access behaviour
US20150026289A1 (en) Content source discovery
CN102882974A (en) Method for saving website access resource by website identification version number
US20140082138A1 (en) Communication system, communication apparatus, communication method, and storage medium
WO2014000148A1 (en) Resource obtaining method and device
US8713088B2 (en) Identifying users of remote sessions
KR102009020B1 (en) Method and apparatus for providing website authentication data for search engine
CN110753045A (en) Single sign-on method between different domains
US8862667B2 (en) Network based audience measurement
WO2018228234A1 (en) Video caching method and video caching device
WO2022057525A1 (en) Method and device for data retrieval, electronic device, and storage medium
CN110300308B (en) Streaming media playback method and device
CN110866196A (en) Printer network information acquisition method and device and electronic equipment
US20070124445A1 (en) Browser adaptation for context based navigation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11873103

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11873103

Country of ref document: EP

Kind code of ref document: A1