A positioning method, device, equipment and medium based on two-dimensional code

By determining the center of the target circle and user location information in the indoor floor plan, using the area QR code to achieve indoor positioning without hardware facilities, solving the problem of inability to perform indoor positioning in a building under construction, which is of great application significance.

CN114964254BActive Publication Date: 2025-06-24PERSAGY TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210517515.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2025-06-24
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

Existing indoor positioning technologies need to rely on hardware facilities, such as WiFi or Bluetooth devices, and cannot effectively perform indoor positioning in buildings under construction without these hardware facilities.

Method used

By obtaining the indoor floor plan, determining the center of the target circle and the preset radiation radius, building the target circle, and determining the user's location information in the indoor floor plan, using the area QR code to achieve indoor positioning without the need for positioning devices.

Benefits of technology

It realizes indoor positioning of users without hardware facilities in construction buildings, which is of great significance for hardware installation, personnel positioning management and digital delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114964254B_ABST
    Figure CN114964254B_ABST
Patent Text Reader

Abstract

The present invention discloses a positioning method, device, equipment and medium based on a two-dimensional code. Among them, the method includes: obtaining an indoor floor plan corresponding to a preset indoor space; wherein, the indoor elements include at least one of door elements, window elements, column elements and wall elements; determining at least one target center point based on the indoor elements in the indoor floor plan; wherein, the target circle constructed based on the target center point and a preset radiation radius in the indoor floor plan has the largest coverage area in the indoor floor plan; when receiving a scanning request of a regional two-dimensional code from a user, determining the position information of the user in the preset indoor space based on the regional two-dimensional code; wherein, the regional two-dimensional code is set in the position area corresponding to the target center point in the preset indoor space. By implementing this solution, it is possible to perform indoor positioning on users in a building under construction without a positioning device, which is of great significance for hardware installation, personnel positioning management and digital delivery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of indoor positioning, and in particular, to a positioning method, device, equipment and medium based on two-dimensional codes. Background Art

[0002] With the advancement of the urbanization process, more and more skyscrapers and shopping malls have sprung up. Without exception, these modern large commercial buildings have a huge amount of indoor space. The demand for indoor space positioning technology has thus become increasingly urgent and has been more widely applied in the past few years. The popularization of wireless devices such as smart phones and Bluetooth has also greatly promoted the development of indoor positioning technology.

[0003] In related technologies, building indoor positioning technology is based on computer vision technology, wireless communication technology or LED visible light technology. These indoor positioning technologies must rely on certain hardware facilities, such as WiFi, Bluetooth devices, etc. However, for under-construction buildings that have not been equipped with these hardware facilities, the above positioning methods will fail, and the indoor positioning requirements for these under-construction buildings are also very urgent. Summary of the Invention

[0004] Embodiments of the present invention provide a positioning method, device, equipment and medium based on two-dimensional codes, which can realize indoor positioning of users in under-construction buildings without a positioning device, and have great significance for hardware installation, personnel positioning management and digital delivery.

[0005] In a first aspect, an embodiment of the present invention provides a positioning method based on two-dimensional codes, the method includes: obtaining an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements and wall elements;

[0006] determining at least one target center point based on the indoor elements in the indoor floor plan; wherein, the target circle constructed based on the target center point and a preset radiation radius in the indoor floor plan has the largest coverage area in the indoor floor plan;

[0007] When receiving a scanning request of a regional two-dimensional code from a user, determining the position information of the user in the preset indoor space based on the regional two-dimensional code; wherein, the regional two-dimensional code is set in a position area corresponding to the target center point in the preset indoor space.

[0008] Second aspect, an embodiment of the present invention further provides a positioning device based on a two-dimensional code. The device includes: an indoor floor plan determination module, configured to obtain an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements;

[0009] A target center determination module, configured to determine at least one target center in the indoor floor plan based on the indoor elements; wherein, a target circle constructed in the indoor floor plan based on the target center and a preset radiation radius has the largest coverage area in the indoor floor plan;

[0010] A user position information determination module, configured to, when receiving a scanning request of a user for a regional two-dimensional code, determine the position information of the user in the preset indoor space based on the regional two-dimensional code; wherein, the regional two-dimensional code is set in a position area corresponding to the target center in the preset indoor space.

[0011] Third aspect, an embodiment of the present invention further provides an electronic device. The device includes:

[0012] One or more processors;

[0013] A storage device, configured to store one or more programs,

[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the positioning method based on a two-dimensional code according to any one of the embodiments of the present invention.

[0015] Fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the positioning method based on a two-dimensional code according to any one of the embodiments of the present invention.

[0016] The technical solution provided by the embodiment of the present invention obtains an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements; determines at least one target center in the indoor floor plan based on the indoor elements; wherein, a target circle constructed in the indoor floor plan based on the target center and a preset radiation radius has the largest coverage area in the indoor floor plan; when receiving a scanning request of a user for a regional two-dimensional code, determines the position information of the user in the preset indoor space based on the regional two-dimensional code; wherein, the regional two-dimensional code is set in a position area corresponding to the target center in the preset indoor space. By executing the technical solution provided by the embodiment of the present invention, indoor positioning of users in a building under construction can be realized without a positioning device, which is of great significance for hardware installation, personnel positioning management, and digital delivery. Brief Description of the Drawings

[0017] Figure 1 is a flowchart of a positioning method based on two-dimensional code provided by an embodiment of the present invention;

[0018] Figure 2 is a schematic diagram of an indoor floor plan provided by an embodiment of the present invention;

[0019] Figure 3 is a schematic diagram of an indoor floor plan before fine-tuning each target center provided by an embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of an indoor floor plan after fine-tuning the target center of the wall element provided by an embodiment of the present invention;

[0021] Figure 5 is a flowchart of another positioning method based on two-dimensional code provided by an embodiment of the present invention;

[0022] Figure 6 is a schematic diagram of the structure of a positioning device based on two-dimensional code provided by an embodiment of the present invention;

[0023] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Detailed Description of the Embodiments

[0024] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. In addition, it should be noted that only parts related to the present invention are shown in the drawings for the convenience of description, rather than all the structures.

[0025] Figure 1 is a flowchart of a positioning method based on two-dimensional code provided by an embodiment of the present invention. The method can be executed by a positioning device based on two-dimensional code, and the device can be implemented in a software and / or hardware manner. The device can be configured in an electronic device for positioning based on two-dimensional code. The method is applied to the scenario of positioning a user indoors based on two-dimensional code. As Figure 1 shown, the technical solution provided by the embodiment of the present invention specifically includes:

[0026] S110: Obtain an indoor floor plan corresponding to a preset indoor space.

[0027] Among them, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements.

[0028] Among them, the preset indoor space can be, for example, a shopping mall, or it can be an indoor room of an under-construction building, and the preset indoor space can be set according to actual needs. The indoor floor plan corresponding to the preset indoor space can be obtained by performing CAD drawing on the preset indoor space, and the indoor floor plan includes indoor elements, such as at least one of door elements, window elements, column elements, and wall elements. As Figure 2 shown, the straight-line contour represents the wall element, the cross represents the door element, the five-pointed star represents the window element, and the solid circle represents the column element. The horizontal and vertical coordinates represent the position coordinate system customized on the CAD drawing.

[0029] S120: Determine at least one target center point based on the indoor elements in the indoor floor plan.

[0030] Among them, the target circle constructed based on the target center point and the preset radiation radius in the indoor floor plan has the largest coverage area of rights and interests in the indoor floor plan.

[0031] Among them, the preset radiation radius can be 5m, or it can be 3m, and the preset radiation radius can be set according to actual needs.

[0032] In this solution, a candidate center point set can be determined in the indoor floor plan according to indoor elements such as door elements, window elements, column elements, and wall elements. For example, for door elements, window elements, and column elements, they can be directly added to the candidate center point set as candidate center points. For wall elements, the concave and convex points in the wall elements can be added to the candidate center point set as candidate center points. For each candidate center point, a candidate circle is constructed in the indoor floor plan according to the preset radiation radius, and then the candidate center point corresponding to the candidate circle with the largest coverage area of rights and interests is used as the target center point. Among them, the coverage area of rights and interests of the candidate circle is the product of the actual coverage area of the candidate circle in the indoor floor plan and the weight of the indoor element to which the corresponding candidate center point belongs. For example, if the candidate center point is a door element, its corresponding weight can be 1.15. If the candidate center point is a window element, its corresponding weight can be 1.1. If the candidate center point is a column element, its corresponding weight can be 1.05. If the candidate center point is a wall element, its corresponding weight can be 1. The weights of the indoor elements to which the candidate center points belong can be set according to actual needs.

[0033] Then start iteration to determine other target center points until the iteration stop condition is reached. The specific iteration rule is: update the candidate center point set according to the determined target center points, that is, determine a new candidate center point set from the indoor elements outside the actual coverage range of the determined target circle in the indoor floor plan. And return to execute the step of constructing corresponding candidate circles based on each candidate center point in the candidate center point set and the preset radiation radius, and use the candidate center point corresponding to the candidate circle with the largest coverage area of rights and interests as the target center point: Among them, dot i+1 represents the (i + 1)-th target center of the circle, represents the total equity coverage area of the target center set C i+1 =(dot1, dot2,..., dot i+1 ) after determining the (i + 1)-th center of the circle, represents the total equity coverage area of the target center set C i =(dot1, dot2,..., dot i ) after determining the i-th center of the circle. The actual meaning of the above formula can be understood as: after determining the (i + 1)-th target center of the circle, the target center set C i+1 has the largest total equity coverage area gain relative to C i . That is:

[0034]

[0035] Among them, D represents the set of candidate centers of the circle where dot i+1 may take points. The actual meaning is: traverse all candidate centers in the set of candidate centers of the circle, and find the candidate center with the largest area gain as dot i+1 . Stop determining the target center of the circle until the ratio of the total equity coverage area of the determined target circles in the indoor floor plan to the area of the indoor floor plan reaches the first preset ratio. The first preset ratio can be set according to actual needs. For example, the first preset ratio can be 80%. Or, until the ratio of the difference between the total equity coverage area of the determined target circles in the indoor floor plan at the current moment and the total equity coverage area of the determined target circles in the indoor floor plan at the previous moment to the area of the indoor floor plan reaches the second preset ratio, stop determining the target center of the circle. The second preset ratio can be set according to actual needs. For example, the second preset ratio can be 4%. Among them, each time the target center of the circle is determined, the total equity coverage area of the target circles constructed in the indoor floor plan based on each target center and the preset radiation radius is the largest. Exemplarily, as Figure 3 shown, the ratio of the total equity coverage area of the determined target centers in the indoor floor plan of Room A to the area of the indoor floor plan is 85.74%.

[0036] In this embodiment, optionally, the target center of the circle includes the center of the circle determined by the wall element; after determining at least one target center of the circle in the indoor floor plan based on the indoor elements, it further includes: for the target center of the circle determined by the wall element, using a genetic algorithm to adjust the target center of the circle based on a preset fine-tuning radius.

[0037] Among them, after determining each target center point, this solution can also fine-tune the target center points determined by the wall elements to make the adjusted target center points determine a larger coverage area of rights and interests. The fine-tuning radius can be 2m, the fine-tuning radius can be 1m, and the fine-tuning radius can be set according to actual needs.

[0038] Specifically, this solution can use a genetic algorithm to adjust the target center points based on a preset fine-tuning radius. First, take the set composed of each target center point before fine-tuning as an approximate optimal solution. Assume that the fine-tuning radius is set to 2m, then Figure 3 It can be seen that the number of target center points to be fine-tuned is 5. The bold area around each target center point determined by the wall element is the fine-tuning area of this center point. Encode each point in the fine-tuning area of each target center point in sequence (a point can be taken every 5cm within the fine-tuning area).

[0039] Then, determine the original population including an approximate optimal solution and four random solutions, such as [[0, 0, 0, 0, 0, 0], [0, 17, 8, 18, 8, 6], [0, 1, 20, 14, 21, 16], [0, 21, 12, 11, 2, 22], [0, 2, 16, 23, 14, 14]]. Among them, each secondary list represents an individual, each individual represents a solution, and each element in it represents the number of a point within the adjustable area of a target center point.

[0040] Furthermore, calculate the fitness. Among them, fitness can be understood as an index to measure the quality of each solution. The fitness function selected here is:

[0041]

[0042] Among them, M i represents the i-th solution, represents the total coverage area of rights and interests corresponding to the i-th solution, represents the ranking of the i-th solution in the solution population (the number of objects is n, that is, the number of target center points).

[0043] Secondly, after calculating the "survival ability" of each individual, it is necessary to follow the principle of "survival of the fittest" and naturally select those individuals with stronger survival ability to survive. The selection method here is roulette.

[0044] Thirdly, after selecting the individuals with strong survival ability, let them simulate mating with a certain probability p1 (assuming p1 = 0.75, which can be set according to actual needs) to produce offspring. The offspring are new individuals formed by the exchange of part of the genes of the parent generation. Let these new individuals and the individuals that did not complete crossover in the previous round enter the next round of iteration.

[0045] Finally, to avoid falling into local optimal points, a certain mutation probability p2 is added to these individuals (assuming p2 = 0.20, which can be set according to actual needs), enabling them to jump out of local optimal points. When the preset number of iteration rounds is reached, the iteration stops (assuming the preset number of iteration rounds is 500, which can be set according to actual needs), and the optimal solution after fine-tuning as shown in Figure 4 is determined. The improvement in the total rights and interests coverage area brought about by fine-tuning is approximately between 0% and 5%. For example, in this solution, after 500 rounds of iteration-based fine-tuning, the ratio of the total rights and interests coverage area of each target center point in the indoor floor plan of Room A to the area of the indoor floor plan is 89.177%, which is approximately Figure 3 3.5% higher than the ratio of the total rights and interests coverage area before fine-tuning to the area of the indoor floor plan in

[0046] Thus, by adjusting the target center points based on the genetic algorithm with a preset fine-tuning radius for the target center points determined by wall elements, more rights and interests coverage area can be covered, and more accurate and wider-range indoor positioning can be achieved.

[0047] S130: When receiving a scanning request from a user for a regional QR code, determine the position information of the user in the preset indoor space based on the regional QR code.

[0048] Among them, the regional QR code is set in the position area corresponding to the target center point in the preset indoor space.

[0049] Among them, as shown in Figure 3 or Figure 4 , each hollow center point represents a regional QR code. The regional QR code is set in the spatial position corresponding to the target center point. The coverage range of the regional QR code can be determined according to the target center point and the preset radiation radius. Assuming the target center point is a column element, the regional QR code is set in the position area corresponding to the column element in the preset indoor space. When receiving a scanning request from a user for the regional QR code set on the column element, this solution can determine the position information of the user in the preset indoor space according to the coverage range of the regional QR code, such as in the vicinity of the column element.

[0050] The technical solution provided by the embodiment of the present invention obtains an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements; based on the indoor elements, at least one target center is determined in the indoor floor plan; wherein, the target circle constructed in the indoor floor plan based on the target center and a preset radiation radius has the largest coverage area in the indoor floor plan; when a scanning request for a regional QR code from a user is received, the position information of the user in the preset indoor space is determined based on the regional QR code; wherein, the regional QR code is set in the position area corresponding to the target center in the preset indoor space. By implementing the technical solution provided by the embodiment of the present invention, indoor positioning of users in a building under construction can be achieved without a positioning device, which is of great significance for hardware installation, personnel positioning management, and digital delivery.

[0051] Figure 5 is a flowchart of another QR code-based positioning method provided by the embodiment of the present invention, and this embodiment is optimized based on the above embodiment. As Figure 5 shown, the QR code-based positioning method in the embodiment of the present invention may include:

[0052] S210: Obtain an indoor floor plan corresponding to a preset indoor space.

[0053] S220: Determine a set of candidate centers in the indoor floor plan based on the indoor elements.

[0054] Among them, the set of candidate centers includes at least one candidate center.

[0055] Specifically, this solution can determine the set of candidate centers in the indoor floor plan according to indoor elements such as door elements, window elements, column elements, and wall elements. For example, for door elements, window elements, and column elements, they can be directly added to the set of candidate centers as candidate centers. For wall elements, the concave and convex points in the wall elements can be added to the set of candidate centers as candidate centers.

[0056] S230: Respectively construct corresponding candidate circles based on each candidate center in the set of candidate centers and a preset radiation radius.

[0057] Among them, the preset radiation radius can be 3m, the preset radiation radius can be 5m, and the preset radiation radius can be set according to actual needs. The preset radiation radii of each candidate center are preferably the same, for example, all 5m. This solution can respectively construct corresponding candidate circles based on each candidate center in the set of candidate centers and a preset radiation radius.

[0058] S240: Determine the weighted coverage area of each candidate circle based on the actual coverage area of each candidate circle in the indoor floor plan and the weight of the corresponding candidate center.

[0059] Among them, the weight of the candidate center can be determined according to the indoor element to which the candidate center belongs. For example, if the candidate center is a door element, its corresponding weight can be 1.15. If the candidate center is a window element, its corresponding weight can be 1.1. If the candidate center is a column element, its corresponding weight can be 1.05. If the candidate center is a wall element, its corresponding weight can be 1. The weight of the candidate center can be set according to actual needs. This solution can determine the weighted coverage area of each candidate circle based on the actual coverage area of each candidate circle in the indoor floor plan and the weight of the corresponding candidate center. For example, this solution can multiply the actual coverage area of each candidate circle in the indoor floor plan by the weight of the corresponding candidate center to determine the weighted coverage area of each candidate circle.

[0060] Exemplarily, assume that candidate center 1 is a door element and the actual coverage area of candidate center 1 in the indoor floor plan is 20π. Then, the weighted coverage area of the candidate circle constructed by candidate center 1 is 20π × 1.15 = 23π. Assume that candidate center 2 is a window element and the actual coverage area of candidate center 2 in the indoor floor plan is 18π. Then, the weighted coverage area of the candidate circle constructed by candidate center 2 is 18π × 1.1 = 19.8π.

[0061] S250: Determine at least one target center from the set of candidate centers based on the weighted coverage area.

[0062] Among them, this solution can use the candidate center corresponding to the candidate circle with the largest weighted coverage area as the target center from the weighted coverage areas of each candidate circle.

[0063] In this embodiment, optionally, determining at least one target center from the set of candidate centers based on the weighted coverage area includes: using the candidate center corresponding to the candidate circle with the largest weighted coverage area as the target center; updating the set of candidate centers based on the target center and returning to execute constructing the corresponding candidate circles based on each candidate center in the set of candidate centers and the preset radiation radius until the preset condition is satisfied; where the updated set of candidate centers does not include the candidate centers covered by the candidate circle corresponding to the target center.

[0064] Specifically, the preset condition can be that the ratio of the total interest coverage area of all completed target circles in the indoor floor plan to the area of the indoor floor plan reaches a certain ratio. The preset condition can also be that the ratio of the difference between the total interest coverage area of all completed target circles in the indoor floor plan at the current moment and the total interest coverage area of all completed target circles in the indoor floor plan at the previous moment to the area of the indoor floor plan reaches a certain ratio. This solution can update the candidate center point set based on the determined completed target center points, that is, update the candidate center point set from the indoor elements outside the coverage range of the determined completed target circles in the indoor floor plan. And return to execute the step of constructing corresponding candidate circles based on each candidate center point in the candidate center point set and the preset radiation radius, determine the next target center point, and stop determining the target center point until the preset condition is met.

[0065] Thus, by using the candidate center point corresponding to the candidate circle with the largest interest coverage area as the target center point; updating the candidate center point set based on the target center point, and returning to execute the steps of constructing corresponding candidate circles based on each candidate center point in the candidate center point set and the preset radiation radius until the preset condition is met. It is possible to cover the largest indoor range with the fewest area two-dimensional codes, and more accurate and wider indoor positioning can be achieved.

[0066] In a feasible implementation manner, optionally, the preset condition includes: the ratio of the total interest coverage area of the candidate circles corresponding to all target center points in the indoor floor plan to the area of the indoor floor plan is greater than a first preset ratio; or, the ratio of the target interest coverage area difference to the area of the indoor floor plan is less than a second preset ratio; where the second preset ratio is less than the first preset ratio; the target interest coverage area difference is the difference between a first total interest coverage area and a second total interest coverage area; the first total interest coverage area is the total interest coverage area of the candidate circles corresponding to all target center points determined at the current moment in the indoor floor plan, and the second total interest coverage area is the total interest coverage area of the candidate circles corresponding to all target center points determined at the previous moment in the indoor floor plan.

[0067] Exemplarily, the first preset ratio can be 80%, the first preset ratio can be 90%, and the first preset ratio can be set according to actual needs. The second preset ratio can be 4%, the second preset ratio can be 3%, and the second preset ratio can be set according to actual needs. In this solution, after each target center is determined, it is necessary to calculate the ratio of the total rights and interests coverage area of the candidate circles corresponding to all target centers in the indoor floor plan to the area of the indoor floor plan. When it is determined that this ratio is greater than the first preset ratio, it means that a large proportion of the indoor area has been covered, and the operation of continuing to determine the target center is stopped. Alternatively, in this solution, after each target center is determined, it is necessary to determine the ratio of the difference between the total rights and interests coverage area of the candidate circles corresponding to all target centers determined at the current moment in the indoor floor plan and the total rights and interests coverage area of the candidate circles corresponding to all target centers determined at the previous moment in the indoor floor plan to the area of the indoor floor plan. If this ratio is less than the second preset ratio, it means that even if one more target center is determined, the increased rights and interests coverage area generated is not much changed, and the operation of continuing to determine the target center is stopped.

[0068] Thus, by setting preset conditions to control the operation of ending the determination of the target center, the planning efficiency can be improved, meaningless data processing operations can be reduced, and thus the time complexity and space complexity of the calculation are reduced.

[0069] In another feasible implementation manner, optionally, the candidate center set includes a first type of candidate center composed of the door element, the window element, and the column element, and a second type of candidate center composed of the concave and convex points on the wall element; updating the candidate center set based on the target center includes: when the first type of candidate center is not within the area covered by the candidate circle corresponding to the target center, using the first type of candidate center as the candidate center in the updated candidate center set; when at least one end point of the wall element corresponding to the second type of candidate center is not within the area covered by the candidate circle corresponding to the target center, determining the maximum distance and the minimum distance from the wall element corresponding to the second type of candidate center to the target center determined at the previous moment, and determining the candidate center in the updated candidate center set from the wall element according to the maximum distance and the minimum distance.

[0070] Among them, the first type of candidate center includes door elements, window elements, and column elements. The second type of candidate center includes the concave and convex points on the wall element. If it is determined that the first type of candidate center is not within the area covered by the candidate circle corresponding to the target center in this solution, the first type of candidate center can be used as the candidate center in the updated candidate center set. When it is determined that at least one end point of the wall element corresponding to the second type of candidate center is not within the area covered by the candidate circle corresponding to the target center, the maximum distance and the minimum distance from the wall element corresponding to the second type of candidate center to the target center determined at the previous moment can be determined, and the candidate center in the updated candidate center set can be determined from the wall element according to the maximum distance and the minimum distance. For example, if it is determined that both the maximum distance and the minimum distance from the wall element corresponding to the second type of candidate center to the target center determined at the previous moment are greater than the diameter of the target circle, the point on the wall element with the minimum distance to the target center determined at the previous moment is used as the candidate center in the updated candidate center set. If it is determined that the maximum distance from the wall element corresponding to the second type of candidate center to the target center determined at the previous moment is greater than the diameter of the target circle, and the minimum distance from this wall element to the target center determined at the previous moment is less than the diameter of the target circle, the tangent point of the wall element to the target circle determined at the previous moment is determined and used as the candidate center in the updated candidate center set.

[0071] Thus, by updating the candidate centers in the candidate center set according to the determined target center, the preset radiation radius of the target center, and the indoor elements to which the candidate centers belong, it is possible to update the candidate center set every time when determining each target center through iteration, providing a reliable data source for subsequent steps.

[0072] In another feasible implementation manner, optionally, determining the candidate center in the updated candidate center set from the wall element according to the maximum distance and the minimum distance includes: when the maximum distance is greater than the preset radiation diameter and the minimum distance is less than the preset radiation diameter, determining the tangent point of the candidate circle corresponding to the target center determined at the previous moment in the wall element corresponding to the second type of candidate center, and using the tangent point as the candidate center in the updated candidate center set; where the preset radiation diameter is twice the preset radiation radius; when the maximum distance is greater than the preset radiation diameter and the minimum distance is greater than the preset radiation diameter, using the end point of the wall element corresponding to the second type of candidate center that is closest to the target center determined at the previous moment as the candidate center in the updated candidate center set.

[0073] Among them, the preset radiation diameter is twice the preset radiation radius. Assuming that the preset radiation radius of the target circle is 5m, the preset radiation diameter is 10m. Assuming that the maximum distance from the wall element corresponding to the candidate center of the second type to the target center determined at the previous moment is greater than 10m, and the minimum distance from the wall element to the target center determined at the previous moment is less than 10m, it means that there must be a point on the wall element whose distance from the target center determined at the previous moment is equal to the preset radiation diameter. This tangent point is used as the candidate center in the updated candidate center set. Assuming that both the maximum distance and the minimum distance from the wall element corresponding to the candidate center of the second type to the target center determined at the previous moment are greater than 10m, it means that the wall element is outside the target circle determined at the previous moment. The point on the wall element whose distance from the target center determined at the previous moment is the minimum distance is used as the candidate center in the updated candidate center set.

[0074] Thus, by updating the candidate centers in the candidate center set according to the distance between the target circle determined at the previous moment and the wall element, the candidate centers of the wall elements in the candidate center set can be updated, providing a reliable data source for the subsequent steps.

[0075] S260: When receiving a scanning request from the user for the area QR code, determine the position information of the user in the preset indoor space based on the area QR code.

[0076] The technical solution provided by the embodiments of the present invention is to obtain the indoor floor plan corresponding to the preset indoor space, and determine a candidate center set based on indoor elements in the indoor floor plan; among them, the candidate center set includes at least one candidate center; respectively construct corresponding candidate circles based on each candidate center in the candidate center set and the preset radiation radius; respectively determine the weighted coverage area of each candidate circle based on the actual coverage area of each candidate circle in the indoor floor plan and the weight of the corresponding candidate center; based on the weighted coverage area, determine at least one target center from the candidate center set; when receiving a scanning request from the user for the area QR code, determine the position information of the user in the preset indoor space based on the area QR code. By implementing this solution, indoor positioning of users in an under-construction building can be achieved without a positioning device, which is of great significance for hardware installation, personnel positioning management, and digital delivery.

[0077] Figure 6 It is a schematic structural diagram of a positioning device based on QR code provided by the embodiments of the present invention. The device can be configured in an electronic device for positioning based on QR code, such as Figure 6 shown, the device includes:

[0078] The indoor floor plan determination module 310 is configured to obtain the indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements;

[0079] The target center determination module 320 is configured to determine at least one target center in the indoor floor plan based on the indoor elements; wherein, the target circle constructed in the indoor floor plan based on the target center and a preset radiation radius has the largest coverage area in the indoor floor plan;

[0080] The user location information determination module 330 is configured to, when receiving a scanning request from the user for a regional QR code, determine the location information of the user in the preset indoor space based on the regional QR code; wherein, the regional QR code is set in the location area corresponding to the target center in the preset indoor space.

[0081] Optionally, the target center determination module 320 includes a candidate center set determination unit configured to determine a candidate center set in the indoor floor plan based on the indoor elements; wherein, the candidate center set includes at least one candidate center; a candidate circle construction unit configured to construct corresponding candidate circles respectively based on each candidate center in the candidate center set and a preset radiation radius; a weighted coverage area determination unit configured to determine the weighted coverage area of each candidate circle respectively based on the actual coverage area of each candidate circle in the indoor floor plan and the weight corresponding to the candidate center; a target center determination unit configured to determine at least one target center from the candidate center set based on the weighted coverage area.

[0082] Optionally, the target center determination unit includes a target center determination subunit configured to use the candidate center corresponding to the candidate circle with the largest weighted coverage area as the target center; a candidate center set update subunit configured to update the candidate center set based on the target center and return to execute constructing corresponding candidate circles respectively based on each candidate center in the candidate center set until a preset condition is met; wherein, the updated candidate center set does not include the candidate centers covered by the candidate circle corresponding to the target center.

[0083] Optionally, the preset conditions include: the ratio of the total interest coverage area of the candidate circles corresponding to all target centers in the indoor floor plan to the area of the indoor floor plan is greater than a first preset ratio; or, the ratio of the target interest coverage area difference to the area of the indoor floor plan is less than a second preset ratio; where the second preset ratio is less than the first preset ratio; the target interest coverage area difference is the difference between a first total interest coverage area and a second total interest coverage area; the first total interest coverage area is the total interest coverage area of the candidate circles corresponding to all target centers determined at the current moment in the indoor floor plan, and the second total interest coverage area is the total interest coverage area of the candidate circles corresponding to all target centers determined at the previous moment in the indoor floor plan.

[0084] Optionally, the candidate center set includes a first type of candidate center composed of the door element, the window element, and the column element, and a second type of candidate center composed of the concave and convex points on the wall element; the candidate center set update subunit is specifically configured to: when the first type of candidate center is not within the area covered by the candidate circle corresponding to the target center, use the first type of candidate center as the candidate center in the updated candidate center set; when at least one end point of the wall element corresponding to the second type of candidate center is not within the area covered by the candidate circle corresponding to the target center, determine the maximum distance and the minimum distance from the wall element corresponding to the second type of candidate center to the target center determined at the previous moment, and determine the candidate center in the updated candidate center set from the wall element according to the maximum distance and the minimum distance.

[0085] Optionally, the candidate center set update subunit is specifically configured to: when the maximum distance is greater than the preset radiation diameter and the minimum distance is less than the preset radiation diameter, determine the tangent point of the wall element corresponding to the second type of candidate center and the candidate circle corresponding to the target center determined at the previous moment, and use the tangent point as the candidate center in the updated candidate center set; where the preset radiation diameter is twice the preset radiation radius; when the maximum distance is greater than the preset radiation diameter and the minimum distance is greater than the preset radiation diameter, use the end point of the wall element corresponding to the second type of candidate center that is closest to the target center determined at the previous moment as the candidate center in the updated candidate center set.

[0086] Optionally, the target center includes the center determined by the wall element; the device further includes a target center adjustment module, configured to, after determining at least one target center based on the indoor elements in the indoor floor plan, for the target center determined by the wall element, adjust the target center using a genetic algorithm based on a preset fine-tuning radius.

[0087] The device provided in the above embodiments can execute the QR code-based positioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0088] Figure 7 FIG. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. As Figure 7 shown, the device includes:

[0089] One or more processors 410, Figure 7 Taking one processor 410 as an example;

[0090] A memory 420;

[0091] The device may further include: an input device 430 and an output device 440.

[0092] The processor 410, the memory 420, the input device 430, and the output device 440 in the device may be connected through a bus or other means. Figure 7 Taking connection through a bus as an example.

[0093] The memory 420, as a non-transitory computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to a QR code-based positioning method in an embodiment of the present invention. The processor 410 executes various functional applications and data processing of the computer device by running the software programs, instructions, and modules stored in the memory 420, that is, to implement a QR code-based positioning method in the above method embodiment, that is:

[0094] Obtain an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, pillar elements, and wall elements;

[0095] Based on the indoor elements, determine at least one target center in the indoor floor plan; wherein, the target circle constructed in the indoor floor plan based on the target center and a preset radiation radius has the largest coverage area in the indoor floor plan;

[0096] When receiving a scanning request of a user for a regional QR code, determine the position information of the user in the preset indoor space based on the regional QR code; wherein, the regional QR code is set in a position area corresponding to the target center in the preset indoor space.

[0097] The memory 420 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 420 may include a high-speed random access memory and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 420 may optionally include a memory remotely provided with respect to the processor 410, and these remote memories may be connected to the terminal device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0098] The input device 430 may be used to receive input digital or character information and generate key signal inputs related to the user settings and function controls of the computer device. The output device 440 may include a display device such as a display screen.

[0099] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements a positioning method based on a two-dimensional code as provided in the embodiment of the present invention:

[0100] Obtain an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements;

[0101] Determine at least one target center point based on the indoor elements in the indoor floor plan; wherein, the target circle constructed based on the target center point and a preset radiation radius in the indoor floor plan has the largest coverage area in the indoor floor plan;

[0102] When a scanning request for a regional two-dimensional code from a user is received, determine the position information of the user in the preset indoor space based on the regional two-dimensional code; wherein, the regional two-dimensional code is set in a position area corresponding to the target center point in the preset indoor space.

[0103] Any combination of one or more computer-readable media may be employed. The computer-readable media may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

[0104] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal may take any of a variety of forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium that is not a computer-readable storage medium and that can send, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0105] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including—but not limited to—wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0106] The computer program code for carrying out operations of the present invention may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, as well as conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0107] Note that the above is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A positioning method based on a two-dimensional code, characterized in that Including: Obtain an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, column elements, and wall elements; Based on the indoor elements, determine at least one target center point in the indoor floor plan; wherein, the target circle constructed in the indoor floor plan based on the target center point and a preset radiation radius has the largest coverage area of rights and interests in the indoor floor plan; wherein, the coverage area of rights and interests is the product of the actual coverage area of the target circle in the indoor floor plan and the weight of the indoor element to which the corresponding target center point belongs; When receiving a scanning request of a user for a regional QR code, determine the position information of the user in the preset indoor space based on the regional QR code; wherein, the regional QR code is set in a position area corresponding to the target center point in the preset indoor space.

2. The method according to claim 1, wherein Determining at least one target center point in the indoor floor plan based on the indoor elements includes: Based on the indoor elements, determine a candidate center point set in the indoor floor plan; wherein, the candidate center point set includes at least one candidate center point; Construct corresponding candidate circles respectively based on each candidate center point in the candidate center point set and the preset radiation radius; Based on the actual coverage area of each candidate circle in the indoor floor plan and the weight of the corresponding candidate center point, determine the coverage area of rights and interests of each candidate circle; Based on the coverage area of rights and interests, determine at least one target center point from the candidate center point set.

3. The method according to claim 2, wherein Determining at least one target center point from the candidate center point set based on the coverage area of rights and interests includes: Take the candidate center point corresponding to the candidate circle with the largest coverage area of rights and interests as the target center point; Update the candidate center point set based on the target center point, and return to execute constructing corresponding candidate circles respectively based on each candidate center point in the candidate center point set and the preset radiation radius until a preset condition is met; wherein, the updated candidate center point set does not include the candidate center points covered by the candidate circle corresponding to the target center point.

4. The method according to claim 3, wherein The preset condition includes: The ratio of the total coverage area of rights and interests of the candidate circles corresponding to all target center points in the indoor floor plan to the area of the indoor floor plan is greater than a first preset ratio; or, The ratio of the difference in target coverage area of rights and interests to the area of the indoor floor plan is less than a second preset ratio; wherein, the second preset ratio is less than the first preset ratio; the difference in target coverage area of rights and interests is the difference between a first total coverage area of rights and interests and a second total coverage area of rights and interests; the first total coverage area of rights and interests is the total coverage area of rights and interests of the candidate circles corresponding to all target center points determined at the current moment in the indoor floor plan, and the second total coverage area of rights and interests is the total coverage area of rights and interests of the candidate circles corresponding to all target center points determined at the previous moment in the indoor floor plan.

5. The method according to claim 3, characterized in that, The candidate center point set includes a first type of candidate center points composed of the door elements, the window elements, and the column elements, and a second type of candidate center points composed of the concave and convex points on the wall elements; Updating the candidate center point set based on the target center point includes: When the first - type candidate center of the circle is not within the area covered by the candidate circle corresponding to the target center of the circle, use the first - type candidate center of the circle as the candidate center of the circle in the updated candidate center set; When at least one endpoint of the wall element corresponding to the second - type candidate center of the circle is not within the area covered by the candidate circle corresponding to the target center of the circle, determine the maximum distance and the minimum distance from the wall element corresponding to the second - type candidate center of the circle to the target center of the circle determined at the previous moment, and determine the candidate center of the circle in the updated candidate center set from the wall element according to the maximum distance and the minimum distance.

6. The method according to claim 5, characterized in that Determining the candidate center of the circle in the updated candidate center set from the wall element according to the maximum distance and the minimum distance includes: When the maximum distance is greater than the preset radiation diameter and the minimum distance is less than the preset radiation diameter, determine the tangent point of the candidate circle corresponding to the target center of the circle determined at the previous moment in the wall element corresponding to the second - type candidate center of the circle, and use the tangent point as the candidate center of the circle in the updated candidate center set; wherein, the preset radiation diameter is twice the preset radiation radius; When the maximum distance is greater than the preset radiation diameter and the minimum distance is greater than the preset radiation diameter, use the endpoint of the wall element corresponding to the second - type candidate center of the circle that is closest to the target center of the circle determined at the previous moment as the candidate center of the circle in the updated candidate center set.

7. The method according to claim 1, wherein The target center of the circle includes the center of the circle determined by the wall element; After determining at least one target center of the circle in the indoor floor plan based on the indoor elements, it further includes: For the target center of the circle determined by the wall element, use a genetic algorithm to adjust the target center of the circle based on a preset fine - tuning radius.

8. A positioning device based on a two-dimensional code, characterized in that, It includes: An indoor floor plan determination module, configured to obtain an indoor floor plan corresponding to a preset indoor space; wherein, the indoor floor plan includes indoor elements; the indoor elements include at least one of door elements, window elements, pillar elements, and wall elements; A target center determination module, configured to determine at least one target center of the circle in the indoor floor plan based on the indoor elements; wherein, the target circle constructed in the indoor floor plan based on the target center of the circle and the preset radiation radius has the largest weighted coverage area in the indoor floor plan; wherein, the weighted coverage area is the product of the actual coverage area of the target circle in the indoor floor plan and the weight of the indoor element to which the corresponding target center of the circle belongs; A user position information determination module, configured to, when receiving a user's scan request for a regional two - dimensional code, determine the position information of the user in the preset indoor space based on the regional two - dimensional code; wherein, the regional two - dimensional code is set in the position area corresponding to the target center of the circle in the preset indoor space.

9. An electronic device, characterized in that, It includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the two - dimensional code - based positioning method according to any one of claims 1 - 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the QR code-based positioning method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Indoor pedestrian positioning and navigation path planning method based on two-dimensional code

    CN114061585A