Indoor positioning method, device, equipment and medium

By setting stakes indoors and training the Kalman filter model, wireless access point information is used to correct the initial position of the device under test, which solves the problem of low indoor positioning accuracy, achieves high-precision, low-cost indoor positioning, and fills the gap of GNSS and blind spots in image recognition technology.

CN118828408APending Publication Date: 2024-10-22CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311686779.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing indoor positioning technologies, such as GNSS and image recognition technology, cannot effectively meet the demand for indoor high-precision positioning. GNSS signals are attenuated in buildings. Image recognition technology is affected by ambient lighting and has high computing resources, and cannot fully cover every corner of the room. .

Method used

By setting preset stake points in the target area, the Kalman filter model is trained, and the Kalman filter model is used to correct the initial position of the device under test using the initial position information and the signal strength and position information of the wireless access point to improve positioning accuracy. .

Benefits of technology

It improves the accuracy and anti-interference ability of indoor positioning, reduces system costs, avoids the deployment of additional infrastructure, achieves seamless and continuous indoor and outdoor positioning, and fills the indoor positioning blind spots of GNSS and image recognition technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118828408A_ABST
    Figure CN118828408A_ABST
Patent Text Reader

Abstract

The invention discloses an indoor positioning method and device, equipment and a medium. The method comprises the following steps: calculating initial position information of equipment to be detected in a target area; according to the initial position information, determining a preset pile point closest to the initial position information as a target pile point; wherein the pile points are arranged at a plurality of key positions in the target area, and the pile points are used for simulating to-be-tested equipment; acquiring a preset Kalman filtering model corresponding to the target pile point; and correcting the initial position information according to the Kalman filtering model to obtain final position information of the to-be-tested equipment. By adopting the method and the device, the initial position information of the to-be-detected equipment can be corrected, the positioning precision of the to-be-detected equipment is improved, and the indoor high-precision positioning requirement is effectively met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an indoor positioning method, device, equipment and medium. Background Art

[0002] At present, some indoor places, such as shopping malls and parking lots, have positioning and navigation needs.

[0003] However, current indoor positioning technologies all have certain drawbacks: GNSS (GPS / Beidou) technology is the most commonly used positioning technology, but because satellite signals cannot effectively penetrate buildings, indoor GNSS signals are severely attenuated and affected by multipath effects, and cannot be used for precise indoor positioning. Although the proposed indoor enhancement system can improve the indoor applicability of GNSS to a certain extent, the system cost is high and the coverage range is limited. In addition, image recognition positioning technology is greatly affected by ambient lighting and line of sight, and its accuracy is difficult to guarantee. In addition, image recognition technology has high requirements for computing resources, poor real-time performance, and high system costs. It is difficult to fully cover every corner of the room, so it cannot meet the needs of high-precision indoor positioning. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide an indoor positioning method, device, equipment and medium, which can correct the initial position information of the device to be tested, improve the positioning accuracy of the device to be tested, and effectively meet the high-precision positioning requirements indoors.

[0005] To achieve the above object, an embodiment of the present invention provides an indoor positioning method, including:

[0006] Calculate the initial position information of the device under test in the target area;

[0007] According to the initial position information, determine the preset stake point closest to the initial position information as the target stake point; wherein the stake points are set at several key positions in the target area, and the stake points are used to simulate the device to be tested;

[0008] Obtaining a preset Kalman filter model corresponding to the target point;

[0009] The initial position information is corrected according to the Kalman filter model to obtain the final position information of the device under test.

[0010] As an improvement of the above solution, the coordinate correction parameters of the Kalman filter model include Kalman filter gain, offset correction factor, measurement matrix and measurement vector;

[0011] Then, the initial position information is modified according to the Kalman filter model to obtain the final position information of the device under test, including:

[0012] According to the coordinate correction parameters of the Kalman filter model, the horizontal coordinate value and the vertical coordinate value in the initial position information are corrected respectively:

[0013]

[0014]

[0015] Wherein, x′ is the corrected horizontal coordinate value, y′ is the corrected vertical coordinate value, x is the horizontal coordinate value in the initial position information, y is the vertical coordinate value in the initial position information, K is the Kalman filter gain, H is the measurement matrix, z is the measurement vector, is the offset correction factor in the horizontal axis direction, is the offset correction factor in the ordinate direction;

[0016] The final position information of the device under test is obtained according to the corrected horizontal coordinate value and vertical coordinate value.

[0017] As an improvement of the above solution, the step of calculating the initial position information of the device under test in the target area includes:

[0018] Determine a number of wireless access points with the strongest RSSI signals scanned by the device under test;

[0019] Respectively obtaining the distances between the plurality of wireless access points and the device to be tested, and the location information of the plurality of wireless access points;

[0020] The initial position information of the device under test is calculated according to the distance and the position information of the plurality of wireless access points using a preset positioning algorithm.

[0021] As an improvement of the above solution, the wireless access point is a WIFI access point.

[0022] As an improvement of the above solution, the preset positioning algorithm is a triangulation positioning algorithm.

[0023] As an improvement to the above solution, the following steps are used to train the Kalman filter models corresponding to all the pile points:

[0024] Acquire the real coordinates of the stake point and the real coordinates of n wireless access points around the stake point; wherein n≥1;

[0025] According to the real coordinates of the n wireless access points, a preset positioning algorithm is used to calculate the predicted coordinates of the stake point;

[0026] Calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points;

[0027] The Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0028] As an improvement of the above solution, the method of calculating the predicted coordinates of the stake point using a preset positioning algorithm according to the real coordinates of the n wireless access points includes:

[0029] Repeating the step of calculating the predicted coordinates of the stake point m times according to the real coordinates of the n wireless access points using a preset positioning algorithm to obtain the predicted coordinates of the stake point under m tests;

[0030] The calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points includes:

[0031] Repeat the step of calculating the distance between the stake point and the n wireless access points based on the real coordinates of the stake point and the real coordinates of the n wireless access points m times to obtain n distances in m tests; wherein m≥1;

[0032] Then, the Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain the trained Kalman filter model, including:

[0033] Calculate the measurement matrix according to the real coordinates of the n wireless access points and the real coordinates of the stake points;

[0034] According to the n distances in each test, a distance average is calculated, a distance variance is calculated according to the distance average, and a distance noise covariance matrix is ​​formed according to the distance variances of the m tests;

[0035] According to the predicted coordinates of the pile point under m tests, respectively calculate the average value of the horizontal coordinate and the average value of the vertical coordinate, and calculate the horizontal coordinate variance according to the average value of the horizontal coordinate, and calculate the vertical coordinate variance according to the average value of the vertical coordinate;

[0036] Calculating a position noise covariance matrix according to the abscissa variance and the ordinate variance, and calculating a Kalman filter state error covariance matrix according to the position noise covariance matrix and a preset initial state error covariance matrix;

[0037] The Kalman filter gain is calculated according to the measurement matrix, the range noise covariance matrix and the Kalman filter state error covariance matrix;

[0038] The offset correction factor in the abscissa direction is calculated based on the abscissa value in the real coordinates of the pile point and the average value of the abscissa; and the offset correction factor in the ordinate direction is calculated based on the ordinate value in the real coordinates of the pile point and the average value of the ordinate;

[0039] Determining the measurement vector according to the real coordinates of the n wireless access points;

[0040] The Kalman filter gain, the offset correction factor in the horizontal coordinate direction, the offset correction factor in the vertical coordinate direction, the measurement matrix and the measurement vector are used as coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0041] The embodiment of the present invention further provides an indoor positioning device, comprising:

[0042] An initial position information calculation module is used to calculate the initial position information of the device under test in the target area;

[0043] A target stake point determination module is used to determine, according to the initial position information, a preset stake point closest to the initial position information as a target stake point; wherein the stake points are set at several key positions in the target area, and the stake points are used to simulate the device to be tested;

[0044] A Kalman filter model acquisition module is used to acquire a preset Kalman filter model corresponding to the target pile point;

[0045] The final position information correction module is used to correct the initial position information according to the Kalman filter model to obtain the final position information of the device under test.

[0046] An embodiment of the present invention further provides an indoor positioning device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the indoor positioning methods described above when executing the computer program.

[0047] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the indoor positioning methods described above.

[0048] Compared with the prior art, the indoor positioning method, device, equipment and medium disclosed in the present invention, by deploying multiple stakes with known coordinate data to train the Kalman filter model offline, and using the known stake coordinate data to correct the offset error of the calculated initial position information of the device to be tested, effectively improves the positioning accuracy of the device to be tested, improves the anti-interference ability and robustness of the positioning system, and can adapt to complex indoor environments. In addition, the embodiment of the present invention uses the existing positioning technology to obtain the initial position of the device to be tested, without the need to deploy additional positioning infrastructure, the system cost is low, and the high cost problem caused by the large number of nodes in the prior art is avoided. The embodiment of the present invention adopts software algorithms to achieve positioning correction, without the need for dedicated hardware equipment, the technical threshold is low, and it is easy to promote and apply. Compared with the complex systems and dedicated equipment of the prior art, it is more convenient for widespread deployment and popularization. In addition, the embodiment of the present invention can achieve seamless and continuous positioning indoors and outdoors, fill the positioning blind spots of GNSS and image recognition technology in indoors, and provide more comprehensive and continuous positioning services compared with the limited coverage of the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flow chart of an indoor positioning method provided by an embodiment of the present invention;

[0050] Figure 2 is a schematic diagram of the positional relationship between the pile point and the device to be tested in an embodiment of the present invention;

[0051] Figure 3 is a flow chart of a preferred indoor positioning method in an embodiment of the present invention;

[0052] Figure 4 is a structural schematic diagram of an indoor positioning device provided by an embodiment of the present invention;

[0053] Figure 5 It is a structural schematic diagram of an indoor positioning device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0056] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0057] See also Figure 1 , is a flow chart of an indoor positioning method provided by an embodiment of the present invention. The embodiment of the present invention provides an indoor positioning method, which is specifically performed by the following steps S11 to S14:

[0058] S11, calculating the initial position information of the device under test in the target area;

[0059] S12, according to the initial position information, determining a preset stake point closest to the initial position information as a target stake point; wherein the stake points are arranged at several key positions in the target area, and the stake points are used to simulate the device to be tested;

[0060] S13, obtaining a preset Kalman filter model corresponding to the target point;

[0061] S14. Correct the initial position information according to the Kalman filter model to obtain final position information of the device under test.

[0062] It should be noted that the embodiment of the present invention is applicable to positioning and navigation of indoor scenes. In the early stage of accuracy, several key positions are determined in a specific indoor scene, that is, in the target area, and stakes are preset at each key position. The stakes are used to simulate the device to be tested within a certain distance range. The corresponding Kalman filter model is trained and stored for each stake.

[0063] The device under test may be a user's mobile terminal, such as a mobile phone, a platform, a computer, etc., or a user's driving device, such as a vehicle, etc., or other communication devices with positioning requirements, which are not specifically limited here.

[0064] During the application stage, when the device under test enters the target area, the initial position information of the device under test in the target area is first calculated. The initial position information may be an inaccurate position calculation result. The calculation method of the initial position information can adopt the relevant positioning method in the prior art, which is not specifically limited here.

[0065] Further, see Figure 2 , is a schematic diagram of the positional relationship between the stake point and the device under test in an embodiment of the present invention. According to the initial position information of the device under test, the stake point closest to the device under test in the target area is determined as the target stake point. Then, the pre-trained Kalman filter model corresponding to the target stake point is searched, the initial position information of the device under test is input into the Kalman filter model, and the initial position information is corrected to obtain the final position information of the device under test.

[0066] By adopting the technical means of the embodiment of the present invention, the Kalman filter model is trained offline by deploying multiple stakes with known coordinate data, and the offset error of the calculated initial position information of the device to be tested is corrected by using the known stake coordinate data, which effectively improves the positioning accuracy of the device to be tested, improves the anti-interference ability and robustness of the positioning system, and can adapt to complex indoor environments. In addition, the embodiment of the present invention uses the existing positioning technology to obtain the initial position of the device to be tested, without the need to deploy additional positioning infrastructure, and the system cost is low, avoiding the high cost problem caused by the large number of nodes in the prior art. The embodiment of the present invention adopts software algorithms to achieve positioning correction, without the need for dedicated hardware equipment, with a low technical threshold, easy to promote and apply, and more convenient for widespread deployment and popularization than the complex systems and dedicated equipment of the prior art. In addition, the embodiment of the present invention can achieve seamless and continuous positioning indoors and outdoors, fill the blind spots of GNSS and image recognition technology in indoor positioning, and provide more comprehensive and continuous positioning services compared to the limited coverage of the prior art.

[0067] As a preferred implementation, the embodiment of the present invention is further implemented on the basis of the above embodiment, and the calculation of the initial position information of the device under test is further optimized. Then step S11, that is, the calculation of the initial position information of the device under test in the target area, includes steps S111 to S113:

[0068] S111, determining a number of wireless access points with the strongest RSSI signals scanned by the device under test;

[0069] S112, respectively obtaining the distances between the plurality of wireless access points and the device under test, and the location information of the plurality of wireless access points;

[0070] S113: Calculate the initial position information of the device under test using a preset positioning algorithm according to the distance and the position information of the plurality of wireless access points.

[0071] Preferably, the wireless access point is a WIFI access point.

[0072] In an embodiment of the present invention, the location information of the WLAN wireless network base station and the indoor auxiliary access point (such as WIFI AP) is used, combined with the signal characteristics (RSSI signal) of the above network devices reported by the terminal, and positioning is performed through a preset positioning algorithm to calculate the initial location information of the device under test.

[0073] Preferably, the preset positioning algorithm is a triangulation positioning algorithm; or a two-point circle positioning algorithm; or a position fingerprint positioning algorithm.

[0074] See also Figure 3 , is a flow chart of a preferred indoor positioning method in an embodiment of the present invention. Taking three WIFI access points as an example, a triangulation positioning algorithm is used for positioning calculation. Specifically, three WIFI access points with the strongest RSSI signals are selected, and their position coordinates are (x1, y1), (x2, y2), and (x3, y3). The distances between the device under test and the three WIFI access points are d1, d2, and d3, respectively. According to the distance formula, the following set of equations can be obtained:

[0075] d1 2 =(x1-x) 2 +(y1-y) 2 ;

[0076] d2 2 =(x2-x) 2 +(y2-y) 2 ;

[0077] d3 2 =(x3-x) 2 +(y3-y) 2 ;

[0078] Expanding the expression yields:

[0079] d1 2 =x1 2 -2x1x+x 2 +y1 2 -2y1y+y 2 ;

[0080] d2 2 =x2 2 -2x2x+x 2 +y2 2 -2y2y+y 2;

[0081] d3 2 =x3 2 -2x3x+x 2 +y3 2 -2y3y+y 2 ;

[0082] Combining the above equations and eliminating x 2 and 2 , we can get:

[0083]

[0084]

[0085] Thus, the initial position information (x, y) of the device under test is obtained.

[0086] By adopting the technical means of the embodiments of the present invention, existing WIFI hotspots and mobile base stations are used as positioning reference nodes, and there is no need to deploy additional positioning infrastructure. The system cost is low, and the high cost problem caused by a large number of nodes in the prior art is avoided.

[0087] It can be understood that the above scenarios are only preferred implementation methods. In actual applications, other wireless positioning methods can be used as needed, such as Bluetooth beacon receiving technology, ZigBee and UWB and other wireless network technologies. The two-point circle positioning algorithm or the position fingerprint positioning algorithm can also be used to calculate the initial position information of the device under test. No specific limitations or elaboration are made here.

[0088] As a preferred implementation, the embodiment of the present invention is further implemented on the basis of any of the above embodiments to optimize the training and correction process of the Kalman filter model. Figure 3 , the following steps S21 to S24 are used to train the Kalman filter models corresponding to all the pile points:

[0089] S21, obtaining the real coordinates of the stake point and the real coordinates of n wireless access points around the stake point; wherein n≥1;

[0090] S22, calculating the predicted coordinates of the stake point using a preset positioning algorithm according to the real coordinates of the n wireless access points;

[0091] S23, calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points;

[0092] S24, training a Kalman filter model according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0093] In the embodiment of the present invention, a plurality of stakes are preset at key positions in the target area, and a corresponding Kalman filter model is trained for each stake. The real coordinates of each stake, the real coordinates of n wireless access points around each stake, and the predicted coordinates of each stake are calculated using the same positioning algorithm as in the application phase. The Kalman filter model corresponding to the stake is trained using these parameters, and each coordinate correction parameter in the Kalman filter model is calculated to correct the initial position information of the device under test in the application phase.

[0094] Preferably, the coordinate correction parameters of the Kalman filter model include the Kalman filter gain K, the offset correction factor in the horizontal coordinate direction Correction factor for the offset in the ordinate direction The measurement matrix H and the measurement vector z.

[0095] Preferably, step S22, i.e., calculating the predicted coordinates of the stake point using a preset positioning algorithm according to the real coordinates of the n wireless access points, includes:

[0096] Repeating the step of calculating the predicted coordinates of the stake point m times according to the real coordinates of the n wireless access points using a preset positioning algorithm to obtain the predicted coordinates of the stake point under m tests;

[0097] Step S23, namely, calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points, comprises:

[0098] Repeat the step of calculating the distance between the stake point and the n wireless access points based on the real coordinates of the stake point and the real coordinates of the n wireless access points m times to obtain n distances in m tests; wherein m≥1;

[0099] Then step S24, i.e., training the Kalman filter model according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain the trained Kalman filter model, includes:

[0100] S241, calculating the measurement matrix H according to the real coordinates of the n wireless access points and the real coordinates of the stake points;

[0101] S242, calculating a distance average according to the n distances in each test, calculating a distance variance according to the distance average, and forming a distance noise covariance matrix R according to the distance variances of the m tests;

[0102] S242, according to the predicted coordinates of the pile point under m tests, respectively calculating the average value of the abscissa and the average value of the ordinate, and calculating the abscissa variance according to the average value of the abscissa, and calculating the ordinate variance according to the average value of the ordinate;

[0103] S243, calculating a position noise covariance matrix Q according to the abscissa variance and the ordinate variance, and calculating a Kalman filter state error covariance matrix P according to the position noise covariance matrix Q and a preset initial state error covariance matrix P0;

[0104] S244, calculating the Kalman filter gain K according to the measurement matrix H, the range noise covariance matrix R and the Kalman filter state error covariance matrix P;

[0105] S245, calculating an offset correction factor in the abscissa direction according to the abscissa value in the real coordinates of the stake point and the abscissa average value; and calculating an offset correction factor in the ordinate direction according to the ordinate value in the real coordinates of the stake point and the ordinate average value;

[0106] S246. Determine a calculation formula for the measurement vector z according to the real coordinates of the n wireless access points;

[0107] S247, the Kalman filter gain K, the offset correction factor in the horizontal coordinate direction The offset correction factor in the ordinate direction The measurement matrix H and the measurement vector z are used as coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0108] Specifically, the real coordinates of the currently trained stake point are recorded as (x0, y0), and the real coordinates of the n wireless access points near the currently trained stake point (x0, y0) are obtained, recorded as (x1, y1), (x2, y2), ..., (x n ,y n ).

[0109] The calculation formulas for the various coordinate correction parameters in the Kalman filter model are as follows:

[0110] (1) The calculation formula of the measurement matrix H is:

[0111]

[0112] Among them, (x0, y0) is the real coordinate of the current training point, (x1, y1), (x2, y2), ..., (x n ,y n ) are the real coordinates of n wireless access points.

[0113] (2) The calculation formula of the Kalman filter gain K is:

[0114] K = P*H′*(H*P*H′+R)-1;

[0115] Where H is the measurement matrix, H′ is the transposed matrix of the measurement matrix H, P is the Kalman filter state error covariance matrix, and R is the range noise covariance matrix;

[0116] The calculation formula of the distance noise covariance matrix R is:

[0117] R=diag([σd1 2 ,σd2 2 ,...,σd m 2 ]);

[0118] The diag function represents a diagonal matrix, that is, a square matrix in which all elements except the main diagonal are zero. 2 ,σd2 2 ,...,σd m 2 are the distance variances calculated under m tests respectively.

[0119] Specifically, m tests are performed, and in each test, the distance between the stake point (x0, y0) and the surrounding n wireless access points is calculated, thereby calculating the average distance of the n distances and obtaining the distance variance.

[0120] Taking the first test as an example, the distance sequence between the stake point (x0, y0) and the surrounding n wireless access points is calculated as d 1,1 ,d 1,2 ,…,d 1,n , calculate the average distance as:

[0121]

[0122] The distance variance is calculated as:

[0123]

[0124] Understandably, σd22 ,...,σd m 2 The calculation formula of is the same and will not be repeated here.

[0125] The calculation formula of the Kalman filter state error covariance matrix P is:

[0126] P = Φ*P0*Φ′+Q;

[0127] Where Φ is the state transfer matrix, Q is the position noise covariance matrix, Q = [σ1 2 0; 0 σ2 2 ],σ1 2 and σ2 2 are the abscissa variance and the ordinate variance respectively, and P0 is the preset initial state error covariance matrix.

[0128] Specifically, an initial state error covariance matrix P0 is pre-set, and the value of the initial state error covariance matrix can be set larger. The Kalman filter can gradually iterate out a correct value during the iteration process. For example, P0=eye(4)*10000 is set. A state transfer matrix Φ is set, and the value is Φ=[1 0; 0 1].

[0129] The position noise covariance matrix Q is calculated as follows:

[0130] Perform m tests. In each test, obtain the distances between the wireless access points and the device to be tested and the real coordinates of the wireless access points according to the wireless access points (the number of which is less than or equal to n, for example, 3) with the strongest RSSI signals scanned by the stake point (x0, y0). Calculate the predicted coordinates of the stake point (x0, y0) using a preset positioning algorithm (for example, a triangulation positioning algorithm, which is the same as the positioning algorithm used to calculate the initial position information of the device to be tested during the application process) according to the distances and the real coordinates of the wireless access points. Then the m predicted coordinates under m tests are recorded as (x1, y1), (x2, y2), ..., (x m ,y m ), extract the x-coordinate sequence {x1,x2,...,x m} and the y-coordinate sequence {y1,y2,...,y m}.

[0131] Calculate the mean value of the abscissa:

[0132]

[0133] Calculate the abscissa variance:

[0134]

[0135] Calculate the ordinate mean:

[0136]

[0137] Calculate the ordinate variance:

[0138]

[0139] Thus, the position noise covariance matrix Q = [σ1 2 0;0σ2 2 ].

[0140] (3) The calculation formula of the offset correction factor is:

[0141] The offset correction factor in the horizontal axis direction:

[0142] The offset correction factor in the ordinate direction:

[0143] in, and are the abscissa average value and the ordinate average value respectively.

[0144] (4) The calculation formula of the measurement vector is: z = [D1, D1, ..., D n ];

[0145] Among them, D1,D1,...,D n is the distance between the device under test and the n wireless access points.

[0146] It should be noted that the measurement vector z represents the distance between the n wireless access points around the stake point (x0, y0) and the device under test that uses the stake point (x0, y0) as the target stake point during the application process. Therefore, only the calculation formula of the measurement vector z can be determined in the training stage. In the subsequent actual application process, the distance D is determined according to the device under test. n , and get the specific value of the measurement vector z.

[0147] Then step S14, i.e., modifying the initial position information according to the Kalman filter model to obtain the final position information of the device under test, includes steps S141 and S142:

[0148] S141, according to the coordinate correction parameters of the Kalman filter model, respectively correct the horizontal coordinate value and the vertical coordinate value in the initial position information:

[0149]

[0150]

[0151] Wherein, x′ is the corrected horizontal coordinate value, y′ is the corrected vertical coordinate value, x is the horizontal coordinate value in the initial position information, y is the vertical coordinate value in the initial position information, K is the Kalman filter gain, H is the measurement matrix, z is the measurement vector, is the correction factor for the offset in the horizontal direction, is the offset correction factor in the ordinate direction;

[0152] S142. Obtain final position information (x′, y′) of the device under test according to the corrected horizontal coordinate value and vertical coordinate value.

[0153] By adopting the technical means of the embodiment of the present invention, the Kalman filter model is trained offline by deploying multiple stakes with known coordinate data, and the offset error of the calculated initial position information of the device to be tested is corrected by using the known stake coordinate data, which effectively improves the positioning accuracy of the device to be tested, improves the anti-interference ability and robustness of the positioning system, and can adapt to complex indoor environments. In addition, the embodiment of the present invention uses existing WIFI hotspots and mobile base stations as positioning reference nodes, without the need to deploy additional positioning infrastructure, and the system cost is low, avoiding the high cost problem caused by the large number of nodes in the prior art. The embodiment of the present invention is based on existing WIFI and cellular network signals, and is implemented by software algorithms. No dedicated hardware equipment is required, the technical threshold is low, and it is easy to promote and apply. Compared with the complex systems and dedicated equipment of the prior art, it is more convenient for widespread deployment and popularization. In addition, the embodiment of the present invention can realize seamless and continuous positioning indoors and outdoors, fill the positioning blind spots of GNSS and image recognition technology in indoors, and provide more comprehensive and continuous positioning services compared with the limited coverage of the prior art.

[0154] In summary, the embodiment of the present invention is based on WIFI and base station positioning technology, adopts software algorithms and existing network resources to achieve precise positioning, and has the advantages of low cost, easy promotion, high precision, seamless coverage and strong robustness, which greatly improves the performance and scalability of indoor positioning technology. Compared with the existing indoor positioning technology, the embodiment of the present invention is more practical and applicable to various commercial and life fields, and has high industrial application value.

[0155] See also Figure 4 , is a schematic diagram of the structure of an indoor positioning device provided by an embodiment of the present invention. The embodiment of the present invention provides an indoor positioning device 30, including:

[0156] An initial position information calculation module 31 is used to calculate the initial position information of the device under test in the target area;

[0157] A target stake point determination module 32 is used to determine, according to the initial position information, a preset stake point closest to the initial position information as a target stake point; wherein the stake points are set at several key positions in the target area, and the stake points are used to simulate the device to be tested;

[0158] A Kalman filter model acquisition module 33 is used to acquire a preset Kalman filter model corresponding to the target pile point;

[0159] The final position information correction module 34 is used to correct the initial position information according to the Kalman filter model to obtain the final position information of the device under test.

[0160] As a preferred implementation, the coordinate correction parameters of the Kalman filter model include a Kalman filter gain, an offset correction factor, a measurement matrix and a measurement vector.

[0161] The final position information correction module 34 is specifically used for:

[0162] According to the coordinate correction parameters of the Kalman filter model, the horizontal coordinate value and the vertical coordinate value in the initial position information are corrected respectively:

[0163]

[0164]

[0165] Wherein, x′ is the corrected horizontal coordinate value, y is the corrected vertical coordinate value, x is the horizontal coordinate value in the initial position information, y′ is the vertical coordinate value in the initial position information, K is the Kalman filter gain, H is the measurement matrix, z is the measurement vector, is the correction factor for the offset in the horizontal direction, is the offset correction factor in the ordinate direction;

[0166] The final position information of the device under test is obtained according to the corrected horizontal coordinate value and vertical coordinate value.

[0167] As a preferred implementation, the initial position information calculation module 31 is specifically used for:

[0168] Determine a number of wireless access points with the strongest RSSI signals scanned by the device under test;

[0169] Respectively obtaining the distances between the plurality of wireless access points and the device to be tested, and the location information of the plurality of wireless access points;

[0170] The initial position information of the device under test is calculated according to the distance and the position information of the plurality of wireless access points using a preset positioning algorithm.

[0171] Preferably, the wireless access point is a WIFI access point.

[0172] Preferably, the preset positioning algorithm is a triangulation positioning algorithm.

[0173] As a preferred implementation, the following steps are used to train the Kalman filter models corresponding to all the pile points:

[0174] Acquire the real coordinates of the stake point and the real coordinates of n wireless access points around the stake point; wherein n≥1;

[0175] According to the real coordinates of the n wireless access points, a preset positioning algorithm is used to calculate the predicted coordinates of the stake point;

[0176] Calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points;

[0177] The Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0178] Preferably, the step of calculating the predicted coordinates of the stake point using a preset positioning algorithm according to the real coordinates of the n wireless access points includes:

[0179] Repeating the step of calculating the predicted coordinates of the stake point m times according to the real coordinates of the n wireless access points using a preset positioning algorithm to obtain the predicted coordinates of the stake point under m tests;

[0180] The calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points includes:

[0181] Repeat the step of calculating the distance between the stake point and the n wireless access points based on the real coordinates of the stake point and the real coordinates of the n wireless access points m times to obtain n distances in m tests; wherein m≥1;

[0182] Then, the Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain the trained Kalman filter model, including:

[0183] Calculate the measurement matrix according to the real coordinates of the n wireless access points and the real coordinates of the stake points;

[0184] According to the n distances in each test, a distance average is calculated, a distance variance is calculated according to the distance average, and a distance noise covariance matrix R is formed according to the distance variances of the m tests;

[0185] According to the predicted coordinates of the pile point under m tests, respectively calculate the average value of the horizontal coordinate and the average value of the vertical coordinate, and calculate the horizontal coordinate variance according to the average value of the horizontal coordinate, and calculate the vertical coordinate variance according to the average value of the vertical coordinate;

[0186] Calculating a position noise covariance matrix according to the abscissa variance and the ordinate variance, and calculating a Kalman filter state error covariance matrix according to the position noise covariance matrix and a preset initial state error covariance matrix;

[0187] The Kalman filter gain is calculated according to the measurement matrix, the range noise covariance matrix and the Kalman filter state error covariance matrix;

[0188] The offset correction factor in the abscissa direction is calculated based on the abscissa value in the real coordinates of the pile point and the average value of the abscissa; and the offset correction factor in the ordinate direction is calculated based on the ordinate value in the real coordinates of the pile point and the average value of the ordinate;

[0189] Determine the measurement vector z according to the real coordinates of the n wireless access points;

[0190] The Kalman filter gain, the offset correction factor in the horizontal coordinate direction, the offset correction factor in the vertical coordinate direction, the measurement matrix and the measurement vector are used as coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

[0191] The calculation formulas for the various coordinate correction parameters in the Kalman filter model are as follows:

[0192] The calculation formula of the measurement matrix H is:

[0193]

[0194] Among them, (x0, y0) is the real coordinate of the current training point, (x1, y1), (x2, y2), ..., (x n ,y n ) are the real coordinates of n wireless access points.

[0195] The calculation formula of the Kalman filter gain K is:

[0196] K = P*H′*(H*P*H′+R)-1;

[0197] Where H is the measurement matrix, H′ is the transposed matrix of the measurement matrix H, P is the Kalman filter state error covariance matrix, and R is the range noise covariance matrix;

[0198] The calculation formula of the distance noise covariance matrix R is:

[0199] R=diag([σd1 2 ,σd2 2 ,...,σd m 2 ])

[0200] The diag function represents a diagonal matrix, that is, a square matrix in which all elements except the main diagonal are zero. 2 ,σd2 2 ,...,σd m 2 are the distance variances calculated under m tests respectively.

[0201] The calculation formula of the Kalman filter state error covariance matrix P is:

[0202] P = Φ*P0*Φ′+Q;

[0203] Among them, Φ is the state transfer matrix, Φ′ is the transposed matrix of matrix Φ; Q is the position noise covariance matrix, Q=[σ1 2 0; 0 σ2 2 ],σ1 2 and σ2 2 are the abscissa variance and the ordinate variance respectively, and P0 is the preset initial state error covariance matrix.

[0204] The calculation formula of the offset correction factor is:

[0205] The offset correction factor in the horizontal axis direction:

[0206] The offset correction factor in the ordinate direction:

[0207] in, and are the abscissa average value and the ordinate average value respectively.

[0208] The calculation formula of the measurement vector is: z = [D1, D1, ..., D n ];

[0209] Among them, D1,D1,...,Dn is the distance between the device under test and the n wireless access points.

[0210] By adopting the technical means of the embodiment of the present invention, the Kalman filter model is trained offline by deploying multiple stakes with known coordinate data, and the offset error of the calculated initial position information of the device to be tested is corrected by using the known stake coordinate data, which effectively improves the positioning accuracy of the device to be tested, improves the anti-interference ability and robustness of the positioning system, and can adapt to complex indoor environments. In addition, the embodiment of the present invention uses the existing positioning technology to obtain the initial position of the device to be tested, without the need to deploy additional positioning infrastructure, and the system cost is low, avoiding the high cost problem caused by the large number of nodes in the prior art. The embodiment of the present invention adopts software algorithms to achieve positioning correction, without the need for dedicated hardware equipment, with a low technical threshold, easy to promote and apply, and more convenient for widespread deployment and popularization than the complex systems and dedicated equipment of the prior art. In addition, the embodiment of the present invention can achieve seamless and continuous positioning indoors and outdoors, fill the blind spots of GNSS and image recognition technology in indoor positioning, and provide more comprehensive and continuous positioning services compared to the limited coverage of the prior art.

[0211] See also Figure 5 , is a structural diagram of an indoor positioning device provided in an embodiment of the present invention. The embodiment of the present invention also provides an indoor positioning device 40, including a processor 41, a memory 42, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the indoor positioning method as described in any one of the above embodiments.

[0212] It should be noted that an indoor positioning device provided in an embodiment of the present invention is used to execute all process steps of an indoor positioning method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be described in detail.

[0213] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the indoor positioning method as described in any one of the above embodiments.

[0214] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0215] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. An indoor positioning method, characterized in that: include: Calculate the initial position information of the device under test in the target area; According to the initial position information, determine a preset stake point closest to the initial position information as a target stake point; wherein the stake points are set at several key positions in the target area, and the stake points are used to simulate the device to be tested; Obtaining a preset Kalman filter model corresponding to the target point; The initial position information is corrected according to the Kalman filter model to obtain the final position information of the device under test.

2. The indoor positioning method according to claim 1, characterized in that: The coordinate correction parameters of the Kalman filter model include Kalman filter gain, offset correction factor, measurement matrix and measurement vector; Then, the initial position information is modified according to the Kalman filter model to obtain the final position information of the device under test, including: According to the coordinate correction parameters of the Kalman filter model, the horizontal coordinate value and the vertical coordinate value in the initial position information are corrected respectively: Among them, x ′ is the corrected horizontal coordinate value, y ′ is the corrected ordinate value, x is the abscissa value in the initial position information, y is the ordinate value in the initial position information, K is the Kalman filter gain, H is the measurement matrix, z is the measurement vector, is the offset correction factor in the horizontal axis direction, is the offset correction factor in the ordinate direction; The final position information of the device under test is obtained according to the corrected horizontal coordinate value and vertical coordinate value.

3. The indoor positioning method according to claim 1, characterized in that: The calculating the initial position information of the device under test in the target area includes: Determine a number of wireless access points with the strongest RSSI signals scanned by the device under test; Respectively obtaining the distances between the plurality of wireless access points and the device to be tested, and the location information of the plurality of wireless access points; The initial position information of the device under test is calculated according to the distance and the position information of the plurality of wireless access points using a preset positioning algorithm.

4. The indoor positioning method according to claim 3, characterized in that: The wireless access point is a WIFI access point.

5. The indoor positioning method according to claim 3, characterized in that: The preset positioning algorithm is a triangulation positioning algorithm.

6. The indoor positioning method according to claim 2, characterized in that: The following steps are used to train the Kalman filter models corresponding to all the pile points: Acquire the real coordinates of the stake point and the real coordinates of n wireless access points around the stake point; wherein n≥1; According to the real coordinates of the n wireless access points, a preset positioning algorithm is used to calculate the predicted coordinates of the stake point; Calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points; The Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

7. The indoor positioning method according to claim 6, characterized in that: The step of calculating the predicted coordinates of the stake point using a preset positioning algorithm according to the real coordinates of the n wireless access points includes: Repeating the step of calculating the predicted coordinates of the stake point m times according to the real coordinates of the n wireless access points using a preset positioning algorithm to obtain the predicted coordinates of the stake point under m tests; The calculating the distance between the stake point and the n wireless access points according to the real coordinates of the stake point and the real coordinates of the n wireless access points includes: Repeat the step of calculating the distance between the stake point and the n wireless access points based on the real coordinates of the stake point and the real coordinates of the n wireless access points m times to obtain n distances in m tests; wherein m≥1; Then, the Kalman filter model is trained according to the real coordinates of the stake point, the predicted coordinates of the stake point, the real coordinates of the n wireless access points and the distance to calculate the coordinate correction parameters in the Kalman filter model to obtain the trained Kalman filter model, including: Calculate the measurement matrix according to the real coordinates of the n wireless access points and the real coordinates of the stake points; According to the n distances in each test, a distance average is calculated, a distance variance is calculated according to the distance average, and a distance noise covariance matrix is ​​formed according to the distance variances of the m tests; According to the predicted coordinates of the pile point under m tests, respectively calculate the average value of the horizontal coordinate and the average value of the vertical coordinate, and calculate the horizontal coordinate variance according to the average value of the horizontal coordinate, and calculate the vertical coordinate variance according to the average value of the vertical coordinate; Calculating a position noise covariance matrix according to the abscissa variance and the ordinate variance, and calculating a Kalman filter state error covariance matrix according to the position noise covariance matrix and a preset initial state error covariance matrix; The Kalman filter gain is calculated according to the measurement matrix, the range noise covariance matrix and the Kalman filter state error covariance matrix; The offset correction factor in the abscissa direction is calculated based on the abscissa value in the real coordinates of the pile point and the average value of the abscissa; and the offset correction factor in the ordinate direction is calculated based on the ordinate value in the real coordinates of the pile point and the average value of the ordinate; Determining the measurement vector according to the real coordinates of the n wireless access points; The Kalman filter gain, the offset correction factor in the horizontal coordinate direction, the offset correction factor in the vertical coordinate direction, the measurement matrix and the measurement vector are used as coordinate correction parameters in the Kalman filter model to obtain a trained Kalman filter model.

8. An indoor positioning device, characterized in that: include: An initial position information calculation module is used to calculate the initial position information of the device under test in the target area; A target stake point determination module is used to determine, according to the initial position information, a preset stake point closest to the initial position information as a target stake point; wherein the stake points are set at several key positions in the target area, and the stake points are used to simulate the device to be tested; A Kalman filter model acquisition module is used to acquire a preset Kalman filter model corresponding to the target pile point; The final position information correction module is used to correct the initial position information according to the Kalman filter model to obtain the final position information of the device under test.

9. An indoor positioning device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the indoor positioning method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the indoor positioning method according to any one of claims 1 to 7.