CN111698765A - IP address verification method and device, electronic equipment and storage medium - Google Patents

IP address verification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111698765A
CN111698765A CN202010537400.1A CN202010537400A CN111698765A CN 111698765 A CN111698765 A CN 111698765A CN 202010537400 A CN202010537400 A CN 202010537400A CN 111698765 A CN111698765 A CN 111698765A
Authority
CN
China
Prior art keywords
wireless access
access point
point information
current
address
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
CN202010537400.1A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010537400.1A priority Critical patent/CN111698765A/en
Publication of CN111698765A publication Critical patent/CN111698765A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

According to the IP address verification method, the IP address verification device, the electronic equipment and the storage medium, the current position of the target client is obtained by obtaining the current IP address of the target client and the current wireless access point information of the target client; matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information; and when the current position and the target historical position meet the preset conditions, judging that the current IP address is the real IP address. Therefore, the position corresponding to the IP address of the target client is obtained, the actual position of the target client is judged through the current wireless access point information searched by the target client, and whether the IP of the target client is the modified IP is judged through matching of the corresponding position and the actual position, so that the client can be prevented from modifying the IP address maliciously, and the user experience is improved.

Description

IP address verification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and an apparatus for checking an IP address, an electronic device, and a storage medium.
Background
The IP Address (Internet Protocol Address) refers to an Internet Protocol Address, and is a uniform Address format provided by the IP Protocol, and it allocates a logical Address to each network and each host on the Internet. Meanwhile, the application service can also judge the position of the client according to the IP address of the client, so that certain functions of the application only face users in a certain area, such as promotion facing users in a certain area and the like.
However, since the IP address of the client is modifiable, when the user modifies the IP of the client, a situation may occur that the application service makes a judgment error when determining the location of the client according to the IP address, thereby affecting the effect of the function of the application service.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for checking an IP address, electronic equipment and a storage medium, so as to check the IP address of a client. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a method for checking an IP address, including:
acquiring a current IP address of a target client and current wireless access point information of the target client, wherein the current wireless access point information of the target client is information of one or more wireless access points searched by the target client currently;
acquiring the current position of a target client according to the current IP address of the target client;
matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
determining a historical position corresponding to historical wireless access point information successfully matched with the current wireless access point information to obtain a target historical position;
and when the current position and the target historical position meet the preset conditions, judging that the current IP address of the target client is the real IP address.
Optionally, the wireless access point information list includes a confidence level of a historical location corresponding to the historical wireless access point information, and when the current location and the target historical location meet a preset condition, it is determined that the current IP address of the target client is a real IP address, including:
when the difference value between the current position and the target historical position is smaller than a first preset threshold value, obtaining and calculating the average value of the confidence degrees of the target historical position;
and when the average value is larger than a second preset threshold value, determining that the current IP address of the target client is the real IP address.
Optionally, the obtaining of the current IP address of the target client and the current wireless access point information of the target client includes:
acquiring one or more WiFi names currently searched by a target client;
matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information comprises the following steps:
and matching one or more WiFi names obtained by current search with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the obtained one or more WiFi names.
Optionally, the method for acquiring the pre-counted wireless access point information list includes:
acquiring IP addresses of a plurality of clients and information of wireless access points searched by the clients;
acquiring the position of each client according to the IP addresses of the clients;
counting the total number of the clients which are retrieved to each access point and the number of the clients which correspond to different addresses in the clients which are retrieved to each wireless access point aiming at each wireless access point, and calculating one or more positions corresponding to each wireless access point and confidence degrees corresponding to different positions;
and obtaining a wireless access point information list according to one or more positions corresponding to each wireless access point and the confidence degrees of the corresponding different positions.
Optionally, the obtaining the IP addresses of the multiple clients and the information of the wireless access point retrieved by each client includes:
acquiring IP addresses of a plurality of clients and WiFi names retrieved by the clients;
for each wireless access point, counting the total number of the clients which are retrieved to each access point and the number of the clients which correspond to different addresses in the clients which are retrieved to each wireless access point, and before calculating one or more positions corresponding to each wireless access point and confidence degrees of the corresponding different positions, the method further comprises the following steps:
splitting the WiFi name according to the preset characters to obtain a first name and a second name, wherein the first name and the second name can be spliced with the preset characters to obtain the WiFi name;
matching the first name with a pre-statistical name set;
and matching the second name with a preset rule after the matching is successful.
In a second aspect of the present invention, there is also provided an IP address verifying apparatus, including:
the information acquisition module is used for acquiring the current IP address of the target client and the current wireless access point information of the target client, wherein the current wireless access point information of the target client is the information of one or more wireless access points searched by the target client currently;
the position acquisition module is used for acquiring the current position of the target client according to the current IP address of the target client;
the information matching module is used for matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
the historical position module is used for determining the historical position corresponding to the historical wireless access point information which is successfully matched with the current wireless access point information to obtain the historical position of the target;
and the address judgment module is used for judging that the current IP address of the target client is a real IP address when the current position and the target historical position meet the preset conditions.
Optionally, the wireless access point information list includes a confidence level of a historical location corresponding to the historical wireless access point information, and the address determining module includes:
the average value submodule is used for acquiring and calculating the average value of the confidence degrees of the historical positions of the targets when the difference value between the current position and the historical positions of the targets is smaller than a first preset threshold value;
and the address judgment submodule is used for judging that the current IP address of the target client is the real IP address when the average value is larger than a second preset threshold value.
Optionally, the wireless access point information is a WiFi name, and the information obtaining module includes:
the name acquisition submodule is used for acquiring one or more WiFi names currently searched by the target client;
an information matching module comprising:
and the list matching submodule is used for matching one or more WiFi names obtained by current search with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the obtained one or more WiFi names.
Optionally, the apparatus further comprises:
the wireless access point module is used for acquiring IP addresses of a plurality of clients and information of the wireless access point searched by each client;
the client position module is used for acquiring the position of each client according to the IP addresses of the clients;
the confidence coefficient calculation module is used for counting the total number of the clients which are retrieved to each access point and the number of the clients which correspond to different addresses in the clients which are retrieved to each wireless access point aiming at each wireless access point, and calculating one or more positions corresponding to each wireless access point and the confidence coefficient of the corresponding different positions;
and the point information list module is used for obtaining a wireless access point information list according to one or more positions corresponding to each wireless access point and the confidence degrees of the corresponding different positions.
Optionally, the wireless access point module includes:
the address name submodule is used for acquiring IP addresses of a plurality of clients and WiFi names retrieved by the clients;
the above-mentioned device still includes:
the name splitting module is used for splitting the WiFi name according to the preset characters to obtain a first name and a second name, wherein the first name and the second name can be spliced with the preset characters to obtain the WiFi name;
the first matching module is used for matching the first name with a pre-statistical name set;
and the second matching module is used for matching the second name with the preset rule after the matching is successful.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any IP address verification method when executing the program stored in the memory.
In another aspect of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above IP address verification methods.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above described IP address verification methods.
According to the IP address verification method, the IP address verification device, the electronic equipment and the storage medium, the current IP address of the target client and the current wireless access point information of the target client are obtained; acquiring the current position of a target client according to the current IP address of the target client; matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information; determining a historical position corresponding to historical wireless access point information successfully matched with the current wireless access point information to obtain a target historical position; and when the current position and the target historical position meet the preset conditions, judging that the current IP address of the target client is the real IP address. Therefore, the position corresponding to the IP address of the target client is obtained, the actual position of the target client is judged through the current wireless access point information searched by the target client, and whether the IP of the target client is the modified IP is judged through matching of the corresponding position and the actual position, so that the client can be prevented from modifying the IP address maliciously, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a method for checking an IP address according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for determining a current IP address of a target client according to an embodiment of the present disclosure;
fig. 3 is another flowchart of a method for checking an IP address according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a method for acquiring a wireless access point information list according to an embodiment of the present application;
fig. 5 is a diagram illustrating an example of a wireless access point information list according to an embodiment of the present application;
fig. 6 is a flowchart of another method for acquiring a wireless access point information list according to an embodiment of the present application;
fig. 7 is a first schematic diagram of an apparatus for checking an IP address according to an embodiment of the present application;
fig. 8 is a second schematic diagram of an IP address verifying apparatus according to an embodiment of the present application;
fig. 9 is a third schematic diagram of an IP address verifying apparatus according to an embodiment of the present application;
fig. 10 is a fourth schematic diagram of an apparatus for checking an IP address according to an embodiment of the present application;
fig. 11 is a fifth schematic diagram of an IP address verifying apparatus according to an embodiment of the present application;
fig. 12 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
The embodiment of the invention firstly provides a method for checking an IP address, which comprises the following steps:
acquiring a current IP address of a target client and current wireless access point information of the target client, wherein the current wireless access point information of the target client is information of one or more wireless access points searched by the target client currently;
acquiring the current position of a target client according to the current IP address of the target client;
matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
determining a historical position corresponding to historical wireless access point information successfully matched with the current wireless access point information to obtain a target historical position;
and when the current position and the target historical position meet the preset conditions, judging that the current IP address of the target client is the real IP address.
Therefore, by the IP address checking method of the embodiment of the application, the position corresponding to the IP address of the target client is obtained, the actual position of the target client is judged according to the current wireless access point information searched by the target client, and whether the IP of the target client is the modified IP is judged according to the matching between the corresponding position and the actual position, so that the client can be prevented from modifying the IP address maliciously, and the user experience is improved.
Referring to fig. 1, fig. 1 is a flowchart of a method for checking an IP address according to an embodiment of the present application, including:
step S11, obtain the current IP address of the target client and the current wireless access point information of the target client.
The current wireless access point information of the target client is the information of one or more wireless access points searched by the target client currently. The client may be a mobile phone or a notebook computer, and the Wireless access point may be a Wireless Fidelity (WiFi) that is searched by the mobile phone or the notebook computer and can be connected to the Wireless access point.
The method for verifying the IP address can verify the IP address of the client through the intelligent terminal device, so that the verification can be executed through the intelligent terminal device, and specifically, the intelligent terminal device can be a computer or a server and the like.
Step S12, obtaining the current location of the target client according to the current IP address of the target client.
The obtaining of the current location of the target client through the current IP address of the target client may be implemented in various ways, for example, obtaining the current location of the current IP address through an interface provided by a third party, such as a Baidu map. The current location of the target client may be represented in any manner as location information, such as location information consisting of latitude and longitude.
And step S13, matching the current wireless access point information with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the current wireless access point information.
The wireless access point information list records historical wireless access point information and historical positions corresponding to the historical wireless access point information. The information of the historical wireless access points can be names of the historical wireless access points. The current wireless access point information may be matched with a wireless access point information list which is counted in advance, and the name of the current wireless access point of the target client may be matched with the name of each wireless access point in the wireless access point information list which is counted in advance. For example, names of wireless access points are counted in advance and are respectively a1, a2, A3, a4, and a5, and positions corresponding to the access points are obtained, names of current wireless access points of the target client are obtained as a4 and a7, and when the current wireless access point information is matched with a wireless access point information list which is counted in advance, a wireless access point which is named as a4 can be obtained through matching.
And step S14, determining the historical position corresponding to the historical wireless access point information successfully matched with the current wireless access point information, and obtaining the target historical position.
After the current wireless access point information is matched with a wireless access point information list which is counted in advance, the historical position corresponding to the historical wireless access point information which is successfully matched with the current wireless access point information is determined. The historical position of the target can be obtained according to the position recorded in the wireless access point information list. For example, the names of the wireless access points obtained through statistics in advance are a1, a2, A3, a4, and a5, and the positions corresponding to the access points, the names of the current wireless access points of the target client are a4 and a7, when the current wireless access point information is matched with the wireless access point information list obtained through statistics in advance, the wireless access point named as a4 can be obtained through matching, and the position corresponding to the wireless access point a4 can be obtained.
Step S15, when the current location and the target historical location satisfy the preset condition, it is determined that the current IP address of the target client is the real IP address.
The current position and the target historical position meet a preset condition, and the deviation between the current position and the target historical position can be smaller than a first preset threshold. For example, the longitude and latitude of the current location are obtained as [34.2, 78.3], the target historical location is obtained as [35.2, 77.2], the preset threshold is a longitude deviation threshold of 2, the latitude deviation threshold is 2, and the deviation between the current location and the target historical location is calculated as: if the longitude difference is 1 and the latitude difference is 1.1, the current IP address of the target client is determined to be the real IP address if the preset condition is satisfied.
Therefore, by the IP address verification method of the embodiment of the application, the actual position of the target client can be judged by acquiring the position corresponding to the IP address of the target client and the current wireless access point information searched by the target client, and whether the IP of the target client is the modified IP or not can be judged by matching the corresponding position with the actual position, so that the client can be prevented from modifying the IP address maliciously, and the user experience is improved.
Optionally, referring to fig. 2, the wireless access point information list includes a confidence level of a historical location corresponding to the historical wireless access point information, and when the current location and the target historical location satisfy a preset condition, step S15 determines that the current IP address of the target client is a real IP address, including:
step S151, when the difference between the current position and the target historical position is smaller than a first preset threshold, obtaining and calculating an average value of the confidence degrees of the target historical position.
In the actual use process, the target history positions may include a plurality of positions, the difference between the current position and the target history positions is smaller than a first preset threshold, the difference may be longitude and latitude between the current position and each target history position, the history positions in which the difference between the target history positions and the current position is smaller than the first preset threshold are judged and obtained, the confidence corresponding to each target history position is obtained, the average of the confidence corresponding to each target history position is calculated, that is, the sum of the confidences corresponding to the obtained target history positions is calculated, and the sum is divided by the number of the target history positions to obtain the average of the confidence of the target history positions.
In step S152, when the average value is greater than the second preset threshold, it is determined that the current IP address of the target client is the real IP address.
When the wireless access point information list is acquired, a plurality of positions can be judged by the same or different modes aiming at the same wireless access point. For example, when the position of the wireless access point is determined by using the mobile phone as the position, a plurality of positions corresponding to the wireless access point may be determined due to unfixed positions of the mobile phone or an error in position determination. When the wireless access point information list is generated, the number of the mobile phones corresponding to different positions and obtaining the position can be respectively counted aiming at different positions corresponding to the same wireless access point, so that confidence degree is scored for each position. After the average value of the confidence degrees of the historical positions of the target is obtained and calculated, when the average value is larger than a second preset threshold value, the position of the current wireless access point can be judged to be a correct position, and the current IP address of the target client is judged to be a real IP address.
Optionally, referring to fig. 3, the wireless access point information is a wireless network WiFi name, and the step S11 obtains the current IP address of the target client and the current wireless access point information of the target client, including:
step S111, one or more WiFi names currently searched by the target client are obtained.
In the present application, the WiFi name may be a default name of a device such as a router, for example, TP-LINK _ A6D 732C.
Step S13 matches the current wireless access point information with a wireless access point information list counted in advance to obtain historical wireless access point information that is successfully matched with the current wireless access point information, including:
step S131, matching the one or more WiFi names obtained by current search with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the obtained one or more WiFi names.
In the present application, the WiFi name may be a default name of a device such as a router, and as the default name is generally a name composed of a brand name of the router and an MAC (media Access Control) address for different routers, and as the MAC address of different routers is unique, one or more WiFi names obtained by current search are matched with a wireless Access point information list counted in advance, so as to obtain a name in one or more WiFi names that is consistent with the name in the wireless Access point information list. So that the corresponding location information and the like can be obtained according to the name of the WiFi.
Optionally, referring to fig. 4, the method for acquiring the pre-counted wireless access point information list includes:
in step S41, the IP addresses of the plurality of clients and the information of the wireless access point searched by each client are acquired.
Step S42 is to obtain the location of each client based on the IP addresses of the clients.
Step S43, for each wireless access point, counting the total number of the clients that have retrieved each access point and the number of the clients that have retrieved different addresses in the clients of each wireless access point, and calculating one or more positions corresponding to each wireless access point and the confidence degrees of the corresponding different positions.
The location of the client may be longitude and latitude corresponding to each client, for example, as shown in fig. 5, a WiFi signal with a WiFi signal name TP-LINK _ A6D732C corresponds to a longitude and latitude location, and confidence corresponding to different longitude and latitude locations is obtained. And for each wireless access point, counting the total number of the clients which are retrieved to each access point and the number of the clients which correspond to different addresses in the clients which are retrieved to each wireless access point, and calculating one or more positions corresponding to each wireless access point and confidence degrees corresponding to different positions. For example, 10 clients can search all the wireless access points a through statistics, and through the IP addresses of the 10 clients, the positions corresponding to 7 clients can be obtained as [34.2, 78.3], the positions corresponding to 3 clients are [34.7, 78.2], the positions corresponding to the current wireless access point can be obtained as [34.2, 78.3] and [34.7, 78.2] through calculation, wherein the confidence corresponding to [34.2, 78.3] is 0.7, and the confidence corresponding to [34.7, 78.2] is 0.3.
Step S44, according to one or more positions corresponding to each wireless access point and the confidence degrees of the corresponding different positions, a wireless access point information list is obtained.
The method comprises the steps of obtaining a wireless access point information list according to one or more positions corresponding to each wireless access point and confidence degrees corresponding to different positions, counting the information of the wireless access points through the steps according to the information of a client side obtained by a back-end server, obtaining the wireless access point information list and updating the wireless access point information list at regular time.
Optionally, referring to fig. 6, the step S41 obtains IP addresses of a plurality of clients and information of the wireless access point retrieved by each client, including:
step S411, acquiring IP addresses of a plurality of clients and WiFi names retrieved by each client.
Step S43 is to count the total number of the clients that have retrieved each access point and the number of the clients that have retrieved different addresses in the clients that have retrieved each wireless access point for each wireless access point, and before calculating the confidence of one or more locations and corresponding different locations corresponding to each wireless access point, the method further includes:
step S51, splitting the WiFi name according to the preset characters to obtain a first name and a second name.
The first name and the second name can be spliced with preset characters to obtain a WiFi name. Wherein the preset characters can be various types of characters, such as _ and the like. The first name may be a character string composed of characters before a preset character in the WiFi name, and the second name may be a character string composed of characters after the preset character in the WiFi name. For example, when the preset character is _ and is named as TP-LINK _ A6D732C for WiFi, the first name is TP-LINK and the second name is A6D 732C.
Step S52, matching the first name with the pre-statistical name set.
Aiming at routers of different brands, the default names of the routers summarize the first names into various brand names, so that the brand names of different brands can be counted to obtain a pre-statistical name set, such as TP-LINK, Tenda, D-Link, Xiaomi, HUAWEI and MERCURY …
And step S53, matching the second name with a preset rule after matching is successful.
After the first name is successfully matched with the pre-statistical name set, whether the WiFi name is a default name or not can be judged by matching the second name with a preset rule, namely the WiFi name is not modified by a user. Since the second name in the default name is generally the last four digits or the last six digits of the MAC address, it can be determined whether the WiFi name is the default name by determining whether the second name is four digits or six digits, etc. I.e. the predetermined rule is four-bit or six-bit characters.
Therefore, the corresponding MAC address can be obtained through the default name, and because the MAC addresses of different routers are unique, reference can be provided for judgment of the current position after binding according to the MAC addresses and the actual addresses of different routers.
Referring to fig. 7, fig. 7 is a first schematic diagram of an IP address verifying apparatus according to an embodiment of the present invention, including:
an information obtaining module 701, configured to obtain a current IP address of a target client and current wireless access point information of the target client, where the current wireless access point information of the target client is information of one or more wireless access points currently searched by the target client;
a location obtaining module 702, configured to obtain a current location of the target client according to a current IP address of the target client;
an information matching module 703, configured to match current wireless access point information with a wireless access point information list counted in advance, to obtain historical wireless access point information that is successfully matched with the current wireless access point information, where the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
a historical position module 704, configured to determine a historical position corresponding to historical wireless access point information that is successfully matched with current wireless access point information, to obtain a target historical position;
the address determining module 705 is configured to determine that the current IP address of the target client is a real IP address when the current location and the target historical location meet a preset condition.
Optionally, referring to fig. 8, the wireless access point information list includes a confidence level of a historical location corresponding to historical wireless access point information, and the address determining module 705 includes:
the average submodule 7051 is configured to obtain and calculate an average of confidence degrees of the target historical positions when a difference between the current position and the target historical position is smaller than a first preset threshold;
and the address determining submodule 7052 is configured to determine that the current IP address of the target client is the real IP address when the average value is greater than the second preset threshold.
Optionally, referring to fig. 9, the information of the wireless access point is a WiFi name, and the information obtaining module 701 includes:
a name obtaining submodule 7011, configured to obtain one or more WiFi names currently searched by the target client;
the information matching module 703 includes:
the list matching sub-module 7031 is configured to match one or more WiFi names obtained through current search with a wireless access point information list counted in advance, so as to obtain historical wireless access point information successfully matched with the obtained one or more WiFi names.
Optionally, referring to fig. 10, the apparatus further includes:
a wireless access point module 1001 configured to acquire IP addresses of a plurality of clients and information of a wireless access point retrieved by each client;
a client location module 1002, configured to obtain a location of each client according to multiple client IP addresses;
a confidence coefficient calculation module 1003, configured to count, for each wireless access point, the total number of the clients that have been retrieved for each access point and the number of the clients that have been retrieved for different addresses in the clients that have been retrieved for each wireless access point, and calculate one or more positions corresponding to each wireless access point and confidence coefficients corresponding to the different positions;
a point information list module 1004, configured to obtain a wireless access point information list according to one or more positions corresponding to each wireless access point and confidence degrees of corresponding different positions.
Optionally, referring to fig. 11, the wireless access point module 1001 includes:
an address name submodule 1101, configured to obtain IP addresses of multiple clients and WiFi names retrieved by the clients;
the above-mentioned device still includes:
the name splitting module 1102 is configured to split the WiFi name according to a preset character to obtain a first name and a second name, where the first name and the second name may be spliced with the preset character to obtain the WiFi name;
a first matching module 1103, configured to match the first name with a pre-statistical name set;
and the second matching module 1104 is configured to match the second name with the preset rule after the matching is successful.
Therefore, by the IP address checking device in the embodiment of the application, the position corresponding to the IP address of the target client can be obtained, the actual position of the target client can be judged according to the current wireless access point information searched by the target client, and whether the IP of the target client is the modified IP can be judged according to the matching between the corresponding position and the actual position, so that the client can be prevented from modifying the IP address maliciously, and the user experience is improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 12, including a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, where the processor 1201, the communication interface 1202, and the memory 1203 complete mutual communication through the communication bus 1204,
a memory 1203 for storing a computer program;
the processor 1201 is configured to implement the following steps when executing the program stored in the memory 1203:
acquiring a current IP address of a target client and current wireless access point information of the target client, wherein the current wireless access point information of the target client is information of one or more wireless access points searched by the target client currently;
acquiring the current position of a target client according to the current IP address of the target client;
matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
determining a historical position corresponding to historical wireless access point information successfully matched with the current wireless access point information to obtain a target historical position;
and when the current position and the target historical position meet the preset conditions, judging that the current IP address of the target client is the real IP address.
When the processor executes the program stored in the memory, the IP address verification method described in any of the embodiments above may also be implemented.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the IP address verification method in any one of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for verifying an IP address as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for verifying an IP address, comprising:
acquiring a current IP address of a target client and current wireless access point information of the target client, wherein the current wireless access point information of the target client is information of one or more wireless access points searched by the target client currently;
acquiring the current position of the target client according to the current IP address of the target client;
matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
determining a historical position corresponding to the historical wireless access point information successfully matched with the current wireless access point information to obtain a target historical position;
and when the current position and the target historical position meet preset conditions, judging that the current IP address of the target client is a real IP address.
2. The method according to claim 1, wherein the wireless access point information list includes a confidence level of a historical location corresponding to the historical wireless access point information, and when the current location and the target historical location satisfy a preset condition, it is determined that the current IP address of the target client is a real IP address, including:
when the difference value between the current position and the target historical position is smaller than a first preset threshold value, obtaining and calculating the average value of the confidence degrees of the target historical position;
and when the average value is larger than a second preset threshold value, determining that the current IP address of the target client is a real IP address.
3. The method of claim 1, wherein the wireless access point information is a WiFi name, and wherein the obtaining the current IP address of the target client and the current wireless access point information of the target client comprises:
acquiring one or more WiFi names currently searched by a target client;
the matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information comprises the following steps:
and matching the one or more WiFi names obtained by the current search with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the one or more obtained WiFi names.
4. The method according to claim 1, wherein the method for obtaining the pre-counted wireless access point information list comprises:
acquiring IP addresses of a plurality of clients and information of wireless access points searched by the clients;
acquiring the position of each client according to the IP addresses of the clients;
for each wireless access point, counting the total number of the clients which retrieve each access point and the number of the clients which retrieve each wireless access point and correspond to different addresses, and calculating one or more positions corresponding to each wireless access point and confidence degrees corresponding to different positions;
and obtaining the wireless access point information list according to one or more positions corresponding to each wireless access point and the confidence degrees of the corresponding different positions.
5. The method of claim 3 or 4, wherein the obtaining the IP addresses of the plurality of clients and the information of the wireless access point retrieved by each client comprises:
acquiring IP addresses of a plurality of clients and WiFi names retrieved by the clients;
before counting, for each wireless access point, the total number of the clients that have retrieved the access point and the number of the clients that have retrieved different addresses from among the clients that have retrieved the wireless access point, and calculating the confidence of one or more locations and corresponding different locations corresponding to the wireless access point, the method further includes:
splitting the WiFi name according to a preset character to obtain a first name and a second name, wherein the first name and the second name can be spliced with the preset character to obtain the WiFi name;
matching the first name with a pre-statistical name set;
and matching the second name with a preset rule after the matching is successful.
6. An apparatus for verifying an IP address, comprising:
the information acquisition module is used for acquiring the current IP address of a target client and the current wireless access point information of the target client, wherein the current wireless access point information of the target client is the information of one or more wireless access points searched by the target client currently;
the position acquisition module is used for acquiring the current position of the target client according to the current IP address of the target client;
the information matching module is used for matching the current wireless access point information with a wireless access point information list which is counted in advance to obtain historical wireless access point information which is successfully matched with the current wireless access point information, wherein the historical wireless access point information and historical positions corresponding to the historical wireless access point information are recorded in the wireless access point information list;
the historical position module is used for determining the historical position corresponding to the historical wireless access point information which is successfully matched with the current wireless access point information to obtain a target historical position;
and the address judgment module is used for judging that the current IP address of the target client is a real IP address when the current position and the target historical position meet preset conditions.
7. The apparatus according to claim 6, wherein the wireless access point information list includes a confidence level of a historical location corresponding to the historical wireless access point information, and the address determination module includes:
the average value submodule is used for acquiring and calculating an average value of confidence degrees of the target historical positions when the difference value between the current position and the target historical positions is smaller than a first preset threshold value;
and the address judgment submodule is used for judging that the current IP address of the target client is a real IP address when the average value is larger than a second preset threshold value.
8. The apparatus of claim 6, wherein the wireless access point information is a WiFi name, and the information obtaining module comprises:
the name acquisition submodule is used for acquiring one or more WiFi names currently searched by the target client;
the information matching module comprises:
and the list matching submodule is used for matching the one or more WiFi names obtained by current search with a wireless access point information list counted in advance to obtain historical wireless access point information successfully matched with the obtained one or more WiFi names.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202010537400.1A 2020-06-12 2020-06-12 IP address verification method and device, electronic equipment and storage medium Pending CN111698765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010537400.1A CN111698765A (en) 2020-06-12 2020-06-12 IP address verification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010537400.1A CN111698765A (en) 2020-06-12 2020-06-12 IP address verification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111698765A true CN111698765A (en) 2020-09-22

Family

ID=72480923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010537400.1A Pending CN111698765A (en) 2020-06-12 2020-06-12 IP address verification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111698765A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114630263A (en) * 2020-11-27 2022-06-14 广州视源电子科技股份有限公司 Method and device for identifying position change of electronic equipment and computer equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110106930A1 (en) * 2009-10-30 2011-05-05 Samsung Electronics Co., Ltd. Apparatus and method for accessing a network in a wireless terminal
US20120252482A1 (en) * 2011-04-02 2012-10-04 Recursion Software, Inc. System and method for determining geolocation of wireless access point or wireless device
WO2015117396A1 (en) * 2014-08-22 2015-08-13 中兴通讯股份有限公司 Wi-fi signal-based positioning method, device, and system
US20170111851A1 (en) * 2015-10-19 2017-04-20 Time Warner Cable Enterprises Llc Method and apparatus for automatic geoaware access point provisioning
US20180242233A1 (en) * 2017-02-20 2018-08-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd, Wireless fidelity connection method, mobile terminal and storage medium
CN109688096A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 Recognition methods, device, equipment and the computer readable storage medium of IP address
CN110913038A (en) * 2019-12-27 2020-03-24 中国平安人寿保险股份有限公司 IP address determination method, device, server and computer readable storage medium
US20200169979A1 (en) * 2017-11-06 2020-05-28 Google Llc Evaluating Ip Location On A Client Device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110106930A1 (en) * 2009-10-30 2011-05-05 Samsung Electronics Co., Ltd. Apparatus and method for accessing a network in a wireless terminal
US20120252482A1 (en) * 2011-04-02 2012-10-04 Recursion Software, Inc. System and method for determining geolocation of wireless access point or wireless device
WO2015117396A1 (en) * 2014-08-22 2015-08-13 中兴通讯股份有限公司 Wi-fi signal-based positioning method, device, and system
US20170111851A1 (en) * 2015-10-19 2017-04-20 Time Warner Cable Enterprises Llc Method and apparatus for automatic geoaware access point provisioning
US20180242233A1 (en) * 2017-02-20 2018-08-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd, Wireless fidelity connection method, mobile terminal and storage medium
US20200169979A1 (en) * 2017-11-06 2020-05-28 Google Llc Evaluating Ip Location On A Client Device
CN109688096A (en) * 2018-09-07 2019-04-26 平安科技(深圳)有限公司 Recognition methods, device, equipment and the computer readable storage medium of IP address
CN110913038A (en) * 2019-12-27 2020-03-24 中国平安人寿保险股份有限公司 IP address determination method, device, server and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114630263A (en) * 2020-11-27 2022-06-14 广州视源电子科技股份有限公司 Method and device for identifying position change of electronic equipment and computer equipment

Similar Documents

Publication Publication Date Title
US9491182B2 (en) Methods and systems for secure internet access and services
CN110888838B (en) Request processing method, device, equipment and storage medium based on object storage
WO2021012509A1 (en) Method, device, and computer storage medium for detecting abnormal account
CN110113393B (en) Message pushing method and device, electronic equipment and medium
CN110798488B (en) Web application attack detection method
CN112134954A (en) Service request processing method and device, electronic equipment and storage medium
CN112533209B (en) Black product identification method and black product identification device
CN109067794B (en) Network behavior detection method and device
WO2017101703A1 (en) Method and apparatus for recognizing service request to change mobile phone number
CN111698765A (en) IP address verification method and device, electronic equipment and storage medium
CN113572721B (en) Abnormal access detection method and device, electronic equipment and storage medium
CN111131166B (en) User behavior prejudging method and related equipment
CN116186753A (en) File storage access system based on big data
CN110727895A (en) Sensitive word sending method and device, electronic equipment and storage medium
US20230171264A1 (en) Method, Apparatus, System, Device, and Storage Medium for Implementing Terminal Verification
CN111177362A (en) Information processing method, device, server and medium
EP3424005A1 (en) Counterfeit electronic device detection
CN113590180B (en) Detection strategy generation method and device
CN113220949B (en) Construction method and device of private data identification system
CN112765502B (en) Malicious access detection method, device, electronic equipment and storage medium
CN114429177A (en) Equipment fingerprint feature screening method and device, electronic equipment and storage medium
CN113674083A (en) Internet financial platform credit risk monitoring method, device and computer system
CN114363082A (en) Network attack detection method, device, equipment and computer readable storage medium
CN111143644B (en) Identification method and device of Internet of things equipment
CN109246686B (en) Multi-card user address book updating method and device based on cloud technology

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200922

RJ01 Rejection of invention patent application after publication