A WiFi Feature Extraction Method and Device
By extracting the fingerprint data of WiFi devices from the log data and aggregating it, the problem of low accuracy of WiFi device type recognition in the prior art is solved, and higher recognition accuracy and applicability are achieved.
Patent Information
- Application Number
- CN202010177882.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-13
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2040-03-13
AI Technical Summary
In the prior art, when type identification is performed based on IP address information of WiFi devices, the recognition result is not accurate, and it is difficult to accurately distinguish between non-mobile devices and mobile devices.
By extracting the fingerprint data of WiFi devices from the log data, including device identity identification, latitude and longitude position, signal strength, association information with other WiFi devices and device network address information, fingerprint characteristics are determined, and WiFi devices with the same aggregate tag are aggregated to obtain the aggregate fingerprint characteristics.
It improves the accuracy of WiFi device type recognition, is suitable for a variety of application scenarios, and can ensure the accuracy of the recognition results even when a single information is insufficient.
Smart Images

Figure CN113395728B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and device for extracting WiFi features. Background Art
[0002] At present, relevant information of WiFi devices can be used in scenarios such as network positioning and indoor / outdoor identification. The WiFi devices refer to devices that adopt WiFi wireless network connection technology. For example, a WiFi device can be a wireless router or a mobile device such as a smart phone. In the network positioning scenario, it is necessary to perform network positioning based on the fingerprint information of WiFi scanned by a mobile device. Whether the WiFi device scanned by the mobile device is a device with a position that is basically fixed over time (non-mobile device) or a device with a position that changes over time (mobile device) has a very important impact on the accuracy of network positioning. When the prior art identifies whether the type of a WiFi device is a non-mobile device or a mobile device, it generally identifies based on the IP address information of the WiFi device. However, the inventor has found that there is a technical problem of low accuracy in the identification result of WiFi when identifying the WiFi type based on the IP address information of the WiFi device. Summary of the Invention
[0003] In view of the above problems, the present invention is proposed to provide a method and device for extracting WiFi features that overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect, an embodiment of the present invention provides a method for extracting WiFi features, including the following steps:
[0005] Extract fingerprint data of a WiFi device from log data, where the fingerprint data includes at least any one or more of the following: device identity identifier, longitude and latitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information;
[0006] Based on the fingerprint data of the WiFi device, obtain fingerprint features of the WiFi device, where the fingerprint features include at least any one or more of the following types: position distribution feature, signal strength feature, association feature between the WiFi device and other WiFi devices, and device network address feature;
[0007] Select at least one fingerprint feature from at least one type of fingerprint features of the WiFi device, and aggregate the selected at least one fingerprint feature with the corresponding fingerprint features of other WiFi devices with the same aggregation tag to obtain an aggregated fingerprint feature corresponding to the at least one fingerprint feature.
[0008] In one embodiment, obtaining the fingerprint feature of the WiFi device based on the fingerprint data of the WiFi device includes:
[0009] Determining the location distribution feature of the WiFi device according to the latitude and longitude positions of multiple collection points of the WiFi device in the log data;
[0010] Determining the signal strength feature of the WiFi device according to the signal strengths of the WiFi device at multiple collection points in the log data;
[0011] Determining the association feature between the WiFi device and other WiFi devices according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0012] Determining the device network address feature of the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data.
[0013] In one embodiment, determining the location distribution feature of the WiFi device according to the latitude and longitude positions of multiple collection points in the log data includes:
[0014] Determining the location distribution feature corresponding to the center point of the total collection points of the WiFi device or the center point of the collection point clusters according to the latitude and longitude positions of each collection point of the WiFi device; the collection point clusters are obtained by clustering each collection point of the WiFi device;
[0015] Determining the location distribution feature corresponding to the range covered by the total collection points of the WiFi device according to the latitude and longitude positions of each collection point of the WiFi device.
[0016] In one embodiment, determining the signal strength feature of the WiFi device according to the signal strengths of the WiFi device at multiple collection points in the log data includes:
[0017] Determining the number of collection points in each signal strength interval according to the signal strength magnitudes of the WiFi device at multiple collection points in the log data and the signal strength intervals divided according to a preset signal strength interval, and obtaining at least one signal strength distribution feature of the WiFi device according to the number.
[0018] In one embodiment, determining the association feature between the WiFi device and other WiFi devices according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data includes one or more of the following:
[0019] Determine the association features related to the number of base stations or other WiFi devices associated with the WiFi device according to the association information of the current WiFi device with multiple base stations and / or multiple WiFi devices in the surrounding area in the log data;
[0020] Determine the association features related to the coverage area of other WiFi devices associated with the WiFi device according to the association information of the current WiFi device with multiple base stations and / or multiple WiFi devices in the surrounding area in the log data;
[0021] Determine the association features related to a preset time period of each WiFi device associated with the WiFi device according to the association information of the current WiFi device with multiple base stations and / or multiple WiFi devices in the surrounding area in the log data.
[0022] In one embodiment, the determining the device network address feature of the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data includes one or more of the following:
[0023] Determine the quantity feature of the collection points associated with the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data;
[0024] Determine the probability feature of the mobile network to which the WiFi device belongs according to the device network address information of multiple collection points of the WiFi device in the log data.
[0025] In one embodiment, the fingerprint data further includes time information;
[0026] The fingerprint feature of the WiFi device obtained based on the fingerprint data of the WiFi device further includes: determining the time feature of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data.
[0027] In one embodiment, the determining the time feature of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data includes one or more of the following:
[0028] Divide the preset time period into several equal parts according to the time slices of the first duration, and determine the proportion of the time slices with collections in all the time slices of the first duration to obtain the time frequency feature of the WiFi device;
[0029] Divide each day in the time period of the preset total number of days into several equal parts according to the time slices of the second duration, and each equal part corresponds to a moment. Respectively determine the total collection amounts occurring at the same moment on different days within the time period to obtain the moment feature of the WiFi device.
[0030] In one embodiment, if the device identity identifier of the WiFi device is the MAC address, the aggregation tag is the MAC prefix;
[0031] If the device identity identifier of the WiFi device is the service set identifier SSID, the aggregation tag is the SSID.
[0032] In one embodiment, the WiFi feature extraction method further includes:
[0033] Select at least some features from the obtained fingerprint features and / or aggregated fingerprint features of the WiFi device, and input them into a WiFi recognition model corresponding to a preset application scenario to train the WiFi recognition model.
[0034] In a second aspect, an embodiment of the present invention provides a WiFi feature extraction device, including:
[0035] A fingerprint data extraction module, configured to extract fingerprint data of a WiFi device from log data, where the fingerprint data includes at least any one or more of the following: device identity identifier, longitude and latitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information;
[0036] A fingerprint feature acquisition module, configured to obtain fingerprint features of the WiFi device based on the fingerprint data of the WiFi device, where the fingerprint features include at least any one or more of the following: location distribution features, signal strength features, association features between the WiFi device and other WiFi devices, and device network address features;
[0037] An aggregated fingerprint feature acquisition module, configured to select at least one fingerprint feature from at least one type of fingerprint features of the WiFi device; aggregate the selected at least one fingerprint feature with corresponding fingerprint features of other WiFi devices with the same aggregation tag to obtain an aggregated fingerprint feature corresponding to the at least one fingerprint feature.
[0038] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned WiFi feature extraction method is implemented.
[0039] In a fourth aspect, an embodiment of the present invention provides a WiFi feature extraction server, including: a processor and a memory for storing processor-executable commands; wherein, the processor is configured to execute the above-mentioned WiFi feature extraction method.
[0040] The beneficial effects of the above technical solutions provided by the embodiments of the present invention at least include:
[0041] The WiFi feature extraction method and device provided by the embodiments of the present invention obtain the fingerprint features of a WiFi device by extracting the fingerprint data from the log data of the WiFi device; moreover, according to specific application scenarios, at least one type of fingerprint feature is selected, and the selected fingerprint features of the WiFi devices with the same aggregation label are aggregated to obtain corresponding aggregated fingerprint features, and the aggregated fingerprint features reflect the group features of all WiFi devices with the same aggregation label. The above method can provide multiple fingerprint features and / or aggregated fingerprint features for a variety of different WiFi-related application scenarios. Even when effective fingerprint features cannot be extracted from the WiFi, the aggregated fingerprint features with the same aggregation label can still be used to implement the identification of WiFi-related application scenarios, and the applicable application scenarios are more extensive. The features of WIFI can be combined according to different application scenarios, and through the feature combination methods of different application scenarios, the accuracy of the identification results in each application scenario can be ensured; at the same time, for any specific application scenario, the amount of information contained in the multiple different types of fingerprint features and / or aggregated fingerprint features used is obviously much more than that of a single fingerprint feature, and the information of the WiFi relied on is more comprehensive. Even if a single piece of information is incorrect or cannot be effectively updated, it will not have a great impact on the identification results. In this way, the accuracy rate of the identification results of the WiFi is ensured to be higher.
[0042] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the written specification, claims, and drawings.
[0043] The technical solutions of the present invention will be further described in detail below with reference to the drawings and embodiments. Description of the Drawings
[0044] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:
[0045] Figure 1 It is a schematic flowchart of the WiFi feature extraction method in the embodiments of the present invention;
[0046] Figure 2 It is a schematic flowchart of the WiFi identification model training method in the embodiments of the present invention;
[0047] Figure 3 It is a schematic flowchart of a specific implementation process of the WiFi identification model training method in the embodiments of the present invention;
[0048] Figure 4This is a schematic structural diagram of the WiFi feature extraction device in an embodiment of the present invention. Detailed implementation manners
[0049] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0050] In an embodiment of the present invention, in view of the problems existing in the above-mentioned prior art, a WiFi feature extraction method is provided, and its process is as follows Figure 1 shown, including the following steps:
[0051] S11: Extract fingerprint data of the WiFi device from the log data, where the fingerprint data includes at least any one or more of the following: device identity identifier, longitude and latitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information;
[0052] S12: Based on the fingerprint data of the WiFi device, obtain fingerprint features of the WiFi device, where the fingerprint features include at least any one or more of the following: location distribution features, signal strength features, association features between the WiFi device and other WiFi devices, and device network address features;
[0053] S13: Select at least one fingerprint feature from at least one type of fingerprint features of the WiFi device, and aggregate the selected at least one fingerprint feature with the corresponding fingerprint features of other WiFi devices with the same aggregation label to obtain the aggregated fingerprint feature corresponding to the at least one fingerprint feature.
[0054] In the above step S11, the log data includes the collection log and positioning log of WiFi. Among them, the fingerprint data of the WiFi device extracted from the collection log includes the device identity identifier, longitude and latitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information; the fingerprint data extracted from the positioning log includes the device identity identifier, signal strength, association information between the WiFi device and other WiFi devices, and device network address information.
[0055] In the embodiments of the present invention, the device identity identifier of the WiFi device may be a MAC address or a service set identifier SSID. The latitude and longitude position may be the positioning true value information of the collection point of the WiFi device. The signal strength may be the network signal strength of the collection point of the WiFi device. The association information between the WiFi device and other WiFi devices may be the information on the association relationship between the current WiFi device and other WiFi devices, and this association information may be obtained through the network scan list of each collection point of the WiFi device. When two different WiFi devices appear in the network scan list of the same collection point at the same time, it may be determined that these two WiFi devices have an association relationship. The device network address information may be the network address assigned by the WiFi device to the collection point. The latitude and longitude position, signal strength, association information, and device network address information in the fingerprint data may be extracted from either the collection log or the positioning log. In this way, when the log data is scarce, the data from these two types of logs can be used to complement each other.
[0056] In the embodiments of the present invention, the other WiFi devices described may be WiFi devices or base stations in the prior art. The collection point described in the embodiments of the present invention may be, for example, a terminal device that scans the current WiFi device, such as a mobile phone. When the collection point enters the signal coverage range of the WiFi device and the base station, it can locate its own position to obtain the positioning true value information; record the time information when the collection point enters the signal coverage range of the WiFi device or the base station; obtain the speed information when scanning the WiFi device; when the collection point enters the signal coverage range of the WiFi device or the base station, it can obtain the assigned network address information and network signal strength information; form a network scan list by collecting all the WiFi device lists and base station lists. Any terminal device that scans the WiFi device at any moment can be used as the collection point of the WiFi device.
[0057] In the above step S12, the position distribution feature of the WiFi device is determined according to the latitude and longitude positions of multiple collection points of the WiFi device in the log data, that is, determined according to the positioning true value information of multiple collection points of the WiFi device in the log data. The position distribution feature is used to represent the distribution of the collection points of the WiFi device, and the aggregation or dispersion of the collection points of the WiFi device can be judged through the position distribution feature.
[0058] In a specific embodiment, there may be multiple position distribution features of the WiFi device. The specific process of determining the position distribution feature includes:
[0059] According to the latitude and longitude positions of each collection point of the WiFi device, determine the position distribution feature corresponding to the center point of the total collection points of the WiFi device or the center point of the collection point cluster; the collection point cluster is obtained by clustering each collection point of the WiFi device;
[0060] Determine the position distribution characteristics corresponding to the range covered by the total collection points of the WiFi device according to the longitude and latitude positions of each collection point of the WiFi device.
[0061] As shown in Table 1, the position distribution characteristics and their determination methods are illustrated by way of example below. Among them, the collection ratio ratio400 of the circular range with a radius of 400m is the position distribution characteristic corresponding to the center point of the total collection points of the WiFi device, the average value ratio400avg of the collection ratio of the circular range with a radius of 400 is the position distribution characteristic corresponding to the center point of the collection point cluster of the WiFi device, the number of grids cntGrid25 covering a 25-meter grid, the area areaSqare25 of the covered rectangular fence, and the sparsity Sparsity25 are the position distribution characteristics corresponding to the range covered by the total collection points of the WiFi device:
[0062]
[0063] Table 1
[0064] In the method for extracting the ratio400 feature in Table 1, the center point of multiple collection points of the WiFi is obtained in the following manner: According to the positioning true value information of the collection points, use the smallest circle to enclose multiple collection points within the circle, and the center of the smallest circle obtained is the center point of the multiple collection points.
[0065] The calculation of the center point can adopt an algorithm in the prior art. For example, weighted averaging is performed on the positioning true value information of all collection points according to the number of collections. The size of the weight can be the ratio of the number of collection points at a certain position to the total number of collections. For example, if there are a total of 10 collection points and the positioning true value information of 3 collection points is the same, that is, the positions of 3 collection points are the same, then the weight of this position is 30%. It is also possible to determine the weight of the positioning true value information of the collection points according to the signal strength of the collection points. The greater the signal strength, the closer the distance between the collection point and the center point position, and then the greater the weight of this position.
[0066] In the embodiments of the present invention, by changing the radius of the circle with the center point as the center, the ratio of the number of collections within the circles with different radii to the total number of collections can be calculated, and the collection ratio of the circular ranges with different radii can be obtained.
[0067] In the method for extracting cntGrid2525 in Table 1, the 25-meter grid is obtained by using a method of geographic coding, such as the method of Mercator projection. 25 meters is a variable parameter, and by changing the size of the grid, the number of grids covering grids of different sizes can be obtained.
[0068] The areaSqare25 feature in Table 1 is a feature related to cntGrid25. According to multiple 25-meter grids covered by the collection points, these grids are enclosed by a minimum bounding rectangle, which is the rectangular fence. Calculate the area of this minimum bounding rectangle to obtain areaSqare25. For example, if 100 collection points fall within 15 25-meter grids, these 15 25-meter grids are enclosed by a minimum bounding rectangle, which is the rectangular fence. Calculate the area of this minimum bounding rectangle to obtain the areaSqare25 feature. In the embodiments of the present invention, 25 meters is a variable parameter. By changing the size of the grid, the area of the rectangular fence covering grids of different sizes can be obtained.
[0069] The Sparsity25 feature in Table 1 is also a feature related to cntGrid25. According to multiple 25-meter grids covered by the collection points, these grids are enclosed by a minimum bounding rectangle, which is the rectangular fence. Count the total number of 25-meter grids within this rectangular fence, and calculate the ratio of the number of 25-meter grids covered by multiple collection points to the total number of 25-meter grids within this rectangular fence to obtain the Sparsity25 feature. For example, if 100 collection points fall within 15 25-meter grids, these 15 25-meter grids are enclosed by a minimum bounding rectangle, which is the rectangular fence. Assume the total number of 25-meter grids within the rectangular fence is 20, then the calculated Sparsity25 is 0.75. In the embodiments of the present invention, 25 meters is a variable parameter. By changing the size of the grid, the sparsity of the collection points covering grids of different sizes can be obtained.
[0070] When extracting the atio400avg feature in Table 1, clustering processing is performed on multiple collection points of WiFi to obtain multiple collection point clusters. The calculation method of the center point of each collection point cluster can be the same as the calculation method of the center point in the extraction method of ratio400, which will not be elaborated here. By changing the radius of the circle centered on the center point, the average collection ratio feature of the circular range with different radii can be calculated. In the embodiments of the present invention, it can also be to calculate the median, variance, standard deviation, etc. of the circular range collection ratio for each cluster to obtain different position distribution features corresponding to the center points of the collection point clusters.
[0071] In the above step S12, the signal strength feature of the WiFi device can be determined according to the signal strength of the WiFi device at multiple collection points in the log data, for example. The signal strength feature can be used for signal strength statistics of the WiFi device.
[0072] There can be multiple signal strength features of the WiFi device. The specific process of determining the signal strength feature includes:
[0073] Based on the signal strength of the WiFi device at multiple collection points in the log data and the signal strength intervals divided according to a preset signal strength interval, determine the number of collection points within each signal strength interval, and obtain at least one signal strength distribution feature of the WiFi device according to the number.
[0074] As shown in Table 2, the signal strength characteristics and the method for obtaining them are illustrated by way of example below:
[0075]
[0076] Table 2
[0077] When extracting the rssiHist feature in Table 2, the sampling interval of the distribution vector can be flexibly adjusted. For example, when performing signal strength statistics, the signal strength is divided into an interval from -100 db to -300 db, and the number of collection points falling within this interval is counted, and the vector distribution within this interval can be obtained.
[0078] When extracting the rssiMedian feature in Table 2, it is to statistically calculate the median of the signal strength of the WiFi based on multiple collection points of the obtained WiFi. In the embodiments of the present invention, the maximum value, minimum value, variance, top 25th percentile, etc. of the signal strength of the WiFi can also be statistically calculated based on multiple collection points of the obtained WiFi, so as to obtain different signal strength characteristics related to the signal strength.
[0079] The association characteristics between the WiFi device and other WiFi devices in the above step S12 can be determined according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data. The association information refers to all the WiFi and base stations in the network scan list of the collection point, and the information of the association relationship generated between each two. For example, assume that in a shopping mall, there is a WiFi router on each side of the passage, and there is a collection point (for example, a mobile phone). Each time it passes through the passage, the collection point enters the signal coverage ranges of the two routers, and these two routers will appear in the network list of the collection point at the same time. Each time the collection point scans, an association relationship will be generated between these two WiFi routers.
[0080] By statistically calculating the information of other WiFi devices and base stations associated with the current WiFi device, association characteristics such as the number of devices associated with the current WiFi device, the time when the association occurs, and the frequency of the association occurrence can be obtained. The association characteristics between the WiFi device and other WiFi devices can be applied to application scenarios such as judging the mobile or non-mobile attributes of the WiFi device and network positioning of the device that scans the WiFi.
[0081] In a specific embodiment, the specific process of determining the association characteristics between a WiFi device and other WiFi devices can be implemented through the following process:
[0082] 1. Determine the association characteristics related to the number of base stations or other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0083] 2. Determine the association characteristics related to the coverage range of other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0084] 3. Determine the association characteristics related to a preset time period for each WiFi device associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data.
[0085] Referring to Table 3 shown below, the association characteristics and their acquisition methods are illustrated by way of example. Among them, the number of associated WiFi (rela_WiFi_cnt) and the number of associated base stations (rela_cell_cnt) are the association characteristics related to the number of base stations or other WiFi devices associated with the WiFi device, the number of 25-meter grid covered by associated WiFi (rela_WiFi_sf_cnt) is the association characteristic related to the coverage range of other WiFi devices associated with the WiFi device, the appearance ratio of associated WiFi (rela_WiFi_days_mean), the interruption times of associated WiFi (rela_WiFi_cut_mean), and the interval time of associated WiFi (rela_WiFi_fresh_mean) are the association characteristics related to a preset time period for each WiFi device associated with the WiFi device:
[0086]
[0087] Table 3
[0088] The rela_WiFi_cnt feature in Table 3 is obtained by counting the number of surrounding WiFi devices that have an association relationship with the WiFi device in the network scan list of the WiFi collection points.
[0089] The rela_cell_cnt feature in Table 3 is obtained by counting the number of surrounding base stations that have an associated relationship with the WiFi in the network scan list of the WiFi collection points. This feature can be used to determine whether the WiFi is mobile or non-mobile WiFi. Specifically, based on the rela_cell_cnt feature, the location or identity information ID of the associated base stations can be checked. If it is non-mobile WiFi, then the number and location of the base stations associated with the WiFi will basically remain unchanged within a certain period of time, maintaining a stable association relationship. If it is mobile WiFi, then the location and number of the base stations associated with the WiFi will change at different times. The mobile or non-mobile attribute of the WiFi can be preliminarily determined by the number and location of the surrounding associated base stations.
[0090] When extracting the rela_WiFi_sf_cnt feature in Table 3, the WiFi associated with the surrounding of the WiFi can be located to obtain the locations of the surrounding associated WiFi, and the locations of each surrounding associated WiFi are counted to obtain the number of 25-meter grids covered by all the surrounding associated WiFi. In the embodiments of the present invention, 25 meters is a variable parameter. By changing the size of the grid, the number of grids of different sizes covered by different associated WiFi can be obtained, and multiple associated features related to the number can be obtained.
[0091] When extracting the rela_WiFi_days_mean feature in Table 3, the surrounding associated WiFi can be sorted in descending order according to the number of associations or days, and then the top N associated WiFi are selected. The average value of the proportion of the number of days that the selected top N associated WiFi appear in a certain window time to the window time is statistically calculated. In the embodiments of the present invention, the number of days of the window time can be set according to actual needs. In the embodiments of the present invention, the maximum value, minimum value, variance, top 25th percentile, etc. of the proportion of the number of days that the selected top N associated WiFi appear in a certain window time to the window time can also be statistically calculated to obtain different associated features.
[0092] When extracting the rela_WiFi_cut_mean feature in Table 3, the surrounding associated WiFi can be sorted in descending order according to the number of associations or days, and then the top N associated WiFi are selected. The average value of the number of interruptions of the selected top N associated WiFi in a certain window time is statistically calculated. In the embodiments of the present invention, the number of days of the window time can be set according to actual needs. In the embodiments of the present invention, the maximum value, minimum value, variance, top 25th percentile, etc. of the number of interruptions of the selected top N associated WiFi in a certain window time can also be statistically calculated to obtain different associated features.
[0093] When extracting the rela_WiFi_fresh_mean feature in Table 3, the associated WiFis in the vicinity can be sorted in descending order according to the number of associations or the number of days, and then the top N associated WiFis are selected. The average number of days from the most recent association time of the selected top N associated WiFis to the current time is statistically calculated within a certain window time. In the embodiments of the present invention, the number of days in the window time can be set according to actual needs. In the embodiments of the present invention, it is also possible to statistically calculate the maximum value, minimum value, variance, 25th percentile, etc. of the number of days from the most recent association time of the selected top N associated WiFis to the current time within a certain window time, so as to obtain different association features.
[0094] Through association features such as rela_WiFi_days_mean, rela_WiFi_cut_mean, and rela_WiFi_fresh_mean, it is possible to assist in judging the mobile or non-mobile attributes of the WiFi by statistically calculating the change in the association time or the interruption of the association information between the WiFi and the surrounding WiFis within a certain window time, such as within 1 month. Because if it is a fixed WiFi, it generally works for a long time, and the association information with the surrounding WiFis will be relatively stable; if it is a mobile WiFi, the surrounding WiFis associated within a short time will lose the association after changing positions and will no longer obtain association information.
[0095] In the above step S12, the device network address feature of the WiFi device can be determined according to the device network address information of multiple collection points in the daily data. For example, it can be based on the attribute information of whether the Internet Protocol (IP) address is a fixed network or a mobile network to obtain the device network address feature of the WiFi device. The basic principle for judging whether the IP address is a fixed or mobile network is as follows: there is a certain isolation between fixed IP addresses and mobile IP addresses. Generally, the upstream of a mobile WiFi device is connected to a mobile network through a base station, and the upstream of a fixed WiFi device is generally connected to a fixed network through methods such as Asymmetric Digital Subscriber Line (ADSL). Therefore, by judging the address range where the IP address is located, it is possible to determine whether the IP address is a fixed or mobile network.
[0096] In a specific embodiment, the specific implementation process of determining the device network address feature of the WiFi device is achieved through the following process:
[0097] According to the device network address information of multiple collection points of the WiFi device in the log data, determine the quantity feature of the collection points associated with the WiFi device;
[0098] Determine the probability characteristics of the WiFi device belonging to the mobile network according to the device network address information of multiple collection points of the WiFi device in the log data.
[0099] As shown in Table 4, the device network address characteristics and the acquisition method are illustrated by way of example below. Among them, the average probability IP_moveprob_avg of the network address belonging to the mobile network is the probability characteristic of the WiFi device belonging to the mobile network, and the number of associated network addresses IP_cnt is the number characteristic of the collection points associated with the WiFi device:
[0100]
[0101] Table 4
[0102] In Table 4, the probability that the IP address associated with the current WiFi device belongs to the mobile network address can be obtained in the following way: Since the network addresses of most home routers or public network routers are generally dynamically allocated and not fixed network addresses. Assume that most of the collection points of the current WiFi device have connected to fixed WiFi devices, that is, there are connected fixed WiFi devices in the network scan list of the collection point. At this time, the network address of this collection point is a fixed network address. Count the number of collection points connected to this network address and the number of collection points where this network address appears in the network scan list of the log data, compare the ratio of the two, and then obtain the probability that this network address belongs to the fixed network, and thus the probability that this network address belongs to the mobile network can be obtained.
[0103] Taking the average value of the probability that each IP address associated with the current WiFi belongs to the mobile network gives IP_moveprob_avg. In the embodiments of the present invention, the maximum value, minimum value, variance, top 25th percentile, etc. of the probability that each IP address associated with the current WiFi belongs to the mobile network can also be obtained to obtain different device network address characteristics.
[0104] In the embodiments of the present invention, the fingerprint data may further include time information. Determine the time characteristics of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data. The time characteristics of the WiFi device can also be used as the fingerprint characteristics of the WiFi device. The time characteristics can be applied to identify the application scenarios of mobile WiFi. For example, identifying the WiFi of a mobile phone hotspot.
[0105] In a specific embodiment, the time characteristics can be divided into time frequency characteristics and moment characteristics. Among them, the specific process of determining the time frequency characteristics and moment characteristics includes:
[0106] Divide the preset time period into several equal parts according to the time slices of the first duration, and determine the proportion of the time slices with acquisitions among all the time slices of the first duration, so as to obtain the time frequency feature of the WiFi device;
[0107] Divide each day within the time period of the preset total number of days into several equal parts according to the time slices of the second duration, and each equal part corresponds to a moment. Respectively determine the total acquisition amounts that occur at the same moment within different days in the time period, so as to obtain the moment feature of the WiFi device.
[0108] In the embodiment of the present invention, when determining the time frequency feature, it is necessary to use the grid method to select the acquisition points of the WiFi device. Since there may be noise in the acquisition points in the grid. For example, some devices forge their own positions through computer applications (APPs) that forge positions, or due to inaccurate GPS positioning, devices not within the grid are positioned into the current grid. In order to eliminate the noise, a threshold can be set. Count the number of days with acquisition points in each grid within a certain window time for each time slice. If the number of days with acquisition points exceeds the set number-of-days threshold, then this time slice is a time slice with acquisition. If the number of days with acquisition points is less than the set number-of-days threshold, then this time slice is a time slice without acquisition.
[0109] As shown in Table 5, the time feature and its acquisition method are illustrated by examples below. Among them, the average value of the proportion of time slices with acquisitions (online_rati_avg) is the time frequency feature, and the sum of the PV of the scan times is the moment feature:
[0110]
[0111] Table 5
[0112] In Table 5, when extracting the time frequency feature (online_rati_avg), for each time slice, count the proportion (prob) of the number of days with acquisition points in each 25-meter grid to the window time of 31 days; if prob is greater than or equal to the set threshold, it is considered that this time slice has acquisition, otherwise it is considered that this time slice has no acquisition. In the embodiment of the present invention, the window time, the time length of the time slice, the grid size, and the size of the set threshold can all be selected according to the actual situation to obtain different online_rati_avg features. In the embodiment of the present invention, according to the proportion (online_ratio) of the time slices with acquisitions in 144 time slices for each 25-meter grid, the maximum value, minimum value, median, or 85% quantile, etc. of the proportion of the time slices with acquisitions of all 25-meter grids can also be calculated to obtain different time frequency features.
[0113] When extracting the online_rati_avg feature, since there may be noise in the collection points in the 25-meter grid. For example, some devices may forge their own positions through computer applications (APPs) that forge positions, or due to inaccurate GPS positioning, devices not within the grid are located in the current grid. To eliminate noise, a threshold can be set. For each time slice within a certain window time, count the number of days with collection points in each grid. If the number of days with collection points exceeds the set number-of-days threshold, it is considered a collection; if it is less than the set number-of-days threshold, it is considered no collection. For example, if the number of days with collection points exceeds 3 days, it is considered a collection, and then the threshold can be set to 0.1. For a grid under a certain time slice, if there are collection points in 10 days out of the 31-day time window, and the proportion (prob) of the number of days with collection points to the 31-day window time is greater than the threshold of 0.1, then there is a collection for this grid under this time slice; for another grid under a different time slice, if there are only 2 days with collection points in the 31-day time window, and the proportion (prob) of the number of days with collection points to the 31-day window time is less than the threshold of 0.1, then it is considered that the collection points in this grid under this time slice are noise, and there is no collection for this grid under this time slice.
[0114] Table 4 only lists the extraction method of the sum of PVs in the moment features. In the embodiments of the present invention, after obtaining the distribution vector of PVs including each time slice, the average value, median, maximum value, minimum value, 25th percentile, etc. can also be calculated according to the distribution vector of PVs of each time slice to obtain different moment features. In one embodiment, the distribution vector of unique views (UVs) can also be calculated for each time slice to obtain moment features related to UVs. The extraction method of moment features related to UVs is similar to that of moment features related to PVs and will not be elaborated here.
[0115] In the above step S13, if the device identity identifier of the WiFi device is the MAC address, the aggregated label is the MAC prefix; if the device identity identifier of the WiFi device is the service set identifier (SSID), the aggregated label is the SSID.
[0116] In one embodiment, the specific process of obtaining the aggregated fingerprint feature includes:
[0117] For the fingerprint feature of a selected WiFi device, obtain the fingerprint features of the same type of multiple other WiFi devices with the same MAC prefix or SSID from the log data, and use an aggregation function to aggregate them to obtain the aggregated fingerprint feature corresponding to this fingerprint feature.
[0118] In a specific embodiment, when selecting fingerprint features to be aggregated, according to the specific application scenario, various types of fingerprint features of the WiFi device can be sorted according to their importance in the application scenario. After selecting a preset number of multiple fingerprint features from one or several types of fingerprint features from high to low according to the importance, aggregation is performed to obtain the aggregated fingerprint features. Thus, the computational amount during the aggregation process can be reduced, and the obtained aggregated fingerprint features are more suitable for the requirements of the specific application scenario.
[0119] In the embodiments of the present invention, different fingerprint features can be selected for aggregation according to different WiFi application scenarios, which can be selected through manual experience or machine learning algorithms. For example, using the feature importance ranking algorithm of random forest, different types of fingerprint features of the WiFi device are ranked according to their importance in the application scenario from high to low, and several fingerprint features with the top rankings are selected. Then, multiple other WiFi devices with the same MAC prefix or SSID are determined. For the selected several fingerprint features, the corresponding fingerprint features of multiple other WiFi devices are respectively obtained. The fingerprint features of the current WiFi device of the same type and the fingerprint features of multiple other WiFi devices are aggregated using an aggregation function to obtain the aggregated fingerprint features.
[0120] The following illustrates through a specific embodiment the process of selecting partial fingerprint features from all fingerprint features using the random forest feature importance ranking algorithm and performing aggregation processing to obtain the aggregated fingerprint features:
[0121] First, according to the preset application scenarios related to WiFi information, sort the fingerprint features of the WiFi, and select the fingerprint features required by the application scenarios. For example, in the application scenario of identifying a mobile hotspot WiFi, label each WiFi device to generate training samples, and extract the fingerprint features of the training samples. For example, when using the random forest feature importance ranking algorithm to select the top N (topN) fingerprint features required for identifying a mobile hotspot WiFi from all the fingerprint features of the training samples, first label the multiple obtained WiFi devices to generate training samples. When labeling, it is clearly known whether the WiFi device to be labeled is a mobile WiFi device or a non-mobile WiFi device, and use the random forest feature importance ranking algorithm to screen the fingerprint features for classifying mobile and non-mobile WiFi devices to obtain the top N fingerprint features required for identifying a mobile hotspot WiFi device; then aggregate the selected top N fingerprint features. For example, select a cntgrid25 feature from all the fingerprint features. After determining the cntgrid25 features of multiple WiFi devices with the same SSID, use an aggregation function for aggregation processing: Assume that the multiple obtained WiFi devices are 100,000 WiFi routers with the word "Xiaomi" in their names with the same SSID. Select an aggregation function to perform aggregation processing on the cntgid25 features of the 100,000 obtained WiFi routers. After aggregation, an aggregated fingerprint feature is obtained. The selected aggregation function can be an aggregation function for calculating the average value or the median. This aggregated fingerprint feature is the aggregated fingerprint feature corresponding to cntgid25 of all WiFi routers with the word "Xiaomi" in their names. Then, in the application scenario of identifying a mobile hotspot WiFi, when a new WiFi router with the word "Xiaomi" in its name appears, if the number of collection points of this WiFi router is too small to extract effective cntgid25 features, the aggregated fingerprint feature corresponding to this cntgid25 feature can be used to replace the cntgid25 feature of this new WiFi router.
[0122] Because the MAC prefixes of multiple WiFi devices of the same batch produced by the same manufacturer are the same, when aggregating according to the MAC prefix, the aggregated fingerprint features of the multiple WiFi devices of the same batch with the same MAC prefix can be obtained. The aggregation processing process of the aggregated fingerprint features of multiple WiFi devices with the same MAC prefix is similar to the aggregation processing process of multiple WiFi devices with the same SSID, and will not be elaborated in the embodiments of the present invention.
[0123] In an embodiment of the present invention, the aggregated fingerprint feature is the result of aggregating multiple WiFi devices with the same MAC prefix or the same SSID using an aggregation function. The aggregated fingerprint feature is the population feature of all WiFi devices with the same MAC prefix or the same SSID. When the log data of the WiFi device to be identified is very sparse in the WiFi identification scenario and effective fingerprint features of the WiFi device cannot be extracted, the aggregated fingerprint feature can be used to replace the fingerprint feature of the WiFi device.
[0124] The WiFi feature extraction method provided by the embodiment of the present invention obtains the fingerprint feature of the WiFi device by extracting the fingerprint data in the log data of the WiFi device; and, according to the specific application scenario, selects at least one type of fingerprint feature, and aggregates the selected fingerprint features of the WiFi devices with the same aggregation tag to obtain the corresponding aggregated fingerprint feature. The aggregated fingerprint feature reflects the population feature of all WiFi devices with the same aggregation tag. The above method can provide multiple fingerprint features and / or aggregated fingerprint features for a variety of different WiFi-related application scenarios. Even when effective fingerprint features cannot be extracted from the WiFi, the aggregated fingerprint feature with the same aggregation tag can still be used to implement the identification of WiFi-related application scenarios. The applicable application scenarios are more extensive, and the features of WIFI can be combined according to different application scenarios. Through the feature combination methods of different application scenarios, the accuracy of the identification result in each application scenario can be ensured; at the same time, for any specific application scenario, the amount of information contained in the multiple different types of fingerprint features and / or aggregated fingerprint features used is obviously much more than that of a single fingerprint feature, and the information of the WiFi is more comprehensive. Even if a single piece of information is incorrect or not effectively updated, it will not have a great impact on the identification result. In this way, the accuracy rate of the WiFi identification result is guaranteed to be higher.
[0125] In a specific embodiment, after obtaining the fingerprint feature and the aggregated fingerprint feature of the WiFi device, at least some features can be selected from the obtained fingerprint feature and / or aggregated fingerprint feature of the WiFi device and input into the WiFi identification model corresponding to the preset application scenario to train the WiFi identification model.
[0126] The embodiment of the present invention provides a training method for a WiFi identification model, and its process is as follows Figure 2 shown, including the following steps:
[0127] S21: According to the preset application scenario related to WiFi information, select at least one fingerprint feature and / or aggregated fingerprint feature required for the application scenario from the fingerprint features and / or aggregated fingerprint features of each WiFi device.
[0128] The above-mentioned preset application scenarios related to WiFi information may be at least one of the following application scenarios: network positioning, identification of mobile hotspot WiFi, determination of indoor and outdoor scenarios based on WiFi, and mining of POI or building information based on WiFi.
[0129] Referring to Figure 3 As shown, when training the WiFi identification model, according to the WiFi feature extraction method provided in the above embodiment, fingerprint data of each WiFi device is extracted from the log data to obtain the fingerprint features of each WiFi device, including location distribution features, signal strength features, association features between the WiFi device and other WiFi devices, device network address features, and time features. According to the preset application scenarios related to WiFi information, all the fingerprint features of the WiFi device are sorted, and some fingerprint features required by the application scenarios are selected. The specific process of selecting some fingerprint features may be: according to the preset application scenarios related to WiFi information, for example, the application scenario of identifying mobile hotspot WiFi, the obtained WiFi devices are sample-labeled to generate training samples, and the fingerprint features of the training samples are extracted. For example, when using the random forest feature importance ranking algorithm to screen out the top N fingerprint features required for identifying mobile hotspot WiFi from all the fingerprint features of the training samples, the obtained multiple WiFi devices are labeled to generate training samples. When labeling, it is clearly known whether the WiFi device to be labeled is a mobile WiFi device or a non-mobile WiFi device, and the random forest feature importance ranking algorithm is used to screen out the fingerprint features for classifying mobile and non-mobile WiFi.
[0130] Aggregate processing is performed on the selected fingerprint features: using a pre-selected aggregation function, for example, an aggregation function for calculating the average or median, the fingerprint features of multiple WiFi devices with the same MAC prefix or the same SSID are aggregated to obtain the aggregated fingerprint features corresponding to the WiFi devices with the same MAC prefix or the same SSID.
[0131] S22: Input all the selected fingerprint features and / or aggregated fingerprint features into the WiFi identification model corresponding to the application scenario to train the WiFi identification model.
[0132] In the above step S22, the WiFi recognition model corresponding to the application scenario can be a logistic regression model, a support vector machine model or a random forest model. For example, when it is necessary to classify mobile and non-mobile WiFi, the fingerprint features and / or aggregated fingerprint features of each training sample are obtained from the training sample set according to the above WiFi feature extraction method, and some features are selected from the obtained fingerprint features and / or aggregated fingerprint features, and the classification model in machine learning, such as a logistic regression model, a support vector machine model or a random forest model, is used as a WiFi recognition model for training. In the trained WiFi recognition model, the test sample is classified into mobile and non-mobile WiFi to obtain the training result. Determine the index parameters such as the classification accuracy and recall rate of the classification model obtained by training. If the classification accuracy and recall rate of the WiFi recognition model meet the WiFi recognition requirements, for example, the accuracy and recognition rate exceed 90%, then the trained WiFi recognition model is a recognition model that meets the requirements.
[0133] The training method of the WiFi recognition model provided by the embodiment of the present invention can select multiple different fingerprint features and / or aggregated fingerprint features according to preset application scenarios related to WiFi information. The amount of WiFi data used for training is large and the information is more comprehensive, and the accuracy and recall rate of the obtained WiFi recognition model are high.
[0134] Based on the same inventive concept, an embodiment of the present invention further provides a WiFi feature extraction device, related storage media and server. Since the principles of solving the problems by these devices, related storage media and servers are similar to those of the aforementioned WiFi feature extraction method, the implementation of these methods, devices, related storage media and servers can refer to the implementation of the aforementioned method, and the repeated parts will not be repeated.
[0135] The embodiment of the present invention also provides a WiFi feature extraction device, referring to Figure 4 As shown, including:
[0136] The fingerprint data extraction module 101 is used to extract the fingerprint data of the WiFi device from the log data, wherein the fingerprint data includes at least one or more of the following: device identification, latitude and longitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information;
[0137] The fingerprint feature acquisition module 102 is used to obtain the fingerprint feature of the WiFi device based on the fingerprint data of the WiFi device, and the fingerprint feature includes at least one or more of the following categories: location distribution feature, signal strength feature, association feature of the WiFi device with other WiFi devices, and device network address feature;
[0138] The aggregated fingerprint feature acquisition module 103 is configured to select at least one fingerprint feature from at least one type of fingerprint features of the WiFi device; aggregate the selected at least one fingerprint feature with the corresponding fingerprint features of other WiFi devices having the same aggregation tag respectively to obtain the aggregated fingerprint features corresponding to the at least one fingerprint feature.
[0139] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to determine the location distribution feature of the WiFi device according to the longitude and latitude positions of multiple collection points of the WiFi device in the log data;
[0140] determine the signal strength feature of the WiFi device according to the signal strength of the WiFi device at multiple collection points in the log data;
[0141] determine the association feature between the WiFi device and other WiFi devices according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0142] determine the device network address feature of the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data.
[0143] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to determine the location distribution feature corresponding to the center point of the total collection points of the WiFi device or the center point of the collection point cluster according to the longitude and latitude positions of each collection point of the WiFi device; the collection point cluster is obtained by clustering each collection point of the WiFi device;
[0144] determine the location distribution feature corresponding to the range covered by the total collection points of the WiFi device according to the longitude and latitude positions of each collection point of the WiFi device.
[0145] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to determine the number of collection points in each signal strength interval according to the signal strength magnitudes of the WiFi device at multiple collection points in the log data and the signal strength intervals divided according to a preset signal strength interval, and obtain at least one signal strength distribution feature of the WiFi device according to the number.
[0146] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to determine the association feature related to the quantity of the base stations or other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0147] Determine the association features related to the coverage range of other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data;
[0148] Determine the association features related to a preset time period for each WiFi device associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data.
[0149] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to determine the quantity feature of the collection points associated with the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data;
[0150] Determine the probability feature of the WiFi device belonging to the mobile network according to the device network address information of multiple collection points of the WiFi device in the log data.
[0151] In one embodiment, the fingerprint data extraction module 101 is further configured to extract the fingerprint data time information of the WiFi device from the log data;
[0152] The fingerprint feature acquisition module 102 is further configured to determine the time feature of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data.
[0153] In one embodiment, the fingerprint feature acquisition module 102 is specifically configured to divide the preset time period into several equal parts according to the time slices of the first duration, determine the proportion of the time slices with collections among all the time slices of the first duration, and obtain the time frequency feature of the WiFi device;
[0154] Divide each day within the time period of the preset total number of days into several equal parts according to the time slices of the second duration, where each equal part corresponds to a moment, and respectively determine the total collection volume that occurs at the same moment on different days within the time period, and obtain the moment feature of the WiFi device.
[0155] In one embodiment, the WiFi feature extraction device further includes a training module, which is configured to select at least some features from the obtained fingerprint features and / or aggregated fingerprint features of the WiFi device, input them into a WiFi recognition model corresponding to a preset application scenario, and train the WiFi recognition model.
[0156] An embodiment of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned WiFi feature extraction method is implemented.
[0157] An embodiment of the present invention provides a WiFi feature extraction server, including: a processor and a memory for storing processor-executable instructions; wherein, the processor is configured to execute the above-mentioned WiFi feature extraction method.
[0158] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.
[0159] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or a combination of multiple flows and / or blocks
[0160] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one or more of the flows Figure 1 or a combination of multiple flows and / or blocks
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or a combination of multiple flows and / or blocks
[0162] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A WiFi feature extraction method, comprising: extracting fingerprint data of a WiFi device from log data, where the fingerprint data includes at least any one or more of the following: device identity identifier, longitude and latitude position, signal strength, association information between the WiFi device and other WiFi devices, and device network address information; obtaining fingerprint features of the WiFi device based on the fingerprint data of the WiFi device, where the fingerprint features include at least any one or more of the following categories: position distribution features, signal strength features, association features between the WiFi device and other WiFi devices, and device network address features; selecting at least one fingerprint feature from at least one category of fingerprint features of the WiFi device, and aggregating the selected at least one fingerprint feature with corresponding fingerprint features of other WiFi devices with the same aggregation tag to obtain an aggregated fingerprint feature corresponding to the at least one fingerprint feature; wherein the aggregated fingerprint feature reflects the group features of all WiFi devices with the same aggregation tag, and if the device identity identifier of the WiFi device is a MAC address, the aggregation tag is a MAC prefix; if the device identity identifier of the WiFi device is a service set identifier SSID, the aggregation tag is the SSID.
2. The method according to claim 1, wherein, The obtaining fingerprint features of the WiFi device based on the fingerprint data of the WiFi device includes: determining the position distribution feature of the WiFi device according to the longitude and latitude positions of multiple collection points of the WiFi device in the log data; determining the signal strength feature of the WiFi device according to the signal strengths of the WiFi device at multiple collection points in the log data; determining the association feature between the WiFi device and other WiFi devices according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data; determining the device network address feature of the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data.
3. The method according to claim 2, wherein, The determining the position distribution feature of the WiFi device according to the longitude and latitude positions of multiple collection points in the log data includes: determining the position distribution feature corresponding to the center point of the total collection points of the WiFi device or the center point of the collection point cluster according to the longitude and latitude positions of each collection point of the WiFi device; the collection point cluster is obtained by clustering each collection point of the WiFi device; determining the position distribution feature corresponding to the range covered by the total collection points of the WiFi device according to the longitude and latitude positions of each collection point of the WiFi device.
4. The method according to claim 2, wherein, The determining the signal strength feature of the WiFi device according to the signal strengths of the WiFi device at multiple collection points in the log data includes: determining the number of collection points in each signal strength interval according to the signal strength magnitudes of the WiFi device at multiple collection points in the log data and the signal strength intervals divided according to a preset signal strength interval, and obtaining at least one signal strength distribution feature of the WiFi device according to the number.
5. The method according to claim 2, wherein, Determining the association characteristics between the WiFi device and other WiFi devices according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data, including one or more of the following: Determining the association characteristics related to the quantity of the base stations or other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data; Determining the association characteristics related to the coverage area of other WiFi devices associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data; Determining the association characteristics related to a preset time period of each WiFi device associated with the WiFi device according to the association information between the current WiFi device and multiple surrounding base stations and / or multiple WiFi devices in the log data.
6. The method according to claim 2, wherein, Determining the device network address characteristics of the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data, including one or more of the following: Determining the quantity characteristics of the collection points associated with the WiFi device according to the device network address information of multiple collection points of the WiFi device in the log data; Determining the probability characteristics of the WiFi device belonging to a mobile network according to the device network address information of multiple collection points of the WiFi device in the log data.
7. The method according to claim 1, wherein The fingerprint data further includes time information; The fingerprint characteristics of the WiFi device obtained based on the fingerprint data of the WiFi device further include: determining the time characteristics of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data.
8. The method according to claim 7, wherein, Determining the time characteristics of the WiFi device according to the time information of multiple collection points of the WiFi device in the log data, including one or more of the following: Dividing a preset time period into several equal parts according to time slices of a first duration, determining the proportion of the time slices with collections among all the time slices of the first duration, and obtaining the time frequency characteristics of the WiFi device; Dividing each day within a time period of a preset total number of days into several equal parts according to time slices of a second duration, with each equal part corresponding to a moment, and respectively determining the total collection quantity at the same moment on different days within the time period, and obtaining the moment characteristics of the WiFi device.
9. The method according to any one of claims 1-8, wherein, The WiFi feature extraction method further includes: Selecting at least some features from the obtained fingerprint characteristics and / or aggregated fingerprint characteristics of the WiFi device, and inputting them into a WiFi recognition model corresponding to a preset application scenario to train the WiFi recognition model.
10. A WiFi feature extraction device, including: A fingerprint data extraction module, configured to extract the fingerprint data of the WiFi device from the log data, where the fingerprint data includes at least any one or more of the following: device identity identifier, longitude and latitude position, signal strength, the association information between the WiFi device and other WiFi devices, and device network address information; A fingerprint feature acquisition module, configured to obtain fingerprint features of the WiFi device based on the fingerprint data of the WiFi device, where the fingerprint features include at least any one or more of the following categories: location distribution features, signal strength features, association features between the WiFi device and other WiFi devices, and device network address features; An aggregated fingerprint feature acquisition module, configured to select at least one fingerprint feature from at least one category of fingerprint features of the WiFi device; aggregate the selected at least one fingerprint feature with corresponding fingerprint features of other WiFi devices with the same aggregation label to obtain aggregated fingerprint features corresponding to the at least one fingerprint feature; wherein the aggregated fingerprint features reflect the group features of all WiFi devices with the same aggregation label, and if the device identity identifier of the WiFi device is a MAC address, the aggregation label is a MAC prefix; if the device identity identifier of the WiFi device is a service set identifier SSID, the aggregation label is the SSID.
11. A computer-readable storage medium having computer instructions stored thereon, wherein, When the instruction is executed by a processor, it implements the WiFi feature extraction method according to any one of claims 1-9.
12. A WiFi feature extraction server, comprising: A processor and a memory for storing processor-executable commands; wherein the processor is configured to execute the WiFi feature extraction method according to any one of claims 1-9.
Citation Information
Patent Citations
Wireless signal fingerprint establishment method and device
CN108540926A
A method and a device for updating a fingerprint database based on historical data and increments
CN108984785A