WO2018157529A1 - Positioning method and device - Google Patents

Positioning method and device Download PDF

Info

Publication number
WO2018157529A1
WO2018157529A1 PCT/CN2017/090645 CN2017090645W WO2018157529A1 WO 2018157529 A1 WO2018157529 A1 WO 2018157529A1 CN 2017090645 W CN2017090645 W CN 2017090645W WO 2018157529 A1 WO2018157529 A1 WO 2018157529A1
Authority
WO
WIPO (PCT)
Prior art keywords
sta
mac address
time
message
aps
Prior art date
Application number
PCT/CN2017/090645
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 华为技术有限公司
Priority to CN201780068509.1A priority Critical patent/CN109906622B/en
Publication of WO2018157529A1 publication Critical patent/WO2018157529A1/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

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a positioning method and device.
  • WiFi Wireless Fidelity
  • AP access point
  • STAs stations
  • the STA can use the Fine Time Measurement (FTM) technology to perform information interaction with at least three APs through the WiFi network to achieve positioning.
  • FTM Fine Time Measurement
  • an AP is used as an example to describe the interaction process between the STA and the AP.
  • the AP sends a first measurement message to the STA at time t1, and the STA receives the first measurement message at time t2 and feeds back the acknowledgement message to the AP at time t3.
  • the AP After receiving the acknowledgement message at time t4, the AP sends a second measurement message carrying the time t1 and time t4 to the STA.
  • the STA may calculate the location of the STA according to the coordinate information of the AP and the at least three time groups, where each time group includes information transmission when interacting with at least three AP information.
  • Time (such as time t1, time t2, time t3, and time t4).
  • the STA after successfully receiving the first measurement message at time t2, the STA sends an acknowledgement message to the AP after a randomly set time period. In this way, the AP cannot obtain the correct time difference between the time t2 and the time t3, so that the correct position of the STA cannot be obtained.
  • the STA since the STA sends an acknowledgment message to the AP after a randomly set time period, it needs to adjust its own time (ie, increase the random number); therefore, the prior art solution needs to change the existing device on the WiFi chip.
  • the design is modified to the underlying processing mechanism, adding additional processing functions; and the added processing function can only be implemented on new devices, and the design of many existing old device WiFi chips cannot be modified, so existing The technical approach lacks versatility.
  • the present application provides a positioning method and device, which can realize the positioning function without changing the design of the WiFi chip, and avoid the problem of the location leakage of the STA.
  • a first aspect of the present application provides a positioning method, including: an STA interacting with at least three AP information to obtain transmission time information corresponding to each AP; and the STA according to transmission time information corresponding to at least three APs and at least three APs The location information, calculate the location of the STA.
  • STA and The media access control (MAC) addresses used by the at least three APs are different from each other; the transmission time information corresponding to each AP includes the time when the AP sends the first measurement message, and the STA receives the first measurement message. Time, the time at which the STA sends the first acknowledgment message, and the time at which the AP receives the first acknowledgment message.
  • the STA may interact with at least three APs to calculate the location of the STA and implement the positioning function. Moreover, since the STA uses different MAC addresses when interacting with each AP, the AP calculates the STA. In the position, the obtained multiple equations are from STAs with different MAC addresses, so the AP does not know which three equations belong to the same STA, and the AP cannot calculate the position of the STA, thus avoiding without changing the WiFi chip design. The issue of STA's location privacy leaks.
  • the present application may further include: the STA receiving the location information respectively sent by the at least three APs.
  • the STA can receive the WiFi message sent by each AP, where the WiFi message carries the location information of each AP.
  • the STA can also obtain the query by using the database stored in the memory; or, the STA can receive the location information of at least two APs (the one AP of the at least two APs) sent by the AP.
  • the first AP is any one of the at least three APs, and “the STA interacts with the first AP information.
  • the method for obtaining the transmission time information corresponding to the first AP may include: the STA receiving the first measurement message sent by the first AP, and acquiring the first time, where the first measurement message carries the first MAC address and the first AP The first time is the time when the STA receives the first measurement message; the STA sends the first acknowledgment message to the first AP at the second time by using the first MAC address, where the first acknowledgment message carries the first MAC address and The address of the first AP; the STA receives the second measurement message sent by the first AP, where the second measurement message carries the second MAC address and the address of the first AP, and the third moment and the fourth moment, where the third moment is a moment when the AP sends the first measurement message, where the fourth time is
  • the STA can use at least one MAC address when interacting with each AP information, when the AP calculates the location of the STA, the obtained multiple equations are from STAs of different MAC addresses, so the AP does not know which three equations. If the AP belongs to the same STA, the AP cannot calculate the location of the STA, thus avoiding the problem of STA location privacy leakage.
  • the first MAC address is the same as the second MAC address; or the first MAC address is different from the second MAC address.
  • the STA may use one MAC address or multiple MAC addresses when interacting with an AP.
  • the first AP is any one of the at least three APs, and the foregoing “STA receives the first AP.
  • the method of the present application may further include: the STA sends the first AP with the third MAC address and carries at least one MAC address and A request message of an address of the first AP, where the at least one MAC address includes a third MAC address.
  • the first MAC address, the second MAC address, and the third MAC address are all the same; or the first MAC address is the same as the second MAC address, the second MAC address is different from the third MAC address; or the first MAC address is The third MAC address is the same, the second MAC address is different from the third MAC address; or the first MAC address is different from the second MAC address, the second MAC address is the same as the third MAC address; or the first MAC address, the second The MAC address is different from the third MAC address.
  • the present application may further include: the STA generates a MAC address list, where the MAC address list includes at least three MAC addresses.
  • the method for the STA to interact with the at least three APs to obtain the transmission time information corresponding to each AP may include: the STA uses the MAC address in the MAC address list and each AP in sequence according to the MAC address list. Information exchange, obtaining transmission time information corresponding to each AP.
  • the STA can use the MAC address list to save multiple MAC addresses to facilitate the STA to use when interacting with the AP information.
  • an STA including: an obtaining module and a calculating module.
  • the acquiring module is configured to exchange information with the AP and the at least three APs, and obtain the transmission time information corresponding to each AP, where the MAC addresses used by the STA to interact with the at least three APs are different from each other, and each AP corresponds to
  • the transmission time information includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message.
  • a calculation module configured to calculate a location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  • the STA in this application may further include: a receiving module.
  • the receiving module is configured to receive the location information sent by the at least three APs before the calculating module calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  • the first AP is any one of the at least three APs
  • the acquiring module may specifically include : receiving unit, acquiring unit, and transmitting unit.
  • the receiving unit is configured to receive the first measurement message sent by the first AP, where the first measurement message carries the first MAC address and the address of the first AP.
  • an acquiring unit configured to acquire a first moment, where the STA is the moment when the STA receives the first measurement message.
  • the sending unit is configured to send, by using the first MAC address, the first acknowledgment message to the first AP at the second moment, where the first acknowledgment message carries the first MAC address and the address of the first AP.
  • the receiving unit is further configured to receive the second measurement message sent by the first AP, where the second measurement message carries the second MAC address and the address of the first AP, and the third time and the fourth time, where the third time is the first The moment when the AP sends the first measurement message, where the fourth time is the time when the first AP receives the first confirmation message.
  • the sending unit is further configured to send, by using the second MAC address, a second acknowledgment message to the first AP, where the second acknowledgment message carries the second MAC address and the address of the first AP.
  • the first MAC address is the same as the second MAC address; or the first MAC address is different from the second MAC address.
  • the sending unit may be further configured to: before the receiving unit receives the first measurement message sent by the first AP, adopt a third The MAC address sends a request message carrying the at least one MAC address and the address of the first AP to the first AP, where the at least one MAC address includes the third MAC address.
  • the STA in the present application may further include: a generating module.
  • the generating module is configured to generate a MAC address list, where the MAC address list includes at least three MAC addresses, before the acquiring module interacts with the at least three APs to obtain the transmission time information corresponding to each AP.
  • the obtaining module may be configured to: use the MAC address in the MAC address list to interact with each AP information in sequence according to the MAC address list, and obtain transmission time information corresponding to each AP.
  • a STA is provided, and the STA may include: a processor, a memory, and a communication interface.
  • the memory is used to store computer execution instructions, and the processor, the communication interface and the memory are connected by a bus.
  • the processor executes the memory storage computer to execute the instructions, so that the STA performs the first aspect and the first aspect.
  • a fourth aspect of the present application provides a computer storage medium having stored therein one or more program codes, when the processor of the STA in the third aspect executes the program code, the STA performs the first aspect as And the positioning method described in various alternatives of the first aspect.
  • a computer program product which, when run on a computer, causes the computer to perform the positioning method as described in the first aspect and the various alternative aspects of the first aspect.
  • FIG. 1 is a schematic diagram of a network architecture of a WiFi network according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram 1 of a STA according to an embodiment of the present invention.
  • FIG. 3 is a flowchart 1 of a positioning method according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart 2 of a positioning method according to an embodiment of the present invention.
  • FIG. 5 is a third flowchart of a positioning method according to an embodiment of the present invention.
  • FIG. 6 is a flowchart 4 of a positioning method according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram 2 of a STA according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram 3 of a STA according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram 4 of a STA according to an embodiment of the present invention.
  • first and second and the like in the specification and claims of the embodiments of the present invention are used to distinguish different objects, and are not intended to describe a specific order of the objects.
  • first AP and the second AP, etc. are used to distinguish different APs, rather than to describe a specific order of devices.
  • the meaning of "a plurality" is two or more unless otherwise specified.
  • the words “exemplary” or “such as” are used to mean an example, illustration, or illustration. Any embodiment or design described as “exemplary” or “for example” in the embodiments of the invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words “exemplary” or “such as” is intended to present the concepts in a particular manner.
  • the locating method and device provided by the embodiments of the present invention may be applied to the process of implementing STA positioning, and may be applied to the process of STA and AP information interaction and calculating the location of the STA.
  • FIG. 1 is a schematic diagram of a network architecture of a WiFi network according to an embodiment of the present invention.
  • the WiFi network includes: STA 10 and at least three APs (such as AP 21, AP 22, and AP 23).
  • the STA 10 and the at least three APs are in communication, and the STA 10 can perform information exchange with at least three APs.
  • the MAC address used by the STA to interact with each AP does not interact with each other. the same.
  • the STA 10 can perform information exchange with the AP 21 by using the MAC address 1 and the STA 10 can perform information exchange with the AP 22 by using the MAC address 2, and the STA 10 can perform information interaction with the AP 23 by using the MAC address 3.
  • the STA 10 in the embodiment of the present invention may be an electronic terminal installed with a WiFi module, and the electronic terminal may perform information interaction with at least three APs through the WiFi network.
  • the electronic terminal can be a mobile phone, a personal computer (PC), a handheld device, a pad, and the like.
  • the at least three APs in the embodiment of the present invention are not limited to a conventional access point, and the AP in the embodiment of the present invention may be any communication device having an access point function, and the at least three APs may pass through the WiFi network and the STA. 10 for data interaction.
  • the at least three APs may be WiFi routers
  • the STA 10 may be a user terminal such as a mobile phone or a computer; when the user terminal such as a mobile phone or a computer is set to the WiFi hotspot mode to provide a WiFi network to other terminals, the mobile phone or the computer
  • the user terminal is the at least three APs in the embodiment of the present invention, and the other terminals connected to the WiFi network provided by the at least three APs may be the STA 10.
  • At least three APs in the embodiment of the present invention may be user terminals such as a mobile phone or a computer, and the STA 10 may be a wearable device connected to a user terminal such as a mobile phone or a computer.
  • the STA 10 in the embodiment of the present invention may include a processor 100, a memory 101, and a communication interface 102.
  • the processor 100, the memory 101, and the communication interface 102 pass through the bus 103. Connected to each other.
  • the processor 100 is a control center of the STA 10, and may be a processor or a collective name of multiple processing elements.
  • the processor 100 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated systems configured to implement the embodiments of the present invention.
  • the circuit for example: one or more microprocessors, or one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
  • the STA 10 may include one or more processors 100, ie, the STA 10 may include a multi-core processor.
  • the processor 100 can be configured to interact with at least three APs via the communication interface 102 using different MAC addresses.
  • the memory 101 can be used to store at least one of operational data/information or software modules in the STA 10.
  • the memory 101 can be used to store the first measurement message provided by the embodiment of the present invention.
  • Communication interface 102 is a channel for data and information transmission.
  • the communication interface 102 can be used to transmit a first acknowledgment message in an embodiment of the present invention.
  • the bus 103 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the above bus 103 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 2, but it does not mean that there is only one bus or one type of bus.
  • the embodiment of the present invention provides an interaction between the STA 10 and at least three APs (such as the AP 21, the AP 22, and the AP 23) in the WiFi network shown in FIG. 1 and the modules or components of the STA 10 in FIG.
  • a positioning method is described in detail for the interaction process between STA 10 and at least three APs in the system shown in FIG. 1.
  • the positioning method may include S301 and S302:
  • the STA interacts with the at least three APs to obtain transmission time information corresponding to each AP.
  • the processor 100 in the STA can perform information exchange with at least three APs through the communication interface 102 to obtain transmission time information corresponding to each AP, and the processor 100 and the at least three The MAC addresses used by each AP in the AP are different from each other.
  • the transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message.
  • the processor 100 in the STA may use the MAC address 1 to interact with the first AP information through the communication interface 102, and obtain the transmission time information corresponding to the first AP, where the transmission time information corresponding to the first AP includes the first AP sending.
  • the transmission time information corresponding to the second AP includes the time when the second AP sends the first measurement message, and the STA receives the second AP.
  • the processor 100 may use the MAC address 3 to interact with the third AP information through the communication interface 102, and obtain the transmission time information corresponding to the third AP, and the transmission time information corresponding to the third AP. The moment when the third AP sends the first measurement message, the time when the STA receives the first measurement message sent by the third AP, the time when the STA sends the first acknowledgement message to the third AP, and the time when the third AP receives the first acknowledgement message.
  • the method for the STA to interact with the information of the AP is the same.
  • the method for the interaction between the STA and the AP is described in detail.
  • the STA uses the MAC address 1 to interact with the first AP information, and the method for obtaining the transmission time information corresponding to the first AP may be as described in S401-408.
  • the MAC address 1, the MAC address 2, and the MAC address 3 are used to represent different MAC addresses, and the MAC address is used.
  • 1 may be only the first MAC address, may be the first MAC and the second MAC address, may also be the first MAC and the third MAC address, and the like.
  • FIG. 4 shows a method for an STA to interact with a first AP information according to an embodiment of the present invention, where the method includes S401-S408:
  • the STA sends a request message to the first AP by using a third MAC address.
  • the request message carries at least one MAC address and an address of the first AP, and the at least one MAC address includes a third MAC address.
  • the processor 100 in the STA may send a request message to the first AP through the communication interface 102 using the third MAC address in the pre-generated MAC address list.
  • the processor 100 fills in the sending address of the STA as the third MAC address, and fills in the receiving address of the STA as the address of the first AP.
  • the first AP receives the request message, and sends a first measurement message to the STA.
  • the first measurement message carries a first MAC address and an address of the first AP, where the first MAC address is any one of the at least one MAC address.
  • the first measurement message is used to instruct the STA to acquire the first moment of information transmission when interacting with the first AP information.
  • the first AP after receiving the request message, the first AP sends a first measurement message to the STA at a third time (such as time T 31 ).
  • a third time such as time T 31 .
  • the first AP sends the address of the first AP as the address of the first AP, and the first AP receives the first MAC address as the first MAC address.
  • the three MAC addresses are the same, and may also be different from the third MAC address.
  • the STA receives the first measurement message sent by the first AP, and acquires the first time.
  • the first moment is a moment when the STA receives the first measurement message.
  • the processor 100 of the STA receives at time T 11 via a first communication interface 102 to a first message sent by the AP measurement, the first time is acquired as the time T 11.
  • the STA sends the first acknowledgement message to the first AP by using the first MAC address at the second moment.
  • the first acknowledgement message carries the first MAC address and the address of the first AP.
  • the processor 100 in the STA After receiving the first measurement message, the processor 100 in the STA sends the first MAC address and the address of the first AP carried in the first measurement message to the first AP through the communication interface 102 at the second moment.
  • the first acknowledgment message that is, the processor 100 uses the first MAC address as the sending address of the STA, the address of the first AP as the receiving address of the STA, and the first acknowledgment message to the first AP through the communication interface 102 at the second moment.
  • the processor 100 of the STA received via communications interface 102 to the first measurement message at time T 11, T 21 and the time a first acknowledgment message to the AP by transmitting a first communication interface 102, the acquired second The moment is T 21 .
  • the first AP receives the first acknowledgement message, and sends a second measurement message to the STA.
  • the second measurement message carries the second MAC address and the address of the first AP, and the third time and the fourth time.
  • the second MAC address is any one of the at least one MAC address
  • the third time is the first time. The moment when the AP sends the first measurement message, where the fourth time is the time when the first AP receives the first confirmation message.
  • the first AP after receiving the first acknowledgment message, sending a second measurement message carries a third time and the fourth time in the fourth time to the STA (e.g., time T 41).
  • the first AP fills in the address of the first AP as the address of the first AP, and fills the receiving address of the first AP into the second MAC address, where the second MAC address can be A MAC address is the same, and can also be different from the first MAC address.
  • the STA receives the second measurement message sent by the first AP.
  • the processor 100 in the STA receives the second measurement message through the communication interface 102, and acquires the third time and the fourth time according to the second measurement message.
  • the STA sends a second acknowledgement message to the first AP by using the second MAC address.
  • the second acknowledgement message carries the second MAC address and the address of the first AP.
  • the processor 100 in the STA After receiving the second measurement message, the processor 100 in the STA sends a second acknowledgement message to the first AP through the communication interface 102 according to the second MAC address carried in the second measurement message and the address of the first AP, that is, the processing
  • the device 100 sends the second acknowledgement message to the first AP through the communication interface 102 by using the second MAC address as the sending address of the STA and the address of the first AP as the receiving address of the STA.
  • the first MAC address, the second MAC address, and the third MAC address of the at least one MAC address are the same; or the first MAC address is the same as the second MAC address, and the second MAC address is the same. Different from the third MAC address; or the first MAC address is the same as the third MAC address, the second MAC address is different from the third MAC address; or the first MAC address is different from the second MAC address, the second MAC address is different The three MAC addresses are the same; or, the first MAC address, the second MAC address, and the third MAC address are different from each other.
  • MAC addresses such as a first MAC address, a second MAC address, and a third MAC address
  • Table 1 an example of a partial correspondence between MAC addresses (such as a first MAC address, a second MAC address, and a third MAC address) included in at least one MAC address provided by an embodiment of the present invention is shown.
  • the content listed in the foregoing Table 1 is a partial correspondence between the first MAC address, the second MAC address, and the third MAC address, and may further include other correspondences, which are not enumerated in the embodiments of the present invention.
  • the MAC addresses are the same, and when the numbers corresponding to the MAC addresses are different, the MAC addresses are different.
  • the first MAC address, the second MAC address, and the third MAC address all correspond to the number “1”, indicating that the first MAC address, the second MAC address, and the third MAC address are the same; the first MAC address and the second MAC address.
  • the address corresponds to the number "1”
  • the third MAC address corresponds to the number "2”, indicating that the first MAC address and the second MAC address are the same, and the second MAC address is different from the third MAC address.
  • the foregoing embodiment of the present invention may also use other identifiers to represent the foregoing MAC address, which are not enumerated in the embodiments of the present invention.
  • the first AP receives the second acknowledgement message.
  • the STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  • the STA may obtain location information of each AP by receiving information sent by each AP, where the location information includes location coordinates of each AP.
  • the processor 100 in the STA interacts with each AP information through the communication interface 102, the time of information transmission when interacting with each AP information is obtained, that is, the processor 100 can obtain at least three groups of “interacting with the AP information.
  • the time of information transmission the processor 100 may calculate the location of the STA according to the position information of at least three APs and at least three sets of "times of information transmission when interacting with the AP information".
  • the processor 100 may receive the location information sent by the first AP through the communication interface 102.
  • the processor 100 may also interact with the first AP information through the communication interface 102 to obtain the interaction with the first AP information.
  • the time of information transmission that is, the first time, the second time, the third time, and the fourth time.
  • four times of information transmission corresponding to the AP can be obtained (ie, the time when the AP sends the first measurement message, the time when the STA receives the first measurement message, and the STA sends the The time of a confirmation message and the time when the AP receives the first confirmation message).
  • the location information sent by the first AP received by the processor 100 in the STA through the communication interface 102 is the location coordinate (x 1 , y 1 ) of the first AP, and the processor 100 obtains the first interaction with the first AP information through the communication interface 102.
  • the moment is T 11 time
  • the second time is T 21 time
  • the third time is T 31 time
  • the fourth time is T 41 time
  • the position information sent by the second AP received by the processor 100 through the communication interface 102 is the second time.
  • the position coordinate (x 2 , y 2 ) of the AP, the first time obtained by the processor 100 by interacting with the second AP information through the communication interface 102 is T 12 time, the second time is T 22 time, and the third time is T 32 time.
  • the fourth time is the time T 42 ;
  • the location information sent by the third AP received by the processor 100 through the communication interface 102 is the location coordinate (x 3 , y 3 ) of the third AP, and the processor 100 passes the communication interface 102 and the third AP.
  • the first time obtained by information interaction is T 13 time
  • the second time is T 23 time
  • the third time is T 33 time
  • the fourth time is T 43 time.
  • the processor 100 can substitute the various parameters obtained above into a preset formula.
  • c is the speed of information transmission, generally adopting the speed of light
  • T 1 is the first time
  • T 2 is the second time
  • T 3 is the third time
  • T 4 is the fourth time
  • x and y are respectively STA
  • x i and y i are the abscissa and ordinate of the position of the AP, respectively; thus, three equations are obtained:
  • the processor 100 can calculate x and y according to the equations (1), (2), and (3) to obtain the position coordinates (x, y) of the STA.
  • the processor 100 in the STA may substitute the obtained parameters into the preset formula to obtain at least four equations, and the at least four equations may be combined into multiple Equations, each equation contains three equations; the processor 100 can calculate a plurality of x and a plurality of y according to a plurality of equations, and then calculate an average of the plurality of x and an average of the plurality of y to obtain The average of the plurality of x and the average of the plurality of y are the position coordinates of the STA. The position of the STA thus calculated is more accurate.
  • processor 100 interacts with four AP information to obtain four equations (1), (2), (3), and (4); processor 100 can be based on equations (1), (2), (3) Calculating x and y, the processor 100 can calculate x and y according to equations (1), (2), (4), and the processor 100 can calculate according to equations (1), (3), (4). Excluding x and y, the processor 100 can calculate x and y according to equations (2), (3), (4); then the processor 100 calculates the average of all x and calculates the average of all y, thus obtaining The x and y are the coordinates of the more accurate position of the STA.
  • An embodiment of the present invention provides a positioning method, where an STA can interact with at least three AP information. Calculating the location of the STA to implement the positioning function; and, because the MAC addresses used by the STA when interacting with each AP information are different from each other, when the AP calculates the location of the STA, the obtained multiple equations are from STAs with different MAC addresses. Therefore, the AP does not know which three equations belong to the same STA, and the AP cannot calculate the location of the STA, thus avoiding the problem of STA location privacy leakage without changing the WiFi chip design.
  • the STA may acquire location information of each AP by interacting with at least three APs before calculating the location of the STA.
  • FIG. 5 it shows another positioning method provided by the embodiment of the present invention. Compared with the positioning method shown in FIG. 3, S501 is added before S302, and only different For details, refer to Figure 5.
  • the positioning method includes:
  • the STA interacts with the at least three APs to obtain transmission time information corresponding to each AP.
  • the MAC addresses used by the STA to interact with the at least three APs are different from each other.
  • the transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message.
  • the STA receives location information that is sent by at least three APs.
  • the processor 100 in the STA can interact with at least three APs through the communication interface 102 to obtain location information of each AP.
  • the processor 100 may receive, by using the communication interface 102, a WiFi message sent by each AP, where the WiFi message carries location information of each AP.
  • the STA can also obtain the query by using the database stored in the memory; or, the STA can receive the location information of at least two APs (the one AP of the at least two APs) sent by the AP. It should be noted that, in the embodiment of the present invention, the method for the STA to obtain the location information of at least three APs is not limited.
  • the STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  • S301 may be performed first, and then S501 may be performed; S501 may be performed first, then S301 may be performed; and S301 and S501 may be simultaneously executed.
  • the embodiment of the present invention does not limit the order of execution of S301 and S501.
  • the STA may interact with the AP information by using the MAC address in the pre-generated MAC address list.
  • the method of the embodiment of the present invention may further include S601.
  • the embodiment of the present invention further includes S601, and the corresponding S301 can be replaced by S301a.
  • the positioning is performed. Methods include:
  • the STA generates a MAC address list.
  • the MAC address list includes at least three MAC addresses.
  • the processor 100 may save multiple MAC addresses in a manner of generating a MAC address list to facilitate the use of the processor 100 when interacting with the AP information.
  • the MAC address list generated by the processor 100 includes a first MAC address, a second MAC address, a third MAC address, and the like.
  • S301a and STA respectively use the MAC address in the MAC address list to interact with each AP information in sequence according to the MAC address list, and obtain transmission time information corresponding to each AP.
  • the MAC address used by the processor 100 to interact with each AP information is different from each other.
  • the MAC address in the MAC address list can be used in sequence.
  • the second MAC address in the MAC address list may be used when interacting with the second AP.
  • the third MAC address in the MAC address list may be used when the third AP interacts; if the processor 100 uses the first MAC address and the second MAC address in the MAC address list when interacting with the first AP, The third MAC address in the MAC address list may be used when the two APs interact, and the fourth MAC address in the MAC address list may be used when interacting with the third AP.
  • the STA may also use the MAC address in the MAC address list to interact with at least three AP information randomly after generating the MAC address list.
  • the processor 100 uses the first MAC address in the MAC address list when interacting with the first AP, and the processor 100 can use the fourth MAC address in the MAC address list when interacting with the second AP.
  • the third MAC address in the MAC address list can be used when the third AP interacts.
  • the STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  • the STA includes corresponding hardware structures and/or software modules for performing various functions.
  • the present invention can be implemented in hardware, or a combination of hardware and computer software, in combination with the STA and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the embodiment of the present invention may perform the division of the function module or the function unit on the STA according to the foregoing method example.
  • each function module or function unit may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules or functional units.
  • the division of a module or a unit in the embodiment of the present invention is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • FIG. 7 shows a possible structural diagram of the STA involved in the above embodiment.
  • the STA 700 can include an obtaining module 701 and a computing module 702.
  • the function of the obtaining module 701 can be implemented by the processor 100 shown in FIG. 2.
  • the functionality of computing module 702 can be implemented by processor 100 shown in FIG.
  • the obtaining module 701 is configured to support S301, S401, S403, and S404 in the foregoing embodiment. S406, S407, and S301a, and/or other processes for the techniques described herein.
  • the calculation module 702 is for supporting S302 in the above embodiments, and/or other processes for the techniques described herein.
  • the obtaining module 701 in FIG. 7 may include: a sending unit 7001, a receiving unit 7002, and an obtaining unit 7003.
  • the function of the sending unit 7001 can be implemented by the communication interface 102 shown in FIG. 2.
  • the function of the receiving unit 7002 can be implemented by the communication interface 102 shown in FIG. 2.
  • the function of the obtaining unit 7003 can be implemented by the processor 100 shown in FIG. 2.
  • the transmitting unit 7001 is configured to support S401, S404, and S407 in the above embodiments, and/or other processes for the techniques described herein.
  • the receiving unit 7002 is for supporting S403 and S406 in the above embodiments, and/or other processes for the techniques described herein.
  • the obtaining unit 7003 is for supporting S403 and S404 in the above embodiments, and/or other processes for the techniques described herein.
  • the STA 700 shown in FIG. 7 may further include: a receiving module 703 and a generating module 704.
  • the function of the receiving module 703 can be implemented by the communication interface 102 shown in FIG. 2.
  • the functionality of the generation module 704 can be implemented by the processor 100 shown in FIG.
  • the receiving module 703 is configured to support S501 in the above embodiments, and/or other processes for the techniques described herein.
  • the generation module 704 is for supporting S601 in the above embodiments, and/or other processes for the techniques described herein.
  • the STA 700 provided by the embodiment of the present invention includes, but is not limited to, the foregoing modules.
  • the STA 700 may further include a storage module.
  • the function of the memory module can be implemented by the memory 101 shown in FIG.
  • the above-mentioned obtaining module 701, the calculating module 702, the obtaining unit 7003, the generating module 704, and the like may be integrated into one processing module, and the processing module may be the processor 100.
  • the transmitting unit 7001, the receiving unit 7002, and the receiving module 703 can be implemented by being integrated in one communication module, which can be the communication interface 102.
  • the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores one or more program codes, and when the processor 100 of the STA 10 executes the program code, the STA 10 performs the operations in FIG. 3-6.
  • the processor 100 of the STA 10 executes the program code, the STA 10 performs the operations in FIG. 3-6.
  • Related method steps in a drawing are related method steps in a drawing.
  • Embodiments of the present invention also provide a computer program product that, when run on a computer, causes the computer to perform the associated method steps of any of Figures 3-6.
  • the STA 10, the STA 700, the computer storage medium, or the computer program product provided by the embodiments of the present invention are all used to perform the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the above provided. The beneficial effects in the corresponding methods are not described here.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated 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 in an electrical, mechanical or other form.
  • 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 application 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 storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Abstract

The present invention relates to the technical field of communications, and disclosed in the embodiments thereof are a positioning method and device, which may carry out a positioning function without changing the design of a WiFi chip and may avoid the problem wherein the position of a station (STA) is leaked. The specific solution is as follows: an STA carries out information interaction with at least three access points (AP) so as to obtain transmission time information corresponding to each AP, wherein the MAC addresses used by the STA to carry out information interaction with each AP are different from each other, and the transmission time information corresponding to each AP comprises a time when the AP sends a first measurement message, a time when the STA receives the first measurement message, a time when the STA sends a first acknowledgement message and a time when the AP receives the first acknowledgement message; and the STA calculates the position of the STA according to the transmission time information corresponding to each AP and position information of the at least three APS. The embodiments of the present invention are thus applied to the process wherein the STA carries out information interaction with the AP so as to obtain the position of the STA.

Description

一种定位方法及设备Positioning method and device 技术领域Technical field
本发明实施例涉及通信技术领域,尤其涉及一种定位方法及设备。The embodiments of the present invention relate to the field of communications technologies, and in particular, to a positioning method and device.
背景技术Background technique
无线保真(Wireless Fidelity,WiFi)技术是一种短距离无线通信技术。WiFi技术的结构包含有一个中心节点,称为接入点(Access Point,AP),以及包含有其他节点,称为站点(Station,STA)。Wireless Fidelity (WiFi) technology is a short-range wireless communication technology. The structure of the WiFi technology includes a central node called an access point (AP) and other nodes, called stations (STAs).
其中,STA可以采用精确时间测量(Fine Time Measurement,FTM)技术,通过WiFi网络与至少三个AP进行信息交互实现定位。具体的,此处以一个AP为例对STA与AP的交互过程进行说明:AP在t1时刻向STA发送第一测量消息,STA在t2时刻接收第一测量消息并在t3时刻向AP反馈确认消息,AP在t4时刻接收确认消息后,向STA发送携带有t1时刻和t4时刻的第二测量消息。如此,STA在获得至少3组时间组后,可以根据AP的坐标信息和至少3组时间组计算出STA的位置,其中,每个时间组中包括与至少三个AP信息交互时的信息传输的时刻(如t1时刻、t2时刻、t3时刻和t4时刻)。The STA can use the Fine Time Measurement (FTM) technology to perform information interaction with at least three APs through the WiFi network to achieve positioning. Specifically, an AP is used as an example to describe the interaction process between the STA and the AP. The AP sends a first measurement message to the STA at time t1, and the STA receives the first measurement message at time t2 and feeds back the acknowledgement message to the AP at time t3. After receiving the acknowledgement message at time t4, the AP sends a second measurement message carrying the time t1 and time t4 to the STA. In this manner, after obtaining at least three sets of time groups, the STA may calculate the location of the STA according to the coordinate information of the AP and the at least three time groups, where each time group includes information transmission when interacting with at least three AP information. Time (such as time t1, time t2, time t3, and time t4).
但是,由于只要STA的t2时刻与t3时刻的时间差(即t3-t2)固定,至少三个AP可以交换各自的(t4-t1)之后便可以计算出STA的位置,而与STA交互的AP可能是不可靠的,因此上述采用FTM技术实现STA定位的方法存在STA的位置隐私泄漏的问题。However, since as long as the time difference between the t2 time and the t3 time of the STA (ie, t3-t2) is fixed, at least three APs can exchange the respective (t4-t1) and then the position of the STA can be calculated, and the AP interacting with the STA may It is unreliable, so the above method of implementing STA positioning by using FTM technology has the problem of STA's location privacy leakage.
现有技术中,STA在在t2时刻成功接收第一测量消息后,在随机设定的一个时长后,向AP发送确认消息。这样,AP便不能够得到正确的t2时刻与t3时刻的时间差,从而不能获得STA的正确位置。In the prior art, after successfully receiving the first measurement message at time t2, the STA sends an acknowledgement message to the AP after a randomly set time period. In this way, the AP cannot obtain the correct time difference between the time t2 and the time t3, so that the correct position of the STA cannot be obtained.
但是,由于STA在随机设定的一个时长后,向AP发送确认消息时,需要先调整自身的时间(即增加随机数);因此,现有技术的方案需要改变现有的设备在WiFi芯片上的设计,修改到底层的处理机制,增加额外的处理功能;并且该增加的处理功能只有在新设备上才可以实现,而现有的很多老设备WiFi芯片的设计是不能修改的,因此现有技术的方法缺少通用性。However, since the STA sends an acknowledgment message to the AP after a randomly set time period, it needs to adjust its own time (ie, increase the random number); therefore, the prior art solution needs to change the existing device on the WiFi chip. The design is modified to the underlying processing mechanism, adding additional processing functions; and the added processing function can only be implemented on new devices, and the design of many existing old device WiFi chips cannot be modified, so existing The technical approach lacks versatility.
发明内容Summary of the invention
本申请提供一种定位方法及设备,可以在不改变WiFi芯片设计的同时,实现定位功能,并且避免了STA的位置泄漏的问题。The present application provides a positioning method and device, which can realize the positioning function without changing the design of the WiFi chip, and avoid the problem of the location leakage of the STA.
为达到上述目的,本申请采用如下技术方案:To achieve the above objectives, the present application adopts the following technical solutions:
本申请的第一方面,提供一种定位方法,包括:STA与至少三个AP信息交互,获得每个AP对应的传输时间信息;STA根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置。其中,STA与 至少三个AP信息交互时所采用的介质访问控制(Media Access Control,MAC)地址互不相同;每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、STA接收第一测量消息的时刻、STA发送第一确认消息的时刻以及AP接收第一确认消息的时刻。本申请中,STA可以与至少三个AP信息交互,计算出STA的位置,实现定位功能;并且,由于STA在与每个AP信息交互时采用的MAC地址互不相同,当AP在计算STA的位置时,获得的多个方程来自不同MAC地址的STA,因此AP不知道哪三个方程是属于同一个STA的,AP无法计算出STA的位置,如此在不改变WiFi芯片设计的情况下,避免了STA的位置隐私泄露的问题。A first aspect of the present application provides a positioning method, including: an STA interacting with at least three AP information to obtain transmission time information corresponding to each AP; and the STA according to transmission time information corresponding to at least three APs and at least three APs The location information, calculate the location of the STA. Among them, STA and The media access control (MAC) addresses used by the at least three APs are different from each other; the transmission time information corresponding to each AP includes the time when the AP sends the first measurement message, and the STA receives the first measurement message. Time, the time at which the STA sends the first acknowledgment message, and the time at which the AP receives the first acknowledgment message. In this application, the STA may interact with at least three APs to calculate the location of the STA and implement the positioning function. Moreover, since the STA uses different MAC addresses when interacting with each AP, the AP calculates the STA. In the position, the obtained multiple equations are from STAs with different MAC addresses, so the AP does not know which three equations belong to the same STA, and the AP cannot calculate the position of the STA, thus avoiding without changing the WiFi chip design. The issue of STA's location privacy leaks.
结合第一方面,在本申请的一种可能的实现方式中,在上述“STA根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置”之前,本申请的方法还可以包括:STA接收至少三个AP分别发送的位置信息。其中,STA可以接收每个AP发送的WiFi消息,该WiFi消息中携带有每个AP的位置信息。当然,STA还可以通过在存储器存储的数据库中查询获得;或者,STA可以接收一个AP发送的至少两个AP(该至少两个AP中包含该一个AP)的位置信息。With reference to the first aspect, in a possible implementation manner of the present application, before the “STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs”, the present application The method may further include: the STA receiving the location information respectively sent by the at least three APs. The STA can receive the WiFi message sent by each AP, where the WiFi message carries the location information of each AP. Of course, the STA can also obtain the query by using the database stored in the memory; or, the STA can receive the location information of at least two APs (the one AP of the at least two APs) sent by the AP.
结合第一方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,针对第一AP,第一AP为至少三个AP中任一AP,“STA与第一AP信息交互,获得第一AP对应的传输时间信息”的方法可以包括:STA接收第一AP发送的第一测量消息,并获取第一时刻,该第一测量消息中携带有第一MAC地址和第一AP的地址,该第一时刻为STA接收第一测量消息的时刻;STA采用第一MAC地址在第二时刻向第一AP发送第一确认消息,该第一确认消息中携带有第一MAC地址和第一AP的地址;STA接收第一AP发送的第二测量消息,该第二测量消息中携带第二MAC地址和第一AP的地址以及第三时刻和第四时刻,该第三时刻为第一AP发送第一测量消息的时刻,该第四时刻为第一AP接收第一确认消息的时刻;STA采用第二MAC地址向第一AP发送第二确认消息,该第二确认消息中携带有第二MAC地址和第一AP的地址。其中,由于STA在与每个AP信息交互时,可以采用至少一个MAC地址,因此当AP在计算STA的位置时,获得的多个方程来自不同MAC地址的STA,因此AP不知道哪三个方程是属于同一个STA的,AP无法计算出STA的位置,如此便避免了STA的位置隐私泄露的问题。With reference to the first aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, for the first AP, the first AP is any one of the at least three APs, and “the STA interacts with the first AP information. The method for obtaining the transmission time information corresponding to the first AP may include: the STA receiving the first measurement message sent by the first AP, and acquiring the first time, where the first measurement message carries the first MAC address and the first AP The first time is the time when the STA receives the first measurement message; the STA sends the first acknowledgment message to the first AP at the second time by using the first MAC address, where the first acknowledgment message carries the first MAC address and The address of the first AP; the STA receives the second measurement message sent by the first AP, where the second measurement message carries the second MAC address and the address of the first AP, and the third moment and the fourth moment, where the third moment is a moment when the AP sends the first measurement message, where the fourth time is the time when the first AP receives the first acknowledgment message; the STA sends the second acknowledgment message to the first AP by using the second MAC address, where the second acknowledgment message carries Second MAC address and first AP Address. Wherein, since the STA can use at least one MAC address when interacting with each AP information, when the AP calculates the location of the STA, the obtained multiple equations are from STAs of different MAC addresses, so the AP does not know which three equations. If the AP belongs to the same STA, the AP cannot calculate the location of the STA, thus avoiding the problem of STA location privacy leakage.
结合第一方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,第一MAC地址与第二MAC地址相同;或者,第一MAC地址与第二MAC地址不同。其中,STA在与一个AP交互时,可以采用一个MAC地址,也可以采用多个MAC地址。In conjunction with the first aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, the first MAC address is the same as the second MAC address; or the first MAC address is different from the second MAC address. The STA may use one MAC address or multiple MAC addresses when interacting with an AP.
结合第一方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,针对第一AP,第一AP为至少三个AP中任一AP,在上述“STA接收第一AP发送的第一测量消息,并获取第一时刻”之前,本申请的方法还可以包括:STA采用第三MAC地址向第一AP发送携带有至少一个MAC地址和 第一AP的地址的请求消息,该至少一个MAC地址中包括第三MAC地址。其中,第一MAC地址、第二MAC地址与第三MAC地址均相同;或者,第一MAC地址与第二MAC地址相同,第二MAC地址与第三MAC地址不同;或者,第一MAC地址与第三MAC地址相同,第二MAC地址与第三MAC地址不同;或者,第一MAC地址与第二MAC地址不同,第二MAC地址与第三MAC地址相同;或者,第一MAC地址、第二MAC地址与第三MAC地址互不相同。With reference to the first aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, for the first AP, the first AP is any one of the at least three APs, and the foregoing “STA receives the first AP. Before the first measurement message is sent, and the first time is obtained, the method of the present application may further include: the STA sends the first AP with the third MAC address and carries at least one MAC address and A request message of an address of the first AP, where the at least one MAC address includes a third MAC address. The first MAC address, the second MAC address, and the third MAC address are all the same; or the first MAC address is the same as the second MAC address, the second MAC address is different from the third MAC address; or the first MAC address is The third MAC address is the same, the second MAC address is different from the third MAC address; or the first MAC address is different from the second MAC address, the second MAC address is the same as the third MAC address; or the first MAC address, the second The MAC address is different from the third MAC address.
结合第一方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,在上述“STA与至少三个AP信息交互,获得每个AP对应的传输时间信息”之前,本申请的方法还可以包括:STA生成MAC地址列表,该MAC地址列表中包括至少三个MAC地址。相应的,上述“STA与至少三个AP信息交互,获得每个AP对应的传输时间信息”的方法可以包括:STA根据MAC地址列表,按顺序使用MAC地址列表中的MAC地址分别与每个AP信息交互,获得每个AP对应的传输时间信息。其中,STA可以采用MAC地址列表,保存多个MAC地址,以方便STA在与AP信息交互时使用。With reference to the first aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, before the foregoing “STA interacts with at least three AP information to obtain transmission time information corresponding to each AP”, the present application The method may further include: the STA generates a MAC address list, where the MAC address list includes at least three MAC addresses. Correspondingly, the method for the STA to interact with the at least three APs to obtain the transmission time information corresponding to each AP may include: the STA uses the MAC address in the MAC address list and each AP in sequence according to the MAC address list. Information exchange, obtaining transmission time information corresponding to each AP. The STA can use the MAC address list to save multiple MAC addresses to facilitate the STA to use when interacting with the AP information.
本申请的第二方面,提供一种STA,包括:获取模块和计算模块。其中,获取模块,用于STA与至少三个AP信息交互,获得每个AP对应的传输时间信息,其中,STA与至少三个AP信息交互时所采用的MAC地址互不相同,每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、STA接收第一测量消息的时刻、STA发送第一确认消息的时刻以及AP接收第一确认消息的时刻。计算模块,用于根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置。In a second aspect of the present application, an STA is provided, including: an obtaining module and a calculating module. The acquiring module is configured to exchange information with the AP and the at least three APs, and obtain the transmission time information corresponding to each AP, where the MAC addresses used by the STA to interact with the at least three APs are different from each other, and each AP corresponds to The transmission time information includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message. And a calculation module, configured to calculate a location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
结合第二方面,在本申请的一种可能的实现方式中,本申请中的STA还可以包括:接收模块。其中,接收模块,用于在计算模块根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置之前,接收至少三个AP分别发送的位置信息。With reference to the second aspect, in a possible implementation manner of the present application, the STA in this application may further include: a receiving module. The receiving module is configured to receive the location information sent by the at least three APs before the calculating module calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
结合第二方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,针对第一AP,该第一AP为至少三个AP中任一AP,上述获取模块,具体可以包括:接收单元、获取单元和发送单元。其中,接收单元,用于接收第一AP发送的第一测量消息,该第一测量消息中携带有第一MAC地址和第一AP的地址。获取单元,用于获取第一时刻,该第一时刻为STA接收第一测量消息的时刻。发送单元,用于采用第一MAC地址在第二时刻向第一AP发送第一确认消息,该第一确认消息中携带有第一MAC地址和第一AP的地址。接收单元,还用于接收第一AP发送的第二测量消息,该第二测量消息中携带第二MAC地址和第一AP的地址以及第三时刻和第四时刻,该第三时刻为第一AP发送第一测量消息的时刻,该第四时刻为第一AP接收第一确认消息的时刻。发送单元,还用于采用第二MAC地址向第一AP发送第二确认消息,该第二确认消息中携带有第二MAC地址和第一AP的地址。With reference to the second aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, for the first AP, the first AP is any one of the at least three APs, and the acquiring module may specifically include : receiving unit, acquiring unit, and transmitting unit. The receiving unit is configured to receive the first measurement message sent by the first AP, where the first measurement message carries the first MAC address and the address of the first AP. And an acquiring unit, configured to acquire a first moment, where the STA is the moment when the STA receives the first measurement message. The sending unit is configured to send, by using the first MAC address, the first acknowledgment message to the first AP at the second moment, where the first acknowledgment message carries the first MAC address and the address of the first AP. The receiving unit is further configured to receive the second measurement message sent by the first AP, where the second measurement message carries the second MAC address and the address of the first AP, and the third time and the fourth time, where the third time is the first The moment when the AP sends the first measurement message, where the fourth time is the time when the first AP receives the first confirmation message. The sending unit is further configured to send, by using the second MAC address, a second acknowledgment message to the first AP, where the second acknowledgment message carries the second MAC address and the address of the first AP.
结合第二方面和上述可能的实现方式,在本申请的另一种可能的实现方 式中,第一MAC地址与第二MAC地址相同;或者,第一MAC地址与第二MAC地址不同。In conjunction with the second aspect and the above possible implementations, another possible implementation of the present application Wherein the first MAC address is the same as the second MAC address; or the first MAC address is different from the second MAC address.
结合第二方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,上述发送单元,还可以用于在接收单元接收第一AP发送的第一测量消息之前,采用第三MAC地址向第一AP发送携带有至少一个MAC地址和第一AP的地址的请求消息,该至少一个MAC地址中包括第三MAC地址。With reference to the second aspect and the foregoing possible implementation manner, in another possible implementation manner of the present application, the sending unit may be further configured to: before the receiving unit receives the first measurement message sent by the first AP, adopt a third The MAC address sends a request message carrying the at least one MAC address and the address of the first AP to the first AP, where the at least one MAC address includes the third MAC address.
结合第二方面和上述可能的实现方式,在本申请的另一种可能的实现方式中,本申请中的STA还可以包括:生成模块。其中,生成模块,用于在获取模块在STA与至少三个AP信息交互,获得每个AP对应的传输时间信息之前,生成MAC地址列表,该MAC地址列表中包括至少三个MAC地址。相应的,获取模块,具体可以用于:根据MAC地址列表,按顺序使用MAC地址列表中的MAC地址分别与每个AP信息交互,获得每个AP对应的传输时间信息。In conjunction with the second aspect and the foregoing possible implementation manners, in another possible implementation manner of the present application, the STA in the present application may further include: a generating module. The generating module is configured to generate a MAC address list, where the MAC address list includes at least three MAC addresses, before the acquiring module interacts with the at least three APs to obtain the transmission time information corresponding to each AP. Correspondingly, the obtaining module may be configured to: use the MAC address in the MAC address list to interact with each AP information in sequence according to the MAC address list, and obtain transmission time information corresponding to each AP.
需要说明的是,本发明实施例的第二方面及其各种可能的实现方式的各个功能单元,是为了执行上述第一方面以及第一方面的各种可选方式的定位方法,而对STA进行的逻辑上的划分。第二方面及其各种可能的实现方式的各个功能单元的详细描述以及有益效果分析可以参考上述第一方面及其各种可能的实现方式中的对应描述及技术效果,此处不再赘述。It is to be noted that the respective functional units of the second aspect of the embodiments of the present invention and various possible implementation manners thereof are for performing the positioning methods of the foregoing first aspect and various alternative manners of the first aspect, and to the STA The logical division made. For a detailed description of the various functional units of the second aspect and its various possible implementations, and the beneficial effects analysis, reference may be made to the corresponding descriptions and technical effects in the foregoing first aspect and various possible implementation manners, and details are not described herein again.
本申请的第三方面,提供一种STA,该STA可以包括:处理器、存储器和通信接口。其中,存储器用于存储计算机执行指令,处理器、通信接口与存储器通过总线连接,当STA运行时,处理器执行存储器存储的计算机执行指令,以使STA执行如第一方面以及第一方面的各种可选方式所述的定位方法。In a third aspect of the present application, a STA is provided, and the STA may include: a processor, a memory, and a communication interface. The memory is used to store computer execution instructions, and the processor, the communication interface and the memory are connected by a bus. When the STA is running, the processor executes the memory storage computer to execute the instructions, so that the STA performs the first aspect and the first aspect. An alternative method of positioning described.
本申请的第四方面,提供一种计算机存储介质,该计算机存储介质中存储有一个或多个程序代码,当第三方面中的STA的处理器执行该程序代码时,STA执行如第一方面以及第一方面的各种可选方式所述的定位方法。A fourth aspect of the present application provides a computer storage medium having stored therein one or more program codes, when the processor of the STA in the third aspect executes the program code, the STA performs the first aspect as And the positioning method described in various alternatives of the first aspect.
本申请的第五方面,提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面以及第一方面的各种可选方式所述的定位方法。In a fifth aspect of the present application, a computer program product is provided, which, when run on a computer, causes the computer to perform the positioning method as described in the first aspect and the various alternative aspects of the first aspect.
上述第三方面中STA的各个模块的详细描述和相应技术效果分析可参见上述第一方面及其各种可能的实现方式中的详细描述,本发明实施例这里不再赘述。For a detailed description of the various modules of the STA in the foregoing third aspect, and the corresponding technical effect analysis, refer to the detailed description in the foregoing first aspect and various possible implementation manners, and details are not described herein again.
附图说明DRAWINGS
图1为本发明实施例提供的一种WiFi网络的网络架构示意图;FIG. 1 is a schematic diagram of a network architecture of a WiFi network according to an embodiment of the present invention;
图2为本发明实施例提供的一种STA的结构示意图一;2 is a schematic structural diagram 1 of a STA according to an embodiment of the present invention;
图3为本发明实施例提供的一种定位方法流程图一;FIG. 3 is a flowchart 1 of a positioning method according to an embodiment of the present disclosure;
图4为本发明实施例提供的一种定位方法流程图二;4 is a flowchart 2 of a positioning method according to an embodiment of the present invention;
图5为本发明实施例提供的一种定位方法流程图三; FIG. 5 is a third flowchart of a positioning method according to an embodiment of the present invention;
图6为本发明实施例提供的一种定位方法流程图四;FIG. 6 is a flowchart 4 of a positioning method according to an embodiment of the present invention;
图7为本发明实施例提供的一种STA的结构示意图二;FIG. 7 is a schematic structural diagram 2 of a STA according to an embodiment of the present disclosure;
图8为本发明实施例提供的一种STA的结构示意图三;FIG. 8 is a schematic structural diagram 3 of a STA according to an embodiment of the present disclosure;
图9为本发明实施例提供的一种STA的结构示意图四。FIG. 9 is a schematic structural diagram 4 of a STA according to an embodiment of the present invention.
具体实施方式detailed description
本发明实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一AP和第二AP等是用于区别不同的AP,而不是用于描述设备的特定顺序。在本发明实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。The terms "first" and "second" and the like in the specification and claims of the embodiments of the present invention are used to distinguish different objects, and are not intended to describe a specific order of the objects. For example, the first AP and the second AP, etc. are used to distinguish different APs, rather than to describe a specific order of devices. In the description of the embodiments of the present invention, the meaning of "a plurality" is two or more unless otherwise specified.
在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present invention, the words "exemplary" or "such as" are used to mean an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the words "exemplary" or "such as" is intended to present the concepts in a particular manner.
本发明实施例提供的定位方法及设备可以应用于实现STA定位的过程中,具体的,可以应用于STA与AP信息交互,计算出STA的位置的过程中。The locating method and device provided by the embodiments of the present invention may be applied to the process of implementing STA positioning, and may be applied to the process of STA and AP information interaction and calculating the location of the STA.
请参考图1,其示出了本发明实施例提供的一种WiFi网络的网络架构示意图。如图1示,该WiFi网络中包括:STA 10和至少三个AP(如AP 21、AP 22和AP 23)。Please refer to FIG. 1 , which is a schematic diagram of a network architecture of a WiFi network according to an embodiment of the present invention. As shown in FIG. 1, the WiFi network includes: STA 10 and at least three APs (such as AP 21, AP 22, and AP 23).
其中,STA 10和至少三个AP(如AP 21、AP 22和AP 23)通信连接,STA 10可以与至少三个AP进行信息交互,STA与每个AP进行信息交互时采用的MAC地址互不相同。例如,STA 10可以采用MAC地址1与AP 21进行信息交互,STA 10可以采用MAC地址2与AP 22进行信息交互,STA 10可以采用MAC地址3与AP 23进行信息交互。The STA 10 and the at least three APs (such as the AP 21, the AP 22, and the AP 23) are in communication, and the STA 10 can perform information exchange with at least three APs. The MAC address used by the STA to interact with each AP does not interact with each other. the same. For example, the STA 10 can perform information exchange with the AP 21 by using the MAC address 1 and the STA 10 can perform information exchange with the AP 22 by using the MAC address 2, and the STA 10 can perform information interaction with the AP 23 by using the MAC address 3.
其中,本发明实施例中的STA 10可以为安装有WiFi模块的电子终端,该电子终端可以通过WiFi网络与至少三个AP进行信息交互。例如,该电子终端可以为手机、个人计算机(Personal Computer,PC)、手持设备以及pad等。The STA 10 in the embodiment of the present invention may be an electronic terminal installed with a WiFi module, and the electronic terminal may perform information interaction with at least three APs through the WiFi network. For example, the electronic terminal can be a mobile phone, a personal computer (PC), a handheld device, a pad, and the like.
本发明实施例中的至少三个AP不局限于常规的接入点,本发明实施例中的AP可以为具备接入点功能的任一通信设备,该至少三个AP可以通过WiFi网络与STA 10进行数据交互。例如,该至少三个AP可以为WiFi路由器,此时STA 10可以为手机、电脑等用户终端;当手机或者电脑等用户终端设置为WiFi热点模式,为其他终端提供WiFi网络时,该手机或者电脑等用户终端则为本发明实施例中的至少三个AP,其它连接该至少三个AP提供的WiFi网络的终端则可以为STA 10。The at least three APs in the embodiment of the present invention are not limited to a conventional access point, and the AP in the embodiment of the present invention may be any communication device having an access point function, and the at least three APs may pass through the WiFi network and the STA. 10 for data interaction. For example, the at least three APs may be WiFi routers, and the STA 10 may be a user terminal such as a mobile phone or a computer; when the user terminal such as a mobile phone or a computer is set to the WiFi hotspot mode to provide a WiFi network to other terminals, the mobile phone or the computer The user terminal is the at least three APs in the embodiment of the present invention, and the other terminals connected to the WiFi network provided by the at least three APs may be the STA 10.
或者,本发明实施例中的至少三个AP可以为手机或者电脑等用户终端,STA 10可以为与手机或者电脑等用户终端连接的可穿戴设备。Alternatively, at least three APs in the embodiment of the present invention may be user terminals such as a mobile phone or a computer, and the STA 10 may be a wearable device connected to a user terminal such as a mobile phone or a computer.
如图2所示,本发明实施例中的STA 10可以包括处理器100、存储器101和通信接口102。其中,处理器100、存储器101和通信接口102通过总线103 相互连接。As shown in FIG. 2, the STA 10 in the embodiment of the present invention may include a processor 100, a memory 101, and a communication interface 102. The processor 100, the memory 101, and the communication interface 102 pass through the bus 103. Connected to each other.
其中,处理器100是STA 10的控制中心,可以是一个处理器,也可以是多个处理元件的统称。例如,处理器100可以是一个中央处理单元(Central Processing unit,CPU),也可以是专用集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器,或,一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)。STA 10可以包括一个或多个处理器100,即STA 10可以包括多核处理器。例如,处理器100可以用于采用不同的MAC地址通过通信接口102与至少三个AP进行信息交互。The processor 100 is a control center of the STA 10, and may be a processor or a collective name of multiple processing elements. For example, the processor 100 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated systems configured to implement the embodiments of the present invention. The circuit, for example: one or more microprocessors, or one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). The STA 10 may include one or more processors 100, ie, the STA 10 may include a multi-core processor. For example, the processor 100 can be configured to interact with at least three APs via the communication interface 102 using different MAC addresses.
存储器101可以用于存储STA 10中的运行数据/信息或软件模块中的至少一项。例如,存储器101可以用于存储本发明实施例提供的第一测量消息。The memory 101 can be used to store at least one of operational data/information or software modules in the STA 10. For example, the memory 101 can be used to store the first measurement message provided by the embodiment of the present invention.
通信接口102是一种用于数据和信息传输的通道。例如,通信接口102可以用于传输本发明实施例中的第一确认消息。 Communication interface 102 is a channel for data and information transmission. For example, the communication interface 102 can be used to transmit a first acknowledgment message in an embodiment of the present invention.
其中,总线103可以是外设部件互连标准(英文:Peripheral Component Interconnect,简称:PCI)总线或扩展工业标准结构(英文:Extended Industry Standard Architecture,简称:EISA)总线等。上述总线103可以分为地址总线、数据总线、控制总线等。为便于表示,图2中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 103 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The above bus 103 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 2, but it does not mean that there is only one bus or one type of bus.
基于图1所示的WiFi网络中STA 10与至少三个AP(如AP 21、AP 22和AP 23)之间的交互,以及图2中STA 10的各模块或组成部分,本发明实施例提供一种定位方法,该方法对图1所示的系统中STA 10与至少三个AP交互过程,进行了详细的介绍。具体的,如图3所示,该定位方法可以包括S301和S302:The embodiment of the present invention provides an interaction between the STA 10 and at least three APs (such as the AP 21, the AP 22, and the AP 23) in the WiFi network shown in FIG. 1 and the modules or components of the STA 10 in FIG. A positioning method is described in detail for the interaction process between STA 10 and at least three APs in the system shown in FIG. 1. Specifically, as shown in FIG. 3, the positioning method may include S301 and S302:
S301、STA与至少三个AP信息交互,获得每个AP对应的传输时间信息。S301: The STA interacts with the at least three APs to obtain transmission time information corresponding to each AP.
其中,STA在与至少三个AP通信连接后,STA中的处理器100可以通过通信接口102与至少三个AP进行信息交互,获得每个AP对应的传输时间信息;并且处理器100与至少三个AP中每个AP信息交互时所采用的MAC地址互不相同。每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、STA接收第一测量消息的时刻、STA发送第一确认消息的时刻以及AP接收第一确认消息的时刻。The processor 100 in the STA can perform information exchange with at least three APs through the communication interface 102 to obtain transmission time information corresponding to each AP, and the processor 100 and the at least three The MAC addresses used by each AP in the AP are different from each other. The transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message.
示例性的,STA中的处理器100可以采用MAC地址1通过通信接口102与第一AP信息交互,获得第一AP对应的传输时间信息,该第一AP对应的传输时间信息包括第一AP发送第一测量消息的时刻、STA接收第一AP发送的第一测量消息的时刻、STA向第一AP发送第一确认消息的时刻以及第一AP接收第一确认消息的时刻;处理器100可以采用MAC地址2通过通信接口102与第二AP信息交互,获得第二AP对应的传输时间信息,该第二AP对应的传输时间信息包括第二AP发送第一测量消息的时刻、STA接收第二AP发送的第一测量消息的时刻、STA向第二AP发送第一确认消息的时刻以 及第二AP接收第一确认消息的时刻;处理器100可以采用MAC地址3通过通信接口102与第三AP信息交互,获得第三AP对应的传输时间信息,该第三AP对应的传输时间信息包括第三AP发送第一测量消息的时刻、STA接收第三AP发送的第一测量消息的时刻、STA向第三AP发送第一确认消息的时刻以及第三AP接收第一确认消息的时刻。Exemplarily, the processor 100 in the STA may use the MAC address 1 to interact with the first AP information through the communication interface 102, and obtain the transmission time information corresponding to the first AP, where the transmission time information corresponding to the first AP includes the first AP sending. The time of the first measurement message, the time when the STA receives the first measurement message sent by the first AP, the time when the STA sends the first acknowledgement message to the first AP, and the time when the first AP receives the first acknowledgement message; the processor 100 may adopt The MAC address 2 interacts with the second AP information through the communication interface 102 to obtain the transmission time information corresponding to the second AP. The transmission time information corresponding to the second AP includes the time when the second AP sends the first measurement message, and the STA receives the second AP. The time of the first measurement message sent, and the time when the STA sends the first confirmation message to the second AP. And the time when the second AP receives the first acknowledgment message; the processor 100 may use the MAC address 3 to interact with the third AP information through the communication interface 102, and obtain the transmission time information corresponding to the third AP, and the transmission time information corresponding to the third AP The moment when the third AP sends the first measurement message, the time when the STA receives the first measurement message sent by the third AP, the time when the STA sends the first acknowledgement message to the third AP, and the time when the third AP receives the first acknowledgement message.
本发明实施中,STA与至少三个AP信息交互的方法相同,此处仅以STA与第一AP信息交互为例,对STA与AP信息交互的方法进行详细描述。示例性的,针对第一AP,STA采用MAC地址1与第一AP信息交互,获得第一AP对应的传输时间信息的方法可以如S401-408所述。In the implementation of the present invention, the method for the STA to interact with the information of the AP is the same. The method for the interaction between the STA and the AP is described in detail. For example, for the first AP, the STA uses the MAC address 1 to interact with the first AP information, and the method for obtaining the transmission time information corresponding to the first AP may be as described in S401-408.
需要说明的是,本发明实施例中为了说明STA与每个AP信息交互时采用的MAC地址互不相同,使用MAC地址1、MAC地址2和MAC地址3等表示不同的MAC地址,且MAC地址1可能仅是第一MAC地址,也可能是第一MAC和第二MAC地址,也可能是第一MAC和第三MAC地址等等。It should be noted that, in the embodiment of the present invention, in order to explain that the MAC addresses used by the STA to interact with each AP information are different from each other, the MAC address 1, the MAC address 2, and the MAC address 3 are used to represent different MAC addresses, and the MAC address is used. 1 may be only the first MAC address, may be the first MAC and the second MAC address, may also be the first MAC and the third MAC address, and the like.
如图4所示,其示出了本发明实施例提供的一种STA与第一AP信息交互的方法,该方法包括S401-S408:As shown in FIG. 4, it shows a method for an STA to interact with a first AP information according to an embodiment of the present invention, where the method includes S401-S408:
S401、STA采用第三MAC地址向第一AP发送请求消息。S401. The STA sends a request message to the first AP by using a third MAC address.
其中,请求消息中携带有至少一个MAC地址和第一AP的地址,该至少一个MAC地址中包括第三MAC地址。The request message carries at least one MAC address and an address of the first AP, and the at least one MAC address includes a third MAC address.
示例性的,STA中的处理器100可以使用预先生成的MAC地址列表中的第三MAC地址,通过通信接口102向第一AP发送请求消息。处理器100在向第一AP发送请求消息时,将STA的发送地址填写为第三MAC地址,将STA的接收地址填写为第一AP的地址。Exemplarily, the processor 100 in the STA may send a request message to the first AP through the communication interface 102 using the third MAC address in the pre-generated MAC address list. When transmitting the request message to the first AP, the processor 100 fills in the sending address of the STA as the third MAC address, and fills in the receiving address of the STA as the address of the first AP.
S402、第一AP接收请求消息,并向STA发送第一测量消息。S402. The first AP receives the request message, and sends a first measurement message to the STA.
其中,第一测量消息中携带有第一MAC地址和第一AP的地址,该第一MAC地址为至少一个MAC地址中任一MAC地址。第一测量消息用于指示STA获取与第一AP信息交互时的信息传输的第一时刻。The first measurement message carries a first MAC address and an address of the first AP, where the first MAC address is any one of the at least one MAC address. The first measurement message is used to instruct the STA to acquire the first moment of information transmission when interacting with the first AP information.
示例性的,第一AP在接受到请求消息后,在第三时刻(如T31时刻)向STA发送第一测量消息。第一AP在向STA发送第一测量消息时,将第一AP的发送地址填写为第一AP的地址,将第一AP的接收地址填写为第一MAC地址,该第一MAC地址可以与第三MAC地址相同,也可以与第三MAC地址不同。Exemplarily, after receiving the request message, the first AP sends a first measurement message to the STA at a third time (such as time T 31 ). When the first AP sends the first measurement message to the STA, the first AP sends the address of the first AP as the address of the first AP, and the first AP receives the first MAC address as the first MAC address. The three MAC addresses are the same, and may also be different from the third MAC address.
S403、STA接收第一AP发送的第一测量消息,并获取第一时刻。S403. The STA receives the first measurement message sent by the first AP, and acquires the first time.
其中,第一时刻为STA接收第一测量消息的时刻。The first moment is a moment when the STA receives the first measurement message.
示例性的,STA中的处理器100在T11时刻通过通信接口102接收到第一AP发送的第一测量消息,则获取的第一时刻为T11时刻。Exemplary, the processor 100 of the STA receives at time T 11 via a first communication interface 102 to a first message sent by the AP measurement, the first time is acquired as the time T 11.
S404、STA采用第一MAC地址在第二时刻向第一AP发送第一确认消息。S404. The STA sends the first acknowledgement message to the first AP by using the first MAC address at the second moment.
其中,第一确认消息中携带有第一MAC地址和第一AP的地址。STA中的处理器100在接收到第一测量消息后,根据第一测量消息中携带的第一MAC地址和第一AP的地址,在第二时刻通过通信接口102向第一AP发送 第一确认消息,即处理器100以第一MAC地址作为STA的发送地址,以第一AP的地址作为STA的接收地址,在第二时刻通过通信接口102向第一AP发送第一确认消息。The first acknowledgement message carries the first MAC address and the address of the first AP. After receiving the first measurement message, the processor 100 in the STA sends the first MAC address and the address of the first AP carried in the first measurement message to the first AP through the communication interface 102 at the second moment. The first acknowledgment message, that is, the processor 100 uses the first MAC address as the sending address of the STA, the address of the first AP as the receiving address of the STA, and the first acknowledgment message to the first AP through the communication interface 102 at the second moment.
示例性的,STA中的处理器100在T11时刻通过通信接口102接收到第一测量消息后,并在T21时刻通过通信接口102向第一AP发送第一确认消息,则获取的第二时刻为T21时刻。After Exemplary, the processor 100 of the STA received via communications interface 102 to the first measurement message at time T 11, T 21 and the time a first acknowledgment message to the AP by transmitting a first communication interface 102, the acquired second The moment is T 21 .
S405、第一AP接收第一确认消息,并向STA发送第二测量消息。S405. The first AP receives the first acknowledgement message, and sends a second measurement message to the STA.
其中,第二测量消息中携带第二MAC地址和第一AP的地址以及第三时刻和第四时刻,该第二MAC地址为至少一个MAC地址中任一MAC地址,该第三时刻为第一AP发送第一测量消息的时刻,该第四时刻为第一AP接收第一确认消息的时刻。The second measurement message carries the second MAC address and the address of the first AP, and the third time and the fourth time. The second MAC address is any one of the at least one MAC address, and the third time is the first time. The moment when the AP sends the first measurement message, where the fourth time is the time when the first AP receives the first confirmation message.
示例性的,第一AP在第四时刻(如T41时刻)接收到第一确认消息后,向STA发送携带有第三时刻和第四时刻的第二测量消息。第一AP在向STA发送第二测量消息时,将第一AP的发送地址填写为第一AP的地址,将第一AP的接收地址填写为第二MAC地址,该第二MAC地址可以与第一MAC地址相同,也可以与第一MAC地址不同。Exemplary, the first AP after receiving the first acknowledgment message, sending a second measurement message carries a third time and the fourth time in the fourth time to the STA (e.g., time T 41). When sending the second measurement message to the STA, the first AP fills in the address of the first AP as the address of the first AP, and fills the receiving address of the first AP into the second MAC address, where the second MAC address can be A MAC address is the same, and can also be different from the first MAC address.
S406、STA接收第一AP发送的第二测量消息。S406. The STA receives the second measurement message sent by the first AP.
其中,STA中的处理器100通过通信接口102接收第二测量消息,并根据第二测量消息获取到第三时刻和第四时刻。The processor 100 in the STA receives the second measurement message through the communication interface 102, and acquires the third time and the fourth time according to the second measurement message.
S407、STA采用第二MAC地址向第一AP发送第二确认消息。S407. The STA sends a second acknowledgement message to the first AP by using the second MAC address.
其中,第二确认消息中携带有第二MAC地址和第一AP的地址。STA中的处理器100在接收到第二测量消息后,根据第二测量消息中携带的第二MAC地址和第一AP的地址,通过通信接口102向第一AP发送第二确认消息,即处理器100以第二MAC地址作为STA的发送地址,以第一AP的地址作为STA的接收地址,通过通信接口102向第一AP发送第二确认消息。The second acknowledgement message carries the second MAC address and the address of the first AP. After receiving the second measurement message, the processor 100 in the STA sends a second acknowledgement message to the first AP through the communication interface 102 according to the second MAC address carried in the second measurement message and the address of the first AP, that is, the processing The device 100 sends the second acknowledgement message to the first AP through the communication interface 102 by using the second MAC address as the sending address of the STA and the address of the first AP as the receiving address of the STA.
示例性的,本发明实施例中,至少一个MAC地址中的第一MAC地址、第二MAC地址与第三MAC地址均相同;或者,第一MAC地址与第二MAC地址相同,第二MAC地址与第三MAC地址不同;或者,第一MAC地址与第三MAC地址相同,第二MAC地址与第三MAC地址不同;或者,第一MAC地址与第二MAC地址不同,第二MAC地址与第三MAC地址相同;或者,第一MAC地址、第二MAC地址与第三MAC地址互不相同。Illustratively, in the embodiment of the present invention, the first MAC address, the second MAC address, and the third MAC address of the at least one MAC address are the same; or the first MAC address is the same as the second MAC address, and the second MAC address is the same. Different from the third MAC address; or the first MAC address is the same as the third MAC address, the second MAC address is different from the third MAC address; or the first MAC address is different from the second MAC address, the second MAC address is different The three MAC addresses are the same; or, the first MAC address, the second MAC address, and the third MAC address are different from each other.
示例性的,如下表1所示,为本发明实施例提供的至少一个MAC地址中包含的MAC地址(如第一MAC地址、第二MAC地址和第三MAC地址)的部分对应关系示例。 For example, as shown in Table 1 below, an example of a partial correspondence between MAC addresses (such as a first MAC address, a second MAC address, and a third MAC address) included in at least one MAC address provided by an embodiment of the present invention is shown.
表1Table 1
Figure PCTCN2017090645-appb-000001
Figure PCTCN2017090645-appb-000001
上述表1中列举的内容为第一MAC地址、第二MAC地址和第三MAC地址的部分对应关系,其还可以包括其他的对应关系,本发明实施例不再一一列举。The content listed in the foregoing Table 1 is a partial correspondence between the first MAC address, the second MAC address, and the third MAC address, and may further include other correspondences, which are not enumerated in the embodiments of the present invention.
需要说明的是,表1中MAC地址对应的数字相同时,则表示MAC地址相同,MAC地址对应的数字不同时,则表示MAC地址不同。例如,第一MAC地址、第二MAC地址和第三MAC地址均对应数字“1”,则表示第一MAC地址、第二MAC地址和第三MAC地址均相同;第一MAC地址和第二MAC地址对应数字“1”,第三MAC地址对应数字“2”,则表示第一MAC地址和第二MAC地址相同,且第二MAC地址与第三MAC地址不同。当然,本发明实施例还可以采用其他的标识来表示上述MAC地址,本发明实施例不再一一列举。It should be noted that when the numbers corresponding to the MAC addresses in Table 1 are the same, the MAC addresses are the same, and when the numbers corresponding to the MAC addresses are different, the MAC addresses are different. For example, the first MAC address, the second MAC address, and the third MAC address all correspond to the number “1”, indicating that the first MAC address, the second MAC address, and the third MAC address are the same; the first MAC address and the second MAC address. The address corresponds to the number "1", and the third MAC address corresponds to the number "2", indicating that the first MAC address and the second MAC address are the same, and the second MAC address is different from the third MAC address. Certainly, the foregoing embodiment of the present invention may also use other identifiers to represent the foregoing MAC address, which are not enumerated in the embodiments of the present invention.
S408、第一AP接收第二确认消息。S408. The first AP receives the second acknowledgement message.
S302、STA根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置。S302. The STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
其中,STA可以通过接收每个AP发送的信息以获取每个AP的位置信息,该位置信息包括每个AP的位置坐标。The STA may obtain location information of each AP by receiving information sent by each AP, where the location information includes location coordinates of each AP.
具体的,STA中的处理器100通过通信接口102与每个AP信息交互时,获得与每个AP信息交互时的信息传输的时刻,即处理器100可以获得至少三组“与AP信息交互时的信息传输的时刻”,处理器100可以根据至少三个AP的位置信息以及至少三组“与AP信息交互时的信息传输的时刻”,采用预先设定的公式计算出STA的位置。Specifically, when the processor 100 in the STA interacts with each AP information through the communication interface 102, the time of information transmission when interacting with each AP information is obtained, that is, the processor 100 can obtain at least three groups of “interacting with the AP information. The time of information transmission", the processor 100 may calculate the location of the STA according to the position information of at least three APs and at least three sets of "times of information transmission when interacting with the AP information".
示例性的,针对第一AP,处理器100可以通过通信接口102接收第一AP发送的位置信息;处理器100还可以通过通信接口102与第一AP信息交互,获得与第一AP信息交互时的信息传输的时刻,即第一时刻、第二时刻、第三时刻和第四时刻。相应的,处理器100与任一个AP信息交互时,可以获得四个与该AP对应的信息传输的时刻(即AP发送第一测量消息的时刻、STA接收第一测量消息的时刻、STA发送第一确认消息的时刻以及AP接收第一确认消息的时刻)。For example, for the first AP, the processor 100 may receive the location information sent by the first AP through the communication interface 102. The processor 100 may also interact with the first AP information through the communication interface 102 to obtain the interaction with the first AP information. The time of information transmission, that is, the first time, the second time, the third time, and the fourth time. Correspondingly, when the processor 100 interacts with any AP information, four times of information transmission corresponding to the AP can be obtained (ie, the time when the AP sends the first measurement message, the time when the STA receives the first measurement message, and the STA sends the The time of a confirmation message and the time when the AP receives the first confirmation message).
例如,此处仅以STA与三个AP信息交互为例,对STA计算STA的位置的具体实现方式进行说明。STA中的处理器100通过通信接口102接收的第一AP发送的位置信息为第一AP的位置坐标(x1,y1),处理器100通过通信接 口102与第一AP信息交互获得的第一时刻为T11时刻、第二时刻为T21时刻、第三时刻为T31时刻以及第四时刻为T41时刻;处理器100通过通信接口102接收的第二AP发送的位置信息为第二AP的位置坐标(x2,y2),处理器100通过通信接口102与第二AP信息交互获得的第一时刻为T12时刻、第二时刻为T22时刻、第三时刻为T32时刻以及第四时刻为T42时刻;处理器100通过通信接口102接收的第三AP发送的位置信息为第三AP的位置坐标(x3,y3)处理器100通过通信接口102与第三AP信息交互获得的第一时刻为T13时刻、第二时刻为T23时刻、第三时刻为T33时刻以及第四时刻为T43时刻。For example, the specific implementation manner in which the STA calculates the location of the STA is described by taking the interaction between the STA and the three APs as an example. The location information sent by the first AP received by the processor 100 in the STA through the communication interface 102 is the location coordinate (x 1 , y 1 ) of the first AP, and the processor 100 obtains the first interaction with the first AP information through the communication interface 102. The moment is T 11 time, the second time is T 21 time, the third time is T 31 time, and the fourth time is T 41 time; the position information sent by the second AP received by the processor 100 through the communication interface 102 is the second time. The position coordinate (x 2 , y 2 ) of the AP, the first time obtained by the processor 100 by interacting with the second AP information through the communication interface 102 is T 12 time, the second time is T 22 time, and the third time is T 32 time. And the fourth time is the time T 42 ; the location information sent by the third AP received by the processor 100 through the communication interface 102 is the location coordinate (x 3 , y 3 ) of the third AP, and the processor 100 passes the communication interface 102 and the third AP. The first time obtained by information interaction is T 13 time, the second time is T 23 time, the third time is T 33 time, and the fourth time is T 43 time.
处理器100可以将上述获得的各个参数代入预先设定的公式
Figure PCTCN2017090645-appb-000002
中,其中,c为信息传输的速度,一般采用光速,T1为第一时刻,T2为第二时刻,T3为第三时刻,T4为第四时刻,x和y分别为STA的位置的横坐标和纵坐标,xi和yi分别为AP的位置的横坐标和纵坐标;如此,得到三个如下方程:
The processor 100 can substitute the various parameters obtained above into a preset formula.
Figure PCTCN2017090645-appb-000002
Where c is the speed of information transmission, generally adopting the speed of light, T 1 is the first time, T 2 is the second time, T 3 is the third time, T 4 is the fourth time, and x and y are respectively STA The abscissa and ordinate of the position, x i and y i are the abscissa and ordinate of the position of the AP, respectively; thus, three equations are obtained:
Figure PCTCN2017090645-appb-000003
Figure PCTCN2017090645-appb-000003
Figure PCTCN2017090645-appb-000004
Figure PCTCN2017090645-appb-000004
Figure PCTCN2017090645-appb-000005
Figure PCTCN2017090645-appb-000005
其中,处理器100可以根据方程(1)、(2)和(3),计算出x和y,得到STA的位置坐标(x,y)。The processor 100 can calculate x and y according to the equations (1), (2), and (3) to obtain the position coordinates (x, y) of the STA.
进一步的,当STA与至少四个AP信息交互时,STA中的处理器100可以将获得的各个参数代入上述预先设定的公式中,得到至少四个方程,该至少四个方程可以组合为多个方程组,每个方程组中包含三个方程;处理器100可以根据多个方程组计算出多个x和多个y,然后计算多个x的平均值以及多个y的平均值,得到的多个x的平均值和多个y的平均值则为STA的位置坐标。如此计算的STA的位置更加准确。Further, when the STA interacts with the at least four AP information, the processor 100 in the STA may substitute the obtained parameters into the preset formula to obtain at least four equations, and the at least four equations may be combined into multiple Equations, each equation contains three equations; the processor 100 can calculate a plurality of x and a plurality of y according to a plurality of equations, and then calculate an average of the plurality of x and an average of the plurality of y to obtain The average of the plurality of x and the average of the plurality of y are the position coordinates of the STA. The position of the STA thus calculated is more accurate.
例如,假设处理器100与四个AP信息交互,得到四个方程(1)、(2)、(3)和(4);处理器100可以根据方程(1)、(2)、(3),计算出x和y,处理器100可以根据方程(1)、(2)、(4),计算出x和y,处理器100可以根据方程(1)、(3)、(4),计算出x和y,处理器100可以根据方程(2)、(3)、(4),计算出x和y;然后处理器100计算所有x的平均值,以及计算所有y的平均值,如此得到的x和y则为STA的更加准确的位置的坐标。For example, assume that processor 100 interacts with four AP information to obtain four equations (1), (2), (3), and (4); processor 100 can be based on equations (1), (2), (3) Calculating x and y, the processor 100 can calculate x and y according to equations (1), (2), (4), and the processor 100 can calculate according to equations (1), (3), (4). Excluding x and y, the processor 100 can calculate x and y according to equations (2), (3), (4); then the processor 100 calculates the average of all x and calculates the average of all y, thus obtaining The x and y are the coordinates of the more accurate position of the STA.
本发明实施例提供一种定位方法,STA可以与至少三个AP信息交互, 计算出STA的位置,实现定位功能;并且,由于STA在与每个AP信息交互时采用的MAC地址互不相同,当AP在计算STA的位置时,获得的多个方程来自不同MAC地址的STA,因此AP不知道哪三个方程是属于同一个STA的,AP无法计算出STA的位置,如此在不改变WiFi芯片设计的情况下,避免了STA的位置隐私泄露的问题。An embodiment of the present invention provides a positioning method, where an STA can interact with at least three AP information. Calculating the location of the STA to implement the positioning function; and, because the MAC addresses used by the STA when interacting with each AP information are different from each other, when the AP calculates the location of the STA, the obtained multiple equations are from STAs with different MAC addresses. Therefore, the AP does not know which three equations belong to the same STA, and the AP cannot calculate the location of the STA, thus avoiding the problem of STA location privacy leakage without changing the WiFi chip design.
进一步的,本发明实施例中,STA可以在计算STA的位置之前,通过与至少三个AP交互,获取每个AP的位置信息。具体的,如图5所示,其示出了本发明实施例提供的另一种定位方法,与图3所示的定位方法相比,主要是在S302之前增加了S501,在此只对不同的地方进行详细说明,参见图5,该定位方法包括:Further, in the embodiment of the present invention, the STA may acquire location information of each AP by interacting with at least three APs before calculating the location of the STA. Specifically, as shown in FIG. 5, it shows another positioning method provided by the embodiment of the present invention. Compared with the positioning method shown in FIG. 3, S501 is added before S302, and only different For details, refer to Figure 5. The positioning method includes:
S301、STA与至少三个AP信息交互,获得每个AP对应的传输时间信息。S301: The STA interacts with the at least three APs to obtain transmission time information corresponding to each AP.
其中,STA与至少三个AP信息交互时所采用的MAC地址互不相同。每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、STA接收第一测量消息的时刻、STA发送第一确认消息的时刻以及AP接收第一确认消息的时刻。The MAC addresses used by the STA to interact with the at least three APs are different from each other. The transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and a time when the AP receives the first confirmation message.
S501、STA接收至少三个AP分别发送的位置信息。S501. The STA receives location information that is sent by at least three APs.
其中,STA中的处理器100可以通过通信接口102与至少三个AP信息交互,获取每个AP的位置信息。例如,处理器100可以通过通信接口102接收每个AP发送的WiFi消息,该WiFi消息中携带有每个AP的位置信息。The processor 100 in the STA can interact with at least three APs through the communication interface 102 to obtain location information of each AP. For example, the processor 100 may receive, by using the communication interface 102, a WiFi message sent by each AP, where the WiFi message carries location information of each AP.
当然,STA还可以通过在存储器存储的数据库中查询获得;或者,STA可以接收一个AP发送的至少两个AP(该至少两个AP中包含该一个AP)的位置信息。需要说明的是,本发明实施例中对于STA获取至少三个AP的位置信息的方法不做限制。Of course, the STA can also obtain the query by using the database stored in the memory; or, the STA can receive the location information of at least two APs (the one AP of the at least two APs) sent by the AP. It should be noted that, in the embodiment of the present invention, the method for the STA to obtain the location information of at least three APs is not limited.
S302、STA根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置。S302. The STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
需要说明的是,本发明实施例中可以先执行S301,再执行S501;也可以先执行S501,再执行S301;还可以同时执行S301和S501。本发明实施例对于S301和S501执行的先后顺序不做限制。It should be noted that, in the embodiment of the present invention, S301 may be performed first, and then S501 may be performed; S501 may be performed first, then S301 may be performed; and S301 and S501 may be simultaneously executed. The embodiment of the present invention does not limit the order of execution of S301 and S501.
进一步的,本发明实施例中,STA可以使用预先生成的MAC地址列表中的MAC地址与AP信息交互。具体的,在S301或S401之前,本发明实施例的方法还可以包括S601。例如,与图3所示的定位方法相比,在S301之前,本发明实施例还包括S601,相应的S301可以替换为S301a,在此只对不同的地方进行详细说明,参见图6,该定位方法包括:Further, in the embodiment of the present invention, the STA may interact with the AP information by using the MAC address in the pre-generated MAC address list. Specifically, before the method of S301 or S401, the method of the embodiment of the present invention may further include S601. For example, compared with the positioning method shown in FIG. 3, before the S301, the embodiment of the present invention further includes S601, and the corresponding S301 can be replaced by S301a. Here, only different places are described in detail. Referring to FIG. 6, the positioning is performed. Methods include:
S601、STA生成MAC地址列表。S601. The STA generates a MAC address list.
其中,MAC地址列表中包括至少三个MAC地址。处理器100可以采用生成MAC地址列表的方式,保存多个MAC地址,以方便处理器100在与AP信息交互时使用。The MAC address list includes at least three MAC addresses. The processor 100 may save multiple MAC addresses in a manner of generating a MAC address list to facilitate the use of the processor 100 when interacting with the AP information.
例如,处理器100生成的MAC地址列表中包括第一MAC地址、第二MAC地址和第三MAC地址等。 For example, the MAC address list generated by the processor 100 includes a first MAC address, a second MAC address, a third MAC address, and the like.
S301a、STA根据MAC地址列表,按顺序使用MAC地址列表中的MAC地址分别与每个AP信息交互,获得每个AP对应的传输时间信息。S301a and STA respectively use the MAC address in the MAC address list to interact with each AP information in sequence according to the MAC address list, and obtain transmission time information corresponding to each AP.
其中,处理器100与每个AP信息交互采用的MAC地址互不相同,处理器100在与每个AP信息交互时,可以依次按顺序使用MAC地址列表中的MAC地址。The MAC address used by the processor 100 to interact with each AP information is different from each other. When the processor 100 interacts with each AP information, the MAC address in the MAC address list can be used in sequence.
示例性的,假设处理器100在与第一AP交互时使用的是MAC地址列表中的第一MAC地址,则在与第二AP交互时可以使用MAC地址列表中的第二MAC地址,在与第三AP交互时可以使用MAC地址列表中的第三MAC地址;若处理器100在与第一AP交互时使用的是MAC地址列表中的第一MAC地址和第二MAC地址,则在与第二AP交互时可以使用MAC地址列表中的第三MAC地址,在与第三AP交互时可以使用MAC地址列表中的第四MAC地址。Exemplarily, if the processor 100 uses the first MAC address in the MAC address list when interacting with the first AP, the second MAC address in the MAC address list may be used when interacting with the second AP. The third MAC address in the MAC address list may be used when the third AP interacts; if the processor 100 uses the first MAC address and the second MAC address in the MAC address list when interacting with the first AP, The third MAC address in the MAC address list may be used when the two APs interact, and the fourth MAC address in the MAC address list may be used when interacting with the third AP.
当然,本发明实施例中,STA还可以在生成MAC地址列表后,随机使用MAC地址列表中的MAC地址与至少三个AP信息交互。Of course, in the embodiment of the present invention, the STA may also use the MAC address in the MAC address list to interact with at least three AP information randomly after generating the MAC address list.
例如,假设处理器100在与第一AP交互时使用的是MAC地址列表中的第一MAC地址,处理器100在与第二AP交互时可以使用MAC地址列表中的第四MAC地址,在与第三AP交互时可以使用MAC地址列表中的第三MAC地址。For example, it is assumed that the processor 100 uses the first MAC address in the MAC address list when interacting with the first AP, and the processor 100 can use the fourth MAC address in the MAC address list when interacting with the second AP. The third MAC address in the MAC address list can be used when the third AP interacts.
S302、STA根据至少三个AP对应的传输时间信息以及至少三个AP的位置信息,计算STA的位置。S302. The STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
上述主要从STA的角度对本发明实施例提供的方案进行了介绍。可以理解的是,STA为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的STA及算法步骤,本发明能够以硬件,或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The solution provided by the embodiment of the present invention is mainly introduced from the perspective of the STA. It can be understood that, in order to implement the above functions, the STA includes corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art will readily appreciate that the present invention can be implemented in hardware, or a combination of hardware and computer software, in combination with the STA and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
本发明实施例可以根据上述方法示例对STA进行功能模块或者功能单元的划分,例如,可以对应各个功能划分各个功能模块或者功能单元,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块或者功能单元的形式实现。其中,本发明实施例中对模块或者单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present invention may perform the division of the function module or the function unit on the STA according to the foregoing method example. For example, each function module or function unit may be divided according to each function, or two or more functions may be integrated into one processing module. in. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules or functional units. The division of a module or a unit in the embodiment of the present invention is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
图7示出了上述实施例中所涉及的STA的一种可能的结构示意图。该STA700可以包括:获取模块701和计算模块702。FIG. 7 shows a possible structural diagram of the STA involved in the above embodiment. The STA 700 can include an obtaining module 701 and a computing module 702.
其中,获取模块701的功能可以通过图2所示的处理器100实现。计算模块702的功能可以通过图2所示的处理器100实现。The function of the obtaining module 701 can be implemented by the processor 100 shown in FIG. 2. The functionality of computing module 702 can be implemented by processor 100 shown in FIG.
其中,获取模块701用于支持上述实施例中的S301、S401、S403、S404、 S406、S407和S301a,和/或用于本文所描述的技术的其它过程。计算模块702用于支持上述实施例中的S302,和/或用于本文所描述的技术的其它过程。The obtaining module 701 is configured to support S301, S401, S403, and S404 in the foregoing embodiment. S406, S407, and S301a, and/or other processes for the techniques described herein. The calculation module 702 is for supporting S302 in the above embodiments, and/or other processes for the techniques described herein.
进一步的,如图8所示,针对第一AP,图7中的获取模块701可以包括:发送单元7001、接收单元7002和获取单元7003。其中,发送单元7001的功能可以通过图2所示的通信接口102实现。接收单元7002的功能可以通过图2所示的通信接口102实现。获取单元7003的功能可以通过图2所示的处理器100实现。Further, as shown in FIG. 8, for the first AP, the obtaining module 701 in FIG. 7 may include: a sending unit 7001, a receiving unit 7002, and an obtaining unit 7003. The function of the sending unit 7001 can be implemented by the communication interface 102 shown in FIG. 2. The function of the receiving unit 7002 can be implemented by the communication interface 102 shown in FIG. 2. The function of the obtaining unit 7003 can be implemented by the processor 100 shown in FIG. 2.
其中,发送单元7001用于支持上述实施例中的S401、S404和S407,和/或用于本文所描述的技术的其它过程。接收单元7002用于支持上述实施例中的S403和S406,和/或用于本文所描述的技术的其它过程。获取单元7003用于支持上述实施例中的S403和S404,和/或用于本文所描述的技术的其它过程。The transmitting unit 7001 is configured to support S401, S404, and S407 in the above embodiments, and/or other processes for the techniques described herein. The receiving unit 7002 is for supporting S403 and S406 in the above embodiments, and/or other processes for the techniques described herein. The obtaining unit 7003 is for supporting S403 and S404 in the above embodiments, and/or other processes for the techniques described herein.
进一步的,如图9所示,图7所示的STA 700还可以包括:接收模块703和生成模块704。其中,接收模块703的功能可以通过图2所示的通信接口102实现。生成模块704的功能可以通过图2所示的处理器100实现。Further, as shown in FIG. 9, the STA 700 shown in FIG. 7 may further include: a receiving module 703 and a generating module 704. The function of the receiving module 703 can be implemented by the communication interface 102 shown in FIG. 2. The functionality of the generation module 704 can be implemented by the processor 100 shown in FIG.
其中,接收模块703用于支持上述实施例中的S501,和/或用于本文所描述的技术的其它过程。生成模块704用于支持上述实施例中的S601,和/或用于本文所描述的技术的其它过程。The receiving module 703 is configured to support S501 in the above embodiments, and/or other processes for the techniques described herein. The generation module 704 is for supporting S601 in the above embodiments, and/or other processes for the techniques described herein.
当然,本发明实施例提供的STA 700包括但不限于上述所述的模块,例如STA 700中还可以包括存储模块。该存储模块的功能可以通过图2所示的存储器101实现。The STA 700 provided by the embodiment of the present invention includes, but is not limited to, the foregoing modules. For example, the STA 700 may further include a storage module. The function of the memory module can be implemented by the memory 101 shown in FIG.
在采用集成的单元的情况下,上述获取模块701、计算模块702、获取单元7003和生成模块704等可以集成在一个处理模块中实现,该处理模块可以是处理器100。发送单元7001、接收单元7002和接收模块703可以集成在一个通信模块中实现,该通信模块可以是通信接口102。In the case of an integrated unit, the above-mentioned obtaining module 701, the calculating module 702, the obtaining unit 7003, the generating module 704, and the like may be integrated into one processing module, and the processing module may be the processor 100. The transmitting unit 7001, the receiving unit 7002, and the receiving module 703 can be implemented by being integrated in one communication module, which can be the communication interface 102.
本发明实施例还提供一种计算机存储介质,该计算机存储介质中存储有一个或多个程序代码,当STA 10的处理器100执行该程序代码时,该STA 10执行图3-图6中任一附图中的相关方法步骤。The embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores one or more program codes, and when the processor 100 of the STA 10 executes the program code, the STA 10 performs the operations in FIG. 3-6. Related method steps in a drawing.
其中,本发明实施例提供的STA 10中各个模块的详细描述以及各个模块或单元执行图3-图6中任一附图中的相关方法步骤后所带来的技术效果可以参考本发明方法实施例中的相关描述,此处不再赘述。The detailed description of each module in the STA 10 and the technical effects of each module or unit performing the related method steps in any of the figures in FIG. 3 to FIG. 6 may be implemented by referring to the method of the present invention. The related descriptions in the examples are not described here.
本发明实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行图3-图6中任一附图中的相关方法步骤。Embodiments of the present invention also provide a computer program product that, when run on a computer, causes the computer to perform the associated method steps of any of Figures 3-6.
其中,本发明实施例提供的STA 10、STA 700、计算机存储介质或者计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。The STA 10, the STA 700, the computer storage medium, or the computer program product provided by the embodiments of the present invention are all used to perform the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the above provided. The beneficial effects in the corresponding methods are not described here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内 部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is illustrated. In practical applications, the above functions can be allocated according to needs. Completed by different functional modules, ie within the device The structure is divided into different functional modules to perform all or part of the functions described above. For the specific working process of the system, the device and the unit described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated 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 in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。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 application 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 storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution 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 storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. . Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (11)

  1. 一种定位方法,其特征在于,包括:A positioning method, comprising:
    站点STA与至少三个接入点AP信息交互,获得每个AP对应的传输时间信息;其中,所述STA与所述至少三个AP信息交互时所采用的介质访问控制MAC地址互不相同;所述每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、所述STA接收所述第一测量消息的时刻、所述STA发送第一确认消息的时刻以及AP接收所述第一确认消息的时刻;The station STA interacts with the at least three access point APs to obtain the transmission time information corresponding to each AP; wherein the media access control MAC address used by the STA to interact with the at least three APs is different from each other; The transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, a time when the STA sends the first confirmation message, and an AP receives the first The moment of confirming the message;
    所述STA根据所述至少三个AP对应的传输时间信息以及所述至少三个AP的位置信息,计算所述STA的位置。The STA calculates the location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  2. 根据权利要求1所述的方法,其特征在于,针对第一AP,所述第一AP为所述至少三个AP中任一AP,所述STA与所述第一AP信息交互,获得所述第一AP对应的传输时间信息,包括:The method according to claim 1, wherein, for the first AP, the first AP is any one of the at least three APs, and the STA interacts with the first AP information to obtain the The transmission time information corresponding to the first AP includes:
    所述STA接收所述第一AP发送的第一测量消息,并获取第一时刻;其中,所述第一测量消息中携带有第一MAC地址和所述第一AP的地址,所述第一时刻为所述STA接收所述第一测量消息的时刻;Receiving, by the STA, the first measurement message sent by the first AP, and acquiring a first time, where the first measurement message carries a first MAC address and an address of the first AP, where the first a time at which the STA receives the first measurement message;
    所述STA采用所述第一MAC地址在第二时刻向所述第一AP发送第一确认消息;其中,所述第一确认消息中携带有所述第一MAC地址和所述第一AP的地址;The STA sends the first acknowledgment message to the first AP by using the first MAC address, where the first acknowledgment message carries the first MAC address and the first AP address;
    所述STA接收所述第一AP发送的第二测量消息;其中,所述第二测量消息中携带第二MAC地址和所述第一AP的地址以及第三时刻和第四时刻,所述第三时刻为所述第一AP发送所述第一测量消息的时刻,所述第四时刻为所述第一AP接收所述第一确认消息的时刻;Receiving, by the STA, the second measurement message sent by the first AP, where the second measurement message carries a second MAC address and an address of the first AP, and a third time and a fourth time, where the a time when the first measurement message is sent by the first AP, where the fourth time is a time when the first AP receives the first confirmation message;
    所述STA采用所述第二MAC地址向所述第一AP发送第二确认消息,所述第二确认消息中携带有所述第二MAC地址和所述第一AP的地址。The STA sends the second acknowledgment message to the first AP by using the second MAC address, where the second acknowledgment message carries the second MAC address and the address of the first AP.
  3. 根据权利要求2所述的方法,其特征在于,所述第一MAC地址与所述第二MAC地址相同;The method of claim 2, wherein the first MAC address is the same as the second MAC address;
    或者,所述第一MAC地址与所述第二MAC地址不同。Or the first MAC address is different from the second MAC address.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在所述站点STA与至少三个接入点AP信息交互,获得每个AP对应的传输时间信息之前,所述方法还包括:The method according to any one of claims 1-3, wherein before the station STA interacts with at least three access point AP information to obtain transmission time information corresponding to each AP, the method further includes :
    所述STA生成MAC地址列表,所述MAC地址列表中包括至少三个MAC地址;The STA generates a MAC address list, where the MAC address list includes at least three MAC addresses;
    相应的,所述站点STA与至少三个接入点AP信息交互,获得每个AP对应的传输时间信息,包括:Correspondingly, the station STA interacts with the at least three APs to obtain the transmission time information corresponding to each AP, including:
    所述STA根据所述MAC地址列表,按顺序使用所述MAC地址列表中的MAC地址分别与每个AP信息交互,获得每个AP对应的传输时间信息。The STA uses the MAC address in the MAC address list to interact with each AP information in sequence according to the MAC address list to obtain transmission time information corresponding to each AP.
  5. 一种站点STA,其特征在于,包括:A station STA, characterized in that it comprises:
    获取模块,用于所述STA与至少三个接入点AP信息交互,获得每个AP对应的传输时间信息;其中,所述STA与所述至少三个AP信息交互时所采用 的介质访问控制MAC地址互不相同;所述每个AP对应的传输时间信息包括AP发送第一测量消息的时刻、所述STA接收所述第一测量消息的时刻、所述STA发送第一确认消息的时刻以及AP接收所述第一确认消息的时刻;An acquiring module, configured to: the STA interacts with the at least three access point APs to obtain transmission time information corresponding to each AP, where the STA uses the interaction with the at least three AP information. The media access control MAC addresses are different from each other; the transmission time information corresponding to each AP includes a time when the AP sends the first measurement message, a time when the STA receives the first measurement message, and the STA sends the first confirmation. a moment of the message and a time at which the AP receives the first confirmation message;
    计算模块,用于根据所述至少三个AP对应的传输时间信息以及所述至少三个AP的位置信息,计算所述STA的位置。And a calculation module, configured to calculate a location of the STA according to the transmission time information corresponding to the at least three APs and the location information of the at least three APs.
  6. 根据权利要求5所述的STA,其特征在于,针对第一AP,所述第一AP为所述至少三个AP中任一AP,所述获取模块,具体包括:The STA according to claim 5, wherein, for the first AP, the first AP is any one of the at least three APs, and the acquiring module specifically includes:
    接收单元,用于接收所述第一AP发送的第一测量消息;其中,所述第一测量消息中携带有第一MAC地址和所述第一AP的地址;a receiving unit, configured to receive a first measurement message sent by the first AP, where the first measurement message carries a first MAC address and an address of the first AP;
    获取单元,用于获取第一时刻,所述第一时刻为所述接收单元接收所述第一测量消息的时刻;An acquiring unit, configured to acquire a first moment, where the first moment is a moment when the receiving unit receives the first measurement message;
    发送单元,用于采用所述第一MAC地址在第二时刻向所述第一AP发送第一确认消息,所述第一确认消息中携带有所述第一MAC地址和所述第一AP的地址;a sending unit, configured to send, by using the first MAC address, a first acknowledgement message to the first AP, where the first acknowledgement message carries the first MAC address and the first AP address;
    所述接收单元,还用于接收所述第一AP发送的第二测量消息;其中,所述第二测量消息中携带第二MAC地址和所述第一AP的地址以及第三时刻和第四时刻,所述第三时刻为所述第一AP发送所述第一测量消息的时刻,所述第四时刻为所述第一AP接收所述第一确认消息的时刻;The receiving unit is further configured to receive a second measurement message sent by the first AP, where the second measurement message carries a second MAC address and an address of the first AP, and a third time and a fourth time. a moment at which the third time is the time when the first AP sends the first measurement message, and the fourth time is a time when the first AP receives the first confirmation message;
    所述发送单元,还用于采用所述第二MAC地址向所述第一AP发送第二确认消息,所述第二确认消息中携带有所述第二MAC地址和所述第一AP的地址。The sending unit is further configured to send, by using the second MAC address, a second acknowledgment message to the first AP, where the second acknowledgment message carries the second MAC address and an address of the first AP .
  7. 根据权利要求6所述的STA,其特征在于,所述第一MAC地址与所述第二MAC地址相同;The STA according to claim 6, wherein the first MAC address is the same as the second MAC address;
    或者,所述第一MAC地址与所述第二MAC地址不同。Or the first MAC address is different from the second MAC address.
  8. 根据权利要求5-7任一项所述的STA,其特征在于,所述STA还包括:The STA according to any one of claims 5-7, wherein the STA further comprises:
    生成模块,用于在所述获取模块在所述STA与至少三个接入点AP信息交互,获得每个AP对应的传输时间信息之前,生成MAC地址列表,所述MAC地址列表中包括至少三个MAC地址;a generating module, configured to generate, by the acquiring module, a MAC address list, where the MAC address list includes at least three, before the STA interacts with the at least three access point APs to obtain transmission time information corresponding to each AP MAC address;
    相应的,所述获取模块,具体用于:Correspondingly, the obtaining module is specifically configured to:
    根据所述MAC地址列表,按顺序使用所述MAC地址列表中的MAC地址分别与每个AP信息交互,获得每个AP对应的传输时间信息。According to the MAC address list, the MAC addresses in the MAC address list are used to interact with each AP information in sequence, and the transmission time information corresponding to each AP is obtained.
  9. 一种站点STA,其特征在于,所述STA包括:处理器、存储器和通信接口;A STA is characterized in that: the STA includes: a processor, a memory, and a communication interface;
    所述存储器用于存储计算机执行指令,所述处理器、所述通信接口与所述存储器通过总线连接,当所述STA运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述STA执行如权利要求1-4中任一项所述的定位方法。The memory is configured to store a computer execution instruction, the processor, the communication interface is connected to the memory by a bus, and when the STA is running, the processor executes the computer execution instruction stored by the memory, The STA is caused to perform the positioning method according to any one of claims 1-4.
  10. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在一个站点STA上运行时,使得所述STA执行如权利要求1-4中任一 项所述的定位方法。A computer readable storage medium, comprising computer instructions that, when executed on a station STA, cause the STA to perform any of claims 1-4 The positioning method described in the item.
  11. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-4中任一项所述的定位方法。 A computer program product, characterized in that, when the computer program product is run on a computer, the computer is caused to perform the positioning method according to any one of claims 1-4.
PCT/CN2017/090645 2017-03-03 2017-06-28 Positioning method and device WO2018157529A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780068509.1A CN109906622B (en) 2017-03-03 2017-06-28 Positioning method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710124887 2017-03-03
CN201710124887.9 2017-03-03

Publications (1)

Publication Number Publication Date
WO2018157529A1 true WO2018157529A1 (en) 2018-09-07

Family

ID=63371124

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090645 WO2018157529A1 (en) 2017-03-03 2017-06-28 Positioning method and device

Country Status (2)

Country Link
CN (1) CN109906622B (en)
WO (1) WO2018157529A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282842A (en) * 2014-06-30 2016-01-27 上海酷远物联网科技有限公司 Handheld terminal precise positioning method
CN105891866A (en) * 2016-03-31 2016-08-24 北京金山安全软件有限公司 Positioning method and device and electronic equipment
US9474041B1 (en) * 2013-10-30 2016-10-18 Marvell International Ltd. Method and apparatus for determining a location of a network device in a wireless network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379437A (en) * 2012-04-28 2013-10-30 华为终端有限公司 Wireless terminal positioning method, related device and related system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9474041B1 (en) * 2013-10-30 2016-10-18 Marvell International Ltd. Method and apparatus for determining a location of a network device in a wireless network
CN105282842A (en) * 2014-06-30 2016-01-27 上海酷远物联网科技有限公司 Handheld terminal precise positioning method
CN105891866A (en) * 2016-03-31 2016-08-24 北京金山安全软件有限公司 Positioning method and device and electronic equipment

Also Published As

Publication number Publication date
CN109906622B (en) 2020-12-08
CN109906622A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
US11412400B2 (en) Method for positioning reference design
JP5774722B2 (en) Providing positioning support to mobile stations via a self-organizing network
WO2020063323A1 (en) Positioning method and apparatus
US11646973B2 (en) Method for managing hardware resource, method for querying location of hardware resource, and related apparatus
US10356561B2 (en) Tracking a person in a group of people
RU2610250C2 (en) Transmission node and buffer status reporting method
JP2006527542A (en) MAC protocol for accurately calculating the location of a wireless device in a building
TW201724894A (en) Secure fine timing measurement protocol
WO2018161962A1 (en) Method, electronic device and system for sharing images
WO2018142263A1 (en) Method and system for selection of an access and mobility management function in an access network environment
JP2018509703A (en) Method, apparatus and system for identity authentication
TWI718714B (en) Request processing method, system, device and equipment in alliance chain
WO2020207096A1 (en) Method for performing positioning in 5g scenarios, positioning platform and user terminal
US11770458B1 (en) Systems for exchanging data using intermediate devices
CN111565435B (en) Communication method and access network equipment
JP2013132052A (en) Partner discovery/selection method, device and system
WO2022199402A1 (en) Cell access method, user equipment, and base station
CN111431638B (en) Channel model parameter method and device
WO2018157529A1 (en) Positioning method and device
CN111565437A (en) Communication method and access network equipment
US20220070956A1 (en) Secondary path configuration
CN111565436B (en) Communication method and access network equipment
CN111565434A (en) Communication method and access network equipment
US11785423B1 (en) Delivery of geographic location for user equipment (UE) in a wireless communication network
WO2017063177A1 (en) Signal determining 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: 17898687

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: 17898687

Country of ref document: EP

Kind code of ref document: A1