Antenna reference direction acquisition method, device, equipment, medium and product

By establishing a target coordinate system for multiple APs and calculating the target angle of the AP to be measured, the problem of inaccurate positioning of the antenna reference direction is solved, and the positioning accuracy of the terminal equipment is improved.

CN119835753APending Publication Date: 2025-04-15RUIJIE NETWORKS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311322092.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-12
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, the positioning of the antenna reference direction is inaccurate, resulting in an angle offset of the coordinate system of the AP, reducing the positioning accuracy of the terminal device.

Method used

By establishing a target coordinate system for multiple APs, determining the AP to be tested and its associated neighbor AP, obtaining the arrival angle of the neighbor AP to be tested, and using the target coordinate system and the arrival angle to calculate the target angle of the AP to be tested, thereby determining its target antenna reference direction.

Benefits of technology

By optimizing the arrival angle between the AP to be tested and the neighbor AP, the accuracy of the target angle is improved, the accuracy of the target antenna reference direction of the AP to be tested is ensured, and the positioning accuracy of the terminal device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835753A_ABST
    Figure CN119835753A_ABST
Patent Text Reader

Abstract

The invention provides an antenna reference direction acquisition method and device, equipment, a medium and a product. The antenna reference direction acquisition method comprises the following steps: establishing a target coordinate system for a plurality of APs; determining an AP to be tested from the plurality of APs, and obtaining a neighbor AP associated with the AP to be tested from the plurality of APs; obtaining the arrival angle of the neighbor AP relative to the AP to be detected; calculating a target included angle corresponding to the to-be-measured AP by using the target coordinate system and the arrival angle of the neighbor AP, the target included angle being an included angle between a target antenna reference direction of the to-be-measured AP and an X axis of the target coordinate system; and determining a target antenna reference direction of the AP to be measured according to the target included angle. According to the method provided by the invention, the antenna reference direction of the AP is solved, so that the acquisition accuracy of the antenna reference direction of the terminal equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to communication technology, and in particular to a method, device, equipment, medium and product for obtaining antenna reference direction. Background Art

[0002] The measurement-based positioning technology may include a terminal device to be positioned and two or more anchor points, where the anchor point may be a wireless access point (AP). The angular positioning angle / arrival angle (AOA) and distance of the AP relative to the terminal device may be collected based on the AP coordinate system, and the position of the terminal device may be calculated in combination with the arrival angle and distance corresponding to the AP to obtain the location point of the terminal device.

[0003] At present, in order to obtain the arrival angle of the AP, it is generally necessary to establish a coordinate system with the AP position point as the coordinate origin, and determine the arrival angle of the AP through the coordinate system. In order to determine the coordinate system with the AP position point as the coordinate origin, the AP coordinate system is generally obtained with the AP position as the coordinate origin and the AP antenna reference direction as the Y axis. The antenna reference direction can be used to determine the arrival angle of the AP.

[0004] However, in actual applications, the AP's placement angle, placement posture, etc. may cause inaccurate positioning of the antenna reference direction, reverse deviation, and angle offset of the AP's coordinate system, thereby reducing the positioning accuracy of the terminal device. Summary of the invention

[0005] The present application provides a method, device, equipment, medium and product for obtaining antenna reference direction, which are used to solve the technical problem that the positioning of the antenna reference direction is inaccurate, reverse deviation occurs, the AP coordinate system has an angle offset, and the positioning accuracy of the terminal device is reduced.

[0006] In a first aspect, the present application provides a method for obtaining an antenna reference direction, comprising:

[0007] Establish target coordinate systems for multiple APs;

[0008] Determine an AP to be tested from the multiple APs, and obtain a neighbor AP associated with the AP to be tested from the multiple APs;

[0009] Obtaining the arrival angle of the neighbor AP relative to the AP to be measured;

[0010] Calculate the target angle corresponding to the AP to be measured by using the target coordinate system and the arrival angle of the neighbor AP, where the target angle is the angle between the target antenna reference direction of the AP to be measured and the X-axis of the target coordinate system;

[0011] A target antenna reference direction of the AP to be measured is determined according to the target angle.

[0012] In a second aspect, the present application provides an antenna reference direction acquisition device, comprising:

[0013] Establishing unit, used to establish target coordinate system for multiple APs;

[0014] An acquiring unit, configured to determine an AP to be tested from the multiple APs, and acquire a neighbor AP associated with the AP to be tested from the multiple APs;

[0015] An angle unit, used to obtain the arrival angle of the neighbor AP relative to the AP to be measured;

[0016] A calculation unit, configured to calculate a target angle corresponding to the AP to be measured by using the target coordinate system and the arrival angle of the neighbor AP, wherein the target angle is an angle between a target antenna reference direction of the AP to be measured and an X-axis of the target coordinate system;

[0017] A determination unit is used to determine a target antenna reference direction of the AP to be measured according to the target angle.

[0018] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0019] The memory stores computer-executable instructions;

[0020] The processor executes the computer-executable instructions stored in the memory to implement the antenna reference direction acquisition method as described in the first aspect and various possibilities of the first aspect.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the antenna reference direction acquisition method as described in the first aspect and various possibilities of the first aspect.

[0022] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the antenna reference direction acquisition method as described in the first aspect and various possibilities of the first aspect.

[0023] The antenna reference direction acquisition method provided in the present application can first establish a target coordinate system for multiple APs in order to obtain the antenna reference direction of an AP, obtain the AP to be tested from multiple APs, and obtain the neighbor AP associated with the A to be tested among the multiple APs. The arrival angle of the neighbor AP relative to the AP to be tested can be obtained. Afterwards, the target angle of the AP to be tested can be calculated using the target coordinate system and the arrival angle of the neighbor AP. The target angle of the AP to be tested can be the angle between the target antenna reference direction of the AP to be tested and the X-axis of the target coordinate system, and then the target antenna reference direction of the AP to be tested is determined according to the target angle. The target antenna reference direction of the AP to be tested is solved. By optimizing the arrival angles of the AP to be tested and the neighbor AP, a more accurate target angle is used to determine the target antenna reference direction of the AP to be tested, so that the target antenna reference direction of the AP to be tested is an optimized direction with higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0025] Figure 1 An example diagram of a triangulation positioning principle provided in an embodiment of the present application;

[0026] Figure 2 An example diagram of a triangulation solution method provided in an embodiment of the present application;

[0027] Figure 3 An example diagram of a three-dimensional coordinate system provided in an embodiment of the present application;

[0028] Figure 4 An example diagram of positioning based on an antenna array plan view provided in an embodiment of the present application;

[0029] Figure 5 A system architecture diagram for implementing a method for acquiring an antenna reference direction provided in an embodiment of the present application;

[0030] Figure 6 A flowchart of an embodiment of a method for obtaining an antenna reference direction provided in an embodiment of the present application;

[0031] Figure 7 An example diagram of a point map provided in an embodiment of the present application;

[0032] Figure 8 A flowchart of another embodiment of a method for obtaining an antenna reference direction provided in an embodiment of the present application;

[0033] Fig. 9 An example diagram of an angle of an AP to be tested provided in an embodiment of the present application;

[0034] Fig.10 An example diagram of obtaining an antenna reference direction provided in an embodiment of the present application;

[0035] Fig.11 A flowchart of another embodiment of a method for obtaining an antenna reference direction provided in an embodiment of the present application;

[0036] Fig.12 A schematic diagram of the structure of an embodiment of a device for obtaining a reference direction of an antenna provided in an embodiment of the present application;

[0037] Fig.13 A block diagram of an electronic device provided in an embodiment of the present application.

[0038] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0040] First, the terms involved in this application are explained:

[0041] Wireless Access Point (AP): refers to the router in a wireless network, which is responsible for network access for wireless clients.

[0042] Angle of Arrival (AOA): refers to the direction of arrival between an AP and an unknown node, which is sensed by hardware devices in a ranging-based positioning algorithm. The angle of arrival can be used to represent the relative direction or angle between an unknown node and an AP. The position of an unknown node can be calculated by combining the angle of arrival of an anchor point with triangulation and other methods.

[0043] The technical solution of the present application can be applied to the device positioning scenario of a wireless communication system. By solving the antenna reference direction of the deployed AP, the antenna reference direction of the AP is made consistent with the actual deployment, thereby improving the accuracy of the measurement of the AP's arrival angle. The calculated antenna reference direction is then used to collect the AP's arrival angle, thereby more accurately positioning the terminal device to be positioned.

[0044] Currently, the measurement and positioning technology based on AOA can refer to the technology of positioning unknown nodes through APs based on the principle of triangulation positioning. For example, Figure 1 This is an example diagram of the triangulation positioning principle. Assume that both nodes A and B are AP nodes with known locations, and the unknown node to be located is node P. The location of node P can be solved using nodes A and B. Specifically, a ray a can be formed by connecting nodes P with node A as the endpoint. Another ray b can be formed by connecting nodes P with node B as the endpoint.

[0045] When node A is taken as the origin of the three-dimensional coordinate system, the arrival angle of node A relative to node P can be determined by ray a. When node B is taken as the origin of the three-dimensional coordinate system, the arrival angle of node B relative to node P can be determined by ray b.

[0046] Furthermore, the triangle positioning principle may refer to using the collected arrival angles to perform triangle position calculation on the P node. Specifically, Figure 2 As shown, the A node, B node and P node can be connected, and the angle can be determined by the above arrival angle θ1. The angle is determined by the above arrival angle θ2 The length r1 of line segment AP is the distance between node A and node P, and the length r2 of line segment BP is the distance between node B and node P. Combining the position of point A (x1, y1) and the position of point B (x2, y2), the position of point P (x, y) can be obtained by solving the following formula:

[0047] The value of i is 1 or 2.

[0048] Figure 3 An example diagram of a three-dimensional coordinate system is shown. Figure 3 As shown, the coordinate origin 301 of the three-dimensional coordinate system can be an AP with a known position, and the ray formed by the line connecting the AP and the unknown node is 302. The angle between the ray 302 and the Z axis can be the pitch angle θ, and the angle between the ray 202 and the X axis can be the azimuth angle Therefore, the arrival angle corresponding to the AP in the three-dimensional coordinate system can include the above-mentioned pitch angle θ and azimuth angle

[0049] In practical applications, the Z axis can represent the height of the node. In this embodiment, the focus is on the coordinate point of the unknown node in the horizontal plane, that is, the plane of the X axis and the Y axis in the embodiment of the present application. Therefore, when solving the node, the arrival angle can refer to the azimuth, that is, in the two-dimensional plane coordinate system corresponding to the X axis and the Y axis, the arrival angle can refer to the azimuth Azimuth It refers to the angle between the projection 303 of the ray formed by the AP and the unknown node in the two-dimensional plane coordinate system and the X axis. The arrival angles involved in other embodiments of the present application are all azimuth angles in the two-dimensional plane coordinate system.

[0050] Therefore, setting a high-precision coordinate system for the AP is the key to accurately positioning unknown nodes.

[0051] In the related art, in order to determine the plane coordinate system of the AP, an antenna array plane diagram can be set. Figure 3 As shown, the antenna plan view can be set in a two-dimensional plane corresponding to the X-axis and the Y-axis, and can include 6 positioning points, namely positioning points 1-6. The above 6 positioning points can be located on the same circle, and the center point of the circle is AP301. Two positioning points, that is, positioning point 1 and positioning point 4 are located on the Y-axis, and the other positioning points are evenly distributed on both sides of the Y-axis. The coordinate system of the AP can be determined by the Y-axis formed by the two positioning points in the above antenna array plan view and the AP position point. The Y-axis determined in the antenna array plan view of the AP is the antenna reference direction of the AP. Therefore, after the antenna reference direction is determined, the azimuth in the arrival angle of the AP can be determined.

[0052] However, in actual applications, affected by the placement and posture of the AP, the coordinate system determined by the antenna array plan set for the AP deviates from the actual coordinate system of the AP.

[0053] like Figure 4 In the positioning example diagram shown, the antenna array plan of node A on the left has no deviation relative to the actual coordinate system of node A, and its collected angle φ1 is accurate, while the antenna array plan of node B on the right has deviation relative to the actual coordinate system of node B. The angle φ2 determined for node B by the antenna array plan does not match the actual angle φ2′ corresponding to node B. In actual applications, the arrival angle between node B and node P obtained by the antenna array plan is still used. It corresponds to φ2, and the sum of the two is 90, but φ2 is inaccurate, and the actual arrival angle collected is also inaccurate. When positioning is performed using this arrival angle and the arrival angle collected by node A, φ2 is calculated using the arrival angle, and the P1 node obtained by φ2 calculation deviates from the actual P2 node, resulting in inaccurate positioning of the P node. In practical applications, it is not possible to determine whether there is a deviation between the actual coordinate system of the node and the coordinate system indicated by the antenna array plan. Therefore, how to determine the antenna reference direction of each known node is a technical problem that needs to be solved urgently.

[0054] In order to solve the above problems, in an embodiment of the present application, in order to obtain the antenna reference direction of the AP, a target coordinate system can be first established for multiple APs, the AP to be tested is obtained from the multiple APs, and the neighbor AP associated with the test A among the multiple APs is obtained. The arrival angle of the neighbor AP relative to the AP to be tested can be obtained. Afterwards, the target angle of the AP to be tested can be calculated using the target coordinate system and the arrival angle of the neighbor AP. The target angle of the AP to be tested can be the angle between the target antenna reference direction of the AP to be tested and the X-axis of the target coordinate system, and then the target antenna reference direction of the AP to be tested is determined according to the target angle. The target antenna reference direction of the AP to be tested is solved. By optimizing the arrival angles of the AP to be tested and the neighbor AP, the target antenna reference direction of the AP to be tested is determined using a more accurate target angle, so that the target antenna reference direction of the AP to be tested is an optimized direction with higher accuracy.

[0055] The antenna reference direction acquisition method provided in the present application is intended to solve the above technical problems in the prior art.

[0056] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0057] like Figure 5 As shown, it is a system architecture diagram for implementing a method for acquiring antenna reference direction provided by an embodiment of the present application, and the system may include: multiple APs 501 and terminal devices 502, and electronic devices 503. Among them, the electronic device 503 may be configured with the method for acquiring antenna reference direction provided by an embodiment of the present application.

[0058] Specifically, multiple APs 501 may be connected to form a dotted map. The electronic device 503 may establish a target coordinate system for multiple APs, determine an AP to be tested from the multiple APs, and obtain neighboring APs associated with the AP to be tested from the multiple APs.

[0059] After that, the arrival angle of the neighbor AP relative to the AP to be tested can also be obtained. The arrival angle of each neighbor AP can be used to determine the target antenna reference direction of the AP to be tested. In other words, the target angle of the AP to be tested can be calculated using the target coordinate system and the arrival angle of the neighbor AP. The target angle is the angle between the target antenna reference direction of the AP to be tested and the X-axis of the target coordinate system. The target antenna reference mode of the AP to be tested can then be determined by the target angle.

[0060] Determining the AP to be tested from the multiple APs may include determining each of the multiple APs as the AP to be tested in turn, or determining the AP that needs to adjust the antenna reference direction as the AP to be tested based on the configuration requirements of each AP.

[0061] Furthermore, a positioning test may be performed on the antenna reference direction configured for each AP to obtain a positioning test result corresponding to each AP, and a corresponding configuration requirement may be determined based on the positioning test result corresponding to each AP.

[0062] Specifically, the positioning test result corresponding to the AP and the actual position of the terminal can be calculated to perform error calculation to obtain the positioning error, and the configuration requirements of the AP can be determined based on the positioning error. If the positioning error is less than the error threshold, it is determined that the configuration requirements of the AP do not need to adjust the antenna reference direction. If the positioning error is greater than or equal to the error threshold, it is determined that the configuration requirements of the AP need to adjust the antenna reference direction.

[0063] Optionally, the neighbor AP associated with the AP to be tested includes at least one.

[0064] The target antenna reference direction of the AP to be tested can be used for positioning processing of the terminal device to obtain the location point of the terminal device. By using the more accurate target antenna reference direction of the AP to be tested to position the terminal device, the positioning accuracy of the terminal device can be improved.

[0065] like Figure 6 FIG. 1 is a flowchart of an embodiment of a method for obtaining an antenna reference direction provided by an embodiment of the present application, and the method can be configured in an electronic device. The method for obtaining an antenna reference direction in this embodiment may include the following steps:

[0066] 601. Establish a target coordinate system for multiple APs.

[0067] The target coordinate system may be a coordinate system established based on any two APs among the multiple APs.

[0068] Further, step 601 may include: determining two adjacent APs from a plurality of APs, and establishing a target coordinate system based on the two adjacent APs.

[0069] Optionally, the multiple APs may be access points in a wireless network, for example, the APs may be routers or base stations in the wireless network. The multiple APs in the wireless network may be connected to form a dot map.

[0070] In this embodiment, determining two adjacent APs from multiple APs may include acquiring two adjacent APs from the multiple APs based on a point map corresponding to the multiple APs. The two adjacent APs may refer to two APs that can communicate directly without passing through other APs.

[0071] Furthermore, before step 601, the method may further include: obtaining multiple APs in the wireless network, and establishing a point map corresponding to the multiple APs based on a positioning algorithm of fine time measurement (FTM for short). Specifically, two adjacent APs may be connected based on the FTM algorithm to obtain a point map corresponding to the multiple APs.

[0072] Figure 7 An example diagram of a point map is shown. Figure 7 Seven APs are shown, namely AP1-AP7, and adjacent APs are connected to each other to form a dot map.

[0073] 602. Determine an AP to be tested from multiple APs, and obtain neighboring APs associated with the AP to be tested from the multiple APs.

[0074] Optionally, determining the AP to be tested from the multiple APs may include: traversing the multiple APs and sequentially acquiring APs whose antenna reference directions are not determined as the APs to be tested. That is, one AP to be tested may be selected sequentially from the multiple APs.

[0075] In addition, determining the AP to be tested from multiple APs may include: obtaining the signal strengths corresponding to the multiple APs, and sorting the signal strengths corresponding to the multiple APs in order from high to low to obtain multiple sorted APs, and selecting the first N APs from the sorted multiple APs, and the first N APs may be respectively used as the APs to be tested. Selecting an AP with higher signal strength from multiple APs as the AP to be tested, optimizing the antenna reference direction of the AP to be tested, and using the AP to be tested with higher signal strength and more accurate antenna reference direction to participate in the positioning of the terminal device can further improve the positioning effect of the terminal device. The signal strength of the AP may refer to a value obtained by detecting the signal strength of the AP through a signal strength test tool. The signal strength test tool may be configured in the AP to perform a test on the signal loudness of the AP.

[0076] The AP to be tested may include at least one.

[0077] If there is only one AP to be tested for adjusting the antenna reference direction, multiple groups of antennas may be set at the AP to be tested and the terminal device may be positioned by utilizing antenna switching of the multiple groups of antennas.

[0078] If there are two or more APs to be tested whose antenna reference direction is adjusted, the terminal device can be positioned using the triangulation positioning principle provided in the above embodiment. The AP to be tested can be a node with a known location, and the terminal device can be a node to be tested with an unknown location.

[0079] Optionally, obtaining neighbor APs associated with the AP to be tested from among the multiple APs may include: based on a dot map composed of the multiple APs, obtaining APs adjacent to the AP to be tested as neighbor APs. Further, based on the dot map, the APs that are connected to the AP to be tested from among the multiple APs may be queried, and the APs that are connected to the AP to be tested may be used as neighbor APs.

[0080] 603. Obtain the arrival angle of the neighbor AP relative to the AP to be measured.

[0081] The arrival angle of the neighbor AP relative to the AP to be measured may include the angle between the line segments corresponding to the neighbor AP and the AP to be measured and the original antenna reference direction. The original antenna reference direction is an inaccurate antenna reference direction, so the arrival angle is inaccurate.

[0082] The original antenna reference direction may include the antenna reference direction of the AP to be tested determined based on the antenna plane array diagram of the AP to be tested.

[0083] Wherein, step 603 may include: using a super-resolution algorithm to obtain the arrival angle of the neighbor AP relative to the AP to be tested. The arrival angle may refer to the arrival angle of the neighbor AP relative to the AP to be tested. During the arrival angle test, the AP to be tested may be used as an unknown node, and the neighbor AP may be used as a known node to measure the arrival angle of the neighbor AP relative to the AP to be tested. The arrival angle may refer to the direction angle, specifically, the angle between the line segments corresponding to the neighbor AP and the AP to be tested and the original antenna reference direction.

[0084] 604. Calculate the target angle of the AP to be measured by using the target coordinate system and the arrival angle of the neighboring AP. The target angle is the angle between the target antenna reference direction of the AP to be measured and the X-axis of the target coordinate system.

[0085] Optionally, the target antenna reference direction may be an antenna reference direction of an AP to be measured.

[0086] Wherein, step 604 may include: performing angle correction processing on the arrival angle of the neighbor AP according to the target coordinate system to obtain the target angle of the AP to be measured.

[0087] 605. Determine a target antenna reference direction of the AP to be tested based on the target angle.

[0088] Wherein, step 605 may include: determining a direction whose included angle with the X-axis of the target coordinate system is a target included angle as a target antenna reference direction of the AP to be measured.

[0089] Furthermore, the AP to be measured may be used as the endpoint of the ray, and the direction of the ray whose angle with the X-axis of the target coordinate system is the target angle may be used as the target antenna reference direction of the AP to be measured.

[0090] In an embodiment of the present application, in order to obtain the antenna reference direction of an AP, a target coordinate system may be first established for multiple APs, an AP to be tested may be obtained from multiple APs, and a neighbor AP associated with the AP to be tested A among multiple APs may be obtained. The arrival angle of the neighbor AP relative to the AP to be tested may be obtained. Afterwards, the target angle of the AP to be tested may be calculated using the target coordinate system and the arrival angle of the neighbor AP. The target angle of the AP to be tested may be the angle between the target antenna reference direction of the AP to be tested and the X-axis of the target coordinate system, and then the target antenna reference direction of the AP to be tested is determined based on the target angle, and the target antenna reference direction of the AP to be tested is solved. By optimizing the arrival angles of the AP to be tested and the neighbor AP, a more accurate target angle is used to determine the target antenna reference direction of the AP to be tested, so that the target antenna reference direction of the AP to be tested is an optimized direction with higher accuracy.

[0091] In order to calculate the antenna reference direction of the AP to be tested, Figure 8 As shown, it is a flowchart of another embodiment of a method for obtaining an antenna reference direction provided in an embodiment of the present application, which is different from the above-mentioned embodiment in that step 603 may include:

[0092] 801. Determine a coordinate axis angle between an X-axis of a target coordinate system and the target line segment based on a target line segment obtained by connecting the AP to be measured and a neighboring AP.

[0093] The target line segment may refer to a straight line where the AP to be measured and the neighboring APs are located. The coordinate axis angle may be an angle between an X-axis of the target coordinate system and the target line segment.

[0094] Further, the coordinate axis angle may be a clockwise angle from the target line segment to the X-axis of the target coordinate system.

[0095] In a possible design, if the target coordinate system is established based on the AP to be measured and the neighbor AP, that is, the AP to be measured and the neighbor AP are located on the X-axis of the target coordinate system and the location point of the AP to be measured is the coordinate origin, then the angle between the coordinate axes is 0.

[0096] In another possible design, if the AP to be measured is not located on the X-axis of the target coordinate system, the coordinate axis angle is not 0 degrees. Fig. 9 An example diagram of the angle of the AP to be tested is shown. When AP3 is used as the AP to be tested, it can be determined that AP2 is the neighbor AP of AP3. The coordinate axis angle ψ between the target line segment 901 obtained by connecting AP2 and AP3 and the X-axis 902 of the target coordinate system is shown as 903.

[0097] Optionally, step 801 may include: calculating a coordinate axis angle between a target line segment formed by connecting the AP to be tested and the neighbor AP and the X-axis of the target coordinate system according to the coordinate position of the AP to be tested and the coordinate position of the neighbor AP in the target coordinate system. Further, a trigonometric formula may be used to calculate the angle between the target line segment formed by connecting the AP to be tested and the neighbor AP and the X-axis of the target coordinate system in combination with the coordinate position of the AP to be tested and the coordinate position of the neighbor AP in the target coordinate system to obtain the coordinate axis angle.

[0098] 802. Determine a target angle of the AP to be measured based on the arrival angle corresponding to the neighbor AP and the coordinate axis angle.

[0099] Optionally, step 802 may include using the coordinate axis angle to perform angle offset calculation on the arrival angle of the neighbor AP to obtain a target angle of the AP to be measured.

[0100] The antenna reference direction acquisition method provided in the embodiment of the present application uses the target line segment obtained by connecting the AP to be tested and the neighboring AP to determine the coordinate axis angle between the X-axis and the straight line of the target coordinate system during the calculation of the initial antenna reference direction of the AP to be tested, and determines the target angle of the AP to be tested by using the coordinate axis angle and the arrival angle. The target angle of the AP to be tested is optimized by using the coordinate axis angle, so that the target angle effectively reflects the angular offset of the antenna reference direction of the AP to be tested relative to the X-axis. When the target antenna reference direction of the AP to be tested is determined by the target angle, the directional accuracy of the target antenna reference direction can be improved.

[0101] Further, based on any of the above embodiments, determining a target angle of the AP to be measured based on the arrival angle corresponding to the neighboring AP and the coordinate axis angle includes:

[0102] The arrival angle corresponding to the neighbor AP is added to the angle between the coordinate axes to obtain the angle sum.

[0103] If the angle sum is less than 360 degrees, the angle sum is determined as the comprehensive angle of the neighboring APs.

[0104] If the sum of the angles is greater than or equal to 360 degrees, subtract the sum of the angles from 360 degrees to obtain the comprehensive angle of the neighboring AP.

[0105] The target angle of the AP to be tested is calculated using the comprehensive angles of neighboring APs.

[0106] Optionally, adding and summing the arrival angle corresponding to the neighbor AP and the coordinate axis angle to obtain the angle sum may include: adding and summing the absolute value of the arrival angle corresponding to the neighbor AP and the absolute value of the coordinate axis angle corresponding to the neighbor AP to obtain the angle sum.

[0107] Optionally, there may be multiple neighboring APs, and calculating the target angle of the AP to be measured using the comprehensive angles of the neighboring APs may include: calculating the target angle of the AP to be measured using comprehensive angles corresponding to the multiple neighboring APs respectively.

[0108] The antenna reference direction acquisition method provided in the embodiment of the present application adds the arrival angle and the coordinate angle to obtain the angle sum. The angle sum can reflect the angle of the target line segment relative to the antenna reference direction. However, the antenna reference direction is not determined at this time, and the angle sum may be greater than 360 degrees. Therefore, by comparing the angle sum with 360, the comprehensive angle corresponding to the neighbor AP can be determined, and the comprehensive angle corresponding to the angle of the target line segment relative to the antenna reference direction can be obtained, and then the comprehensive angle corresponding to the neighbor AP is used to calculate the target angle of the AP to be tested, so that the target angle of the AP to be tested reflects the angle between the neighbor AP and the theoretical antenna reference direction, and the target angle corresponding to the antenna reference direction can be accurately obtained.

[0109] For ease of understanding, Fig.10 An example diagram of obtaining an antenna reference direction is shown. Fig.10 As shown, multiple APs are AP1, AP2, AP3 and AP4. The coordinate system is established based on AP1 and AP2. Assume that AP1 is the AP to be tested, and the APs adjacent to the AP to be tested are AP2, AP3 and AP4. Among them, AP2 can be located on the X-axis of the first coordinate system, and AP3 and AP4 can be located in the first quadrant of the first coordinate system. Of course, in actual applications, each AP can be distributed in any quadrant of the target coordinate system.

[0110] like Fig.10 As shown in FIG. 1 , assuming that among AP2, AP3 and AP4, AP2 and AP4 are neighboring APs of AP1, the coordinate axis angle ψ2 between AP2 and the X-axis can be obtained, and the actual value is 0°. The coordinate axis angle ψ4 between AP4 and the X-axis can be obtained, and the value can be 71.56°, for example. The arrival angle corresponding to AP2 is The arrival angle corresponding to AP4 is The direction 1001 pointed by the arrival angle is theoretically the antenna reference direction used when collecting the arrival angle, but the antenna reference direction is inaccurate.

[0111] Furthermore, according to Fig.10 The AP2 shown corresponds to ψ2 and The angle sum corresponding to AP2 is obtained by adding and summing. If the angle sum is less than 360 degrees, it can be determined that the angle sum is the comprehensive angle of AP2. Fig.10 The AP4 shown corresponds to ψ4 and By adding and summing, the angle sum corresponding to AP4 can be obtained. If the angle sum is less than 360 degrees, the angle sum can be directly determined as the comprehensive angle. The target angle of the AP to be tested can be calculated by the comprehensive angle of AP2 and the comprehensive angle of AP4. Assume that the calculated target angle is Δ AP , assuming that the target angle Δ AP exist Fig.10 The direction shown is ray 1002, and the direction indicated by the ray 1002 is the target antenna reference direction.

[0112] As an optional implementation manner, the neighbor AP may include at least one, and the target angle of the AP to be measured is calculated based on the comprehensive angle of the neighbor AP, including:

[0113] A target weight corresponding to at least one neighbor AP is determined.

[0114] According to the target weight and the comprehensive angle respectively corresponding to at least one neighboring AP, a weighted sum of angles is performed to obtain the target angle of the AP to be measured.

[0115] Optionally, the target angle of the antenna reference direction of the AP to be tested relative to the X-axis can be calculated using the following formula:

[0116]

[0117] Among them, Δ k is the comprehensive angle, α k is the target weight of the kth neighbor AP, and n is the number of APs with at least one neighbor AP.

[0118] Δ k It can be expressed as:

[0119]

[0120] is the arrival angle of the kth neighbor AP, ψ k is the coordinate axis angle of the kth neighbor AP.

[0121] Optionally, the target weight of each neighbor AP can be determined according to the distance between each neighbor AP and the AP to be tested. A neighbor AP that is closer to the AP to be tested can be given a larger weight, and a neighbor AP that is farther from the AP to be tested can be given a smaller weight.

[0122] Exemplarily, the distance between each neighbor AP and the AP to be measured may be calculated respectively, and the distance of each neighbor AP may be normalized to obtain the target weight of each neighbor AP.

[0123] The antenna reference direction acquisition method provided in the embodiment of the present application, the comprehensive angle of each neighbor AP can represent the offset angle of the theoretical antenna reference direction relative to the X-axis, and weighting is performed using the comprehensive angle corresponding to at least one neighbor AP to achieve balanced calculation of the comprehensive angles corresponding to one or more neighbor APs, so as to obtain the comprehensive angle that comprehensively considers the comprehensive angle corresponding to at least one neighbor AP, so that the target angle can more accurately represent the angle between the antenna reference direction and the X-axis, with higher precision and accuracy.

[0124] In a possible design, establishing a target coordinate system for multiple APs may include:

[0125] Two coordinate APs are selected from the plurality of APs.

[0126] The target coordinate system is established with the line corresponding to the two coordinate APs as the X-axis and any coordinate AP as the coordinate origin.

[0127] Optionally, selecting two coordinate APs from a plurality of APs may include selecting two adjacent coordinate APs from a plurality of APs. The coordinate AP may refer to an AP from a plurality of APs that participates in establishing a coordinate system. The coordinate AP may be the same as or different from the AP to be measured. Of course, the coordinate AP may be the same as or different from a neighboring AP of the AP to be measured. In this embodiment, the selection of the coordinate AP is not excessively limited.

[0128] In a possible design, one of the two coordinate APs may be an AP to be measured and the other may be a neighboring AP of the AP to be measured.

[0129] The antenna reference direction acquisition method provided in the embodiment of the present application can establish a target coordinate system using two APs selected from multiple APs, so that the establishment of the target coordinate system is closely related to multiple APs. When acquiring the antenna reference direction of each AP, the coordinate system closely related to it is used for solution, thereby improving the accuracy of the solution.

[0130] like Fig.11 As shown, it is a flowchart of another embodiment of a method for obtaining an antenna reference direction provided in an embodiment of the present application, which is different from the above-mentioned embodiment in that obtaining neighboring APs associated with the AP to be tested among multiple APs in step 602 may include:

[0131] 1101. Determine a candidate AP adjacent to an AP to be tested among the multiple APs based on a point map corresponding to the multiple APs.

[0132] Optionally, the dot map may be obtained by connecting two APs among multiple APs.

[0133] Further, step 1101 may include: determining a node of the AP to be tested in the dot map, acquiring an associated node in the dot map that is connected to the node of the AP to be tested, and using the AP referred to by the associated node as a candidate AP for the vector of the AP to be tested.

[0134] 1102. Obtain the distance between the AP to be tested and the candidate AP.

[0135] Optionally, the distance between any two APs may refer to an FTM distance, and specifically may refer to a distance between two APs measured by an FTM algorithm.

[0136] 1103. Select a neighbor AP that participates in antenna reference direction correction of the AP to be measured from the candidate APs according to the distances and signal strengths corresponding to the candidate APs.

[0137] Optionally, step 1103 may include: selecting a primary candidate AP whose distance satisfies a distance condition and whose signal strength satisfies a first signal strength condition from at least one candidate AP according to the distance and signal strength corresponding to the candidate AP. Selecting a secondary candidate AP whose distance satisfies a distance condition and whose signal strength satisfies a second signal strength condition from at least one candidate AP according to the distance and signal strength corresponding to the candidate AP.

[0138] The distance condition may refer to that the distance of the candidate AP satisfies the line-of-sight propagation condition. The first signal strength condition may refer to that the signal strength of the candidate AP is greater than a first strength threshold. The second signal strength condition may refer to that the signal strength of the candidate AP is greater than a second strength threshold. The first strength threshold is greater than the second strength threshold.

[0139] The antenna reference direction acquisition method provided in the embodiment of the present application can first determine the candidate APs adjacent to the AP to be tested, and select a neighbor AP that participates in the antenna reference direction correction of the AP to be tested from at least one candidate AP according to the distance and signal strength between each candidate AP and the AP to be tested. By associating the selection of the AP terminal confidence condition with the distance and signal strength between the candidate AP and the AP to be tested, more accurate and reliable neighbor AP selection can be achieved.

[0140] On the basis of any of the above embodiments, step 1103, selecting a neighbor AP that participates in the antenna reference direction correction of the AP to be measured from the candidate APs according to the distance and signal strength corresponding to the candidate APs, may include:

[0141] According to the distances and signal strengths corresponding to the candidate APs, a primary candidate AP whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than a first strength threshold is determined from the candidate APs.

[0142] If the number of the primary candidate AP is greater than or equal to the AP number threshold, the primary candidate AP is determined to be a neighbor AP.

[0143] Optionally, satisfying the line-of-sight propagation condition may mean that the distance between the candidate AP and the AP to be measured is within the line-of-sight (LOS) range. Further, satisfying the line-of-sight propagation condition may mean that the distance between the candidate AP and the AP to be measured is less than or equal to the line-of-sight range. The line-of-sight range may be the distance at which the transmitting antenna and the receiving antenna can "see" each other, and "seeing" may mean that the two terminals can receive each other's signals. Not satisfying the line-of-sight propagation condition may mean that the distance between the candidate AP and the AP to be measured is at the non-line-of-sight (NLOS) range, that is, the distance between the candidate AP and the AP to be measured is greater than the line-of-sight distance.

[0144] Exemplarily, determining whether the candidate AP meets the line-of-sight propagation condition may refer to determining whether the distance between the candidate AP and the AP to be tested is less than the line-of-sight. If so, the candidate AP meets the line-of-sight propagation condition, and if not, the candidate AP does not meet the line-of-sight propagation condition.

[0145] The AP quantity threshold may refer to the minimum number of terminals participating in the positioning of the terminal device. For more accurate positioning, the AP quantity threshold may be set to 2 or a positive integer greater than 2. Of course, in extreme cases, the AP quantity threshold may also be set to 1, and the positioning of the terminal device is completed by one AP. The specific value of the AP quantity threshold is not excessively limited in this application.

[0146] The antenna reference direction acquisition method provided in the embodiment of the present application can first use the distance to make a line-of-sight judgment when selecting a neighbor AP through the distance and signal strength between each candidate AP and the AP to be tested, and obtain a main candidate AP that meets the line-of-sight propagation condition and has a signal strength greater than the first strength threshold. The obtained main candidate AP not only meets the line-of-sight propagation condition, but also has a signal strength greater than the first strength threshold, so as to confirm whether the candidate AP can participate in the antenna reference direction solution process from the two directions of distance and signal strength, so that the main candidate AP participating in the antenna reference direction solution has a higher credibility, thereby improving the accuracy of the target antenna reference direction.

[0147] Further, on the basis of any of the above embodiments, after determining, from the candidate APs, a primary candidate AP whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than the first strength threshold, according to the distance and signal strength corresponding to the candidate APs, the method further includes:

[0148] If the number of primary candidate APs is less than the AP number threshold, a secondary candidate AP whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than a second strength threshold is determined from the remaining candidate APs, and the second strength threshold is less than the first strength threshold.

[0149] Based on the primary candidate AP and the secondary candidate AP, a neighbor AP is determined.

[0150] Optionally, the first strength threshold and the second strength threshold may be a signal-to-noise ratio (SNR) pre-set according to the communication quality, and the signal unit of SNR is dB. Of course, correspondingly, the signal strength of each AP may also refer to SNR. Of course, the signal strength may also be represented by other concepts of communication quality, such as signal power, received signal strength (RSSI), and the like.

[0151] For example, the first intensity threshold may be 30 dB, and the second intensity threshold may be 25 dB. Of course, the first intensity threshold and the second intensity threshold may also be set according to the user's usage requirements. The above intensity threshold values ​​are only exemplary and should not constitute a specific limitation on the first intensity threshold and the second intensity threshold.

[0152] After the primary candidate AP and the secondary candidate AP are obtained, the primary candidate AP and the secondary candidate AP may be directly used as neighbor APs.

[0153] The antenna reference direction acquisition method provided in the embodiment of the present application can select a secondary candidate AP with a signal strength greater than a second strength threshold from the candidate APs that meet the line-of-sight propagation condition when the number of primary candidate APs is less than the AP number threshold, and the second strength threshold is less than the first strength threshold. When the first strength threshold is used as the screening condition, if the number of primary candidate APs obtained is small, the screening condition of the signal strength is relaxed, and a secondary candidate AP of the next level is selected, and then the primary candidate AP and the secondary candidate AP are used to determine the neighbor AP, so that the AP number of the neighbor AP can be greater than or equal to the AP number threshold, thereby achieving effective selection of the neighbor AP, meeting the use requirements of the antenna reference direction, and then more accurately solving the antenna reference direction of the AP to be tested.

[0154] In a possible design, after selecting a neighbor AP that participates in antenna reference direction correction of the AP to be measured from at least one candidate AP according to the distance and signal strength corresponding to the candidate AP, the method further includes:

[0155] Set the same confidence value for each primary candidate AP;

[0156] Normalizing the confidence values ​​of the primary candidate APs to obtain first weights corresponding to the primary candidate APs;

[0157] The target weight of the neighbor AP is determined according to the first weight of each primary candidate AP.

[0158] Optionally, setting the same confidence value for each primary candidate AP may refer to setting the confidence values ​​of each primary candidate AP to be equal. Exemplarily, assuming that the number of the AP to be tested is m, the confidence value of each primary candidate AP may be set to:

[0159] α m,1 =α m,2 =α m,3 =…=α m,q , where q is the number of APs with at least one neighbor AP.

[0160] The confidence values ​​of each primary candidate AP are normalized and calculated using the following formula:

[0161] wi=α m,i / (α m,1 +α m,2 +α m,3 +…+α m,q ), i is the i-th primary neighbor AP.

[0162] The wi calculated by the above formula may be the first weight of each primary candidate AP.

[0163] When the neighboring APs consist of primary candidate APs or if the number of primary candidate APs is greater than or equal to the AP number threshold, the first weight of each primary candidate AP may be directly determined as the corresponding target weight.

[0164] The antenna reference direction acquisition method provided in the embodiment of the present application can set the same confidence value for at least one primary candidate AP after obtaining the primary candidate AP, and obtain the first weights corresponding to each primary candidate AP by normalizing the confidence values ​​of each primary candidate AP. Through normalization calculation, the first weights of each primary candidate AP can be accurately obtained, and then the target weights of neighboring APs can be determined, and then when the target weights of neighboring APs are used to perform weighted calculation of angles, more accurate calculation results can be obtained, and the calculation accuracy of the target angle can be improved.

[0165] Further, based on any of the above embodiments, after determining from multiple APs that a line-of-sight propagation result is a secondary candidate AP that satisfies the line-of-sight propagation condition and whose signal strength is greater than a second strength threshold, the method may further include:

[0166] The total number of primary candidate APs and secondary candidate APs is determined.

[0167] If the total number of APs is less than the AP number threshold, then, in addition to the obtained primary candidate AP and secondary candidate AP, the first N candidate APs with the highest signal strength ranking are selected from the remaining APs whose line-of-sight propagation results meet the line-of-sight propagation conditions among multiple APs. N is the difference between the AP number threshold and the total number of APs.

[0168] The AP quantity threshold may refer to the minimum number of APs that can be used to locate the terminal device. Referring to the description of the above embodiment, the AP quantity threshold may be 2, or a positive integer greater than 2.

[0169] A possible implementation of this scenario is that the primary candidate AP is empty and the number of secondary candidate APs is 1. In this case, the first N candidate APs with the highest signal strength may be further selected.

[0170] In this embodiment, when the total number of primary candidate APs and secondary candidate APs selected under the constraints of the first strength threshold and the second strength threshold still does not reach the AP number threshold, the top N candidate APs ranked by signal strength can be selected from the remaining APs that meet the line-of-sight propagation condition, so that the number of selected neighbor APs can meet the AP number threshold, and on-demand selection is achieved, so that the number of neighbor APs participating in the antenna reference direction solution can meet the usage requirements.

[0171] In a possible design, after determining, from the remaining candidate APs, a secondary candidate AP whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than a second strength threshold, the method further includes:

[0172] According to the distances corresponding to the candidate APs, it is determined that none of the candidate APs meet the line-of-sight propagation condition.

[0173] According to the signal strength of the candidate APs, the first K candidate APs with the strongest signal strength are determined as neighboring APs.

[0174] Optionally, determining the top K candidate APs with the strongest signal strength as neighbor APs based on the signal strength of the candidate APs may include: sorting at least one candidate AP according to the signal strength corresponding to the at least one candidate AP to obtain at least one sorted candidate AP; and determining the top K candidate APs with the strongest signal strength as at least one neighbor AP from the at least one sorted candidate AP.

[0175] K is the minimum number of APs required to participate in antenna reference direction solution. K can be a positive integer greater than or equal to 1.

[0176] In this embodiment, when at least one candidate AP does not meet the line-of-sight propagation condition, the first K candidate APs with the strongest signal strength can be directly determined from the sorted candidate APs according to the signal strength of the candidate APs as neighbor APs. This allows the number of selected neighbor APs to meet the AP number requirement, enabling on-demand selection, and the number of neighbor APs participating in the antenna reference direction solution to meet the usage requirements, thereby obtaining a more accurate target antenna reference direction.

[0177] Furthermore, after the neighbor AP is determined based on the primary candidate AP and the secondary candidate AP, the method further includes:

[0178] A confidence value is set for the primary candidate AP, and the confidence value of the primary candidate AP is normalized to obtain a first weight of the primary candidate AP.

[0179] According to the first weight of the primary candidate AP, the second weight of the secondary candidate AP is calculated in combination with the signal strength of the primary candidate AP and the signal strength of the secondary candidate AP.

[0180] The first weight of the primary candidate AP and the second weight of the secondary candidate AP are normalized and calculated to obtain a target weight of the primary candidate AP corresponding to the neighbor AP and a target weight of the secondary candidate AP corresponding to the neighbor AP.

[0181] From the description of the first weight of the primary candidate AP in the above embodiment, it can be seen that each primary candidate AP can be represented by the formula wi=α m,i / (α m,1 +α m,2 +α m,3 +…+α m,q ), i is the i-th primary neighbor AP, and the first weight of each primary candidate AP is calculated.

[0182] On this basis, the second weight of each secondary candidate AP may be calculated according to the first weight of each primary candidate AP, combined with the signal strength of each primary candidate AP and the signal strength of each secondary candidate AP.

[0183] Specifically, according to the weight of each main candidate AP, combined with the signal strength of each main candidate AP and the signal strength of each secondary candidate AP, the second weight of each secondary candidate AP is calculated, which may include: calculating the difference between the signal strength of the main candidate AP and the signal strength of the secondary candidate AP to obtain the strength difference, calculating the product of the first weight and the strength difference to obtain the target value, converting the target value into decimal, and obtaining the second weight of the secondary candidate AP.

[0184] The unit of the target value is dB. Converting the target value to decimal can specifically refer to the conversion formula:

[0185] NdB=10*log10(N). The target value can be converted into a decimal second weight by using this conversion formula.

[0186] That is, the calculation formula of the second weight can be expressed as:

[0187] tj=wi*(signal strength of the primary candidate AP-signal strength of the secondary candidate AP), where j is the jth secondary candidate AP.

[0188] After obtaining the first weight wi of each primary candidate AP and the second weight tj of each secondary candidate AP, each weight may be normalized to obtain a target weight of each neighbor AP.

[0189] That is, for the primary candidate AP, its corresponding target weight can be expressed as:

[0190] α k =wi / (∑wi+∑tj), k is the sequence number of the primary candidate AP in at least one neighboring AP;

[0191] For the primary candidate weight, its corresponding target weight can be expressed as:

[0192] α k =ti / (∑wi+∑tj), k is the sequence number of the secondary candidate AP in at least one neighboring AP.

[0193] Exemplarily, it is assumed that there is 1 primary candidate AP and 1 secondary candidate AP. For example, in the above example, AP2 is the primary candidate AP and AP4 is the secondary candidate AP. The first weight of AP2 can be 1. The signal strength of AP2 can be subtracted from the signal strength of AP4 to obtain the strength difference, for example, (37dB-28dB)=9dB. The strength difference is converted to decimal, that is, 9dB is converted to decimal, and the second weight of the secondary candidate AP can be obtained: 0.126. Therefore, the first weight of the primary candidate AP is 1 and the second weight of the secondary candidate AP is 0.126. The target weight of the primary candidate AP is 0.8882, and the target weight of the secondary candidate AP is 0.1118.

[0194] In addition, determining the second weight of each candidate AP by signal strength is merely exemplary. In actual applications, the second weight of each candidate AP may be determined by other methods, such as distance comparison, random setting, etc. This embodiment does not impose too many restrictions on this.

[0195] The antenna reference direction acquisition method provided in the embodiment of the present application can first determine the first weight of each primary candidate AP when the at least one neighbor AP obtained includes a primary candidate AP and a secondary candidate AP, and then use the first weight of each primary candidate AP, combined with the signal strength of each primary candidate AP and the signal strength of each secondary candidate AP, to calculate the second weight of each secondary candidate AP. The calculation of the second weight is affected by the first weight of the primary candidate AP, thereby improving the calculation accuracy of the second weight. By normalizing the first weight of each primary candidate AP and the second weight of each secondary candidate AP, the target weight corresponding to at least one neighbor AP is obtained. The target weight calculation process of each neighbor AP is affected by the credibility and signal strength of the neighbor AP, thereby improving the calculation accuracy of the target weight of each neighbor AP.

[0196] Further, based on any of the above embodiments, after obtaining the target antenna reference direction of each AP through steps 601-603, the target antenna reference directions corresponding to multiple APs can be used to locate the terminal device to obtain the target location point of the terminal device.

[0197] Utilizing the target antenna reference directions corresponding to multiple APs to locate the terminal device and obtain the target location point of the terminal device can include: obtaining the target antenna reference directions corresponding to at least two APs to be tested, taking the terminal device as an unknown node and at least two APs to be tested as anchor nodes, collecting the arrival angles corresponding to at least two APs to be tested relative to the terminal device, and according to the arrival angles corresponding to at least two APs to be tested and in combination with the location points corresponding to at least two APs to be tested, obtaining the target location point of the terminal device through triangulation positioning principle solution.

[0198] Optionally, before executing step 604, the method may further include: determining terminal information of the terminal device in response to a positioning request initiated by the terminal device. The terminal information may include, for example, a terminal name, connection information with each AP, etc. The connection information with each AP may include a communication connection status between the terminal device and each AP. The communication connection status may include connected or not connected.

[0199] The above method may further include: determining, based on the connection information between the terminal device and each AP, that the AP whose communication connection state with the terminal device is connected is the AP to be tested. In order to realize the positioning of the terminal device, the AP to be tested may include at least two.

[0200] like Fig.12As shown, it is a structural schematic diagram of an embodiment of an antenna reference direction acquisition device provided in an embodiment of the present application. The device can be configured with the above-mentioned antenna reference direction acquisition method. The device can be located in an electronic device. The antenna reference direction acquisition device 1200 may include: an establishment unit 1201, an acquisition unit 1202, an angle unit 1203, a calculation unit 1204 and a determination unit 1205.

[0201] Establishing unit 1201 is used to establish a target coordinate system for multiple APs. Acquisition unit 1202 is used to determine the AP to be tested from multiple APs, and obtain neighbor APs associated with the AP to be tested from multiple APs. Angle unit 1203 is used to obtain the arrival angle of the neighbor AP relative to the AP to be tested. Calculation unit 1204 is used to calculate the target angle corresponding to the AP to be tested using the target coordinate system and the arrival angle of the neighbor AP, the target angle being the angle between the target antenna reference direction of the AP to be tested and the X-axis of the target coordinate system. Determination unit 1205 is used to determine the target antenna reference direction of the AP to be tested based on the target angle.

[0202] As an embodiment, the computing unit includes:

[0203] The angle calculation module is used to determine the coordinate axis angle between the X-axis of the target coordinate system and the target line segment based on the target line segment obtained by connecting the AP to be tested and the neighboring AP.

[0204] The target calculation module is used to determine the target angle of the AP to be measured based on the arrival angle corresponding to the neighboring AP and the coordinate axis angle.

[0205] As another embodiment, the target calculation module may include:

[0206] The angle addition submodule is used to add the arrival angle corresponding to the neighbor AP and the angle between the coordinate axes to obtain the angle sum.

[0207] The first calculation submodule is configured to determine the angle sum as a comprehensive angle of neighboring APs if the angle sum is less than 360 degrees.

[0208] The second calculation submodule is configured to, if the angle sum is greater than or equal to 360 degrees, subtract the angle sum from 360 degrees to obtain a comprehensive angle of the neighboring AP.

[0209] The target calculation submodule is used to calculate the target angle of the AP to be tested by using the comprehensive angle of the neighboring APs.

[0210] As yet another embodiment, the neighbor AP includes at least one target calculation submodule, specifically configured to:

[0211] Determine the target weight corresponding to at least one neighbor AP. Perform weighted summation of angles based on the target weight and comprehensive angle corresponding to at least one neighbor AP to obtain the target angle of the AP to be measured.

[0212] As yet another embodiment, the acquisition unit includes:

[0213] The candidate acquisition module is used to determine a candidate AP adjacent to the AP to be tested among the multiple APs based on the point map corresponding to the multiple APs.

[0214] The distance acquisition module is used to obtain the distance between the candidate AP and the AP to be tested.

[0215] The candidate selection module is used to select a neighbor AP that participates in the antenna reference direction correction of the AP to be tested from the candidate APs according to the distance and signal strength corresponding to the candidate APs.

[0216] As yet another embodiment, the candidate selection module includes:

[0217] The first acquisition submodule is used to determine, from the candidate APs, a primary candidate AP whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than a first strength threshold, according to the distances and signal strengths corresponding to the candidate APs.

[0218] The first determination submodule is configured to determine that the primary candidate AP is a neighbor AP if the number of APs of the primary candidate AP is greater than or equal to an AP number threshold.

[0219] As yet another embodiment, the candidate selection module further includes:

[0220] The second acquisition submodule is used to determine, if the number of primary candidate APs is less than the AP number threshold, secondary candidate APs whose distances meet the line-of-sight propagation condition and whose signal strengths are greater than a second strength threshold from the remaining candidate APs, where the second strength threshold is less than the first strength threshold.

[0221] The second determination submodule is used to determine a neighbor AP based on the primary candidate AP and the secondary candidate AP.

[0222] As yet another embodiment, it further includes:

[0223] The confidence setting unit is used to set the same confidence value for each primary candidate AP.

[0224] The confidence normalization unit is used to perform normalization calculation on the confidence value of each primary candidate AP to obtain the first weight corresponding to each primary candidate AP.

[0225] The first determining unit is used to determine a target weight of a neighbor AP according to first weights respectively corresponding to each primary candidate AP.

[0226] As yet another embodiment, it further includes:

[0227] The second determining unit is used to set a confidence value for the primary candidate AP and perform normalization calculation on the confidence value of the primary candidate AP to obtain a first weight of the primary candidate AP.

[0228] The third determining unit is configured to calculate a second weight of the secondary candidate AP according to the first weight of the primary candidate AP and in combination with the signal strength of the primary candidate AP and the signal strength of the secondary candidate AP.

[0229] The weight normalization unit is used to perform normalization calculation on the first weight of the primary candidate AP and the second weight of the secondary candidate AP to obtain the target weight of the primary candidate AP corresponding to the neighbor AP and the target weight of the secondary candidate AP corresponding to the neighbor AP.

[0230] As yet another embodiment, it further includes:

[0231] The fourth determining unit is configured to determine, according to the distances corresponding to the candidate APs, that none of the candidate APs meets the line-of-sight propagation condition.

[0232] The fifth determining unit is configured to determine, according to the signal strengths of the candidate APs, first K candidate APs with the strongest signal strengths as neighboring APs.

[0233] As yet another embodiment, a unit is established, comprising:

[0234] The coordinate selection unit is used to select two coordinate APs from multiple APs.

[0235] The coordinate establishing unit is used to establish a target coordinate system with the connecting line corresponding to the two coordinate APs as the X-axis and any one of the coordinate APs as the coordinate origin.

[0236] The antenna reference direction acquisition method provided in the present application can be applied to any existing communication system, such as the fourth generation mobile communication technology (English: the 4th generation mobile communication technology, abbreviated as 4G), the fifth generation mobile communication technology (English: the 5th generation mobile communication technology, abbreviated as 5G) and other communication systems. It should be noted that the communication system can be applicable to different network standards, for example, it can be applicable to global mobile communication (English: Global System of Mobile communication, abbreviated as GSM), code division multiple access (English: Code Division Multiple Access, abbreviated as CDMA), wideband code division multiple access (English: Wideband Code Division Multiple Access, abbreviated as WCDMA), time division synchronous code division multiple access (English: Time Division-Synchronous Code Division Multiple Access, abbreviated as TD-SCDMA), long term evolution (English: Long Term Evolution, abbreviated as LTE) system and future 5G and other network standards. Optionally, the above communication system can be a system in a scenario of ultra-reliable and low-latency communications (English: Ultra-Reliable and Low Latency Communications, URLLC) transmission in a 5G communication system.

[0237] Therefore, optionally, the above-mentioned base station can be a base station (English: Base TransceiverStation, abbreviated as BTS) and / or a base station controller in GSM or CDMA, or a base station (English: NodeB, abbreviated as NB) and / or a wireless network controller (English: Radio Network Controller, abbreviated as RNC) in WCDMA, or an evolved base station (English: Evolutional Node B, abbreviated as eNB or eNodeB) in LTE, or a relay station or access point, or a base station in a future 5G network (English: gNodeB, abbreviated as gNB), etc., and the present application is not limited here.

[0238] The above-mentioned terminal equipment or electronic equipment can be a wireless terminal or a wired terminal. The wireless terminal can be a device that provides voice and / or other business data connectivity to users, a handheld device with wireless connection function, or other processing equipment connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via a radio access network (English: Radio Access Network, abbreviated as RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal. For example, it can be a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges language and / or data with the radio access network. For another example, the wireless terminal can also be a personal communication service (English: Personal Communication Service, abbreviated as PCS) phone, a cordless phone, a session initiation protocol (English: Session Initiation Protocol, abbreviated as SIP) phone, a wireless local loop (English: Wireless Local Loop, abbreviated as WLL) station, a personal digital assistant (English: Personal Digital Assistant, abbreviated as PDA) and other devices. A wireless terminal may also be referred to as a system, a subscriber unit (English: Subscriber Unit), a subscriber station (English: Subscriber Station), a mobile station (English: Mobile Station), a mobile station (English: Mobile), a remote station (English: Remote Station), a remote terminal (English: Remote Terminal), an access terminal (English: Access Terminal), a user terminal (English: User Terminal), a user agent (English: User Agent), a user device (English: User Device or User Equipment), and is not limited here. Optionally, the above-mentioned terminal device may also be a smart watch, a tablet computer, or other device.

[0239] Fig.13 It is a block diagram of an electronic device according to an exemplary embodiment, which device may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0240] The device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .

[0241] The processing component 1302 generally controls the overall operation of the device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.

[0242] The memory 1304 is configured to store various types of data to support the operation of the device 1300. Examples of such data include instructions for any application or method operating on the device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (English: Static Random Access Memory, abbreviated as SRAM), electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), erasable programmable read-only memory (English: Erasable Programmable Read-Only Memory, abbreviated as EPROM), programmable read-only memory (English: Programmable Read-Only Memory, abbreviated as PROM), read-only memory (English: Read-Only Memory, abbreviated as ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0243] The power supply component 1306 provides power to the various components of the device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1300.

[0244] The multimedia component 1308 includes a screen that provides an output interface between the device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0245] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (English: Microphone, abbreviated as MIC), and when the device 1300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.

[0246] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0247] The sensor assembly 1314 includes one or more sensors for providing various aspects of status detection for the device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the device 1300, the relative positioning of components, such as the display and keypad of the device 1300, the sensor assembly 1314 can also detect the position change of the device 1300 or a component of the device 1300, the presence or absence of user contact with the device 1300, the orientation or acceleration / deceleration of the device 1300, and the temperature change of the device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0248] The communication component 1316 is configured to facilitate wired or wireless communication between the device 1300 and other devices. The device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0249] In an exemplary embodiment, the device 1300 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above method.

[0250] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by a processor 1320 of the device 1300 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0251] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to execute the antenna reference direction acquisition method of the terminal device.

[0252] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0253] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for obtaining an antenna reference direction, characterized in that: include: Establish target coordinate systems for multiple APs; Determine an AP to be tested from the multiple APs, and obtain a neighbor AP associated with the AP to be tested from the multiple APs; Obtaining the arrival angle of the neighbor AP relative to the AP to be measured; Calculate the target angle corresponding to the AP to be measured by using the target coordinate system and the arrival angle of the neighbor AP, where the target angle is the angle between the target antenna reference direction of the AP to be measured and the X-axis of the target coordinate system; A target antenna reference direction of the AP to be measured is determined according to the target angle.

2. The method according to claim 1, characterized in that The calculating the target angle corresponding to the AP to be measured by using the target coordinate system and the arrival angle of the neighbor AP includes: Determine, based on a target line segment obtained by connecting the AP to be measured and the neighboring AP, a coordinate axis angle between an X-axis of the target coordinate system and the target line segment; Based on the arrival angle corresponding to the neighbor AP and the coordinate axis angle, a target angle of the AP to be measured is determined.

3. The method according to claim 2, characterized in that The determining the target angle of the AP to be measured based on the arrival angle corresponding to the neighbor AP and the coordinate axis angle includes: Add the arrival angle corresponding to the neighbor AP and the angle between the coordinate axes to obtain an angle sum; If the angle sum is less than 360 degrees, the angle sum is determined as the comprehensive angle of the neighboring AP; If the angle sum is greater than or equal to 360 degrees, subtract the angle sum from 360 degrees to obtain the comprehensive angle of the neighbor AP; The target angle of the AP to be measured is calculated using the comprehensive angle of the neighboring APs.

4. The method according to claim 3, characterized in that The neighboring AP includes at least one, and the calculating the target angle of the AP to be measured based on the comprehensive angle of the neighboring AP includes: Determine a target weight corresponding to each of the at least one neighbor AP; According to the target weight and the comprehensive angle respectively corresponding to the at least one neighbor AP, a weighted sum of angles is performed to obtain the target angle of the AP to be measured.

5. The method according to any one of claims 1 to 4, characterized in that: The obtaining a neighbor AP associated with the AP to be tested from among the multiple APs includes: Determine, based on the dot maps corresponding to the multiple APs, a candidate AP adjacent to the AP to be tested among the multiple APs; Obtaining the distance between the candidate AP and the AP to be tested; The neighbor AP participating in the antenna reference direction correction of the AP to be measured is selected from the candidate APs according to the distance and signal strength corresponding to the candidate APs.

6. The method according to claim 5, characterized in that The selecting, from the candidate APs according to the distances and signal strengths corresponding to the candidate APs, the neighbor AP that participates in the antenna reference direction correction of the AP to be measured comprises: According to the distances and signal strengths corresponding to the candidate APs, determining a primary candidate AP from the candidate APs whose distance satisfies a line-of-sight propagation condition and whose signal strength is greater than a first strength threshold; If the number of the primary candidate AP is greater than or equal to the AP number threshold, the primary candidate AP is determined to be the neighbor AP.

7. The method according to claim 6, characterized in that Also includes: If the number of the primary candidate AP is less than the AP number threshold, determining a secondary candidate AP from the remaining candidate APs whose distance satisfies the line-of-sight propagation condition and whose signal strength is greater than a second strength threshold, where the second strength threshold is less than the first strength threshold; The neighbor AP is determined based on the primary candidate AP and the secondary candidate AP.

8. The method according to claim 6, characterized in that If the number of the primary candidate AP is greater than or equal to the AP number threshold, after determining that the primary candidate AP is the neighbor AP, the method further includes: Set the same confidence value for each primary candidate AP; Normalizing the confidence values ​​of the primary candidate APs to obtain first weights corresponding to the primary candidate APs; The target weight of the neighbor AP is determined according to the first weights respectively corresponding to the primary candidate APs.

9. The method according to claim 7, characterized in that: After determining the neighbor AP based on the primary candidate AP and the secondary candidate AP, the method further includes: Setting a confidence value for the primary candidate AP, and performing normalization calculation on the confidence value of the primary candidate AP to obtain a first weight of the primary candidate AP; Calculate the second weight of the secondary candidate AP according to the first weight of the primary candidate AP and in combination with the signal strength of the primary candidate AP and the signal strength of the secondary candidate AP; The first weight of the primary candidate AP and the second weight of the secondary candidate AP are normalized and calculated to obtain a target weight of the primary candidate AP corresponding to a neighbor AP and a target weight of the secondary candidate AP corresponding to a neighbor AP.

10. The method according to claim 6, characterized in that Also includes: According to the distances corresponding to the candidate APs, it is determined that none of the candidate APs meets the line-of-sight propagation condition; According to the signal strengths of the candidate APs, the first K candidate APs with the strongest signal strengths are determined as the neighboring APs.

11. The method according to claim 1, characterized in that: The establishing of a target coordinate system for multiple APs includes: Selecting two coordinate APs from the plurality of APs; The target coordinate system is established with the connecting line corresponding to the two coordinates AP as the X-axis and any one coordinate AP as the coordinate origin.

12. An antenna reference direction acquisition device, characterized in that: include: Establishing unit, used to establish target coordinate system for multiple APs; An acquiring unit, configured to determine an AP to be tested from the multiple APs, and acquire a neighbor AP associated with the AP to be tested from the multiple APs; An angle unit, used to obtain the arrival angle of the neighbor AP relative to the AP to be measured; A calculation unit, configured to calculate a target angle corresponding to the AP to be measured by using the target coordinate system and the arrival angle of the neighbor AP, wherein the target angle is an angle between a target antenna reference direction of the AP to be measured and an X-axis of the target coordinate system; A determination unit is used to determine a target antenna reference direction of the AP to be measured according to the target angle.

13. An electronic device comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the antenna reference direction acquisition method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the antenna reference direction acquisition method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for obtaining the antenna reference direction according to any one of claims 1 to 11 is implemented.