CN111148216A - Electronic equipment positioning method and electronic equipment - Google Patents

Electronic equipment positioning method and electronic equipment Download PDF

Info

Publication number
CN111148216A
CN111148216A CN201910240799.4A CN201910240799A CN111148216A CN 111148216 A CN111148216 A CN 111148216A CN 201910240799 A CN201910240799 A CN 201910240799A CN 111148216 A CN111148216 A CN 111148216A
Authority
CN
China
Prior art keywords
historical
positioning
positioning data
mac address
target
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.)
Granted
Application number
CN201910240799.4A
Other languages
Chinese (zh)
Other versions
CN111148216B (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.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen China Star Optoelectronics Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Technology Co Ltd
Priority to CN201910240799.4A priority Critical patent/CN111148216B/en
Publication of CN111148216A publication Critical patent/CN111148216A/en
Application granted granted Critical
Publication of CN111148216B publication Critical patent/CN111148216B/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
    • H04W64/006Locating users or terminals or network equipment for network management purposes, e.g. mobility management with additional information processing, e.g. for direction or speed determination
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

A positioning method of an electronic device and the electronic device are provided, the method comprises: acquiring a first preset number of latest first historical positioning data from the historical positioning data; performing Wi-Fi scanning to obtain a current MAC address set; acquiring second historical positioning data of at least one same MAC address between a historical MAC address set and a current MAC address set from the first historical positioning data; calculating the target distance of the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times; if the number of the target distances smaller than the preset distance is larger than a second preset number, calculating the ratio of the number to the number of times of calculation; and if the number of the MAC addresses is larger than the preset ratio, determining historical target positioning data with the largest number of the same MAC addresses between the historical MAC address set and the current MAC address set from the second historical positioning data, and determining the corresponding historical target positioning position as the current positioning position. Power consumption can be reduced.

Description

Electronic equipment positioning method and electronic equipment
Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a positioning method for an electronic device and an electronic device.
Background
With the development of electronic devices (such as telephone watches), the functions of the electronic devices are more and more improved, and many electronic devices generally have a positioning function, and can obtain the position information of the electronic devices by sending a positioning request to a network side. For example, the parent may send a positioning instruction to a telephone watch worn by the child through the parent terminal, and the telephone watch may send a positioning request to the network side to obtain the position information of the telephone watch, and return the position information to the parent terminal, so that the parent may know the position of the child to pay attention to the journey of the child. However, in practice, it is found that many parents often use the positioning function of the telephone watch in order to know the position of the child at any time, and the telephone watch may consume much power if the telephone watch sends positioning requests to the network side too frequently.
Disclosure of Invention
The embodiment of the invention discloses a positioning method of electronic equipment and the electronic equipment, which can reduce the frequency of sending a positioning request to a network by the electronic equipment, thereby reducing the power consumption of the electronic equipment.
The first aspect of the embodiments of the present invention discloses a method for positioning an electronic device, including:
when the quantity of the historical positioning data of the electronic equipment is larger than a first preset quantity, acquiring a first historical positioning data with the first preset quantity, which is closest to the current time, from the historical positioning data; the historical positioning data at least comprises a historical positioning position obtained by each time of historical positioning and a historical MAC address set corresponding to the historical positioning position;
executing Wi-Fi scanning operation to obtain a current MAC address set;
acquiring second historical positioning data from the first historical positioning data; at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and the current MAC address set;
calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times;
if the number of the target distances smaller than the preset distance is larger than a second preset number, calculating the ratio of the number of the target distances smaller than the preset distance to the number of times of calculation;
if the ratio is larger than a preset ratio, determining target historical positioning data from the second historical positioning data; the number of the same MAC addresses existing between a historical MAC address set corresponding to a historical target positioning position included in the historical target positioning data and the current MAC address set is the largest;
determining the target historical positioning position as the current positioning position of the electronic equipment.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, before the obtaining, when the number of the historical positioning data of the electronic device is greater than a first preset number, the first preset number of first historical positioning data closest to a current time from the historical positioning data, the method further includes:
acquiring historical positioning data of the electronic equipment;
judging whether the quantity of the historical positioning data of the electronic equipment is larger than a first preset quantity or not;
if the number of the first historical positioning data is larger than the first preset number, executing the step of obtaining the first historical positioning data with the first preset number nearest to the current time from the historical positioning data;
and if the number is smaller than or equal to the first preset number, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after the performing a Wi-Fi scanning operation, obtaining a current MAC address set, and before the obtaining second historical location data from the first historical location data, the method further includes:
judging whether at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and the current MAC address set;
if yes, executing the step of acquiring second historical positioning data from the first historical positioning data;
and if the electronic equipment does not exist, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment.
As an optional implementation manner, in the first aspect of this embodiment of the present invention, the method further includes:
if the number of the target distances smaller than the preset distance is smaller than or equal to the second preset number, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment;
or if the ratio of the number of the target distances smaller than the preset distance to the number of calculation times is smaller than or equal to the preset ratio, sending a positioning request to an internet location server to perform positioning operation on the electronic equipment.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the sending a location request to an internet location server to perform a location operation on the electronic device includes:
acquiring an MAC address broadcasted by target equipment and a strength value of a broadcast signal of the target equipment; the target device is other electronic devices in a peripheral preset range of the electronic device;
sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to an Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment and determines the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment;
and receiving the positioning position of the electronic equipment fed back by the Internet position server.
A second aspect of an embodiment of the present invention discloses an electronic device, including:
the electronic equipment comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring a first preset number of first historical positioning data closest to the current time from the historical positioning data when the number of the historical positioning data of the electronic equipment is larger than a first preset number; the historical positioning data at least comprises a historical positioning position obtained by each time of historical positioning and a historical MAC address set corresponding to the historical positioning position;
the execution unit is used for executing Wi-Fi scanning operation and obtaining a current MAC address set;
the second acquisition unit is further used for acquiring second historical positioning data from the first historical positioning data; at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and the current MAC address set;
the calculating unit is used for calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculating times;
the calculating unit is further configured to calculate a ratio between the number of the target distances smaller than a preset distance and the number of times of calculation when the number of the target distances smaller than the preset distance is larger than a second preset number;
a determining unit, configured to determine historical target positioning data from the second historical positioning data when a ratio between the number of target distances smaller than a preset distance and the number of calculations is greater than a preset ratio; the number of the same MAC addresses existing between a historical MAC address set corresponding to a historical target positioning position included in the historical target positioning data and the current MAC address set is the largest;
the determining unit is further configured to determine the historical target location position as a current location position of the electronic device.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the electronic device further includes:
a third obtaining unit, configured to, when the number of the historical positioning data of the electronic device is greater than a first preset number, obtain the historical positioning data of the electronic device before obtaining, from the historical positioning data, the first preset number of first historical positioning data that is closest to a current time;
the first judging unit is used for judging whether the quantity of the historical positioning data of the electronic equipment is greater than a first preset quantity or not;
the first obtaining unit is specifically configured to, when the first determining unit determines that the number of the historical positioning data of the electronic device is greater than a first preset number, obtain, from the historical positioning data, a first historical positioning data that is closest to a current time by the first preset number;
and the positioning unit is used for sending a positioning request to an internet position server to perform positioning operation on the electronic equipment when the first judging unit judges that the quantity of the historical positioning data of the electronic equipment is less than or equal to a first preset quantity.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the electronic device further includes:
a second determining unit, configured to determine whether at least one identical MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and a current MAC address set after the executing unit executes the Wi-Fi scanning operation to obtain the current MAC address set and before the second obtaining unit obtains second historical positioning data from the first historical positioning data;
the second obtaining unit is specifically configured to, when the second determining unit determines that at least one same MAC address exists between the current MAC address set and a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data, obtain second historical positioning data from the first historical positioning data;
the positioning unit is further configured to send a positioning request to an internet location server to perform a positioning operation on the electronic device when the second determining unit determines that at least one same MAC address does not exist between the current MAC address set and a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data.
As an alternative implementation, in the second aspect of the embodiment of the present invention:
the positioning unit is further used for sending a positioning request to an internet position server to perform positioning operation on the electronic equipment when the number of the target distances smaller than the preset distance is smaller than or equal to the second preset number;
or, the positioning unit is further configured to send a positioning request to an internet location server to perform a positioning operation on the electronic device when a ratio between the number of target distances smaller than a preset distance and the number of calculation times is smaller than or equal to the preset ratio.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the manner in which the positioning unit sends the positioning request to the internet location server to perform the positioning operation on the electronic device is specifically:
the positioning unit is used for acquiring an MAC address broadcasted by target equipment and the strength value of a broadcast signal of the target equipment; sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to an Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment and determines the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment; receiving the positioning position of the electronic equipment fed back by the internet position server; the target device is other electronic devices within a preset range around the electronic device.
A third aspect of an embodiment of the present invention discloses an electronic device, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute the positioning method of the electronic equipment disclosed by the first aspect of the embodiment of the invention.
A fourth aspect of the embodiments of the present invention discloses a computer-readable storage medium, which stores a computer program, where the computer program enables a computer to execute the positioning method for an electronic device disclosed in the first aspect of the embodiments of the present invention.
A fifth aspect of embodiments of the present invention discloses a computer program product, which, when run on a computer, causes the computer to perform some or all of the steps of any one of the methods of the first aspect.
A sixth aspect of the present embodiment discloses an application publishing platform, where the application publishing platform is configured to publish a computer program product, where the computer program product is configured to, when running on a computer, cause the computer to perform part or all of the steps of any one of the methods in the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the present invention, because at least one identical MAC address exists between the historical MAC address set corresponding to the historical positioning location included in the second historical positioning data and the current MAC address set, it indicates that the rough location of the current electronic device can be found in the second historical positioning data. Then calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times, when the number of target distances smaller than the preset distance is larger than a second preset number, and the ratio of the number of target distances smaller than the preset distance to the calculation times is larger than a preset ratio, determining the historical positioning data of the target with the largest number of the same MAC addresses between the historical MAC address set corresponding to the historical positioning position of the target and the current MAC address set from the second historical positioning data, wherein the historical positioning position of the target is taken as the current positioning position of the electronic equipment, so that the positioning position of the current electronic equipment found in the second historical positioning data can be further ensured to be more accurate, the whole positioning process does not need to send a positioning request by a network, and the times of sending the positioning request by the electronic equipment to the network can be reduced, reducing power consumption of the electronic device.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a positioning method for an electronic device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another positioning method for an electronic device according to an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure;
FIG. 4 is a schematic structural diagram of another electronic device disclosed in the embodiments of the present invention;
fig. 5 is a schematic structural diagram of another electronic device disclosed in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is to be noted that the terms "first", "second" and "third" etc. in the description and claims of the present invention are used for distinguishing different objects, and are not used for describing a specific order. The terms "comprises," "comprising," and any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a positioning method of electronic equipment and the electronic equipment, which can reduce the frequency of sending a positioning request to a network by the electronic equipment, thereby reducing the power consumption of the electronic equipment. The following detailed description is made with reference to the accompanying drawings.
Example one
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a positioning method of an electronic device according to an embodiment of the present invention. As shown in fig. 1, the method may include the following steps.
101. When the quantity of the historical positioning data of the electronic equipment is larger than a first preset quantity, the electronic equipment obtains the first historical positioning data with the first preset quantity nearest to the current time from the historical positioning data.
In the embodiment of the present invention, the historical positioning data at least includes a historical positioning position obtained by each historical positioning and a historical MAC address set corresponding to the historical positioning position.
In the embodiment of the invention, the electronic equipment stores historical data of each positioning, wherein the closer the positioning time of the historical positioning data is to the current time, the closer the current position of the electronic equipment is to the historical positioning position is. Therefore, in the embodiment of the present invention, the electronic device may obtain, from the historical location data, a first preset number of first historical location data closest to the current time, where the first preset number may be set by a tester through a large number of experiments, and the embodiment of the present invention is not limited.
In the embodiment of the present invention, the electronic device may be a smart watch, a smart bracelet, a mobile phone, or other various devices, which is not limited in the embodiment of the present invention.
In this embodiment of the present invention, the electronic device shown below may be any one of the above devices, and the embodiment of the present invention is not limited thereto. The operating system of the electronic device may include, but is not limited to, an Android operating system, an IOS operating system, a Symbian operating system, a blackberry operating system, a Windows Phone8 operating system, and the like.
In the embodiment of the present invention, the electronic device may support the following network technologies including but not limited to: global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), wideband Code Division Multiple Access (W-CDMA), CDMA2000, IMT Single Carrier (IMT Single Carrier), Enhanced Data rate GSM Evolution (Enhanced Data Rates for GSM Evolution, EDGE), Long-term Evolution (Long-term Evolution, LTE), advanced Long-term Evolution (LTE), Time-Division Long-term Evolution (Time-Division LTE, TD-LTE), High-Performance Radio Local Area Network (High-Performance Radio Local Area Network, High-Performance lan), High-Performance wide Area Network (High wan), Local multi-point SDMA (Local multi-point Access, LMDS), Worldwide Interoperability for Microwave (WiMAX), bluetooth (orthogonal frequency Division multiplexing), and High-capacity space Division multiplexing (space Division multiplexing, hch) Universal Mobile Telecommunications System (UMTS), universal mobile telecommunications system time division duplex (UMTS-TDD), evolved high speed packet access (HSPA +), time division synchronous code division multiple access (TD-SCDMA), evolution data optimized (EV-DO), Digital Enhanced Cordless Telecommunications (DECT), and others.
102. The electronic device executes Wi-Fi scanning operation to obtain a current MAC address set.
In the embodiment of the invention, each Access Point (AP) has a globally unique MAC address, and can be used for confirming the position of the wireless AP. When the electronic equipment executes Wi-Fi scanning operation, the MAC addresses broadcasted by the surrounding wireless APs can be collected. It should be noted that, regardless of whether the electronic device is connected to the network, MAC addresses broadcasted by surrounding wireless APs may be collected and displayed in the list. The display sequence may be displayed from strong to weak according to the strength value of the wireless AP broadcast signal, which is not limited in the embodiment of the present invention.
103. The electronic equipment acquires second historical positioning data from the first historical positioning data, wherein at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and a current MAC address set.
In the embodiment of the present invention, since the MAC addresses have global uniqueness, if it is detected in the first historical positioning data that one or more MAC addresses in the historical MAC address set corresponding to the historical positioning location included in a certain positioning data are the same as one or more MAC addresses in the current MAC address set, indicating that the wireless APs corresponding to these same MAC addresses are still within the scanning range of the electronic device, therefore, the electronic device can find the rough location of the electronic device from the second historical positioning data obtained from the first historical positioning data.
104. And the electronic equipment calculates the target distance between the historical positioning positions corresponding to any two second historical positioning data and counts the calculation times.
In the embodiment of the present invention, since the historical positioning position corresponding to each positioning in the second historical positioning data is known, the electronic device can calculate the target distance between the historical positioning positions corresponding to any two second historical positioning data, and the formula of the statistical calculation times is N (N-1)/2, where N represents the number of the second historical positioning data. For example, 50 second historical positioning data are obtained, and then the electronic device calculates the target distance between the historical positioning positions corresponding to any two of the 50 second historical positioning data, wherein the number of times of calculation is 1225 times in total.
105. When the number of target distances smaller than the preset distance is larger than a second preset number, the electronic device calculates a ratio between the number of target distances smaller than the preset distance and the number of calculation times.
In the embodiment of the present invention, the preset distance and the second preset number may be set by a tester through a large number of experiments, and the embodiment of the present invention is not limited.
In the embodiment of the present invention, after the electronic device calculates the target distance between the historical positioning positions corresponding to any two second historical positioning data and counts the calculation times, it may be determined whether the number of target distances smaller than the preset distance is greater than a second preset number, and when the number of target distances smaller than the preset distance is greater than the second preset number, the electronic device calculates the ratio between the number of target distances smaller than the preset distance and the calculation times. For example, the number of the second historical positioning data is 50, the number of times of calculation is 1225, the second preset number is 2, the number of the target distances smaller than the preset distance is 630, at this time, the number of the target distances smaller than the preset distance is greater than the second preset number, and the ratio between the number of the target distances smaller than the preset distance calculated by the electronic device and the number of times of calculation is about 51%.
106. When the ratio is larger than a preset ratio, the electronic equipment determines the historical object positioning data from the second historical object positioning data, wherein the historical object positioning data comprises the largest number of the same MAC addresses between the historical MAC address set corresponding to the historical object positioning position and the current MAC address set.
In the embodiment of the present invention, when the ratio between the number of target distances smaller than the preset distance and the number of times of calculation is greater than the preset ratio, the electronic device determines, from the second historical positioning data, the target historical positioning data that includes the largest number of identical MAC addresses between the historical MAC address set corresponding to the historical target positioning position and the current MAC address set. The preset ratio may be set by a tester through a lot of experiments, and the embodiment of the present invention is not limited. Since the number of the same MAC addresses existing between the historical MAC address set corresponding to the historical target location position included in the historical target location data and the current MAC address set is the largest, that is, the wireless APs corresponding to the same MAC addresses are within the scanning range of the current electronic device, at this time, the electronic device may use the historical target location position included in the historical target data as the current location position of the electronic device, which means that the greater the number of the same MAC addresses, that is, the greater the number of the wireless APs within the scanning range, the closer the historical target location position included in the historical target data is to the current location position of the electronic device, that is, the smaller the error existing between the historical target location position and the current location position.
107. The electronic device determines a historical location position of the object as a current location position of the electronic device.
As an alternative embodiment, after the electronic device determines 107 the target historical positioning location as the current positioning location of the electronic device, the electronic device may further perform the following steps:
acquiring third history positioning data in a preset time period from the history positioning data;
fitting a third history positioning position corresponding to the third history positioning data to obtain a walking route of the user to which the electronic equipment belongs;
and sending the walking route to a parent terminal bound with the electronic equipment so that the parent pays attention to the journey of the user.
In the embodiment of the present invention, the preset time period may be one day, one week, or one month, and the embodiment of the present invention is not limited. For convenience in understanding, the embodiment of the present invention is described by taking a day as an example, the electronic device obtains positioning data of the electronic device in a day from historical positioning data, then fits positioning positions corresponding to the positioning data to obtain a walking route of a user to which the electronic device belongs, and sends the walking route to a parent terminal bound to the electronic device, so that a parent can know a journey of the user in a day from the parent terminal.
By implementing the optional implementation mode, the parents can pay more convenient attention to the journey of the user through the interaction between the electronic equipment and the parent terminal.
As an alternative embodiment, after the electronic device determines 107 the target historical positioning location as the current positioning location of the electronic device, the electronic device may further perform the following steps:
sending the current positioning position of the electronic equipment to a target terminal bound with the electronic equipment, and receiving the real-time position of the target terminal returned by the target terminal; displaying the current positioning position of the electronic equipment and the real-time position of the target terminal on a screen of the electronic equipment; and when the distance between the current positioning position and the real-time position of the target terminal is detected to be smaller than the designated distance, finishing the step of displaying the current positioning position and the real-time position of the target terminal on the screen of the electronic equipment.
In the embodiment of the invention, if a friend of a user to which the electronic device belongs wants to find the user, the electronic device displays the current positioning position and the real-time position of the target terminal on the screen of the electronic device, and it can be understood that the screen of the target terminal also displays the current positioning position of the electronic device and the real-time position of the target terminal in real time, and in the process that the friend gradually approaches the user, the current positioning position of the electronic device and the real-time position of the target terminal are closer and closer on the screen until when the fact that the distance between the current positioning position and the real-time position of the target terminal is smaller than the specified distance is detected, the friend finds the user, and the electronic device does not display the current positioning position of the electronic device and the real-time position of the target terminal on the screen of the electronic device any more.
By implementing the optional implementation mode, when the friend of the user to which the electronic equipment belongs wants to find the user, the efficiency can be improved, and the use experience of the user is improved.
It can be seen that, when the method described in fig. 1 is implemented, a first preset number of first historical positioning data closest to the current time is obtained from the historical data, and then Wi-Fi scanning is performed to obtain a current MAC address set, and a second historical positioning data is obtained from the first historical positioning data, because at least one same MAC address exists between the historical MAC address set corresponding to the historical positioning position included in the second historical positioning data and the current MAC address set, it indicates that a rough position of the current electronic device can be found in the second historical positioning data. Then calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times, when the number of target distances smaller than the preset distance is larger than a second preset number, and the ratio of the number of target distances smaller than the preset distance to the calculation times is larger than a preset ratio, determining the historical positioning data of the target with the largest number of the same MAC addresses between the historical MAC address set corresponding to the historical positioning position of the target and the current MAC address set from the second historical positioning data, wherein the historical positioning position of the target is taken as the current positioning position of the electronic equipment, so that the positioning position of the current electronic equipment found in the second historical positioning data can be further ensured to be more accurate, the whole positioning process does not need to send a positioning request by a network, and the times of sending the positioning request by the electronic equipment to the network can be reduced, reducing power consumption of the electronic device.
Example two
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another positioning method for an electronic device according to an embodiment of the present invention. As shown in fig. 2, the method may include the following steps.
201. The electronic device obtains historical positioning data of the electronic device.
In the embodiment of the present invention, the historical positioning data at least includes a historical positioning position obtained by each historical positioning and a historical MAC address set corresponding to the historical positioning position. In the embodiment of the invention, because the electronic equipment stores the historical data of each positioning, the electronic equipment can directly acquire the historical positioning data of the electronic equipment.
202. The electronic equipment judges whether the quantity of the historical positioning data is larger than a first preset quantity or not; if not, go to step 213; if so, step 203 is performed.
203. The electronic equipment obtains a first preset number of first historical positioning data closest to the current time from the historical positioning data.
In the embodiment of the invention, in order to avoid the influence of the contingency, before the electronic equipment obtains the first historical positioning data with the first preset number nearest to the current time from the historical positioning data, the electronic equipment can firstly judge whether the number of the historical positioning data is greater than the first preset number, if so, the historical positioning data is enough, and the influence of the contingency can be eliminated to a certain extent.
204. The electronic device executes Wi-Fi scanning operation to obtain a current MAC address set.
205. The electronic equipment judges whether at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and a current MAC address set; if not, go to step 213; if so, step 206 is performed.
206. The electronic equipment acquires second historical positioning data from the first historical positioning data, wherein at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and a current MAC address set.
207. And the electronic equipment calculates the target distance between the historical positioning positions corresponding to any two second historical positioning data and counts the calculation times.
208. The electronic equipment judges whether the number of the target distances smaller than the preset distance is larger than a second preset number or not; if not, go to step 213; if so, step 209 is performed.
209. The electronic device calculates a ratio between the number of target distances smaller than a preset distance and the number of calculations.
210. The electronic equipment judges whether the ratio of the number of the target distances smaller than the preset distance to the number of calculation times is larger than the preset ratio or not; if not, go to step 213; if so, step 211 is performed.
211. The electronic device determines object historical positioning data from the second historical positioning data, wherein the object historical positioning data comprises the maximum number of the same MAC addresses existing between the historical MAC address set corresponding to the object historical positioning position and the current MAC address set.
In this embodiment of the present invention, step 207-step 211 are implemented, where the electronic device calculates a target distance between historical positioning positions corresponding to any two second historical positioning data and counts the number of times of calculation, and when the number of target distances smaller than the preset distance is greater than a second preset number, and a ratio between the number of target distances smaller than the preset distance and the number of times of calculation is greater than a preset ratio, determines, from the second historical positioning data, the historical positioning data of the target with the largest number of identical MAC addresses between a historical MAC address set corresponding to the historical positioning position of the target and a current MAC address set, where the identical MAC addresses exist, and can further improve accuracy of a positioning position of the current electronic device found in the second historical positioning data.
212. The electronic device determines a historical location position of the object as a current location position of the electronic device.
213. The electronic equipment sends a positioning request to an internet position server to perform positioning operation on the electronic equipment.
In the embodiment of the present invention, the electronic device sends a positioning request to the internet location server to perform positioning operation on the electronic device, which requires network connection, including but not limited to Wi-Fi positioning, GPS positioning, bluetooth positioning, and the like.
As an optional implementation manner, the manner in which the electronic device sends the positioning request to the internet location server to perform the positioning operation on the electronic device may specifically be:
the method comprises the steps that electronic equipment collects MAC addresses broadcasted by target equipment and strength values of broadcast signals of the target equipment; the target equipment is other electronic equipment in a peripheral preset range of the electronic equipment;
the electronic equipment sends a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to the Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment and determines the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment;
and receiving the positioning position of the electronic equipment fed back by the Internet position server.
In the embodiment of the invention, the electronic device sends the acquired MAC address broadcasted by the target device and the strength value of the broadcast signal of the target device to the Internet position server, the Internet position server can acquire the position information of the target device according to the MAC address broadcasted by the target device, and then can obtain the distance between the target device and the electronic device according to the strength value of the broadcast signal of the target device, wherein the farther the distance is, the weaker the broadcast signal of the target device is, the closer the distance is, the stronger the broadcast signal of the target device is, then the position of each target device is taken as the center, the distance between each target device and the electronic device is taken as the radius, circular areas are constructed, and the intersection of the circular areas is the positioning position of the electronic device.
By implementing the optional implementation mode, the electronic equipment sends a positioning request to the internet position server, and the positioning position of the electronic equipment is determined through the MAC address broadcast by other electronic equipment in the peripheral preset range of the electronic equipment and the strength value of the broadcast signal, so that the accuracy of network positioning can be improved.
Further, as an optional implementation manner, after the electronic device collects the MAC address broadcasted by the target device and the strength value of the target device broadcast signal, it may be detected whether the number of other electronic devices within a preset range around the electronic device is less than a specified number; if the number of the electronic equipment in the peripheral preset range is smaller than the preset number, popping up a popup window to remind a user that the positioning data is insufficient, so that the user can position in an area with a large number of other electronic equipment in the peripheral preset range of the electronic equipment; and if the current position information is larger than or equal to the preset value, sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to the Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment, and determining the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment.
By implementing the optional implementation mode, when the number of other electronic devices in the peripheral preset range of the electronic device is small, the user is reminded, so that the user can position the area with the large number of other electronic devices in the peripheral preset range of the electronic device, and the positioning accuracy can be ensured.
It can be seen that, compared with the method described in fig. 1, in implementing the method described in fig. 2, when the quantity of the historical positioning data of the electronic device is less than or equal to a first preset quantity, or when at least one same MAC address does not exist between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and a current MAC address set, or when the quantity of target distances smaller than a preset distance is less than or equal to a second preset quantity, or when a ratio between the quantity of target distances smaller than the preset distance and the number of times of calculation is less than or equal to a preset ratio, the electronic device sends a positioning request to the internet location server to perform a positioning operation on the electronic device, so as to ensure that the electronic device performs a positioning operation normally.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. As shown in fig. 3, the electronic device may include:
the first obtaining unit 301 is configured to, when the number of the historical location data of the electronic device is greater than a first preset number, obtain, from the historical location data, a first historical location data that is closest to the current time by the first preset number.
In the embodiment of the present invention, the historical positioning data at least includes a historical positioning position obtained by each historical positioning and a historical MAC address set corresponding to the historical positioning position.
An executing unit 302, configured to execute a Wi-Fi scanning operation to obtain a current MAC address set.
A second obtaining unit 303, configured to obtain second historical positioning data from the first historical positioning data, where at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and a current MAC address set.
And the calculating unit 304 is configured to calculate a target distance between the historical positioning positions corresponding to any two second historical positioning data and count the number of times of calculation.
The calculating unit 304 is further configured to calculate a ratio between the number of target distances smaller than the preset distance and the number of calculations when the number of target distances smaller than the preset distance is greater than a second preset number.
A determining unit 305, configured to determine historical object location data from the second historical object location data when the ratio is greater than a preset ratio, where the historical object location data includes a largest number of identical MAC addresses existing between a historical MAC address set corresponding to the historical object location position and a current MAC address set.
The determining unit 305 is further configured to determine the target historical positioning location as the current positioning location of the electronic device.
As an alternative embodiment, after the determining unit 305 determines the target historical positioning location as the current positioning location of the electronic device, the following steps may be further performed:
acquiring third history positioning data in a preset time period from the history positioning data;
fitting a third history positioning position corresponding to the third history positioning data to obtain a walking route of the user to which the electronic equipment belongs;
and sending the walking route to a parent terminal bound with the electronic equipment so that the parent pays attention to the journey of the user.
In the embodiment of the present invention, the preset time period may be one day, one week, or one month, and the embodiment of the present invention is not limited. For convenience of understanding, in the embodiment of the present invention, taking a day as an example for description, the determining unit 305 obtains the positioning data of the electronic device in a day from the historical positioning data, then fits the positioning positions corresponding to the positioning data to obtain the walking route of the user to which the electronic device belongs, and sends the walking route to the parent terminal bound to the electronic device, so that the parent can know the travel of the user in a day from the parent terminal.
By implementing the optional implementation mode, the parents can pay more convenient attention to the journey of the user through interaction with the parent terminal.
As an alternative embodiment, after the determining unit 305 determines the target historical positioning location as the current positioning location of the electronic device, the following steps may be further performed:
sending the current positioning position of the electronic equipment to a target terminal bound with the electronic equipment, and receiving the real-time position of the target terminal returned by the target terminal; displaying the current positioning position of the electronic equipment and the real-time position of the target terminal on a screen of the electronic equipment; and when the distance between the current positioning position and the real-time position of the target terminal is detected to be smaller than the designated distance, finishing the step of displaying the current positioning position and the real-time position of the target terminal on the screen of the electronic equipment.
In the embodiment of the present invention, if a friend of a user to which an electronic device belongs wants to find the user, the determining unit 305 displays a current location position and a real-time position of a target terminal on a screen of the electronic device, it can be understood that the screen of the target terminal also displays the current location position of the electronic device and the real-time position of the target terminal in real time, and in a process that the friend gradually approaches the user, the current location position of the electronic device and the real-time position of the target terminal are closer and closer on the screen until it is detected that a distance between the current location position and the real-time position of the target terminal is smaller than a specified distance, indicating that the friend has found the user, and the determining unit 305 does not display the current location position of the electronic device and the real-time position of the target terminal on the screen of the electronic device any.
By implementing the optional implementation mode, when the friend of the user to which the electronic equipment belongs wants to find the user, the efficiency can be improved, and the use experience of the user is improved.
It can be seen that, in implementing the electronic device described in fig. 3, first obtaining a first preset number of first historical positioning data closest to the current time from the historical data, then performing Wi-Fi scanning to obtain the current MAC address set, and obtaining second historical positioning data from the first historical positioning data, because there is at least one same MAC address between the historical MAC address set corresponding to the historical positioning position included in the second historical positioning data and the current MAC address set, it indicates that the rough position of the current electronic device can be found in the second historical positioning data. Then calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times, when the number of target distances smaller than the preset distance is larger than a second preset number, and the ratio of the number of target distances smaller than the preset distance to the calculation times is larger than a preset ratio, determining the historical positioning data of the target with the largest number of the same MAC addresses between the historical MAC address set corresponding to the historical positioning position of the target and the current MAC address set from the second historical positioning data, wherein the historical positioning position of the target is taken as the current positioning position of the electronic equipment, so that the positioning position of the current electronic equipment found in the second historical positioning data can be further ensured to be more accurate, the whole positioning process does not need to send a positioning request by a network, and the times of sending the positioning request by the electronic equipment to the network can be reduced, reducing power consumption of the electronic device.
Example four
Referring to fig. 4, fig. 4 is a schematic structural diagram of another electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 4 is further optimized from the electronic device shown in fig. 3. Compared to the electronic device shown in fig. 3, the electronic device shown in fig. 4 may further include:
a third obtaining unit 306, configured to obtain the historical location data of the electronic device before the first obtaining unit 301 obtains the first historical location data of the first preset number closest to the current time from the historical location data when the number of the historical location data of the electronic device is greater than the first preset number.
The first determining unit 307 is configured to determine whether the amount of the historical positioning data of the electronic device is greater than a first preset amount.
The first obtaining unit 301 is specifically configured to, when the first determining unit 307 determines that the number of the historical location data of the electronic device is greater than a first preset number, obtain a first preset number of first historical location data closest to the current time from the historical location data.
A positioning unit 308, configured to send a positioning request to an internet location server to perform a positioning operation on the electronic device when the first determining unit 307 determines that the amount of the historical positioning data of the electronic device is less than or equal to a first preset amount.
A second determining unit 309, configured to determine whether at least one identical MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and the current MAC address set after the executing unit 302 performs the Wi-Fi scanning operation to obtain the current MAC address set and before the second obtaining unit 303 obtains the second historical positioning data from the first historical positioning data.
A second obtaining unit 303, configured to obtain second historical positioning data from the first historical positioning data when the second determining unit 309 determines that at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and a current MAC address set; and at least one same MAC address exists between the historical MAC address set corresponding to the historical positioning position included in the second historical positioning data and the current MAC address set.
The positioning unit 308 is further configured to send a positioning request to the internet location server to perform a positioning operation on the electronic device when the second determining unit 309 determines that at least one same MAC address does not exist between the historical MAC address set corresponding to the historical positioning position included in the first historical positioning data and the current MAC address set.
The positioning unit 308 is further configured to send a positioning request to the internet location server to perform a positioning operation on the electronic device when the number of target distances smaller than the preset distance is smaller than or equal to a second preset number.
The positioning unit 308 is further configured to send a positioning request to the internet location server to perform a positioning operation on the electronic device when a ratio between the number of target distances smaller than the preset distance and the number of calculations is smaller than or equal to the preset ratio.
In this embodiment of the present invention, the positioning unit 308 sends a positioning request to the internet location server to perform positioning operation on the electronic device, which requires network connection, including but not limited to Wi-Fi positioning, GPS positioning, bluetooth positioning, and the like.
As an optional implementation manner, the manner in which the positioning unit 308 sends the positioning request to the internet location server to perform the positioning operation on the electronic device may specifically be:
the positioning unit 308 acquires the MAC address broadcasted by the target device and the strength value of the broadcast signal of the target device; the target equipment is other electronic equipment in a peripheral preset range of the electronic equipment;
the positioning unit 308 sends a positioning request carrying the MAC address broadcasted by the target device and the strength value of the broadcast signal of the target device to the internet location server, so that the internet location server converts the MAC address broadcasted by the target device into the location information of the target device, and determines the positioning location of the electronic device according to the location information of the target device and the strength value of the broadcast signal of the target device;
the positioning unit 308 receives the positioning position of the electronic device fed back by the internet position server.
In this embodiment of the present invention, the positioning unit 308 sends the acquired MAC address broadcasted by the target device and the strength value of the broadcast signal of the target device to the internet location server, the internet location server may obtain the location information of the target device according to the MAC address broadcasted by the target device, and then may obtain the distance from the target device to the electronic device according to the strength value of the broadcast signal of the target device, where the farther the distance is, the weaker the broadcast signal of the target device is, the closer the distance is, the stronger the broadcast signal of the target device is, and then, with the location of each target device as the center, and the distance from each target device to the electronic device as the radius, a circular area is constructed, and the intersection of the circular areas is the positioning location of the electronic device.
By implementing the optional implementation manner, the positioning unit 308 sends a positioning request to the internet location server, and determines the positioning location of the electronic device through the MAC address broadcast by other electronic devices within the preset range around the electronic device and the strength value of the broadcast signal, so that the accuracy of network positioning can be improved.
Further, as an optional implementation manner, after the positioning unit 308 collects the MAC address broadcasted by the target device and the strength value of the target device broadcast signal, it may be detected whether the number of other electronic devices in the preset range around the electronic device is less than a specified number; if the number of the electronic equipment in the peripheral preset range is smaller than the preset number, popping up a popup window to remind a user that the positioning data is insufficient, so that the user can position in an area with a large number of other electronic equipment in the peripheral preset range of the electronic equipment; and if the current position information is larger than or equal to the preset value, sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to the Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment, and determining the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment.
By implementing the optional implementation mode, when the number of other electronic devices in the peripheral preset range of the electronic device is small, the user is reminded, so that the user can position the area with the large number of other electronic devices in the peripheral preset range of the electronic device, and the positioning accuracy can be ensured.
It can be seen that, compared with the electronic device described in fig. 3, in the electronic device described in fig. 4, when the quantity of the historical positioning data of the electronic device is less than or equal to a first preset quantity, or when at least one same MAC address does not exist between the historical MAC address set corresponding to the historical positioning position included in the first historical positioning data and the current MAC address set, or when the quantity of the target distances smaller than the preset distance is less than or equal to a second preset quantity, or when the ratio of the quantity of the target distances smaller than the preset distance to the number of calculations is less than or equal to a preset ratio, the electronic device sends a positioning request to the internet location server to perform a positioning operation on the electronic device, so as to ensure that the electronic device performs positioning normally.
EXAMPLE five
Referring to fig. 5, fig. 5 is a schematic structural diagram of another electronic device according to an embodiment of the disclosure. As shown in fig. 5, the electronic device may include:
a memory 501 in which executable program code is stored;
a processor 502 coupled to a memory 501;
the processor 502 calls the executable program code stored in the memory 501 to execute the positioning method of any one of the electronic devices in fig. 1-2.
The embodiment of the invention discloses a computer-readable storage medium which stores a computer program, wherein the computer program enables a computer to execute a positioning method of any one electronic device in figures 1-2.
The embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used for publishing a computer program product, and when the computer program product runs on a computer, the computer is caused to execute part or all of the steps of the method in the above method embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are exemplary and alternative embodiments, and that the acts and modules illustrated are not required in order to practice the invention.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not imply an inevitable order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
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, 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, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present invention, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of each embodiment of the present invention.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood, however, that determining B from a does not mean determining B from a alone, but may also be determined from a and/or other information.
In various embodiments of the present invention, it is understood that the meaning of "a and/or B" means that a and B are each present alone or both a and B are included.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by instructions associated with a program, which may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), compact disc-Read-Only Memory (CD-ROM), or other Memory, magnetic disk, magnetic tape, or magnetic tape, Or any other medium which can be used to carry or store data and which can be read by a computer.
The positioning method of the electronic device and the electronic device disclosed in the embodiments of the present invention are described in detail above, and the principle and the implementation of the present invention are explained in detail herein by applying specific examples, and the description of the embodiments above is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A method for locating an electronic device, comprising:
when the quantity of the historical positioning data of the electronic equipment is larger than a first preset quantity, acquiring a first historical positioning data with the first preset quantity, which is closest to the current time, from the historical positioning data; the historical positioning data at least comprises a historical positioning position obtained by each time of historical positioning and a historical MAC address set corresponding to the historical positioning position;
executing Wi-Fi scanning operation to obtain a current MAC address set;
acquiring second historical positioning data from the first historical positioning data; at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and the current MAC address set;
calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculation times;
if the number of the target distances smaller than the preset distance is larger than a second preset number, calculating the ratio of the number of the target distances smaller than the preset distance to the number of times of calculation;
if the ratio is larger than a preset ratio, determining target historical positioning data from the second historical positioning data; the number of the same MAC addresses existing between a historical MAC address set corresponding to a historical target positioning position included in the historical target positioning data and the current MAC address set is the largest;
determining the target historical positioning position as the current positioning position of the electronic equipment.
2. The method according to claim 1, wherein before acquiring the first preset number of first historical positioning data closest to the current time from the historical positioning data when the number of the historical positioning data of the electronic device is greater than a first preset number, the method further comprises:
acquiring historical positioning data of the electronic equipment;
judging whether the quantity of the historical positioning data of the electronic equipment is larger than a first preset quantity or not;
if the number of the first historical positioning data is larger than the first preset number, executing the step of obtaining the first historical positioning data with the first preset number nearest to the current time from the historical positioning data;
and if the number is smaller than or equal to the first preset number, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment.
3. The method of claim 2, wherein after the performing the Wi-Fi scanning operation, obtaining a current set of MAC addresses, and before the obtaining second historical positioning data from the first historical positioning data, the method further comprises:
judging whether at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and the current MAC address set;
if yes, executing the step of acquiring second historical positioning data from the first historical positioning data;
and if the electronic equipment does not exist, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment.
4. The method of claim 3, further comprising:
if the number of the target distances smaller than the preset distance is smaller than or equal to the second preset number, sending a positioning request to an internet position server to perform positioning operation on the electronic equipment;
or if the ratio of the number of the target distances smaller than the preset distance to the number of calculation times is smaller than or equal to the preset ratio, sending a positioning request to an internet location server to perform positioning operation on the electronic equipment.
5. The method of any of claims 2 to 4, wherein sending a location request to an Internet location server to perform a location operation on the electronic device comprises:
acquiring an MAC address broadcasted by target equipment and a strength value of a broadcast signal of the target equipment; the target device is other electronic devices in a peripheral preset range of the electronic device;
sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to an Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment and determines the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment;
and receiving the positioning position of the electronic equipment fed back by the Internet position server.
6. An electronic device, comprising:
the electronic equipment comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring a first preset number of first historical positioning data closest to the current time from the historical positioning data when the number of the historical positioning data of the electronic equipment is larger than a first preset number; the historical positioning data at least comprises a historical positioning position obtained by each time of historical positioning and a historical MAC address set corresponding to the historical positioning position;
the execution unit is used for executing Wi-Fi scanning operation and obtaining a current MAC address set;
the second acquisition unit is further used for acquiring second historical positioning data from the first historical positioning data; at least one same MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the second historical positioning data and the current MAC address set;
the calculating unit is used for calculating the target distance between the historical positioning positions corresponding to any two second historical positioning data and counting the calculating times;
the calculating unit is further configured to calculate a ratio between the number of the target distances smaller than a preset distance and the number of times of calculation when the number of the target distances smaller than the preset distance is larger than a second preset number;
a determining unit, configured to determine historical target positioning data from the second historical positioning data when a ratio between the number of target distances smaller than a preset distance and the number of calculations is greater than a preset ratio; the number of the same MAC addresses existing between a historical MAC address set corresponding to a historical target positioning position included in the historical target positioning data and the current MAC address set is the largest;
the determining unit is further configured to determine the historical target location position as a current location position of the electronic device.
7. The electronic device of claim 6, further comprising:
a third obtaining unit, configured to obtain historical positioning data of the electronic device before the first obtaining unit obtains, when the number of the historical positioning data of the electronic device is greater than a first preset number, the first preset number of first historical positioning data that is closest to a current time from the historical positioning data;
the first judging unit is used for judging whether the quantity of the historical positioning data of the electronic equipment is greater than a first preset quantity or not;
the first obtaining unit is specifically configured to, when the first determining unit determines that the number of the historical positioning data of the electronic device is greater than a first preset number, obtain, from the historical positioning data, a first historical positioning data that is closest to a current time by the first preset number;
and the positioning unit is used for sending a positioning request to an internet position server to perform positioning operation on the electronic equipment when the first judging unit judges that the quantity of the historical positioning data of the electronic equipment is less than or equal to a first preset quantity.
8. The electronic device of claim 7, further comprising:
a second determining unit, configured to determine whether at least one identical MAC address exists between a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data and a current MAC address set after the executing unit executes the Wi-Fi scanning operation to obtain the current MAC address set and before the second obtaining unit obtains second historical positioning data from the first historical positioning data;
the second obtaining unit is specifically configured to, when the second determining unit determines that at least one same MAC address exists between the current MAC address set and a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data, obtain second historical positioning data from the first historical positioning data;
the positioning unit is further configured to send a positioning request to an internet location server to perform a positioning operation on the electronic device when the second determining unit determines that at least one same MAC address does not exist between the current MAC address set and a historical MAC address set corresponding to a historical positioning position included in the first historical positioning data.
9. The electronic device of claim 8, wherein:
the positioning unit is further used for sending a positioning request to an internet position server to perform positioning operation on the electronic equipment when the number of the target distances smaller than the preset distance is smaller than or equal to the second preset number;
or, the positioning unit is further configured to send a positioning request to an internet location server to perform a positioning operation on the electronic device when a ratio between the number of target distances smaller than a preset distance and the number of calculation times is smaller than or equal to the preset ratio.
10. The electronic device according to any one of claims 7 to 9, wherein the manner in which the positioning unit sends the positioning request to the internet location server to perform the positioning operation on the electronic device is specifically:
the positioning unit is used for acquiring an MAC address broadcasted by target equipment and the strength value of a broadcast signal of the target equipment; sending a positioning request carrying the MAC address broadcasted by the target equipment and the strength value of the broadcast signal of the target equipment to an Internet position server so that the Internet position server converts the MAC address broadcasted by the target equipment into the position information of the target equipment and determines the positioning position of the electronic equipment according to the position information of the target equipment and the strength value of the broadcast signal of the target equipment; receiving the positioning position of the electronic equipment fed back by the internet position server; the target device is other electronic devices within a preset range around the electronic device.
11. An electronic device, comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory for performing a positioning method of an electronic device according to any of claims 1-5.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, wherein the computer program causes a computer to execute a positioning method of an electronic device according to any one of claims 1-5.
CN201910240799.4A 2019-03-27 2019-03-27 Electronic equipment positioning method and electronic equipment Active CN111148216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910240799.4A CN111148216B (en) 2019-03-27 2019-03-27 Electronic equipment positioning method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910240799.4A CN111148216B (en) 2019-03-27 2019-03-27 Electronic equipment positioning method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111148216A true CN111148216A (en) 2020-05-12
CN111148216B CN111148216B (en) 2021-07-23

Family

ID=70516580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910240799.4A Active CN111148216B (en) 2019-03-27 2019-03-27 Electronic equipment positioning method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111148216B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787491A (en) * 2020-06-29 2020-10-16 广东小天才科技有限公司 Auxiliary positioning, system, wearable device and storage medium
CN112327656A (en) * 2020-11-17 2021-02-05 珠海格力电器股份有限公司 Method and device for determining equipment movement

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101953197A (en) * 2007-12-28 2011-01-19 探空气球无线公司 Providing WI-FI location information to a mobile device in order to estimate its position
CN102112891A (en) * 2008-08-06 2011-06-29 U布洛克斯股份公司 Robust location estimation
CN103384358A (en) * 2013-06-25 2013-11-06 云南大学 Indoor positioning method based on virtual reality and WIFI space field strength
CN103856893A (en) * 2012-12-05 2014-06-11 腾讯科技(深圳)有限公司 Method and device for filtering locating information
US20150094085A1 (en) * 2013-09-30 2015-04-02 Qualcomm Incorporated Access point selection for network-based positioning
US20160057577A1 (en) * 2014-08-20 2016-02-25 Qualcomm Incorporated Rtt processing based on a characteristic of access points
CN105791496A (en) * 2014-12-24 2016-07-20 高德软件有限公司 Method and apparatus for detecting state of mobile terminal
CN106535102A (en) * 2016-12-07 2017-03-22 广东欧珀移动通信有限公司 Mobile terminal positioning method and mobile terminal
CN107613552A (en) * 2017-10-31 2018-01-19 广东小天才科技有限公司 A kind of localization method and mobile terminal based on mobile terminal
CN107682926A (en) * 2017-10-12 2018-02-09 珠海市魅族科技有限公司 Offline localization method and offline positioner
CN107959919A (en) * 2017-12-07 2018-04-24 北京三快在线科技有限公司 Localization method, device, computing device and the storage medium of mobile terminal

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101953197A (en) * 2007-12-28 2011-01-19 探空气球无线公司 Providing WI-FI location information to a mobile device in order to estimate its position
CN102112891A (en) * 2008-08-06 2011-06-29 U布洛克斯股份公司 Robust location estimation
CN103856893A (en) * 2012-12-05 2014-06-11 腾讯科技(深圳)有限公司 Method and device for filtering locating information
CN103384358A (en) * 2013-06-25 2013-11-06 云南大学 Indoor positioning method based on virtual reality and WIFI space field strength
US20150094085A1 (en) * 2013-09-30 2015-04-02 Qualcomm Incorporated Access point selection for network-based positioning
US20160057577A1 (en) * 2014-08-20 2016-02-25 Qualcomm Incorporated Rtt processing based on a characteristic of access points
CN105791496A (en) * 2014-12-24 2016-07-20 高德软件有限公司 Method and apparatus for detecting state of mobile terminal
CN106535102A (en) * 2016-12-07 2017-03-22 广东欧珀移动通信有限公司 Mobile terminal positioning method and mobile terminal
CN107682926A (en) * 2017-10-12 2018-02-09 珠海市魅族科技有限公司 Offline localization method and offline positioner
CN107613552A (en) * 2017-10-31 2018-01-19 广东小天才科技有限公司 A kind of localization method and mobile terminal based on mobile terminal
CN107959919A (en) * 2017-12-07 2018-04-24 北京三快在线科技有限公司 Localization method, device, computing device and the storage medium of mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787491A (en) * 2020-06-29 2020-10-16 广东小天才科技有限公司 Auxiliary positioning, system, wearable device and storage medium
CN112327656A (en) * 2020-11-17 2021-02-05 珠海格力电器股份有限公司 Method and device for determining equipment movement

Also Published As

Publication number Publication date
CN111148216B (en) 2021-07-23

Similar Documents

Publication Publication Date Title
CN108064019B (en) Intelligent positioning method, device, server and computer readable storage medium
CN111148216B (en) Electronic equipment positioning method and electronic equipment
CN109246740B (en) Network quality evaluation method and device
CN101847325A (en) Bus stop reporting method, system and device
CN104335064A (en) Improved trilateration processing
CN107534841B (en) Method and device for outputting notification
CN103476111A (en) Method, device and system for obtaining geographic position information
CN114554402A (en) Building positioning method, electronic equipment and computer storage medium
CN110703192A (en) Positioning method and device, equipment and storage medium
CN107623945B (en) Method, system and computer storage medium for locating area of mobile device
CN110967006A (en) Navigation positioning method and device based on tunnel map, storage medium and terminal equipment
CN111402620B (en) Arrival reminding method, device, terminal and storage medium
CN110672086B (en) Scene recognition method, device, equipment and computer readable medium
CN115866751B (en) Positioning method and device based on fixed beacons and indoor map
EP3550536A1 (en) Method and device for determining geographical location of user taking a vehicle
CN111751573B (en) Mobile terminal and moving direction determining method thereof
CN110691318A (en) Positioning method, positioning device, electronic equipment and computer storage medium
CN110196442A (en) Search star method, apparatus, storage medium and mobile terminal
JP2011033357A (en) Mobile radio terminal and method of selecting base station
EP4235614A1 (en) Radio map generation device, radio map provision device, radio map acquisition and utilization device, and probe information transmission device
CN111829550B (en) Motion distance determining method, device and equipment
JP6433059B2 (en) Apparatus, program and method for positioning mobile terminal based on communication record
CN107846697B (en) SRS scheduling method and system
CN111757245B (en) Positioning method of wearable device and service device
CN111105058A (en) Running route dynamic time estimation method and device and electronic equipment

Legal Events

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