CN105722216B - Distance detection method, terminal device and storage medium - Google Patents

Distance detection method, terminal device and storage medium Download PDF

Info

Publication number
CN105722216B
CN105722216B CN201610232126.0A CN201610232126A CN105722216B CN 105722216 B CN105722216 B CN 105722216B CN 201610232126 A CN201610232126 A CN 201610232126A CN 105722216 B CN105722216 B CN 105722216B
Authority
CN
China
Prior art keywords
local area
wireless local
area network
mobile terminals
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610232126.0A
Other languages
Chinese (zh)
Other versions
CN105722216A (en
Inventor
张洋平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610232126.0A priority Critical patent/CN105722216B/en
Publication of CN105722216A publication Critical patent/CN105722216A/en
Application granted granted Critical
Publication of CN105722216B publication Critical patent/CN105722216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

Landscapes

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

Abstract

The invention provides a distance detection method and terminal equipment, wherein the method comprises the following steps: detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment; acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal; determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.

Description

Distance detection method, terminal device and storage medium
Technical Field
The present invention relates to a distance detection technology of a terminal device, and in particular, to a distance detection method, a terminal device, and a storage medium.
Background
The existing common positioning modes comprise two types, one is GPS positioning, and the other is triangular positioning based on a wifi base station.
The first GPS positioning requires a GPS module, and the GPS module receives data information broadcast by a positioning satellite to perform calculation, and the data information is finally converted into longitude and latitude to obtain position information, which is relatively high in accuracy. Another range detection is calculated by wifi signal attenuation. And detecting a signal attenuation value between the signal source and the receiving point, and calculating the distance from the signal source through a communication model because the signal transmission is attenuated continuously along with the increase of the distance. After calculating the distance between a certain point and three signal sources, the position information can be determined by the triangulation principle.
However, the two methods have the problems that the first method using GPS positioning has high accuracy, but requires additional hardware support and high hardware cost, and the first method using GPS is really large and small in size for only determining the distance of different mobile phones relative to a PC. The second method also has certain limitations, and requires that the signal source and the receiving point are open, no obstacles exist, and interference of other signal sources cannot exist, and if the interference of obstacles or other signals exists, the attenuation of the signals can be accelerated, so that the calculation result is inaccurate. Especially, the second condition is difficult to satisfy, and now with the rapid development of communication, our space is filled with various signals. Such ideal environment is difficult to realize in reality. Therefore, the relative distance between the terminal devices cannot be conveniently and quickly determined in the prior art, and therefore the operation efficiency of a user cannot be improved.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a distance detection method and a terminal device, so as to at least solve the above existing technical problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the embodiment of the invention provides a distance detection method, which is applied to terminal equipment and comprises the following steps:
detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment;
acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks;
and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
The embodiment of the invention provides a terminal device for distance detection, which comprises:
a detecting unit, configured to detect a first wireless local area network set, where the first wireless local area network set includes at least one first wireless local area network that can be detected by the terminal device;
the information acquisition unit is used for acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
a processing unit, configured to determine a relative distance between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
According to the distance detection method and the terminal device provided by the invention, the relative distance between the terminal device and at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal device and at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Drawings
FIG. 1 is a schematic flow chart of a distance detection method according to an embodiment of the present invention;
FIG. 2 is a first schematic view of a detection scenario according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a second exemplary detection scenario according to the present invention;
FIG. 4 is a third schematic view of a detection scenario according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a fourth exemplary detection scenario according to the present invention;
FIG. 6 is a first diagram illustrating a display result after processing based on the sorting result according to an embodiment of the present invention;
FIG. 7 is a second diagram illustrating a display result after being processed based on the sorting result according to the embodiment of the present invention;
fig. 8 is a schematic diagram of a structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The first embodiment,
An embodiment of the present invention provides a distance detection method, which is applied to a terminal device, and as shown in fig. 1, the method includes:
step 101: detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment;
step 102: acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
step 103: determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks;
step 104: and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
The detecting of the first wlan set may specifically be: detecting to obtain at least one first wireless local area network, and obtaining identification information corresponding to the at least one first wireless local area network;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method may further include: and extracting identification information corresponding to at least one second wireless local area network detected by the mobile terminal from the second wireless local area network set.
The identification information may include at least a Service Set Identifier (SSID). It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
For example, referring to fig. 2, the terminal device 21 can detect three wireless local area networks of SSID1, SSID2, and SSID 3; the mobile terminal 221 may detect three wireless local area networks SSID1, SSID2 and SSID 3; the mobile terminal 222 may detect both the SSID3 and the SSID 4.
In this embodiment, the same number of wireless local area networks is used to determine the relative distance between the mobile terminal and the terminal device, which is specifically described as follows:
the determining the relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks comprises:
respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal equipment based on the first wireless local area network set and the at least two second wireless local area network sets;
and determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks, and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The method for respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal device may be: one mobile terminal of at least two mobile terminals is extracted in sequence; acquiring a second wireless local area network set corresponding to the extracted mobile terminal; and matching the identification information of the first wireless local area network in the first wireless local area network set and the identification information of the second wireless local area network in the second wireless local area network set to obtain the wireless local area networks with the same identification information in the two sets, and determining the number of the same wireless local area networks.
The determining the wireless signal similarity between the terminal device and the at least two mobile terminals based on the number of the same wireless local area networks may be:
the number of the mobile terminals and the number of the terminal devices having the same wireless local area network are directly used as the wireless signal similarity between the mobile terminals and the terminal devices.
For example, referring to fig. 2, where the mobile terminal 221 currently establishes a connection with an SSID2 wireless local area network, the wireless local area network that can be detected by the mobile terminal 221 further includes an SSID1 and an SSID3, that is, the SSID1, the SSID2, and the SSID3 are included in the second wireless local area network set corresponding to the mobile terminal 221; the PC is currently connected with the SSID2, the detected wireless local area networks further comprise an SSID1 and an SSID3, namely a first wireless local area network set corresponding to the PC21 comprises an SSID1, an SSID2 and an SSID 3; the number of the wireless local area networks between the mobile terminal 221 and the PC21 is three; the number of wireless lans between the mobile terminal 222 and the PC21 can be determined to be one in the same manner. It can be analyzed that the wireless signal similarity between the mobile terminal 221 and the PC21 is 3, and the wireless signal similarity between the mobile terminal 222 and the PC21 is 1.
By adopting the analysis mode, the relative distance between the mobile terminal and the terminal equipment can be determined, at least two mobile terminals are sorted based on the relative distance, and finally, the operation mode is determined based on the sorting result. For example, a mobile terminal ranked closest to the relative distance may be determined as a mobile terminal that is the same as the user of the terminal device based on the ranking result, for example, as shown in fig. 3, it can be determined that the mobile terminal 221 and the terminal device, i.e., the PC21, may be the same user through the above analysis of the wireless signal similarity.
Further, the method may control to generate corresponding prompt information for the corresponding mobile terminal through a first application in the terminal device or a first plug-in the first application, where the prompt information may be that the mobile terminal closest to the relative distance is preferentially displayed. For example, the method is applied to a mobile phone assistant plug-in a QQ browser at a PC end, and is suitable for the situation that the QQ browser finds a plurality of mobile phone devices, and the mobile phone with high similarity can be displayed in front.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Example II,
An embodiment of the present invention provides a distance detection method, which is applied to a terminal device, and as shown in fig. 1, the method includes:
step 101: detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment;
step 102: acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
step 103: determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks;
step 104: and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
In this embodiment, the relative distance is determined not only based on the detected identification information of the wireless local area network, but also based on the signal strength information of the wireless local area network obtained by the mobile terminal and the terminal device, which is specifically described as follows:
in this embodiment, the detecting the first wireless local area network set includes: detecting to obtain identification information of at least one first wireless local area network and corresponding signal strength information thereof; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method further includes: and extracting the identification information of at least one second wireless local area network detected by the mobile terminal and the corresponding signal intensity information from the at least two second wireless local area network sets.
The identification information may include at least a Service Set Identifier (SSID).
For example, referring to fig. 4, in the scenario shown in fig. 4, a first wireless local area network set composed of first wireless local area networks that can be detected by a terminal device 41, such as a laptop computer, may be represented by { W1:60, W2:80, W3:90}, where W1 may correspond to SSID1, and similarly W2 may correspond to SSID2, and the description of the corresponding manner is omitted in the following description; a second set of wireless local area networks detected by the mobile terminal 421 { W1:90, W2:80, W3:60 }; a second set of wireless local area networks { W2:80, W3:80, W4:60} detected by the mobile terminal 422.
It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
The determining the relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks comprises:
determining the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set based on the identification information of at least one second wireless local area network detected by the mobile terminal and the identification information of at least one first wireless local area network detected by the terminal equipment;
acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets;
calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The method for respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal device may be: one mobile terminal of at least two mobile terminals is extracted in sequence; acquiring a second wireless local area network set corresponding to the extracted mobile terminal; and matching the identification information of the first wireless local area network in the first wireless local area network set and the identification information of the second wireless local area network in the second wireless local area network set to obtain the wireless local area networks with the same identification information in the two sets, and determining the number of the same wireless local area networks.
The specific calculation method for the wireless signal similarity in this embodiment may provide the following two ways:
in a first way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value and the second numerical value to obtain the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20 and the second weight value may be set to-0.3.
The second way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
judging whether the mobile terminal and the terminal equipment are connected to the same wireless local area network or not, if so, respectively acquiring signal intensity information of the same wireless local area network connected between the mobile terminal and the terminal equipment, calculating a difference value between the signal intensity information of the same wireless local area network respectively corresponding to the mobile terminal and the terminal equipment, and performing weighting calculation on the difference value and a third weight value to obtain a third numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value, the second numerical value and the third numerical value as the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20, the second weight value may be set to-0.1, and the third weight value may be set to-0.5.
The following is described in detail with reference to fig. 5: the method comprises the steps that terminal equipment is assumed to be a PC capable of accessing a wireless local area network, and at least two mobile terminals are a mobile phone A and a mobile phone B respectively; the PC and the mobile phones A and B are both connected to the same wifi W1, the distance between the A and the PC is short, the distance between the B and the PC is long, and three wifi hotspots of W2, W3 and W4 exist in the space.
Cell phone a and PC can detect W1, W2, W4, while cell phone B can detect W1, W3, W4.
And the PC end starts a mobile phone assistant plug-in the browser. Because the three are in the same wifi local area network, the mobile phone assistant plug-in at the PC end can sense the existence of A and B, and can acquire wifi information detected by the mobile phones of A and B. Meanwhile, the PC can also acquire wifi information of the PC. At this time, the PC has a second wlan set { W1:80, W2:90, W4:60} sent from the triple-data mobile phone a, a first wlan set { W1:90, W2:60, W4:90} detected by the PC, and a second wlan set { W1:80, W3:80, W4:60}, the first W representing wifi found, actually distinguished according to its unique Mac address, denoted here by W for convenience of description, and the latter number representing signal strength.
One is to find the first weight value of the same number of ssids to be set to p, and the other two are the weights m, n of the signal quality difference between the same wifi. Wherein m is a third weight value corresponding to the signal difference of wifi connected to the PC, the mobile phone a or the mobile phone B, which is the signal difference of W1 in the above diagram; and n represents a second weighted value corresponding to the quality difference of the unconnected wifi signals. It is clear that the p-weight should be decisive and that m, n serve as a fine tuning.
After collecting the relevant data, the modeling is performed to calculate (Σ (w)) + p + [ w-w '] + m + [ w-w' ]n, where p is 20, m is 0.5, and n is 0.1. wifi similarity between a and PC is 3 × 20+10 (-0.5) + (30+30) (-0.1) · 49, wifi similarity between B and PC is 2 × 20+10 (-0.5) + (10+30) (-0.1) · 31, and it can be seen that the similarity between a and PC is greater than B, so that it can be determined that a and PC are closer to B. The m, n and p in the formula are determined to be an optimal value through a large amount of data verification, so that the accuracy of the algorithm is ensured in most scenes.
By adopting the analysis mode, the relative distance between the mobile terminal and the terminal equipment can be determined, at least two mobile terminals are sorted based on the relative distance, and finally, the operation mode is determined based on the sorting result. For example, a mobile terminal ranked closest to the relative distance may be determined as a mobile terminal that is the same as the user of the terminal device based on the ranking result, for example, as shown in fig. 3, it can be determined that the mobile terminal 221 and the terminal device, i.e., the PC21, may be the same user through the above analysis of the wireless signal similarity.
Further, the sorting the at least two mobile terminals according to the relative distance to perform processing based on a sorting result includes:
sequencing the at least two mobile terminals according to the sequence of the relative distances from near to far, and selecting the mobile terminal positioned at the front preset position in the sequencing result as a target mobile terminal;
and processing the information of the target mobile terminal.
In actual life, a plurality of mobile phones may be connected to the same wifi hotspot, all mobile phone assistant plug-ins can detect and display the mobile phones, and if the mobile phones are not sorted, a user needs to select one mobile phone from a plurality of mobile phone lists, so that the use cost of the user is increased. The mobile phone of the user is generally closest to the user, based on the assumption, the wireless signal similarity algorithm is used for conducting similarity sequencing on the found mobile phone equipment, the similarity is high, the display rank close to the user is in the front, and therefore the user can easily find the mobile phone of the user, and the use experience of the user is improved.
For example, in conjunction with fig. 5, 6, and 7, the cell phone assistant finds two cell phones, namely cell phone a (MX5) and cell phone B (kupai god F2), and through the analysis and calculation of fig. 5, it can be found that cell phone a (MX5) is closer to the PC end, and cell phone B (kupai god F2) is farther.
Based on the sorting rule of the relative distance from near to far, it can be known that the mobile phone a is closer than the mobile phone B, and then as shown in fig. 6, the mobile phone name MX5 corresponding to the mobile phone a is arranged at the first position in the plugin operation interface of the first application; alternatively, MX5 handset a may be directly preferentially displayed as shown in fig. 7.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Example III,
An embodiment of the present invention provides a distance detection method, which is applied to a terminal device, and as shown in fig. 1, the method includes:
step 101: detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment;
step 102: acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
step 103: determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks;
step 104: and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
The difference from the first embodiment is that, in this embodiment, the relative distance is determined not only based on the detected identification information of the wireless local area network, but also based on the signal strength information of the wireless local area network acquired by the mobile terminal and the terminal device, which is specifically described as follows:
in this embodiment, the detecting the first wireless local area network set includes: detecting to obtain identification information of at least one first wireless local area network and corresponding signal strength information thereof; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method further includes: and extracting the identification information of at least one second wireless local area network detected by the mobile terminal and the corresponding signal intensity information from the at least two second wireless local area network sets.
The identification information may include at least a Service Set Identifier (SSID).
For example, referring to fig. 4, in the scenario shown in fig. 4, a first wireless local area network set composed of first wireless local area networks that can be detected by a terminal device 41, such as a laptop computer, may be represented by { W1:60, W2:80, W3:90}, where W1 may correspond to SSID1, and similarly W2 may correspond to SSID2, and the description of the corresponding manner is omitted in the following description; a second set of wireless local area networks detected by the mobile terminal 421 { W1:90, W2:80, W3:60 }; a second set of wireless local area networks { W2:80, W3:80, W4:60} detected by the mobile terminal 422.
It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
Determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks, comprising:
determining the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set based on the identification information of at least one second wireless local area network detected by the mobile terminal and the identification information of at least one first wireless local area network detected by the terminal equipment;
judging whether the number of the at least two second wireless local area network sets corresponding to the at least two mobile terminals is the same as that of the wireless local area networks in the first wireless local area network set;
if not, determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks between the at least two mobile terminals and the terminal equipment; taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals;
if the signal strength information is the same as the signal strength information, acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets; calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The difference between this embodiment and the first and second embodiments is that, first, the number of the same wireless local area networks that can be detected between at least two mobile terminals and the terminal device is determined, and if the number of the same wireless local area networks that can be detected between the at least two mobile terminals and the terminal device is different, it can be considered that the wireless signal similarity between one mobile terminal and the terminal device with the same number and the largest number is the best, that is, the relative distance between the mobile terminal and the terminal device is the closest;
if at least two mobile terminals and the terminal device detect that the number of the same wireless local area networks is not different, the following calculation mode is adopted for further calculation.
By adopting the mode provided by the embodiment, calculation under any condition can be avoided, so that the mobile terminal closest to the terminal equipment in relative distance can be found to a certain extent, and the processing efficiency is improved.
The specific calculation method for the wireless signal similarity in this embodiment may provide the following two ways:
in a first way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value and the second numerical value to obtain the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20 and the second weight value may be set to-0.3.
The second way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
judging whether the mobile terminal and the terminal equipment are connected to the same wireless local area network or not, if so, respectively acquiring signal intensity information of the same wireless local area network connected between the mobile terminal and the terminal equipment, calculating a difference value between the signal intensity information of the same wireless local area network respectively corresponding to the mobile terminal and the terminal equipment, and performing weighting calculation on the difference value and a third weight value to obtain a third numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value, the second numerical value and the third numerical value as the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20, the second weight value may be set to-0.1, and the third weight value may be set to-0.5.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Example four,
An embodiment of the present invention provides a terminal device, and as shown in fig. 8, the method includes:
a detecting unit 81, configured to detect a first wireless local area network set, where the first wireless local area network set includes at least one first wireless local area network that can be detected by the terminal device;
an information obtaining unit 82, configured to obtain at least two second wlan sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
a processing unit 83, configured to determine a relative distance between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
The detecting of the first wlan set may specifically be: detecting to obtain at least one first wireless local area network, and obtaining identification information corresponding to the at least one first wireless local area network;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method may further include: and extracting identification information corresponding to at least one second wireless local area network detected by the mobile terminal from the second wireless local area network set.
The identification information may include at least a Service Set Identifier (SSID). It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
For example, referring to fig. 2, the terminal device 21 can detect three wireless local area networks of SSID1, SSID2, and SSID 3; the mobile terminal 221 may detect three wireless local area networks SSID1, SSID2 and SSID 3; the mobile terminal 222 may detect both the SSID3 and the SSID 4.
In this embodiment, the same number of wireless local area networks is used to determine the relative distance between the mobile terminal and the terminal device, which is specifically described as follows:
the processing unit is configured to determine, based on the first wireless local area network set and the at least two second wireless local area network sets, the number of the same detected wireless local area networks between the at least two mobile terminals and the terminal device, respectively; and determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks, and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The method for respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal device may be: one mobile terminal of at least two mobile terminals is extracted in sequence; acquiring a second wireless local area network set corresponding to the extracted mobile terminal; and matching the identification information of the first wireless local area network in the first wireless local area network set and the identification information of the second wireless local area network in the second wireless local area network set to obtain the wireless local area networks with the same identification information in the two sets, and determining the number of the same wireless local area networks.
The determining the wireless signal similarity between the terminal device and the at least two mobile terminals based on the number of the same wireless local area networks may be:
the number of the mobile terminals and the number of the terminal devices having the same wireless local area network are directly used as the wireless signal similarity between the mobile terminals and the terminal devices.
For example, referring to fig. 2, where the mobile terminal 221 currently establishes a connection with an SSID2 wireless local area network, the wireless local area network that can be detected by the mobile terminal 221 further includes an SSID1 and an SSID3, that is, the SSID1, the SSID2, and the SSID3 are included in the second wireless local area network set corresponding to the mobile terminal 221; the PC is currently connected with the SSID2, the detected wireless local area networks further comprise an SSID1 and an SSID3, namely a first wireless local area network set corresponding to the PC21 comprises an SSID1, an SSID2 and an SSID 3; the number of the wireless local area networks between the mobile terminal 221 and the PC21 is three; the number of wireless lans between the mobile terminal 222 and the PC21 can be determined to be one in the same manner. It can be analyzed that the wireless signal similarity between the mobile terminal 221 and the PC21 is 3, and the wireless signal similarity between the mobile terminal 222 and the PC21 is 1.
By adopting the analysis mode, the relative distance between the mobile terminal and the terminal equipment can be determined, at least two mobile terminals are sorted based on the relative distance, and finally, the operation mode is determined based on the sorting result. For example, a mobile terminal ranked closest to the relative distance may be determined as a mobile terminal that is the same as the user of the terminal device based on the ranking result, for example, as shown in fig. 3, it can be determined that the mobile terminal 221 and the terminal device, i.e., the PC21, may be the same user through the above analysis of the wireless signal similarity.
Further, the method may control to generate corresponding prompt information for the corresponding mobile terminal through a first application in the terminal device or a first plug-in the first application, where the prompt information may be that the mobile terminal closest to the relative distance is preferentially displayed. For example, the method is applied to a mobile phone assistant plug-in a QQ browser at a PC end, and is suitable for the situation that the QQ browser finds a plurality of mobile phone devices, and the mobile phone with high similarity can be displayed in front.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Example V,
An embodiment of the present invention provides a terminal device, and as shown in fig. 8, the method includes:
a detecting unit 81, configured to detect a first wireless local area network set, where the first wireless local area network set includes at least one first wireless local area network that can be detected by the terminal device;
an information obtaining unit 82, configured to obtain at least two second wlan sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
a processing unit 83, configured to determine a relative distance between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
In this embodiment, the relative distance is determined not only based on the detected identification information of the wireless local area network, but also based on the signal strength information of the wireless local area network obtained by the mobile terminal and the terminal device, which is specifically described as follows:
in this embodiment, the detecting unit is configured to detect and obtain identification information of at least one first wireless local area network and signal strength information corresponding to the identification information; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, the information obtaining unit is configured to extract, from the at least two second wlan sets, the identification information of the at least one second wlan detected by the mobile terminal and the signal strength information corresponding to the identification information.
The identification information may include at least a Service Set Identifier (SSID).
For example, referring to fig. 4, in the scenario shown in fig. 4, a first wireless local area network set composed of first wireless local area networks that can be detected by a terminal device 41, such as a laptop computer, may be represented by { W1:60, W2:80, W3:90}, where W1 may correspond to SSID1, and similarly W2 may correspond to SSID2, and the description of the corresponding manner is omitted in the following description; a second set of wireless local area networks detected by the mobile terminal 421 { W1:90, W2:80, W3:60 }; a second set of wireless local area networks { W2:80, W3:80, W4:60} detected by the mobile terminal 422.
It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
The processing unit is configured to determine, based on the identification information of the at least one second wireless local area network detected by the mobile terminal and the identification information of the at least one first wireless local area network detected by the terminal device, the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set;
acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets;
calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The method for respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal device may be: one mobile terminal of at least two mobile terminals is extracted in sequence; acquiring a second wireless local area network set corresponding to the extracted mobile terminal; and matching the identification information of the first wireless local area network in the first wireless local area network set and the identification information of the second wireless local area network in the second wireless local area network set to obtain the wireless local area networks with the same identification information in the two sets, and determining the number of the same wireless local area networks.
The specific calculation method for the wireless signal similarity in this embodiment may provide the following two ways:
in a first way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value and the second numerical value to obtain the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20 and the second weight value may be set to-0.3.
The second way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
judging whether the mobile terminal and the terminal equipment are connected to the same wireless local area network or not, if so, respectively acquiring signal intensity information of the same wireless local area network connected between the mobile terminal and the terminal equipment, calculating a difference value between the signal intensity information of the same wireless local area network respectively corresponding to the mobile terminal and the terminal equipment, and performing weighting calculation on the difference value and a third weight value to obtain a third numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value, the second numerical value and the third numerical value as the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20, the second weight value may be set to-0.1, and the third weight value may be set to-0.5.
The following is described in detail with reference to fig. 5: the method comprises the steps that terminal equipment is assumed to be a PC capable of accessing a wireless local area network, and at least two mobile terminals are a mobile phone A and a mobile phone B respectively; the PC and the mobile phones A and B are both connected to the same wifi W1, the distance between the A and the PC is short, the distance between the B and the PC is long, and three wifi hotspots of W2, W3 and W4 exist in the space.
Cell phone a and PC can detect W1, W2, W4, while cell phone B can detect W1, W3, W4.
And the PC end starts a mobile phone assistant plug-in the browser. Because the three are in the same wifi local area network, the mobile phone assistant plug-in at the PC end can sense the existence of A and B, and can acquire wifi information detected by the mobile phones of A and B. Meanwhile, the PC can also acquire wifi information of the PC. At this time, the PC has a second wlan set { W1:80, W2:90, W4:60} sent from the triple-data mobile phone a, a first wlan set { W1:90, W2:60, W4:90} detected by the PC, and a second wlan set { W1:80, W3:80, W4:60}, the first W representing wifi found, actually distinguished according to its unique Mac address, denoted here by W for convenience of description, and the latter number representing signal strength.
One is to find the first weight value of the same number of ssids to be set to p, and the other two are the weights m, n of the signal quality difference between the same wifi. Wherein m is a third weight value corresponding to the signal difference of wifi connected to the PC, the mobile phone a or the mobile phone B, which is the signal difference of W1 in the above diagram; and n represents a second weighted value corresponding to the quality difference of the unconnected wifi signals. It is clear that the p-weight should be decisive and that m, n serve as a fine tuning.
After collecting the relevant data, the modeling is performed to calculate (Σ (w)) + p + [ w-w '] + m + [ w-w' ]n, where p is 20, m is 0.5, and n is 0.1. wifi similarity between a and PC is 3 × 20+10 (-0.5) + (30+30) (-0.1) · 49, wifi similarity between B and PC is 2 × 20+10 (-0.5) + (10+30) (-0.1) · 31, and it can be seen that the similarity between a and PC is greater than B, so that it can be determined that a and PC are closer to B. The m, n and p in the formula are determined to be an optimal value through a large amount of data verification, so that the accuracy of the algorithm is ensured in most scenes.
By adopting the analysis mode, the relative distance between the mobile terminal and the terminal equipment can be determined, at least two mobile terminals are sorted based on the relative distance, and finally, the operation mode is determined based on the sorting result. For example, a mobile terminal ranked closest to the relative distance may be determined as a mobile terminal that is the same as the user of the terminal device based on the ranking result, for example, as shown in fig. 3, it can be determined that the mobile terminal 221 and the terminal device, i.e., the PC21, may be the same user through the above analysis of the wireless signal similarity.
Further, the processing unit is configured to sort the at least two mobile terminals according to the sequence of the relative distances from near to far, and select a mobile terminal located at a front preset position in a sorting result as a target mobile terminal; and processing the information of the target mobile terminal.
In actual life, a plurality of mobile phones may be connected to the same wifi hotspot, all mobile phone assistant plug-ins can detect and display the mobile phones, and if the mobile phones are not sorted, a user needs to select one mobile phone from a plurality of mobile phone lists, so that the use cost of the user is increased. The mobile phone of the user is generally closest to the user, based on the assumption, the wireless signal similarity algorithm is used for conducting similarity sequencing on the found mobile phone equipment, the similarity is high, the display rank close to the user is in the front, and therefore the user can easily find the mobile phone of the user, and the use experience of the user is improved.
For example, in conjunction with fig. 5, 6, and 7, the cell phone assistant finds two cell phones, namely cell phone a (MX5) and cell phone B (kupai god F2), and through the analysis and calculation of fig. 5, it can be found that cell phone a (MX5) is closer to the PC end, and cell phone B (kupai god F2) is farther.
Based on the sorting rule of the relative distance from near to far, it can be known that the mobile phone a is closer than the mobile phone B, and then as shown in fig. 6, the mobile phone name MX5 corresponding to the mobile phone a is arranged at the first position in the plugin operation interface of the first application; alternatively, MX5 handset a may be directly preferentially displayed as shown in fig. 7.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
Example six,
An embodiment of the present invention provides a terminal device, and as shown in fig. 8, the method includes:
a detecting unit 81, configured to detect a first wireless local area network set, where the first wireless local area network set includes at least one first wireless local area network that can be detected by the terminal device;
an information obtaining unit 82, configured to obtain at least two second wlan sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
a processing unit 83, configured to determine a relative distance between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
First, it should be noted that the terminal device in this embodiment may be a device capable of detecting a wireless local area network, for example, a PC device, or a device such as a notebook computer.
The difference from the first embodiment is that, in this embodiment, the relative distance is determined not only based on the detected identification information of the wireless local area network, but also based on the signal strength information of the wireless local area network acquired by the mobile terminal and the terminal device, which is specifically described as follows:
in this embodiment, the detecting the first wireless local area network set includes: detecting to obtain identification information of at least one first wireless local area network and corresponding signal strength information thereof; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method further includes: and extracting the identification information of at least one second wireless local area network detected by the mobile terminal and the corresponding signal intensity information from the at least two second wireless local area network sets.
The identification information may include at least a Service Set Identifier (SSID).
For example, referring to fig. 4, in the scenario shown in fig. 4, a first wireless local area network set composed of first wireless local area networks that can be detected by a terminal device 41, such as a laptop computer, may be represented by { W1:60, W2:80, W3:90}, where W1 may correspond to SSID1, and similarly W2 may correspond to SSID2, and the description of the corresponding manner is omitted in the following description; a second set of wireless local area networks detected by the mobile terminal 421 { W1:90, W2:80, W3:60 }; a second set of wireless local area networks { W2:80, W3:80, W4:60} detected by the mobile terminal 422.
It should be noted that the first wireless local area network is used to characterize a wireless local area network that can be detected by the terminal device; the second wireless local area network is used for representing the wireless local area network which can be detected by the mobile terminal. In this embodiment, the SSID of the wireless lan is used to characterize the SSID.
Determining a relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks, comprising:
determining the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set based on the identification information of at least one second wireless local area network detected by the mobile terminal and the identification information of at least one first wireless local area network detected by the terminal equipment;
judging whether the number of the at least two second wireless local area network sets corresponding to the at least two mobile terminals is the same as that of the wireless local area networks in the first wireless local area network set;
if not, determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks between the at least two mobile terminals and the terminal equipment; taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals;
if the signal strength information is the same as the signal strength information, acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets; calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
The difference between this embodiment and the first and second embodiments is that, first, the number of the same wireless local area networks that can be detected between at least two mobile terminals and the terminal device is determined, and if the number of the same wireless local area networks that can be detected between the at least two mobile terminals and the terminal device is different, it can be considered that the wireless signal similarity between one mobile terminal and the terminal device with the same number and the largest number is the best, that is, the relative distance between the mobile terminal and the terminal device is the closest;
if at least two mobile terminals and the terminal device detect that the number of the same wireless local area networks is not different, the following calculation mode is adopted for further calculation.
By adopting the mode provided by the embodiment, calculation under any condition can be avoided, so that the mobile terminal closest to the terminal equipment in relative distance can be found to a certain extent, and the processing efficiency is improved.
The specific calculation method for the wireless signal similarity in this embodiment may provide the following two ways:
in a first way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value and the second numerical value to obtain the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20 and the second weight value may be set to-0.3.
The second way,
The calculating, based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks, the wireless signal similarity between the terminal device and the at least two mobile terminals may be:
weighting and calculating based on the sum of the number of the same wireless local area networks and a first weight value to obtain a first numerical value;
judging whether the mobile terminal and the terminal equipment are connected to the same wireless local area network or not, if so, respectively acquiring signal intensity information of the same wireless local area network connected between the mobile terminal and the terminal equipment, calculating a difference value between the signal intensity information of the same wireless local area network respectively corresponding to the mobile terminal and the terminal equipment, and performing weighting calculation on the difference value and a third weight value to obtain a third numerical value;
weighting and calculating a result obtained by summing the signal intensity information of the mobile terminal and the same wireless local area network and the difference value between the signal intensity information of the terminal equipment and the same wireless local area network with a second weight value to obtain a second numerical value;
and calculating the sum of the first numerical value, the second numerical value and the third numerical value as the wireless signal similarity.
The first weight value and the second weight value may be set according to actual conditions, and since the number of the wireless local area networks having the same number is used as the most important reference factor in this embodiment, the first weight value is set to be greater than the second weight value. For example, the first weight value may be set to 20, the second weight value may be set to-0.1, and the third weight value may be set to-0.5.
Therefore, by adopting the scheme, the relative distance between the terminal equipment and the at least two mobile terminals can be determined by determining the first wireless local area network set corresponding to the terminal equipment and the at least two second wireless local area network sets corresponding to the at least two mobile terminals, and finally the processing is carried out based on the sequencing result of the relative distance. Therefore, the relative distance between the terminal equipment and at least two mobile terminals can be conveniently and quickly compared, the final processing mode is determined based on the relative distance, inconvenience and misoperation caused by selecting the mobile terminal with the nearest distance from a list consisting of a plurality of mobile terminals are avoided, and the operation efficiency and the experience effect of a user are improved.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
This embodiment provides a specific hardware based on the above device embodiment, as shown in fig. 8, the apparatus includes a processor 82, a storage medium 84, and at least one external communication interface 81; the processor 82, the storage medium 84, and the external communication interface 81 are all connected by a bus 83. The processor 82 may be a microprocessor, a central processing unit, a digital signal processor, a programmable logic array, or other electronic components with processing functions. The storage medium has stored therein computer executable code.
The hardware may be the server. The processor, when executing the computer executable code, is capable of at least: acquiring multimedia information; extracting the characteristics of the multimedia information from at least one characteristic dimension to obtain at least one characteristic parameter corresponding to each characteristic dimension of the multimedia information; and querying in the corresponding characteristic dimension based on the extracted at least one characteristic parameter to obtain a query result corresponding to the at least one characteristic dimension.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (13)

1. A distance detection method is applied to terminal equipment and is characterized by comprising the following steps:
detecting a first wireless local area network set, wherein the first wireless local area network set comprises at least one first wireless local area network which can be detected by the terminal equipment;
acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
determining wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets, and taking the wireless signal similarity as a relative distance between the terminal equipment and the at least two mobile terminals;
and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
2. The method of claim 1, wherein the determining the wireless signal similarity between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets comprises:
respectively determining the number of the same wireless local area networks detected between the at least two mobile terminals and the terminal equipment based on the first wireless local area network set and the at least two second wireless local area network sets;
and determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks.
3. The method of claim 1, wherein the detecting the first set of wireless local area networks comprises:
detecting to obtain identification information of at least one first wireless local area network and corresponding signal strength information thereof; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, after the at least two second wlan sets sent by the at least two mobile terminals are obtained, the method further includes: and extracting the identification information of at least one second wireless local area network detected by the mobile terminal and the corresponding signal intensity information from the at least two second wireless local area network sets.
4. The method of claim 3, wherein the determining the relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks comprises:
determining the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set based on the identification information of at least one second wireless local area network detected by the mobile terminal and the identification information of at least one first wireless local area network detected by the terminal equipment;
acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets;
calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
5. The method of claim 3, wherein the determining the relative distance between the terminal device and the at least two mobile terminals based on the first set of wireless local area networks and the at least two second sets of wireless local area networks comprises:
determining the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set based on the identification information of at least one second wireless local area network detected by the mobile terminal and the identification information of at least one first wireless local area network detected by the terminal equipment;
judging whether the number of the at least two second wireless local area network sets corresponding to the at least two mobile terminals is the same as that of the wireless local area networks in the first wireless local area network set;
if not, determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks between the at least two mobile terminals and the terminal equipment; taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals;
if the signal strength information is the same as the signal strength information, acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets; calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
6. The method according to any of claims 1-5, wherein said sorting said at least two mobile terminals according to said relative distance for processing based on the sorting result comprises:
sequencing the at least two mobile terminals according to the sequence of the relative distances from near to far, and selecting the mobile terminal positioned at the front preset position in the sequencing result as a target mobile terminal;
and processing the information of the target mobile terminal.
7. A terminal device for distance detection, the terminal device comprising:
a detecting unit, configured to detect a first wireless local area network set, where the first wireless local area network set includes at least one first wireless local area network that can be detected by the terminal device;
the information acquisition unit is used for acquiring at least two second wireless local area network sets sent by at least two mobile terminals; the second wireless local area network set comprises at least one second wireless local area network which can be detected by the mobile terminal;
a processing unit, configured to determine wireless signal similarities between the terminal device and the at least two mobile terminals based on the first wireless local area network set and the at least two second wireless local area network sets, and use the wireless signal similarities as relative distances between the terminal device and the at least two mobile terminals; and sequencing the at least two mobile terminals according to the relative distance so as to process based on a sequencing result.
8. The terminal device of claim 7,
the processing unit is configured to determine, based on the first wireless local area network set and the at least two second wireless local area network sets, the number of the same detected wireless local area networks between the at least two mobile terminals and the terminal device, respectively; and determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks.
9. The terminal device according to claim 7, wherein the detecting unit is configured to obtain identification information of at least one first wireless local area network and signal strength information corresponding to the identification information; adding the identification information of the at least one first wireless local area network and the corresponding signal strength information thereof to the first wireless local area network set;
correspondingly, the information obtaining unit is configured to extract, from the at least two second wlan sets, the identification information of the at least one second wlan detected by the mobile terminal and the signal strength information corresponding to the identification information.
10. The terminal device of claim 9,
the processing unit is configured to determine, based on the identification information of the at least one second wireless local area network detected by the mobile terminal and the identification information of the at least one first wireless local area network detected by the terminal device, the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set;
acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets;
calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
11. The terminal device of claim 9,
the processing unit is configured to determine, based on the identification information of the at least one second wireless local area network detected by the mobile terminal and the identification information of the at least one first wireless local area network detected by the terminal device, the number of the same wireless local area networks in the first wireless local area network set and the second wireless local area network set;
judging whether the number of the at least two second wireless local area network sets corresponding to the at least two mobile terminals is the same as that of the wireless local area networks in the first wireless local area network set;
if not, determining the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks between the at least two mobile terminals and the terminal equipment; taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals;
if the signal strength information is the same as the signal strength information, acquiring signal strength information corresponding to the same wireless local area network from the first wireless local area network set and the two second wireless local area network sets; calculating the wireless signal similarity between the terminal equipment and the at least two mobile terminals based on the number of the same wireless local area networks and the signal strength information corresponding to the same wireless local area networks; and taking the wireless signal similarity as the relative distance between the terminal equipment and the at least two mobile terminals.
12. The terminal device according to any one of claims 7 to 11, wherein the processing unit is configured to sort the at least two mobile terminals according to a sequence of the relative distances from near to far, and select a mobile terminal located at a front preset position in a sorting result as a target mobile terminal; and processing the information of the target mobile terminal.
13. A computer-readable storage medium having stored thereon executable instructions for implementing the distance detection method of any one of claims 1 to 6 when executed.
CN201610232126.0A 2016-04-14 2016-04-14 Distance detection method, terminal device and storage medium Active CN105722216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610232126.0A CN105722216B (en) 2016-04-14 2016-04-14 Distance detection method, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610232126.0A CN105722216B (en) 2016-04-14 2016-04-14 Distance detection method, terminal device and storage medium

Publications (2)

Publication Number Publication Date
CN105722216A CN105722216A (en) 2016-06-29
CN105722216B true CN105722216B (en) 2020-05-12

Family

ID=56160534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610232126.0A Active CN105722216B (en) 2016-04-14 2016-04-14 Distance detection method, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN105722216B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899939A (en) * 2017-03-20 2017-06-27 广东小天才科技有限公司 Monitoring method and device for terminal equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661303A (en) * 2013-11-19 2015-05-27 马维尔国际贸易有限公司 Wireless LAN Device Positioning
CN104703214A (en) * 2013-12-06 2015-06-10 中国移动通信集团公司 Positioning monitoring method and device
CN105101085A (en) * 2015-07-23 2015-11-25 小米科技有限责任公司 Establishing method of trip log and apparatus thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2585495C (en) * 2004-10-29 2016-06-21 Skyhook Wireless, Inc. Location beacon database and server, method of building location beacon database, and location based service using same
CN103379437A (en) * 2012-04-28 2013-10-30 华为终端有限公司 Wireless terminal positioning method, related device and related system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104661303A (en) * 2013-11-19 2015-05-27 马维尔国际贸易有限公司 Wireless LAN Device Positioning
CN104703214A (en) * 2013-12-06 2015-06-10 中国移动通信集团公司 Positioning monitoring method and device
CN105101085A (en) * 2015-07-23 2015-11-25 小米科技有限责任公司 Establishing method of trip log and apparatus thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Accumulative distance based optimized scanning for a LTE network;kartikeya Rao等;《2015 International Conference on Applied and Theoretical Computing and Communication Technology (iCATccT)》;20151031;第178-182页 *
基于权值参数的WiFi定位算法研究;郑学伟;《国外电子测量技术》;20140331;第35-50页 *

Also Published As

Publication number Publication date
CN105722216A (en) 2016-06-29

Similar Documents

Publication Publication Date Title
US10660024B2 (en) Wireless network access method and apparatus
US9538330B2 (en) System and method for selecting a Wi-Fi access point for position determination
CN106658652B (en) Method and device for connecting WiFi hotspot
US20140221009A1 (en) Method, system and apparatus for collecting location information
WO2014108765A1 (en) Classifying stored information about wlan access points
CN112261570B (en) Method, device, server and storage medium for associating interest point with wireless network
KR20150025208A (en) Method for connecting network and an electronic device thereof
CN106686587B (en) Wireless fidelity Wi-Fi connection method, mobile terminal and medium
CN106028279A (en) Network registration method and device
US20150195775A1 (en) Wlan radiomap with access points uniquely identified by combination of bssid and mcc
JP6480042B1 (en) Information processing apparatus and program
CN112867147A (en) Positioning method and positioning device
CN103974286A (en) Cell reselection method and device
CN113645625B (en) Pseudo base station positioning method, pseudo base station positioning device, electronic equipment and readable medium
CN113055901B (en) Terminal positioning method and device
CN111405464B (en) Base station position detection method and device
CN105722216B (en) Distance detection method, terminal device and storage medium
CN108882165B (en) Navigation method and device
CN107040603B (en) Method and device for determining active scene of application program App
KR20180025874A (en) Network selection based on user feedback
CN113179533B (en) Network problem positioning method, device, equipment, storage medium and program product
CN112235723B (en) Positioning method, positioning device, electronic equipment and computer readable storage medium
KR20150006289A (en) Portable Terminal
CN111401879B (en) Method and device for calibrating station position information
CN107396325B (en) Neighbor extraction system, method and related device of wireless access point

Legal Events

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