CN109743745B - Mobile network access type identification method and device, electronic equipment and storage medium - Google Patents

Mobile network access type identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109743745B
CN109743745B CN201910122431.8A CN201910122431A CN109743745B CN 109743745 B CN109743745 B CN 109743745B CN 201910122431 A CN201910122431 A CN 201910122431A CN 109743745 B CN109743745 B CN 109743745B
Authority
CN
China
Prior art keywords
address
network
node
mobile
binary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910122431.8A
Other languages
Chinese (zh)
Other versions
CN109743745A (en
Inventor
王文超
段航
王程
孙翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201910122431.8A priority Critical patent/CN109743745B/en
Publication of CN109743745A publication Critical patent/CN109743745A/en
Priority to PCT/CN2019/120219 priority patent/WO2020168768A1/en
Application granted granted Critical
Publication of CN109743745B publication Critical patent/CN109743745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a mobile network access type identification method, belongs to the technical field of computers, and is used for solving the problem of low identification accuracy rate in the prior art. The method for identifying the access type of the mobile network disclosed by the embodiment of the application comprises the following steps: acquiring an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment; acquiring a network outlet IP address of equipment accessed to a network; and matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result. According to the mobile network access type identification method disclosed by the embodiment of the application, the accuracy of determining whether the hotspot accessed by the mobile equipment is the mobile equipment network or not can be improved by the outlet IP address based on the equipment and the huge mobile equipment IP address information base.

Description

Mobile network access type identification method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for identifying a mobile network access type, an electronic device, and a storage medium.
Background
With the development of internet technology, more and more value-added services are provided for clients. The network type used when the client accesses the server is determined, and the service can be better provided for the client. For example, for a client accessing a server through a 4G network, when a user watches a video, a video data stream compressed by the user may be provided, or a network state where the user is located may be prompted, so as to avoid consuming a large amount of 4G data traffic of the client.
The MAC address is a unique identification of the network device. Different manufacturers can independently select some MAC address fields for network equipment, so that in the prior art, the client side accessing the server is generally judged to access the network through the router or the 4G signal of the mobile phone through the MAC section. However, if a device vendor uses a MAC address for a router for a handset, identifying the access type of the mobile network based on the MAC address would be inaccurate.
Disclosure of Invention
The application provides a mobile network access type identification method which is beneficial to improving the identification accuracy of the mobile network access type.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides a mobile network access type identification method, including:
acquiring an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment;
acquiring a network outlet IP address of equipment accessed to a network;
and matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result.
In a second aspect, an embodiment of the present application provides a mobile network access type identification apparatus, including:
the IP address information base acquisition module is used for acquiring an IP address information base, and the IP address information base comprises IP address information of the mobile equipment;
the network outlet IP address acquisition module is used for acquiring the network outlet IP address of the equipment accessed to the network;
and the matching identification module is used for matching the network outlet IP address with the IP address information in the IP address information base and determining whether the accessed network is a mobile equipment hotspot according to a matching result.
In a third aspect, an embodiment of the present application further discloses an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for identifying a mobile network access type according to the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the computer program is used to perform the steps of the mobile network access type identification method disclosed in the present application.
The method for identifying the access type of the mobile network, disclosed by the embodiment of the application, comprises the steps of obtaining an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment; acquiring a network outlet IP address of equipment accessed to a network; and matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result, which is helpful for solving the problem of inaccuracy existing in the prior art when the mobile equipment hotspot is identified based on the MAC address. By means of the outlet IP address based on the equipment and the huge mobile equipment IP address information base, the accuracy of determining whether the hotspot accessed by the mobile equipment is the mobile equipment network can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a mobile network access type identification method according to a first embodiment of the present application;
fig. 2 is a flowchart of a mobile network access type identification method according to a second embodiment of the present application;
fig. 3 is a schematic diagram of a binary IP address distribution tree constructed in the second embodiment of the present application;
fig. 4 is a schematic structural diagram of a mobile network access type identification apparatus according to a second embodiment of the present application;
fig. 5 is a second schematic structural diagram of a mobile network access type identification apparatus according to a second embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
As shown in fig. 1, a method for identifying a mobile network access type disclosed in this embodiment includes: step 110 to step 130.
Step 110, an IP address information base is obtained, wherein the IP address information base comprises the IP address information of the mobile equipment.
With the development of mobile internet technology and the development of mobile device technology, positioning a mobile terminal has been a basic function for improving the quality of service of a user. For example, in the process of using the navigation client software by the user, in combination with GPS positioning data, the navigation client software uploads the geographical position of the mobile terminal to the positioning server through a mobile network (e.g., 3G or 4G network), so that the positioning server plans a route for the navigation client. For another example, when the user uses the e-commerce platform client, the service provided by the e-commerce platform based on the current location may be obtained by connecting to the e-commerce platform server through a mobile network (e.g., WiFi, Wireless Fidelity) or a cell broadband. In many application scenarios like the above, positioning data of the user's mobile terminal is generated. In the prior art, each piece of positioning data usually includes the network type of the mobile terminal of the user accessing the network, and the exit IP address of the client accessing the server. Wherein the network types include, but are not limited to: 2G network, 3G network, 4G network, WiFi, cell broadband.
In the embodiment of the application, the mass positioning data is collected, the data analysis processing is carried out on the positioning data, the network type is extracted from the positioning data as the mobile terminal network, the further analysis processing is carried out on the positioning data, and an IP address information base is constructed.
In some embodiments of the present application, the step of obtaining the IP address information base includes: obtaining a plurality of pieces of device location data, each piece of device location data comprising: the network type of a device access network and the IP address of the device; and constructing an IP address information base according to the equipment positioning data with the network type of the mobile network in the equipment positioning data. For example, the IP address in the positioning data of the device with the network type of 2G network, 3G network, or 4G network is added to the IP address information base to construct the IP address information base.
Step 120, a network outlet IP address of the device accessing the network is obtained.
Typically, an operator will fixedly dedicate a particular public network IP and egress device to different network types. For example, institutions and universities unify IP addresses assigned by CERNET to the institutions and scientific research institutions. There are also for example: public network IP addresses of a common base station, a public outlet of the base station, a common machine room, a special outlet, a cell broadband, an enterprise broadband, a public place and the like are generally distributed according to set rules. Thus, the egress IP address of the mobile device hotspot is what can be used to identify the access network type.
The devices in the internet are layered, a terminal user is positioned at the bottommost layer, a data packet of the terminal needs to be forwarded layer by layer upwards, finally, one outlet device transmits the data packet to the public network and then reaches a target server, the last outlet device has a public network IP address, and the target server can obtain the public network IP address of the outlet device. For example, a user connects to a router in a home through a mobile phone, then connects to a cell broadband through the router in the home, and finally accesses to the clique server, and the clique server can obtain a cell broadband exit IP address in an access request of the user. If the user accesses the network through the WiFi hotspot of the other mobile phone and accesses the American group server, the American group acquires the IP address of the mobile network after the other mobile phone is connected with the 2G, 3G or 4G base station.
In a specific application process, after a server acquires a service access request sent by a client installed on user equipment, a network outlet IP address of the equipment access network can be acquired through network data uploaded by the client running on the equipment.
Step 130, matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile device hotspot according to the matching result.
And then, the server matches the acquired network outlet IP address with an IP address in a pre-constructed IP address information base, and if the matching is successful, the network contacted by the user is a mobile network, namely the user accesses the network through a mobile device hotspot. For example, the user accesses the network through a WiFi hotspot of another handset. If the user accesses the network through the cell broadband, the matching is failed when the acquired network outlet IP address is matched with the IP address in the pre-constructed IP address information base.
The method for identifying the access type of the mobile network, disclosed by the embodiment of the application, comprises the steps of obtaining an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment; acquiring a network outlet IP address of equipment accessed to a network; and matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result, which is helpful for solving the problem of inaccuracy existing in the prior art when the mobile equipment hotspot is identified based on the MAC address. With the development of the mobile internet technology, it is possible to obtain massive positioning data, and therefore, when the method is specifically implemented, a comprehensive IP address of the mobile network can be obtained based on the positioning data, so that the constructed IP address information base covers the comprehensive IP address of the mobile device, and therefore the identification of the type of the access network based on the network exit IP address can be realized.
Example two
As shown in fig. 2, a method for identifying a mobile network access type disclosed in this embodiment includes: step 210 to step 240.
Step 210, an IP address information base is obtained, wherein the IP address information base comprises the IP address information of the mobile device.
Although the embodiment of the application collects mass positioning data, analyzes and processes the positioning data, extracts the network type of the positioning data as the positioning data of the mobile terminal network, further analyzes and processes the positioning data, and constructs the IP address information base. In order to avoid that a new online IP address cannot be matched, and further improve the accuracy of mobile network hotspot identification, in some preferred embodiments of the application, the step of constructing an IP address information base according to the device location data in which the network type is a mobile network includes: determining an IP address field of the mobile equipment according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data; and constructing an IP address information base based on the IP address field of the mobile equipment.
The IP address is made up of 4 sets of numbers, each set of numbers having a maximum value of 255. In practical applications, the subnet partition is essentially based on binary IP addresses. Due to network security and other considerations, IP allocation is usually performed according to a subnet division mode. For example 172.16.1.0 and 172.16.1.25 may be considered to be in a subnet with mask 172.16.1.255. Therefore, when constructing the IP address information base, z determines an IP address field according to the acquired IP address of the mobile network access point based on the above idea, and then constructs the IP address information base based on the IP address field. The IP address information base constructed by the method comprises an IP address section corresponding to the mobile network hotspot.
The construction of the IP address segment can be greatly simplified by converting the IP address back to a binary representation and then constructing a binary tree.
In some preferred embodiments of the application, the step of determining an IP address field of the mobile device according to the device location data of which the network type is a mobile network in the device location data includes: converting an IP address in the equipment positioning data of which the network type is a mobile network in the equipment positioning data into a binary IP address; constructing an IP address distribution binary tree based on the binary IP address; the leaf nodes of the binary tree correspond to different binary IP addresses, and each node in the upper N layers of nodes of the leaf nodes corresponds to a corresponding IP address prefix and a node weight; the IP address prefix is the first (32-N) binary bits of the leaf node, the node weight is determined according to the number of the leaf nodes corresponding to the binary IP address with the IP address prefix, and N is an integer greater than or equal to 1; respectively traversing the binary tree from the node on the previous layer of each leaf node upwards layer by layer, and determining a target node meeting a preset condition, wherein the preset condition is as follows: the node weight of the brother node is more than 1 or equal to 0, and the node weight of the brother node is more than 1; and determining a corresponding IP address field according to the IP address prefix corresponding to the target node.
For example, first converting the IP address in the device location data of the mobile network type into a binary IP address, a 32-bit binary representation of the IP address can be obtained. Taking the IP address "1.1.1.1" as an example, the conversion to a binary IP address may be represented as "00000001000000010000000100000001". According to the method, all the IP addresses in the device positioning data of which the network type is the mobile network are converted into binary IP addresses.
And then, constructing a binary tree with 33 layers, wherein the topmost layer is a root node, and the bottommost layer is a leaf node. And classifying the binary IP addresses based on all the binary IP addresses obtained by the binary tree traversal conversion. Taking binary IP address "00000001000000010000000100000001" as an example, each bit of the binary IP address is classified in sequence based on the binary tree starting from the highest bit of the binary IP address, and the node corresponding to the binary IP address is determined. For example, for the highest bit "0" of the binary IP address, the binary tree is classified as follows: if the binary number value corresponding to the bit is 0, classifying the binary IP address into an IP address set corresponding to a left sub-tree of the current node; if the binary number value corresponding to the bit is 1, the binary IP address is classified into the IP address set corresponding to the right subtree of the current node. Then, the child nodes of the current node further carry out progressive classification according to the classification method until the binary IP address is classified to a certain leaf node of the binary tree. In the classification process, when the binary IP address is classified into an IP address set corresponding to a subtree on a certain side of the current node, the number of the binary IP addresses classified into the subtree on the side and the longest prefix of the binary IP address classified into the subtree on the side can be recorded by the child node of the current node corresponding to the subtree. For example, after sorting a number of binary IP addresses through binary tree traversal, a binary tree as shown in fig. 3 can be obtained. In the binary tree shown in fig. 3, leaf nodes 301 and 302 correspond to a binary IP address "00000000000000000000000000000000" and "00000000000000000000000000000001", respectively; the upper node 311 of the leaf node 301 corresponds to an IP address prefix of "0000000000000000000000000000000", and the number of binary IP addresses classified into the subtree in which the node 311 is located is 2.
In some embodiments of the present application, determining the node weight according to the number of leaf nodes corresponding to the binary IP address having the IP address prefix includes: the node weight is equal to the number of binary IP addresses having the IP address prefix; or when the number of binary IP addresses with the IP address prefixes is greater than 1, the node weight is greater than 1; when the number of binary IP addresses having the IP address prefix is equal to 1, the node weight is equal to 1; the node weight is equal to 0 when the number of binary IP addresses with the IP address prefix is equal to 0. For example, the node weight of the node 311 may be set to 2.
After constructing a binary tree for representing the distribution of binary IP addresses, IP address segments are determined by the distribution information of the binary IP addresses determined by the subtrees of the binary tree. In specific implementation, the nodes in the binary tree are traversed layer by layer on a line from the leaf node, a target node meeting a preset condition is searched, and an IP address segment in a subnet determined by the IP address prefix of the target node is added into an IP address information base. For example, for the previous node 311 of the leaf nodes 301 and 302, the node weight of itself is 2, the node weight of the sibling node 312 is 1, and if the preset condition is not satisfied, the traversal of the previous node is continued. If the node weight of the node 321 itself is 5 and the node weight of the sibling node 322 is 0, and the above predetermined condition is satisfied, the node 321 is set as the target node. And adding an IP address field formed by all IP addresses in the subnet determined by the IP address prefix "000000000000000000000000000000" corresponding to the node 321 into the IP address information base.
As can be seen from the binary tree shown in fig. 3, there are only 3 mobile network access points actually acquiring the positioning data, and the IP addresses are: "00000000000000000000000000000000", "00000000000000000000000000000001" and "00000000000000000000000000000011", however, the IP address fields added to the IP address information base are 0.0.0.0 to 0.0.0.3, i.e., the IP addresses added to the IP address information base include "00000000000000000000000000000010" in addition to the above-mentioned 3 IPs. Therefore, the IP address information base can be expanded and perfected by converting the IP address into the binary system, classifying the binary tree and determining the IP address segment corresponding to the subtree of the composite condition.
The method is also combined with the idea of dividing the IP address according to the sub-network based on the consideration of network security and the like in the actual IP address allocation process.
Step 220, the network outlet IP address of the device accessing the network is obtained.
For a specific implementation of obtaining a network exit IP address of a device accessing a network, refer to the first embodiment, which is not described in detail herein.
And step 230, matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result.
And then, the server matches the acquired network outlet IP address with an IP address in a pre-constructed IP address information base, and if the matching is successful, the network accessed by the user is a mobile network, namely the user accesses the network through a mobile device hotspot. In specific implementation, the IP address information base includes an IP address field in which the network type of the device access network is the mobile terminal, and the step of matching the network outlet IP address with the IP address information in the IP address information base includes: and matching the network outlet IP address with the IP addresses included in the IP address fields in the IP address information base. For example, if the user accesses the network through the WiFi hotspot of another mobile phone, the obtained network outlet IP address of the user is the IP address of the mobile device hotspot, and the network outlet IP address of the user is successfully matched with the IP address in the IP address information base. If the user accesses the network through the cell broadband, the acquired network outlet IP address is the IP address of the cell broadband, and the matching is failed when the acquired network outlet IP address is matched with the IP address in the pre-constructed IP address information base.
And if the network outlet IP address of the user equipment is successfully matched with the IP address information in the IP address information base, determining that the network accessed by the user equipment is a mobile equipment hotspot.
Step 240, if it is determined that the accessed network is a mobile device hotspot, when it is detected that the device executes video browsing or file downloading operation, prompting the type of the current access network hotspot.
In some embodiments of the present application, after the step of determining whether the accessed network is a mobile device hotspot according to the matching result, the method further includes: and if the accessed network is determined to be a mobile equipment hotspot, prompting the type of the current access network hotspot when the equipment is detected to execute video browsing or file downloading operation.
In a specific application process, after the accessed network is determined to be the mobile device hotspot, a prompt related to the corresponding network application can be given. For example, when the user plays a video through a mobile phone WiFi hotspot of another user, or when the user downloads a file through a mobile phone WiFi hotspot of another user, the user may be prompted that the currently used network is a mobile device hotspot, thereby avoiding user traffic consumption for opening the mobile phone WiFi hotspot.
According to the mobile network access type identification method disclosed by the embodiment of the application, the IP address of the mobile equipment access point is obtained based on the positioning data, the IP address is further converted into a binary form, the IP address is classified through the binary tree, and finally, the IP address segment of the mobile equipment access point is determined according to the classification result of the binary tree, so that the IP address information base is effectively expanded, and the accuracy of determining the hot spot of the mobile equipment based on the outlet IP address is improved.
Furthermore, after the accessed network is determined to be the mobile device hotspot, when the operation of consuming a large amount of network traffic is judged to be performed by the user, the user is prompted to be currently located in the mobile device hotspot network, so that the traffic consumption of the mobile device hotspot is avoided, and the user experience is further improved.
EXAMPLE III
As shown in fig. 4, the apparatus for identifying a mobile network access type disclosed in this embodiment includes:
an IP address information base obtaining module 410, configured to obtain an IP address information base, where the IP address information base includes IP address information of the mobile device;
a network exit IP address obtaining module 420, configured to obtain a network exit IP address of a device accessing a network;
and the matching identification module 430 is configured to match the network outlet IP address with the IP address information in the IP address information base, and determine whether the accessed network is a mobile device hotspot according to a matching result.
Optionally, the IP address information base obtaining module 410 is further configured to:
obtaining a plurality of pieces of device location data, each piece of device location data comprising: the network type of a device access network and the IP address of the device;
and constructing an IP address information base according to the equipment positioning data with the network type of the mobile network in the equipment positioning data.
The mobile network access type identification device disclosed by the embodiment of the application acquires an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment; acquiring a network outlet IP address of equipment accessed to a network; and matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result, which is helpful for solving the problem of inaccuracy existing in the prior art when the mobile equipment hotspot is identified based on the MAC address. With the development of the mobile internet technology, it is possible to obtain massive positioning data, and therefore, when the method is specifically implemented, a comprehensive IP address of the mobile network can be obtained based on the positioning data, so that the constructed IP address information base covers the comprehensive IP address of the mobile device, and therefore the identification of the type of the access network based on the network exit IP address can be realized.
Optionally, the constructing an IP address information base according to the device location data in which the network type is a mobile network includes:
determining an IP address field of the mobile equipment according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data;
and constructing an IP address information base based on the IP address field of the mobile equipment.
Optionally, the determining an IP address segment of the mobile device according to the device location data of which the network type is the mobile network in the device location data includes:
converting an IP address in the equipment positioning data of which the network type is a mobile network in the equipment positioning data into a binary IP address;
constructing an IP address distribution binary tree based on the binary IP address; the leaf nodes of the binary tree correspond to different binary IP addresses, and each node in the upper N layers of nodes of the leaf nodes corresponds to a corresponding IP address prefix and a node weight; the IP address prefix is the first 32-N binary digits of the leaf node, the node weight is determined according to the leaf node number corresponding to the binary IP address with the IP address prefix, and N is an integer greater than or equal to 1;
respectively traversing the binary tree from the node on the previous layer of each leaf node upwards layer by layer, and determining a target node meeting a preset condition, wherein the preset condition is as follows: the node weight of the brother node is more than 1 or equal to 0, and the node weight of the brother node is more than 1;
and determining a corresponding IP address field according to the IP address prefix corresponding to the target node.
In other embodiments of the present application, as shown in fig. 5, the apparatus further comprises:
a network hotspot type prompting module 440, configured to prompt a current network hotspot type when it is detected that the device executes video browsing or file downloading operation if it is determined that the accessed network is a mobile device hotspot.
The mobile network access type identification device disclosed by the embodiment of the application acquires the IP address of the mobile equipment access point based on the positioning data, further converts the IP address into a binary form, classifies the IP address through the binary tree, and finally determines the IP address segment of the mobile equipment access point according to the classification result of the binary tree, so that the IP address information base is effectively expanded, and the accuracy of determining the hot spot of the mobile equipment based on the outlet IP address is improved.
Furthermore, after the accessed network is determined to be the mobile device hotspot, when the operation of consuming a large amount of network traffic is judged to be performed by the user, the user is prompted to be currently located in the mobile device hotspot network, so that the traffic consumption of the mobile device hotspot is avoided, and the user experience is further improved.
The mobile network access type identification device disclosed in the embodiment of the present application is suitable for implementing the mobile network access type identification methods described in the first embodiment and the second embodiment, and specific implementation technical solutions of each module of the device refer to relevant steps of the method, which is not described in detail in this embodiment.
Correspondingly, the application also discloses an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the mobile network access type identification method according to the first embodiment and the second embodiment of the application. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer and the like.
The present application also discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the mobile network access type identification method as described in the first and second embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The method and the device for identifying the access type of the mobile network provided by the application are introduced in detail, a specific example is applied in the method to explain the principle and the implementation of the application, and the description of the embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Claims (4)

1. A method for identifying a mobile network access type is characterized by comprising the following steps:
acquiring an IP address information base, wherein the IP address information base comprises IP address information of mobile equipment;
acquiring a network outlet IP address of equipment accessed to a network;
matching the network outlet IP address with the IP address information in the IP address information base, and determining whether the accessed network is a mobile equipment hotspot according to a matching result; if the accessed network is determined to be a mobile device hotspot, prompting the type of the current access network hotspot when the device is detected to execute video browsing or file downloading operation;
the step of obtaining the IP address information base comprises the following steps:
obtaining a plurality of pieces of device location data, each piece of device location data comprising: the network type of a device access network and the IP address of the device;
constructing an IP address information base according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data;
the step of constructing an IP address information base according to the device location data in which the network type is a mobile network includes:
determining an IP address field of the mobile equipment according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data;
constructing an IP address information base based on the IP address field of the mobile equipment;
the step of determining the IP address field of the mobile device according to the device location data in which the network type is the mobile network includes:
converting an IP address in the equipment positioning data of which the network type is a mobile network in the equipment positioning data into a binary IP address;
constructing an IP address distribution binary tree based on the binary IP address; the leaf nodes of the binary tree correspond to different binary IP addresses, and each node in the upper N layers of nodes of the leaf nodes corresponds to a corresponding IP address prefix and a node weight; the IP address prefix is the first 32-N binary digits of the leaf node, the node weight is determined according to the leaf node number corresponding to the binary IP address with the IP address prefix, and N is an integer greater than or equal to 1;
respectively traversing the binary tree from the node on the previous layer of each leaf node upwards layer by layer, and determining a target node meeting a preset condition, wherein the preset condition is as follows: the node weight of the brother node is more than 1 or equal to 0, and the node weight of the brother node is more than 1;
determining a corresponding IP address field according to the IP address prefix corresponding to the target node;
the node weight is determined according to the leaf node number corresponding to the binary IP address with the IP address prefix, and the method comprises the following steps: the node weight is equal to the number of binary IP addresses having the IP address prefix; or when the number of binary IP addresses with the IP address prefixes is greater than 1, the node weight is greater than 1; when the number of binary IP addresses having the IP address prefix is equal to 1, the node weight is equal to 1; the node weight is equal to 0 when the number of binary IP addresses with the IP address prefix is equal to 0.
2. An apparatus for identifying a mobile network access type, comprising:
the IP address information base acquisition module is used for acquiring an IP address information base, and the IP address information base comprises IP address information of the mobile equipment;
the network outlet IP address acquisition module is used for acquiring the network outlet IP address of the equipment accessed to the network;
the matching identification module is used for matching the network outlet IP address with the IP address information in the IP address information base, determining whether the accessed network is a mobile equipment hotspot according to a matching result, and prompting the type of the current accessed network hotspot when the equipment is detected to execute video browsing or file downloading operation if the accessed network is determined to be the mobile equipment hotspot;
the IP address information base obtaining module is further configured to:
obtaining a plurality of pieces of device location data, each piece of device location data comprising: the network type of a device access network and the IP address of the device;
constructing an IP address information base according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data;
the establishing an IP address information base according to the device location data in which the network type is a mobile network, includes:
determining an IP address field of the mobile equipment according to the equipment positioning data of which the network type is the mobile network in the equipment positioning data;
constructing an IP address information base based on the IP address field of the mobile equipment;
the determining the IP address segment of the mobile device according to the device location data in which the network type is the mobile network, includes:
converting an IP address in the equipment positioning data of which the network type is a mobile network in the equipment positioning data into a binary IP address;
constructing an IP address distribution binary tree based on the binary IP address; the leaf nodes of the binary tree correspond to different binary IP addresses, and each node in the upper N layers of nodes of the leaf nodes corresponds to a corresponding IP address prefix and a node weight; the IP address prefix is the first 32-N binary digits of the leaf node, the node weight is determined according to the leaf node number corresponding to the binary IP address with the IP address prefix, and N is an integer greater than or equal to 1;
respectively traversing the binary tree from the node on the previous layer of each leaf node upwards layer by layer, and determining a target node meeting a preset condition, wherein the preset condition is as follows: the node weight of the brother node is more than 1 or equal to 0, and the node weight of the brother node is more than 1;
determining a corresponding IP address field according to the IP address prefix corresponding to the target node; the node weight is determined according to the leaf node number corresponding to the binary IP address with the IP address prefix, and the method comprises the following steps: the node weight is equal to the number of binary IP addresses having the IP address prefix; or when the number of binary IP addresses with the IP address prefixes is greater than 1, the node weight is greater than 1; when the number of binary IP addresses having the IP address prefix is equal to 1, the node weight is equal to 1; the node weight is equal to 0 when the number of binary IP addresses with the IP address prefix is equal to 0.
3. 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 mobile network access type identification method of claim 1 when executing the computer program.
4. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the mobile network access type identification method of claim 1.
CN201910122431.8A 2019-02-19 2019-02-19 Mobile network access type identification method and device, electronic equipment and storage medium Active CN109743745B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910122431.8A CN109743745B (en) 2019-02-19 2019-02-19 Mobile network access type identification method and device, electronic equipment and storage medium
PCT/CN2019/120219 WO2020168768A1 (en) 2019-02-19 2019-11-22 Mobile network access type identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910122431.8A CN109743745B (en) 2019-02-19 2019-02-19 Mobile network access type identification method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109743745A CN109743745A (en) 2019-05-10
CN109743745B true CN109743745B (en) 2021-01-22

Family

ID=66367734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910122431.8A Active CN109743745B (en) 2019-02-19 2019-02-19 Mobile network access type identification method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109743745B (en)
WO (1) WO2020168768A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743745B (en) * 2019-02-19 2021-01-22 北京三快在线科技有限公司 Mobile network access type identification method and device, electronic equipment and storage medium
CN112312519B (en) * 2019-07-31 2022-12-27 华为技术有限公司 Equipment identification method and related device
CN110392127B (en) * 2019-08-15 2022-01-11 中盈优创资讯科技有限公司 Network address space identification method and device
CN112235849A (en) * 2020-10-19 2021-01-15 展讯半导体(成都)有限公司 Method, system, electronic device, and medium for identifying Wi-Fi hotspot type

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103313429A (en) * 2013-07-10 2013-09-18 江苏君立华域信息安全技术有限公司 Processing method for recognizing fabricated WIFI (Wireless Fidelity) hotspot
CN103716921A (en) * 2013-12-08 2014-04-09 周良文 Intelligent routing equipment-based WIFI instant messaging system and socializing method
US9154917B2 (en) * 2013-03-13 2015-10-06 Qualcomm Incorporated Method and apparatus for geotagging
CN105959306A (en) * 2016-06-30 2016-09-21 百度在线网络技术(北京)有限公司 IP address identification method and device
CN106658756A (en) * 2016-12-13 2017-05-10 浙江大华技术股份有限公司 Method and device for recognizing connection between terminal device and hotspot
CN107087281A (en) * 2017-04-12 2017-08-22 上海斐讯数据通信技术有限公司 A kind of WiFi sharing methods and its device, a kind of wireless network
US9820155B2 (en) * 2013-05-10 2017-11-14 Relay2, Inc. Cloud site controller manager
US9820099B2 (en) * 2016-02-19 2017-11-14 Electronic Beacons Systems LLC Electronic beacon reader system and method
CN107426746A (en) * 2016-05-24 2017-12-01 中兴通讯股份有限公司 The method and apparatus for identifying WIFI types
CN107707477A (en) * 2017-09-28 2018-02-16 杭州迪普科技股份有限公司 The processing method and processing device of message, computer-readable recording medium
CN108875006A (en) * 2018-06-15 2018-11-23 泰康保险集团股份有限公司 Determine method and device regional belonging to IP address

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8122070B1 (en) * 2005-12-29 2012-02-21 United States Automobile Association (USAA) Document management system user interfaces
CN102394944B (en) * 2011-09-16 2014-01-29 北京新媒传信科技有限公司 Method and equipment for correcting IP (Internet Protocol) address in Web access
CN106488493B (en) * 2015-08-24 2020-06-02 阿里巴巴集团控股有限公司 Method and device for identifying network hotspot type of user and electronic equipment
CN105554171A (en) * 2015-12-15 2016-05-04 上海贝锐信息科技有限公司 Equipment positioning method and system for remote control system
CN105868359A (en) * 2016-03-29 2016-08-17 重庆中陆承大科技有限公司 Address information management and control method and system
US10122725B2 (en) * 2016-05-19 2018-11-06 Centurylink Intellectual Property Llc System and method for implementing community wireless communications service
CN106851779A (en) * 2016-12-07 2017-06-13 广东欧珀移动通信有限公司 A kind of method and mobile terminal for recognizing access point and focus
CN107040965B (en) * 2017-05-10 2020-05-05 维沃移动通信有限公司 Flow control method and device and mobile terminal
CN107124732A (en) * 2017-05-12 2017-09-01 北京奇虎科技有限公司 The method for digging and device of public access wireless LAN
CN108011987B (en) * 2017-10-11 2020-09-04 北京三快在线科技有限公司 IP address positioning method and device, electronic equipment and storage medium
CN109743745B (en) * 2019-02-19 2021-01-22 北京三快在线科技有限公司 Mobile network access type identification method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9154917B2 (en) * 2013-03-13 2015-10-06 Qualcomm Incorporated Method and apparatus for geotagging
US9820155B2 (en) * 2013-05-10 2017-11-14 Relay2, Inc. Cloud site controller manager
CN103313429A (en) * 2013-07-10 2013-09-18 江苏君立华域信息安全技术有限公司 Processing method for recognizing fabricated WIFI (Wireless Fidelity) hotspot
CN103716921A (en) * 2013-12-08 2014-04-09 周良文 Intelligent routing equipment-based WIFI instant messaging system and socializing method
US9820099B2 (en) * 2016-02-19 2017-11-14 Electronic Beacons Systems LLC Electronic beacon reader system and method
CN107426746A (en) * 2016-05-24 2017-12-01 中兴通讯股份有限公司 The method and apparatus for identifying WIFI types
CN105959306A (en) * 2016-06-30 2016-09-21 百度在线网络技术(北京)有限公司 IP address identification method and device
CN106658756A (en) * 2016-12-13 2017-05-10 浙江大华技术股份有限公司 Method and device for recognizing connection between terminal device and hotspot
CN107087281A (en) * 2017-04-12 2017-08-22 上海斐讯数据通信技术有限公司 A kind of WiFi sharing methods and its device, a kind of wireless network
CN107707477A (en) * 2017-09-28 2018-02-16 杭州迪普科技股份有限公司 The processing method and processing device of message, computer-readable recording medium
CN108875006A (en) * 2018-06-15 2018-11-23 泰康保险集团股份有限公司 Determine method and device regional belonging to IP address

Also Published As

Publication number Publication date
CN109743745A (en) 2019-05-10
WO2020168768A1 (en) 2020-08-27

Similar Documents

Publication Publication Date Title
CN109743745B (en) Mobile network access type identification method and device, electronic equipment and storage medium
CN104160681B (en) Method and apparatus for recognizing the application related to IP streams using DNS data
CN109729183B (en) Request processing method, device, equipment and storage medium
CN110365503B (en) Index determination method and related equipment thereof
JP6888078B2 (en) Network function NF management method and NF management device
CN112347377B (en) IP address field searching method, service scheduling method, device and electronic equipment
CN111200523B (en) Method, device, equipment and storage medium for configuring middle platform system
US11451286B2 (en) Communication method and communications device thereof
CN113825129B (en) Industrial Internet asset mapping method in 5G network environment
CN111629081A (en) Internet protocol IP address data processing method and device and electronic equipment
CN108228770A (en) A kind of method and device of application file source inquiry
CN109327356B (en) User portrait generation method and device
CN107948979B (en) Information processing method and device and auditing equipment
CN111431818B (en) Cross-domain request flow distribution method and device, storage medium and computer equipment
CN109673011B (en) Mobile terminal identity information correlation analysis method and device
WO2015165419A1 (en) Service signaling tracing method and device and computer storage medium
CN113055420B (en) HTTPS service identification method and device and computing equipment
KR20080050219A (en) Modifying apparutus and restoring apparutus of management message and method thereof
CN107733767B (en) Method, device and system for establishing social relationship network
CN108737350B (en) Information processing method and client
Lee et al. Network flow data re-collecting approach using 5G testbed for labeled dataset
CN110913340A (en) User identification method and device and computer readable storage medium
US20150234901A1 (en) Data Collector and Associated Method, Computer Program and Computer Program Product
CN115988482A (en) NF (network-to-network) accurate addressing method and device for co-construction shared heterogeneous network roaming scene
CN106714097B (en) Method for determining wireless local area network deployment information, method for positioning terminal and related device

Legal Events

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