WO2018103441A1 - Network positioning method and terminal device - Google Patents

Network positioning method and terminal device Download PDF

Info

Publication number
WO2018103441A1
WO2018103441A1 PCT/CN2017/105104 CN2017105104W WO2018103441A1 WO 2018103441 A1 WO2018103441 A1 WO 2018103441A1 CN 2017105104 W CN2017105104 W CN 2017105104W WO 2018103441 A1 WO2018103441 A1 WO 2018103441A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
target
signal strength
geographic location
current
Prior art date
Application number
PCT/CN2017/105104
Other languages
French (fr)
Chinese (zh)
Inventor
蒋世民
唐荣政
Original Assignee
广东欧珀移动通信有限公司
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 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2018103441A1 publication Critical patent/WO2018103441A1/en

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
    • 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

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a network positioning method and a terminal device.
  • Wifi positioning refers to a method of locating a wireless signal of one or more WiFis in the vicinity by using a mobile terminal, and then calculating a geographic location of the mobile terminal based on the wireless signals of the one or more WiFi.
  • WiFi positioning is usually performed by the mobile terminal to apply for network positioning to the server, and then the server performs positioning processing, and finally returns the positioning result to the mobile terminal. It can be seen that the entire positioning process requires a certain time, so how to speed up the positioning is urgently needed in the field. technical problem.
  • the embodiment of the invention provides a network positioning method and a terminal device, so as to shorten the time required for positioning.
  • an embodiment of the present invention provides a network positioning method, where a MAC address of a target Wifi and a N signal strength and a N geographic location corresponding to the MAC address of the target Wifi are recorded in the terminal device.
  • the N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, including:
  • the terminal device accesses the target Wifi
  • the terminal device When the terminal device detects the network positioning instruction, the terminal device acquires a current signal strength that the terminal device currently receives the target Wifi;
  • the terminal device uses the target geographic location as the current geographic location of the terminal device;
  • the target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning
  • the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
  • an embodiment of the present invention provides a terminal device, where a MAC address of a target Wifi and a N signal strength corresponding to a MAC address of the target Wifi and N geographic locations, the N signals are recorded in the terminal device.
  • the strength is in one-to-one correspondence with the N geographical locations, and the N is a positive integer, including:
  • a Wifi access module configured to access the target Wifi
  • An information acquiring module configured to acquire, when the terminal device detects a network positioning instruction, a current signal strength that the current terminal device receives the target Wifi;
  • a positioning module configured to use a target geographic location as a current geographic location of the terminal device when an absolute value of a difference between the current signal strength and the target signal strength is less than or equal to a preset threshold
  • the target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning
  • the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
  • an embodiment of the present invention provides a terminal device, including:
  • a processor coupled to the memory
  • the processor invokes the executable program code stored in the memory to perform some or all of the steps as described in the first aspect of the embodiments of the present invention.
  • the present invention provides a computer storage medium for storing computer software instructions for a terminal device provided by the third aspect of the embodiments of the present invention, comprising a program designed to execute the above aspects.
  • an embodiment of the present invention provides a computer program product, where the computer is
  • the program product comprises a non-transitory computer readable storage medium storing a computer program operative to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the invention.
  • the computer program product can be a software installation package, and the computer includes the terminal device.
  • the solution provided by the present invention records multiple signal strengths of the target Wifi and multiple geographical locations of the obtained terminal device when the terminal device performs positioning multiple times after the terminal device is connected to the target Wifi.
  • the plurality of signal strengths include at least a target signal strength
  • the plurality of geographic locations include at least a target geographic location
  • the target signal strength is a target signal strength of the target Wifi received by the terminal device after the network positioning is performed after the last terminal device accesses the target Wifi.
  • the network location is obtained to obtain the target geographic location of the terminal device.
  • the current terminal device receives the current target Wifi.
  • the target geographic location is directly used as the current geographic location of the terminal device, thereby shortening the time required for positioning.
  • FIG. 1 is a schematic flowchart diagram of a network positioning method according to a first embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a network positioning method according to a second embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a terminal device according to a first embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a terminal device according to a second embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • a terminal device also called a User Equipment (UE) is a device that provides voice and/or data connectivity to a user, for example, a handheld device with a wireless connection function, an in-vehicle device, and the like.
  • UE User Equipment
  • Common terminals include, for example, mobile phones, tablets, notebook computers, PDAs, mobile internet devices (MIDs), wearable devices such as smart watches, smart bracelets, pedometers, and the like.
  • the last time is the closest to the current time, and has been completed.
  • Multiple means two or more. "and/or”, describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately.
  • the character "/" generally indicates that the contextual object is an "or" relationship.
  • FIG. 1 is a schematic flowchart of a network positioning method according to an embodiment of the present invention, in which a MAC address of a target Wifi and a MAC of the target Wifi are recorded in the terminal device.
  • the N signal strengths and the N geographic locations corresponding to the address, the N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, and includes the following steps:
  • the terminal device accesses the target Wifi.
  • the terminal device detects the network positioning instruction, the terminal device acquires a current signal strength that the terminal device currently receives the target Wifi.
  • the terminal device uses the target geographic location as the current geographic location of the terminal device, where the target signal strength is The last time the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is the last time the terminal device accesses After the target Wifi, the terminal device performs network positioning to obtain the geographic location of the terminal device, the N signal strengths include the target signal strength, and the N geographic locations include the target geographic location.
  • the N signal strengths include at least the target signal strength
  • the N geographic locations include at least the target geographic location.
  • the preset threshold may be, for example, 5 db, 10 db, 12 db, 15 db, 20 db, or other values.
  • the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function that requires a geographic location.
  • the current interface may be a payment interface, an information reading interface, an APP home page, a status interface (such as a circle of friends), and the like.
  • the terminal device When the current interface of the terminal device includes a function that requires a geographic location, the terminal device directly triggers a network positioning instruction to perform network positioning.
  • the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
  • the set value may be equal to, for example, 10 times, 11 times, 13 times, 15 times, 17 times, 20 times or Is another value.
  • the associated devices record the N geographic locations corresponding to the target Wifi, that is, the number of times the terminal device performs network positioning after accessing the target Wifi is at least 20 Times (greater than 15). It can be seen that, in the case that the terminal device accesses the target Wifi, the possibility of performing network positioning is large, and in order to further accelerate the speed at which the user obtains the geographical location, in this case, the terminal device directly starts the network positioning instruction.
  • the target Wifi MAC address is 123
  • the target signal strength is 100 db
  • the target geographic location is A.
  • the user initiates network positioning, assuming the current terminal device.
  • the current signal strength of the target Wifi is 107 db. It can be seen that the terminal device is connected to the same Wifi, and the signal strength of the terminal device connected to the Wifi is similar, and the user is considered not to move.
  • the address A is directly used as the current geographical location of the terminal device. .
  • the method further includes:
  • the terminal device selects W signal strengths from the N signal strengths, and from the N And selecting W geographic locations corresponding to the W signal strengths, where the W is an integer greater than 1; the terminal device according to the current signal strength, the W signal strengths and the W geographies Position, determining the current geographic location of the terminal device.
  • the target signal strength is 100 db
  • the current signal strength of the target Wifi received by the terminal device is 50 db
  • the preset threshold is 10 db. It can be seen that the current signal strength of the target Wifi received by the terminal device differs greatly from the target signal strength.
  • the user is considered to be mobile.
  • the address A cannot be directly used as the current geographic location of the terminal device.
  • the current geographic location of the terminal device needs to be re-confirmed.
  • the specific manner of re-confirming the current geographic location of the terminal device is: selecting N from the N signal strengths.
  • the signal strengths, and the W geographic locations corresponding to the W signal strengths are selected from the N geographic locations, and then determined based on the current signal strength, W signal strengths, and W geographic locations.
  • the method further includes:
  • the terminal device records the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
  • the terminal device further records N corresponding to the MAC address of the target Wifi. Recording time, the N recording times are in one-to-one correspondence with the N signal strengths, and the terminal device uses the target geographic location as the current geographic location of the terminal device, including:
  • the terminal device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a record corresponding to the target signal strength. Recording time. That is to say, if the target recording time is shorter than the current time, the terminal device directly uses the geographical location obtained last time as the current geographic location of the terminal device.
  • the preset duration may be, for example, 1 day, 2 days, 3 days, 4 days, 8 days, 1 month, or other values.
  • the method further includes:
  • the terminal device When the target recording time is longer than the preset duration, the terminal device performs network positioning again to obtain the current geographic location of the terminal device.
  • the specific implementation manner of the terminal device re-sending the network to obtain the current geographic location of the terminal device may be: the terminal device starts the Wifi module to scan multiple hotspots around the terminal device to obtain multiple hotspot information (hotspot information such as hotspots) The MAC address, the terminal device receives the signal strength of the hotspot, and the like, and then the terminal device feeds back the obtained hotspot information to the server, and the server determines the current geographic location of the terminal device based on the multiple hotspot information fed back by the terminal device, and then the server determines The current location of the terminal device is fed back to the terminal device.
  • hotspot information such as hotspots
  • the terminal device further records N access durations corresponding to the MAC address of the target Wifi, where the N access durations are in one-to-one correspondence with the N signal strengths, and the preset duration is Determined based on the access duration.
  • the preset duration is equal to an access duration with a minimum duration of the N access durations; or the preset duration is equal to an access duration of a maximum duration of the N access durations; or The preset duration is equal to an average access duration of the N access durations.
  • the N access durations are: the first access duration is 10 min, the second access duration is 15 min, the third access duration is 20 min, and the fourth access duration is 12 min.
  • the five access time is 25 minutes.
  • the preset duration can be equal to 10 min, or 25 min, or 16.4 min.
  • determining the preset duration by the above manner can further determine the user's moving position.
  • the possibility in turn, further confirms the accuracy of the target geographic location as the current geographic location of the terminal device.
  • the solution provided by the present invention records multiple signal strengths of the target Wifi and multiple geographical locations of the obtained terminal device when the terminal device performs positioning multiple times after the terminal device is connected to the target Wifi.
  • the plurality of signal strengths include at least a target signal strength
  • the plurality of geographic locations include at least a target geographic location
  • the target signal strength is a target signal strength of the target Wifi received by the terminal device after the network positioning is performed after the last terminal device accesses the target Wifi.
  • the network location is obtained to obtain the target geographic location of the terminal device.
  • the current terminal device receives the current target Wifi.
  • the target geographic location is directly used as the current geographic location of the terminal device, and the terminal device is not required to apply for network positioning to the server, and then the server performs positioning, and returns the positioning result to the terminal device, thereby shortening the positioning location. time needed.
  • the embodiment of the present invention further provides another more detailed method flow, where the terminal device records the MAC address of the target Wifi, and the N signal strengths, N geographic locations, and N records corresponding to the MAC address of the target Wifi.
  • the N signal strengths are in one-to-one correspondence with the N geographic locations
  • the N recording times are in one-to-one correspondence with the N signal strengths
  • the N is an integer greater than 1, as shown in FIG. ,include:
  • the terminal device accesses the target Wifi.
  • the terminal device detects a network positioning instruction.
  • the terminal device acquires a current signal strength that the terminal device receives the target Wifi.
  • the terminal device determines whether an absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, where the target signal strength is the last time the terminal device accesses the target Wifi.
  • the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the N signal strengths include the target signal strength.
  • the threshold is executed in step S205.
  • steps S208-S210 are performed.
  • the terminal device determines whether the target recording time is less than or equal to a preset duration, and the target recording time is a recording time corresponding to the target signal strength.
  • step S206 is performed.
  • step S207 is performed.
  • the terminal device uses a target geographic location as a current geographic location of the terminal device.
  • Step S207 The terminal device performs network positioning again to obtain a current geographic location of the terminal device.
  • Step S209 is executed after step S206 is performed.
  • the terminal device selects W signal strengths from the N signal strengths, and selects W geographic locations corresponding to the W signal strengths from the N geographic locations, where the W is greater than An integer of 1, the target geographic location is a geographic location of the terminal device obtained by the terminal device after network access to the target Wifi, and the N geographic locations include the Target location.
  • the terminal device determines, according to the current signal strength, the W signal strengths and the W geographic locations, a current geographic location of the terminal device.
  • the terminal device records the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
  • the embodiment of the present invention further provides a terminal device 300.
  • the terminal device records the MAC address of the target Wifi and the N signal strengths and N geographic locations corresponding to the MAC address of the target Wifi.
  • the N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, including:
  • a Wifi access module 301 configured to access the target Wifi
  • the information obtaining module 302 is configured to acquire, when the terminal device detects the network positioning instruction, the current signal strength that the terminal device receives the target Wifi;
  • the positioning module 303 is configured to use the target geographic location as the current geographic location of the terminal device when the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold.
  • the target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning
  • the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
  • the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function that requires a geographic location.
  • the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
  • the terminal device further includes:
  • the selecting module 304 is configured to: when the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, select W signal strengths from the N signal strengths, and from the The W geographic locations corresponding to the W signal strengths are selected from the N geographic locations, and the W is an integer greater than 1.
  • the positioning module 303 is further configured to determine a current geographic location of the terminal device according to the current signal strength, the W signal strengths, and the W geographic locations.
  • the terminal device further includes:
  • the recording module 305 is configured to record the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
  • the terminal device further records N recording times corresponding to the MAC address of the target Wifi, where the N recording times are in one-to-one correspondence with the N signal strengths, and the positioning module 303 is specifically configured to: :
  • the terminal The device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a recording time corresponding to the target signal strength.
  • the positioning module 303 is further configured to: when the target recording time is greater than the preset duration, the network positioning is performed to obtain the current geographic location of the terminal device.
  • the terminal device further records N access durations corresponding to the MAC address of the target Wifi, where the N access durations are in one-to-one correspondence with the N signal strengths, and the preset duration is Determined based on the access duration.
  • the preset duration is equal to an access duration with a minimum duration of the N access durations; or the preset duration is equal to an access duration of a maximum duration of the N access durations; or The preset duration is equal to an average access duration of the N access durations.
  • each of the above modules (the Wifi access module 301, the information obtaining module 302, the positioning module 303, the selecting module 304, and the recording module 305) is used to perform the related steps of the foregoing method.
  • the terminal device 300 is presented in the form of a module.
  • a “module” herein may refer to an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or other devices that provide the above functionality.
  • ASIC application-specific integrated circuit
  • the above Wifi access module 301, the information acquisition module 302, the positioning module 303, the selection module 304, and the recording module 305 can be implemented by the processor 401 of the terminal device shown in FIG.
  • the terminal device 400 can be implemented in the structure of FIG. 4, which includes at least one processor 401, at least one memory 402, and at least one communication interface 403.
  • the processor 401, the memory 402, and the communication interface 403 are connected by the communication bus and complete communication with each other.
  • the processor 401 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communication interface 403 for communicating with other devices or communication networks, such as Ethernet, wireless access network (RAN), Wireless Local Area Networks (WLAN), etc.
  • RAN wireless access network
  • WLAN Wireless Local Area Networks
  • the memory 402 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • the dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this.
  • the memory can exist independently and be connected to the processor via a bus.
  • the memory can also be integrated with the processor.
  • the memory 402 is used to store application code that executes the above solution, and is controlled by the processor 401 for execution.
  • the processor 401 is configured to execute application code stored in the memory 402.
  • the code stored in the memory 402 can perform the above network positioning method performed by the terminal device provided above, such as a MAC address in which the target Wifi is recorded in the terminal device, and N signal strengths and N geographical locations corresponding to the MAC address of the target Wifi.
  • the N signal strengths are in one-to-one correspondence with the N geographic locations, where the N is a positive integer, including: accessing the target Wifi; when the terminal device detects a network positioning instruction, acquiring the current
  • the terminal device receives the current signal strength of the target Wifi; when the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, the target geographic location is used as the current geographic location of the terminal device;
  • the target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is the latest After the terminal device accesses the target Wifi, the terminal device performs network positioning to obtain the location of the terminal device.
  • Position including the N signal strength of the target signal strength, the location (s) comprising the N target location.
  • the terminal device is a mobile phone, and the components of the mobile phone are combined with FIG. 5 below. Carry out a specific introduction:
  • the RF circuit 510 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 580. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 510 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • the memory 520 can be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 520.
  • the memory 520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a Wifi access function, a signal strength function for acquiring the received Wifi, a positioning function, The information recording function) and the like; the storage data area can store data created according to the use of the mobile phone (such as obtaining the signal strength of the received Wifi, the determined geographical location) and the like.
  • memory 520 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input unit 530 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 530 can include a touch panel 531 and other input devices 532.
  • the touch panel 531 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 531 or near the touch panel 531. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 531 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch information from the touch detection device, and turns it The coordinates are replaced by the contacts, and then sent to the processor 580, and the commands sent from the processor 580 can be received and executed.
  • the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 530 may also include other input devices 532.
  • other input devices 532 may include, but are not limited to, a physical keyboard, at least one of a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
  • a function key such as a volume control button, a switch button, etc.
  • a trackball such as a mouse, a joystick, and the like.
  • the display unit 540 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 540 can include a display panel 541.
  • the display panel 541 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 531 can cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, the touch panel 531 transmits to the processor 580 to determine the type of the touch event, and then the processor 580 according to the touch event. The type provides a corresponding visual output on display panel 541.
  • touch panel 531 and the display panel 541 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 5, in some embodiments, the touch panel 531 and the display panel 541 may be integrated. Realize the input and output functions of the phone.
  • the handset may also include at least one type of sensor 550, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 541 according to the brightness of the ambient light, and the proximity sensor may close the display panel 541 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • Audio circuit 560, speaker 561, and microphone 562 provide an audio interface between the user and the handset.
  • the audio circuit 560 can transmit the converted electrical data of the received audio data to the speaker 561, and convert it into a sound signal output by the speaker 561.
  • the microphone 562 converts the collected sound signal into an electrical signal, and the audio circuit 560 is used by the audio circuit 560. After receiving, it is converted into audio data, and then processed by the audio data output processor 580, sent to another mobile phone via the RF circuit 510, or the audio data is input. Exit to memory 520 for further processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 570, which provides users with wireless broadband Internet access.
  • FIG. 5 shows the WiFi module 570, it can be understood that it does not belong to the essential configuration of the mobile phone, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 580 is the control center of the handset, and connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 520, and invoking data stored in the memory 520, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 580.
  • the handset also includes a power source 590 (such as a battery) that supplies power to the various components.
  • a power source 590 such as a battery
  • the power source can be logically coupled to the processor 580 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • each step method flow may be implemented based on the structure of the terminal device shown in FIG. 5.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of any one of the network positioning methods described in the foregoing method embodiments.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
  • the memory may include: a flash disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk.

Landscapes

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

Abstract

Disclosed are a network positioning method and a terminal device. The terminal device records a MAC address of a target Wi-Fi and N signal strengths and N geographical locations corresponding to the target Wi-Fi, the N signal strengths and the N geographical locations correspond one-to-one. The method comprises: accessing a target Wi-Fi; when a network positioning instruction is detected, acquiring the current signal strength of a target Wi-Fi received by a current terminal device; when the absolute value of the difference between the current signal strength and a target signal strength does not exceed a preset threshold, making a target geographical location as a positioning location, the target signal strength being the signal strength of the target Wi-Fi received by the terminal device during positioning after the latest instance of the terminal device accessing the target Wi-Fi, the target geographical location being the geographical location produced by positioning after the latest instance of the terminal device accessing the target Wi-Fi, the N signal strengths comprising the target signal strength, and the N geographical locations comprising the target geographical location. The employment of embodiments of the present invention reduces the time required for positioning.

Description

一种网络定位方法及终端设备Network positioning method and terminal device 技术领域Technical field
本发明涉及电子技术领域,尤其涉及一种网络定位方法及终端设备。The present invention relates to the field of electronic technologies, and in particular, to a network positioning method and a terminal device.
背景技术Background technique
移动终端平台(比如ISO平台或者Android平台等),均有网络定位的需求,而使用Wifi(Wireless Fidelity,无线保真)进行网络定位是最常用的方法。Wifi定位是指利用移动终端测量到周边的1个或多个WiFi的无线信号,然后基于这些1个或多个WiFi的无线信号,计算出移动终端地理位置的定位方法。Mobile terminal platforms (such as ISO platform or Android platform) have network positioning requirements, and Wifi (Wireless Fidelity) is the most common method for network positioning. Wifi positioning refers to a method of locating a wireless signal of one or more WiFis in the vicinity by using a mobile terminal, and then calculating a geographic location of the mobile terminal based on the wireless signals of the one or more WiFi.
WiFi定位通常是移动终端向服务器申请网络定位,然后服务器进行定位处理,最后向移动终端返回定位结果,可见,整个定位过程需要一定的时间,因此如何加快定位所需要的时间是本领域亟待解决的技术问题。WiFi positioning is usually performed by the mobile terminal to apply for network positioning to the server, and then the server performs positioning processing, and finally returns the positioning result to the mobile terminal. It can be seen that the entire positioning process requires a certain time, so how to speed up the positioning is urgently needed in the field. technical problem.
发明内容Summary of the invention
本发明实施例提供一种网络定位方法及终端设备,以期缩短定位所需要的时间。The embodiment of the invention provides a network positioning method and a terminal device, so as to shorten the time required for positioning.
第一方面,本发明实施例提供一种网络定位方法,其特征在于,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括:In a first aspect, an embodiment of the present invention provides a network positioning method, where a MAC address of a target Wifi and a N signal strength and a N geographic location corresponding to the MAC address of the target Wifi are recorded in the terminal device. The N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, including:
所述终端设备接入所述目标Wifi;The terminal device accesses the target Wifi;
当所述终端设备检测到网络定位指令时,所述终端设备获取当前所述终端设备接收到所述目标Wifi的当前信号强度;When the terminal device detects the network positioning instruction, the terminal device acquires a current signal strength that the terminal device currently receives the target Wifi;
当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,所述终端设备将目标地理位置作为所述终端设备当前地理位置; When the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, the terminal device uses the target geographic location as the current geographic location of the terminal device;
其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
第二方面,本发明实施例提供一种终端设备,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括:In a second aspect, an embodiment of the present invention provides a terminal device, where a MAC address of a target Wifi and a N signal strength corresponding to a MAC address of the target Wifi and N geographic locations, the N signals are recorded in the terminal device. The strength is in one-to-one correspondence with the N geographical locations, and the N is a positive integer, including:
Wifi接入模块,用于接入所述目标Wifi;a Wifi access module, configured to access the target Wifi;
信息获取模块,用于当所述终端设备检测到网络定位指令时,获取当前所述终端设备接收到所述目标Wifi的当前信号强度;An information acquiring module, configured to acquire, when the terminal device detects a network positioning instruction, a current signal strength that the current terminal device receives the target Wifi;
定位模块,用于当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,将目标地理位置作为所述终端设备当前地理位置;a positioning module, configured to use a target geographic location as a current geographic location of the terminal device when an absolute value of a difference between the current signal strength and the target signal strength is less than or equal to a preset threshold;
其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
第三方面,本发明实施例提供了一种终端设备,包括:In a third aspect, an embodiment of the present invention provides a terminal device, including:
存储有可执行程序代码的存储器;a memory storing executable program code;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行如本发明实施例第一方面中所描述的部分或全部步骤。The processor invokes the executable program code stored in the memory to perform some or all of the steps as described in the first aspect of the embodiments of the present invention.
第四方面,本发明提供一种计算机存储介质,用于储存为本发明实施例第三方面提供的终端设备所用的计算机软件指令,其包含用于执行上述方面所设计的程序。In a fourth aspect, the present invention provides a computer storage medium for storing computer software instructions for a terminal device provided by the third aspect of the embodiments of the present invention, comprising a program designed to execute the above aspects.
第五方面,本发明实施例提供了一种计算机程序产品,其中,上述计算机 程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本发明实施例第一方面所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括终端设备。In a fifth aspect, an embodiment of the present invention provides a computer program product, where the computer is The program product comprises a non-transitory computer readable storage medium storing a computer program operative to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the invention. The computer program product can be a software installation package, and the computer includes the terminal device.
相较于现有技术,本发明提供的方案记录之前终端设备连入目标Wifi后多次进行定位时终端设备接收到目标Wifi的多个信号强度和定位得到的终端设备的多个地理位置,这多个信号强度至少包括目标信号强度,这多个地理位置至少包括目标地理位置,目标信号强度为最近一次终端设备接入目标Wifi后,进行网络定位时终端设备接收到目标Wifi的目标信号强度,目标地理位置为最近一次终端设备接入目标Wifi后,进行网络定位得到终端设备的目标地理位置,当终端设备在接入目标Wifi后,进行网络定位时,在当前终端设备接收到目标Wifi的当前信号强度与目标信号强度相差不大时,直接将目标地理位置作为终端设备当前地理位置,进而缩短了定位所需要的时间。Compared with the prior art, the solution provided by the present invention records multiple signal strengths of the target Wifi and multiple geographical locations of the obtained terminal device when the terminal device performs positioning multiple times after the terminal device is connected to the target Wifi. The plurality of signal strengths include at least a target signal strength, and the plurality of geographic locations include at least a target geographic location, and the target signal strength is a target signal strength of the target Wifi received by the terminal device after the network positioning is performed after the last terminal device accesses the target Wifi. After the target location is the last time the terminal device accesses the target Wifi, the network location is obtained to obtain the target geographic location of the terminal device. When the terminal device performs network positioning after accessing the target Wifi, the current terminal device receives the current target Wifi. When the signal strength is not much different from the target signal strength, the target geographic location is directly used as the current geographic location of the terminal device, thereby shortening the time required for positioning.
本发明的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These and other aspects of the invention will be more apparent from the following description of the embodiments.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明第一实施例提供的一种网络定位方法的流程示意图;FIG. 1 is a schematic flowchart diagram of a network positioning method according to a first embodiment of the present invention;
图2为本发明第二实施例提供的一种网络定位方法的流程示意图;2 is a schematic flowchart of a network positioning method according to a second embodiment of the present invention;
图3为本发明第一实施例提供的一种终端设备的结构示意图;FIG. 3 is a schematic structural diagram of a terminal device according to a first embodiment of the present invention;
图4为本发明第二实施例提供的一种终端设备的结构示意图;4 is a schematic structural diagram of a terminal device according to a second embodiment of the present invention;
图5为本发明第三实施例提供的一种终端设备的结构示意图。FIG. 5 is a schematic structural diagram of a terminal device according to a third embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所 描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
以下分别进行详细说明。The details are described below separately.
本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", and "fourth" and the like in the specification and claims of the present invention are used to distinguish different objects, and are not intended to describe a specific order. . Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some of the terms in the present application will be explained to be understood by those skilled in the art.
1)、终端设备,又称之为用户设备(User Equipment,UE),是一种向用户提供语音和/或数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。常见的终端例如包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,例如智能手表、智能手环、计步器等。1) A terminal device, also called a User Equipment (UE), is a device that provides voice and/or data connectivity to a user, for example, a handheld device with a wireless connection function, an in-vehicle device, and the like. Common terminals include, for example, mobile phones, tablets, notebook computers, PDAs, mobile internet devices (MIDs), wearable devices such as smart watches, smart bracelets, pedometers, and the like.
2)、最近一次就是距离当前时间最近,并且已完成的。2), the last time is the closest to the current time, and has been completed.
3)、“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。3) "Multiple" means two or more. "and/or", describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately. The character "/" generally indicates that the contextual object is an "or" relationship.
请参见图1,图1为本发明实施例提供的一种网络定位方法的流程示意图,其中,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC 地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括以下步骤:Referring to FIG. 1 , FIG. 1 is a schematic flowchart of a network positioning method according to an embodiment of the present invention, in which a MAC address of a target Wifi and a MAC of the target Wifi are recorded in the terminal device. The N signal strengths and the N geographic locations corresponding to the address, the N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, and includes the following steps:
S101、所述终端设备接入所述目标Wifi。S101. The terminal device accesses the target Wifi.
S102、当所述终端设备检测到网络定位指令时,所述终端设备获取当前所述终端设备接收到所述目标Wifi的当前信号强度。S102. When the terminal device detects the network positioning instruction, the terminal device acquires a current signal strength that the terminal device currently receives the target Wifi.
S103、当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,所述终端设备将目标地理位置作为所述终端设备当前地理位置;其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。S103. When the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, the terminal device uses the target geographic location as the current geographic location of the terminal device, where the target signal strength is The last time the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is the last time the terminal device accesses After the target Wifi, the terminal device performs network positioning to obtain the geographic location of the terminal device, the N signal strengths include the target signal strength, and the N geographic locations include the target geographic location.
其中,需要说明的是,N个信号强度至少包括目标信号强度,N个地理位置至少包括目标地理位置。It should be noted that the N signal strengths include at least the target signal strength, and the N geographic locations include at least the target geographic location.
其中,上述预设阈值例如可以是5db、10db、12db、15db、20db或是其他值。The preset threshold may be, for example, 5 db, 10 db, 12 db, 15 db, 20 db, or other values.
可选地,所述网络定位指令是所述终端设备在检测到当前界面包含需要地理位置的功能的情况下触发的。Optionally, the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function that requires a geographic location.
其中,当前界面可以是支付界面,信息读取界面,APP首页,状态界面(比如朋友圈),等等。The current interface may be a payment interface, an information reading interface, an APP home page, a status interface (such as a circle of friends), and the like.
举例来说,现在APP的大多数功能都需要获取用户当前地理位置,比如需要知道用户当前的地理位置给用户推荐距离较近的资源,例如给用户推荐距离用户较近的美食,或者用户上传或发朋友圈需要获取用户当前的地理位置,等等。当终端设备当前界面包含需要地理位置的功能的情况下,终端设备直接触发网络定位指令,进行网络定位。For example, most functions of the APP now need to obtain the current geographic location of the user, for example, need to know the current geographic location of the user to recommend the resources closer to the user, such as recommending the food closer to the user, or uploading or Sending a circle of friends needs to get the user's current location, and so on. When the current interface of the terminal device includes a function that requires a geographic location, the terminal device directly triggers a network positioning instruction to perform network positioning.
可选地,所述网络定位指令是所述终端设备在检测到所述N大于或等于设定值时触发的。Optionally, the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
其中,设定值例如可以等于10次、11次、13次、15次、17次、20次或 是其他值。Wherein, the set value may be equal to, for example, 10 times, 11 times, 13 times, 15 times, 17 times, 20 times or Is another value.
具体地,假设设定值=15次,N=20,终端设备中关联记录有目标Wifi对应的N个地理位置,也就是说,终端设备在接入目标Wifi后进行网络定位的次数至少有20次(大于15)。可见,终端设备在接入目标Wifi的情况下,进行网络定位的可能性较大,为了进一步地加快用户得到地理位置的速度,在该种情况下,终端设备直接出发网络定位指令。Specifically, assuming that the set value is 15 times, N=20, the associated devices record the N geographic locations corresponding to the target Wifi, that is, the number of times the terminal device performs network positioning after accessing the target Wifi is at least 20 Times (greater than 15). It can be seen that, in the case that the terminal device accesses the target Wifi, the possibility of performing network positioning is large, and in order to further accelerate the speed at which the user obtains the geographical location, in this case, the terminal device directly starts the network positioning instruction.
举例来说,假设预设阈值为10db,目标Wifi的MAC地址为123,目标信号强度为100db,目标地理位置为A,当前终端设备接入到目标Wifi后,用户发起网络定位,假设当前终端设备接收到目标Wifi的当前信号强度为107db,可见,终端设备连接同一个Wifi,且终端设备接到该Wifi的信号强度相近,则认为用户没有移动,此时直接将地址A作为终端设备当前地理位置。For example, suppose the preset threshold is 10 db, the target Wifi MAC address is 123, the target signal strength is 100 db, and the target geographic location is A. After the current terminal device accesses the target Wifi, the user initiates network positioning, assuming the current terminal device. The current signal strength of the target Wifi is 107 db. It can be seen that the terminal device is connected to the same Wifi, and the signal strength of the terminal device connected to the Wifi is similar, and the user is considered not to move. At this time, the address A is directly used as the current geographical location of the terminal device. .
可选地,若所述N为大于1的整数,所述方法还包括:Optionally, if the N is an integer greater than 1, the method further includes:
当所述当前信号强度与所述目标信号强度差值的绝对值大于所述预设阈值时,所述终端设备从所述N个信号强度中选取出W个信号强度,以及从所述N个地理位置中选取出所述W个信号强度对应的W个地理位置,所述W为大于1的整数;所述终端设备根据所述当前信号强度,所述W个信号强度和所述W个地理位置,确定所述终端设备当前地理位置。When the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, the terminal device selects W signal strengths from the N signal strengths, and from the N And selecting W geographic locations corresponding to the W signal strengths, where the W is an integer greater than 1; the terminal device according to the current signal strength, the W signal strengths and the W geographies Position, determining the current geographic location of the terminal device.
举例来说,假设目标信号强度为100db,终端设备接收到目标Wifi的当前信号强度为50db,预设阈值为10db,可见,终端设备接收到目标Wifi的当前信号强度与目标信号强度相差较大,则认为用户发生移动,此时不能直接将地址A作为终端设备当前地理位置,需要重新确认终端设备当前地理位置,其重新确认终端设备当前地理位置具体方式为:从N个信号强度中选取出W个信号强度,以及从N个地理位置中选取出W个信号强度对应的W个地理位置,然后在基于当前信号强度,W个信号强度和W个地理位置确定。For example, if the target signal strength is 100 db, the current signal strength of the target Wifi received by the terminal device is 50 db, and the preset threshold is 10 db. It can be seen that the current signal strength of the target Wifi received by the terminal device differs greatly from the target signal strength. The user is considered to be mobile. In this case, the address A cannot be directly used as the current geographic location of the terminal device. The current geographic location of the terminal device needs to be re-confirmed. The specific manner of re-confirming the current geographic location of the terminal device is: selecting N from the N signal strengths. The signal strengths, and the W geographic locations corresponding to the W signal strengths are selected from the N geographic locations, and then determined based on the current signal strength, W signal strengths, and W geographic locations.
可选地,所述方法还包括:Optionally, the method further includes:
所述终端设备将所述当前信号强度、所述终端设备当前地理位置和所述目标Wifi的MAC地址关联记录。The terminal device records the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
可选地,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个 记录时间,所述N个记录时间与所述N个信号强度一一对应,所述终端设备将所述目标地理位置作为所述终端设备当前地理位置,包括:Optionally, the terminal device further records N corresponding to the MAC address of the target Wifi. Recording time, the N recording times are in one-to-one correspondence with the N signal strengths, and the terminal device uses the target geographic location as the current geographic location of the terminal device, including:
当所述目标记录时间距离当前系统时间小于或等于预设时长时,所述终端设备将所述目标地理位置作为所述终端设备当前地理位置,所述目标记录时间为记录所述目标信号强度对应的记录时间。也就是说,假如目标记录时间距离当前时间较短时,终端设备就才直接使用上次定位得到的地理位置作为终端设备当前地理位置。When the target recording time is less than or equal to the preset time length, the terminal device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a record corresponding to the target signal strength. Recording time. That is to say, if the target recording time is shorter than the current time, the terminal device directly uses the geographical location obtained last time as the current geographic location of the terminal device.
其中,上述预设时长例如可以是1天、2天、3天、4天、8天、1个月或是其他值。The preset duration may be, for example, 1 day, 2 days, 3 days, 4 days, 8 days, 1 month, or other values.
可选地,所述方法还包括:Optionally, the method further includes:
当所述目标记录时间距离当前系统时间大于所述预设时长时,所述终端设备重新进行网络定位,以得到所述终端设备当前地理位置。When the target recording time is longer than the preset duration, the terminal device performs network positioning again to obtain the current geographic location of the terminal device.
其中,终端设备重新进行网络定位,以得到终端设备当前地理位置的具体实施方式可以是:终端设备启动Wifi模块扫描终端设备周围的多个热点,以得到多个热点信息(热点信息比如有热点的MAC地址,终端设备接收到热点的信号强度等),然后终端设备将获取到的多个热点信息反馈给服务器,服务器基于终端设备反馈的多个热点信息确定终端设备当前地理位置,然后服务器将确定的终端设备当前地理位置反馈给终端设备。The specific implementation manner of the terminal device re-sending the network to obtain the current geographic location of the terminal device may be: the terminal device starts the Wifi module to scan multiple hotspots around the terminal device to obtain multiple hotspot information (hotspot information such as hotspots) The MAC address, the terminal device receives the signal strength of the hotspot, and the like, and then the terminal device feeds back the obtained hotspot information to the server, and the server determines the current geographic location of the terminal device based on the multiple hotspot information fed back by the terminal device, and then the server determines The current location of the terminal device is fed back to the terminal device.
可选地,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个接入时长,所述N个接入时长与所述N个信号强度一一对应,所述预设时长是基于所述接入时长确定的。Optionally, the terminal device further records N access durations corresponding to the MAC address of the target Wifi, where the N access durations are in one-to-one correspondence with the N signal strengths, and the preset duration is Determined based on the access duration.
可选地,所述预设时长等于所述N个接入时长中时长最小的接入时长;或者,所述预设时长等于所述N个接入时长中时长最大的接入时长;或者,所述预设时长等于所述N个接入时长的平均接入时长。Optionally, the preset duration is equal to an access duration with a minimum duration of the N access durations; or the preset duration is equal to an access duration of a maximum duration of the N access durations; or The preset duration is equal to an average access duration of the N access durations.
举例来说,假设N=5,这N个接入时长有:第一接入时长为10min、第二接入时长为15min、第三接入时长为20min、第四接入时长为12min、第五接入时长为25min。那么预设时长可以等于10min、或是25min、或是16.4min。For example, if N=5, the N access durations are: the first access duration is 10 min, the second access duration is 15 min, the third access duration is 20 min, and the fourth access duration is 12 min. The five access time is 25 minutes. Then the preset duration can be equal to 10 min, or 25 min, or 16.4 min.
可见,通过上述方式确定上述预设时长,可进一步地确定用户移动位置的 可能性,进而更进一步地确认将目标地理位置作为终端设备当前地理位置的准确性。It can be seen that determining the preset duration by the above manner can further determine the user's moving position. The possibility, in turn, further confirms the accuracy of the target geographic location as the current geographic location of the terminal device.
相较于现有技术,本发明提供的方案记录之前终端设备连入目标Wifi后多次进行定位时终端设备接收到目标Wifi的多个信号强度和定位得到的终端设备的多个地理位置,这多个信号强度至少包括目标信号强度,这多个地理位置至少包括目标地理位置,目标信号强度为最近一次终端设备接入目标Wifi后,进行网络定位时终端设备接收到目标Wifi的目标信号强度,目标地理位置为最近一次终端设备接入目标Wifi后,进行网络定位得到终端设备的目标地理位置,当终端设备在接入目标Wifi后,进行网络定位时,在当前终端设备接收到目标Wifi的当前信号强度与目标信号强度相差不大时,直接将目标地理位置作为终端设备当前地理位置,无需终端设备向服务器申请网络定位,然后服务器进行定位后,向终端设备返回定位结果,进而缩短了定位所需要的时间。Compared with the prior art, the solution provided by the present invention records multiple signal strengths of the target Wifi and multiple geographical locations of the obtained terminal device when the terminal device performs positioning multiple times after the terminal device is connected to the target Wifi. The plurality of signal strengths include at least a target signal strength, and the plurality of geographic locations include at least a target geographic location, and the target signal strength is a target signal strength of the target Wifi received by the terminal device after the network positioning is performed after the last terminal device accesses the target Wifi. After the target location is the last time the terminal device accesses the target Wifi, the network location is obtained to obtain the target geographic location of the terminal device. When the terminal device performs network positioning after accessing the target Wifi, the current terminal device receives the current target Wifi. When the signal strength is not much different from the target signal strength, the target geographic location is directly used as the current geographic location of the terminal device, and the terminal device is not required to apply for network positioning to the server, and then the server performs positioning, and returns the positioning result to the terminal device, thereby shortening the positioning location. time needed.
本发明实施例还提供了另一更为详细的方法流程,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度、N个地理位置和N个记录时间,所述N个信号强度与所述N个地理位置一一对应,所述N个记录时间与所述N个信号强度一一对应,所述N为大于1的整数,如图2所示,包括:The embodiment of the present invention further provides another more detailed method flow, where the terminal device records the MAC address of the target Wifi, and the N signal strengths, N geographic locations, and N records corresponding to the MAC address of the target Wifi. Time, the N signal strengths are in one-to-one correspondence with the N geographic locations, the N recording times are in one-to-one correspondence with the N signal strengths, and the N is an integer greater than 1, as shown in FIG. ,include:
S201、所述终端设备接入所述目标Wifi。S201. The terminal device accesses the target Wifi.
S202、所述终端设备检测网络定位指令。S202. The terminal device detects a network positioning instruction.
S203、所述终端设备获取当前所述终端设备接收到所述目标Wifi的当前信号强度。S203. The terminal device acquires a current signal strength that the terminal device receives the target Wifi.
S204、所述终端设备确定所述当前信号强度与目标信号强度差值的绝对值是否小于或等于预设阈值,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述N个信号强度包括所述目标信号强度。S204: The terminal device determines whether an absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, where the target signal strength is the last time the terminal device accesses the target Wifi. The terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the N signal strengths include the target signal strength.
若所述当前信号强度与目标信号强度差值的绝对值小于或等于所述预设 阈值,则执行步骤S205。If the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to the preset The threshold is executed in step S205.
若所述当前信号强度与目标信号强度差值的绝对值大于所述预设阈值,则执行步骤S208-S210。If the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, steps S208-S210 are performed.
S205、所述终端设备确定目标记录时间距离当前系统时间是否小于或等于预设时长,所述目标记录时间为记录所述目标信号强度对应的记录时间。S205. The terminal device determines whether the target recording time is less than or equal to a preset duration, and the target recording time is a recording time corresponding to the target signal strength.
若所述目标记录时间距离当前系统时间小于或等于所述预设时长,则执行步骤S206。If the target recording time is less than or equal to the preset time length from the current system time, step S206 is performed.
若所述目标记录时间距离当前系统时间大于所述预设时长,则执行步骤S207。If the target recording time is longer than the preset time length from the current system time, step S207 is performed.
S206、所述终端设备将目标地理位置作为所述终端设备当前地理位置。S206. The terminal device uses a target geographic location as a current geographic location of the terminal device.
S207、所述终端设备重新进行网络定位,以得到所述终端设备当前地理位置。执行完步骤S206执行步骤S209。S207. The terminal device performs network positioning again to obtain a current geographic location of the terminal device. Step S209 is executed after step S206 is performed.
S208、所述终端设备从所述N个信号强度中选取出W个信号强度,以及从所述N个地理位置中选取出所述W个信号强度对应的W个地理位置,所述W为大于1的整数,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个地理位置包括所述目标地理位置。S208. The terminal device selects W signal strengths from the N signal strengths, and selects W geographic locations corresponding to the W signal strengths from the N geographic locations, where the W is greater than An integer of 1, the target geographic location is a geographic location of the terminal device obtained by the terminal device after network access to the target Wifi, and the N geographic locations include the Target location.
S209、所述终端设备根据所述当前信号强度,所述W个信号强度和所述W个地理位置,确定所述终端设备当前地理位置。S209. The terminal device determines, according to the current signal strength, the W signal strengths and the W geographic locations, a current geographic location of the terminal device.
S210、所述终端设备将所述当前信号强度、所述终端设备当前地理位置和所述目标Wifi的MAC地址关联记录。S210. The terminal device records the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
需要说明的是,图2所示的方法的各个步骤的具体实现过程可参见上述方法所述的具体实现过程,在此不再叙述。It should be noted that the specific implementation process of each step of the method shown in FIG. 2 can be referred to the specific implementation process described in the foregoing method, and is not described herein.
本发明实施例还提供了一种终端设备300,如图3所示,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括: The embodiment of the present invention further provides a terminal device 300. As shown in FIG. 3, the terminal device records the MAC address of the target Wifi and the N signal strengths and N geographic locations corresponding to the MAC address of the target Wifi. The N signal strengths are in one-to-one correspondence with the N geographic locations, and the N is a positive integer, including:
Wifi接入模块301,用于接入所述目标Wifi;a Wifi access module 301, configured to access the target Wifi;
信息获取模块302,用于当所述终端设备检测到网络定位指令时,获取当前所述终端设备接收到所述目标Wifi的当前信号强度;The information obtaining module 302 is configured to acquire, when the terminal device detects the network positioning instruction, the current signal strength that the terminal device receives the target Wifi;
定位模块303,用于当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,将目标地理位置作为所述终端设备当前地理位置;The positioning module 303 is configured to use the target geographic location as the current geographic location of the terminal device when the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold.
其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
可选地,所述网络定位指令是所述终端设备在检测到当前界面包含需要地理位置的功能的情况下触发的。Optionally, the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function that requires a geographic location.
可选地,所述网络定位指令是所述终端设备在检测到所述N大于或等于设定值时触发的。Optionally, the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
可选地,若所述N为大于1的整数,所述终端设备还包括:Optionally, if the N is an integer greater than 1, the terminal device further includes:
选取模块304,用于当所述当前信号强度与所述目标信号强度差值的绝对值大于所述预设阈值时,从所述N个信号强度中选取出W个信号强度,以及从所述N个地理位置中选取出所述W个信号强度对应的W个地理位置,所述W为大于1的整数;The selecting module 304 is configured to: when the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, select W signal strengths from the N signal strengths, and from the The W geographic locations corresponding to the W signal strengths are selected from the N geographic locations, and the W is an integer greater than 1.
所述定位模块303,还用于根据所述当前信号强度,所述W个信号强度和所述W个地理位置,确定所述终端设备当前地理位置。The positioning module 303 is further configured to determine a current geographic location of the terminal device according to the current signal strength, the W signal strengths, and the W geographic locations.
可选地,所述终端设备还包括:Optionally, the terminal device further includes:
记录模块305,用于将所述当前信号强度、所述终端设备当前地理位置和所述目标Wifi的MAC地址关联记录。The recording module 305 is configured to record the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
可选地,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个记录时间,所述N个记录时间与所述N个信号强度一一对应,所述定位模块303具体用于:Optionally, the terminal device further records N recording times corresponding to the MAC address of the target Wifi, where the N recording times are in one-to-one correspondence with the N signal strengths, and the positioning module 303 is specifically configured to: :
当所述目标记录时间距离当前系统时间小于或等于预设时长时,所述终端 设备将所述目标地理位置作为所述终端设备当前地理位置,所述目标记录时间为记录所述目标信号强度对应的记录时间。When the target recording time is less than or equal to a preset duration from the current system time, the terminal The device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a recording time corresponding to the target signal strength.
可选地,所述定位模块303,还用于当所述目标记录时间距离当前系统时间大于所述预设时长时,重新进行网络定位,以得到所述终端设备当前地理位置。Optionally, the positioning module 303 is further configured to: when the target recording time is greater than the preset duration, the network positioning is performed to obtain the current geographic location of the terminal device.
可选地,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个接入时长,所述N个接入时长与所述N个信号强度一一对应,所述预设时长是基于所述接入时长确定的。Optionally, the terminal device further records N access durations corresponding to the MAC address of the target Wifi, where the N access durations are in one-to-one correspondence with the N signal strengths, and the preset duration is Determined based on the access duration.
可选地,所述预设时长等于所述N个接入时长中时长最小的接入时长;或者,所述预设时长等于所述N个接入时长中时长最大的接入时长;或者,所述预设时长等于所述N个接入时长的平均接入时长。Optionally, the preset duration is equal to an access duration with a minimum duration of the N access durations; or the preset duration is equal to an access duration of a maximum duration of the N access durations; or The preset duration is equal to an average access duration of the N access durations.
需要说明的是,上述各模块(Wifi接入模块301、信息获取模块302、定位模块303、选取模块304和记录模块305)用于执行上述方法的相关步骤。It should be noted that each of the above modules (the Wifi access module 301, the information obtaining module 302, the positioning module 303, the selecting module 304, and the recording module 305) is used to perform the related steps of the foregoing method.
在本实施例中,终端设备300是以模块的形式来呈现。这里的“模块”可以指特定应用集成电路(application-specific integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。此外,以上Wifi接入模块301、信息获取模块302、定位模块303、选取模块304和记录模块305可通过图4所示的终端设备的处理器401来实现。In the present embodiment, the terminal device 300 is presented in the form of a module. A "module" herein may refer to an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or firmware programs, integrated logic circuits, and/or other devices that provide the above functionality. . In addition, the above Wifi access module 301, the information acquisition module 302, the positioning module 303, the selection module 304, and the recording module 305 can be implemented by the processor 401 of the terminal device shown in FIG.
如图4所示,终端设备400可以以图4中的结构来实现,该终端设备400包括至少一个处理器401,至少一个存储器402以及至少一个通信接口403。所述处理器401、所述存储器402和所述通信接口403通过所述通信总线连接并完成相互间的通信。As shown in FIG. 4, the terminal device 400 can be implemented in the structure of FIG. 4, which includes at least one processor 401, at least one memory 402, and at least one communication interface 403. The processor 401, the memory 402, and the communication interface 403 are connected by the communication bus and complete communication with each other.
处理器401可以是通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制以上方案程序执行的集成电路。The processor 401 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program.
通信接口403,用于与其他设备或通信网络通信,如以太网,无线接入网 (RAN),无线局域网(Wireless Local Area Networks,WLAN)等。 Communication interface 403 for communicating with other devices or communication networks, such as Ethernet, wireless access network (RAN), Wireless Local Area Networks (WLAN), etc.
存储器402可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。The memory 402 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions. The dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this. The memory can exist independently and be connected to the processor via a bus. The memory can also be integrated with the processor.
其中,所述存储器402用于存储执行以上方案的应用程序代码,并由处理器401来控制执行。所述处理器401用于执行所述存储器402中存储的应用程序代码。The memory 402 is used to store application code that executes the above solution, and is controlled by the processor 401 for execution. The processor 401 is configured to execute application code stored in the memory 402.
存储器402存储的代码可执行以上提供的终端设备执行的上述网络定位方法,比如终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括:接入所述目标Wifi;当所述终端设备检测到网络定位指令时,获取当前所述终端设备接收到所述目标Wifi的当前信号强度;当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,将目标地理位置作为所述终端设备当前地理位置;其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The code stored in the memory 402 can perform the above network positioning method performed by the terminal device provided above, such as a MAC address in which the target Wifi is recorded in the terminal device, and N signal strengths and N geographical locations corresponding to the MAC address of the target Wifi. The N signal strengths are in one-to-one correspondence with the N geographic locations, where the N is a positive integer, including: accessing the target Wifi; when the terminal device detects a network positioning instruction, acquiring the current The terminal device receives the current signal strength of the target Wifi; when the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, the target geographic location is used as the current geographic location of the terminal device; The target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is the latest After the terminal device accesses the target Wifi, the terminal device performs network positioning to obtain the location of the terminal device. Position, including the N signal strength of the target signal strength, the location (s) comprising the N target location.
在一个实施例中,终端设备为手机,下面结合图5对手机的各个构成部件 进行具体的介绍:In one embodiment, the terminal device is a mobile phone, and the components of the mobile phone are combined with FIG. 5 below. Carry out a specific introduction:
RF电路510可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器580处理;另外,将设计上行的数据发送给基站。通常,RF电路510包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路510还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 510 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the processor 580. In addition, the uplink data is designed to be sent to the base station. Generally, RF circuit 510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 510 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
存储器520可用于存储软件程序以及模块,处理器580通过运行存储在存储器520的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如Wifi接入功能、获取接收到Wifi的信号强度功能、定位功能、信息记录功能)等;存储数据区可存储根据手机的使用所创建的数据(比如获取接收到Wifi的信号强度、确定的地理位置)等。此外,存储器520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 520 can be used to store software programs and modules, and the processor 580 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 520. The memory 520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a Wifi access function, a signal strength function for acquiring the received Wifi, a positioning function, The information recording function) and the like; the storage data area can store data created according to the use of the mobile phone (such as obtaining the signal strength of the received Wifi, the determined geographical location) and the like. Moreover, memory 520 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
输入单元530可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元530可包括触控面板531、其他输入设备532。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板531上或在触控面板531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转 换成触点坐标,再送给处理器580,并能接收处理器580发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板531。除以了触控面板531,输入单元530还可以包括其他输入设备532。具体地,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的至少一种。The input unit 530 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. Specifically, the input unit 530 can include a touch panel 531 and other input devices 532. The touch panel 531, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 531 or near the touch panel 531. Operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 531 can include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch information from the touch detection device, and turns it The coordinates are replaced by the contacts, and then sent to the processor 580, and the commands sent from the processor 580 can be received and executed. In addition, the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 531, the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include, but are not limited to, a physical keyboard, at least one of a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
显示单元540可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元540可包括显示面板541,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板541。进一步的,触控面板531可覆盖显示面板541,当触控面板531检测到在其上或附近的触摸操作后,传送给处理器580以确定触摸事件的类型,随后处理器580根据触摸事件的类型在显示面板541上提供相应的视觉输出。虽然在图5中,触控面板531与显示面板541是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板531与显示面板541集成而实现手机的输入和输出功能。The display unit 540 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone. The display unit 540 can include a display panel 541. Alternatively, the display panel 541 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 531 can cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, the touch panel 531 transmits to the processor 580 to determine the type of the touch event, and then the processor 580 according to the touch event. The type provides a corresponding visual output on display panel 541. Although the touch panel 531 and the display panel 541 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 5, in some embodiments, the touch panel 531 and the display panel 541 may be integrated. Realize the input and output functions of the phone.
手机还可包括至少一种传感器550,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板541的亮度,接近传感器可在手机移动到耳边时,关闭显示面板541和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one type of sensor 550, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 541 according to the brightness of the ambient light, and the proximity sensor may close the display panel 541 and/or when the mobile phone moves to the ear. Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
音频电路560、扬声器561,传声器562可提供用户与手机之间的音频接口。音频电路560可将接收到的音频数据转换后的电信号,传输到扬声器561,由扬声器561转换为声音信号输出;另一方面,传声器562将收集的声音信号转换为电信号,由音频电路560接收后转换为音频数据,再将音频数据输出处理器580处理后,经RF电路510以发送给比如另一手机,或者将音频数据输 出至存储器520以便进一步处理。 Audio circuit 560, speaker 561, and microphone 562 provide an audio interface between the user and the handset. The audio circuit 560 can transmit the converted electrical data of the received audio data to the speaker 561, and convert it into a sound signal output by the speaker 561. On the other hand, the microphone 562 converts the collected sound signal into an electrical signal, and the audio circuit 560 is used by the audio circuit 560. After receiving, it is converted into audio data, and then processed by the audio data output processor 580, sent to another mobile phone via the RF circuit 510, or the audio data is input. Exit to memory 520 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块570可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块570,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 570, which provides users with wireless broadband Internet access. Although FIG. 5 shows the WiFi module 570, it can be understood that it does not belong to the essential configuration of the mobile phone, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器580是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器520内的软件程序和/或模块,以及调用存储在存储器520内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器580可包括一个或多个处理单元;优选的,处理器580可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器580中。The processor 580 is the control center of the handset, and connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 520, and invoking data stored in the memory 520, executing The phone's various functions and processing data, so that the overall monitoring of the phone. Optionally, the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 580.
手机还包括给各个部件供电的电源590(比如电池),优选的,电源可以通过电源管理系统与处理器580逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The handset also includes a power source 590 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 580 via a power management system to manage functions such as charging, discharging, and power management through the power management system.
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
前述实施例中,各步骤方法流程可以基于图5所示的终端设备的结构实现。In the foregoing embodiment, each step method flow may be implemented based on the structure of the terminal device shown in FIG. 5.
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种网络定位方法的部分或全部步骤。The embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes some or all of the steps of any one of the network positioning methods described in the foregoing method embodiments.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。 It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In addition, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical or otherwise.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing memory includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。One of ordinary skill in the art can understand that all or part of the various methods of the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable In the memory, the memory may include: a flash disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk.
以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上上述,本说明书内容不应理解为对本发明的限制。 The embodiments of the present invention have been described in detail above, and the principles and implementations of the present invention are described in detail herein. The description of the above embodiments is only for helping to understand the method of the present invention and its core ideas; The present invention is not limited by the scope of the present invention, and the present invention is not limited by the scope of the present invention.

Claims (20)

  1. 一种网络定位方法,其特征在于,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括:A network positioning method, characterized in that: a MAC address of a target Wifi and a N signal strength and N geographic locations corresponding to the MAC address of the target Wifi are recorded in the terminal device, the N signal strengths and the N geographical locations correspond one-to-one, and the N is a positive integer, including:
    所述终端设备接入所述目标Wifi;The terminal device accesses the target Wifi;
    当所述终端设备检测到网络定位指令时,所述终端设备获取当前所述终端设备接收到所述目标Wifi的当前信号强度;When the terminal device detects the network positioning instruction, the terminal device acquires a current signal strength that the terminal device currently receives the target Wifi;
    当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,所述终端设备将目标地理位置作为所述终端设备当前地理位置;When the absolute value of the difference between the current signal strength and the target signal strength is less than or equal to a preset threshold, the terminal device uses the target geographic location as the current geographic location of the terminal device;
    其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The target signal strength is that after the terminal device accesses the target Wifi, the terminal device receives the signal strength of the target Wifi when the terminal device performs network positioning, and the target geographic location is The geographic location of the terminal device obtained by the terminal device after the terminal device accesses the target Wifi, the N signal strengths including the target signal strength, and the N geographic locations. Including the target geographic location.
  2. 根据权利要求1所述的方法,其特征在于,所述网络定位指令是所述终端设备在检测到当前界面包含需要地理位置的功能的情况下触发的。The method according to claim 1, wherein the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function requiring a geographic location.
  3. 根据权利要求1所述的方法,其特征在于,所述网络定位指令是所述终端设备在检测到所述N大于或等于设定值时触发的。The method according to claim 1, wherein the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,若所述N为大于1的整数,所述方法还包括:The method according to any one of claims 1-3, wherein if the N is an integer greater than 1, the method further comprises:
    当所述当前信号强度与所述目标信号强度差值的绝对值大于所述预设阈值时,所述终端设备从所述N个信号强度中选取出W个信号强度,以及从所述N个地理位置中选取出所述W个信号强度对应的W个地理位置,所述W为大于1的整数;When the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, the terminal device selects W signal strengths from the N signal strengths, and from the N The W geographic locations corresponding to the W signal strengths are selected in the geographic location, and the W is an integer greater than 1.
    所述终端设备根据所述当前信号强度,所述W个信号强度和所述W个地理位置,确定所述终端设备当前地理位置。The terminal device determines the current geographic location of the terminal device according to the current signal strength, the W signal strengths, and the W geographic locations.
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括: The method of claim 4, wherein the method further comprises:
    所述终端设备将所述当前信号强度、所述终端设备当前地理位置和所述目标Wifi的MAC地址关联记录。The terminal device records the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个记录时间,所述N个记录时间与所述N个信号强度一一对应,所述终端设备将所述目标地理位置作为所述终端设备当前地理位置,包括:The method according to any one of claims 1-5, wherein the terminal device further records N recording times corresponding to the MAC address of the target Wifi, the N recording times and the N The signal strength is in one-to-one correspondence, and the terminal device uses the target geographic location as the current geographic location of the terminal device, including:
    当所述目标记录时间距离当前系统时间小于或等于预设时长时,所述终端设备将所述目标地理位置作为所述终端设备当前地理位置,所述目标记录时间为记录所述目标信号强度对应的记录时间。When the target recording time is less than or equal to the preset time length, the terminal device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a record corresponding to the target signal strength. Recording time.
  7. 根据权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises:
    当所述目标记录时间距离当前系统时间大于所述预设时长时,所述终端设备重新进行网络定位,以得到所述终端设备当前地理位置。When the target recording time is longer than the preset duration, the terminal device performs network positioning again to obtain the current geographic location of the terminal device.
  8. 根据权利要求6或7所述的方法,其特征在于,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个接入时长,所述N个接入时长与所述N个信号强度一一对应,所述预设时长是基于所述接入时长确定的。The method according to claim 6 or 7, wherein the terminal device further records N access durations corresponding to the MAC address of the target Wifi, the N access durations and the N signals The intensity is one-to-one correspondence, and the preset duration is determined based on the access duration.
  9. 根据权利要求8所述的方法,其特征在于,所述预设时长等于所述N个接入时长中时长最小的接入时长;或者,所述预设时长等于所述N个接入时长中时长最大的接入时长;或者,所述预设时长等于所述N个接入时长的平均接入时长。The method according to claim 8, wherein the preset duration is equal to the minimum duration of the N access durations; or the preset duration is equal to the N access durations. The maximum access duration of the duration; or the preset duration is equal to the average access duration of the N access durations.
  10. 一种终端设备,其特征在于,终端设备中记录有目标Wifi的MAC地址、以及所述目标Wifi的MAC地址对应的N个信号强度和N个地理位置,所述N个信号强度与所述N个地理位置一一对应,所述N为正整数,包括:A terminal device, wherein a MAC address of a target Wifi and a N signal strength corresponding to a MAC address of the target Wifi and N geographic locations, the N signal strengths and the N are recorded in the terminal device One geographical position corresponds to one, and the N is a positive integer, including:
    Wifi接入模块,用于接入所述目标Wifi;a Wifi access module, configured to access the target Wifi;
    信息获取模块,用于当所述终端设备检测到网络定位指令时,获取当前所述终端设备接收到所述目标Wifi的当前信号强度;An information acquiring module, configured to acquire, when the terminal device detects a network positioning instruction, a current signal strength that the current terminal device receives the target Wifi;
    定位模块,用于当所述当前信号强度与目标信号强度差值的绝对值小于或等于预设阈值时,将目标地理位置作为所述终端设备当前地理位置;a positioning module, configured to use a target geographic location as a current geographic location of the terminal device when an absolute value of a difference between the current signal strength and the target signal strength is less than or equal to a preset threshold;
    其中,所述目标信号强度为最近一次所述终端设备接入所述目标Wifi后, 所述终端设备进行网络定位时所述终端设备接收到所述目标Wifi的信号强度,所述目标地理位置为最近一次所述终端设备接入所述目标Wifi后,所述终端设备进行网络定位得到的所述终端设备的地理位置,所述N个信号强度包括所述目标信号强度,所述N个地理位置包括所述目标地理位置。The target signal strength is the last time the terminal device accesses the target Wifi. When the terminal device performs network positioning, the terminal device receives the signal strength of the target Wifi, and the target geographic location is that after the terminal device accesses the target Wifi, the terminal device performs network positioning. The geographic location of the terminal device, the N signal strengths include the target signal strength, and the N geographic locations include the target geographic location.
  11. 根据权利要求10所述的终端设备,其特征在于,所述网络定位指令是所述终端设备在检测到当前界面包含需要地理位置的功能的情况下触发的。The terminal device according to claim 10, wherein the network positioning instruction is that the terminal device triggers when detecting that the current interface includes a function requiring a geographical location.
  12. 根据权利要求10所述的终端设备,其特征在于,所述网络定位指令是所述终端设备在检测到所述N大于或等于设定值时触发的。The terminal device according to claim 10, wherein the network positioning instruction is triggered by the terminal device when detecting that the N is greater than or equal to a set value.
  13. 根据权利要求10-12任一项所述的终端设备,其特征在于,若所述N为大于1的整数,所述终端设备还包括:The terminal device according to any one of claims 10 to 12, wherein, if the N is an integer greater than 1, the terminal device further includes:
    选取模块,用于当所述当前信号强度与所述目标信号强度差值的绝对值大于所述预设阈值时,从所述N个信号强度中选取出W个信号强度,以及从所述N个地理位置中选取出所述W个信号强度对应的W个地理位置,所述W为大于1的整数;And a selecting module, configured to: when the absolute value of the difference between the current signal strength and the target signal strength is greater than the preset threshold, select W signal strengths from the N signal strengths, and from the N The W geographic locations corresponding to the W signal strengths are selected from the geographic locations, and the W is an integer greater than 1.
    所述定位模块,还用于根据所述当前信号强度,所述W个信号强度和所述W个地理位置,确定所述终端设备当前地理位置。The positioning module is further configured to determine a current geographic location of the terminal device according to the current signal strength, the W signal strengths, and the W geographic locations.
  14. 根据权利要求13所述的终端设备,其特征在于,所述终端设备还包括:The terminal device according to claim 13, wherein the terminal device further comprises:
    记录模块,用于将所述当前信号强度、所述终端设备当前地理位置和所述目标Wifi的MAC地址关联记录。And a recording module, configured to record the current signal strength, the current geographic location of the terminal device, and the MAC address of the target Wifi.
  15. 根据权利要求10-14任一项所述的终端设备,其特征在于,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个记录时间,所述N个记录时间与所述N个信号强度一一对应,所述定位模块具体用于:The terminal device according to any one of claims 10 to 14, wherein the terminal device further records N recording times corresponding to the MAC address of the target Wifi, the N recording times and the N The signal strengths are in one-to-one correspondence, and the positioning module is specifically configured to:
    当所述目标记录时间距离当前系统时间小于或等于预设时长时,所述终端设备将所述目标地理位置作为所述终端设备当前地理位置,所述目标记录时间为记录所述目标信号强度对应的记录时间。When the target recording time is less than or equal to the preset time length, the terminal device uses the target geographic location as the current geographic location of the terminal device, and the target recording time is a record corresponding to the target signal strength. Recording time.
  16. 根据权利要求15所述的终端设备,其特征在于,The terminal device according to claim 15, wherein
    所述定位模块,还用于当所述目标记录时间距离当前系统时间大于所述预 设时长时,重新进行网络定位,以得到所述终端设备当前地理位置。The positioning module is further configured to: when the target recording time is greater than the current system time, the pre-predetermined time When the duration is set, network positioning is performed again to obtain the current geographic location of the terminal device.
  17. 根据权利要求10-16任一项所述的终端设备,其特征在于,所述终端设备还记录有所述目标Wifi的MAC地址对应的N个接入时长,所述N个接入时长与所述N个信号强度一一对应,所述预设时长是基于所述接入时长确定的。The terminal device according to any one of claims 10 to 16, wherein the terminal device further records N access durations corresponding to the MAC address of the target Wifi, and the N access durations and locations The N signal strengths are in one-to-one correspondence, and the preset duration is determined based on the access duration.
  18. 根据权利要求17所述的终端设备,其特征在于,所述预设时长等于所述N个接入时长中时长最小的接入时长;或者,所述预设时长等于所述N个接入时长中时长最大的接入时长;或者,所述预设时长等于所述N个接入时长的平均接入时长。The terminal device according to claim 17, wherein the preset duration is equal to an access duration with a minimum duration of the N access durations; or the preset duration is equal to the N access durations The maximum duration of the access time of the medium duration; or the preset duration is equal to the average access duration of the N access durations.
  19. 一种终端设备,其特征在于,包括:A terminal device, comprising:
    存储有可执行程序代码的存储器;a memory storing executable program code;
    与所述存储器耦合的处理器;a processor coupled to the memory;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行如权利要求1~权利要求9任一项所述的网络定位方法。The processor calls the executable program code stored in the memory to execute the network positioning method according to any one of claims 1 to 9.
  20. 一种计算机可读存储介质,其特征在于,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。 A computer readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method of any one of claims 1-9.
PCT/CN2017/105104 2016-12-07 2017-09-30 Network positioning method and terminal device WO2018103441A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611118615.XA CN106714103B (en) 2016-12-07 2016-12-07 A kind of network locating method and terminal device
CN201611118615.X 2016-12-07

Publications (1)

Publication Number Publication Date
WO2018103441A1 true WO2018103441A1 (en) 2018-06-14

Family

ID=58936203

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105104 WO2018103441A1 (en) 2016-12-07 2017-09-30 Network positioning method and terminal device

Country Status (2)

Country Link
CN (1) CN106714103B (en)
WO (1) WO2018103441A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111954198A (en) * 2020-07-22 2020-11-17 深圳市微能信息科技有限公司 Intelligent device searching method and device and charging seat
CN111999724A (en) * 2020-09-09 2020-11-27 阳光电源股份有限公司 Method, system and equipment for automatically identifying equipment position in photovoltaic system
CN112468958A (en) * 2020-11-23 2021-03-09 北京元心科技有限公司 Region determination method and device, electronic equipment and computer readable storage medium
CN113472611A (en) * 2021-07-26 2021-10-01 东莞市金锐显数码科技有限公司 Method and device for acquiring WiFi signal strength and readable storage medium
CN114531649A (en) * 2022-02-15 2022-05-24 深圳欧思微电子技术有限公司 Method, device, terminal and storage medium for positioning signal source position

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106714103B (en) * 2016-12-07 2019-09-27 Oppo广东移动通信有限公司 A kind of network locating method and terminal device
CN110320544B (en) * 2018-03-30 2022-03-01 北京百度网讯科技有限公司 Method, device, equipment and storage medium for identifying position of terminal equipment
CN112383823B (en) * 2020-10-16 2023-04-07 北京奇艺世纪科技有限公司 Code rate self-adaption method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120170560A1 (en) * 2011-01-05 2012-07-05 Kaist METHOD OF ESTIMATING LOCATION OF MOBILE DEVICE IN TRANSPORTATION USING WiFi
CN104768127A (en) * 2014-01-07 2015-07-08 中兴通讯股份有限公司 Positioning method, device and server
CN105263118A (en) * 2015-10-31 2016-01-20 广东欧珀移动通信有限公司 Positioning method of user terminal and user terminal
CN106714103A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Network location method and terminal equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9773020B2 (en) * 2001-07-05 2017-09-26 NEXRF Corp. System and method for map based exploration
CN103533635A (en) * 2012-07-03 2014-01-22 希姆通信息技术(上海)有限公司 Mobile terminal positioning method and mobile terminal
CN104427609A (en) * 2013-08-27 2015-03-18 中国电信集团公司 Positioning method and system
CN105100292B (en) * 2014-05-12 2018-12-18 阿里巴巴集团控股有限公司 Determine the method and device of the position of terminal
CN110012425B (en) * 2016-05-05 2020-11-06 广东小天才科技有限公司 User reminding method and user terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120170560A1 (en) * 2011-01-05 2012-07-05 Kaist METHOD OF ESTIMATING LOCATION OF MOBILE DEVICE IN TRANSPORTATION USING WiFi
CN104768127A (en) * 2014-01-07 2015-07-08 中兴通讯股份有限公司 Positioning method, device and server
CN105263118A (en) * 2015-10-31 2016-01-20 广东欧珀移动通信有限公司 Positioning method of user terminal and user terminal
CN106714103A (en) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 Network location method and terminal equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111954198A (en) * 2020-07-22 2020-11-17 深圳市微能信息科技有限公司 Intelligent device searching method and device and charging seat
CN111954198B (en) * 2020-07-22 2024-02-02 深圳市微能信息科技有限公司 Intelligent equipment searching method and device and charging seat
CN111999724A (en) * 2020-09-09 2020-11-27 阳光电源股份有限公司 Method, system and equipment for automatically identifying equipment position in photovoltaic system
CN111999724B (en) * 2020-09-09 2024-04-30 合肥零碳技术有限公司 Method, system and equipment for automatically identifying equipment position in photovoltaic system
CN112468958A (en) * 2020-11-23 2021-03-09 北京元心科技有限公司 Region determination method and device, electronic equipment and computer readable storage medium
CN112468958B (en) * 2020-11-23 2023-02-24 北京元心科技有限公司 Region determination method and device, electronic equipment and computer readable storage medium
CN113472611A (en) * 2021-07-26 2021-10-01 东莞市金锐显数码科技有限公司 Method and device for acquiring WiFi signal strength and readable storage medium
CN114531649A (en) * 2022-02-15 2022-05-24 深圳欧思微电子技术有限公司 Method, device, terminal and storage medium for positioning signal source position

Also Published As

Publication number Publication date
CN106714103B (en) 2019-09-27
CN106714103A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2018103441A1 (en) Network positioning method and terminal device
US10649720B2 (en) Sound effect configuration method and system and related device
WO2018103443A1 (en) Network positioning method and terminal device
US11625144B2 (en) Method for displaying different application shortcuts on different screens
US10813058B2 (en) Method for processing information and terminal device
WO2018103492A1 (en) Method for setting wifi roaming, and terminal device
CN106604314B (en) WiFi roaming network access method and terminal equipment
CN108834132B (en) Data transmission method and equipment and related medium product
US10687207B2 (en) Method for data migration and terminal
WO2018049903A1 (en) Data migration method and related devices
WO2018049904A1 (en) Data migration method and related devices
WO2018049905A1 (en) Data migration method and related devices
CN104809055B (en) Application program testing method and device based on cloud platform
WO2018049901A1 (en) Data migration method and related devices
CN110140366B (en) Long short message sending method and terminal
WO2018103440A1 (en) Network positioning method and terminal device
CN110602766B (en) Personal hotspot identification method and method for determining association relationship between terminals
CN110209434B (en) Memory management method and device and computer readable storage medium
CN109041212B (en) Positioning method and wearable device
CN108966290B (en) Network connection method and related product
CN106535229B (en) WiFi signal receiving sensitivity testing method and mobile terminal
WO2021232814A1 (en) Cell measurement method based on frequency point optimization, and terminal device
WO2018103442A1 (en) Information processing method and terminal device
CN107204882B (en) Method and equipment for filtering data packet and mobile terminal
EP3496504A1 (en) Data migration method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17878537

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17878537

Country of ref document: EP

Kind code of ref document: A1