CN115051855A - User identification method and device, electronic equipment and storage medium - Google Patents

User identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115051855A
CN115051855A CN202210669247.7A CN202210669247A CN115051855A CN 115051855 A CN115051855 A CN 115051855A CN 202210669247 A CN202210669247 A CN 202210669247A CN 115051855 A CN115051855 A CN 115051855A
Authority
CN
China
Prior art keywords
user
region
access request
identification
website access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210669247.7A
Other languages
Chinese (zh)
Inventor
雷浪声
郑周洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Weike Software Technology Co ltd
Original Assignee
Shenzhen Weike Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weike Software Technology Co ltd filed Critical Shenzhen Weike Software Technology Co ltd
Priority to CN202210669247.7A priority Critical patent/CN115051855A/en
Publication of CN115051855A publication Critical patent/CN115051855A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a user identification method, a user identification device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a website access request of a user; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier. The embodiment of the invention can analyze the website access request to obtain the first region identifier and the second region identifier, and then determine whether the user is the user of the target region based on the first region identifier and the second region identifier, which is equivalent to determining whether the user accesses the website in the target region more accurately by checking the region identifier corresponding to the website access request doubly, thereby improving the identification accuracy of the user.

Description

User identification method and device, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to computer technologies, and in particular, to a user identification method and apparatus, an electronic device, and a storage medium.
Background
When a user accesses a website created by the cloud server, the cloud server can determine whether the user is a user in an available region or not by identifying the internet protocol address in the website access request, and if the user is a user in an available region, the cloud server responds to the website access request of the user in the available region.
But the user who is not in the available region can modify the internet protocol address in the website access request through the virtual private network, namely modifying the region corresponding to the internet protocol address into the available region, and then forwarding the website access request to the cloud server through the virtual private network; after receiving the website access request sent by the virtual private network, the cloud server also responds to the website access request of the user who is not in the available region.
Therefore, whether the user in the available region is determined to be inaccurate by identifying the internet protocol address, and because the processing resource of the cloud server is occupied by the website access request sent by the user in the region other than the available region, the problems of access jam, request loss and the like can occur when the user in the available region accesses the website.
Disclosure of Invention
Embodiments of the present invention provide a user identification method, an apparatus, an electronic device, and a storage medium, which solve the problem of misjudgment caused by determining whether the user is in a target region only according to an internet protocol address in a website access request, and more accurately determine whether the user accesses the website in the target region, so that the website access request of the user in the target region is responded more quickly, and the user experience of the user is improved.
In a first aspect, an embodiment of the present invention provides a user identification method, where the method includes:
acquiring a website access request of a user;
analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request, wherein the geographical position information is used for indicating the position of a browser installed on a terminal corresponding to the user, and the source internet interconnection protocol address is used for indicating the source address of the website access request;
identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification;
and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier.
In a second aspect, an embodiment of the present invention provides a user identification apparatus, where the control apparatus includes:
the website access request acquisition module is used for acquiring a website access request of a user;
a website access request analyzing module, configured to analyze the website access request to obtain geographic location information and a source internet protocol address, where the geographic location information is used to indicate a location of a browser installed on a terminal corresponding to the user, and the source internet protocol address is used to indicate a source address of the website access request;
the identification acquisition module is used for identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification;
and the user determining module is used for determining whether the user is the user of the target region based on the first region identifier and the second region identifier.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the user identification method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the user identification method according to any one of the embodiments of the present invention.
In the embodiment of the invention, the website access request of the user can be obtained; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographical position information to obtain a first region identification, and identifying a region identification corresponding to the source internet protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier. The embodiment of the invention can analyze the website access request to obtain the first region identifier and the second region identifier, then determine whether the user is the user of the target region based on the first region identifier and the second region identifier, which is equivalent to double-checking the first region identifier and the second region identifier corresponding to the website access request, and determine whether the region where the user is located is the target region, thereby solving the problem of misjudgment caused by determining whether the user is the target region only according to the internet protocol address in the website access request, more accurately determining whether the user accesses the website in the target region, and improving the user identification accuracy, thereby more quickly responding to the website access request of the user of the target region, reducing the waiting time of the user of the target region during website access, and improving the use experience of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a user identification method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a user identification method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a user identification method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a user identification device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Fig. 1 is a schematic flowchart of a user identification method according to an embodiment of the present invention, which may be implemented by a user identification apparatus according to an embodiment of the present invention, where the apparatus may be implemented in software and/or hardware. In a specific embodiment, the apparatus may be integrated in an electronic device, and the electronic device may be a resource server, and the resource server may be configured to respond to a website access request sent by a user through a terminal, and may provide a data resource corresponding to the website access request to the terminal of the user. The following embodiments will be described by taking as an example that the apparatus is integrated in an electronic device, and referring to fig. 1, the method may specifically include the following steps:
step 101, acquiring a website access request of a user.
The website access request may be understood as a request sent by a user to a resource server through a browser installed in a terminal.
Specifically, a website access request sent by a user through a terminal may be acquired through a resource server.
For example, after the user sends the website access request to the resource server through the browser in the mobile phone, the resource server obtains the website access request of the user.
Step 102, analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request, wherein the geographical position information is used for indicating the position of a browser installed on a terminal corresponding to a user, and the source internet interconnection protocol address is used for indicating the source address of the website access request.
The geographic position information can be understood as longitude and latitude information of the position of a browser installed on a terminal corresponding to a user; the source Internet Protocol Address may be understood as an Internet Protocol Address (IP) carried in the website access request.
Specifically, when a user sends a website access request through a browser installed on a terminal, the latitude and longitude information of the position where the browser is located can be acquired through the browser, and then the acquired latitude and longitude information can be added to a request header in the website access request by the browser; after a resource server receives a website access request sent by a browser installed on a user terminal, the website access request can be analyzed by the resource server to obtain a request header of the website access request, and geographical position information carried in the request header is further obtained; the source internet interconnection protocol address can be obtained by analyzing the network information carried by the website access request.
Exemplarily, assuming that a user in the central area of west and west city, shanxi province sends a website access request for accessing the website a through a browser installed in a mobile phone, when the browser installed in the mobile phone of the user sends the website access request for the website a, the browser may obtain latitude and longitude information (34 degrees north latitude and 109 degrees east longitude) of a location where the browser is located (the central area of west and west city, shanxi province), and then the browser may add the obtained latitude and longitude information to a request Header in the website access request, for example, may add the latitude and longitude information to a request Header of a hypertext Transfer Protocol (HTTP); after the resource server receives a website access request sent by a browser installed on a user terminal, the website access request can be analyzed by the resource server to obtain a request header of the website access request, and then the resource server can obtain geographical position information (34 degrees north latitude and 109 degrees east longitude) carried in the request header; the network information carried by the website access request can be analyzed by the resource server to obtain the source internet interconnection protocol address (XXX.XXX.XXX.XXX).
Among them, HTTP is a simple request-response protocol.
And 103, identifying the region identification corresponding to the geographic position information to obtain a first region identification, and identifying the region identification corresponding to the source internet protocol address to obtain a second region identification.
The first region identification can be understood as a region name corresponding to the geographical position information; the second region identification can be understood as a region name corresponding to the source internet interconnection protocol address; the region name may include provincial and urban information of the region.
Specifically, the resource server may identify the geographic location information through the map to obtain a region identifier corresponding to the geographic location information, and determine the region identifier corresponding to the geographic location information as the first region identifier. The resource server may query the address identifier library according to the source internet protocol address to obtain a region identifier corresponding to the source internet protocol address, and determine the region identifier corresponding to the source internet protocol address as the second region identifier.
For example, the resource server may recognize the geographic location information (34 degrees in north latitude and 109 degrees in east longitude) through a map to obtain that the region identifier corresponding to the geographic location information is the central area of west ampere city in shanxi province, and determine the region identifier corresponding to the geographic location information as the first region identifier (the central area of west ampere city in shanxi province). The resource server may query the address identifier library according to the source internet interconnection protocol address (xxx.xxx.xxx.xxx.xxx.xxx), obtain that the region identifier corresponding to the source internet interconnection protocol address is the central area of west ampere city, shanxi province, and determine the region identifier corresponding to the source internet interconnection protocol address as the second region identifier (central area of west ampere city, shanxi province).
And 104, determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier.
The target zone can be understood as an available zone which the resource server allows to access.
Specifically, whether the first region identifier and the second region identifier are the same or not can be determined through the resource server, and if the first region identifier and the second region identifier are the same, whether the first region identifier or the second region identifier is the same as the region identifier of the target region or not can be determined through the resource server, and if the first region identifier or the second region identifier is the same as the region identifier of the target region, the user can be determined to be the user of the target region.
For example, assuming that the region identifier of the target region is a city region of west safety city of shanxi province, it may be determined by the resource server that the province region information of the first region identifier (the city region of west safety city of shanxi province) and the second region identifier (the city region of west safety city of shanxi province) are the same, and further it may be determined by the resource server that the first region identifier (the city region of city of west safety city of shanxi province) or the second region identifier (the city region of city of west safety city of shanxi province) is the same as the region identifier of the target region (the city region of city of west safety city of shanxi province), and then it may be determined that the user in the city region of west safety city of shanxi province is the user of the target region.
In the embodiment of the invention, the website access request of the user can be obtained; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographical position information to obtain a first region identification, and identifying a region identification corresponding to the source internet protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier. The embodiment of the invention can analyze the website access request to obtain the first region identifier and the second region identifier, then determine whether the user is the user of the target region based on the first region identifier and the second region identifier, which is equivalent to double-checking the first region identifier and the second region identifier corresponding to the website access request, and determine whether the region where the user is located is the target region, thereby solving the problem of misjudgment caused by determining whether the user is the target region only according to the internet protocol address in the website access request, more accurately determining whether the user accesses the website in the target region, and improving the user identification accuracy, thereby more quickly responding to the website access request of the user of the target region, reducing the waiting time of the user of the target region during website access, and improving the use experience of the user.
The user identification method provided by the embodiment of the present invention is further described below, and fig. 2 is another schematic flow chart of the user identification method provided by the embodiment of the present invention, and as shown in fig. 2, the method specifically includes the following steps:
step 201, a website access request is obtained from a terminal corresponding to a user.
The terminal corresponding to the user can be a mobile phone, a notebook or a desktop computer.
Exemplarily, fig. 3 is a schematic diagram of a user identification method according to an embodiment of the present invention, and as shown in fig. 3, a user may send a website access request to a resource server through a browser installed in a personal notebook; when a user sends a website access request through a browser installed in a personal notebook, the browser can acquire longitude and latitude information of the position of the notebook and can add the longitude and latitude information of the position of the notebook to a request Header of HTTP; the resource server can obtain the website access request sent by the browser.
Optionally, the website access request may be acquired from a terminal corresponding to the user through a Virtual Private Network (VPN) server.
Specifically, as shown in fig. 3, the user may also send a website access request to the set up VPN server; after receiving the website access request, the VPN server modifies the IP in the website access request to obtain the website access request after the IP is modified, and sends the website access request after the IP is modified to the resource server; the resource server may obtain a website access request from the VPN server.
For example, suppose a user is in a city hoped city of Changsha, Hunan province; a user can send a website access request to a VPN server through a browser installed in a personal notebook, and the region identifier corresponding to the IP in the website access request is a city expected in Changsha, Hunan province; after receiving the website access request, the VPN server may modify the IP in the website access request to be the IP of a target region (not central area in shaxi province, west and city), obtain the website access request after the IP modification, and send the website access request after the IP modification to the resource server; the resource server can acquire the website access request sent by the VPN and subjected to the modification of the IP address.
Step 202, analyzing the website access request to obtain the geographic position information and the source internet interconnection protocol address carried in the website access request.
Step 203, calling a map interface to convert the geographical position information into a first region identifier.
The map interface can be understood as a map programming interface of different maps for developers.
Specifically, as shown in fig. 3, the resource server may call a map interface to send the geographic location information to a map; the map can identify the received geographic position information to obtain a region identifier corresponding to the geographic position information, and send the region identifier corresponding to the geographic position information to the resource server, and the resource server can determine the region identifier corresponding to the received geographic position information as the first region identifier.
Exemplarily, it is assumed that a user sends a website access request of a website a through a browser installed in a personal notebook, the user is located in a non-central area of shaanxi city, and a region identifier corresponding to a target region is the non-central area of shaanxi city; after the resource server analyzes the website access request of the website a to obtain the geographic position information (unpenter area in west ampere city, shaanxi province) and the source internet interconnection protocol address (xxx.xxx.xxx.xxx.xxx) carried in the website access request, the resource server can call a map interface to send the geographic position information (34 degrees north latitude and 109 degrees east longitude) to a map; the map can identify the received geographic position information to obtain that a region identifier corresponding to the geographic position information is a region yet to be centralized in Xian city, Shaanxi province, and the region identifier corresponding to the geographic position information is sent to the resource server through a map interface; the resource server may determine a region identifier corresponding to the received geographic location information as a first region identifier (unpin central area of shaxi province, west ampere).
In the embodiment of the invention, the geographical position information can be converted into the first region identifier by calling the map interface, so that the first region identifier can be obtained more accurately and quickly, and the identification efficiency of the user identification method is improved.
And step 204, inquiring an address identification library based on the source internet interconnection protocol address to obtain a second region identification.
Specifically, as shown in fig. 3, the resource server may send the source internet protocol address to the address identification repository; the address identification library can identify the received source internet interconnection protocol address to obtain a region identification corresponding to the source internet interconnection protocol address, and sends the region identification corresponding to the source internet interconnection protocol address to the resource server; the resource server may determine a region identifier corresponding to the received source internet protocol address as the second region identifier.
For example, the resource server may send a source internet protocol address (xxx.xxx.xxx.xxx.xxx) parsed for the website access request to the address identification repository; the address identification library can identify the received source internet interconnection protocol address, obtain a region identification corresponding to the source internet interconnection protocol address as a region of the city of xi' an, shaanxi province, and send the region identification corresponding to the source internet interconnection protocol address to the resource server; the resource server may determine a region identifier corresponding to the received source internet protocol address as a second region identifier (unpin central area of west city, shaxi province).
In the embodiment of the invention, the address identification library can be queried based on the source internet interconnection protocol address to obtain the second regional identification, and the second regional identification can be obtained more accurately and quickly, so that the identification efficiency of user identification is improved.
Step 205, determining whether the first region identifier and the second region identifier are the same; if the first region identifier is different from the second region identifier, executing step 206; if the first region id is the same as the second region id, go to step 208.
Specifically, as shown in fig. 3, since the user can send a website access request to the VPN server through a browser installed in a personal terminal (personal notebook); the VPN server can modify an IP address in the website access request after receiving the website access request to obtain the website access request after the IP address is modified, and send the website access request after the IP address is modified to the resource server, namely, the IP address obtained by the resource server is possibly the IP address modified by the VPN server and is not the real IP address of a browser installed on a terminal of a user, and a second region identifier obtained by the resource server based on the modified IP address is also possibly not the region identifier corresponding to the real IP address of the browser installed on the terminal of the user, but because the first region identifier obtained by the resource server is real, whether the first region identifier and the second region identifier are the same or not can be determined by comparing the provincial and urban area information in the first region identifier and the second region identifier, so as to determine whether the second region identifier is the real region identifier or not, whether the user is in the target zone can be determined more accurately.
Step 206, determine that the user is not a user of the target zone.
By way of example, suppose that a user in a metropolitan area of Changsha, Hunan, province sends a website access request to a resource server through a VPN server; if the first region identifier is a hope city area of Changsha city, province of Hunan province, and the second region identifier is a Changan area of Xian city, province and western province, the information of the province and city areas in the first region identifier and the second region identifier can be determined to be different, and the user can be determined not to be the user of the target region.
Step 207, refusing to send the target resource to the terminal corresponding to the user.
The target resource can be understood as a data resource to be accessed by the website access request.
Specifically, after determining that the user is not the user in the target region, the resource server may refuse to send the target resource to the terminal corresponding to the user.
In the embodiment of the invention, after the user is determined not to be the user in the target region, the target resource can be refused to be sent to the terminal corresponding to the user, so that the problems of access jam, request loss and the like caused by the fact that the website access request sent by the user not in the target region occupies the processing resource of the resource server when the user in the target region accesses the website are solved, the waiting time of the user in the target region when accessing the website is reduced, the website access speed of the user is improved, and better use experience is brought to the user.
Step 208, determining whether the first region identifier or the second region identifier is the same as the region identifier of the target region; if the first region identifier or the second region identifier is different from the region identifier of the target region, execute step 207; if the first zone id or the second zone id is the same as the zone id of the target zone, step 209 is executed.
The region identifier of the target region may be understood as a region name corresponding to an available region that the resource server allows to access.
Specifically, the resource server may compare whether the provincial city information in the first region identifier or the provincial city information in the second region identifier is the same as the provincial city information in the region identifier of the target region, and then determine whether the first region identifier or the second region identifier is the same as the region identifier of the target region.
Step 209 determines that the user is a user of the target zone.
For example, assuming that a region identifier corresponding to a target region is a city region of west safety of shanxi province, a user sends a website access request of a website a through a browser installed in a personal notebook, and the user is located in the city region of west safety of shanxi province, the first region identifier or the second region identifier is both the city region of west safety of shanxi province; the resource server can compare that the province city information (the central area of the xi 'an city in Shaanxi province) in the first region identifier or the second region identifier is the same as the province city information (the central area of the xi' an city in Shaanxi province) in the region identifier of the target region, and determine that the first region identifier or the second region identifier is the same as the region identifier of the target region.
Step 210, sending the target resource to the terminal corresponding to the user.
For example, assuming that the resource to be accessed by the website access request is S, when it is determined that the user is a user in the target area, the resource server may send the target resource S to a terminal (a personal notebook or a mobile phone) corresponding to the user.
In the embodiment of the invention, whether the first region identifier and the second region identifier are the same or not can be determined; if the first region identification is different from the second region identification, determining that the user is not the user of the target region, and refusing to send the target resource to the terminal corresponding to the user; if the first region identification is the same as the second region identification, determining whether the first region identification or the second region identification is the same as the region identification of the target region; if the first region identification or the second region identification is different from the region identification of the target region, refusing to send the target resource to the terminal corresponding to the user; if the first region identification or the second region identification is the same as the region identification of the target region, the user is determined to be the user of the target region, the target resource is sent to the terminal corresponding to the user, the website access request sent by the user not in the target region can be limited, the problems of access jam, request loss and the like when the user of the target region accesses the website due to the fact that the website access request sent by the user not in the target region occupies processing resources of a resource server are solved, waiting time when the user of the target region accesses the website is shortened, website access speed of the user of the target region is improved, the purpose of responding the website access request of the user of the target region more quickly is achieved, website access of the user not in the target region can be dynamically limited in real time, and website safety and stability are improved.
In the embodiment of the invention, a website access request can be acquired from a terminal corresponding to a user, the website access request is analyzed to obtain geographical position information and a source internet protocol address carried in the website access request, a map interface is called to convert the geographical position information into a first region identifier, and an address identifier library is queried based on the source internet protocol address to obtain a second region identifier; determining whether the first region identification and the second region identification are the same; if the first region identification is different from the second region identification, determining that the user is not the user of the target region, and refusing to send the target resource to the terminal corresponding to the user; if the first region identification is the same as the second region identification, determining whether the first region identification or the second region identification is the same as the region identification of the target region; if the first region identification or the second region identification is different from the region identification of the target region, refusing to send the target resource to the terminal corresponding to the user; and if the first region identification or the second region identification is the same as the region identification of the target region, determining that the user is the user of the target region, and sending the target resource to a terminal corresponding to the user. That is, the embodiment of the present invention can determine whether the user is the user in the target region by performing double check on the first region identifier and the second region identifier corresponding to the website access request, thereby solving the problem of misjudgment caused by determining whether the user is the user in the target region only according to the internet protocol address in the website access request, more accurately determining whether the user performs website access in the target region, and limiting the website access request sent by the user not in the target region, thereby solving the problems of access jam, request loss and the like when the user in the target region performs website access due to the fact that the website access request sent by the user not in the target region occupies the processing resource of the resource server, reducing the waiting time when the user in the target region performs website access, increasing the website access speed of the user in the target region, and achieving the purpose of more rapidly responding to the website access request of the user in the target region, the method and the system can dynamically limit the website access of the user not in the target region in real time, and improve the security and the stability of the website.
Fig. 4 is a schematic structural diagram of a subscriber identity module according to an embodiment of the present invention, which is suitable for executing the subscriber identity module according to the embodiment of the present invention. As shown in fig. 4, the apparatus may specifically include:
a website access request obtaining module 401, configured to obtain a website access request of a user;
a website access request analyzing module 402, configured to analyze the website access request to obtain geographic location information and a source internet protocol address, where the geographic location information is used to indicate a location of a browser installed on a terminal corresponding to the user, and the source internet protocol address is used to indicate a source address of the website access request;
an identifier obtaining module 403, configured to identify a region identifier corresponding to the geographic location information to obtain a first region identifier, and identify a region identifier corresponding to the source internet protocol address to obtain a second region identifier;
a user determining module 404, configured to determine whether the user is a user of a target region based on the first region identifier and the second region identifier.
Optionally, the identifier obtaining module 403 is specifically configured to:
and calling a map interface to convert the geographical position information into the first region identifier.
Optionally, the identifier obtaining module 403 is specifically configured to:
and inquiring an address identification library based on the source internet interconnection protocol address to obtain the second region identification.
Optionally, the user determining module 404 is specifically configured to:
determining whether the first region identifier and the second region identifier are the same;
if the first region identification is the same as the second region identification, determining whether the first region identification or the second region identification is the same as the region identification of the target region;
and if the first region identification or the second region identification is the same as the region identification of the target region, determining that the user is the user of the target region.
Optionally, the user determining module 404 is specifically configured to:
and if the first region identification is different from the second region identification, determining that the user is not the user of the target region.
Optionally, the website access request is used to request a target resource, and the user determination module 404 is specifically configured to:
when the user is the user of the target region, the target resource is sent to a terminal corresponding to the user;
and when the user is not the user of the target region, refusing to send the target resource to a terminal corresponding to the user.
Optionally, the website access request obtaining module 401 is specifically configured to:
acquiring the website access request from a terminal corresponding to the user;
or acquiring the website access request from the terminal corresponding to the user through a virtual private network server.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the functional module, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
The device of the embodiment of the invention can obtain the website access request of the user; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier. The embodiment of the invention can analyze the website access request to obtain the first region identifier and the second region identifier, then determine whether the user is the user of the target region based on the first region identifier and the second region identifier, which is equivalent to double-checking the first region identifier and the second region identifier corresponding to the website access request, and determine whether the region where the user is located is the target region, thereby solving the problem of misjudgment caused by determining whether the user is the target region only according to the internet protocol address in the website access request, more accurately determining whether the user accesses the website in the target region, and improving the user identification accuracy, thereby more quickly responding to the website access request of the user of the target region, reducing the waiting time of the user of the target region during website access, and improving the use experience of the user.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor executes the computer program, the user identification method provided in any of the above embodiments is implemented.
The embodiment of the invention also provides a computer readable medium, on which a computer program is stored, and the program is executed by a processor to implement the user identification method provided by any one of the above embodiments.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the computer system 500 are also stored. The CPU 501, ROM 502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor comprises a website access request acquisition module, a website access request analysis module, an identification acquisition module and a user determination module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring a website access request of a user; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier.
According to the technical scheme of the embodiment of the invention, the website access request of the user can be obtained; analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request; identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification; and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier. The embodiment of the invention can analyze the website access request to obtain the first region identifier and the second region identifier, then determine whether the user is the user of the target region based on the first region identifier and the second region identifier, which is equivalent to double-checking the first region identifier and the second region identifier corresponding to the website access request, and determine whether the region where the user is located is the target region, thereby solving the problem of misjudgment caused by determining whether the user is the target region only according to the internet protocol address in the website access request, more accurately determining whether the user accesses the website in the target region, and improving the user identification accuracy, thereby more quickly responding to the website access request of the user of the target region, reducing the waiting time of the user of the target region during website access, and improving the use experience of the user.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for identifying a user, the method comprising:
acquiring a website access request of a user;
analyzing the website access request to obtain geographical position information and a source internet interconnection protocol address carried in the website access request, wherein the geographical position information is used for indicating the position of a browser installed on a terminal corresponding to the user, and the source internet interconnection protocol address is used for indicating the source address of the website access request;
identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification;
and determining whether the user is the user of the target region or not based on the first region identifier and the second region identifier.
2. The method according to claim 1, wherein the identifying a region identifier corresponding to the geographic location information to obtain a first region identifier includes:
and calling a map interface to convert the geographical position information into the first region identifier.
3. The method of claim 1, wherein the identifying the geographic identifier corresponding to the source ip address to obtain a second geographic identifier comprises:
and inquiring an address identification library based on the source internet interconnection protocol address to obtain the second region identification.
4. The method of claim 1, wherein the determining whether the user is a user of a target zone based on the first zone identifier and the second zone identifier comprises:
determining whether the first region identifier and the second region identifier are the same;
if the first region identification is the same as the second region identification, determining whether the first region identification or the second region identification is the same as the region identification of the target region;
and if the first region identification or the second region identification is the same as the region identification of the target region, determining that the user is the user of the target region.
5. The method of claim 4, further comprising:
and if the first region identification is different from the second region identification, determining that the user is not the user of the target region.
6. The method of claim 5, wherein the website access request is for requesting a target resource, the method further comprising:
when the user is the user of the target region, the target resource is sent to a terminal corresponding to the user;
and when the user is not the user of the target region, refusing to send the target resource to a terminal corresponding to the user.
7. The method of claim 1, wherein the obtaining the website access request of the user comprises:
acquiring the website access request from a terminal corresponding to the user;
or acquiring the website access request from the terminal corresponding to the user through a virtual private network server.
8. A user identification device, the device comprising:
the website access request acquisition module is used for acquiring a website access request of a user;
a website access request analyzing module, configured to analyze the website access request to obtain geographic location information and a source internet protocol address, where the geographic location information is used to indicate a location of a browser installed on a terminal corresponding to the user, and the source internet protocol address is used to indicate a source address of the website access request;
the identification acquisition module is used for identifying a region identification corresponding to the geographic position information to obtain a first region identification, and identifying a region identification corresponding to the source internet interconnection protocol address to obtain a second region identification;
and the user determining module is used for determining whether the user is the user of the target region based on the first region identifier and the second region identifier.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the user identification method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the user identification method according to any one of claims 1 to 7.
CN202210669247.7A 2022-06-14 2022-06-14 User identification method and device, electronic equipment and storage medium Pending CN115051855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210669247.7A CN115051855A (en) 2022-06-14 2022-06-14 User identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210669247.7A CN115051855A (en) 2022-06-14 2022-06-14 User identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115051855A true CN115051855A (en) 2022-09-13

Family

ID=83161170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210669247.7A Pending CN115051855A (en) 2022-06-14 2022-06-14 User identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115051855A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224752A1 (en) * 1999-05-03 2006-10-05 Parekh Sanjay M Determining geographic locations of private network Internet users
CN102143149A (en) * 2010-12-10 2011-08-03 华为技术有限公司 Method and system for mini-station to access cloud, and access management equipment
US20140373097A1 (en) * 2013-06-14 2014-12-18 Go Daddy Operating Company, LLC System for domain control validation
CN104506612A (en) * 2014-12-19 2015-04-08 北京奇虎科技有限公司 Information recommendation method, server and browser device
CN104702629A (en) * 2013-12-04 2015-06-10 阿里巴巴集团控股有限公司 Method and device for collecting resource access information
CN110650146A (en) * 2019-09-26 2020-01-03 秒针信息技术有限公司 Anti-cheating method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224752A1 (en) * 1999-05-03 2006-10-05 Parekh Sanjay M Determining geographic locations of private network Internet users
CN102143149A (en) * 2010-12-10 2011-08-03 华为技术有限公司 Method and system for mini-station to access cloud, and access management equipment
US20140373097A1 (en) * 2013-06-14 2014-12-18 Go Daddy Operating Company, LLC System for domain control validation
CN104702629A (en) * 2013-12-04 2015-06-10 阿里巴巴集团控股有限公司 Method and device for collecting resource access information
CN104506612A (en) * 2014-12-19 2015-04-08 北京奇虎科技有限公司 Information recommendation method, server and browser device
CN110650146A (en) * 2019-09-26 2020-01-03 秒针信息技术有限公司 Anti-cheating method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110753089B (en) Method, device, medium and electronic equipment for managing client
US10630799B2 (en) Method and apparatus for pushing information
CN110365724B (en) Task processing method and device and electronic equipment
CN111581563A (en) Page response method and device, storage medium and electronic equipment
CN110471709B (en) Method, device, medium and electronic equipment for accelerating webpage opening speed
CN106776917B (en) Method and device for acquiring resource file
CN113886336A (en) Flow detection method, device, equipment and medium
CN113783975A (en) Request management method, device, medium and equipment based on local DNS (Domain name Server)
CN111435380A (en) Page cross-domain interaction method, system, device and storage device
CN109471713B (en) Method and device for inquiring information
CN111475230B (en) Application function configuration method and device and electronic equipment
CN111581431B (en) Data exploration method and device based on dynamic evaluation
CN111953718B (en) Page debugging method and device
CN115801299B (en) Meta universe identity authentication method, device, equipment and storage medium
CN115051855A (en) User identification method and device, electronic equipment and storage medium
CN110750602A (en) Method and device for determining site to which order address belongs
CN113986995A (en) Request distribution method and device, storage medium and electronic equipment
CN110377654B (en) Data request processing method and device, electronic equipment and computer-readable storage medium
CN112379967A (en) Simulator detection method, device, equipment and medium
CN113765972A (en) Data request response method, device, system, server and storage medium
CN112650710A (en) Data migration sending method and device, storage medium and electronic device
CN104978199A (en) Plug-in application method and device used for multiple browsers
CN111797009A (en) Method and device for detecting code compatibility and electronic equipment
CN112860538A (en) Method and device for performing interface regression test based on online log
US20130137461A1 (en) Method and apparatus for inserting location data into messages at a communication gateway

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 702, block 5D, software industry base, 14 Haitian 2nd Road, Binhai community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Weike Software Technology Co.,Ltd.

Address before: 518000 7022, block 5D, software industry base, No. 14, Haitian Second Road, Binhai community, Yuehai street, Nanshan District, Shenzhen, Guangdong

Applicant before: Shenzhen Weike Software Technology Co.,Ltd.

CB02 Change of applicant information