Indoor area positioning method, electronic equipment, storage medium and indoor positioning system

By dividing the positioning area in the indoor area and processing signal data using beacon and filtering models, selecting suitable path loss model and positioning algorithm, the problem of insufficient indoor positioning accuracy is solved, and high-precision positioning is achieved in different environments.

CN120302415APending Publication Date: 2025-07-11SHENZHEN FENGXIANG SHUILONG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510404454.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing indoor positioning technology is difficult to achieve accurate positioning in positioning areas with different environmental characteristics, resulting in insufficient positioning accuracy and stability.

Method used

By dividing multiple positioning areas in indoor areas, each area deploys beacons and binds area tags, using preset filtering models to process signal data, selecting suitable path loss models and positioning algorithms, and combining ridge regression models and L2 regularization technology for signal filtering and positioning calculations.

Benefits of technology

The accuracy and applicability of indoor positioning are improved, and more accurate position determination can be achieved in positioning areas with different environmental characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120302415A_ABST
    Figure CN120302415A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of indoor positioning, and discloses an indoor area positioning method, electronic equipment, a storage medium and an indoor positioning system, and the method comprises the steps: obtaining signal data of a signal transmitted by a target beacon at a to-be-detected position; according to the signal data, determining a target positioning area where the to-be-detected position is located from the multiple positioning areas; filtering the first RSSI value through a preset filtering model to obtain a filtered RSSI value; determining a target path loss model corresponding to the target positioning area according to the target positioning area, and determining the distance between the target beacon and the to-be-measured position according to the filtering RSSI value and the target path loss model; determining the number of the filtering RSSI values, and determining a target positioning algorithm according to the number of the filtering RSSI values and the target positioning area; and according to the distance and the filtered RSSI value, determining a positioning coordinate of the to-be-measured position through a target positioning algorithm. According to the method, the applicability of the positioning method in different positioning areas and the accuracy of the positioning result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of indoor positioning, and in particular, to an indoor area positioning method, an electronic device, a storage medium, and an indoor positioning system. Background Art

[0002] With the development of Internet of Things technology and the wide application of mobile devices, location-based services have been popularized in all aspects of life. Among them, satellite navigation technology in outdoor environments has been very mature. However, in indoor environments, such as large underground shopping malls, parking lots, subways, etc., due to the blocking of satellite signals by buildings and the complexity of indoor environments, the accuracy of satellite signal positioning services is relatively low.

[0003] Currently, indoor positioning technology mainly realizes indoor positioning through Bluetooth Low Energy (BLE) technology. Specifically, several BLE beacons are deployed in an indoor environment and the positions of each BLE beacon are recorded. The Bluetooth signals of the BLE beacons are received by the Bluetooth devices of people or objects, and the positions of people or objects are determined based on the received Bluetooth signals and the positions of the BLE beacons, thereby realizing the positioning of people or objects. However, an indoor area usually includes multiple positioning areas with different environmental characteristics (such as a wide hall, a narrow corridor, a small bathroom, etc.), and different environmental characteristics have different effects on Bluetooth signals. For example, when there are obstacles, Bluetooth signals will have phenomena such as signal attenuation and multipath effect, which affect the positioning accuracy. Since the signal attenuation and multipath effect are also different in different positioning areas, the same positioning model or positioning algorithm is difficult to apply to multiple different positioning areas in an indoor area, thereby affecting the accuracy and stability of indoor positioning. Summary of the Invention

[0004] In view of the above problems, the embodiments of the present application provide an indoor positioning method, which is used to solve the problem in the prior art that it is difficult to achieve precise positioning in different positioning areas of the same indoor area.

[0005] According to one aspect of the embodiments of the present application, an indoor area positioning method is provided. The indoor area is divided into multiple positioning areas according to environmental characteristics, and beacons are deployed in each positioning area. Each beacon is bound with an area label corresponding to the positioning area where the beacon is located. The method includes: obtaining signal data of signals emitted by target beacons at a position to be measured, where the signal data includes the first RSSI value of the signals emitted by each target beacon and the area label bound to each target beacon; determining the target positioning area where the position to be measured is located from multiple positioning areas according to the signal data; filtering the first RSSI value through a preset filtering model to obtain a filtered RSSI value; determining a target path loss model corresponding to the target positioning area from multiple path loss models according to the target positioning area, and determining the distance between the target beacon and the position to be measured according to the filtered RSSI value and the target path loss model; determining the number of the filtered RSSI values, and determining a target positioning algorithm according to the number of the filtered RSSI values and the target positioning area; determining the positioning coordinates of the position to be measured through the target positioning algorithm according to the distance and the filtered RSSI value.

[0006] In an optional manner, the method further includes: in a non-interference environment, obtaining the first sampled RSSI values of multiple first sampled signals at a first preset distance from a sampling position, and determining a preset threshold according to the multiple first sampled RSSI values; in an interference environment, obtaining the second sampled RSSI values of multiple second sampled signals at a second preset distance from the sampling position, and determining a sampling mean value according to the second sampled RSSI values, where the first preset distance and the second preset distance are within a preset radius range; judging whether there are unqualified RSSI values among the multiple second sampled RSSI values according to the multiple second sampled RSSI values, the sampling mean value, and the preset threshold. If there are unqualified RSSI values among the multiple second sampled RSSI values, replacing the unqualified RSSI values with the sampling mean value to obtain qualified RSSI values without the unqualified RSSI values. If there are no unqualified RSSI values among the multiple second sampled RSSI values, determining the second sampled RSSI values as the qualified RSSI values; respectively performing filtering processing on each qualified RSSI value through multiple filtering algorithms to obtain multiple reference RSSI values corresponding to each filtering algorithm; adopting a ridge regression model to respectively assign feature coefficients to each reference RSSI value; introducing a regularization term in the ridge regression model in a manner of L2 regularization; updating each feature coefficient and the regularization term multiple times through a preset algorithm to obtain updated target feature coefficients and a target regularization term, thereby obtaining the preset filtering model.

[0007] In an alternative manner, the signal data further includes the time when the signal emitted by the target beacon reaches the position to be measured; the step of determining the target positioning area where the position to be measured is located from multiple positioning areas according to the signal data further includes: determining the beacon positioning area where each target beacon is located from multiple positioning areas according to the type of area label bound to each target beacon; determining the target positioning area where the position to be measured is located according to at least one of the number of target beacons in each beacon positioning area, the first RSSI value of the signal emitted by each target beacon, and the time when the signal emitted by each target beacon reaches the position to be measured.

[0008] In an alternative manner, each of the multiple path loss models includes a first path loss parameter and a second path loss parameter. Before determining the target path loss model corresponding to the target positioning area from the multiple path loss models according to the target positioning area, the method further includes: collecting the third sampled RSSI value of the collected signal at a third preset distance from the distance collection position in each positioning area, and determining the coordinates of the third beacon corresponding to each third sampled RSSI value and the coordinates of the collection position; determining the value set of the first path loss parameter according to the third sampled RSSI value; determining the value set of the second path loss parameter according to the type of the positioning area; arranging and combining each first path loss parameter in the value set of the first path loss parameter with each second path loss parameter in the value set of the second path loss parameter to obtain multiple parameter combinations composed of the first path loss parameter and the second path loss parameter corresponding to each type of positioning area; determining the estimated distance between the third beacon and the collection position corresponding to each parameter combination in each positioning area according to the parameter combination in each positioning area and a preset formula; determining the actual distance between each third beacon and the collection position according to the coordinates of the third beacon and the coordinates of the collection position; determining the distance residual corresponding to each parameter combination according to the estimated distance and the actual distance; determining one or more target parameter combinations corresponding to each type of positioning area from multiple parameter combinations according to all the distance residuals to obtain the path loss model corresponding to each type of positioning area.

[0009] In an alternative manner, the method further includes: when the target positioning area corresponds to multiple target parameter combinations, respectively determining the distance corresponding to each target parameter combination according to each target parameter combination; the step of determining the positioning coordinates of the position to be measured through the target positioning algorithm according to the distance and the filtered RSSI value further includes: determining the target coordinates of the position to be measured corresponding to each target parameter combination through the target positioning algorithm according to the distance corresponding to each target parameter combination and the filtered RSSI value; and fusing all the target coordinates to obtain the positioning coordinates of the position to be measured.

[0010] In an alternative manner, the step of determining the number of the filtered RSSI values and determining the target positioning algorithm according to the number of the filtered RSSI values and the target positioning area further includes: determining the number of the filtered RSSI values; when the number of the filtered RSSI values > 3, determining the three largest RSSI values among the filtered RSSI values as the target RSSI values, and when 1 < the number of the filtered RSSI values ≤ 3, determining the filtered RSSI values as the target RSSI values; and determining the target positioning algorithm from the preset positioning algorithms according to the number of the target RSSI values and the target positioning area where the position to be measured is located.

[0011] In an alternative manner, after determining the number of the filtered RSSI values, the method further includes: when the number of the filtered RSSI values = 1, determining the coordinates of the target beacon corresponding to the filtered RSSI value; and determining the coordinates of the target beacon corresponding to the filtered RSSI value as the positioning coordinates of the position to be measured.

[0012] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the indoor area positioning method described above.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the indoor area positioning method described above is implemented.

[0014] According to another aspect of the embodiments of the present application, an indoor positioning system is provided, including a plurality of beacons and the aforementioned electronic device, wherein the beacons are used to emit signals, the plurality of beacons are deployed in an indoor area, the indoor area is divided into multiple positioning areas according to the environmental characteristics of the indoor area, the beacons are deployed in each of the positioning areas, each beacon is bound with a region tag corresponding to the positioning area where the beacon is located, and the beacons are deployed in each positioning area with an equilateral triangle with a preset side length as the smallest unit. Wherein, if the beacons at the boundary of each positioning area cannot form the equilateral triangle with the beacons at non-boundary positions, the beacons are deployed at the boundary according to the boundary characteristics of the boundary of each indoor area, and the propagation ranges of the signals emitted by all the beacons cover the indoor area.

[0015] The embodiments of the present application provide an indoor area positioning method, an electronic device, a computer-readable storage medium, and an indoor positioning system. The method filters the obtained first RSSI value through a preset filtering model to remove interference signals caused by signal attenuation and multipath effects, so as to obtain signal data with better quality for subsequent positioning, and initially improves the positioning accuracy. The method also initially determines the target positioning area where the position to be measured is located, so as to flexibly select a target path loss model and a positioning algorithm that are more applicable to the current target positioning area according to the target positioning area, thereby being able to perform positioning according to the RSSI signal propagation characteristics in different environments, and improving the positioning accuracy and applicability of the positioning method in different positioning areas.

[0016] The above description is only an overview of the technical solutions of the embodiments of the present application. In order to be able to understand the technical means of the embodiments of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the embodiments of the present application more obvious and understandable, the following specifically illustrates the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings are only used to illustrate the embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0018] Figure 1 It shows a schematic diagram of the beacon deployment of the indoor positioning system provided by the embodiments of the present application;

[0019] Figure 2 It shows a schematic diagram of the beacon deployment of the indoor positioning system provided by another embodiment of the present application;

[0020] Figure 3 It shows a schematic diagram of the beacon deployment of the indoor positioning system provided by another embodiment of the present application;

[0021] Figure 4 Shows a schematic diagram of beacon deployment of an indoor positioning system provided by another embodiment of the present application;

[0022] Figure 5 Shows a schematic diagram of beacon deployment of an indoor positioning system provided by yet another embodiment of the present application;

[0023] Figure 6 Shows a schematic flowchart of an indoor area positioning method provided by an embodiment of the present application;

[0024] Figure 7 Shows a sub-step flowchart of an indoor area positioning method provided by an embodiment of the present application;

[0025] Figure 8 Shows a schematic flowchart of an indoor area positioning method provided by another embodiment of the present application;

[0026] Figure 9 Shows a schematic flowchart of an indoor area positioning method provided by another embodiment of the present application;

[0027] Figure 10 Shows a sub-step flowchart of an indoor area positioning method provided by an embodiment of the present application;

[0028] Figure 11 Shows a sub-step flowchart of an indoor area positioning method provided by an embodiment of the present application;

[0029] Figure 12 Shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0030] Hereinafter, exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0031] With the development of Internet of Things technology and the wide application of mobile devices, location-based services have been popularized in all aspects of life, and satellite navigation technology in outdoor environments has been very mature. However, in indoor environments, for example, in large underground shopping malls, parking lots, subways and other places, due to the blocking of satellite signals by buildings and the complexity of the indoor environment, the accuracy of satellite signal positioning services is relatively low.

[0032] Currently, indoor positioning technology mainly realizes indoor positioning through Bluetooth Low Energy (BLE). Specifically, several BLE beacons are deployed in the indoor environment and the positions of each BLE beacon are recorded. The Bluetooth device of a person or an object receives the Bluetooth signal of the BLE beacon, and the position of the person or the object is determined based on the received Bluetooth signal and the position of the BLE beacon, thereby realizing the positioning of the person or the object.

[0033] However, indoor areas usually include multiple positioning areas with different environmental characteristics (such as wide halls, narrow corridors, small bathrooms, etc.), and different environmental characteristics have different effects on Bluetooth signals.

[0034] For example, the triangulation positioning technology based on RSSI ranging needs to obtain the RSSI value of the transmitting node (such as a tag, a beacon). The receiving node (such as a base station) calculates the loss of the signal during propagation based on the received RSSI value, and then converts the loss of the signal into a distance according to the signal propagation attenuation model. Then, the positioning coordinates are calculated using the least squares method based on the distances between the tag and multiple base stations. However, in a complex environment, obstacles such as buildings and furniture indoors may cause significant attenuation and multipath effects of the signal, making it difficult to calculate the real distance through the RSSI value, thus affecting the positioning accuracy. Moreover, due to the different environmental characteristics of different positioning areas (for example, the deployment layout of beacons, the number of beacons deployed, and the occlusions are different in different positioning areas), the signal attenuation situation and multipath effects in different positioning areas are also different. If a path attenuation model with fixed path attenuation parameters obtained based on past experience is directly used, it will be difficult to accurately calculate the distance between the beacon and the position to be measured in the positioning area with different environmental characteristics, increasing the subsequent positioning error. That is to say, the same positioning model or positioning algorithm is difficult to be applicable to multiple different positioning areas in the indoor area, thereby affecting the accuracy and applicability of indoor positioning.

[0035] Based on this, in order to be able to perform positioning flexibly and accurately for different positioning areas, the embodiments of the present application provide an indoor area positioning method, an electronic device, a computer-readable storage medium, and an indoor positioning system. This method filters the obtained first RSSI value through a preset filtering model to remove the interference signals caused by signal attenuation and multipath effects, so as to obtain better-quality signal data for subsequent positioning, initially improving the positioning accuracy. This method also initially determines the target positioning area where the position to be measured is located, so as to flexibly select a target path loss model and a positioning algorithm that are more suitable for the current target positioning area according to the target positioning area, thereby being able to perform positioning according to the RSSI signal propagation characteristics under different environments, improving the positioning accuracy and applicability of the positioning method in different positioning areas.

[0036] The indoor area positioning method provided by the embodiments of the present application is applied to electronic devices, such as terminal devices like mobile phones and tablets, and can also be Internet of Things devices such as smart watches, monitoring and detection devices, and positioning cards. It can also be devices in the field of industrial automation, such as robots and transportation devices integrated with Bluetooth signal receivers.

[0037] The indoor positioning system provided by the embodiments of the present application includes the above-mentioned electronic device capable of executing the indoor area positioning method and beacons. The beacons are used to emit signals. A plurality of beacons are deployed in the indoor area. The indoor area is divided into multiple positioning areas according to the environmental characteristics of the indoor area. Beacons are deployed in each positioning area. Each beacon is bound with a regional label corresponding to the positioning area where the beacon is located. The beacons are deployed in each positioning area with an equilateral triangle with a preset side length as the minimum unit. Among them, if the beacons at the boundaries of each positioning area cannot form an equilateral triangle with the beacons at non-boundary positions, the beacons are deployed at the boundaries according to the boundary characteristics of the boundaries of each indoor area. The propagation ranges of the signals emitted by all beacons cover the indoor area.

[0038] In some embodiments, the beacon can be a Bluetooth beacon, a frequency modulation wireless beacon, etc., which is used to identify the location or provide key information by transmitting specific radio signals. Before deploying the beacons, it is necessary to configure the location information (such as the coordinates of the beacon) for each beacon. This information can be stored in a database, a configuration file, or a hash table. These configuration information can include: the regional label bound to the beacon, the Media Access Control Address (MAC address) of the beacon, the coordinates of the beacon in space, and other relevant information (such as beacon type, signal strength, etc.). When the electronic device receives the signal emitted by the beacon, the RSSI value of the signal emitted by the beacon can be determined. At the same time, the electronic device will also receive the MAC address of the beacon that emits the signal, and then match the received MAC address of the beacon with the pre-configured beacon information to obtain the coordinates of the beacon and the regional label bound to the beacon.

[0039] In some embodiments, the indoor area is divided into multiple positioning areas according to the environmental characteristics of the indoor area. Beacons are deployed in each positioning area.

[0040] In some embodiments, first, a number of beacons are deployed in the indoor area to be positioned (such as shopping malls, office buildings, indoor parking lots, etc.) and the accurate position or coordinates of each beacon are recorded to provide accurate information for subsequent distance calculation and position estimation. The indoor area can be divided into multiple positioning areas according to environmental characteristics. Among them, the environmental characteristics include the shape, area size, number of obstacles, positioning accuracy requirements, beacon deployment layout and quantity in the positioning area, and the use of the positioning area, etc.

[0041] The deployment of beacons in an indoor area affects the positioning accuracy of the entire indoor positioning system. In related technologies, beacons are usually deployed in a square grid from the entrance of the indoor area towards the interior. At the same time, for the corridor area, beacons are deployed at fixed intervals along the center line of the corridor. In addition, the number of beacons deployed is increased in complex areas. In this beacon deployment method, the interval between beacons is in the range of 6 - 10m, and the ratio of the deployment cost / benefit of beacons (such as the coverage area of beacon signals and the improvement of positioning accuracy) is high. For example, the deployment method along the central axis of the corridor will cause beacons to be collinear, and when the signals emitted by beacons fluctuate, it will cause positioning deviation or drift.

[0042] Based on this problem, in the indoor positioning system provided by this application, a beacon deployment method is provided. First, beacons are deployed in the indoor area with an equilateral triangle as the smallest unit. On the basis of deploying with an equilateral triangle as the smallest unit, the beacon deployment method further includes regular hexagon deployment and parallelogram deployment.

[0043] As Figure 1 shown, Figure 1 Fig. shows the beacon deployment schematic diagram of the indoor positioning system provided by the embodiment of this application.

[0044] In some embodiments, the positioning area includes a first type of area, which is usually a positioning area with a large area, a large number of people, and an uncertain moving direction of users (such as a hall, a lobby, etc.). Since within the first type of positioning area, the moving direction of users at the next moment is usually uncertain and the movement is relatively irregular, an equilateral triangle can be used as the smallest unit to form a regular hexagon as the reference unit, and beacons are deployed by extending from the reference unit of the regular hexagon in all directions. In this way, for the beacon at the center of the regular hexagon, signals emitted by other beacons can be detected in any direction of this beacon, so that users can receive stable signals from beacons no matter which direction they move.

[0045] In some embodiments, the side length of the equilateral triangle unit is a preset side length R, that is, the distance between every two adjacent beacons is R. This preset side length can be set according to the maximum propagation radius of the signals emitted by beacons, and the range of the preset side length can be 5 - 10m, and this application does not limit this.

[0046] As Figure 2 shown, Figure 2 Fig. shows the beacon deployment schematic diagram of the indoor positioning system provided by another embodiment of this application.

[0047] In Figure 2In a situation where it is not possible to arrange a complete regular hexagon reference unit near the boundary within a positioning area (for example, from the +1 layer to the upper boundary of the positioning area), and when the vertical distance from the beacon closer to the boundary to the boundary of a positioning area is At this time, at the boundary (for example, from the +1 layer to the +2 layer), deploy in equilateral triangles as the minimum unit. That is, deploy a beacon at intervals of a preset side length R at the upper boundary to form an optimal layout.

[0048] Such as Figure 3 shown, Figure 3 Figure shows a schematic diagram of beacon deployment of an indoor positioning system provided by another embodiment of the present application.

[0049] In some embodiments, when it is not possible to arrange a complete regular hexagon reference unit at the boundary within a positioning area (for example Figure 3 from the +1 layer to the upper boundary of the positioning area in (a)), and the vertical distance from the beacon closer to the boundary to the boundary of a positioning area is less than At this time (for example Figure 3 from the +2 layer to the upper boundary in (a)), it is not possible to deploy in equilateral triangles as the minimum unit at the boundary. If a beacon is still deployed at intervals of a preset side length R at the upper boundary at this time, it will cause most of the signal coverage areas of the beacons at the boundary to overlap, increasing the unnecessary hardware investment cost. However, if only at Figure 3 deploy beacons on the +2 layer in (a)), near the upper boundary, such as between the +2 layer and the upper boundary, there will be areas where the signals emitted by the beacons cannot be covered (for example Figure 3 the blind area M in (b)), and at this time, at most only the signals emitted by two beacons can be received at the boundary, and it is not possible to use the three-point positioning method for positioning, affecting the positioning accuracy.

[0050] For the above situation, the beacons originally located on the +2 layer (such as Figure 3 in (a)) can be arranged at intervals of R on the upper boundary (such as Figure 3 in (c)), and make the beacons on the upper boundary and the beacons on the +1 layer form a reference unit of an isosceles triangle with a base of R. According to Figure 3 the deployment method in (c) of, it can be calculated that the distance between a certain beacon on the +1 layer and the beacon on the +2 layer closest to this beacon is R + r > R. That is to say, this beacon deployment method makes there be no area where the signal cannot be covered between the +1 layer and the +2 layer, and this deployment method allows the detection of a fluctuation signal with a signal propagation radius increased by r due to signal fluctuation between the +1 layer and the +2 layer, and it is considered that this fluctuation signal can be used for actual positioning after subsequent filtering processing. At this time, the vertical distance from each beacon on the +1 layer to the upper boundary The value range of r can be set according to the positioning accuracy requirements within the positioning area and the fluctuation range of the maximum propagation radius range of the beacon signal. For example, the value range of r can be 2 - 5m, and the present application does not limit this.

[0051] By adopting the above deployment method, there will be no blind area where the beacon signal cannot be received or the number of received beacon signals is small between the +1 layer and the +2 layer, ensuring that the signal emitted by the beacon can cover the positioning area, and improving the positioning accuracy on the basis of saving the number of beacon deployments.

[0052] As Figure 4 shown, Figure 4 Fig. shows the beacon deployment schematic diagram of the indoor positioning system provided by another embodiment of the present application.

[0053] In some embodiments, the positioning area further includes a second type of area, and the second type of area is usually a long and narrow or cornered area (such as a long corridor, an intersection). Since the moving direction and range of the user at the next moment within the second type of positioning area are restricted by the positioning area and have a certain regularity, beacons can be deployed based on a parallelogram formed by equilateral triangles as the minimum unit.

[0054] As Figure 5 shown, Figure 5 Fig. shows the beacon deployment schematic diagram of the indoor positioning system provided by yet another embodiment of the present application.

[0055] In some embodiments, in the second type of area, such as in a long corridor, a beacon can be deployed at intervals of a preset side length R along the boundary in the long side direction, so that the deployed beacons Xa on both sides of the long corridor (i.e., Figure 5 the upper and lower boundaries in (a) and (b) in the figure) can form a parallelogram layout with an equilateral triangle having a side length of R.

[0056] In some embodiments, when the beacons cannot be deployed in a parallelogram layout at the boundary of the second type of area, priority is given to deploying them with an equilateral triangle as the minimum unit, and then considering whether there are blind areas (the deployment method in (c) in the figure can be referred to to eliminate blind areas). Figure 3 ).

[0057] In some embodiments, when it is impossible to deploy beacons with an equilateral triangle as the minimum unit and there are blind areas, the method in Figure 5 in the figure can also be used to eliminate blind areas. At the short side boundary of the second type of area, for example, at the end of a long corridor, due to distance or environmental restrictions, it is impossible to form the minimum unit of an equilateral triangle at the short side boundary. At this time, the beacon Xb to be deployed is deployed at the intersection of the long side and the short side where the virtual beacon Xc (that is, if it can be successfully deployed, this beacon can form an equilateral triangle with the two nearest deployed beacons Xa) is located.

[0058] It should be understood that the above beacon deployment methods can be used in combination or adjusted adaptively according to the actual environmental characteristics of the indoor area, which will not be elaborated here. Deploying beacons using the above deployment methods can, on the basis of saving the input cost of beacons, enable the signals emitted by the beacons to cover the entire indoor area, ensure that there are no blind spots where positioning is impossible, and improve the positioning accuracy.

[0059] The indoor area is divided into multiple positioning areas according to environmental characteristics. Beacons are deployed in each positioning area, and each beacon is bound with a regional label corresponding to the positioning area where the beacon is located.

[0060] As Figure 6 shown, Figure 6 The flowchart of the indoor area positioning method provided by the embodiment of the present application is shown. The method includes the following steps.

[0061] Step S110: Obtain the signal data of the signals emitted by the target beacons at the position to be measured, where the signal data includes the first RSSI value of the signals emitted by each target beacon and the regional label bound to each target beacon.

[0062] When performing positioning, it is first necessary to obtain the signals from the beacons at the position to be measured. The beacons that can be detected at the position to be measured are target beacons, and the signal data of each target beacon is obtained. The signal data includes the first RSSI value of the signal emitted by the target beacon and the regional label bound to the target beacon.

[0063] In some embodiments, the beacons in each positioning area are bound with one regional label, and different regional labels correspond to different positioning areas respectively. When the signal of a target beacon is detected by an electronic device, and the signal data (such as RSSI value, MAC address, etc.) emitted by the target beacon can be used to determine the positioning area corresponding to the regional label bound to the target beacon, the beacon positioning area where the target beacon is located can be known.

[0064] Step S120: Determine the target positioning area where the position to be measured is located from multiple positioning areas according to the signal data.

[0065] When the first RSSI value of the signal emitted by the target beacon and the beacon positioning area where the target beacon is located are known according to the regional label bound to the target beacon, the target positioning area where the position to be measured is located can be initially determined according to the first RSSI value of the signal emitted by the target beacon and the beacon positioning area where the target beacon is located.

[0066] In a specific embodiment, signals from four target beacons are received at the position to be measured. If the area tags bound to the four target beacons are all first area tags representing the first type of area (such as a hall), it can be directly determined that the position to be measured is also in the first type of area.

[0067] In another specific embodiment, signals from two target beacons are received at the position to be measured. If among the two target beacons, one target beacon is bound with a first area tag and the other target beacon is bound with a second area tag representing the second type of area (such as a corridor), the target positioning area where the position to be measured is located can be determined by comparing the first RSSI value of the signal emitted by the target beacon bound with the first area tag with the first RSSI value of the signal emitted by the target beacon bound with the second area tag. Usually, the first RSSI value of the signal emitted by the target beacon in the same positioning area as the target positioning area where the position to be measured is located is larger. Therefore, the beacon positioning area corresponding to the area tag bound to the target beacon with the larger RSSI value among the first RSSI values can be determined as the target positioning area where the position to be measured is located.

[0068] As Figure 7 shown, Figure 7 It shows a sub-step flowchart of the indoor area positioning method provided by the embodiment of the present application. The signal data also includes the time when the signal emitted by the target beacon arrives at the position to be measured. Step S120 further includes the following steps.

[0069] Step S121: Determine the beacon positioning area where each target beacon is located from multiple positioning areas according to the type of area tag bound to each target beacon.

[0070] Step S122: Determine the target positioning area where the position to be measured is located according to at least one of the number of target beacons in each beacon positioning area, the first RSSI value of the signal emitted by each target beacon, and the time when the signal emitted by each target beacon arrives at the position to be measured.

[0071] Under normal circumstances, when the electronic device is within the target positioning area where the position to be measured is located and the electronic device receives the signals of multiple target beacons, among these target beacons, the number of target beacons that are also within the target positioning area is usually larger, that is, the number of target beacons bound with the corresponding area label of the target positioning area is larger. In addition, since signal propagation takes time, at the same detection moment, the signals emitted by beacons closer to the position to be measured can reach the electronic device earlier (that is, be detected by the electronic device earlier), and the signal data of the beacons received by the electronic device also includes the time when the signal emitted by the target beacon reaches the position to be measured (such as a timestamp). Therefore, the target positioning area where the position to be measured is located can also be determined according to the time when the signal emitted by each target beacon reaches the position to be measured.

[0072] In a specific embodiment, when signals from four target beacons are received at the position to be measured, if among the four target beacons, three target beacons are bound with the first area label representing the first type of area (such as a hall), and only one target beacon is bound with the second area label representing the second type of area (such as a corridor), then it can be directly determined that the position to be measured is also within the first type of area.

[0073] In another specific embodiment, when signals from four target beacons are received at the position to be measured, if among the four target beacons, two target beacons are bound with the first area label representing the first type of area (such as a hall), that is, the beacon positioning areas where these two target beacons are located are the first type of area, and the first RSSI values of the signals emitted by these two target beacons are -40 and -55 respectively. The other two target beacons are bound with the second area label representing the second type of area (such as a corridor), that is, the beacon positioning areas where these two target beacons are located are the second type of area, and the first RSSI values of the signals emitted by these two target beacons are -45 and -40 respectively. Among them, the time when the signals emitted by the target beacons within the first type of area reach the position to be measured is earlier than the time when the signals emitted by the target beacons within the second type of area reach the position to be measured.

[0074] At this time, it is difficult to determine the target positioning area where the position to be measured is located only by the number of target beacons in each beacon positioning area and the first RSSI value of the signal emitted by each target beacon. The area where the position to be measured is located can be determined by comparing the time when the signal emitted by each target beacon reaches the position to be measured. Since the time when the signals emitted by the target beacons within the first type of area reach the position to be measured is earlier than the time when the signals emitted by the target beacons within the second type of area reach the position to be measured, it can be determined that the target positioning area where the position to be measured is located is the first type of area.

[0075] Step S130: Filter the first RSSI value through a preset filtering model to obtain a filtered RSSI value.

[0076] During actual positioning, due to the complex indoor environment, the signals emitted by beacons are affected by the multipath effect, resulting in different RSSIs of the beacon signals received at the same position to be measured at different times, thereby affecting the subsequent positioning accuracy. Therefore, for the RSSI values of the signals received by electronic devices (such as smartphones and positioning cards) from beacons, filtering technology must be used for smoothing processing to eliminate random interference and ensure the stability of the data used for positioning. However, since the signals emitted by beacons themselves will fluctuate, the error data generated due to signal fluctuations will have an adverse effect on the overall filtering effect. Therefore, threshold preprocessing needs to be performed before filtering to strip high-error data to the greatest extent. Then, a hybrid filtering algorithm is used to further improve the effectiveness and stability of RSSI data to reduce noise interference.

[0077] As Figure 8 shown, Figure 8 FIG. shows a schematic flowchart of an indoor area positioning method provided by another embodiment of the present application. The method further includes the following steps.

[0078] Step S210: In a non-interference environment, obtain the first sampled RSSI values of a plurality of first sampled signals at a first preset distance from the sampling position, and determine a preset threshold according to the plurality of first sampled RSSI values.

[0079] Step S220: In an interference environment, obtain the second sampled RSSI values of a plurality of second sampled signals at a second preset distance from the sampling position, and determine a sampling mean according to the second sampled RSSI values, where the first preset distance and the second preset distance are within a preset radius range.

[0080] Step S230: Determine whether there are unqualified RSSI values among the plurality of second sampled RSSI values according to the plurality of second sampled RSSI values, the sampling mean, and the preset threshold. If there are unqualified RSSI values among the plurality of second sampled RSSI values, replace the unqualified RSSI values with the sampling mean to obtain qualified RSSI values without unqualified RSSI values. If there are no unqualified RSSI values among the plurality of second sampled RSSI values, determine the second sampled RSSI values as qualified RSSI values.

[0081] In some embodiments, when the beacons are deployed in advance, it is also necessary to preliminarily scan multiple positions in the indoor area in a non-interference environment through an electronic device to obtain the RSSI values of the signals emitted by the beacons in the indoor area and the distribution of these RSSI values, and determine a preset threshold according to the distribution of the RSSI values. The indoor area can be all or part of the indoor area where positioning is required. For example, if the indoor area where positioning is required is a five-story building, the indoor area can be all of one, two, or all five floors of the five-story building, or it can be a partial area of one of the floors. This application does not limit this. To improve the benchmark of the preset threshold, it is usually necessary to perform positioning tests at multiple positions in the indoor area to obtain a sufficient number of RSSI values, and then obtain the approximate distribution of the RSSI values of the signals in the indoor area, and determine the preset threshold according to this distribution.

[0082] In some embodiments, the preset radius range is determined according to the deployment distance between the beacons. For example, in the indoor area, if the distance interval between every two adjacent beacons ranges from 5 to 8 m, then the preset radius range is also 5 to 8 m. In a non-interference environment, with the sampling position as the center and the first preset distance i as the radius, collect the first sampling RSSI values of the first sampling signals at N points on the circumferential position at different times. For each point, collect the first sampling RSSI values of m first sampling signals, and then N groups, a total of N×m first sampling RSSI values can be obtained.

[0083] In a specific embodiment, the preset radius range is 5 to 8 m. In a non-interference environment, with the sampling position as the center, collect the first sampling RSSI values of the first sampling signals at four points (i.e., N = 4) in the east, west, south, and north directions on the circumference with a radius of 6 (unit: meter). At each point, collect 50 first sampling RSSI values of the first sampling signals from morning to evening, that is, a total of 200 first sampling RSSI values are collected at a distance of 6 meters from the sampling position.

[0084] The above steps can be repeated multiple times. For example, the first preset distance i can take different values, and the sampling positions can be multiple, so as to respectively obtain the distribution of the first sampling RSSI values of the first sampling signals at different sampling positions and at different distances from the sampling position. The purpose is to obtain as many first sampling RSSI values as possible to more accurately understand the distribution of the first sampling RSSI values of the first sampling signals in the indoor area, so as to obtain a more accurate preset threshold. Therefore, this application does not limit the number of first sampling signals.

[0085] In some embodiments, when collecting the first sampling RSSI values of N groups of first sampling signals on the circumference at the i-th meter from the sampling position, the standard deviation σ of the first sampling RSSI of each group of first sampling signalsi Calculate according to Formula 1 below.

[0086]

[0087] Collect the first sampling RSSI values of N groups of first sampling signals on the circumference at the i-th meter from the sampling position. The standard deviation σ of the first sampling RSSI values of N groups of first sampling signals i The average value σ N Calculate according to Formula 2 below.

[0088]

[0089] Wherein, RSSI i,u is the RSSI value of the u-th signal collected at the i-th meter from the sampling position in a non-interference environment, with the unit of dBm. μ i is the average value of the RSSI values of m signals in a group of signals collected at the i-th meter from the sampling position in a non-interference environment. m is the number of samplings, that is, the number of RSSI values of the signals collected at each point at the i-th meter from the sampling position in a non-interference environment.

[0090] When σ N is an integer, take σ N as the preset threshold. When σ N is a decimal, then round up σ N to an integer as the preset threshold.

[0091] In some embodiments, it is also necessary to collect the second sampling RSSI values of the second sampling signals at N points on the circumferential position in real time in an interference environment with the sampling position as the center and the second preset distance i as the radius, where the second preset distance is also within the preset radius range, and the second preset distance can be the same as the first preset distance. The average value μ of the second sampling RSSI values of the second sampling signals collected on the circumference at the i-th meter from the sampling position RSSI i is calculated according to Formula 3 below. k Calculate according to Formula 3 below.

[0092]

[0093] Subsequently, it is necessary to determine whether there are unqualified RSSI values among the second sampling RSSI values of the second sampling signals. Unqualified RSSI values usually represent the RSSI values of interference signals with large errors caused by signal attenuation, multipath effect, signal fluctuation, etc. In some embodiments, determine whether each second sampling RSSI value is an unqualified RSSI value according to Formula 4 below.

[0094] |RSSI i -μ k |>k·σN (Formula 4)

[0095] where k is a threshold coefficient, and in the embodiments of the present application, k is taken as 3. When |RSSI i -μ k |>k·σ N , it is determined that the second sampled RSSI value is an unqualified RSSI value, and the mean value μ i of the second sampled RSSI value RSSI k is used to replace the unqualified RSSI value. When |RSSI i -μ k |≤k·σ N , it is determined that the second sampled RSSI value is a qualified RSSI value, and the qualified RSSI value is retained. All the second sampled RSSI values are traversed and the above steps are executed until all the second sampled RSSI values are qualified RSSI values.

[0096] It should be understood that the descriptions of the above steps S210 - S230 are preprocessing steps for training the threshold weighted hybrid filtering model, that is, steps for preliminarily processing the RSSI values used to train the weighted hybrid filtering algorithm. However, during actual positioning, the first RSSI value of the signal emitted by the target beacon obtained at the position to be measured still needs to be preprocessed with reference to steps S210 - S230. The preprocessing process during actual positioning refers to the above steps S210 - S230, which will not be elaborated here.

[0097] Step S240: Filter each qualified RSSI value through a variety of filtering algorithms respectively to obtain multiple reference RSSI values corresponding to each filtering algorithm.

[0098] Step S250: Use a ridge regression model to assign characteristic coefficients to each reference RSSI value respectively.

[0099] Step S260: Introduce a regularization term in the ridge regression model in the form of L2 regularization.

[0100] Step S270: Update each characteristic coefficient and the regularization term multiple times through a preset algorithm to obtain updated target characteristic coefficients and a target regularization term, thereby obtaining a preset filtering model.

[0101] The qualified RSSI values obtained after threshold preprocessing also need to be filtered. In the related art, usually one of mean filtering, median filtering, Kalman filtering, or Gaussian filtering is used for filtering. However, each filtering method has its limitations. Therefore, the embodiments of the present application provide a weighted hybrid threshold filtering model.

[0102] In some embodiments, in the weighted hybrid filtering model, the qualified RSSI values need to be filtered respectively by mean filtering, median filtering, Kalman filtering or Gaussian filtering to obtain the reference filtered RSSI values corresponding to each filtering algorithm. The weighted hybrid filtering model is a multiple linear regression model based on ridge regression, and the calculation method for filtering according to this ridge regression model is shown in Formula 5.

[0103] Y = β0 + β1X1 + β2X2 + β3X3 + β4X4 + ε (Formula 5)

[0104] Wherein, X1 is the reference filtered RSSI value obtained by mean filtering the qualified RSSI values, X2 is the reference filtered RSSI value obtained by median filtering the qualified RSSI values, X3 is the reference filtered RSSI value obtained by Kalman filtering the qualified RSSI values, and X4 is the reference filtered RSSI value obtained by Gaussian filtering the qualified RSSI values. β0 is the initial feature coefficient, β1 is the feature coefficient corresponding to the mean filtering algorithm, β2 is the feature coefficient corresponding to the median filtering algorithm, β3 is the feature coefficient corresponding to the Kalman filtering algorithm, and β4 is the feature coefficient corresponding to the Gaussian filtering algorithm. ε is the error term in the ridge regression model, and Y is the RSSI measurement value at different fixed distances in reality, which is expressed in matrix form as: Y = βX + E.

[0105] Wherein, Y is the dependent variable, that is, the filtered RSSI value obtained after sending the qualified RSSI values into the weighted hybrid filtering model for filtering. X is the independent variable matrix (including X1, X2, X3, X4), β is the regression coefficient vector (including the feature coefficients β0, β1, β2, β3, β4), and E is the error term.

[0106] L2 regularization (also known as ridge regression or weight decay) is a commonly used regularization technique, mainly used to prevent overfitting of machine learning models and improve the generalization ability of the models. Its core idea is to add a penalty term related to the sum of squares of the weights (i.e., the above-mentioned feature coefficients) to the loss function to limit the complexity of the model. When the number of features is large (high-dimensional data), L2 regularization can help the model find a reasonable solution in limited training data and avoid overfitting caused by excessive weights. Compared with related techniques (such as L1 regularization), L1 regularization can directly set some weights to zero through the absolute value penalty term, thereby achieving feature selection. However, L1 regularization is less effective than L2 regularization in dealing with multicollinearity. L2 regularization does not set the weights to zero, but makes the weights as small as possible. It is more suitable for dealing with multicollinearity problems while maintaining the smoothness of the model.

[0107] In some embodiments, it is necessary to set the objective function as min(||Y - Xβ|| 2+θ||β|| 2 ) By means of grid parameter tuning and five-fold cross-validation, etc., the optimal solution of β in the objective function is solved, so as to obtain the weights assigned to the reference filtered RSSI values obtained by each filtering algorithm.

[0108] In the indoor area positioning method provided by this application, it is necessary to preprocess the collected second sampled RSSI values first, which can screen out the RSSI values that do not meet the threshold conditions, and replace the unqualified RSSI values with the mean value, which is beneficial to removing the error data in the RSSI values and ensuring that the RSSI data used to train the weighted hybrid filtering model is more effective. In addition, in actual positioning, since the signal emitted by the beacon will attenuate during propagation, the larger the RSSI value of the signal, the closer the distance between the beacon emitting the signal and the position to be measured. Moreover, generally, the RSSI signal values measured in a multipath environment interference environment are relatively weak, and using such RSSI values for distance fitting calculation has a large error. Therefore, by means of threshold judgment, the received signals are preliminarily screened first, which can ensure that the RSSI values with stronger signal strength are used for subsequent positioning, thereby improving the positioning accuracy.

[0109] By performing hybrid filtering on the qualified RSSI values and weighting, the advantages of various filtering algorithms can be combined to obtain a better filtering effect. Among them, the L2 regularization method is used to determine the optimal parameters in the weighted hybrid filtering model, which can make full and effective use of the reference RSSI values obtained by various filtering algorithms, avoid excessive deviation of the model, and improve the stability and prediction ability of the model. During actual positioning, filtering the qualified RSSI values that have undergone threshold preprocessing can obtain more effective RSSI values, reduce random noise interference and errors, and improve the accuracy of positioning.

[0110] Step S140: Determine the target path loss model corresponding to the target positioning area from multiple path loss models according to the target positioning area, and determine the distance between the target beacon and the position to be measured according to the filtered RSSI value and the target path loss model.

[0111] As Figure 9 shown, Figure 9 shows a schematic flow chart of an indoor area positioning method provided by another embodiment of this application. Each path loss model in the multiple path loss models includes a first path loss parameter and a second path loss parameter. Before step S140, the method further includes the following steps.

[0112] Step S310: Collect the third sampled RSSI values of the collected signals at a third preset distance from the collection position in each positioning area, and determine the coordinates of the third beacon corresponding to each third sampled RSSI value and the coordinates of the collection position.

[0113] Step S320: Determine the value set of the first path loss parameter according to the third sampled RSSI value.

[0114] Step S330: Determine the value set of the second path loss parameter according to the type of the positioning area.

[0115] Step S340: Perform permutation and combination on each first path loss parameter in the value set of the first path loss parameter and each second path loss parameter in the value set of the second path loss parameter, so as to obtain multiple parameter combinations composed of the first path loss parameter and the second path loss parameter corresponding to each type of positioning area.

[0116] Step S350: According to the parameter combination within each type of positioning area and a preset formula, determine the estimated distance between the third beacon and the acquisition position corresponding to each parameter combination within each type of positioning area.

[0117] Step S360: Determine the actual distance between each third beacon and the acquisition position according to the coordinates of the third beacon and the coordinates of the acquisition position.

[0118] Step S370: Determine the distance residual corresponding to each parameter combination according to the estimated distance and the actual distance.

[0119] Step S380: Determine one or more target parameter combinations corresponding to each type of positioning area from multiple parameter combinations according to all the distance residuals, so as to obtain the path loss model corresponding to each type of positioning area.

[0120] In some embodiments, after the beacons are deployed, signal acquisition needs to be performed in each positioning area to construct a path attenuation model that can characterize the relationship between the signal in the positioning area and the propagation path of the signal. In the art, the third preset distance is usually 1 m, that is, at the acquisition position in each positioning area, with the acquisition position as the center and 1 m as the radius, the third sampled RSSI values of the signals at multiple points on the circumference are collected, and the beacons corresponding to the third sampled RSSI values of the signals at multiple points on the circumference are determined as the third beacons, and then the coordinates of each third beacon and the coordinates of the acquisition position are obtained. There can be multiple acquisition positions in each positioning area. Signal data with a sufficient duration is collected at each acquisition position. This duration is related to the transmission frequency of the beacon and the receiving frequency of the electronic device, etc., and can be adjusted according to the actual situation during actual signal acquisition and positioning. The purpose of collecting signal data with a sufficient duration is only to obtain enough sample data to understand the signal propagation characteristics in the positioning area. Therefore, this application does not limit this duration. For example, if the electronic device receives the signals of 3 third beacons every 3 s, then if 300 third RSSI values need to be collected, the duration for collecting signals at the acquisition position needs to be 5 min.

[0121] In the related art, the traditional path loss model will adopt the following formula 6 to represent the relationship between the RSSI value of a signal and the distance d between the beacon that emits the signal and the electronic device according to the third sampled RSSI value collected in the positioning area and the actual distance between the third beacon and the collection location.

[0122] PL(d) = PLd0 + 10·n·log10 d (Formula 6)

[0123] In the traditional path loss model, the path loss PLd0 of the signal at a distance d0 from the electronic device and the path loss exponent n are used as fixed parameters. These two fixed parameters are usually determined according to experimental data, empirical formulas, simple free space or obstacle models, and need to be manually analyzed once in different indoor environments and application scenarios in advance. However, the path loss model applicable in one positioning area may not be applicable in other positioning areas. The path loss model with fixed parameters is difficult to adapt to the complex changes of the indoor environment, thus affecting the accuracy and precision of ranging.

[0124] Therefore, the embodiments of the present application provide an adaptive path loss model. In the adaptive path loss model, PLd0 and n are used as adjustable dynamic parameters so that the path parameter model can be adjusted according to the changes in the positioning area. The adaptive path loss model represents the relationship between the RSSI value of a signal and the distance d between the beacon that emits the signal and the electronic device according to the following formula 7.

[0125]

[0126] Wherein, PLd 0t is the first path loss parameter, which represents the set of selected values of the third sampled RSSI value of the signal collected in the t-th positioning area. In some embodiments, a total of 200 third sampled RSSI values are collected in the first type of area, and the range of the third sampled RSSI value is [-55, -40]. The endpoint values, mean, median, mode, etc. in the set of the third sampled RSSI values can be taken as the data in the PLd 0t set. For example, the set of PLd 0t is [-45, -50, -55, -60]. The number of RSSI values in this set is not limited. This set is used to characterize the typical values and value ranges of the RSSI values of the signal in this positioning area.

[0127] n is the second path loss parameter, which is used to describe the attenuation characteristics of signals in different environments. The value range of the path loss exponent n is usually between 2 and 6. The path loss exponent n is mainly determined by the propagation environment. The more obstacles there are and the more complex the environment is, the larger the value of n and the greater the path loss. According to the experience of related technologies, in free space, usually n = 2. In the line-of-sight transmission range within a building, the value range of n is 1.6 - 1.8. In the case of obstacles blocking within a building, the value range of n is 4 - 6. It can be seen that in different types of positioning areas, n often has a corresponding value range for that positioning area. In this application, the possible values of n obtained according to experience in related technologies are directly adopted here, and multiple typical values are selected from the possible values of n within that positioning area, and the opposites of these typical values are used to form a set. In some embodiments, after determining that the position to be measured is in the first type of area, it can be known that the value range of n corresponding to the first type of area is [-4.5, -2.5], and the set that the value of n may form is [-2.5, -3.0, -3.5, -4, -4.5].

[0128] According to the above embodiments, in the first type of area, PLd 0t The set is [-45, -50, -55, -60], the value set of n is [-2.5, -3.0, -3.5, -4, -4.5], and PLd 0t and n are respectively selected from their respective sets, and PLd 0t and n are arranged and combined, and 20 different parameter combinations can be obtained, that is, there are a total of 20 parameter combinations that may be used for signal path loss calculation in the first type of area.

[0129] In some embodiments, the above steps are performed for each positioning area, and the parameter combinations that may be used for signal path loss calculation within each positioning area can be obtained. In this application, the number of data in the set of PLd 0t and the value set of n within each positioning area is not limited, and it is used to obtain enough first loss parameters and second loss parameters to obtain the parameter combinations that may be available within that positioning area.

[0130] In some embodiments, it is also necessary to further determine one or more parameter combinations that are most suitable for that positioning area among these parameter combinations. Therefore, it is necessary to determine the estimated distance d i between each third beacon and the acquisition position respectively according to each parameter combination in a positioning area and the third sampled RSSI value within that positioning area. Since the coordinates of the acquisition position and the coordinates of the third beacon are both known, the actual distance d between each third beacon and the acquisition position can be directly calculated.

[0131] In some embodiments, according to the estimated distance di Roughly locate the acquisition position by triangulation or the least squares method, and estimate the estimated coordinates (x, y) of the acquisition position through the following formula 8.

[0132]

[0133] Calculate the estimated distance d corresponding to each parameter combination i The error between the actual distance d is used as the distance residual r i where r i is calculated as shown in formula 9.

[0134]

[0135] In some embodiments, after determining the residuals corresponding to each parameter combination, the parameter combinations with larger residuals are removed, and the target parameter combination that best fits the current positioning area can be screened out. Among them, one or more parameter combinations corresponding to the residuals less than a specific threshold can be selected, and the specific threshold often needs to be obtained based on on-site tests and can also be adjusted according to the actual positioning accuracy requirements. Therefore, this application does not further explain this.

[0136] In summary, each positioning area has one or more (for example, three) target parameter combinations that are best suited to the positioning area. When actually performing positioning, after determining the target positioning area where the position to be measured is located, the target parameter combination in the path loss model corresponding to the target positioning area can be determined, and the path loss model with the target parameter combination is determined as the target loss model of the target positioning area.

[0137] By designing a target path loss model that is most suitable for each positioning area, positioning can be performed according to the signal propagation characteristics in different positioning areas, improving the positioning accuracy and applicability of the positioning method in different positioning areas.

[0138] Step S150: Determine the number of filtered RSSI values, and determine the target positioning algorithm according to the number of filtered RSSI values and the target positioning area.

[0139] As Figure 10 shown, Figure 10 shows a sub-step flowchart of the indoor area positioning method provided by the embodiment of the present application. Step S150 further includes the following steps.

[0140] Step S151: Determine the number of filtered RSSI values.

[0141] Step S152: When the number of filtered RSSI values > 3, determine the three largest RSSI values among the filtered RSSI values as the target RSSI values; when 1 < the number of filtered RSSI values ≤ 3, determine the filtered RSSI values as the target RSSI values.

[0142] Step S153: Determine the target positioning algorithm from the preset positioning algorithms according to the number of target RSSI values and the target positioning area where the position to be measured is located.

[0143] After step S151, the method further includes the following steps.

[0144] Step S154: When the number of filtered RSSI values = 1, determine the coordinates of the target beacon corresponding to the filtered RSSI value.

[0145] Step S155: Determine the coordinates of the target beacon corresponding to the filtered RSSI value as the positioning coordinates of the position to be measured.

[0146] In some embodiments, there may be multiple numbers of filtered RSSI values obtained through filtering processing. When the number of filtered RSSI values > 3, determine the three largest RSSI values among the filtered RSSI values as the target RSSI values; when 1 < the number of filtered RSSI values ≤ 3, determine the filtered RSSI values as the target RSSI values.

[0147] When the number of filtered RSSI values is 3, it is also necessary to further determine the target positioning algorithm according to the target positioning area where the position to be measured is located. For example, if the position to be measured is in the first type of area and the number of target RSSI values is 3 at this time, use the triangulation method in the three-point positioning algorithm for positioning. If the position to be measured is in the second type of area and the number of target RSSI values is 3 at this time, then use the quasi-Newton method for positioning.

[0148] When the number of filtered RSSI values is 2, use the weighted two-point positioning algorithm for positioning.

[0149] When the number of filtered RSSI values is 1, directly output the coordinates of the target beacon corresponding to the filtered RSSI value as the coordinates of the position to be measured.

[0150] Due to certain hardware limitations, for example, the positioning cards currently available on the market can scan the signals emitted by at most 3 beacons each time. When the number of RSSI values obtained exceeds 3, it will affect the accuracy of subsequent positioning algorithms and increase unnecessary data calculation amounts. Therefore, by further screening the filtered RSSI values to ensure that the number of target RSSI values finally used for positioning does not exceed 3, it can be ensured that the signals used for subsequent positioning are the signals emitted by non-multipath and the closest beacons to the position to be measured, making the positioning more accurate and applicable to most electronic devices, thereby enhancing the applicability of this method. When the number of filtered RSSI values is one, the coordinates of the target beacon are directly output as the positioning coordinates of the position to be measured, saving the data calculation amount and processing amount, and the operation is simple and easy to implement. In addition, by designing the positioning algorithm most suitable for each positioning area, positioning can be performed according to the signal propagation characteristics in different positioning areas, improving the positioning accuracy and applicability of the positioning method in different positioning areas.

[0151] Step S160: Determine the positioning coordinates of the position to be measured through the target positioning algorithm based on the distance and the filtered RSSI value.

[0152] In some embodiments, if the number of filtered RSSI values is 3, the quasi-Newton method can be used for positioning. In the quasi-Newton method, based on the coordinates of the target beacons corresponding to the three known filtered RSSI values as (x i , y i )(i = 1, 2, 3) and based on the estimated distances d i between the position to be measured and each target beacon calculated through the adaptive path loss model, the coordinates (x, y) of the position to be measured are estimated using Equation 8 above.

[0153] Subsequently, calculate the error between the estimated distance d i corresponding to the parameter combination in each target loss model and the actual distance d as the distance residual r i . The calculation process of the residual r i refers to Equation 9 above and will not be elaborated here.

[0154] To ensure the positioning accuracy when calculating the positioning coordinates, it is also necessary to minimize the sum of the squares of the residuals r i . Therefore, the following objective function is established:

[0155]

[0156] Calculate the gradient of the objective function according to Equation 10 and Equation 11 below.

[0157]

[0158] The gradient of the objective function is represented in vector form as:

[0159]

[0160] Repeat the above process iteratively, and update the coordinates (x, y) of the position to be measured in each iteration in the manner of the following formula 12.

[0161]

[0162] Use the Hessian matrix to represent the second-order partial derivatives of the above objective function. The Hessian matrix is a square matrix composed of the second-order partial derivatives of a multivariate function, which is used to describe the local curvature of the objective function. By analyzing the eigenvalues of the Hessian matrix, the extreme value properties of the objective function at a certain point can be judged. If the Hessian matrix is positive definite (all eigenvalues are positive) at a certain point, then this point is a local minimum point. If the Hessian matrix is negative definite (all eigenvalues are negative) at a certain point, then this point is a local maximum point. If the eigenvalues of the Hessian matrix are positive and negative, then this point is a saddle point.

[0163] In some embodiments, in each iteration, update the Hessian matrix of the objective function according to the following formula 13.

[0164]

[0165] For the above formula 12 and formula 13, (x k , y k ) are the coordinates of the position to be measured obtained after the current iteration, and (x k+1 , y k+1 ) are the coordinates of the position to be measured obtained after the next iteration. H k is the approximate Hessian matrix of the current iteration, represents the current step vector, represents the gradient change vector.

[0166] Adopt the quasi-Newton method. By continuously performing iterative optimization, it can effectively solve the positioning coordinates of the position to be measured, improving the accuracy and stability of positioning. In each step of iteration, the current information is used to optimize the Hessian matrix, thereby accelerating the convergence process and enhancing the efficiency and accuracy of positioning.

[0167] In some embodiments, if the number of filtered RSSI values is 2, the two-point weighted method can be used for positioning. The coordinates of the target beacon corresponding to the two known filtered RSSI values are (x i , y i ) (i = 1, 2), and the coordinates of the position to be measured are (x, y).

[0168] Subsequently, weights need to be assigned to the two filtered RSSI values. Generally, the larger the RSSI value, the greater the weight assigned to this RSSI value. If the two filtered RSSI values are RSSI1 and RSSI2 respectively, the coordinates of the target beacons corresponding to RSSI1 and RSSI2 are (x1, y1) and (x2, y2) respectively, and the weights assigned to RSSI1 and RSSI2 are w1 and w2 respectively. Then, the weight w1 is calculated according to the following formula 14, and the weight w2 is calculated according to the following formula 15.

[0169]

[0170] Among them, PLd 0(i区域) is the first loss parameter corresponding to the target positioning area.

[0171] After determining the weights w1 and w2 corresponding to the two filtered RSSI values RSSI1 and RSSI2 respectively, the positioning coordinates (x, y) of the position to be measured are calculated according to the following formula 16 and formula 17.

[0172]

[0173] By using the weighted two-point positioning algorithm to assign weights to each filtered RSSI value, it is possible to calculate the positioning coordinates of the position to be measured more accurately even when only the signals of two beacons are received. The calculation is simple and the data processing volume is small. In addition, the weight corresponding to each filtered RSSI value is related to the target positioning area where the position to be measured is located, so that this two-point weighted positioning method can be applied to various different positioning areas to obtain the most accurate weight in this positioning area, improving the positioning accuracy.

[0174] Such as Figure 11 shown Figure 11 shows a sub-step flowchart of the indoor area positioning method provided by the embodiment of the present application. The method further includes: when the target positioning area corresponds to multiple target parameter combinations, the distances corresponding to each target parameter combination are determined respectively according to each target parameter combination. Step S160 further includes the following steps.

[0175] Step S161: Determine the target coordinates of the position to be measured corresponding to each target parameter combination through the target positioning algorithm according to the distance corresponding to each target parameter combination and the filtered RSSI value.

[0176] Step S162: Fuse all the target coordinates to obtain the positioning coordinates of the position to be measured.

[0177] In some embodiments, there may be multiple target path loss models that can be used for positioning in certain positioning regions, that is, there are multiple parameter combinations that can be used for positioning within the positioning region. At this time, multiple target coordinates of the position to be measured corresponding to each parameter combination can be calculated respectively according to the aforementioned positioning algorithm. Then, the multiple target coordinates are fused, and the fusion methods include weighted average method or least squares method, which are not limited in this application. Thus, the positioning coordinates of the final position to be measured are obtained.

[0178] By fusing multiple target coordinates, each parameter combination within the target positioning region is fully utilized, further improving the accuracy and applicability of positioning.

[0179] Figure 12 The structural schematic diagram of the electronic device provided by the embodiment of the present application is shown. The specific implementation of the electronic device is not limited in the specific embodiment of the present application.

[0180] As Figure 12 shown, the electronic device 400 may include: a processor 401 and a memory 402.

[0181] Among them, the memory 402 is used to store the computer program 403. The memory 402 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The computer program 403 may include computer executable instructions.

[0182] The processor 401 is used to execute the computer program 403 to implement the indoor area positioning method embodiment described above.

[0183] The processor 401 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiment of the present application. One or more processors included in the electronic device may be of the same type of processor, such as one or more CPUs; or different types of processors, such as one or more CPUs and one or more ASICs.

[0184] In several embodiments provided by the present application, if any function is implemented in the form of a software functional module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the technical solution of the present application can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be an electronic device such as a personal computer or a server) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store computer program codes.

[0185] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings provided herein. Based on the above description, the structure required to construct such systems will be apparent. In addition, the embodiments of the present application are not directed to any particular programming language. It should be understood that the content of the present application described herein can be implemented using various programming languages, and the description of a particular language above is for the purpose of disclosing the best mode of the present application.

[0186] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a claim listing several devices, several units or modules of these devices can be embodied by the same hardware item. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

[0187] The above embodiments only represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An indoor area positioning method, characterized in that, The indoor area is divided into multiple positioning areas according to environmental characteristics, and beacons are deployed in each positioning area. Each beacon is bound with an area label corresponding to the positioning area where the beacon is located. The method includes: Obtaining signal data of signals emitted by target beacons at a position to be measured, where the signal data includes the first RSSI value of the signals emitted by each target beacon and the area label bound to each target beacon. Determining the target positioning area where the position to be measured is located from multiple positioning areas according to the signal data. Filtering the first RSSI value through a preset filtering model to obtain a filtered RSSI value. Determining a target path loss model corresponding to the target positioning area from multiple path loss models according to the target positioning area, and determining the distance between the target beacon and the position to be measured according to the filtered RSSI value and the target path loss model. Determining the number of the filtered RSSI values, and determining a target positioning algorithm according to the number of the filtered RSSI values and the target positioning area. Determining the positioning coordinates of the position to be measured through the target positioning algorithm according to the distance and the filtered RSSI value.

2. The method according to claim 1, wherein The method further includes: In a non-interference environment, obtaining the first sampled RSSI value of multiple first sampled signals at a first preset distance from a sampled position, and determining a preset threshold according to the multiple first sampled RSSI values. In an interference environment, obtaining the second sampled RSSI value of multiple second sampled signals at a second preset distance from the sampled position, and determining a sampled mean value according to the second sampled RSSI value, where the first preset distance and the second preset distance are within a preset radius range. Judging whether there is an unqualified RSSI value among the multiple second sampled RSSI values according to the multiple second sampled RSSI values, the sampled mean value, and the preset threshold. If there is an unqualified RSSI value among the multiple second sampled RSSI values, replacing the unqualified RSSI value with the sampled mean value to obtain a qualified RSSI value without the unqualified RSSI value. If there is no unqualified RSSI value among the multiple second sampled RSSI values, determining the second sampled RSSI value as the qualified RSSI value. Performing filtering processing on each qualified RSSI value through multiple filtering algorithms respectively to obtain multiple reference RSSI values corresponding to each filtering algorithm. Adopting a ridge regression model to assign characteristic coefficients to each reference RSSI value respectively. Introducing a regularization term in the ridge regression model in a way of L2 regularization. Updating each characteristic coefficient and the regularization term multiple times through a preset algorithm to obtain an updated target characteristic coefficient and a target regularization term, so as to obtain the preset filtering model.

3. The method according to any one of claims 1 to 2, characterized in that, The signal data further includes the time when the signal emitted by the target beacon reaches the position to be measured. Determining the target positioning area where the position to be measured is located from multiple positioning areas according to the signal data further includes: Determining the beacon positioning area where each target beacon is located from multiple positioning areas according to the types of area tags bound to each target beacon; Determining the target positioning area where the position to be measured is located according to at least one of the number of target beacons in each beacon positioning area, the first RSSI value of the signal emitted by each target beacon, and the time when the signal emitted by each target beacon reaches the position to be measured.

4. The method according to claim 1, wherein Each of the multiple path loss models includes a first path loss parameter and a second path loss parameter. Before determining the target path loss model corresponding to the target positioning area from the multiple path loss models according to the target positioning area, the method further includes: Collecting the third sampled RSSI value of the collected signal at a third preset distance from the distance collection position in each positioning area, and determining the coordinates of the third beacon corresponding to each third sampled RSSI value and the coordinates of the collection position; Determining the value set of the first path loss parameter according to the third sampled RSSI value; Determining the value set of the second path loss parameter according to the types of the positioning areas; Performing permutation and combination on each first path loss parameter in the value set of the first path loss parameter and each second path loss parameter in the value set of the second path loss parameter to obtain multiple parameter combinations composed of the first path loss parameter and the second path loss parameter corresponding to each positioning area; Determining the estimated distance between the third beacon and the collection position corresponding to each parameter combination in each positioning area according to the parameter combination in each positioning area and a preset formula; Determining the actual distance between each third beacon and the collection position according to the coordinates of the third beacon and the coordinates of the collection position; Determining the distance residual corresponding to each parameter combination according to the estimated distance and the actual distance; Determining one or more target parameter combinations corresponding to each positioning area from the multiple parameter combinations according to all the distance residuals to obtain the path loss model corresponding to each positioning area.

5. The method according to claim 4, wherein The method further includes: When the target positioning area corresponds to multiple target parameter combinations, determining the distance corresponding to each target parameter combination according to each target parameter combination respectively; The determining the positioning coordinates of the position to be measured through the target positioning algorithm according to the distance and the filtered RSSI value further includes: Determining the target coordinates of the position to be measured corresponding to each target parameter combination through the target positioning algorithm according to the distance corresponding to each target parameter combination and the filtered RSSI value; Fusing all the target coordinates to obtain the positioning coordinates of the position to be measured.

6. The method according to claim 1, wherein Determining the number of the filtered RSSI values, and determining a target positioning algorithm according to the number of the filtered RSSI values and the target positioning area, further includes: Determining the number of the filtered RSSI values; When the number of the filtered RSSI values > 3, determining the three largest RSSI values among the filtered RSSI values as the target RSSI values; when 1 < the number of the filtered RSSI values ≤ 3, determining the filtered RSSI values as the target RSSI values; Determining the target positioning algorithm from the preset positioning algorithms according to the number of the target RSSI values and the target positioning area where the position to be measured is located.

7. The method according to claim 6, characterized in that, After determining the number of the filtered RSSI values, the method further includes: When the number of the filtered RSSI values = 1, determining the coordinates of the target beacon corresponding to the filtered RSSI value; Determining the coordinates of the target beacon corresponding to the filtered RSSI value as the positioning coordinates of the position to be measured.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the indoor area positioning method according to any one of claims 1 to 7.

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

10. An indoor positioning system, characterized in that, The indoor positioning system includes: A plurality of beacons for emitting signals, the plurality of beacons being deployed in the indoor area, the indoor area being divided into multiple positioning areas according to the environmental characteristics of the indoor area, the beacons being deployed in each of the positioning areas, each beacon being bound with a regional label corresponding to the positioning area where the beacon is located, the beacons being deployed in each positioning area with an equilateral triangle with a preset side length as the minimum unit, wherein, if the beacon at the boundary of each positioning area cannot form the equilateral triangle with the beacon at the non-boundary, the beacon is deployed at the boundary according to the boundary characteristics of the boundary of each indoor area, and the propagation ranges of the signals emitted by all the beacons cover the indoor area; The electronic device according to claim 8.