Location method, electronic device, and computer readable storage medium
By combining spatial point cloud information, WiFi hotspot information and octree encoding algorithm, the problem of low accuracy of WiFi positioning in indoor environments is solved, and more accurate positioning is achieved.
Patent Information
- Application Number
- PCT/CN2024/111083
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-16
- Filing Date
- 2024-08-09
- Publication Date
- 2025-05-22
AI Technical Summary
The existing WiFi positioning technology cannot achieve accurate positioning due to signal fluctuations due to factors such as multipath propagation in indoor environments.
By obtaining 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 octree encoding algorithm and the WiFi RTT ranging method.
Improves the accuracy and accuracy of WiFi positioning, and enables more accurate positioning in complex indoor environments.
Smart Images

Figure CN2024111083_22052025_PF_FP_ABST
Abstract
Description
Positioning method, electronic device, and computer-readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese patent application with application number 202311531889.1 and application date November 16, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field
[0003] The embodiments of the present application relate to, but are not limited to, the field of mobile communication technologies, and in particular to a positioning method, an electronic device, and a computer-readable storage medium. Background Art
[0004] With the rapid development of mobile internet, Wireless Fidelity (WiFi) positioning has been rapidly promoted and applied. Currently, multiple WiFi signals are common in indoor environments. However, due to the complexity and variability of indoor environments, factors such as multipath propagation can cause WiFi signals to fluctuate. Therefore, WiFi positioning is significantly affected by signal variations, making it difficult to achieve accurate positioning.
[0005] Summary of the Invention
[0006] 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.
[0007] Embodiments of the present application provide a positioning method, an electronic device, and a computer-readable storage medium.
[0008] In a first aspect, an embodiment of the present application provides a positioning method, including: obtaining spatial point cloud information and wireless fidelity WiFi hotspot information of a point to be measured; determining a first overlapping area based on the spatial point cloud information and the point to be measured; determining a second overlapping area based on the WiFi hotspot information and the point to be measured; and determining the positioning information of the point to be measured based on the first overlapping area and the second overlapping area.
[0009] In a second aspect, an embodiment of the present application further provides an electronic device, comprising: at least one processor; at least one memory for storing at least one program; and implementing the positioning method described above when at least one of the programs is executed by at least one of the processors.
[0010] 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to provide a 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.
[0012] FIG1 is a flowchart of a positioning method provided by an embodiment of the present application;
[0013] FIG2 is a specific flow chart of obtaining spatial point cloud information provided by one embodiment of the present application;
[0014] FIG3 is a specific flowchart of determining a first overlapping area according to an embodiment of the present application;
[0015] FIG4 is a specific flow chart of obtaining a pre-built three-dimensional cube according to an embodiment of the present application;
[0016] FIG5 is a specific flow chart of obtaining a rough location point according to an embodiment of the present application;
[0017] FIG6 is a specific flow chart of an octree encoding algorithm implementation provided by an embodiment of the present application;
[0018] FIG7 is a specific flow chart of determining the location information of a point to be measured provided by one embodiment of the present application;
[0019] FIG8 is a specific flowchart of determining a second overlapping area provided by one embodiment of the present application;
[0020] FIG9 is a specific flow chart of determining a target hotspot according to an embodiment of the present application;
[0021] FIG10 is a specific flow chart of determining a target hotspot according to another embodiment of the present application;
[0022] FIG11 is a specific flow chart of performing octree iterative partitioning of a three-dimensional cube according to an embodiment of the present application;
[0023] FIG12 is a specific flow chart of determining the location information of a point to be measured provided by one embodiment of the present application;
[0024] FIG13 is a flowchart of a positioning method provided by another embodiment of the present application;
[0025] FIG14 is a flowchart of a positioning method provided by another embodiment of the present application;
[0026] FIG15 is a flowchart of saving indoor precise location information provided by one embodiment of the present application;
[0027] FIG16 is a flowchart of obtaining precise indoor location information according to an embodiment of the present application;
[0028] FIG17 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0030] In the description of this application, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The terms "first" and "second" are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or as implicitly specifying the number or order of the technical features indicated.
[0031] In addition, terms such as "upper", "above", "lower", "below" and the like 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 drawings. 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 in other orientations), and the spatially related descriptors used herein should be interpreted accordingly.
[0032] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, and connecting 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.
[0033] 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 based on the spatial point cloud information and the point to be measured; determining a second overlapping area based on the WiFi hotspot information and the point to be measured; and determining positioning information of the point to be measured based on the first overlapping area and the second overlapping area.
[0034] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0035] As shown in Figure 1, a flowchart of a positioning method provided in an embodiment of the first aspect of the present application is shown. The positioning method includes but is not limited to steps S100, 200, S300, and S400.
[0036] Step S100: Acquire spatial point cloud information and wireless fidelity WiFi hotspot information of the point to be measured.
[0037] Step S200: determining a first overlapping area according to the spatial point cloud information and the points to be measured.
[0038] Step S300: determining a second overlapping area according to the WiFi hotspot information and the point to be measured.
[0039] Step S400: determining the location information of the point to be measured according to the first overlapping area and the second overlapping area.
[0040] In the embodiments of the present application, during positioning, spatial point cloud information and WiFi hotspot information of the target point are first obtained; a first overlapping area is then determined based on the spatial point cloud information and the target point; a second overlapping area is then determined based on the WiFi hotspot information and the target point; and finally, the location information of the target point is determined based on the first and second overlapping areas. This technical solution can address the current issue of inaccurate WiFi positioning and significantly improve WiFi positioning precision and accuracy.
[0041] 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 first based on the spatial point cloud information and the point to be measured, in preparation for subsequent precise positioning.
[0042] It is worth noting that the WiFi hotspot information in the embodiments of this application refers to the WiFi information that can be detected by the user device at the location of the test point; based on the detected WiFi information and the test point, the second overlapping area can be determined; finally, based on the obtained first overlapping area and second overlapping area, the positioning information of the test point can be determined. During the positioning process, combining spatial point cloud information and WiFi hotspot information makes the positioning process more accurate and has higher precision. In the embodiments of this application, the user device can be a mobile phone, tablet, or other mobile electronic device.
[0043] 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 position 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.
[0044] In addition, in one embodiment, as shown in FIG2 , the process of acquiring spatial point cloud information may include but is not limited to step S110 and step S120 .
[0045] Step S110: Obtain a pre-built three-dimensional cube.
[0046] 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.
[0047] In an embodiment of the present application, in the process of obtaining spatial point cloud information, a pre-constructed three-dimensional cube can be obtained first; then the constructed three-dimensional cube is subjected to octree iterative division processing according to the octree encoding algorithm, and multiple octree cube spaces can be obtained, which is the prerequisite for subsequent positioning operations.
[0048] In one embodiment, the process of iteratively partitioning a three-dimensional cube using an octree encoding algorithm can include the following steps: after obtaining a reference position and a preset radius, recording the latitude and longitude information of the reference position point, constructing a virtual three-dimensional space cube based on the reference position and the preset information, and saving the virtual three-dimensional space cube to a terminal memory after successful construction. The latitude, longitude, and altitude information of the reference position, as well as the three-dimensional coordinate information of the position point at a preset distance, are recorded. The virtual three-dimensional space cube is the three-dimensional cube in this application. Each position in each octree cube space generated by the octree encoding stores the latitude, longitude, and altitude information and three-dimensional coordinate information parameters of that position. After the virtual three-dimensional space cube is successfully constructed, it is iteratively encoded according to the octree encoding algorithm. Ultimately, the large cube is virtually decomposed into multiple small three-dimensional space cubes, namely, multiple octree cube spaces. 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.
[0049] It is worth noting that, based on traditional WiFi positioning, this 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.
[0050] In addition, in one embodiment, as shown in FIG3 , the spatial point cloud information includes multiple octree cube spaces, and the process of determining the first overlapping area based on 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 .
[0051] Step S210: Acquire the location information of the point to be measured.
[0052] Step S220 , determining 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.
[0053] Step S230 : For each vertex in the target octree cube space, a first sphere corresponding to the vertex is constructed with the vertex as the first sphere center and the distance between the vertex and the point to be measured as the first radius.
[0054] Step S240: Determine the overlapping area of the first sphere corresponding to the eight vertices as the first overlapping area.
[0055] In an embodiment of the present application, in the process of determining the first overlapping area based on the 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 first overlapping area can be determined based on the overlapping areas of the first spheres corresponding to the eight vertices.
[0056] 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 also intersect and overlap with each other, and the overlapping area of the eight first spheres is used as the first overlapping area.
[0057] In a specific embodiment, a certain position point is used as a standard point, and the area distance is used as a radius to construct virtual three-dimensional space cube information. The eight vertices of the cube information are used as the eight nodes of the octree. The virtual cube is iteratively divided into octrees according to the octree encoding algorithm. At the same time, the three-dimensional space coordinate information of each node is recorded, and the distance information from a certain position that the user needs to calculate to the eight vertices of the minimum octree cube space where it is located is calculated and saved. Eight spheres are drawn with the eight vertices of the cube as the sphere center and the distance from the eight vertices 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.
[0058] In addition, in one embodiment, as shown in FIG4 , the process of obtaining the pre-constructed three-dimensional cube may include but is not limited to step S111 and step S112 .
[0059] Step S111, obtaining the position information of the reference point and setting the distance.
[0060] Step S112: constructing a three-dimensional cube based on the position information of the standard points and the set distance.
[0061] In an embodiment of the present application, in the process of constructing a three-dimensional cube, the position information of the standard point and the set distance are first obtained; 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. In one embodiment, 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. Therefore, a three-dimensional cube with a standard point of (0,0,0) and a side length of 10 meters can be constructed based on the standard point and the set distance, and the vertex position information of each vertex of the constructed three-dimensional cube can be confirmed based on the coordinate information, longitude and latitude information, and altitude information of the standard point; Among them, 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 bottom left of the three-dimensional cube; when the position information of the standard point is clear, it can be confirmed based on the position distance of each vertex to the standard point.
[0062] It is worth noting that in the process of determining the standard point, it can be divided into two situations: scenarios where the location does not need to be obtained in advance and scenarios where the location needs to be obtained in advance. In actual application, scenarios where the location does not need to be obtained in advance: this scenario can first open a third-party software such as a map application, select a location as the standard point in the software, and set the distance radius to be covered, and save the standard point and radius information; scenarios where the location needs to be obtained in advance: this scenario mainly includes obtaining the current geographic location information through operations such as NFC card swiping and access control card swiping, and saving the current geographic location information. After saving, a prompt box will pop 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 a virtual three-dimensional cube space to construct a three-dimensional virtual cube. Among them, the user switches from a near field communication (NFC) analog card from an approximate location to a precise location. In one embodiment, when a user swipes an NFC access card at a residential community entrance, location information is obtained, and the community is virtualized into a three-dimensional cube. When the user finally reaches their home and swipes their NFC access card, the user's home location is calculated based on the location of the three-dimensional cube and surrounding WiFi hotspot information, allowing them to swipe their card. For another example, when a user parks their car in a parking lot, the gate location information is obtained when entering the parking lot and the parking lot is virtualized into a three-dimensional cube. After the user parks their car, the vehicle's location is calculated based on the surrounding WiFi hotspot information and the vehicle's location in the three-dimensional cube. This location is promptly communicated to the user when they retrieve their car, facilitating vehicle retrieval. In indoor environments such as shopping malls, the location information is obtained upon entering the gate, and a virtual three-dimensional space is created using this location as a reference point. The three-dimensional space is then sequentially encoded using an octree encoding algorithm, and the location of each store within the octree virtual cube is calculated. The location of each store is then calculated based on WiFi hotspot information, and the store location information is ultimately reported, facilitating user search for specific indoor locations after entering a shopping mall or other environment. In addition, the algorithm is not limited to the above-mentioned scenarios, but can be applied to all scenarios involving indoor positioning.
[0063] As shown in Figure 5, during the process of obtaining the standard point location, it is determined whether the user needs to obtain an approximate location in advance during terminal use. If the user needs to obtain approximate location information in advance, an indoor positioning switch is added to the user interface, which is off by default. Turning on the indoor positioning switch loads the phone's built-in map software. The user can select the desired reference location point and altitude information [lat0, long0, Alt0] on the map software. After the reference point is successfully set, a prompt pops up stating that a coverage radius needs to be set. The user selects the desired radius R0 and saves the reference location point [lat0, long0, Alt0] and R0 information. Alternatively, if the user does not need to obtain approximate location information in advance, when performing an NFC card swipe or access control operation, the GPS switch is turned on and the current location's latitude, longitude, and altitude information [lat0, long0, Alt0] are obtained and reported. A prompt automatically pops up stating that a coverage radius needs to be set. The user selects the desired radius R0 and saves the reference location point [lat0, long0, Alt0] and R0 information.
[0064] As shown in Figure 6, 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 [lat0, long0, Alt0+R0] as the center and 2R0 as the side length. The coordinate value of the three-dimensional space point [lat0, 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 coordinates of the eight vertices of the three-dimensional cube are calculated based on the distance values. 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 corner 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 between the three-dimensional space point and the other seven vertices of the cube are: 2R0, 2R0, 2R0, The coordinate axes of the seven vertices are: [2R0,0,0], [0,2R0,0], [0,0,2R0], After the three-dimensional 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.
[0065] In some embodiments of the present application, the user interface can be configured based on actual user needs. For example, an indoor positioning switch can be added to the GPS positioning switch. When the switch is turned on in scenarios where the user needs to obtain an approximate location in advance, the map software automatically loads and configures the reference point and coverage radius. When the switch is turned on in scenarios where the user does not need to obtain an approximate location, a prompt will pop up when the user swipes a card, allowing the user to set the radius of the coverage area. Finally, a three-dimensional cube is created with the reference point as the center and a side length of twice the radius for storage.
[0066] In addition, in one embodiment, as shown in FIG. 7 , 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 .
[0067] Step S113, obtaining the horizontal distance and vertical distance between the point to be measured and the reference point,
[0068] Step S114 , determining the position information of the point to be measured according to the position information, horizontal distance, and vertical distance of the reference point.
[0069] In an embodiment of the present application, first obtain the location information of the point to be measured and the location information of the standard point. Then, if the location 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 location information of the point to be measured can be determined based on the location of the standard point and the horizontal distance and vertical distance. The location information of the standard point can include preset coordinate information, longitude and latitude information, and altitude information, so that the location information of the point to be measured can be determined based on the location 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. The location information of the point to be measured in the embodiment of the present application is a rough location information, while the positioning information of the point to be measured in the embodiment of the present application is a precise location 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.
[0070] In addition, in one embodiment, as shown in FIG8 , the WiFi hotspot information includes M hotspot signal values, and the process of determining the second overlapping area based on the WiFi hotspot information and the point to be measured may include but is not limited to step S310 , step S320 , and step S330 .
[0071] Step S310: Select N hotspot signal values from the M hotspot signal values, and determine the hotspots corresponding to the N hotspot signal values as target hotspots, where N is less than or equal to M and greater than or equal to 2.
[0072] In step S320 , for each target hotspot, a second sphere corresponding to the target hotspot is constructed 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.
[0073] Step S330: Determine the overlapping area of the second sphere corresponding to the N target hotspots as the second overlapping area.
[0074] 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, first, 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 spheres 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 based on the selected target hotspot. In some embodiments, N can be 2, 3, 4, 5, 6, 7, and 8, etc.
[0075] It is worth noting that WiFi hotspot information includes multiple WiFi hotspot physical addresses and hotspot signal values, where the WiFi hotspot physical addresses correspond to the hotspot signal values one-to-one. When the user device is located at the point to be measured, multiple WiFi hotspot information can be detected. It is only necessary to select at least two from the multiple WiFi hotspot information as target hotspots. Then, for each target hotspot, the target hotspot can be used as the second sphere center and the distance between the target hotspot and the point to be measured as the second radius to construct a second sphere corresponding to the target hotspot. The overlapping area of the second sphere constructed by the selected target hotspots is used as the second overlapping area to prepare for subsequent precise positioning processing.
[0076] It is worth noting that the distance between the measured point and each hotspot can be measured using the WiFi round-trip time (RTT) ranging method. In one embodiment, the user device scans the surrounding WiFi hotspot information during use, determines the signal value of each scanned hotspot, sorts the signal values from large to small, and saves the N WiFi hotspot media access control (MAC) addresses with the largest signal values sorted from large to small after sorting. The distance information of the N hotspots from the user's current location is measured using the WiFi RTT 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 WiFi signal strength and recording the distance to the N hotspots with the strongest user signals, N spheres are drawn with the positions of the N hotspots as the sphere center and the distance from the N hotspots to the position to be calculated as the radius, and the overlapping area of the N spheres is calculated. In the subsequent positioning process, the overlapping area is calculated by combining the overlapping area of the eight spheres calculated by octree encoding and the overlapping area of the N spheres calculated by the WiFi hotspot signal, so that positioning can be more accurate.
[0077] In addition, in one embodiment, as shown in FIG9 , 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 .
[0078] Step S311 : sort the M hotspot signal values from large to small, and determine the hotspots corresponding to the top N hotspot signal values as target hotspots.
[0079] In an embodiment of the present application, when selecting N target hotspots from M hotspots, the hotspot signal values of the M hotspots can be sorted from largest to smallest, and then the first N hotspots in the sorting order can be used as target hotspots, so that the subsequent determination of the second overlapping area can be more accurate. Alternatively, the selection can be made 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 target hotspots. This can also make the structure of the sphere closer to the actual position range, making subsequent positioning more accurate.
[0080] In addition, in one embodiment, as shown in FIG10 , 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 .
[0081] In step S312, 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 top N hot spot signal values are determined as target hot spots.
[0082] 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.
[0083] In addition, in one embodiment, as shown in FIG11 , the process of performing octree iterative partitioning processing on a three-dimensional cube according to a preset octree encoding algorithm to obtain multiple octree cube spaces may include but is not limited to step S121 and step S122 .
[0084] Step S121 , determining a partition side length set 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.
[0085] Step S122 , selecting a partition side length from the partition side length set in descending order, and performing spatial iterative partitioning processing on the three-dimensional cube according to the selected partition side length to obtain multiple octree cube spaces.
[0086] In an embodiment of the present application, when performing iterative octree partitioning of a three-dimensional cube using an octree encoding algorithm, a set of partitioning edge lengths is first determined based on a set distance, wherein two adjacent partitioning edge lengths in the partitioning edge length set satisfy that one partitioning edge length is half the length of the other partitioning edge length; then, a partitioning edge length is selected from the partitioning edge length set in descending order, and the three-dimensional cube is spatially iteratively partitioned based on the selected partitioning edge length to obtain multiple octree cube spaces in preparation for subsequent positioning processing. In one embodiment, for example, if the set distance is 32, the partitioning edge length set can be 16, 8, 4, 2, and 1, and during the partitioning process, 16, 8, 4, 2, and 1 are selected in sequence for iterative partitioning.
[0087] In addition, in one embodiment, as shown in FIG12 , the process of determining the location information of the point to be measured according to the first overlapping area and the second overlapping area may include but is not limited to step S410 and step S420 .
[0088] Step S410: determining an overlapping area between the first overlapping area and the second overlapping area as a coordinate area.
[0089] Step S420: determining the coordinate information corresponding to the coordinate area as positioning information.
[0090] In the embodiment of the present application, in determining the location information of the measured point based on 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 a coordinate area; then, the coordinate information corresponding to the coordinate area is determined as the location information. The location information may include latitude and longitude information and altitude information.
[0091] In one embodiment, after calculating the target octree cube space corresponding to the current location according to the octree coding algorithm, the longitude and latitude and three-dimensional coordinate information of the eight vertices of the cube are calculated, and eight virtual spheres are drawn with the eight vertices of the cube as the center and the distance between the eight vertices of the cube and the current location as the radius. 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 WiFi module of the user device scans the eight hotspot information, eight virtual spheres are drawn with the eight hotspots as the center 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. 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. 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. The positioning information is obtained by combining the three-dimensional coordinates and the longitude and latitude information.
[0092] It is worth noting that in traditional indoor WiFi positioning algorithms, based on a preset location information, a three-dimensional cube is virtualized with that 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. Similarly, the overlapping area is finally determined based on the WiFi hotspot information around the location as needed. 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 combined to obtain the location point information.
[0093] In addition, in one embodiment, as shown in FIG13 , after step S400 is executed, steps S510 and S520 may also be included but not limited to.
[0094] Step S510 , determining historical location information according to the positioning information and the corresponding octree cube space.
[0095] Step S520: storing the historical location information in a preset memory.
[0096] In some embodiments of the present application, after obtaining the location information of the point to be measured, historical location information can be determined based on the location information and the corresponding octree cube space. The obtained historical location information is then stored in a preset memory to facilitate subsequent positioning operations. The historical location information includes the location information of the point to be measured and the location information of the octree cube space where the point to be measured is located, and these two types of information correspond to each other.
[0097] In addition, in one embodiment, as shown in FIG. 14 , the positioning method may further include but is not limited to step S600 .
[0098] Step S600: When there is only one piece of historical location information in the octree cube space where the user equipment is located, the historical location information is used as the positioning information of the user equipment.
[0099] 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.
[0100] In order to more clearly illustrate the specific process of the positioning method provided in the embodiment of the present application, a specific example is given below.
[0101] As shown in FIG15 , the process of storing indoor precise location information may be as follows.
[0102] 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.
[0103] The octree encoding embodiment is called to draw the original octree cube with a side length of 2R0, and the cube information corresponding to the reference position is saved in the terminal processor.
[0104] According to the octree encoding algorithm, an octree is constructed for the native cube, and each space is divided into eight subspaces in sequence. The specific side lengths of the divided squares are R0 / 2, R0 / 4, R0 / 8, R0 / 16...R0 / 2 n .
[0105] Scan the terminal for hotspot information around the terminal, use the WiFi RTT ranging method to measure the distance between the terminal and the scanned AP, and save the MAC addresses and distance information of the eight AP hotspots closest to the location [LAP1, L1], [LAP2, L2], [LAP3, L3]... [LAP8, L8].
[0106] The user's horizontal and vertical distance from the reference point [lat0, long0, alt0] is used to determine which three-dimensional cube the user has walked into within the octree space. Each cube encoded in the octree stores the MAC address of the AP hotspot scanned at the user's location and calculates the distance to the hotspot using the WiFi RTT algorithm.
[0107] When a user reaches a precise indoor location, Wi-Fi RTT ranging is used to measure the distance between the terminal and the AP hotspots within range. The hotspot distances are sorted from smallest to largest and stored as [MAP1, L1], [MAP2, L2], [MAP3, L3], ..., [MAP8, L8]. The 3D coordinates of the eight hotspots are calculated based on their positions within a 3D virtual cube. A sphere is drawn with the eight hotspots as the center and L1, L2, L3, and L8 as the radii. The hotspot intersection area is calculated, and the longest diameter of the hotspot intersection information is Ldi0.
[0108] 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 .
[0109] Calculate the distances between the indoor location point and the eight vertices of the octree cube [L1, L2, L3...L8].
[0110] Draw a sphere with the eight vertices of the cube as the center and the distance between the precise indoor location point and the eight vertices of the octree cube [L1, L2, L3...L8] as the radius, and calculate the intersection area position of the octree cube. The longest diameter of the octree cube intersection information is: Ldi1.
[0111] Calculate the overlapping area between the hotspot intersection area and the octree cube intersection area. The diameter of the overlapping area is Ldi2. This position is the precise indoor location that the user needs to set.
[0112] The three-dimensional coordinate point information of the location is calculated based on the distance between the location and the eight vertices and eight hotspots of the octree virtual cube space. The saved path information and Ldi2 location information, as well as the hotspot scan information of the location [MAP1, L1], [MAP2, L2], [MAP3, L3]... [MAP8, L8], the radius of the octree cube, and the distance between the reference location point and the eight vertices of the octree cube [L1, L2, L3... L8] are stored in the memory of the indoor location.
[0113] Establish a relationship between the indoor precise location point and the approximate location point. When there are multiple indoor precise location points at a rough location point, multiple indoor location information can be saved according to Step 1-Step 11.
[0114] As shown in FIG16 , the process of obtaining precise indoor positioning information may be as follows.
[0115] When the user swipes a card at a rough location, the octree initial cube information corresponding to the rough location is called, and a multi-level octree traversal is performed on the initial cube.
[0116] When the user is walking, the user's horizontal and vertical paths 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 will be reported first. If there are multiple stored information corresponding to the preset path, they will be sorted according to the scanned WiFi hotspot information.
[0117] 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 the largest number of scanned hotspots.
[0118] When two location information scans the same number of preset WiFi hotspots, the distance between the terminal and the preset hotspots 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.
[0119] During the walking process, the positioning algorithm calculation is performed simultaneously according to Step 2-Step 4. The octree cube determined in Step 2 is prioritized for sorting, and then the hotspot MAC address information of the hotspot scanned at the current location and the distance to the hotspot are sorted and calculated.
[0120] When the user finally reaches the preset radius R0 / 2 n In the cube, it is determined whether the cube stores several three-dimensional coordinate point position information. If it corresponds to only one position information, the position information is directly reported.
[0121] 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 distances between the eight vertices of the cube are [L1, L2, L3...L8]. Using the eight vertices of the cube as the center, draw a circle with the distances between the final position and the eight vertices of the octree cube [L1, L2, L3...L8] as the radius. Calculate the intersection of the octree cube at that location. The longest diameter of the octree cube intersection information is: LdiX1. Also calculate the distances between this location and the scanned WiFi hotspots [LAP1, L1], [LAP2, L2], [LAP3, L3]...[LAP8, L8]. Draw a circle with L1, L2, L3, L8 as the radius to calculate the hotspot intersection area. The longest diameter of the hotspot intersection information is: LdiX2.
[0122] Calculate the overlapping area 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.
[0123] The Ldi1-LdiXn values of multiple location information are sorted by size, and the location information corresponding to the smaller value of Ldi1-LdiXn is directly reported.
[0124] 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.
[0125] In addition, as shown in FIG17 , an embodiment of the present application 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 .
[0126] The processor 710 and the memory 720 may be connected via a bus or other means.
[0127] 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.
[0128] The non-transient software programs 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, method steps S100 to S400 in Figure 1, method steps S110 to S120 in Figure 2, method steps S210 to S240 in Figure 3, method steps S111 to S112 in Figure 4, method steps S113 to S114 in Figure 7, method steps S310 to S330 in Figure 8, method step S311 in Figure 9, method step S312 in Figure 10, method steps S121 to S122 in Figure 11, method steps S410 to S420 in Figure 12, method steps S510 to S520 in Figure 13, and method step S600 in Figure 14 are executed.
[0129] In addition, an embodiment of the present application also 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 method steps S100 to S400 in Figure 1, method steps S110 to S120 in Figure 2, method steps S210 to S240 in Figure 3, method steps S111 to S112 in Figure 4, method steps S113 to S114 in Figure 7, method steps S310 to S330 in Figure 8, method step S311 in Figure 9, method step S312 in Figure 10, method steps S121 to S122 in Figure 11, method steps S410 to S420 in Figure 12, method steps S510 to S520 in Figure 13, and method step S600 in Figure 14.
[0130] This embodiment of the present application includes: during positioning, first obtaining spatial point cloud information and WiFi hotspot information of the target point; then determining a first overlapping area based on the spatial point cloud information and the target point; then determining a second overlapping area based on the WiFi hotspot information and the target point; and finally determining the location information of the target point based on the first overlapping area and the second overlapping area. This technical solution can solve the current problem of inaccurate WiFi positioning and significantly improve the precision and accuracy of WiFi positioning.
[0131] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, 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 can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, 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.
[0132] The above is a specific description of several implementations of the present application, but the present application is not limited to the above-mentioned implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, further comprising: 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 comprising: at least one processor; at least one memory configured to store at least one program; Wherein, when at least one of the programs is executed by at least one of the processors, the positioning method as described in any one of claims 1 to 11 is implemented.
13. A computer-readable storage medium storing computer-executable instructions, wherein: The computer executable instructions are used to execute the positioning method described in any one of claims 1 to 11.
Citation Information
Patent Citations
Positioning method and device, equipment and storage medium
CN110675457A
Comprehensive positioning method and device for multi-source positioning information fusion
CN111679303A
Indoor space high-precision visual position positioning method, terminal and storage medium
CN115578539A
Indoor navigation system based on augmented reality
US20210156695A1
Multi-sensor-fusion-based autonomous mobile robot indoor and outdoor positioning method and robot
US20230111122A1