CN112468952A - Positioning method, positioning device, storage medium and electronic equipment - Google Patents

Positioning method, positioning device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112468952A
CN112468952A CN201910828566.6A CN201910828566A CN112468952A CN 112468952 A CN112468952 A CN 112468952A CN 201910828566 A CN201910828566 A CN 201910828566A CN 112468952 A CN112468952 A CN 112468952A
Authority
CN
China
Prior art keywords
access point
electronic device
preset
location information
determining
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
CN201910828566.6A
Other languages
Chinese (zh)
Other versions
CN112468952B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910828566.6A priority Critical patent/CN112468952B/en
Publication of CN112468952A publication Critical patent/CN112468952A/en
Application granted granted Critical
Publication of CN112468952B publication Critical patent/CN112468952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/02Systems for determining distance or velocity not using reflection or reradiation using radio waves
    • G01S11/06Systems for determining distance or velocity not using reflection or reradiation using radio waves using intensity measurements
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/02Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using radio waves
    • G01S5/08Position of single direction-finder fixed by determining direction of a plurality of spaced sources of known location
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The application discloses a positioning method, a positioning device, a storage medium and electronic equipment. The method comprises the following steps: receiving a positioning request; searching access points according to the positioning request to determine at least three searched access points; determining the position information of each access point to obtain at least three pieces of position information; determining the distance between each access point and the electronic equipment to obtain at least three distances; and determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances. In a scene with weak GPS signals, the positioning accuracy can be improved.

Description

Positioning method, positioning device, storage medium and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a positioning method, an apparatus, a storage medium, and an electronic device.
Background
With the continuous development of the positioning technology, the application of the positioning technology is more and more extensive, so that not only trackers and positioners are more and more common, but also electronic devices such as smart phones or smart watches are gradually added with a positioning function, so as to realize the real-time positioning of the position of a user or the recording of a motion track.
In the related art, for electronic devices such as smartphones or smartwatches, positioning can be generally achieved by using GPS. However, in a scene where the GPS signal is weak, such as a scene where buildings are many and concentrated, the positioning accuracy of the GPS positioning may be greatly reduced.
Disclosure of Invention
The embodiment of the application provides a positioning method, a positioning device, a storage medium and electronic equipment, which can improve positioning accuracy in a scene with weak GPS signals.
The embodiment of the application provides a positioning method, which is applied to electronic equipment and comprises the following steps:
receiving a positioning request;
searching access points according to the positioning request to determine at least three searched access points;
determining the position information of each access point to obtain at least three pieces of position information;
determining the distance between each access point and the electronic equipment to obtain at least three distances;
and determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
The embodiment of the application provides a positioning device, is applied to electronic equipment, includes:
a receiving module, configured to receive a positioning request;
the searching module is used for searching the access points according to the positioning request so as to determine at least three searched access points;
a first determining module, configured to determine location information of each access point to obtain at least three pieces of location information;
the second determining module is used for determining the distance between each access point and the electronic equipment so as to obtain at least three distances;
and the third determining module is used for determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
The embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the flow in the positioning method provided by the embodiment of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the procedure in the positioning method provided in the embodiment of the present application by calling the computer program stored in the memory.
In the embodiment of the application, the specific position of the electronic device can be determined by determining the positions of the at least three access points and the distances between the at least three access points and the electronic device, and in a scene with weak GPS signals, the positioning method provided by the embodiment of the application can improve the positioning accuracy compared with the GPS positioning using weak signals.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a first flowchart of a positioning method according to an embodiment of the present application.
Fig. 2 is a second flowchart of a positioning method according to an embodiment of the present application.
Fig. 3 is a schematic view of a first scenario of a positioning method according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a second scenario of a positioning method according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a positioning device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone, a tablet computer, a smart watch, a conversation watch, a sports watch, or a smart band.
Referring to fig. 1, fig. 1 is a schematic view illustrating a first process of a positioning method provided in an embodiment of the present application, where the positioning method is applicable to an electronic device, and the process may include:
101. a location request is received.
For example, a user may click or press a "locate" button in the electronic device. The electronic device pops up a selection box to prompt the user to select to perform multipoint positioning or GPS positioning and the like. And if the user selects to perform multipoint positioning, the electronic equipment receives a positioning request.
Alternatively, a virtual key may be newly added to the electronic device, and the user may click or press the virtual key. When the user clicks or presses the virtual key, the electronic device receives the positioning request.
Alternatively, the user may draw a preset gesture on the screen of the electronic device, and when the preset gesture is received by the electronic device, the positioning request is received. The preset gesture is preset by a user and is associated with the positioning method provided by the embodiment of the application.
Alternatively, the user may speak a preset voice close to the electronic device, such as "please perform multi-point positioning", and when the electronic device receives the preset voice, the positioning request is received.
102. And searching the access points according to the positioning request to determine at least three searched access points.
For example, upon receiving a location request, the electronic device may search for access points based on the location request to determine at least three searched access points.
The access point may be a router for accessing wireless devices, such as electronic devices, into a wired network. When the electronic device is in the coverage area of the access point's signal, the electronic device may search for the access point. For example, if the electronic device searches for at least one access point, the electronic device may present the searched at least one access point in a list.
It should be noted that, in the embodiment of the present application, if the electronic device only searches for two or less access points, the electronic device may not directly perform the processing. Alternatively, the electronic device may generate a prompt to prompt the user that the multi-point positioning is not possible. The prompt message may be a text message or a voice message.
103. The location information for each access point is determined to obtain at least three location information.
For example, after determining at least three access points, the electronic device may determine the location information of each access point to obtain at least three location information.
For example, the access point location information base may be obtained from a location service provider in advance and stored into the electronic device. The access point position information base comprises identification information of a plurality of access points and corresponding position information thereof. After the electronic device determines at least three access points, the electronic device may obtain identification information of each access point. And then, whether identification information matched with the identification information of each access point exists in the access point position information base or not is detected in sequence. When it is detected that identification information matching the identification information of each access point exists in the access point location information base, the electronic device may obtain location information corresponding to the identification information, and determine the location information as the location information of each access point.
For example, assume that the electronic device determines four access points. Access points a1, a2, A3, and a4, respectively. The electronic device may obtain the identification information of a 1. The electronic device may then detect whether there is target identification information in the access point location information base that matches the identification information of a 1. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 1. Next, the electronic device may acquire the identification information of a 2. The electronic device may then detect whether there is target identification information in the access point location information base that matches the identification information of a 2. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 2. Subsequently, the electronic device may acquire the identification information of a 3. The electronic device may then detect whether there is target identification information in the access point location information base that matches the identification information of a 3. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 3. Finally, the electronic device may obtain the identification information of a 4. The electronic device may then detect whether there is target identification information in the access point location information base that matches the identification information of a 4. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 4.
Also for example, assume that the electronic device determines four access points. Access points a1, a2, A3, and a4, respectively. The electronic device may use the first thread to obtain the identification information of a 1. The electronic device may then use this first thread to detect whether there is target identification information in the access point location information base that matches the identification information of a 1. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 1. Meanwhile, the electronic device may acquire the identification information of a2 using the second thread. The electronic device may then employ the second thread to detect whether there is target identification information in the access point location information base that matches the identification information of a 2. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 2. Meanwhile, the electronic device may acquire the identification information of a3 by the third thread. The electronic device may then employ the third thread to detect whether there is target identification information in the access point location information base that matches the identification information of a 3. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 3. Meanwhile, the electronic device may acquire the identification information of a4 using the fourth thread. The electronic device may then employ a fourth thread to detect whether there is target identification information in the access point location information base that matches the identification information of a 4. If the location information exists, the location information corresponding to the target identification information is determined as the location information of the access point a 4. And the position information of a plurality of access points is determined simultaneously by adopting multithreading, so that the processing time of the electronic equipment can be greatly saved.
104. And determining the distance between each access point and the electronic equipment to obtain at least three distances.
For example, after determining at least three access points, the electronic device may determine a distance between each access point and the electronic device to obtain at least three distances.
For example, the electronic device can determine a signal strength of each access point. Then, the electronic device may determine the distance between each access point and the electronic device according to the signal strength of each access point and the preset corresponding relationship between the signal strength and the distance, so as to obtain at least three distances.
It should be noted that the process 103 and the process 104 can be executed simultaneously. The process 103 may be executed first, and then the process 104 may be executed; or, the process 104 is executed first, and then the process 103 is executed, which is not limited in this respect.
105. And determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
For example, after the electronic device obtains at least three pieces of location information and at least three distances, the electronic device may determine the location of the electronic device according to the at least three pieces of location information and the at least three distances.
For example, the location of the electronic device may be determined as follows: location information for at least three access points may be obtained. Wherein the location information of the at least three access points may include locations of the at least three access points. Then, the position of each access point can be used as a circle center, and the distance between each access point and the electronic device is used as a radius to draw a circle, so as to determine three circles, wherein the intersection point of the three circles is the position of the electronic device.
In the embodiment of the application, the specific position of the electronic device can be determined by determining the positions of the at least three access points and the distances between the at least three access points and the electronic device, and in a scene with weak GPS signals, the positioning method provided by the embodiment of the application can improve the positioning accuracy compared with the GPS positioning using weak signals.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a second process of a positioning method according to an embodiment of the present application, where the positioning method is applicable to an electronic device, and the process may include:
201. the electronic device receives a location request.
For example, a user may click or press a "locate" button in the electronic device. The electronic device pops up a selection box to prompt the user to select to perform multipoint positioning or GPS positioning and the like. And if the user selects to perform multipoint positioning, the electronic equipment receives a positioning request.
Alternatively, a virtual key may be newly added to the electronic device, and the user may click or press the virtual key. When the user clicks or presses the virtual key, the electronic device receives the positioning request.
Alternatively, the user may draw a preset gesture on the screen of the electronic device, and when the preset gesture is received by the electronic device, the positioning request is received. The preset gesture is preset by a user and is associated with the positioning method provided by the embodiment of the application.
Alternatively, the user may speak a preset voice close to the electronic device, such as "please perform multi-point positioning", and when the electronic device receives the preset voice, the positioning request is received.
202. The electronic device searches for access points according to the positioning request to determine at least three searched access points.
For example, upon receiving a location request, the electronic device may search for access points based on the location request to determine at least three searched access points.
The access point may be a router for accessing wireless devices, such as electronic devices, into a wired network. When the electronic device is in the coverage area of the access point's signal, the electronic device may search for the access point. If the electronic device searches for at least one access point, the electronic device may present the searched at least one access point in a form of a list.
It should be noted that, in the embodiment of the present application, if the electronic device only searches for two or less access points, the electronic device may not directly perform the processing. Alternatively, the electronic device may generate a prompt to prompt the user that the multi-point positioning is not possible. The prompt message may be a text message or a voice message.
203. The electronic device determines identification information for each access point.
For example, when the searched at least three access points are determined, the electronic device may determine the identification information of each access point. Wherein the identification information uniquely identifies each access point. For example, the identification information may be a MAC address, i.e., a physical address, of the access point.
For example, the access point may broadcast the physical address outward. When an access point is searched, the electronic device may acquire a physical address broadcast by the access point, and determine the physical address as the identification information of the access point.
204. The electronic equipment determines the position information of each access point according to the identification information of each access point and a preset position information base to obtain at least three pieces of position information, wherein the preset position information base comprises the identification information of a plurality of access points and the position information corresponding to the identification information.
It should be noted that, in this embodiment, before the process 201, the electronic device may further download a preset location information base from the server, where the location information of each access point in the preset location information base is determined according to the location information corresponding to the plurality of electronic devices when the corresponding access point is searched, and the distances between the plurality of electronic devices and the corresponding access point when the corresponding access point is searched.
In an earlier stage, when the electronic device searches for at least one access point, the electronic device may obtain identification information of each of the at least one access point, a distance between each of the at least one access point and the electronic device, and location information of the electronic device. The electronic device may then transmit location information of the electronic device, identification information of each access point, and a distance of each access point from the electronic device to a server. When at least three electronic devices search for the same access point, each of the at least three electronic devices can acquire information such as a distance between the electronic device and the access point, identification information of the access point, and location information of the electronic device, and send the information to the server. The server may then determine location information for the access point based on the information. Then, the server may establish a preset location information base, associate the location information of the access point with the identification information of the access point, and store the association into the preset location information base. The identification information may be a MAC address, i.e., a physical address, of the access point.
As shown in fig. 3, after obtaining the location information of the electronic device D1, the location information of the electronic device D2, the location information of the electronic device D3, the distance D1 between the location of the electronic device D1 and the location of the access point a, the distance D2 between the location of the electronic device D2 and the location of the access point a, and the distance D3 between the location of the electronic device D3 and the location of the access point a, the server may determine the location of the electronic device D1, the location of the electronic device D2, and the location information of the electronic device D3 according to the location information of the electronic device D1, the location information of the electronic device D2, and the location information of the electronic device D3. Then, a circle is drawn by taking the position of each electronic device as a center of the circle and the distance between the position of each electronic device and the position of the access point as a radius, so that three circles can be determined. As can be seen from the figure, the intersection of the three circles is the position of the access point a. Therefore, the position of the access point a can be determined as long as the intersection of the three circles is determined.
In this embodiment of the application, after receiving information such as location information sent by a plurality of electronic devices, distances between the plurality of electronic devices and a plurality of access points, and identification information of the plurality of access points, the server may determine location information of the plurality of access points according to the information. Then, the server may associate the location information of each access point with the identification information of each access point, such as the MAC address of each access point, and store the associated information in the preset location information base. It can be known that, as time is accumulated, the position information of the access point stored in the preset position information base will be more and more.
It is understood that the greater the number of electronic devices that search for the same access point. The more electronic devices transmit information such as identification information of the same access point, a distance between the access point and the electronic device, and position information of the electronic device to the server. And determining the position information of the access point according to more position information of the electronic equipment and more distances between the access point and the electronic equipment enables the position information of the access point to be determined more accurately. Therefore, after the location information of an access point is determined, if the server receives the identification information of the access point, the distance between the access point and the new electronic device, and the location information of the new electronic device sent by the new electronic device to the server again, the server may determine the location information of the access point again.
In this embodiment of the application, after the electronic device is turned on for the first time, the electronic device may download the preset location information base from the server. Subsequently, the electronic device may delete the preset location information base at intervals of a preset time, and then download the preset location information base from the server, so that the preset location information base stored in the electronic device may be updated in real time. Or, after the server updates the preset location information base, the server may send an update message to the electronic device to prompt the electronic device that the preset location information base is updated. After receiving the update information, the electronic device may automatically delete the preset location information base in the electronic device, and re-download the updated preset location information base from the server.
In some embodiments, after receiving the update information, the electronic device may first determine whether the data size of the updated preset location information base is greater than a preset data size threshold. If the updated data volume of the preset location information base is greater than the preset data volume threshold, the electronic device may not delete the preset location information base in the electronic device. If the data volume of the updated preset position information base is less than or equal to the preset data volume threshold, the electronic device may automatically delete the preset position information base in the electronic device, and download the updated preset position information base from the server again. Wherein the preset data amount threshold may be determined by a user.
In other embodiments, after receiving the updated information, the electronic device may first detect the type of network to which the electronic device is currently connected. If the type of the currently connected network is a data network, such as a 3G network or a 4G network, the electronic device may obtain the traffic package from the operator to obtain the current remaining data volume of the traffic package. If the updated preset location information base has a data size greater than the remaining data size, the electronic device may not download the updated preset location information base. If the currently connected network type is a wireless network, such as WiFi or a hotspot, the electronic device may directly download the updated preset location information base, and update the preset location information base that already exists in the electronic device.
In some embodiments, the electronic device may obtain the updated preset location information base from the server. Then, the electronic device may compare the updated preset location information base with a preset location information base already existing in the electronic device. Then, the electronic device may obtain, from the updated preset location information base, the identification information of the access point and the location information corresponding to the identification information, which do not exist in the preset location information base existing in the electronic device, and store the identification information and the location information into the preset location information base existing in the electronic device, so as to update the preset location information base existing in the electronic device.
It is understood that the electronic device does not need to perform the process of downloading the preset location information base from the server each time before receiving the positioning request. Before receiving the positioning request, if the preset location information base does not exist in the electronic device, the electronic device downloads the preset location information base from the server. If the preset location information base exists in the electronic device, the electronic device may directly perform a process of searching for the access point according to the positioning request after performing the receiving of the positioning request, so as to determine the at least three searched access points.
For example, after determining the identification information of each access point, the electronic device may determine the location information of each access point according to the identification information of each access point and a preset location information base to obtain at least three location information, where the preset location information base includes the identification information of a plurality of access points and the location information corresponding to the identification information.
For example, assume that the electronic device determines the identification information for access point a1, the identification information for access point a2, and the identification information for access point A3. The electronic device may detect whether there is target identification information in the preset location information base that matches the identification information of the access point a 1. If target identification information matching the identification information of the access point a1 exists in the preset location information base, the electronic device may obtain location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point a 1. Next, the electronic device may detect whether there is target identification information matching the identification information of the access point a2 in the preset location information base. If target identification information matching the identification information of the access point a2 exists in the preset location information base, the electronic device may obtain location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point a 2. Finally, the electronic device may detect whether there is target identification information in the preset location information base that matches the identification information of access point a 3. If target identification information matching the identification information of the access point A3 exists in the preset location information base, the electronic device may obtain location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point A3.
In some embodiments, assume that the electronic device determines the identification information for access point a1, the identification information for access point a2, and the identification information for access point A3. The electronic device may employ a first thread to detect whether there is target identification information in the preset location information base that matches the identification information of the access point a 1. If the target identification information matching with the identification information of the access point a1 exists in the preset location information base, the electronic device may acquire, by using a first thread, location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point a 1. Meanwhile, the electronic device may detect whether target identification information matching the identification information of the access point a2 exists in the preset location information base using a second thread. If the target identification information matching with the identification information of the access point a2 exists in the preset location information base, the electronic device may use a second thread to obtain location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point a 2. Meanwhile, the electronic device may detect whether target identification information matching the identification information of the access point a3 exists in the preset location information base by using the third thread. If the target identification information matching with the identification information of the access point A3 exists in the preset location information base, the electronic device may acquire, by using a third thread, location information associated with the target identification information from the preset location information base, and determine the location information as the location information of the access point A3. It can be known that the time for determining the location information can be saved by simultaneously determining the location information of the access point a1, the access point a2, and the access point A3 by using the first thread, the second thread, and the third thread.
205. The electronic device determines a signal strength of each access point.
206. The electronic equipment determines the distance between each access point and the electronic equipment according to the signal intensity of each access point and the preset corresponding relation between the signal intensity and the distance so as to obtain at least three distances.
For example, the electronic device may predetermine a preset correspondence between signal strength and distance. In order to ensure that the distance is more accurate. The preset corresponding relationship between the signal strength and the distance can be established according to the type of the access point, that is, different types of access points correspond to different preset corresponding relationships between the signal strength and the distance. For example, for an access point of type n1, a preset first correspondence of signal strength to distance may be established and associated with type n 1; for the access point of the type n2, a preset second corresponding relation between the signal strength and the distance can be established, and the preset second corresponding relation is associated with the type n 2; for an access point of type n3, a preset third correspondence of signal strength to distance may be established and associated with type n 3.
In some embodiments, different types of access points may also be combined to establish a preset correspondence relationship between the same signal strength and the same distance. For example, no matter which types of access points exist, the preset correspondence between the signal strength and the distance corresponding to the types of access points is the same.
In this embodiment, after determining the searched at least three access points, the electronic device may determine the signal strength of each access point. Then, the electronic device may determine the distance between each access point and the electronic device according to the signal strength of each access point and the preset corresponding relationship between the signal strength and the distance, so as to obtain at least three distances.
For example, assume that an access point of type n1 corresponds to a predetermined correspondence of signal strength to distance r1, an access point of type n2 corresponds to a predetermined correspondence of signal strength to distance r2, and an access point of type n3 corresponds to a predetermined correspondence of signal strength to distance r 3. After determining the at least three access points, the electronic device can determine a type of each access point, and a signal strength of each access point. For example, the at least three access points determined by the electronic device are an access point of type n1, an access point of type n2, and an access point of type n 3. Then, for an access point of type n1, the electronic device may determine the distance d1 between the access point of type n1 and the electronic device according to the signal strength of the access point of type n1 and the preset correspondence r1 between signal strength and distance. For an access point of type n2, the electronic device may determine the distance d2 between the access point of type n2 and the electronic device according to the signal strength of the access point of type n2 and the preset correspondence r2 between signal strength and distance. For an access point of type n3, the electronic device may determine the distance d3 between the access point of type n3 and the electronic device according to the signal strength of the access point of type n3 and the preset correspondence r3 between signal strength and distance.
It should be noted that the processes 203 and 205 can be executed simultaneously. Or the processes 203 and 204 may be executed first, and then the processes 205 and 206 may be executed; or flows 205 and 206 are performed first and then flows 203 and 204 are performed. And is not particularly limited herein.
207. The electronic equipment determines the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
For example, after determining the location information of the at least three access points, the electronic device may determine the location of the electronic device according to the location information of the at least three access points and the distances between the at least three access points and the electronic device.
The location information of the at least three access points may include locations, such as location coordinates, of the at least three access points.
As shown in fig. 4, after determining the location information of access point a1, the location information of access point a2, the location information of access point A3, the distance D4 between the location of access point a1 and the location of electronic device D, the distance D5 between the location of access point a2 and the location of electronic device D, and the distance D6 between the location of access point A3 and the location of electronic device D, the electronic device may determine the location of access point a1, the location of access point a2, and the location of access point A3 from the location information of access point a1, the location information of access point a2, and the location information of access point A3. Then, the electronic device may draw a circle with the position of each access point as a center and the distance between the position of each access point and the position of the electronic device as a radius, thereby determining three circles. As can be seen from the figure, the intersection of the three circles is the position of the electronic device D. Therefore, the position of the electronic device D can be determined as long as the intersection of the three circles is determined.
In some embodiments, before the flow 201, the following may be further included:
the electronic equipment detects whether the GPS signal intensity of the electronic equipment is less than or equal to a preset intensity threshold value;
if the GPS signal intensity of the electronic equipment is smaller than or equal to the preset intensity threshold value, the electronic equipment generates a positioning request.
For example, when the electronic device receives a positioning operation triggered by a user, the electronic device may detect whether a GPS signal strength of the electronic device is less than or equal to a preset strength threshold. If the GPS signal strength of the electronic device is less than or equal to the preset strength threshold, the electronic device may generate a positioning request and enter the process 201 of the embodiment of the present application. If the GPS signal intensity of the electronic device is greater than the preset intensity threshold, the electronic device may use the GPS for positioning. Wherein the preset intensity threshold may be determined by the electronic device. The predetermined intensity threshold may be an intensity value that enables the GPS to perform accurate positioning. That is to say, the electronic device can select to execute the positioning method of the embodiment of the present application, i.e. perform multipoint positioning or perform GPS positioning, according to the strength of the GPS signal strength. For example, when the GPS signal strength is strong (greater than a preset strength threshold), the electronic device may use GPS for positioning. When the GPS signal strength is weak (less than or equal to the preset strength threshold), the electronic device may generate a positioning request and proceed to the process 201 in the embodiment of the present application.
In some embodiments, if the GPS signal strength of the electronic device is greater than a preset strength threshold, the electronic device obtains a remaining power value of the electronic device;
the electronic equipment detects whether the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value or not;
and if the residual electric quantity value is smaller than or equal to the preset electric quantity threshold value, the electronic equipment generates a positioning request.
The adoption of GPS for positioning requires a large amount of battery power to be consumed. Therefore, when the GPS signal strength of the electronic device is greater than the preset strength threshold, the electronic device may further obtain a remaining electric quantity value of the electronic device. If the remaining power value is less than or equal to the preset power threshold, that is, the remaining power is less, the electronic device may generate a positioning request to enter the process 201 of the embodiment of the present application. The preset electric quantity threshold value can be determined by the electronic device or a user. For example, the preset charge threshold may be a percentage value, such as 50%, 45%, etc.
Wherein, electronic equipment can be wearable equipment, like intelligent wrist-watch, intelligent bracelet, conversation wrist-watch or motion wrist-watch etc..
In some embodiments, because of limited watch antenna environments such as smart watches, smart bracelets, conversation watches, sports watches and the like, the GPS antenna efficiency generally cannot be increased, and therefore, for the smart watches, the smart bracelets, the conversation watches, the sports watches and the like, whether the GPS signal intensity is greater than a preset intensity threshold value or not, the positioning method of the embodiments of the present application can be directly adopted for positioning; or, except for a scene in which the GPS signal strength is relatively high (greater than a preset strength threshold), the positioning method of the embodiment of the present application may be used for positioning.
Because the precision that the smart mobile phone carries out GPS location is greatly higher than the precision that wearable equipment such as smart watch carries out GPS location. Therefore, in the establishment of the preset location information base, if the electronic device needs to perform GPS positioning to acquire the location information of the electronic device and upload the location information to the server, the server may only receive the location information uploaded by the smartphone to improve the accuracy of the location information.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a positioning device according to an embodiment of the present disclosure. The positioning device can be applied to electronic equipment. The positioning device includes: a receiving module 301, a searching module 302, a first determining module 303, a second determining module 304 and a third determining module 305.
A receiving module 301, configured to receive a positioning request.
A searching module 302, configured to search for an access point according to the location request to determine at least three searched access points.
A first determining module 303, configured to determine location information of each access point to obtain at least three pieces of location information.
A second determining module 304, configured to determine a distance between each access point and the electronic device to obtain at least three distances.
A third determining module 305, configured to determine the location of the electronic device according to the at least three location information and the at least three distances.
In some embodiments, the first determining module 303 may be configured to: determining identification information of each access point; and determining the position information of each access point according to the identification information of each access point and a preset position information base to obtain at least three pieces of position information, wherein the preset position information base comprises the identification information of a plurality of access points and the position information corresponding to the identification information.
In some embodiments, the receiving module 301 may be configured to: downloading a preset position information base from a server, wherein the position information of each access point in the preset position information base is determined according to the position information respectively corresponding to the plurality of electronic devices when the corresponding access points are searched, and the distances between the plurality of electronic devices and the corresponding access points when the corresponding access points are searched.
In some embodiments, the second determining module 304 may be configured to: determining a signal strength of each access point; and determining the distance between each access point and the electronic equipment according to the signal intensity of each access point and the preset corresponding relation between the signal intensity and the distance so as to obtain at least three distances.
In some embodiments, the receiving module 301 may be configured to: detecting whether the GPS signal intensity of the electronic equipment is smaller than or equal to a preset intensity threshold value; and if the GPS signal intensity of the electronic equipment is less than or equal to a preset intensity threshold value, generating a positioning request.
In some embodiments, the receiving module 301 may be configured to: if the GPS signal intensity of the electronic equipment is greater than a preset intensity threshold value, acquiring a residual electric quantity value of the electronic equipment; detecting whether the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value; and if the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value, generating a positioning request.
In some embodiments, the electronic device is a wearable device.
The present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the flow in the positioning method provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the procedure in the positioning method provided in this embodiment by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 400 may include components such as a memory 401, a processor 402, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 401 may be used to store applications and data. The memory 401 stores applications containing executable code. The application programs may constitute various functional modules. The processor 402 executes various functional applications and data processing by running an application program stored in the memory 401.
The processor 402 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 401 and calling data stored in the memory 401, thereby integrally monitoring the electronic device.
In this embodiment, the processor 402 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 runs the application programs stored in the memory 401, so as to implement the following processes:
receiving a positioning request;
searching access points according to the positioning request to determine at least three searched access points;
determining the position information of each access point to obtain at least three pieces of position information;
determining the distance between each access point and the electronic device 400 to obtain at least three distances;
determining the position of the electronic device 400 according to the at least three position information and the at least three distances.
Referring to fig. 7, the electronic device 400 may include a memory 401, a processor 402, an input unit 403, an output unit 404, a WiFi module 405, a display 406, and the like.
The memory 401 may be used to store applications and data. The memory 401 stores applications containing executable code. The application programs may constitute various functional modules. The processor 402 executes various functional applications and data processing by running an application program stored in the memory 401.
The processor 402 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 401 and calling data stored in the memory 401, thereby integrally monitoring the electronic device.
The input unit 403 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control.
The output unit 404 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The WiFi module 405 is used to convert the serial port or TTL level to an embedded module that meets the Wi-Fi wireless network communication standard.
The display 406 may be used to display text, pictures, etc.
In this embodiment, the processor 402 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 runs the application programs stored in the memory 401, so as to implement the following processes:
receiving a positioning request;
searching access points according to the positioning request to determine at least three searched access points;
determining the position information of each access point to obtain at least three pieces of position information;
determining the distance between each access point and the electronic device 400 to obtain at least three distances;
determining the position of the electronic device 400 according to the at least three position information and the at least three distances.
In some embodiments, the processor 402, when performing the determining the location information of each access point to obtain at least three location information, may perform: determining identification information of each access point; and determining the position information of each access point according to the identification information of each access point and a preset position information base to obtain at least three pieces of position information, wherein the preset position information base comprises the identification information of a plurality of access points and the position information corresponding to the identification information.
In some embodiments, before the processor 402 performs the receiving of the positioning request, it may further perform: downloading a preset position information base from a server, wherein the position information of each access point in the preset position information base is determined according to the position information respectively corresponding to the plurality of electronic devices when the corresponding access points are searched, and the distances between the plurality of electronic devices and the corresponding access points when the corresponding access points are searched.
In some embodiments, the processor 402 may perform the determining the distance between each access point and the electronic device 400 to obtain at least three distances, and may perform: determining a signal strength of each access point; determining the distance between each access point and the electronic device 400 according to the signal strength of each access point and the preset corresponding relationship between the signal strength and the distance to obtain at least three distances.
In some embodiments, before the processor 402 performs the receiving of the positioning request, it may further perform: detecting whether the GPS signal intensity of the electronic device 400 is less than or equal to a preset intensity threshold; if the GPS signal strength of the electronic device 400 is less than or equal to a preset strength threshold, a positioning request is generated.
In some embodiments, after the processor 402 performs the detecting whether the GPS signal strength of the electronic device 400 is less than or equal to the preset strength threshold, the method may further perform: if the GPS signal intensity of the electronic device 400 is greater than a preset intensity threshold, acquiring a remaining power value of the electronic device 400; detecting whether the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value; and if the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value, generating a positioning request.
In some embodiments, the electronic device 400 is a wearable device.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the positioning method, and are not described herein again.
The positioning device provided in the embodiment of the present application and the positioning method in the embodiments above belong to the same concept, and any method provided in the embodiments of the positioning method may be run on the positioning device, and the specific implementation process thereof is described in the embodiments of the positioning method in detail, and is not described herein again.
It should be noted that, for the positioning method described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process for implementing the positioning method described in the embodiment of the present application can be implemented by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the positioning method can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the positioning device of the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The positioning method, the positioning device, the storage medium, and the electronic device provided in the embodiments of the present application are described in detail above, and a specific example is applied in the description to explain the principles and the embodiments of the present application, and the description of the embodiments above is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, 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 application.

Claims (10)

1. A positioning method applied to electronic equipment is characterized by comprising the following steps:
receiving a positioning request;
searching access points according to the positioning request to determine at least three searched access points;
determining the position information of each access point to obtain at least three pieces of position information;
determining the distance between each access point and the electronic equipment to obtain at least three distances;
and determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
2. The method of claim 1, wherein determining the location information of each access point to obtain at least three location information comprises:
determining identification information of each access point;
and determining the position information of each access point according to the identification information of each access point and a preset position information base to obtain at least three pieces of position information, wherein the preset position information base comprises the identification information of a plurality of access points and the position information corresponding to the identification information.
3. The method according to claim 2, wherein before said receiving a positioning request, further comprising:
downloading a preset position information base from a server, wherein the position information of each access point in the preset position information base is determined according to the position information respectively corresponding to the plurality of electronic devices when the corresponding access points are searched, and the distances between the plurality of electronic devices and the corresponding access points when the corresponding access points are searched.
4. The method of claim 1, wherein determining the distance between each access point and the electronic device to obtain at least three distances comprises:
determining a signal strength of each access point;
and determining the distance between each access point and the electronic equipment according to the signal intensity of each access point and the preset corresponding relation between the signal intensity and the distance so as to obtain at least three distances.
5. The method according to claim 1, further comprising, before said receiving a location request:
detecting whether the GPS signal intensity of the electronic equipment is smaller than or equal to a preset intensity threshold value;
and if the GPS signal intensity of the electronic equipment is less than or equal to a preset intensity threshold value, generating a positioning request.
6. The method according to claim 5, further comprising, after the detecting whether the GPS signal strength of the electronic device is less than or equal to a preset strength threshold:
if the GPS signal intensity of the electronic equipment is greater than a preset intensity threshold value, acquiring a residual electric quantity value of the electronic equipment;
detecting whether the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value;
and if the residual electric quantity value is smaller than or equal to a preset electric quantity threshold value, generating a positioning request.
7. The positioning method according to claim 1, wherein the electronic device is a wearable device.
8. A positioning device applied to electronic equipment is characterized by comprising:
a receiving module, configured to receive a positioning request;
the searching module is used for searching the access points according to the positioning request so as to determine at least three searched access points;
a first determining module, configured to determine location information of each access point to obtain at least three pieces of location information;
the second determining module is used for determining the distance between each access point and the electronic equipment so as to obtain at least three distances;
and the third determining module is used for determining the position of the electronic equipment according to the at least three pieces of position information and the at least three distances.
9. A storage medium, in which a computer program is stored, which, when run on a computer, causes the computer to perform the positioning method according to any one of claims 1 to 7.
10. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for executing the positioning method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
CN201910828566.6A 2019-09-03 2019-09-03 Positioning method, positioning device, storage medium and electronic equipment Active CN112468952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910828566.6A CN112468952B (en) 2019-09-03 2019-09-03 Positioning method, positioning device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910828566.6A CN112468952B (en) 2019-09-03 2019-09-03 Positioning method, positioning device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112468952A true CN112468952A (en) 2021-03-09
CN112468952B CN112468952B (en) 2023-06-02

Family

ID=74807721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910828566.6A Active CN112468952B (en) 2019-09-03 2019-09-03 Positioning method, positioning device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112468952B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105891866A (en) * 2016-03-31 2016-08-24 北京金山安全软件有限公司 Positioning method and device and electronic equipment
CN107708068A (en) * 2017-09-29 2018-02-16 深圳奇迹智慧网络有限公司 Indoor orientation method, system, computer-readable storage medium and server
CN108040318A (en) * 2017-10-30 2018-05-15 捷开通讯(深圳)有限公司 A kind of localization method, electronic equipment and computer-readable recording medium
CN108521628A (en) * 2018-03-29 2018-09-11 维沃移动通信有限公司 A kind of localization method, device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105891866A (en) * 2016-03-31 2016-08-24 北京金山安全软件有限公司 Positioning method and device and electronic equipment
CN107708068A (en) * 2017-09-29 2018-02-16 深圳奇迹智慧网络有限公司 Indoor orientation method, system, computer-readable storage medium and server
CN108040318A (en) * 2017-10-30 2018-05-15 捷开通讯(深圳)有限公司 A kind of localization method, electronic equipment and computer-readable recording medium
CN108521628A (en) * 2018-03-29 2018-09-11 维沃移动通信有限公司 A kind of localization method, device and mobile terminal

Also Published As

Publication number Publication date
CN112468952B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN105580394A (en) Method and apparatus for pushing and displaying message
US10088599B2 (en) Systems and methods for weather forecasting
US20180358016A1 (en) Mobile terminal, method of controlling same, and computer-readable storage medium
CN110333836B (en) Information screen projection method and device, storage medium and electronic device
JP6955092B2 (en) Methods for reducing terminal power consumption, and terminals
CN110168487B (en) Touch control method and device
CN111316673B (en) Electronic fence updating method and communication device
CN105094861A (en) Webpage application program loading method, device and system
US11012970B2 (en) Method for processing radio frequency interference and electronic device
CN112148579B (en) User interface testing method and device
CN116029719B (en) Payment service recommendation method, electronic device and storage medium
US11388652B2 (en) Method and apparatus for indicating position of cell-defining synchronization signal block and searching for the same, and base station
CN108924908B (en) WiFi scanning method and device and electronic device
RU2740072C1 (en) Method, device and system for measuring minimization of field testing
CN112579264A (en) Application program jumping method, terminal and computer storage medium
CN112749074B (en) Test case recommending method and device
US11082806B2 (en) Method of identifying user location, storage medium and electronic device
CN112487312A (en) Method and device for associating interest points and method and device for determining states of interest points
US20140155099A1 (en) Method and apparatus for displaying location information of call service area in mobile terminal
CN112783731B (en) Abnormal device detection method, device and storage medium
CN107930126B (en) Game reservation data processing method and device and mobile terminal
CN112468952B (en) Positioning method, positioning device, storage medium and electronic equipment
CN107689909B (en) User display method and device
CN110321099B (en) Sound card control method, device, terminal and storage medium
CN113115287B (en) Data transmission method and device

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