Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a WiFi device identification system provided in an embodiment of the present invention, where the system includes: aWiFi device 110, at least oneuser terminal 120, and aserver 130.
TheWiFi device 110 is a wireless access point device such as a router with WiFi capability. Alternatively, when theuser terminal 120 is used to turn on WiFi hotspot sharing, theuser terminal 120 is used as a router.
Theuser terminal 120 is an electronic device having WiFi network access capability, and theuser terminal 120 can connect to a wireless network provided by theWiFi device 110 through WiFi. Optionally, theuser terminal 120 includes: smart phones, tablet computers, smart televisions, laptop portable computers, and the like.
Theserver 130 is a platform providing internet network services. Theserver 130 is provided with data analysis capabilities. Theserver 130 may be one server or a server cluster composed of a plurality of servers, and data between the servers in the server cluster may be shared, or may be a cloud computing service center. The embodiment of the present invention does not limit the physical implementation manner of theserver 130.
Theuser terminal 120 is connected to theWiFi device 110 through a WiFi network, and theWiFi device 110 is connected to theserver 130 through a mobile communication network or the WiFi network.
Fig. 2 is a flowchart of a method for identifying a WiFi device provided in an embodiment of the present invention, and the method for identifying a WiFi device is illustrated as being applied to theserver 130 shown in fig. 1. As shown in fig. 2, the identification method of the WiFi device includes:
step 201, receiving wireless network information reported by a user terminal every a first preset time.
In practical application, the first preset time duration is a time duration calculated by combining an empirical value and an actual situation. Optionally, the first threshold is less than or equal to the first preset time period and less than or equal to the second threshold, where the first threshold is the wireless coverage distance of the WiFi device/the walking speed of the user, for example, if the wireless coverage distance of the WiFi device is 200 meters and the walking speed of the user is 50 meters, the first threshold is 4 minutes; the second threshold is n × wireless coverage distance of the WiFi device/walking speed of the user, for example, the wireless coverage distance of the WiFi device is 200 meters, n is 5, and the walking speed of the user is 50 meters, then the second threshold is 20 minutes. Illustratively, the first predetermined period of time is 15 minutes.
The wireless network information includes: the user identification of the user terminal, the equipment identification of the WiFi equipment and the reporting position.
The user identifier of the user terminal is used for uniquely identifying the user identity, and optionally, the user identifier is an identity card number of the user or a user account number of an application installed on the user terminal. In one possible implementation, the user identification is a user account of an application corresponding to theserver 130. Such as: if theserver 130 is a server of a browser, the user identifier is a user account registered when using the browser; if theserver 130 is a server of a social application, the user identification is the user's social account.
The device identifier of the WiFi device includes a Media Access Control (MAC) address of the WiFi device accessed by the user terminal, such as a MAC address of the wireless router.
The reported position is a position of the user terminal when reporting the wireless network information, and optionally, the reported position is obtained by Positioning by a Global Positioning System (GPS), and may be represented by longitude and latitude data.
Step 202, detecting whether the device identifiers of the WiFi devices in the wireless network information reported by the user terminal in two adjacent times are the same.
Whether the device identifications of the WiFi devices in the wireless network information reported by the user terminal twice are the same or not is detected, so that whether the user terminal accesses the same WiFi device at different moments or not is determined.
Step 203, if the two reported wireless network information are the same, determining the distance between the first reporting position and the second reporting position of the user terminal in the wireless network information reported twice in the adjacent.
If the device identifications of the WiFi devices in the wireless network information reported by the user terminal twice are the same, it is indicated that the user accesses the same WiFi device.
And calculating the distance between the first reporting position and the second reporting position in the wireless network information reported twice, so as to determine the moving distance of the user terminal.
Step 204, it is detected whether the distance is greater than a first predetermined threshold.
Because the signal coverage of the WiFi device is limited, if the distance that the user terminal moves exceeds the signal coverage of the WiFi device, but the user terminal can still access the WiFi device, it indicates that the WiFi device is moving, and therefore, detecting whether the distance that the user terminal moves is greater than the first predetermined threshold value can determine whether the WiFi device that the user terminal accesses is a WiFi device whose deployment position is movable, that is, a mobile WiFi device.
The first predetermined threshold is determined empirically and in practical applications should be greater than the wireless coverage distance of the WiFi device.
Step 205, when the distance is greater than the first predetermined threshold, determining that the WiFi device is a mobile WiFi device.
In summary, in the identification method of the WiFi device provided in the embodiment of the present invention, by receiving the wireless network information, which includes the user identifier of the user terminal, the device identifier of the WiFi device, and the reporting position, reported by the user terminal every first preset time, a distance between a first reporting position and a second reporting position in the wireless network information reported by two adjacent user terminals with the same device identifier is calculated, and if the distance is greater than a first predetermined threshold, the WiFi device is determined to be a mobile WiFi device; because the signal coverage range of the WiFi equipment is limited, if the user terminal still accesses the same WiFi equipment after the moving distance exceeds the signal coverage range of the WiFi equipment, the WiFi equipment is indicated to be mobile WiFi equipment, and therefore the mobile WiFi equipment can be identified.
After the WiFi device is identified as a mobile WiFi device, whether the mobile WiFi device is a regular mobile WiFi device may be further analyzed according to the wireless network data, and even a specific type of the mobile WiFi device may be identified, so as to provide more services for the user terminal accessing the mobile WiFi device according to the type of the mobile WiFi device, please refer to the description in fig. 3A.
Fig. 3A is a flowchart of a method for identifying a WiFi device provided in another embodiment of the present invention, and the method for identifying a WiFi device is illustrated as being applied to theserver 130 shown in fig. 1. As shown in fig. 3A, the identification method of the WiFi device includes:
step 301, receiving wireless network information reported by a user terminal every other first preset time.
The wireless network information includes: the user identification of the user terminal, the equipment identification of the WiFi equipment, the reporting position and the reporting time.
The user identifier of the user terminal is used to uniquely identify the user identity, and optionally, the user identifier is an identity card number of the user or a user account number of an application program logged in the user terminal. In one possible implementation, the user identification is a user account of an application corresponding to theserver 130. Such as: if theserver 130 is a server of a browser, the user identifier is a user account registered when using the browser; if theserver 130 is a server of a social-type application, the user identification is a social account that the user registered when using social software.
The device identification of the WiFi device includes: the MAC address of the WiFi device, such as the MAC address of the wireless router. The user terminal can acquire the device identifier of the WiFi device when accessing the WiFi device, and then actively report the acquired device identifier of the WiFi device to theserver 130.
The reporting position is a position of the user terminal when reporting the wireless network information, and optionally, the reporting position is obtained by positioning by a GPS and can be represented by longitude and latitude data.
The reporting time is the time corresponding to the wireless network information reporting of the user terminal, and can be represented by adopting a predetermined format of year, month, day, hour, minute and second, such as 2016-11-20-20-07-22, and the wireless network information is reported in 2016, 11, month, 20, day, 20, hour, 07 minute and 22 seconds.
For example, assume that the first preset time period is 15 minutes. In the wireless network information reported by the user terminal twice, the wireless network information reported for the first time is as follows: a, a device identifier 00:10:12:11:00:01, a location (longitude: 100, latitude: 100), and a time 2016-11-20-20-00-00; the wireless network information reported by the user terminal for the second time is as follows: user id a, device id 00:10:12:11:00:01, location (longitude: 100, latitude: 101), time 2016-11-20-20-15-00.
Step 302, detecting whether the device identifiers of the WiFi devices in the wireless network information reported by the user terminal in two adjacent times are the same.
Whether the device identifications of the WiFi devices in the wireless network information reported by the user terminal twice are the same or not is detected, so that whether the user terminal accesses the same WiFi device at different moments or not is determined.
Step 303, if the two reported wireless network information are the same, determining a distance between a first reporting position and a second reporting position of the user terminal in the wireless network information reported twice in the adjacent.
If the device identifications of the WiFi devices in the wireless network information reported by the user terminal twice are the same, it is indicated that the user accesses the same WiFi device.
And calculating the distance between the first reporting position and the second reporting position in the wireless network information reported twice, so as to determine the moving distance of the user terminal.
The distance between the first reporting location and the second reporting location may be calculated by a longitude and latitude-based calculation method, and this embodiment does not limit a specific implementation method for calculating the distance between the two reporting locations.
As another branch ofstep 303, if the device identifiers of the WiFi devices in the wireless network information reported by the user terminal at two adjacent times are different, it indicates that the user terminal accesses different WiFi devices at different times.
Optionally, when determining the distance between the first reporting position and the second reporting position in the wireless network information reported by the user terminal twice, the server calculates the distance from the first reporting position to the second reporting position according to the navigation map.
Since the user terminal does not necessarily move linearly when moving, the distance directly calculated according to the first reporting position and the second reporting position may be smaller than the actual moving distance of the user terminal, and therefore the actual distance from the first reporting position to the second reporting position can be calculated according to the navigation map.
Step 304, detecting whether the distance between the first reporting position and the second reporting position is greater than a first predetermined threshold.
Step 305, when the distance is greater than a first predetermined threshold, determining that the WiFi device is a mobile WiFi device.
And when the distance between the first reporting position and the second reporting position is greater than a first preset threshold value, the fact that the moving distance of the user terminal exceeds the wireless coverage distance of the WiFi equipment is indicated, and the fact that the WiFi equipment is mobile WiFi equipment is indicated.
Optionally, when it is determined that the WiFi device is a mobile WiFi device, the server stores the device identifier of the WiFi device and the identification result in a corresponding manner. Such as: the device identification is 00:10:12:11:00:01, and is yes for the mobile WiFi device.
As another branch ofstep 305, when the distance is less than the first predetermined threshold, then the WiFi device may be a fixed location WiFi device.
In order to identify whether the mobile WiFi device is a regular mobile WiFi device, theserver 130 needs to perform further analysis on the received wireless network information, please refer to the description ofstep 308 andstep 309.
And step 306, screening the wireless network information received within the second preset time length, and screening out the wireless network information with the equipment identifier.
The second preset duration is greater than the first preset duration. The second predetermined period is typically selected for a longer period of time, such as a month.
The screening of the wireless network information with the device identifier is to screen the wireless network information which is reported by the user equipment within a second preset time and is related to the same WiFi device.
Step 307, counting the reporting time and/or reporting position in the wireless network information with the device identifier, and detecting whether the mobile WiFi device is a regular mobile WiFi device according to the counting result.
A regular mobile WiFi device is a WiFi device whose mobile location is regular in the time dimension.
And in a longer time period, the user terminal accessed to the WiFi equipment with the equipment identification reports a plurality of groups of wireless network information, and whether the movement of the mobile WiFi equipment is regular or not is identified according to the time dimension and the space dimension.
Alternatively, step 307 may be replaced with the step shown in FIG. 3B:
step 307a, for the wireless network information with the device identifier, counting the reported times of the same reporting position.
Optionally, the same reporting position means that the reporting positions reported multiple times are in the same region range, for example, all in Shenzhen city.
Optionally, the server counts the reported times of the same reporting position within a predetermined time period.
For example, in one month, the statistical result of the wireless network information with the device identifier reported by the server to the user terminal is shown in table 1:
TABLE 1
| Time period | Range of positions | Number of times of being reported |
| 6:00-7:00 | Near Shenzhen station | 1000 |
| 7:00-8:00 | Dongguan tea | 800 |
Step 307b, detecting whether the reported times is greater than a second predetermined threshold.
Alternatively, the second predetermined threshold is set based on empirical values. Such as setting the second predetermined threshold to 500.
Step 307c, if the reported times is greater than the second predetermined threshold, determining that the mobile WiFi device is a regular mobile WiFi device.
When the reported times are greater than a second predetermined threshold, it indicates that the mobile WiFi device appears in the same position for a greater number of times in a fixed time period, and the mobile WiFi device is a regular mobile WiFi device.
And when the mobile WiFi equipment is determined to be regular mobile WiFi equipment, the server correspondingly stores the equipment identification of the mobile WiFi equipment and the identification result. Such as: the device identification is 00:10:12:11:00:01, and is for a regular mobile WiFi device.
After the mobile WiFi equipment is determined to be regular mobile WiFi equipment, the specific type of the regular mobile WiFi equipment can be further determined according to the reported position of the regularity, for example, the specific type can be traffic type mobile WiFi equipment arranged on a high-speed train or a bus, or the specific type can be personal type mobile WiFi equipment shared by personal WiFi and WiFi hotspots. Please refer tosteps 310 to 312.
And 308, matching the traffic route map with the regular reporting positions with the reporting times reaching a second preset threshold value.
If the user terminal accessing the WiFi device appears at the same position in a high frequency within a predetermined time period, the mobile WiFi device may be set on a high-speed train or a bus, and in order to more accurately determine whether the mobile WiFi device is a traffic mobile WiFi device, a traffic route map may be matched with a regularly reported position.
And 309, if a traffic route map is successfully matched with the regularly reported position, determining that the regular mobile WiFi equipment is traffic mobile WiFi equipment.
And step 310, if a traffic route map is not successfully matched with the regularly reported position, determining that the regular mobile WiFi equipment is the portable mobile WiFi equipment.
If the regularly reported position is not successfully matched with the traffic route map, the vehicle route map is probably a portable mobile WiFi device.
Movement of the personal WiFi device, while regular, will not match the vehicle roadmap. Such as: the moving law of the portable WiFi rented in tourist attractions is the appearance of high frequency in scenic areas.
After the type of the mobile WiFi device is determined, corresponding services may be provided to the user terminal accessing the mobile WiFi device according to the determined type of the mobile WiFi device, please refer to step 313.
And 311, sending recommendation information to the user terminal accessed to the mobile WiFi equipment according to the determined type of the mobile WiFi equipment.
Optionally, when the type of the mobile WiFi device is a traffic type mobile WiFi device, the recommendation information related to the destination is sent to the user terminal.
When the type of the mobile WiFi equipment is traffic type mobile WiFi equipment, the traffic route to which the mobile WiFi equipment belongs can be determined according to the regularly reported positions. For example, if the mobile WiFi device is a mobile WiFi device on a high-speed train, relevant information about a corresponding site, such as accommodation information, travel strategies, and the like, is recommended to the user terminal in a corresponding time period according to the characteristic that the high-speed train appears in a predetermined place within a predetermined time period.
Optionally, when the type of the mobile WiFi device is a personal mobile WiFi device, if the mobile WiFi device is often present in a fixed attraction, the introduction content related to the attraction may be sent to the user terminal accessing the mobile WiFi device.
Optionally, after determining that the WiFi device is a mobile WiFi device, the server sends an identification result that the WiFi device is the mobile WiFi device to the user terminal accessing the WiFi device, and in order to avoid network jitter, the user terminal may use a background pre-caching technology for some services. Such as: a novel service, in a normal scene, a background loads the content of the next chapter in advance; but in a mobile scenario, in case the network is available, as much resources as possible are cached, such as preloading the content of the next three chapters.
It should be noted that, before detecting whether the distance between the first reporting position and the second reporting position is greater than the first predetermined threshold, the first predetermined threshold needs to be set. Alternatively, the setting of the first predetermined threshold may be implemented by:
and S1, inquiring the wireless coverage distance of the WiFi equipment according to the equipment identification of the WiFi equipment.
The wireless coverage of different WiFi devices may be different, such as: some WiFi devices have a wireless coverage of 200 meters, and some WiFi devices have a wireless coverage of 300 meters. The model corresponding to the WiFi equipment can be inquired according to the equipment identification of the WiFi equipment, so that the wireless coverage of the WiFi equipment is known.
S2, setting a first predetermined threshold according to the wireless coverage distance.
The first predetermined threshold is greater than or equal to the wireless coverage distance.
If the distance moved by the user terminal exceeds the WiFi coverage distance, but the user terminal can still access the same WiFi device, it indicates that the WiFi device is movable, so the first predetermined threshold is set to be greater than the wireless coverage distance.
Through the steps, the server can realize dynamic control on the first preset threshold value according to the wireless coverage distances of WiFi equipment of different models.
Optionally, the first predetermined threshold is dynamically controlled by a technician or by a server. The value of the first predetermined threshold is not limited to be controlled only according to the wireless coverage distance.
In summary, in the identification method of the WiFi device provided in the embodiment of the present invention, by receiving the wireless network information, which includes the user identifier of the user terminal, the device identifier of the WiFi device, and the reporting position, reported by the user terminal every first preset time, a distance between a first reporting position and a second reporting position in the wireless network information reported by two adjacent user terminals with the same device identifier is calculated, and if the distance is greater than a first predetermined threshold, the WiFi device is determined to be a mobile WiFi device; because the signal coverage range of the WiFi equipment is limited, if the user terminal still accesses the same WiFi equipment after the moving distance exceeds the signal coverage range of the WiFi equipment, the WiFi equipment is indicated to be mobile WiFi equipment, and therefore the mobile WiFi equipment can be identified.
In addition, whether the mobile WiFi equipment is regular mobile WiFi equipment or not is determined by screening out wireless network information received within a second preset time length and counting according to the reporting time and the reporting position in the wireless network information with the equipment identification of the mobile WiFi equipment.
In addition, the reported times of the same reporting position are counted, when the reported times are greater than a second preset threshold value, the mobile WiFi device is determined to be a regular mobile WiFi device, and the mobile WiFi appearing at the same position for multiple times can be determined to be the regular mobile WiFi device.
In addition, the traffic route map and the regularly reported positions are matched, the mobile WiFi equipment which is successfully matched is determined as traffic mobile WiFi equipment, and the mobile WiFi equipment which is not successfully matched is determined as portable mobile WiFi equipment, so that different mobile WiFi equipment can be classified.
In addition, the server can provide personalized service for the user terminal by sending the recommendation information to the user terminal accessed with the determined mobile WiFi equipment, so that the user can acquire the information related to the moving route of the mobile WiFi equipment.
In addition, when the mobile WiFi equipment is traffic mobile WiFi equipment, recommendation information related to the destination is sent to the user terminal, so that the user can obtain personalized and customized services.
In addition, the wireless coverage range of the WiFi equipment is inquired through the equipment identification of the WiFi equipment, so that the server can combine the wireless coverage range of the WiFi equipment when the first preset threshold value is set, and the dynamic control of the first preset threshold value is realized.
In addition, the distance from the first reporting position to the second reporting position is calculated according to the navigation map, so that the calculated distance is the actual moving distance of the user terminal, and the recognition error caused by the fact that the first reporting position and the second reporting position are closely spaced is avoided.
Fig. 4 is a block diagram illustrating an identification apparatus of a WiFi device according to an embodiment of the present invention, which is applied to theserver 130 shown in fig. 1. As shown in fig. 4, the identifying apparatus of the WiFi device includes: a receivingmodule 410, a first detectingmodule 420, a determiningmodule 430, and a second detectingmodule 440.
A receivingmodule 410, configured to implement the foregoingstep 201,step 301, and any other implicit or public receiving-related functions.
Afirst detection module 420, configured to implement theabove step 202,step 302, and any other implicit or disclosed detection related functions.
Adetermination module 430 for implementing the above-mentionedstep 203,step 303, and any other implicit or disclosed determination-related functions.
Asecond detection module 440, configured to implement the above-mentionedsteps 204, 205, 304, 305, S1, S2, and any other implicit or disclosed detection-related functions.
Optionally, the apparatus further comprises: the device comprises a screening module, a counting module and a sending module.
A screening module for implementing theabove step 306 and any other implicit or disclosed screening related functions.
A statistics module for implementing theabove step 307 and any other implicit or public statistics related functions.
A sending module, configured to implement the foregoingstep 311 and any other implicit or public sending-related functions.
Optionally, the statistical module includes: the device comprises a statistic unit, a detection unit and a determination unit.
A statistical unit for implementing theabove step 307a and any other implicit or disclosed statistical related functions.
A detection unit for implementing theabove step 307b and any other implicit or disclosed detection related functions.
A determination unit, configured to implement the above-mentionedstep 307c,step 308,step 309,step 310, and any other implicit or disclosed determination-related functions.
Optionally, the sending module is further configured to implement the function of sending the recommendation information related to the destination to the user terminal when the type of the mobile WiFi device is a traffic type mobile WiFi device.
Optionally, the determiningmodule 430 is further configured to implement the function of calculating the distance from the first reporting position to the second reporting position according to the navigation map.
In summary, the identification apparatus for WiFi devices provided in the embodiments of the present invention calculates, by receiving the wireless network information, which includes the user identifier of the user terminal, the device identifier of the WiFi device, and the reporting position, reported by the user terminal every first preset time, a distance between a first reporting position and a second reporting position in the wireless network information reported by two adjacent user terminals with the same device identifier, and if the distance is greater than a first predetermined threshold, determines that the WiFi device is a mobile WiFi device; because the signal coverage range of the WiFi equipment is limited, if the user terminal still accesses the same WiFi equipment after the moving distance exceeds the signal coverage range of the WiFi equipment, the WiFi equipment is indicated to be mobile WiFi equipment, and therefore the mobile WiFi equipment can be identified.
It should be noted that: in the above embodiment, when the identification apparatus for a WiFi device identifies a WiFi device, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the identification apparatus of the WiFi device provided in the foregoing embodiment and the identification method embodiment of the WiFi device belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Fig. 5 is a schematic structural diagram of a server provided in one embodiment of the present invention. The server may be theserver 130 shown in fig. 1. Specifically, the method comprises the following steps: theserver 500 includes a Central Processing Unit (CPU)501, asystem memory 504 including a Random Access Memory (RAM)502 and a Read Only Memory (ROM)503, and asystem bus 505 connecting thesystem memory 504 and thecentral processing unit 501. Theserver 500 also includes a basic input/output system (I/O system) 506, which facilitates information transfer between devices within the computer, and amass storage device 507, which stores anoperating system 513,application programs 514, and other program modules 515.
The basic input/output system 506 comprises adisplay 508 for displaying information and aninput device 509, such as a mouse, keyboard, etc., for user input of information. Wherein thedisplay 508 and theinput device 509 are connected to thecentral processing unit 501 through an input/output controller 510 connected to thesystem bus 505. The basic input/output system 506 may also include an input/output controller 510 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, an input/output controller 510 also provides output to a display screen, a printer, or other type of output device.
Themass storage device 507 is connected to thecentral processing unit 501 through a mass storage controller (not shown) connected to thesystem bus 505. Themass storage device 507 and its associated computer-readable media provide non-volatile storage for theserver 500. That is, themass storage device 507 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. Thesystem memory 504 andmass storage device 507 described above may be collectively referred to as memory.
Theserver 500 may also operate as a remote computer connected to a network via a network, such as the internet, in accordance with various embodiments of the present invention. That is, theserver 500 may be connected to thenetwork 512 through thenetwork interface unit 511 connected to thesystem bus 505, or may be connected to other types of networks or remote computer systems (not shown) using thenetwork interface unit 511.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may be a computer-readable storage medium contained in the memory in the foregoing embodiment; or it may be a separate computer-readable storage medium not incorporated in the terminal. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the above-described WiFi device identification method.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.