CN112468952B - 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
CN112468952B
CN112468952B CN201910828566.6A CN201910828566A CN112468952B CN 112468952 B CN112468952 B CN 112468952B CN 201910828566 A CN201910828566 A CN 201910828566A CN 112468952 B CN112468952 B CN 112468952B
Authority
CN
China
Prior art keywords
access point
position information
electronic device
preset
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910828566.6A
Other languages
Chinese (zh)
Other versions
CN112468952A (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

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 of weaker GPS signals, the positioning accuracy can be improved.

Description

Positioning method, positioning device, storage medium and electronic equipment
Technical Field
The application belongs to the technical field of electronics, and particularly relates to a positioning method, a positioning device, a storage medium and electronic equipment.
Background
Along with the continuous development of the positioning technology, the application of the positioning technology is more and more extensive, not only trackers and positioners are more and more common, but also electronic devices such as smart phones or smart watches gradually add a positioning function so as to realize the real-time positioning of the position of a user or record the movement track.
In the related art, for electronic devices such as smartphones and smartwatches, positioning is generally achieved by using GPS. However, in a scene where the GPS signal is weak, such as a scene where buildings are relatively 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, which is applied to electronic equipment and comprises:
the receiving module is used for receiving the 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;
The first determining module is used for determining the position information of each access point to obtain at least three pieces of position information;
a second determining module, configured to determine a distance between each access point and the electronic device, 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 present embodiments provide a storage medium having a computer program stored thereon, which when executed on a computer causes the computer to execute the flow in the positioning method provided in the embodiments of the present application.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the processor is used for executing the flow in the positioning method provided by the embodiment of the application by calling the computer program stored in the memory.
In the embodiment of the application, the specific position of the electronic equipment can be determined by determining the positions of at least three access points and the distances between at least three access points and the electronic equipment, and in a scene with weak GPS signals, the positioning accuracy can be improved relative to GPS positioning with weak use signals.
Drawings
The technical solution of the present application and the advantageous effects thereof will be made apparent from the following detailed description of the specific embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart 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 diagram 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 diagram of a first structure of an electronic device according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numerals refer to like elements throughout, the principles of the present application are illustrated as embodied in a suitable computing environment. The following description is based on the illustrated embodiments of the present application and should not be taken as limiting other embodiments not described in detail herein.
It is understood that the execution subject of the embodiments of the present application may be an electronic device such as a smart phone, a tablet computer, a smart watch, a call watch, a sports watch, or a smart bracelet.
Referring to fig. 1, fig. 1 is a schematic flow chart of a positioning method according to an embodiment of the present application, where the positioning method may be applied to an electronic device, and the flow chart may include:
101. a positioning request is received.
For example, a user may click or press a "locate" key in an electronic device. The electronic device pops up a selection box to prompt the user to select to perform multi-point positioning or GPS positioning, etc. If the user selects to perform multi-point 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 a positioning request.
Or, the user may draw a preset gesture on the screen of the electronic device, and when the electronic device receives the preset gesture, the user receives the positioning request. 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 predetermined voice, such as "please perform multi-point positioning", near the electronic device, and when the electronic device receives the predetermined voice, a 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, when a location request is received, the electronic device may search for access points based on the location request to determine at least three access points searched.
The access point may be a router for accessing a wireless device, such as an electronic device, into a wired network. The electronic device may search for an access point when the electronic device is in the coverage of the signal of 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 the 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 location is unavailable. The prompt information may be text information or voice information.
103. Position information of each access point is determined to obtain at least three pieces of position information.
For example, after determining at least three access points, the electronic device may determine location information for each access point to obtain at least three location information.
For example, an access point location information repository may be obtained in advance from a location service provider and stored in an electronic device. The access point location information base includes identification information of a plurality of access points and corresponding location 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 sequentially detecting whether the identification information matched with the identification information of each access point exists in the access point position information base. When detecting that the identification information matched with the identification information of each access point exists in the access point position information base, the electronic equipment can acquire the position information corresponding to the identification information and determine the position information as the position 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 A1. Then, the electronic device may detect whether there is target identification information matching the identification information of A1 in the access point location information base. If so, determining the position information corresponding to the target identification information as the position information of the access point A1. The electronic device may then obtain the identification information of A2. Then, the electronic device may detect whether there is target identification information matching the identification information of A2 in the access point location information base. If so, determining the position information corresponding to the target identification information as the position information of the access point A2. Subsequently, the electronic device may acquire the identification information of A3. Then, the electronic device may detect whether there is target identification information matching the identification information of A3 in the access point location information base. If so, determining the position information corresponding to the target identification information as the position information of the access point A3. Finally, the electronic device may obtain the identification information of A4. The electronic device may then detect whether there is target identification information in the access point location information repository that matches the identification information of A4. If so, the location information corresponding to the target identification information is determined as the location information of the access point A4.
For another example, assume that the electronic device determines four access points. Access points A1, A2, A3 and A4, respectively. The electronic device may employ the first thread to obtain the identification information of A1. The electronic device may then employ the first thread to detect whether there is target identification information in the access point location information repository that matches the identification information of A1. If so, determining the position information corresponding to the target identification information as the position information of the access point A1. 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 repository that matches the identification information of A2. If so, determining the position information corresponding to the target identification information as the position information of the access point A2. Meanwhile, the electronic device can acquire the identification information of the A3 through 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 repository that matches the identification information of A3. If so, determining the position information corresponding to the target identification information as the position information of the access point A3. Meanwhile, the electronic device may acquire the identification information of A4 using the fourth thread. Then, the electronic device may detect whether there is target identification information matching the identification information of A4 in the access point location information base using the fourth thread. If so, the location information corresponding to the target identification information is determined as the location information of the access point A4. The multi-thread is adopted to simultaneously determine the position information of a plurality of access points, so that the processing time of the electronic equipment can be greatly saved.
104. The distance of each access point from the electronic device is determined to obtain at least three distances.
For example, after determining at least three access points, the electronic device may determine a distance from each access point to the electronic device to obtain at least three distances.
For example, the electronic device can 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 correspondence between the signal strength and the distance, so as to obtain at least three distances.
It should be noted that, the flow 103 and the flow 104 may be executed simultaneously. The process 103 may be executed first, and then the process 104 may be executed; or flow 104 may be performed before flow 103, without limitation.
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 in the following manner: location information of at least three access points may be acquired. Wherein the location information of the at least three access points may include locations of the at least three access points. Then, a circle can be drawn by taking the position of each access point as the center of a circle and the distance between each access point and the electronic equipment as the radius, so that three circles are determined, and the intersection point of the three circles is the position of the electronic equipment.
In the embodiment of the application, the specific position of the electronic equipment can be determined by determining the positions of at least three access points and the distances between at least three access points and the electronic equipment, and in a scene with weak GPS signals, the positioning accuracy can be improved relative to GPS positioning with weak use signals.
Referring to fig. 2, fig. 2 is a schematic diagram of a second flow chart of a positioning method according to an embodiment of the present application, where the positioning method may be applied to an electronic device, and the flow chart may include:
201. the electronic device receives a location request.
For example, a user may click or press a "locate" key in an electronic device. The electronic device pops up a selection box to prompt the user to select to perform multi-point positioning or GPS positioning, etc. If the user selects to perform multi-point 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 a positioning request.
Or, the user may draw a preset gesture on the screen of the electronic device, and when the electronic device receives the preset gesture, the user receives the positioning request. 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 predetermined voice, such as "please perform multi-point positioning", near the electronic device, and when the electronic device receives the predetermined voice, a positioning request is received.
202. And the electronic equipment searches 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 access points searched.
The access point may be a router for accessing a wireless device, such as an electronic device, into a wired network. The electronic device may search for an access point when the electronic device is in the coverage of the signal of 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 the 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 location is unavailable. The prompt information may be text information or voice information.
203. The electronic device determines identification information for each access point.
For example, when determining at least three access points searched, the electronic device may determine identification information of each access point. Wherein the identification information may uniquely identify 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 outwards. When an access point is searched, the electronic device may acquire a physical address broadcasted by the access point, and determine the physical address as 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 so as 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 access points.
It should be noted that, in this embodiment of the present application, before the process 201, the electronic device may further download a preset location information base from the server, where location information of each access point in the preset location information base is determined according to location information corresponding to each of the plurality of electronic devices when the plurality of electronic devices searches for the corresponding access point, and distances between each of the plurality of electronic devices and the corresponding access point when the plurality of electronic devices searches for the corresponding access point.
In the early stage, when the electronic device searches at least one access point, the electronic device acquires identification information of each access point in the at least one access point, the distance between each access point in the at least one access point and the electronic device, and the position information of the electronic device. The electronic device may then send the location information of the electronic device, the identification information of each access point, and the 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 electronic device in the at least three electronic devices can acquire information such as distance from the access point, identification information of the access point, position information of the access point and the like, and send the information to a server. The server may then determine location information for the access point based on the information. Then, the server can establish a preset position information base, correlate the position information of the access point with the identification information of the access point, and store the position information in the preset position 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 position information of the electronic device D1, the position information of the electronic device D2, the position information of the electronic device D3, the distance D1 between the position of the electronic device D1 and the position of the access point a, the distance D2 between the position of the electronic device D2 and the position of the access point a, and the distance D3 between the position of the electronic device D3 and the position of the access point a, the server may determine the position of the electronic device D1, the position of the electronic device D2, and the position of the electronic device D3 according to the position information of the electronic device D1, the position information of the electronic device D2, and the position information of the electronic device D3. Then, the positions of the electronic devices are used as circle centers, the distances between the positions of the electronic devices and the positions of the access points are used as radius circles, and three circles can be determined. As can be seen from the figure, the intersection point of the three circles is the position of the access point a. Thus, the location of access point a can be determined as long as the intersection of the three circles is determined.
In this embodiment of the present application, after receiving information such as location information sent by a plurality of electronic devices, distances between a plurality of electronic devices and a plurality of access points, and identification information of a plurality of access points, the server may determine location information of a plurality of access points according to the information. The server may then 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 association information in a preset location information repository. It is known that, as time passes, the location information of the access point stored in the preset location information base will be more and more.
It will be appreciated that the greater the number of electronic devices when searching for the same access point. The more electronic devices that send the identification information of the same access point, the distance between the access point and the electronic device, the position information of the electronic device, and the like to the server. Determining the location information of the access point based on more location information of the electronic device and more distances between the access point and the electronic device will enable the location information of the access point to be determined more accurately. Therefore, after the location information of a certain access point is determined, if the server receives the identification information of the access point sent by the new electronic device, the distance between the access point and the new electronic device, and the location information of the new electronic device, and then the server can re-determine the location information of the access point.
In this embodiment of the present application, after the electronic device is turned on for the first time, the electronic device may download the preset location information library from the server. Then, the electronic device may delete the preset location information base every a preset period of 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 position information base, the server can send update information to the electronic device so as to prompt the electronic device that the preset position information base is updated. After receiving the update information, the electronic device may automatically delete the preset location information library in the electronic device, and re-download the updated preset location information library from the server.
In some embodiments, after receiving the update information, the electronic device may first determine whether the data amount of the updated preset location information base is greater than a preset data amount threshold. If the data amount of the updated preset position information base is greater than the preset data amount threshold, the electronic device may not delete the preset position information base in the electronic device. If the data amount of the updated preset position information base is smaller than or equal to the preset data amount threshold, the electronic device can automatically delete the preset position information base in the electronic device and re-download the updated preset position information base from the server. Wherein the preset data amount threshold may be determined by a user.
In other embodiments, the electronic device may first detect the type of network to which the electronic device is currently connected after receiving the update information. If the type of the network currently connected is a data network, such as a 3G network or a 4G network, the electronic device may obtain a traffic package from an operator to obtain the current remaining data volume of the traffic package. If the data volume of the updated preset position information base is larger than the residual data volume, the electronic equipment can not download the updated preset position information base. If the type of the network currently connected 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 existing in the electronic device.
In some embodiments, the electronic device may obtain the updated preset location information library from the server. Then, the electronic device may compare the updated preset location information library with the preset location information library already existing in the electronic device. Then, the electronic device may acquire, from the updated preset location information base, identification information of an access point that does not exist in the preset location information base existing in the electronic device and location information corresponding to the access point, and store the identification information in 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 will be appreciated that the electronic device need not perform the process of downloading the pre-set location information library from the server each time before receiving the location request. But before executing the receiving of the positioning request, if the electronic device does not have the preset position information base, the electronic device downloads the preset position information base from the server. If the electronic device has the preset position information base, the electronic device can directly execute the process of searching the access points according to the positioning request after executing the receiving of the positioning request so as to determine 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, so as 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 of access point A1, the identification information of access point A2, and the identification information of access point A3. The electronic device may detect whether target identification information matching the identification information of the access point A1 exists in the preset location information base. If there is target identification information matched with the identification information of the access point A1 in the preset location information base, the electronic device may acquire 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 A1. Then, 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 there is target identification information matched with the identification information of the access point A2 in the preset location information base, the electronic device may acquire 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 A2. Finally, 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 A3. If the preset location information base has the target identification information matched with the identification information of the access point A3, the electronic device may acquire the 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, it is assumed that the electronic device determines the identification information of access point A1, the identification information of access point A2, and the identification information of access point A3. The electronic device may detect, using the first thread, whether there is target identification information in the preset location information base that matches the identification information of the access point A1. If the preset location information base has the target identification information matched with the identification information of the access point A1, the electronic device may acquire the location information associated with the target identification information from the preset location information base by using the first thread, and determine the location information as the location information of the access point A1. Meanwhile, the electronic device may detect whether target identification information matched with the identification information of the access point A2 exists in the preset location information base by using the second thread. If the preset position information base has the target identification information matched with the identification information of the access point A2, the electronic equipment can acquire the position information associated with the target identification information from the preset position information base by adopting the second thread, and the position information is determined to be the position information of the access point A2. Meanwhile, the electronic device can detect whether target identification information matched with the identification information of the access point A3 exists in the preset position information base by adopting the third thread. If the preset location information base has the target identification information matched with the identification information of the access point A3, the electronic device may acquire the location information associated with the target identification information from the preset location information base by using a third thread, and determine the location information as the location information of the access point A3. It can be seen that the location information of the access point A1, the access point A2 and the access point A3 is determined simultaneously by using the first thread, the second thread and the third thread, so that the time for determining the location information can be saved.
205. The electronics determine the 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 pre-determine a preset correspondence between signal strength and distance. In order to ensure a more accurate distance. The preset corresponding relation between the signal intensity and the distance can be established according to the type of the access point, namely, different types of access points correspond to different preset corresponding relations between the signal intensity and the distance. For example, for an access point of type n1, a preset first correspondence of signal strength and 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 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 combine to establish a preset correspondence between the same signal strength and distance. For example, no matter which types of access points exist, the preset correspondence between the signal intensities and the distances corresponding to the types of access points are the same.
In the embodiment of the application, 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 intensity of each access point and the preset correspondence between the signal intensity and the distance, so as to obtain at least three distances.
For example, assume that the preset correspondence r1 between the signal intensity and the distance of the n1 type access point, the preset correspondence r2 between the signal intensity and the distance of the n2 type access point, and the preset correspondence r3 between the signal intensity and the distance of the n3 type access point. After determining the at least three access points, the electronic device can determine the type of each access point, as well as the signal strength of each access point. For example, the at least three access points determined by the electronic device are an n1 type access point, an n2 type access point, and an n3 type access point, respectively. Then, for the n1 type access point, the electronic device may determine a distance d1 between the n1 type access point and the electronic device according to the signal strength of the n1 type access point and a preset correspondence r1 between the signal strength and the distance. For an n2 type access point, the electronic device may determine a distance d2 between the n2 type access point and the electronic device according to a signal strength of the n2 type access point and a preset correspondence r2 between the signal strength and the distance. For an n3 type access point, the electronic device may determine a distance d3 between the n3 type access point and the electronic device according to a signal strength of the n3 type access point and a preset correspondence r3 between the signal strength and the distance.
It should be noted that, the processes 203 and 205 may be performed simultaneously. Flows 203 and 204 may be performed first, followed by flows 205 and 206; or flows 205 and 206 are performed before flows 203 and 204 are performed. There is no particular limitation herein.
207. The electronic device determines the position of the electronic device according to the at least three pieces of position information and the at least three distances.
For example, after determining the location information of at least three access points, the electronic device may determine the location of the electronic device according to the location information of at least three access points and the distances between at least three access points and the electronic device.
Wherein the location information of the at least three access points may comprise locations, such as location coordinates, of the at least three access points.
As shown in fig. 4, after determining the location information of the access point A1, the location information of the access point A2, the location information of the access point A3, the distance D4 between the location of the access point A1 and the location of the electronic device D, the distance D5 between the location of the access point A2 and the location of the electronic device D, and the distance D6 between the location of the access point A3 and the location of the electronic device D, the electronic device may determine the location of the access point A1, the location of the access point A2, and the location of the access point A3 according to the location information of the access point A1, the location information of the access point A2, and the location information of the access point A3. Then, the electronic device may draw circles with the positions of the access points as circle centers and the distances between the positions of the access points and the positions of the electronic device as radii, thereby determining three circles. As can be seen from the figure, the intersection point of the three circles is the position of the electronic device D. Therefore, the position of the electronic device D can be determined by determining the intersection of the three circles.
In some embodiments, prior to flow 201, it may further include:
the electronic equipment detects whether the GPS signal intensity of the electronic equipment is smaller 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 the 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 equipment is larger than the preset intensity threshold, the electronic equipment can adopt GPS for positioning. Wherein the preset intensity threshold may be determined by the electronic device. The preset intensity threshold may be an intensity value that enables accurate positioning of the GPS. That is, the electronic device may select to execute the positioning method according to the strength of the GPS signal, i.e. to perform multi-point positioning or GPS positioning. For example, when the GPS signal strength is strong (greater than a preset strength threshold), the electronic device may employ 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 enter the process 201 of 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 residual electrical quantity 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;
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 GPS is adopted to perform positioning, so that more battery power is consumed. Therefore, when the GPS signal strength of the electronic device is greater than the preset strength threshold, the electronic device can also acquire the residual electric quantity value of the electronic device. If the remaining power value is less than or equal to the preset power threshold, i.e. the remaining power is small, the electronic device may generate a positioning request to enter the process 201 in the embodiment of the present application. The preset power threshold may be determined by the electronic device or may be determined by a user. For example, the preset charge threshold may be a percentage value, such as 50%,45%, and so on.
The electronic device may be a wearable device, such as a smart watch, a smart bracelet, a talking watch, or a sports watch.
In some embodiments, because the efficiency of the GPS antenna cannot be generally high due to limited watch antenna environments such as a smart watch, a smart bracelet, a call watch, or a sports watch, the positioning method of the embodiment of the present application may be directly used for positioning the smart watch, the smart bracelet, the call watch, or the sports watch, no matter whether the GPS signal strength is greater than a preset strength threshold; alternatively, the positioning method of the embodiment of the application may be used for positioning except for the scenario where the GPS signal strength is relatively high (greater than the preset strength threshold).
Because the accuracy of the smart phone for GPS positioning is greatly higher than that of wearable equipment such as a smart watch for GPS positioning. Therefore, if the electronic device needs to perform GPS positioning in the preset position information base, the position information of the electronic device is acquired and uploaded to the server, and the server can only receive the position information uploaded by the smart phone, so that the accuracy of the position information is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a positioning device according to an embodiment of the present application. The positioning device can be applied to electronic equipment. The positioning device comprises: 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.
And the searching module 302 is configured to search for access points according to the positioning request, so as to determine at least three searched access points.
A first determining module 303, configured to determine location information of each access point, so as to obtain at least three pieces of location information.
A second determining module 304 is configured to determine a distance between each access point and the electronic device, so as to obtain at least three distances.
A third determining module 305 is configured to determine a 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; 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 access points.
In some embodiments, the receiving module 301 may be configured to: and 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 plurality of electronic devices search the corresponding access points and the distances between the plurality of electronic devices and the corresponding access points respectively when the plurality of electronic devices search the corresponding access points.
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 smaller 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 larger 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 embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed on a computer, causes the computer to perform the flow in the positioning method as provided in the present embodiment.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the processor is used for executing the flow in the positioning method provided by the 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 application.
The electronic device 400 may include memory 401, a processor 402, and the like. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 6 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Memory 401 may be used to store applications and data. The memory 401 stores an application program including executable code. Applications may constitute various functional modules. The processor 402 executes various functional applications and data processing by running application programs 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 application programs stored in the memory 401 and calling data stored in the memory 401, thereby performing overall monitoring of the electronic device.
In this embodiment, the processor 402 in the electronic device loads executable codes corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 executes the application programs stored in the memory 401, so as to implement the flow:
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 a distance of each access point from the electronic device 400 to obtain at least three distances;
the location of the electronic device 400 is determined based on the at least three location 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.
Memory 401 may be used to store applications and data. The memory 401 stores an application program including executable code. Applications may constitute various functional modules. The processor 402 executes various functional applications and data processing by running application programs 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 application programs stored in the memory 401 and calling data stored in the memory 401, thereby performing overall monitoring of 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 to generate keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
The output unit 404 may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The WiFi module 405 is configured to convert a serial port or TTL level into an embedded module that conforms to a Wi-Fi wireless network communication standard.
Display 406 may be used to display text, pictures, etc.
In this embodiment, the processor 402 in the electronic device loads executable codes corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 executes the application programs stored in the memory 401, so as to implement the flow:
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 a distance of each access point from the electronic device 400 to obtain at least three distances;
the location of the electronic device 400 is determined based on the at least three location information and the at least three distances.
In some embodiments, when the processor 402 executes the determining the location information of each access point to obtain at least three location information, it may execute: determining identification information of each access point; 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 access points.
In some embodiments, before the processor 402 executes the receiving the positioning request, it may further execute: and 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 plurality of electronic devices search the corresponding access points and the distances between the plurality of electronic devices and the corresponding access points respectively when the plurality of electronic devices search the corresponding access points.
In some embodiments, when the processor 402 performs the determining the distance between each access point and the electronic device 400 to obtain at least three distances, it may perform: determining a signal strength of each access point; and determining the distance between each access point and the electronic device 400 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, before the processor 402 executes the receiving the positioning request, it may further execute: detecting whether the GPS signal strength of the electronic device 400 is less than or equal to a preset strength threshold; if the GPS signal strength of the electronic device 400 is less than or equal to the 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, it may further perform: if the GPS signal intensity of the electronic equipment 400 is greater than a preset intensity threshold, acquiring a residual electric quantity value of the electronic equipment 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 foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of an embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of the positioning method, which is not repeated herein.
The positioning device provided in the embodiment of the present application belongs to the same concept as the positioning method in the above embodiment, and any method provided in the positioning method embodiment may be run on the positioning device, and the specific implementation process of the positioning device is detailed in the positioning method embodiment, which is not described herein again.
It should be noted that, for the positioning method according to the embodiment of the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the positioning method according to the embodiment of the present application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory, and executed by at least one processor, and the execution may include the flow of the embodiment of the positioning method as described in the embodiment. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), etc.
For the positioning device of the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored on a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The foregoing describes in detail a positioning method, apparatus, storage medium and electronic device provided in the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present application, where the foregoing description of the embodiments is only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A positioning method applied to an electronic device, comprising:
receiving a positioning request;
searching access points according to the positioning request to determine at least three searched access points;
determining identification information of each access point;
determining the position information of each access point through each thread in a plurality of threads according to the identification information of each access point and a preset position information base to obtain at least three position information, wherein the preset position information base comprises the identification information of a plurality of access points and the corresponding position information of the access points, the preset position information base is an updated preset position information base downloaded from a server when the electronic equipment receives updated information sent by the server after updating the preset position information base, and the data volume of the updated preset position information base is smaller than or equal to a preset data volume threshold value; or the preset position information base is obtained by updating the preset position information base existing in the electronic equipment according to the updated preset position information base downloaded from the server when the electronic equipment receives the updated information sent by the server after the server updates the preset position information base, and the network type connected with the electronic equipment currently is a wireless network, wherein the position information of each access point in the preset position information base is respectively corresponding to the position information of a plurality of electronic equipment when the corresponding access point is searched, and the distances between the plurality of electronic equipment and the corresponding access point are respectively determined when the corresponding access point is searched;
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 positioning method of claim 1, wherein the determining the distance of each access point from 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.
3. The positioning method of claim 1, further comprising, prior to said receiving a positioning 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 smaller than or equal to a preset intensity threshold value, generating a positioning request.
4. The positioning method of claim 3, further comprising, after said 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 larger 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.
5. The positioning method of claim 1, wherein the electronic device is a wearable device.
6. A positioning device for an electronic device, comprising:
the receiving module is used for receiving the 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, by each of a plurality of threads, identification information of each access point at the same time; 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 position information, wherein the preset position information base comprises the identification information of a plurality of access points and the corresponding position information of the access points, and the preset position information base is an updated preset position information base downloaded from a server when the electronic equipment receives the updated information sent by the server after updating the preset position information base, and the data volume of the updated preset position information base is smaller than or equal to a preset data volume threshold value; or the preset position information base is obtained by updating the preset position information base existing in the electronic equipment according to the updated preset position information base downloaded from the server when the electronic equipment receives the updated information sent by the server after the server updates the preset position information base, and the network type connected with the electronic equipment currently is a wireless network, wherein the position information of each access point in the preset position information base is respectively corresponding to the position information of a plurality of electronic equipment when the corresponding access point is searched, and the distances between the plurality of electronic equipment and the corresponding access point are respectively determined when the corresponding access point is searched;
A second determining module, configured to determine a distance between each access point and the electronic device, 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.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to perform the positioning method according to any of claims 1 to 5.
8. An electronic device comprising a processor and a memory, the memory having stored therein a computer program, the processor being adapted to perform the positioning method of any of claims 1 to 5 by invoking 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 CN112468952A (en) 2021-03-09
CN112468952B true 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
CN112468952A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
CN107402790B (en) Application program starting method and device, storage medium and terminal
CN105580394A (en) Method and apparatus for pushing and displaying message
CN105094861A (en) Webpage application program loading method, device and system
CN106502703B (en) Function calling method and device
US11012970B2 (en) Method for processing radio frequency interference and electronic device
CN112148579B (en) User interface testing method and device
CN111078556B (en) Application testing method and device
CN103544033A (en) Method, device and associated equipment for rolling back application program
CN108881875B (en) Image white balance processing method and device, storage medium and terminal
CN112749074B (en) Test case recommending method and device
EP2869604A1 (en) Method, apparatus and device for processing a mobile terminal resource
CN109684112B (en) Program file operation method, device, terminal and storage medium
CN110347578B (en) Application testing method and device and storage medium
CN111046040A (en) Method and device for determining index, electronic equipment and storage medium
CN112783731B (en) Abnormal device detection method, device and storage medium
CN112579264A (en) Application program jumping method, terminal and computer storage medium
CN108227953B (en) Character input method and related product
US20210141677A1 (en) Broadcast sending control method and apparatus, storage medium, and electronic device
CN112468952B (en) Positioning method, positioning device, storage medium and electronic equipment
CN111355848B (en) Positioning control method and device of electronic equipment, storage medium and electronic equipment
CN108874975A (en) Search for content recommendation method, device, terminal device and storage medium
CN112214404A (en) Mobile application testing method and device, storage medium and electronic equipment
CN106844396B (en) Information processing method and electronic equipment
CN114384825B (en) Control method and device of power supply equipment, electronic equipment and medium
CN112395185B (en) Program testing method and related 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