Positioning method, electronic equipment and computer readable storage medium
By obtaining spatial point cloud information and WiFi hotspot information, determining overlapping areas to calculate the positioning information of the points to be measured, the problem of WiFi positioning is not accurate enough in the indoor environment, and higher positioning accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202311531889.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-16
- Publication Date
- 2025-05-16
AI Technical Summary
The existing WiFi positioning technology cannot achieve accurate positioning operations due to signal fluctuations due to factors such as multipath propagation in indoor environments.
By acquiring spatial point cloud information and WiFi hotspot information of the points to be measured, the first overlapping area and the second overlapping area are determined, and the positioning information of the points to be measured is calculated based on the information of these areas.
It improves the accuracy and accuracy of WiFi positioning and can better adapt to the complexity of the indoor environment.
Smart Images

Figure CN120018276A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to but are not limited to the field of mobile communication technology, and in particular, to a positioning method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of mobile Internet, Wireless Fidelity (WiFi) positioning has been rapidly promoted and applied. Currently, there are multiple WiFi signals in indoor environments. However, due to the complexity and changeability of indoor environments, factors such as multipath propagation in the environment will cause WiFi signals to fluctuate. Therefore, WiFi positioning is greatly affected by signal changes and cannot achieve more accurate positioning operations. Summary of the invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present application provide a positioning method, an electronic device, and a computer-readable storage medium, which can improve the precision and accuracy of WiFi positioning.
[0005] In a first aspect, an embodiment of the present application provides a positioning method, including:
[0006] Obtain spatial point cloud information and wireless fidelity WiFi hotspot information of the point to be tested;
[0007] Determine a first overlapping area according to the spatial point cloud information and the point to be measured;
[0008] Determine a second overlapping area according to the WiFi hotspot information and the point to be measured;
[0009] The positioning information of the point to be measured is determined according to the first overlapping area and the second overlapping area.
[0010] In a second aspect, an embodiment of the present application further provides an electronic device, including:
[0011] at least one processor;
[0012] at least one memory for storing at least one program;
[0013] When at least one of the programs is executed by at least one of the processors, the positioning method described above is implemented.
[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the positioning method as described above.
[0015] The embodiment of the present application includes: in the process of positioning, firstly obtaining the spatial point cloud information and the WiFi hotspot information of the point to be measured; then determining the first overlapping area according to the spatial point cloud information and the point to be measured; then determining the second overlapping area according to the WiFi hotspot information and the point to be measured; finally determining the positioning information of the point to be measured according to the first overlapping area and the second overlapping area. Through the above technical solution, the problem of inaccurate WiFi positioning can be solved, and the WiFi positioning precision and accuracy can be well improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0017] Figure 1 is a flowchart of a positioning method provided by an embodiment of the present application;
[0018] Figure 2 This is a specific flow chart for obtaining spatial point cloud information provided by an embodiment of the present application;
[0019] Figure 3 is a specific flow chart for determining a first overlapping area provided by an embodiment of the present application;
[0020] Figure 4 This is a specific flow chart for obtaining a pre-built three-dimensional cube provided by an embodiment of the present application;
[0021] Figure 5 This is a specific flow chart for obtaining a rough location point provided by an embodiment of the present application;
[0022] Figure 6 It is a specific flow chart of the implementation of the octree encoding algorithm provided by one embodiment of the present application;
[0023] Figure 7 This is a specific flow chart for determining the location information of a point to be measured provided by an embodiment of the present application;
[0024] Figure 8 is a specific flow chart for determining a second overlapping area provided by an embodiment of the present application;
[0025] Fig. 9 is a specific flow chart for determining a target hotspot provided by an embodiment of the present application;
[0026] Fig.10 is a specific flow chart for determining a target hotspot provided by another embodiment of the present application;
[0027] Fig.11This is a specific flow chart of performing octree iterative partitioning of a three-dimensional cube provided by an embodiment of the present application;
[0028] Fig.12 This is a specific flow chart for determining the location information of a point to be measured provided by an embodiment of the present application;
[0029] Fig.13 is a flowchart of a positioning method provided by another embodiment of the present application;
[0030] Fig.14 is a flowchart of a positioning method provided by another embodiment of the present application;
[0031] Fig.15 is a flow chart of saving indoor precise location information provided by an embodiment of the present application;
[0032] Fig.16 is a flow chart of obtaining indoor precise location information provided by an embodiment of the present application;
[0033] Fig.17 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0036] In addition, terms such as "upper", "above", "lower", "below", etc. used in this application to indicate spatial relative positions are used for the purpose of convenience to describe the relationship of one unit or feature relative to another unit or feature as shown in the accompanying drawings. Terms of spatial relative position may be intended to include different orientations of the device in use or operation other than the orientation shown in the figure. For example, if the device in the figure is turned over, the unit described as being "below" or "beneath" other units or features will be located "above" the other units or features. Therefore, the exemplary term "below" can encompass both the above and below orientations. The device can be oriented in other ways (rotated 90 degrees or other orientations), and the spatially related descriptors used in this article are interpreted accordingly.
[0037] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0038] An embodiment of the present application provides a positioning method, an electronic device, and a computer-readable storage medium. The positioning method includes: obtaining spatial point cloud information and wireless fidelity WiFi hotspot information of a point to be measured; determining a first overlapping area according to the spatial point cloud information and the point to be measured; determining a second overlapping area according to the WiFi hotspot information and the point to be measured; and determining the positioning information of the point to be measured according to the first overlapping area and the second overlapping area.
[0039] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0040] like Figure 1 As shown, a flowchart of a positioning method provided by an embodiment of the first aspect of the present application. The positioning method includes but is not limited to step S100, step 200, step S300 and step S400:
[0041] Step S100, obtaining spatial point cloud information and wireless fidelity WiFi hotspot information of the point to be tested;
[0042] Step S200, determining a first overlapping area according to the spatial point cloud information and the point to be measured;
[0043] Step S300, determining a second overlapping area according to the WiFi hotspot information and the point to be tested;
[0044] Step S400: determining the location information of the point to be measured according to the first overlapping area and the second overlapping area.
[0045] In the embodiment of the present application, during the positioning process, the spatial point cloud information and the WiFi hotspot information of the point to be measured are first obtained; then the first overlapping area is determined according to the spatial point cloud information and the point to be measured; then the second overlapping area is determined according to the WiFi hotspot information and the point to be measured; finally, the positioning information of the point to be measured is determined according to the first overlapping area and the second overlapping area. Through the above technical solution, the problem of inaccurate WiFi positioning can be solved, and the WiFi positioning precision and accuracy can be greatly improved.
[0046] It is worth noting that the spatial point cloud information in the embodiment of the present application is the information of the point cloud that has been divided and marked in the set space. In this area, each divided point cloud has corresponding coordinate information; in the positioning process, the first overlapping area can be determined based on the spatial point cloud information and the point to be measured, in preparation for subsequent precise positioning.
[0047] It is worth noting that the WiFi hotspot information in the embodiment of the present application is the WiFi information that can be detected by the user device at the location of the point to be measured; the second overlapping area can be determined based on the detected WiFi information and the point to be measured; finally, the positioning information of the point to be measured can be determined based on the obtained first overlapping area and the second overlapping area. In the positioning process, the spatial point cloud information and the WiFi hotspot information are combined to make the positioning process more accurate and have higher precision. In the embodiment of the present application, the user device can be a mobile phone, a tablet or other mobile electronic device.
[0048] It can be understood that the point to be measured in the embodiment of the present application can be the location of the user equipment, and it is necessary to determine the location of the user equipment, that is, to perform positioning processing on the location of the point to be measured; in the positioning process, the spatial point cloud information and WiFi hotspot information are used to make the positioning process more accurate.
[0049] In addition, in one embodiment, if Figure 2 As shown, the process of obtaining spatial point cloud information may include but is not limited to step S110 and step S120:
[0050] Step S110, obtaining a pre-built three-dimensional cube;
[0051] Step S120, performing octree iterative partitioning processing on the three-dimensional cube according to a preset octree encoding algorithm to obtain a plurality of octree cube spaces.
[0052] In an embodiment of the present application, in the process of acquiring spatial point cloud information, a pre-constructed three-dimensional cube can be first obtained; then, the constructed three-dimensional cube is iteratively divided into octrees according to the octree encoding algorithm to obtain multiple octree cube spaces, thereby preparing the prerequisite for subsequent positioning operations.
[0053] Exemplarily, in the process of iterative octree division of a three-dimensional cube using a preset octree encoding algorithm, the following steps can be performed: after obtaining the reference position and preset radius information, the latitude and longitude information of the reference position point is recorded, a virtual three-dimensional space cube is constructed for the reference position and preset information, and after the virtual three-dimensional space cube is successfully constructed, the three-dimensional space cube is saved in the terminal memory, and the latitude and longitude altitude information of the reference position is recorded, and the three-dimensional coordinate information of the position point is recorded by a preset distance. The virtual three-dimensional space cube is the three-dimensional cube in this application. Each position of each octree cube space encoded by the octree saves the latitude and longitude altitude information and three-dimensional coordinate information parameters of the position. After the virtual three-dimensional space cube is successfully constructed, it is iteratively encoded according to the octree encoding algorithm. Finally, the large cube is virtually decomposed into multiple small three-dimensional space cubes, that is, multiple octree cube spaces. Among them, the reference position is the position of the standard point in this application, and the preset radius information is the set distance in this application.
[0054] It is worth noting that, based on traditional WiFi positioning, the present application virtualizes an octree three-dimensional space cube according to a preset position, performs octree encoding on the virtual space in turn, and finally calculates the positioning information of the point to be measured based on the octree virtual three-dimensional space information of the point to be measured and the WiFi hotspot information at the location, so that the positioning process can be more accurate.
[0055] In addition, in one embodiment, if Figure 3 As shown, the spatial point cloud information includes multiple octree cube spaces. The process of determining the first overlapping area according to the spatial point cloud information and the points to be measured may include but is not limited to step S210, step S220, step S230 and step S240:
[0056] Step S210, obtaining the position information of the point to be measured;
[0057] Step S220, determining the target octree cube space where the test point is located according to the position information of the test point and the position information of each octree cube space;
[0058] Step S230, for each vertex of the target octree cube space, taking the vertex as the first sphere center and taking the distance between the vertex and the point to be measured as the first radius, constructing a first sphere corresponding to the vertex;
[0059] Step S240: determine the overlapping area of the first sphere corresponding to the eight vertices as the first overlapping area.
[0060] In an embodiment of the present application, in the process of determining the first overlapping area based on spatial point cloud information and the point to be measured, first, the target octree cube space where the point to be measured is located is determined based on the position information of the point to be measured and the position information of each octree cube space; then, for each vertex of the target octree cube space, the vertex is used as the first sphere center and the distance between the vertex and the point to be measured is used as the first radius, so that the first sphere corresponding to the vertex can be constructed; finally, the overlapping area of the first spheres corresponding to the eight vertices can determine the first overlapping area.
[0061] It is worth noting that after constructing multiple octree cube spaces, in order to determine in which octree cube space the test point is located, the position information of the test point can be compared with the position information of each octree cube space to determine the octree cube space where the test point is located, and the octree cube space where it is located is determined as the target octree cube space; wherein, the position information of the test point is a rough position information, and the positioning information of the test point determined by the present application is a precise position information; since the target octree cube space has eight vertices, the eight vertices of the target octree cube space can be used as the first sphere center, and the distance between each first sphere center and the test point can be used as the first radius to construct eight first spheres, and these spheres will intersect and overlap with each other, and the overlapping area of the eight first spheres is used as the first overlapping area.
[0062] In a specific implementation, a certain position point is used as a standard point, and the area distance is used as a radius to construct a virtual three-dimensional space cube information. The eight vertices of the cube information are used as eight nodes of the octree. The virtual cube is iteratively divided into octrees according to the octree encoding algorithm, and the three-dimensional space coordinate information of each node is recorded at the same time. The distance information of the eight vertices of the minimum octree cube space where the user needs to calculate the distance to the certain position that needs to be calculated is calculated and saved. Eight spheres are drawn with the eight vertices of the cube as the center and the eight vertex distances to the position to be calculated as the radius, and the overlapping area of the eight spheres is calculated. Among them, the minimum octree cube space is the target octree cube space in the embodiment of the present application.
[0063] In addition, in one embodiment, if Figure 4 As shown, the process of obtaining the pre-built three-dimensional cube may include but is not limited to step S111 and step S112:
[0064] Step S111, obtaining the position information of the standard point and setting the distance;
[0065] Step S112, constructing a three-dimensional cube based on the position information of the standard points and the set distance.
[0066] In an embodiment of the present application, in the process of constructing a three-dimensional cube, first obtain the position information of the standard point and the set distance; then, based on the position information of the standard point and the set distance, the three-dimensional cube can be constructed to prepare for subsequent positioning operations. Among them, the position information of the standard point can include preset coordinate information, longitude and latitude information, and altitude information. For example, the coordinate information of the standard point can be (0,0,0), that is, the standard point is used as the origin. The set distance is the side length of the three-dimensional cube that the user needs to construct, for example, it can be set to 10 meters, so a three-dimensional cube with a standard point of (0,0,0) and a side length of 10 meters can be constructed according to the standard point and the set distance, and the vertex position information of each vertex of the constructed three-dimensional cube can be confirmed according to the coordinate information, longitude and latitude information and altitude information of the standard point; wherein, the standard point can be set as the center point of the three-dimensional cube, or a vertex of the three-dimensional cube, for example, it can be the vertex at the lower left of the three-dimensional cube; when the position information of the standard point is clear, it can be confirmed according to the position distance of each vertex to the standard point.
[0067] It is worth noting that in the process of determining the standard point, it can be divided into two situations: the scene where the location does not need to be obtained in advance and the scene where the location needs to be obtained in advance. In the actual application process, there is no need to obtain the location scene in advance: this scene can first open a third-party software such as a map application, select a certain location as the standard point in the software, and set the distance radius to be covered, and save the standard point and radius information; the scene where the location needs to be obtained in advance: this scene mainly includes obtaining the current geographic location information after operations such as NFC card swiping and access control card swiping, and saving the current geographic location information. After saving, a prompt box pops up to set the area coverage information. When the location point is the entrance position of certain scenes, the location can be placed on a vertex or a face of the virtual three-dimensional cube space to construct a three-dimensional space virtual cube. Among them, the user switches from the approximate location to the precise location of the near field wireless communication (Near Field Communication, NFC) analog card. For example, when a user swipes an NFC access card at the gate of a community, the location information is obtained, and the community is virtualized into a three-dimensional cube space. When the user finally walks to the door of his home and swipes the NFC access card, the location of the user's home is calculated based on the three-dimensional cube space location of the user's home and the surrounding WiFi hotspot information, so as to swipe the access card. For another example, when a user parks in a parking lot, the gate location information is obtained when entering the parking lot and swiping the gate, and the parking lot is virtualized into a three-dimensional cube space. After the user finally parks the car, the user's vehicle location is calculated based on the WiFi hotspot information around the parking location and the three-dimensional cube space location of the user's vehicle. When the user picks up the car, the location can be promptly informed to the user to facilitate the vehicle to find indoor environments such as shopping malls. The location information is obtained when entering the gate, and a virtual three-dimensional space is established with the location as the standard point. The three-dimensional space is sequentially encoded according to the octree encoding algorithm, and the location of each store in the octree virtual small cube space is calculated. The location of each store is calculated based on the WiFi hotspot information, and the store location information is finally reported, so that the user can enter the mall and other environments to find a specific indoor location. In addition, the algorithm is not limited to the above-mentioned scenarios, but can be applied to all scenarios involving indoor positioning.
[0068] like Figure 5As shown, in the process of obtaining the standard point position, it is determined whether the user needs to obtain the approximate position in advance during the use of the terminal. When the user needs to obtain the approximate position information in advance, the switch of indoor positioning is added to the user interface, which is closed by default. Turn on the indoor positioning switch, load the map software information of the mobile phone, and the user can select the reference position point and altitude information [l at0, long0, Alt0] that need to be set on the map software. After the reference point is set successfully, a prompt message pops up that the coverage distance radius needs to be set. The user selects the distance radius R0 that needs to be set, and the reference position point [lat0, long0, Alt0] and R0 information are saved. Alternatively, when the user does not need to obtain the approximate position information in advance, when the user performs operations such as NFC card swiping or access control swiping, the GPS switch is turned on when the card is swiped and the latitude and longitude of the current position point and the altitude information [l at0, long0, Alt0] are obtained for reporting, and a prompt message pops up automatically that the coverage distance radius needs to be set; the user selects the distance radius information R0 that needs to be set. The reference position point [l at0, long0, Alt0] and R0 information are saved.
[0069] like Figure 6 As shown, it is determined whether the user needs to set the approximate location in advance. When the user selects the reference point and coverage radius in advance on the map software, the initial cube of the virtual three-dimensional space cube is constructed with the three-dimensional space point [l at0, long0, Alt0+R0] as the center and 2R0 as the side length. The coordinate value of the three-dimensional space point [l at0, long0, Alt0+R0] is defined as [0, 0, 0]. At this time, the distance between the three-dimensional space point and the eight vertices of the cube is The coordinate values of the eight vertices of the three-dimensional cube are calculated based on the distance value. The coordinate axes of the eight vertices are as follows: When the user does not need to obtain the approximate location information in advance, that is, the user swipes the card at a certain entrance, the three-dimensional space point [lat0, long0, Alt0] is used as the lower left vertex of the three-dimensional virtual cube, and the coordinate value of the three-dimensional space point is defined as [0, 0, 0]. At this time, the distances from the three-dimensional space point to the other seven vertices of the cube are: The coordinate axes of the seven vertices are: [2R0,0,0], [0,2R0,0], [0,0,2R0], After the three-dimensional spatial coordinates of the eight vertices of the initial cube and the latitude, longitude and altitude information of the position reference point are successfully obtained, the virtual cube is octree encoded, and each space is divided into eight subspaces in turn. The specific side lengths of the divided cubes are R0 / 2, R0 / 4, R0 / 8, R0 / 16...R0 / 2 n , based on the eight vertex coordinate information of the initial cube and the encoded cube side length, the eight vertex coordinate information of the cube after each iteration is calculated.
[0070] In some embodiments of the present application, the user interface can be set according to the actual needs of the user, such as adding an indoor positioning switch to the GPS positioning switch. When the user needs to obtain the approximate location in advance, the map software can be automatically loaded to set the reference point and coverage radius information after turning on the switch; when the user does not need to obtain the approximate location, a prompt message will pop up when the user swipes the card to let the user set the radius information of the area to be covered. Finally, the three-dimensional space cube information is virtualized with the reference point as the center and twice the radius as the side length for storage.
[0071] In addition, in one embodiment, if Figure 7 As shown, the process of obtaining the position information of the point to be measured may include but is not limited to step S113 and step S114:
[0072] Step S113, obtaining the horizontal distance and vertical distance between the point to be measured and the standard point;
[0073] Step S114, determining the position information of the point to be measured according to the position information, horizontal distance and vertical distance of the standard point.
[0074] In an embodiment of the present application, firstly, the position information of the point to be measured and the position information of the standard point are obtained, and then, when the position information of the standard point is clear, the horizontal distance and vertical distance between the point to be measured and the standard point can be used; then, the position information of the point to be measured can be determined according to the position of the standard point and the horizontal distance and vertical distance. Among them, the position information of the standard point can include preset coordinate information, longitude and latitude information and altitude information, so that the position information of the point to be measured can be determined according to the position information, horizontal distance and vertical distance of the standard point, so as to facilitate the subsequent determination of which octree cube space the point to be measured is located in. Among them, the position information of the point to be measured in the embodiment of the present application is a rough position information, and the positioning information of the point to be measured in the embodiment of the present application is a precise position information; the horizontal distance and vertical distance in the embodiment of the present application can be detected by the sensor carried by the user device.
[0075] In addition, in one embodiment, if Figure 8As shown, the WiFi hotspot information includes M hotspot signal values. The process of determining the second overlapping area according to the WiFi hotspot information and the point to be measured may include but is not limited to step S310, step S320 and step S330:
[0076] Step S310, selecting N hotspot signal values from the M hotspot signal values, and determining the hotspots corresponding to the N hotspot signal values as target hotspots, wherein N is less than or equal to M and N is greater than or equal to 2;
[0077] Step S320, for each target hotspot, taking the target hotspot as the second sphere center and taking the distance between the target hotspot and the point to be measured as the second radius, constructing a second sphere corresponding to the target hotspot;
[0078] Step S330: determine the overlapping area of the second sphere corresponding to the N target hotspots as the second overlapping area.
[0079] In an embodiment of the present application, in the process of determining the second overlapping area based on WiFi hotspot information and the point to be measured, firstly, N hotspot signal values are selected from M hotspot signal values, and the hotspots corresponding to the N hotspot signal values are determined as target hotspots; then, for each target hotspot, the target hotspot is used as the second sphere center, and the distance between the target hotspot and the point to be measured is used as the second radius to construct a second sphere corresponding to the target hotspot; finally, the overlapping area of the second sphere corresponding to the N target hotspots is determined as the second overlapping area. Wherein, M represents the number of hotspot signal values detected by the user device at the position of the point to be measured, N represents the number of selected target hotspots, N is less than or equal to M, N is greater than or equal to 2, that is, N is not less than 2; when N is greater than or equal to 2, the second overlapping area can be constructed according to the selected target hotspot. Exemplarily, N can be 2, 3, 4, 5, 6, 7, and 8, etc.
[0080] It is worth noting that the WiFi hotspot information includes multiple WiFi hotspot physical addresses and hotspot signal values, wherein the WiFi hotspot physical addresses correspond to the hotspot signal values one by one; when the user device is located at the position of the point to be measured, multiple WiFi hotspot information can be detected, and it is only necessary to select at least two from the multiple WiFi hotspot information as target hotspots, and then subsequently for each target hotspot, with the target hotspot as the second sphere center and the distance between the target hotspot and the point to be measured as the second radius, construct a second sphere corresponding to the target hotspot, and use the overlapping area of the second sphere constructed by the selected target hotspot as the second overlapping area, in preparation for subsequent precise positioning processing.
[0081] It is worth noting that the distance between the point to be measured and each hotspot can be measured by the WiFi round trip time (Round-Trip Time, RTT) ranging method. Exemplarily, the user device scans the surrounding WiFi hotspot information during use, determines the signal value of each scanned hotspot, sorts the signal value from large to small, and saves the N WiFi hotspot media access control (Med ia Access Controll, MAC) addresses with larger signal values from large to small after sorting, and measures the distance information of the N hotspots from the current location of the user through the WiFiRTT ranging method. The MAC address and distance information of the hotspot are stored and saved. By scanning the WiFi hotspot information around the user device, sorting according to the WiFi signal strength and recording the distance from the N hotspots with the strongest user signal, the position of the N hotspots is used as the sphere center, and the N hotspots are drawn with the radius of the position to be calculated, and the overlapping area of the N spheres is calculated, so that in the subsequent positioning process, the overlapping area of the eight spheres calculated according to the octree encoding and the N spheres calculated by the WiFi hotspot signal are comprehensively calculated to make the positioning more accurate.
[0082] In addition, in one embodiment, if Fig. 9 As shown, the process of selecting N hotspot signal values from M hotspot signal values and determining the hotspots corresponding to the N hotspot signal values as target hotspots may include but is not limited to step S311:
[0083] Step S311, sorting the M hotspot signal values from large to small, and determining the hotspots corresponding to the top N hotspot signal values as target hotspots.
[0084] In the embodiment of the present application, in the process of selecting N target hotspots from M hotspots, the hotspot signal values of the M hotspots can be sorted from large to small, and then the first N hotspots in the sorting are used as target hotspots, so that the subsequent determination of the second overlapping area can be more accurate. Alternatively, it can also be selected based on the distance between each hotspot and the point to be measured. For example, the N hotspots closest to the point to be measured can be selected from the M hotspots as the target hotspots, which can also make the structure of the sphere closer to the actual position range, so that the subsequent positioning can be more accurate.
[0085] In addition, in one embodiment, if Fig.10 As shown, the process of selecting N hotspot signal values from M hotspot signal values and determining the hotspots corresponding to the N hotspot signal values as target hotspots may include but is not limited to step S312:
[0086] Step S312, sorting the distances between the hot spots corresponding to the M hot spot signal values and the test point from near to far, and determining the hot spots corresponding to the first N hot spot signal values as target hot spots.
[0087] In an embodiment of the present application, in the process of selecting N target hotspots from M hotspots, the distances between the M hotspots and the point to be measured can be sorted from near to far, and the first N hotspots in the sorting can be used as target hotspots, so that the subsequent determination of the second overlapping area can be more accurate.
[0088] In addition, in one embodiment, if Fig.11 As shown, the process of performing octree iterative partitioning processing on the three-dimensional cube according to the preset octree encoding algorithm to obtain multiple octree cube spaces may include but is not limited to step S121 and step S122:
[0089] Step S121, determining a set of partitioning edge lengths according to a set distance, wherein two adjacent partitioning edge lengths in the set of partitioning edge lengths satisfy that one partitioning edge length is half of the other partitioning edge length;
[0090] Step S122, selecting a partitioning side length from the partitioning side length set in order from large to small, and performing spatial iterative partitioning processing on the three-dimensional cube according to the selected partitioning side length to obtain multiple octree cube spaces.
[0091] In an embodiment of the present application, in the process of performing octree iterative partitioning of a three-dimensional cube using an octree encoding algorithm, firstly, a partition side length set is determined according to a set distance, wherein two adjacent partition side lengths in the partition side length set satisfy that one partition side length is half of the other partition side length; then, a partition side length is selected from the partition side length set in order from large to small, and the three-dimensional cube is subjected to spatial iterative partitioning processing according to the selected partition side length, so as to obtain multiple octree cube spaces, in preparation for subsequent positioning processing. Exemplarily, for example, if the distance is set to 32, the partition side length set can be 16, 8, 4, 2, and 1, and in the process of partitioning, 16, 8, 4, 2, and 1 are selected in turn for iterative partitioning processing.
[0092] In addition, in one embodiment, if Fig.12 As shown, the process of determining the location information of the to-be-measured point according to the first overlapping area and the second overlapping area may include but is not limited to step S410 and step S420:
[0093] Step S410, determining the overlapping area between the first overlapping area and the second overlapping area as a coordinate area;
[0094] Step S420: determine the coordinate information corresponding to the coordinate area as positioning information.
[0095] In the embodiment of the present application, in the process of determining the location information of the to-be-measured point according to the first overlapping area and the second overlapping area, the overlapping area between the first overlapping area and the second overlapping area is first determined as the coordinate area; then the coordinate information corresponding to the coordinate area is determined as the location information. The location information may include longitude and latitude information and altitude information.
[0096] Exemplarily, after calculating the target octree cube space corresponding to the current location according to the octree coding algorithm, the longitude and latitude of the eight vertices of the cube and the three-dimensional coordinate information are calculated, and eight virtual spheres are drawn with the eight vertices of the cube as the center of the sphere and the distance between the eight vertices of the cube and the current location as the radius, and the overlapping area of the eight virtual spheres is calculated, and the overlapping area is saved in the form of three-dimensional coordinates. After the eight hotspot information scanned by the WiFi module of the user device, eight virtual spheres are drawn with the eight hotspots as the center of the sphere and the distance between the eight hotspots and the current location as the radius, and the overlapping area of the eight virtual spheres is calculated, and the overlapping area is also saved in the form of three-dimensional coordinates. The overlapping area calculated by the octree coding and the overlapping area calculated by the WiFi positioning are comprehensively calculated, and the overlapping area obtained by the comprehensive calculation is the location information of the current location, which is saved in the form of three-dimensional coordinates, and the positioning information is obtained by combining the three-dimensional coordinates and the longitude and latitude information.
[0097] It is worth noting that in the traditional indoor WiFi positioning algorithm, based on a preset location information, a three-dimensional cube is virtualized with the location as the center point. The eight vertices of the cube correspond to the eight nodes of the octree, and the octree cube space is iteratively encoded in sequence to divide the large cube space into eight small octree cube spaces, and so on. Finally, the WiFi hotspot information around the location is calculated as needed to determine the overlapping area, and then the position of the location in the virtual space of the octree space is calculated based on the location information falling in a certain octree cube space. The overlapping area calculated by WiFi positioning and the overlapping area calculated by octree coding are comprehensively calculated to obtain the location point information.
[0098] In addition, in one embodiment, if Fig.13 As shown, after executing step S400, it may also include but not limited to step S510 and step S520:
[0099] Step S510, determining historical location information according to the positioning information and the corresponding octree cube space;
[0100] Step S520, storing the historical location information in a preset memory.
[0101] In some embodiments of the present application, after obtaining the positioning information of the point to be measured, the historical position information can also be determined according to the positioning information and the corresponding octree cube space; then the obtained historical position information is stored in a preset memory to provide convenience for subsequent positioning operations. The historical position information includes the positioning information of the point to be measured and the position information of the octree cube space where the point to be measured is located, and these two types of information correspond to each other.
[0102] In addition, in one embodiment, if Fig.14 As shown, the positioning method may also include but is not limited to step S600:
[0103] Step S600: When there is only one piece of historical position information in the octree cube space where the user equipment is located, the historical position information is used as the positioning information of the user equipment.
[0104] In some embodiments of the present application, in the subsequent positioning process, when there is only one historical location information in the octree cube space where the user device is located, the historical information will be used as the positioning information of the user device, so that the subsequent positioning process can be simpler and faster.
[0105] In order to more clearly illustrate the specific process of the positioning method provided by the embodiment of the present invention, a specific example is given below for illustration.
[0106] like Fig.15 As shown, the process of saving indoor precise location information can be as follows:
[0107] The user obtains the latitude, longitude and altitude information [lat0, long0, Alt0] of the reference location point and the preset distance radius information R0 at the approximate location.
[0108] The octree encoding embodiment is called to draw the octree original cube with a side length of 2R0, and the cube information corresponding to the reference position is saved in the terminal processor.
[0109] According to the octree encoding algorithm, an octree is constructed for the native cube, and each space is divided into eight subspaces in turn. The specific side lengths of the divided squares are R0 / 2, R0 / 4, R0 / 8, R0 / 16...R0 / 2 n .
[0110] Scan the hotspot information around the terminal, use the WiFi RTT ranging method to measure the distance between the terminal and the scanned AP, and save and record the MAC addresses and distance information of the eight AP hotspots with the smallest distance to the location [LAP1, L1], [LAP2, L2], [LAP3, L3].... [LAP8, L8].
[0111] The user's horizontal and vertical distance from the reference point [lat0, long0, Alt0] is used to determine the three-dimensional cube space in the octree space where the user walks. Each cube space encoded by the octree saves the AP hotspot MAC address scanned at the location according to the user's walking position and calculates the distance to the hotspot based on the WiFi RTT algorithm.
[0112] When the user walks to a precise indoor location, the WiFi RTT ranging method is used to measure the distance between the terminal and the AP hotspots within the range, and the hotspot distances are sorted from small to large, and the stored information is [MAP1, L1], [MAP2, L2], [MAP3, L3]... [MAP8, L8]. At the same time, the three-dimensional coordinate value information of the eight hotspots is calculated according to the positions of the eight hotspots in the three-dimensional virtual cube space. With the eight hotspots as the center of the sphere and L1, L2, L3, L8 as the radius, a sphere is drawn to calculate the position of the hotspot intersection area. The longest diameter of the hotspot intersection position information is: Ldi0.
[0113] Record the exact location in the cube of the traversal model of the octree encoding algorithm, and record the octree cube radius information R0 / 2 corresponding to the location n .
[0114] Calculate the distance between the indoor location point and the eight vertices of the octree cube [L1, L2, L3....L8].
[0115] Draw a sphere with the eight vertices of the cube as the center and the distance between the precise indoor position point and the eight vertices of the octree cube [L1, L2, L3...L8] as the radius, calculate the intersection area position of the octree cube, and the longest diameter of the octree cube intersection information is: Ldi1.
[0116] The overlapping area between the hotspot intersection area and the octree cube intersection area is calculated. The diameter of the overlapping area is Ldi2, which is the precise indoor location that the user needs to set.
[0117] The three-dimensional coordinate point information of the position is calculated based on the distance between the eight vertices and eight hot spots of the octree virtual cube space. The saved path information and Ldi2 position information, as well as the hot spot scanning information of the position [MAP1, L1], [MAP2, L2], [MAP3, L3]... [MAP8, L8] and the radius of the octree cube, and the distance between the reference position point and the eight vertices of the octree cube [L1, L2, L3... L8] are stored in the memory of the indoor position.
[0118] The relationship between the indoor precise location point and the approximate location point is established. When there are multiple indoor precise location points at one approximate location point, multiple indoor location information can be set and saved according to Step 1-Step 11.
[0119] like Fig.16 As shown, the process of obtaining indoor precise positioning information can be as follows:
[0120] When the user swipes a card at a rough location, the octree initial cube information corresponding to the rough location is called, and the initial cube is traversed through a multi-level octree.
[0121] When the user is walking, the horizontal and vertical paths of the user are compared with the corresponding paths stored in the memory. If the horizontal and vertical paths are in the octree cube corresponding to the preset path, the corresponding information of the preset path is reported first. If the preset path corresponds to multiple stored information, they are sorted according to the scanned WiFi hotspot information.
[0122] While walking, scan the surrounding hotspot information at the same time, save and record the MAC addresses and distance information of the 8 AP hotspots closest to the location [LAP1, L1], [LAP2, L2], [LAP3, L3]... [LAP8, L8], and determine whether the scanned LAPX corresponds to the preset MAPX. If the scanned hotspot name is the same as the preset hotspot name, sort them according to the number of scanned hotspots, and report the location information with a large number of scanned hotspots.
[0123] When the number of preset WiFi hotspots scanned by two location information is the same, the distance between the terminal and the preset hotspot is calculated, and the distances are sorted from small to large. The difference between the sorted distance value and the preset distance value is calculated, and the location information with the smaller difference is reported first;
[0124] During the walking process, the positioning algorithm is calculated according to Step 2-Step 4 at the same time. The octree cube determined in Step 2 is sorted first, and then the hotspot MAC address information of the hotspot scanned at the current position and the distance to the hotspot are sorted and calculated.
[0125] When the user finally reaches the preset radius R0 / 2 n In the cube, it is determined that the cube stores several three-dimensional coordinate point position information. If it corresponds to only one position information, the position information is directly reported.
[0126] When the radius corresponding to the final position is R0 / 2 n The cube corresponds to multiple position information, and the position and radius are calculated as R0 / 2 nThe distance between the eight vertices of the cube [L1, L2, L3....L8]. With the eight vertices of the cube as the center, draw a circle with the distance between the final position and the eight vertices of the octree cube [L1, L2, L3....L8] as the radius, and calculate the intersection area of the octree cube at this position. The longest diameter of the octree cube intersection information is: LdiX1. At the same time, calculate the distance between this position and the scanned WiFi hotspot [LAP1, L1], [LAP2, L2], [LAP3, L3].... [LAP8, L8], draw a circle with L1, L2, L3, L8 as the radius, calculate the hotspot intersection area position, and the longest diameter of the hotspot intersection position information is: LdiX2.
[0127] Calculate the overlapping area information LdiXn of the hotspot intersection area LdiX2 and the octree cube intersection area LdiX1. Compare LdiXn with the preset Ldi1 to calculate the overlapping area Ldi1-LdiXn of the two.
[0128] Ldi1-LdiXn of multiple location information are sorted by size, and the location information corresponding to the smaller value of Ldi1-LdiXn is directly reported.
[0129] Through the above technical solution, with the development of mobile communication technology and indoor positioning technology, more and more scenarios require the use of indoor positioning technology. The existing WiFi positioning technology has large positioning errors due to problems such as WiFi signals. The positioning method proposed in this application calculates the position of the user in the three-dimensional cube space based on the current traditional WiFi positioning, and finally obtains the user's location information. This method can be widely used in indoor positioning environments with approximate and precise positions.
[0130] In addition, if Fig.17 As shown, an embodiment of the present invention further provides an electronic device 700 , which includes: a memory 720 , a processor 710 , and a computer program stored in the memory 720 and executable on the processor 710 .
[0131] The processor 710 and the memory 720 may be connected via a bus or in other ways.
[0132] It should be noted that the electronic device 700 in this embodiment and the positioning method in the above embodiments belong to the same inventive concept, so these embodiments have the same implementation principles and technical effects, which will not be described in detail here.
[0133] The non-transient software program and instructions required to implement the positioning method of the above embodiment are stored in the memory 720. When executed by the processor 710, the positioning method of the above embodiment is executed, for example, the above described positioning method is executed. Figure 1 The method steps S100 to S400, Figure 2 Steps S110 to S120 of the method, Figure 3 Steps S210 to S240 of the method, Figure 4 Steps S111 to S112 of the method, Figure 7 Steps S113 to S114 of the method, Figure 8 Steps S310 to S330 of the method, Fig. 9 Step S311 of the method, Fig.10 Step S312 of the method, Fig.11 Steps S121 to S122 of the method, Fig.12 Steps S410 to S420 of the method, Fig.13 Method steps S510 to S520 and Fig.14 Method step S600 in .
[0134] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor 710, for example, by a processor 710 in the above-mentioned electronic device 700 embodiment, so that the above-mentioned processor 710 can execute the positioning method in the above-mentioned embodiment, for example, execute the above-mentioned Figure 1 The method steps S100 to S400, Figure 2 Steps S110 to S120 of the method, Figure 3 Steps S210 to S240 of the method, Figure 4 Steps S111 to S112 of the method, Figure 7 Steps S113 to S114 of the method, Figure 8 Steps S310 to S330 of the method, Fig. 9 Step S311 of the method, Fig.10 Step S312 of the method, Fig.11 Steps S121 to S122 of the method, Fig.12 Steps S410 to S420 of the method, Fig.13 Method steps S510 to S520 and Fig.14 Method step S600 in .
[0135] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0136] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A positioning method, comprising: Obtain spatial point cloud information and wireless fidelity WiFi hotspot information of the point to be tested; Determine a first overlapping area according to the spatial point cloud information and the point to be measured; Determine a second overlapping area according to the WiFi hotspot information and the point to be measured; The positioning information of the point to be measured is determined according to the first overlapping area and the second overlapping area.
2. The positioning method according to claim 1, characterized in that: The obtaining of spatial point cloud information comprises: Get a pre-built 3D cube; The three-dimensional cube is subjected to octree iterative partitioning processing according to a preset octree encoding algorithm to obtain a plurality of octree cube spaces.
3. The positioning method according to claim 2, characterized in that: The determining of the first overlapping area according to the spatial point cloud information and the point to be measured includes: Obtaining the location information of the point to be measured; Determine the target octree cube space where the point to be measured is located according to the position information of the point to be measured and the position information of each octree cube space; For each vertex of the target octree cube space, taking the vertex as the first sphere center and taking the distance between the vertex and the point to be measured as the first radius, constructing a first sphere corresponding to the vertex; An overlapping area of the first sphere corresponding to the eight vertices is determined as the first overlapping area.
4. The positioning method according to claim 3, characterized in that: The step of obtaining a pre-built three-dimensional cube includes: Get the location information of the standard point and set the distance; The three-dimensional cube is constructed based on the position information of the standard point and the set distance.
5. The positioning method according to claim 4, characterized in that: The obtaining the position information of the point to be measured includes: Obtaining the horizontal distance and the vertical distance between the point to be measured and the standard point; The position information of the point to be measured is determined according to the position information of the standard point, the horizontal distance and the vertical distance.
6. The positioning method according to claim 1, characterized in that: The WiFi hotspot information includes M hotspot signal values, and determining the second overlapping area according to the WiFi hotspot information and the point to be measured includes: Selecting N hotspot signal values from the M hotspot signal values, and determining the hotspots corresponding to the N hotspot signal values as target hotspots, wherein N is less than or equal to M and N is greater than or equal to 2; For each of the target hotspots, taking the target hotspot as the second sphere center and the distance between the target hotspot and the point to be measured as the second radius, constructing a second sphere corresponding to the target hotspot; The overlapping area of the second spheres corresponding to the N target hotspots is determined as the second overlapping area.
7. The positioning method according to claim 6, characterized in that: The selecting N hotspot signal values from the M hotspot signal values, and determining the hotspots corresponding to the N hotspot signal values as target hotspots, includes: Sorting the M hotspot signal values from large to small, and determining the hotspots corresponding to the first N hotspot signal values as the target hotspots; Alternatively, the distances between the hot spots corresponding to the M hot spot signal values and the test point are sorted from near to far, and the hot spots corresponding to the first N hot spot signal values are determined as the target hot spots.
8. The positioning method according to claim 4, characterized in that: The three-dimensional cube is subjected to an octree iterative partitioning process according to a preset octree encoding algorithm to obtain a plurality of octree cube spaces, including: Determine a set of partitioning side lengths according to the set distance, wherein two adjacent partitioning side lengths in the set of partitioning side lengths satisfy that one of the partitioning side lengths is half of the other of the partitioning side lengths; One of the partition side lengths is selected from the partition side length set in order from large to small, and the three-dimensional cube is subjected to spatial iterative partitioning processing according to the selected partition side length to obtain a plurality of octree cube spaces.
9. The positioning method according to claim 1, characterized in that: The determining the location information of the point to be measured according to the first overlapping area and the second overlapping area includes: determining an overlapping area between the first overlapping area and the second overlapping area as a coordinate area; The coordinate information corresponding to the coordinate area is determined as the positioning information.
10. The positioning method according to claim 3, characterized in that: After determining the location information of the point to be measured according to the first overlapping area and the second overlapping area, the method further includes: Determine historical location information according to the positioning information and the corresponding octree cube space; The historical location information is stored in a preset memory.
11. The positioning method according to claim 10, characterized in that: The method further comprises: When there is only one piece of historical position information in the octree cube space where the user equipment is located, the historical position information is used as the positioning information of the user equipment.
12. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the positioning method according to any one of claims 1 to 11 is implemented.
13. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the positioning method described in any one of claims 1 to 11.