Detailed Description
In order to better understand the technical solutions described above, the technical solutions of the embodiments of the present application are described in detail below with reference to the drawings and the specific embodiments, and it should be understood that the specific features of the embodiments and the embodiments of the present application are detailed descriptions of the technical solutions of the embodiments of the present application, and are not limitations of the technical solutions of the present application, and the technical features of the embodiments and the embodiments of the present application may be combined with each other without conflict.
First embodiment
Referring to fig. 1, a method for determining WiFi location information in a first embodiment of the present invention is shown, the method specifically includes steps S10-S40:
and step S10, obtaining WiFi lists of mobile terminals of different users.
The WiFi list comprises anchor point WiFi and common WiFi, wherein the anchor point WiFi comprises position information of the WiFi, and the position information is used for representing the position of the anchor point WiFi; normal WiFi is WiFi that does not contain WiFi location information. It should be noted that the location information of the anchor point WiFi may be set when the WiFi is configured, or may be set manually in the following.
Specifically, the position information may specifically be coordinate information, area information, floor information, and the like, and the embodiment of the present invention is not specifically limited.
Step S20, calculating the number of simultaneous occurrences of WiFi pairs consisting of target anchor WiFi and target WiFi ordinary in each WiFi list, and the sum of the number of occurrences of target anchor WiFi and target WiFi ordinary.
The target anchor point WiFi is any anchor point WiFi, and the target common WiFi is any common WiFi. And counting the simultaneous occurrence times of WiFi consisting of the target anchor point WiFi and the target common WiFi in each WiFi list to obtain the common occurrence times of the target anchor point WiFi and the target common WiFi, counting the total occurrence times of the target anchor point WiFi and the target common WiFi, namely calculating the occurrence times of the target anchor point WiFi and the target common WiFi, and adding the two occurrence times to obtain the total occurrence times.
For example, WiFi lists of 3 user mobile terminals are obtained, where WiFi list 1 is { anchor WiFi1, ordinary WiFi1, ordinary WiFi2 }; WiFi list 2 is { anchor WiFi1, ordinary WiFi2, ordinary WiFi4 }; the WiFi list 3 is { anchor point WiFi2, normal WiFi3, normal WiFi4}, and then statistics shows that the co-occurrence frequency of { anchor point WiFi1, normal WiFi1} is 1, { anchor point WiFi1, normal WiFi2} is 2, { anchor point WiFi1, normal WiFi4} is 1, { anchor point WiFi2, normal WiFi3} is 1, and { anchor point WiFi2, normal WiFi4} is 1. The anchor WiFi1 appeared alone 2 times and the anchor WiFi2 appeared alone 1 times.
In step S30, the support degree is determined according to the ratio of the number of simultaneous occurrences to the sum of the number of simultaneous occurrences.
For the above example, the co-occurrence times of { anchor WiFi1, ordinary WiFi1}, { anchor WiFi1, ordinary WiFi4}, { anchor WiFi2, ordinary WiFi3}, { anchor WiFi2, ordinary WiFi4} are all 1, the sum of the times is 3, the support is 33.33%, the co-occurrence times of { anchor WiFi1, ordinary WiFi2} is 2, and the sum of the times is 3, the support is 66.66%.
And step S40, determining the position information of the target common WiFi according to the position information of the target anchor point WiFi in the WiFi pairs with the support degree exceeding the first preset value.
The first preset value may be a set percentage value, such as 60%, 79%, 90%, and the like, and may also be a support degree of N before ranking, which is not limited in the embodiment of the present invention.
For example, if the first preset value is 60%, if the support degree 66.66% of { anchor WiFi1, normal WiFi2} in the above example exceeds 60%, the location information of the normal WiFi2 is determined according to the location information of the anchor WiFi1, and if the location information of the anchor WiFi1 is floor 2, the location information of the normal WiFi2 may specifically be floor 1-3, that is, positive and negative floors of the floor information where the anchor WiFi1 is located.
The invention provides a method for determining WiFi (wireless fidelity) position information, which comprises the steps of firstly obtaining WiFi lists of mobile terminals of different users, wherein the WiFi lists comprise anchor points WiFi and common WiFi, calculating the simultaneous occurrence times of WiFi pairs consisting of target anchor points WiFi and target common WiFi in each WiFi list and the sum of the occurrence times of the target anchor points WiFi and the target common WiFi, and determining the support degree according to the ratio of the simultaneous occurrence times to the sum of the times; and determining the position information of the target common WiFi according to the position information of the target anchor point WiFi in the WiFi pairs with the support degree exceeding the first preset value. Compared with the prior art that the position information of WiFi is determined based on the positioning technology of signal strength, the position information of other surrounding common WiFi is determined based on the anchor point WiFi carrying the position information, namely the position information of the target common WiFi is determined according to the position information of the target anchor point WiFi in the WiFi pair with the support degree exceeding a first preset value, and the support degree is determined according to the ratio of the co-occurrence times and the sum of the times of the anchor point WiFi and the common WiFi, so that the accuracy of determining the position information of the WiFi can be improved through the method.
Second embodiment
Referring to fig. 2, a method for determining WiFi location information in a second embodiment of the present invention is shown, the method specifically includes steps S101-S105:
and step S101, obtaining WiFi lists of mobile terminals of different users.
The WiFi list comprises anchor point WiFi and ordinary WiFi, and the anchor point WiFi comprises position information of the WiFi.
In an embodiment provided by the present invention, the acquiring WiFi lists of different user mobile terminals includes: determining WiFi scanning intensity of each mobile terminal; calculating the average value of the WiFi scanning intensity of the mobile terminal to obtain the number of WiFi; and sorting the WiFi in the WiFi list according to the signal intensity from high to low, and filtering the WiFi ranked more than the WiFi number.
The WiFi scanning strength may be specifically represented by the number of SSIDs scanned by the mobile terminal. For example, if the WiFi scanning strengths of the mobile terminal 1, the mobile terminal 2, and the mobile terminal 3 are 6, and 9, respectively, and the calculated WiFi scanning strength of the mobile terminal is 7, SSIDs in the WiFi list of the mobile terminal 3 need to be sorted from high to low according to the signal strength, and then the last two SSIDs are filtered.
Step S102, calculating the simultaneous occurrence frequency of WiFi pairs consisting of target anchor point WiFi and target common WiFi in each WiFi list and the sum of the occurrence frequency of the target anchor point WiFi and the target common WiFi.
The target anchor point WiFi is any anchor point WiFi, and the target common WiFi is any common WiFi.
In an embodiment provided by the present invention, in order to improve the efficiency of calculating the co-occurrence number of target anchor WiFi and target ordinary WiFi, before calculating the number of simultaneous occurrences of WiFi pairs consisting of target anchor WiFi and target ordinary WiFi in each WiFi list, the method further includes: filtering does not include the WiFi list containing anchor WiFi.
And step S103, determining the support degree according to the ratio of the number of simultaneous occurrences and the sum of the number of simultaneous occurrences.
And step S104, determining the confidence level according to the ratio of the simultaneous occurrence times to the occurrence times of the WiFi of the target anchor point.
For example, { anchor WiFi1, regular WiFi2} co-occurs 2 times, anchor WiFi2, regular WiFi4} co-occurs 1 times, anchor WiFi1 occurs 2 times, and anchor WiFi2 occurs 1 times. Then the confidence for { anchor WiFi1, regular WiFi2} is 100% and the confidence for { anchor WiFi2, regular WiFi4} is 100%.
And step S105, determining the position information of the target common WiFi according to the position information of the target anchor point WiFi in the WiFi pairs with the support degree exceeding the first preset value and the confidence degree exceeding the second preset value.
The second preset value may be specifically a set percentage value, such as 60%, 79%, 90%, and the like, and may also be a confidence of N before ranking, which is not specifically limited in the embodiment of the present invention.
In an embodiment provided by the present invention, after determining the location information of the normal WiFi according to the location information of the target anchor WiFi in the WiFi pairs whose support degree exceeds a first preset value and whose confidence degree exceeds a second preset value, the method further includes: taking the determined common WiFi with the position information as anchor point WiFi in the WiFi list, and recalculating the times of simultaneous occurrence of WiFi pairs consisting of target anchor point WiFi and target common WiFi in each WiFi list; determining the support degree according to the ratio of the simultaneous occurrence times and the sum of the times; determining confidence according to the ratio of the simultaneous occurrence times to the occurrence times of the WiFi of the target anchor point; and determining the position information of the common WiFi according to the position information of the target anchor point WiFi in the WiFi pairs with the support degree exceeding a first preset value and the confidence degree exceeding a second preset value.
Third embodiment
In a third embodiment of the present invention, the method for determining WiFi location information specifically includes steps S201 to S204:
step S201, WiFi lists of mobile terminals of different users are obtained.
The WiFi list comprises anchor point WiFi and common WiFi, wherein the anchor point WiFi comprises position information of the WiFi, and the position information is used for representing the position of the anchor point WiFi; normal WiFi is WiFi that does not contain WiFi location information. It should be noted that the location information of the anchor point WiFi may be set when the WiFi is configured, or may be set manually in the following. Specifically, the position information may specifically be coordinate information, area information, floor information, and the like, and the embodiment of the present invention is not specifically limited.
Step S202, calculating the intersection of every two WiFi lists to obtain a WiFi identification set.
In the embodiment of the invention, after the WiFi lists sent by the mobile terminal are obtained, intersection calculation is carried out on every two WiFi lists to obtain a WiFi identification set, wherein the WiFi identification set comprises the intersection of the two WiFi lists. For example, if the WiFi list sent by the mobile terminal a is { WiFi1, WiFi2, WiFi3}, and the WiFi list sent by the mobile terminal B is { WiFi2, WiFi3, WiFi4}, then the WiFi identifier set obtained by intersecting the two WiFi lists is { WiFi2, WiFi3 }.
It should be noted that the WiFi identification set includes at least two set elements. The set element in the set may be ordinary WiFi, may also be anchor WiFi, and may also be in a form of a combination of ordinary WiFi and anchor WiFi, which is not specifically limited in this embodiment of the present invention.
Step S203, count the number of repetitions of the WiFi identifier set.
After the WiFi identification set is acquired, the number of repetitions of the WiFi identification set is counted. Specifically, the embodiment of the present invention may determine that two identical WiFi identifier sets are duplicated, or may determine that two WiFi identifier sets with an intersection are duplicated.
For example, 4 WiFi identifier sets are obtained through step S20, which are WiFi identifier set 1, WiFi identifier set 2, WiFi identifier set 3, and WiFi identifier set 4, respectively. The WiFi identifier set 1, the WiFi identifier set 2, and the WiFi identifier set 3 are all { WiFi1, WiFi2, WiFi3}, the WiFi identifier set 4 is set { WiFi2, WiFi3, WiFi4}, and if two identical WiFi identifier sets are adopted to confirm that the WiFi identifier sets are repeated, the number of times of repetition of the WiFi identifier set { WiFi1, WiFi2, WiFi3} is 3; if the two intersected WiFi identification sets are adopted to be confirmed to be repeated, the number of times of repetition of the WiFi identification sets { WiFi2 and WiFi3} is 4.
Step S204, determining the position information of the common WiFi according to the position information of the anchor point WiFi in the WiFi identification set with the repetition number exceeding the preset value.
The preset value can be set according to actual requirements. Specifically, the preset value may be determined according to the average repetition number of the WiFi identifier set, and if the average repetition number of the WiFi identifier set is 10 words, the preset value may be set to 11, 15, or 18, and the like.
Further, ranking may be performed according to the number of times the WiFi identifier set is repeated, and then the ranked WiFi identifier set with a preset value is taken. For example, if the preset value is 5, the WiFi identifier sets with the top 5 are taken, and then the location information of the common WiFi is determined according to the location information of the anchor WiFi in the WiFi identifier sets. If the WiFi identifier set ranked first is { anchor WiFi1, ordinary WiFi2}, the location information of ordinary WiFi2 is determined according to the location information of anchor WiFi1, and if the location information of anchor WiFi1 is floor 2, the location information of ordinary WiFi2 may specifically be floor 1-3, that is, positive and negative floors of the floor information where anchor WiFi1 is located.
The invention provides a method for determining WiFi (wireless fidelity) position information, which comprises the steps of firstly obtaining WiFi lists sent by different user mobile terminals at the same time, and then calculating the intersection between every two WiFi lists to obtain a WiFi identification set, wherein the WiFi identification set at least comprises two set elements; counting the number of repetitions of the WiFi identification set; and determining the position information of the ordinary WiFi according to the position information of the anchor point WiFi in the WiFi identification set with the repetition number exceeding a preset value. Compared with the prior art that the position information of the WiFi is determined based on the positioning technology of the signal intensity, the position information of the ordinary WiFi is determined according to the anchor point WiFi in the WiFi list, namely the position information of the ordinary WiFi is determined according to the position information of the anchor point WiFi in the WiFi identification set, the repetition number of which exceeds the preset value, so that the position information of the ordinary WiFi can be determined through the method, and the accuracy of determining the position information of the WiFi is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a device for determining WiFi location information is provided, where the device for determining WiFi location information corresponds to the method for determining WiFi location information in the foregoing embodiments one to one. As shown in fig. 3, the functional modules of the WiFi location information determining apparatus are described in detail as follows:
the system comprises anacquisition module 10, a processing module and a processing module, wherein the acquisition module is used for acquiring WiFi lists of different user mobile terminals, the WiFi lists comprise anchor point WiFi and common WiFi, and the anchor point WiFi comprises position information of the WiFi;
a calculatingmodule 20, configured to calculate the number of simultaneous occurrence of WiFi pairs consisting of a target anchor WiFi and a target ordinary WiFi in each WiFi list, and the sum of the number of occurrence of the target anchor WiFi and the target ordinary WiFi, where the target anchor WiFi is any anchor WiFi and the target ordinary WiFi is any ordinary WiFi;
a determiningmodule 30, configured to determine a confidence level according to a ratio of the number of simultaneous occurrences of the WiFi pairs consisting of the target anchor point WiFi and the target common WiFi to the number of occurrences of the target anchor point WiFi;
the determiningmodule 30 is further configured to determine the location information of the target ordinary WiFi according to the location information of the target anchor point WiFi in the WiFi pairs whose support exceeds the first preset value.
The determiningmodule 30 is further configured to determine a confidence level according to a ratio of the support degree to the individual occurrence times of the WiFi of the target anchor point;
the determiningmodule 30 is specifically configured to determine the location information of the target ordinary WiFi according to the location information of the target anchor point WiFi in the WiFi pairs whose support degree exceeds a first preset value and whose confidence degree exceeds a second preset value.
The obtainingmodule 10 is specifically configured to:
determining WiFi scanning intensity of each mobile terminal;
calculating the average value of the WiFi scanning intensity of the mobile terminal to obtain the number of WiFi;
and sorting the WiFi in the WiFi list according to the signal intensity from high to low, and filtering the WiFi ranked more than the WiFi number.
Further, the apparatus further comprises:
afiltering module 40, configured to filter the WiFi list that does not include the anchor WiFi.
The calculatingmodule 20 is further configured to use the ordinary WiFi with the determined location information as an anchor point WiFi in the WiFi list, and recalculate the number of times that a WiFi pair consisting of a target anchor point WiFi and a target ordinary WiFi appears in each WiFi list at the same time;
the determiningmodule 30 is further configured to determine a support degree according to a ratio of the number of the simultaneous occurrences to the sum of the number of the simultaneous occurrences;
the determiningmodule 30 is further configured to determine a confidence level according to a ratio of the number of the simultaneous occurrences to the number of the WiFi occurrences of the target anchor point;
the determiningmodule 30 is further configured to determine the location information of the ordinary WiFi according to the location information of the target anchor point WiFi in the WiFi pair whose support exceeds the first preset value and whose confidence exceeds the second preset value.
The calculatingmodule 20 is further configured to calculate an intersection between every two WiFi lists to obtain a WiFi identifier set, where the WiFi identifier set at least includes two set elements;
the calculatingmodule 20 is further configured to count a number of repetitions of the WiFi identifier set;
the determiningmodule 30 is further configured to determine the location information of the ordinary WiFi according to the location information of the anchor WiFi in the WiFi identifier set where the repetition number exceeds a preset value.
Specifically, the position information is floor information.
Specific limitations regarding the WiFi location information determination device can be referred to the above limitations regarding the WiFi location information determination method, which is not described herein again. The various modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of determining WiFi location information.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring WiFi lists of different user mobile terminals, wherein the WiFi lists comprise anchor point WiFi and common WiFi, and the anchor point WiFi comprises position information of the WiFi;
calculating the number of simultaneous occurrence of WiFi pairs consisting of target anchor point WiFi and target common WiFi in each WiFi list and the sum of the number of occurrence of the target anchor point WiFi and the target common WiFi, wherein the target anchor point WiFi is any one anchor point WiFi, and the target common WiFi is any one common WiFi;
determining the support degree according to the ratio of the simultaneous occurrence times and the sum of the times;
and determining the position information of the target common WiFi according to the position information of the target anchor WiFi in the WiFi pairs with the support degree exceeding a first preset value.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring WiFi lists of mobile terminals of different users, wherein the WiFi lists comprise anchor point WiFi and common WiFi, and the anchor point WiFi comprises position information of the WiFi;
calculating the number of simultaneous occurrence of WiFi pairs consisting of target anchor point WiFi and target common WiFi in each WiFi list and the sum of the number of occurrence of the target anchor point WiFi and the target common WiFi, wherein the target anchor point WiFi is any one anchor point WiFi, and the target common WiFi is any one common WiFi;
determining the support degree according to the ratio of the simultaneous occurrence times and the sum of the times;
and determining the position information of the target common WiFi according to the position information of the target anchor WiFi in the WiFi pairs with the support degree exceeding a first preset value.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.