Indoor scene transition recognition system and method for pedestrian step minimum matching group

By using the identification system with the minimum number of pedestrian steps in an indoor environment, combined with multi-source sensor data and cosine similarity algorithm, the problem of low positioning accuracy at straight-line passage paths based on the road sign method is solved, and high-precision indoor seamless navigation is achieved.

CN118555537BActive Publication Date: 2025-03-07SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410652611.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2025-03-07
Estimated Expiration
2044-05-24

AI Technical Summary

Technical Problem

In indoor environments, especially in the straight paths between corridors, rooms, and halls, road signs-based methods are difficult to make effective corrections, resulting in the accumulated error of inertia seriously affecting the accuracy of user positioning navigation.

Method used

An indoor scene conversion recognition system with the smallest pedestrian step matching group is adopted to obtain multi-source sensor data through a smartphone, combine pedestrian motion and spatial information characteristics, use Wi-Fi data screening and sliding window similarity calculation, and match and recognition of multi-sensor sequence data based on the cosine similarity algorithm.

Benefits of technology

Accurate and reliable positioning in complex indoor scenarios, improve the completeness of seamless navigation, and significantly improve positioning accuracy, especially perform well at straight-line passage paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555537B_ABST
    Figure CN118555537B_ABST
Patent Text Reader

Abstract

The present invention proposes a system and method for indoor scene transition recognition based on the minimum matching group of pedestrian steps. The present invention constructs an indoor pedestrian walking scene, collects pedestrian information in real time through a smart phone mobile terminal, and constructs the minimum unit for matching and positioning pedestrian walking trajectories; uses the pedestrian information collected in real time to perform sliding window matching based on the minimum matching group of pedestrian steps, and uses the cosine similarity algorithm to complete the preliminary positioning of the indoor position of pedestrians; integrates the pedestrian information collected in real time, and uses the cosine similarity algorithm to complete the precise matching and positioning of the indoor position of pedestrians, thereby realizing indoor scene transition recognition based on the minimum matching group of pedestrian steps. The present invention realizes accurate and reliable indoor pedestrian positioning and improves the completeness of seamless navigation and positioning of indoor pedestrians. The positioning performance of the proposed method was evaluated by conducting experiments in four different areas in two typical office buildings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of indoor positioning technology, and in particular relates to an indoor scene conversion recognition system and method for a minimum matching group of pedestrian steps. Background Art

[0002] High-precision, low-cost, and universal indoor positioning technology is what people demand. In recent years, indoor positioning and navigation systems based on crowdsourcing, indoor maps, and user behavior assistance have emerged rapidly. The accumulated errors of inertial navigation can be constrained and corrected by landmark-based methods, significantly improving the positioning and navigation experience of users in narrow indoor scenes such as corridors. However, in the actual indoor environment conversion, in addition to corners, there are also a large number of straight paths between corridors, rooms, and halls, which are difficult to constrain and correct using landmark-based methods. The accumulated errors of inertial navigation cannot be effectively corrected, which seriously affects the accuracy of user positioning and navigation. Therefore, the completeness of seamless positioning and navigation in complex indoor scenes based on landmark correction methods is greatly challenged and cannot meet people's actual needs for high precision, low cost, and universality.

[0003] Therefore, this paper proposes an indoor scene transition recognition method with the minimum matching group of pedestrian steps. It uses multi-source sensor data obtained by smartphones, combines the characteristics of pedestrian motion and spatial information, narrows the area through Wi-Fi data screening and sliding window similarity calculation, and then performs matching recognition of multi-sensor sequence data based on the cosine similarity algorithm to perform indoor scene transition recognition, achieve accurate and reliable indoor pedestrian positioning, and improve the completeness of seamless navigation positioning of indoor pedestrians. The positioning performance of the proposed method was evaluated through experiments in four different areas in two typical office buildings. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes an indoor scene transition recognition system and method for a pedestrian step minimum matching group. The present invention is applicable to an indoor positioning algorithm based on sliding window matching combined with cosine similarity.

[0005] The technical solution adopted by the system of the present invention is an indoor scene transition recognition system for a minimum matching group of pedestrian steps, comprising:

[0006] Smartphone mobile terminal;

[0007] Pedestrian information is collected in real time through a smartphone to construct the minimum unit for matching and positioning pedestrian walking trajectories; sliding window matching is performed based on the minimum matching group of pedestrian steps, and the cosine similarity algorithm is used to complete the preliminary positioning of the pedestrian's indoor position; the real-time collected pedestrian information is integrated, and the cosine similarity algorithm is used to complete the precise matching and positioning of the pedestrian's indoor position, thereby realizing indoor scene conversion recognition based on the minimum matching group of pedestrian steps.

[0008] The technical solution adopted by the method of the present invention is a method for identifying indoor scene transitions of a pedestrian minimum step matching group, comprising the following steps:

[0009] Step 1: Construct an indoor pedestrian walking scene, collect pedestrian information in real time through a smartphone, and construct the minimum unit for matching and positioning pedestrian walking trajectories;

[0010] Step 2: Using the real-time collected pedestrian information, a sliding window match is performed based on the minimum matching group of pedestrian steps, and the cosine similarity algorithm is used to complete the preliminary positioning of the pedestrian's indoor position;

[0011] Step 3: Integrate the real-time collected pedestrian information and use the cosine similarity algorithm to accurately match and locate the indoor position of pedestrians, thereby realizing indoor scene conversion recognition based on the minimum matching group of pedestrian steps;

[0012] Preferably, step 1 of constructing an indoor pedestrian walking scene is as follows:

[0013] Indoor pedestrians hold a smart phone mobile terminal, start from any indoor scene, walk along the corridor, pass through the indoor scene conversion area, and arrive at another adjacent scene indoors;

[0014] Step 1 describes collecting pedestrian information in real time through a smartphone mobile terminal, as follows:

[0015] When pedestrians are walking, the smartphone is used to collect real-time Wi-Fi RSSI data, the acceleration of the phone in three directions, the angular velocity of the phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment.

[0016] The pedestrian information includes: Wi-Fi RSSI data, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone on three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment;

[0017] Step 1 constructs the minimum unit for pedestrian walking trajectory matching and positioning, as follows:

[0018] Taking the pedestrian's current position as the center, the data of a certain step length is extended forward and backward to determine the pedestrian's current position, and the minimum unit for matching and positioning the pedestrian's walking trajectory is constructed, that is, the minimum matching group of pedestrian steps;

[0019] Preferably, the minimum unit for constructing pedestrian walking trajectory matching and positioning, that is, the minimum matching group of pedestrian steps, is specifically as follows:

[0020] Step 1.1: When pedestrians are walking, the Wi-Fi physical address MAC data and signal strength RSSI data collected by the smart phone mobile terminal are obtained in real time, as well as the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone in three axes, the strength and direction of the surrounding magnetic field, the gravity acceleration of the mobile phone, the light intensity of the surrounding environment, and the sequence data of the sound pressure in the surrounding environment;

[0021] Step 1.2: In special locations of indoor scenes, such as corners or door crossings, specific signal changes will occur, and the built-in sensors of Android phones can collect the specific signal change sequence data corresponding to special scenes; when walking and shaking the phone, the acceleration, angular velocity and gravity acceleration of the phone will change in three axes, and the phone's acceleration sensor, gyroscope and gravity sensor can collect these changes; when moving from one scene to another, the magnetic field and light intensity around the phone will change, and the phone's magnetometer sensor and light intensity sensor can collect these changes; when pedestrians turn, the direction of the phone will change, and the phone's compass sensor can collect these changes; the opening and closing of doors usually produce specific sounds, and the phone can recognize the changes in these sounds, and the phone's sound pressure sensor can collect these changes;

[0022] Step 1.3: Perform Pearson correlation analysis on the sequence data collected by each sensor. Finally, the top five sensors with the strongest correlation with scene transitions are selected for experiments based on the precision and F1score scores, namely, light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis, and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene transitions of facing doors or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to identify indoor scene transitions.

[0023] Step 1.4: The indoor scene is converted to facing the door and turning. Pearson correlation analysis is performed on the sequence data collected by each sensor. The top five sensors with the strongest correlation with scene conversion are finally selected for experiment based on the accuracy and F1score scores, namely light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene conversions of facing the door or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to distinguish the indoor scene facing the door or turning area. The smartphone mobile terminal identifies whether the current scene is facing the door by integrating the acceleration of the three axes of the smartphone, the angular velocity of the three axes of the smartphone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the smartphone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment. The z-axis data of the gyroscope sensor can be used to identify whether the current scene is turning.

[0024] Step 1.5: The smartphone mobile terminal identifies whether the current scene is facing the door through the fusion of data such as the acceleration of the three axes of the phone, the angular velocity of the three axes of the phone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure of the surrounding environment. In the scene facing the door, firstly, the acceleration and angular velocity data may show specific patterns, such as deceleration, stop or turn, etc.; secondly, the magnetic field data and gravity acceleration data can be used to assist in positioning and determining the direction, and the mobile phone can use these data to determine the user's direction and position; in addition, the light intensity data can sense the lighting conditions of the environment, and changes in light intensity may provide additional clues; the sound pressure data can be used to identify the sound characteristics and noise in the environment. The sound level; the opening and closing of doors usually produce specific sounds, which can be captured by the mobile phone and used to identify the opposite door scene; the z-axis data of the gyroscope sensor is used to identify whether the current scene is turning; the gyroscope sensor determines the rotation state of the device by measuring the angular velocity; in the turning scene, the direction of the device will change, so the z-axis data of the gyroscope will also change; when the device starts to turn, the angular velocity data of the z-axis will fluctuate or increase significantly due to the change in direction; the sharper the turn, the greater the absolute value of the angular velocity data; based on the minimum matching group of pedestrian steps, the mean of the time series data of each sensor in the minimum matching group of pedestrian steps is calculated, and this mean is used as the basic data for estimating the current position of the pedestrian;

[0025] Step 1.6: Determine the minimum matching group of pedestrian steps, with the pedestrian's current position as the center, and extend a certain step length forward and backward with the pedestrian's current position as the center, use the sequence data of a certain step length to determine the pedestrian's current position, and construct the minimum unit for matching and positioning the pedestrian's walking trajectory, that is, the minimum matching group of pedestrian steps.

[0026] Preferably, the real-time collection of pedestrian information in step 2 is as follows:

[0027] Use a smartphone to collect real-time Wi-Fi physical address MAC data and signal strength RSSI data, as well as the acceleration of the phone in three directions, the angular velocity of the phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment;

[0028] Preferably, the sliding window matching is performed based on the minimum matching group of pedestrian steps in step 2, and the cosine similarity algorithm is used to complete the preliminary positioning of the indoor position of the pedestrian, which specifically includes the following steps:

[0029] Step 2.1: The present invention uses the minimum matching group of pedestrian steps to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching;

[0030] The calculation formula of the Euclidean distance algorithm is as follows:

[0031]

[0032] Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point X and point Y represent two signal strength RSSI vectors respectively. Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between two signal strengths in n-dimensional space;

[0033] Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching;

[0034] In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then sorted according to the size of the distance, and the first k windows with the smallest distance are selected as the matching results;

[0035] Step 2.2: In each matching window, sort the WiFi signals according to their RSSI strength, select the top k WiFi signals with the strongest strength, and perform cosine similarity matching on the physical address MAC data;

[0036] The cosine similarity matching of the physical address MAC data is calculated by the following specific formula:

[0037]

[0038] Among them, A represents the physical address MAC data vector returned by the sliding window in step 2.1, B represents the existing physical address MAC data vector, a i Represents the vector data of vector A at the i-th moment, b i Represents the vector data of vector B at the i-th moment, Similarity(A,B) represents the cosine similarity matching of the two vectors, thereby obtaining the similarity between the physical address MAC data and the existing physical address MAC data in a pedestrian step minimum matching group window, and then through the sliding window method in step 2.1, the similarity calculation of the signal strength RSSI data and the sensor data of all pedestrian step minimum matching group windows is realized;

[0039] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are.

[0040] Step 2.3: Based on the cosine similarity matching of the physical address MAC data, perform cosine similarity matching of the WiFi signal strength RSSI data;

[0041] The cosine similarity matching of the WiFi signal strength RSSI data is performed, and the specific calculation formula is as follows:

[0042]

[0043] Wherein, C represents the WiFi signal strength RSSI data vector stored in the sliding window returned in step 2.2, and D represents the existing WiFi signal strength RSSI data vector; c i Represents the vector data of vector C at the i-th moment, d i Represents the vector data of vector D at the i-th moment. Similarity(C,D) represents the similarity between the WiFi signal strength RSSI data and the existing WiFi signal strength RSSI data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors. Then, the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized by the sliding window method.

[0044] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are.

[0045] Preferably, the real-time collected pedestrian information is integrated in step 3, specifically as follows:

[0046] Sliding window matching is performed based on the minimum matching group of pedestrian steps, integrating the Wi-Fi RSSI data at each moment, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone on three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment;

[0047] Preferably, the cosine similarity algorithm is used in step 3 to complete the accurate matching and positioning of the indoor position of the pedestrian, thereby realizing the indoor scene conversion recognition based on the minimum matching group of pedestrian steps, as follows:

[0048] Step 3.1: The present invention adopts the minimum matching group of pedestrian steps and a certain step length to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching;

[0049] The calculation formula of the Euclidean distance algorithm is as follows:

[0050]

[0051] Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point P and point Q represent two signal strength RSSI vectors, Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between the two signal strengths in n-dimensional space.

[0052] Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching;

[0053] In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then sorted according to the size of the distance, and the first k windows with the smallest distance are selected as the matching results;

[0054] Step 3.2: In each matching window, sort the sensor data according to their Euclidean distance, select the first k data with the smallest distance, and perform cosine similarity matching of the sensor data based on the cosine similarity matching of the WiFi signal strength RSSI data;

[0055] The cosine similarity matching of the sensor data is calculated as follows:

[0056]

[0057] Where, E represents the WiFi signal strength RSSI data vector stored in step 3.1 returned by the sliding window, and F represents the sensor data vector stored in the sliding window; e i Represents the vector data of vector E at the i-th moment, fi iRepresents the vector data of the i-th moment of vector F; Similarity(E,F) represents the similarity between the signal strength RSSI data and the sensor data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors, and then the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized through the sliding window method;

[0058] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between their inner product spaces. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees. The closer the directions of the vectors are, the more similar the two vectors are.

[0059] Step 3.3: Based on the cosine similarity matching of the sensor data, perform cosine similarity matching of the pedestrian walking trajectory sequence;

[0060] The specific calculation formula for the cosine similarity matching of pedestrian walking trajectory sequences is as follows:

[0061]

[0062] Where G represents the Wi-Fi RSSI data and sensor data vector stored in the sliding window returned in step 3.2, and H represents the pedestrian walking trajectory sequence vector; g i represents the vector data of the i-th moment of vector G, h i Represents the vector data of vector H at the i-th moment; Similarity(G,H) represents the cosine similarity matching of two vectors to obtain the similarity of signal strength RSSI data combined with sensor data and pedestrian walking trajectory in a pedestrian step minimum matching group window, and then through the sliding window method, the similarity calculation of signal strength RSSI data combined with sensor data and pedestrian walking trajectory all pedestrian step minimum matching group windows is realized, thereby realizing the accurate matching and positioning of pedestrian indoor positions.

[0063] Compared with the prior art, the present invention has the following characteristics:

[0064] The traditional indoor positioning and navigation method is to constrain and correct the accumulated error of the inertial navigation system through a landmark-based method, thereby improving the user's positioning and navigation experience in narrow indoor scenes such as corridors. However, in the actual indoor environment conversion, in addition to corners, there are also a large number of straight paths between corridors, rooms, and halls. It is difficult to use the landmark-based method to constrain and correct, and the accumulated error of the inertial navigation system is difficult to be effectively corrected, which seriously affects the accuracy of user positioning and navigation.

[0065] The new indoor scene transition recognition method is to determine the minimum matching group of pedestrian steps, perform sliding window matching based on the minimum matching group of pedestrian steps, and combine the cosine similarity algorithm with the optimal sensor or sensor combination to achieve indoor scene transition recognition based on the minimum matching group of pedestrian steps; not only does it take into account the large number of straight paths between corridors, rooms, and halls, but it also takes into account the cumulative error correction of inertial navigation; therefore, theoretically, the new method has higher positioning accuracy, and the completeness of seamless positioning and navigation in complex indoor scenes is also better.

[0066] Experimental analysis shows that the new indoor scene transition recognition algorithm has higher accuracy. The positioning accuracy of the new method is significantly better than the traditional indoor positioning method in seamless positioning and navigation in complex indoor scenes.

[0067] Since the new strategy is not affected by the accumulated error of inertial navigation and performs well on straight-line paths, it has good passability. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 : Flow chart of an embodiment of the present invention;

[0069] Figure 2 : Schematic diagram of the sliding window algorithm principle of an embodiment of the present invention;

[0070] Figure 3 : Schematic diagram of the minimum matching group of pedestrian steps in the walking trajectory of an embodiment of the present invention;

[0071] Figure 4 : Four different ways of switching between different indoor scenes according to the embodiment of the present invention;

[0072] Figure 5 : Schematic diagram of data collection for a turning scenario experiment according to an embodiment of the present invention;

[0073] Figure 6 : Schematic diagram of data collection for the door-through scene experiment according to an embodiment of the present invention;

[0074] Figure 7 : A bar chart showing the person coefficient results of different sensors in the door scene conversion according to an embodiment of the present invention;

[0075] Figure 8 : A bar chart showing the person coefficient results of different sensors in a turning scene conversion according to an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0077] The solution of the system embodiment of the present invention is an indoor scene transition recognition system for a minimum matching group of pedestrian steps, including:

[0078] Handheld smart phone mobile terminal;

[0079] The model of the smartphone mobile terminal is: Meizu m1 metal Android phone;

[0080] Pedestrian information is collected in real time through a smartphone to construct the minimum unit for matching and positioning pedestrian walking trajectories; sliding window matching is performed based on the minimum matching group of pedestrian steps, and the cosine similarity algorithm is used to complete the preliminary positioning of the pedestrian's indoor position; the real-time collected pedestrian information is integrated, and the cosine similarity algorithm is used to complete the precise matching and positioning of the pedestrian's indoor position, thereby realizing indoor scene conversion recognition based on the minimum matching group of pedestrian steps.

[0081] The method of the present invention provides an indoor scene transition recognition method for a pedestrian step minimum matching group, comprising the following steps:

[0082] like Figure 1 FIG. 1 is a flow chart of a method according to an embodiment of the present invention.

[0083] Step 1: Indoor pedestrians hold a smartphone mobile terminal, start from a certain indoor scene, walk along the walkway, pass through the indoor scene conversion area, and arrive at another adjacent indoor scene; during the pedestrian's walking process, use the smartphone mobile terminal to collect real-time Wi-Fi RSSI data, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, the sound pressure of the surrounding environment, and other information, and use the current position of the pedestrian as the center, extend forward and backward by a certain step length, use the sequence data of a certain step length to determine the current position of the pedestrian, and construct the minimum unit of pedestrian walking trajectory matching and positioning, that is, the minimum matching group of pedestrian steps;

[0084] The method of determining the minimum matching group of pedestrian steps is to take the current position of the pedestrian as the center, extend forward and backward by a certain step length, and construct the minimum unit for matching and positioning the pedestrian's walking trajectory, that is, the minimum matching group of pedestrian steps. The specific implementation thereof includes the following sub-steps:

[0085] Step 1.1: When pedestrians are walking, real-time serial data of Wi-Fi physical address MAC data and signal strength RSSI data collected by the smart phone mobile terminal, as well as the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone in three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, the sound pressure in the surrounding environment, etc. are obtained;

[0086] Step 1.2: In special locations of indoor scenes, such as corners or door crossings, specific signal changes will occur, and the built-in sensors of Android phones can collect the specific signal change sequence data of these special scenes; when walking and shaking the phone, the acceleration, angular velocity and gravity acceleration of the phone will change in three axes, and the phone's acceleration sensor, gyroscope and gravity sensor can collect these changes; when moving from one scene to another, the magnetic field and light intensity around the phone will change, and the phone's magnetometer sensor and light intensity sensor can collect these changes; when pedestrians turn, the direction of the phone will change, and the phone's compass sensor can collect these changes; the opening and closing of doors usually produce specific sounds, and the phone can recognize the changes in these sounds, and the phone's sound pressure sensor can collect these changes;

[0087] Step 1.3: Perform Pearson correlation analysis on the sequence data collected by each sensor. Finally, the top five sensors with the strongest correlation with scene transitions are selected for experiments based on the precision and F1score scores, namely, light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis, and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene transitions of facing doors or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to identify indoor scene transitions.

[0088] Step 1.4: The indoor scene is converted to facing the door and turning. Pearson correlation analysis is performed on the sequence data collected by each sensor. The top five sensors with the strongest correlation with scene conversion are finally selected for experiment based on the accuracy and F1score scores, namely light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene conversions of facing the door or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to distinguish the indoor scene facing the door or turning area. The smartphone mobile terminal identifies whether the current scene is facing the door by integrating the acceleration of the three axes of the smartphone, the angular velocity of the three axes of the smartphone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the smartphone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment. The z-axis data of the gyroscope sensor can be used to identify whether the current scene is turning.

[0089] Step 1.5: The smartphone mobile terminal identifies whether the current scene is facing the door through the fusion of data such as the acceleration of the three axes of the phone, the angular velocity of the three axes of the phone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure of the surrounding environment. In the scene facing the door, firstly, the acceleration and angular velocity data may show specific patterns, such as deceleration, stop or turn, etc.; secondly, the magnetic field data and gravity acceleration data can be used to assist in positioning and determining the direction, and the mobile phone can use these data to determine the user's direction and position; in addition, the light intensity data can sense the lighting conditions of the environment, and changes in light intensity may provide additional clues; the sound pressure data can be used to identify the sound characteristics and noise in the environment. The sound level; the opening and closing of doors usually produce specific sounds, which can be captured by the mobile phone and used to identify the opposite door scene; the z-axis data of the gyroscope sensor is used to identify whether the current scene is turning; the gyroscope sensor determines the rotation state of the device by measuring the angular velocity; in the turning scene, the direction of the device will change, so the z-axis data of the gyroscope will also change; when the device starts to turn, the angular velocity data of the z-axis will fluctuate or increase significantly due to the change in direction; the sharper the turn, the greater the absolute value of the angular velocity data; based on the minimum matching group of pedestrian steps, the mean of the time series data of each sensor in the minimum matching group of pedestrian steps is calculated, and this mean is used as the basic data for estimating the current position of the pedestrian;

[0090] Step 1.6: Determine the minimum matching group of pedestrian steps, with the pedestrian's current position as the center, and extend a certain step length forward and backward with the pedestrian's current position as the center, use the sequence data of a certain step length to determine the pedestrian's current position, and construct the minimum unit for matching and positioning the pedestrian's walking trajectory, that is, the minimum matching group of pedestrian steps.

[0091] Step 2: Use a smartphone to collect real-time Wi-Fi physical address MAC data and signal strength RSSI data, as well as the acceleration of the phone in three directions, the angular velocity of the phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, the sound pressure in the surrounding environment, and other information; perform sliding window matching based on the minimum matching group of pedestrian steps, use the cosine similarity algorithm, and use the cosine similarity score to complete the preliminary positioning of the pedestrian's indoor position;

[0092] The method uses Wi-Fi physical address MAC data and signal strength RSSI data to perform sliding window matching based on the minimum matching group of pedestrian steps, and uses the cosine similarity algorithm to complete the preliminary positioning of the indoor position of pedestrians. The specific implementation includes the following sub-steps:

[0093] Step 2.1: The present invention uses the minimum matching group of pedestrian steps to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching. The Euclidean distance calculation formula is as follows:

[0094]

[0095] Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point X and point Y represent two signal strength RSSI vectors respectively. Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between the two signal strengths in n-dimensional space.

[0096] The Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching. In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then the distances are sorted, and the first k windows with the smallest distances are selected as the matching results.

[0097] Step 2.2: In each matching window, sort the WiFi signals according to their RSSI strength, select the top k WiFi signals with the strongest strength, and perform cosine similarity matching of the physical address MAC data. The calculation is done using the following formula:

[0098]

[0099] Among them, A represents the physical address MAC data vector returned by the sliding window in step 2.1, B represents the existing physical address MAC data vector, a i Represents the vector data of vector A at the i-th moment, b i Represents the vector data of vector B at the i-th moment, Similarity(A,B) represents the cosine similarity matching of the two vectors, thereby obtaining the similarity between the physical address MAC data and the existing physical address MAC data in a pedestrian step minimum matching group window, and then through the sliding window method in step 2.1, the similarity calculation of the signal strength RSSI data and the sensor data of all pedestrian step minimum matching group windows is realized;

[0100] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between their inner product spaces. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees. The closer the directions of the vectors are, the more similar the two vectors are.

[0101] Step 2.3: Based on the cosine similarity matching of the physical address MAC data, the cosine similarity matching of the WiFi signal strength RSSI data is performed, and the calculation is performed using the following formula:

[0102]

[0103] Wherein, C represents the WiFi signal strength RSSI data vector stored in the sliding window returned in step 2.2, and D represents the existing WiFi signal strength RSSI data vector; c i Represents the vector data of vector C at the i-th moment, d i Represents the vector data of vector D at the i-th moment. Similarity(C,D) represents the similarity between the WiFi signal strength RSSI data and the existing WiFi signal strength RSSI data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors. Then, the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized by the sliding window method.

[0104] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are.

[0105] Step 3: Perform sliding window matching based on the pedestrian step minimum matching group, integrate the Wi-Fi RSSI data at each moment, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, the sound pressure in the surrounding environment and other information, and use the cosine similarity algorithm to complete the precise matching and positioning of the indoor position of the pedestrian, thereby realizing the indoor scene conversion recognition based on the pedestrian step minimum matching group.

[0106] The method performs sliding window matching based on the minimum matching group of pedestrian steps, integrates Wi-Fi RSSI data and sensor data, selects the best performing sensor, and uses the cosine similarity algorithm to complete the precise matching and positioning of the indoor position of pedestrians. The specific implementation includes the following sub-steps:

[0107] Step 3.1: The present invention adopts the minimum matching group of pedestrian steps and a certain step length to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching. The Euclidean distance calculation formula is as follows:

[0108]

[0109] Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point P and point Q represent two signal strength RSSI vectors, Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between the two signal strengths in n-dimensional space.

[0110] Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching;

[0111] In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then sorted according to the size of the distance, and the first k windows with the smallest distance are selected as the matching results;

[0112] Step 3.2: In each matching window, sort the sensor data according to their Euclidean distance, select the first k data with the smallest distance, and perform cosine similarity matching of the sensor data based on the cosine similarity matching of the WiFi signal strength RSSI data. The calculation is done using the following formula:

[0113]

[0114] Where, E represents the WiFi signal strength RSSI data vector stored in step 3.1 returned by the sliding window, and F represents the sensor data vector stored in the sliding window; e i Represents the vector data of vector E at the i-th moment, f i Represents the vector data of the i-th moment of vector F; Similarity(E,F) represents the similarity between the signal strength RSSI data and the sensor data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors, and then the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized through the sliding window method;

[0115] Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between their inner product spaces. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees. The closer the directions of the vectors are, the more similar the two vectors are.

[0116] Step 3.3: Based on the cosine similarity matching of the sensor data, the cosine similarity matching of the pedestrian walking trajectory sequence is performed, and the calculation is performed using the following formula:

[0117]

[0118] Where G represents the Wi-Fi RSSI data and sensor data vector stored in the sliding window returned in step 3.2, and H represents the pedestrian walking trajectory sequence vector; g i represents the vector data of the i-th moment of vector G, h i Represents the vector data of vector H at the i-th moment; Similarity(G,H) represents the cosine similarity matching of two vectors to obtain the similarity of signal strength RSSI data combined with sensor data and pedestrian walking trajectory in a pedestrian step minimum matching group window, and then through the sliding window method, the similarity calculation of signal strength RSSI data combined with sensor data and pedestrian walking trajectory all pedestrian step minimum matching group windows is realized, thereby realizing the accurate matching and positioning of pedestrian indoor positions.

[0119] The schematic diagram of the sliding window algorithm principle of this embodiment is as follows Figure 2 shown.

[0120] This embodiment mainly determines the minimum matching group of pedestrian steps under the two scene transitions of passing through a door and turning, performs sliding window matching based on the minimum matching group of pedestrian steps, and combines the cosine similarity algorithm with the optimal sensor or sensor combination to achieve indoor scene transition recognition based on the minimum matching group of pedestrian steps.

[0121] This embodiment proposes the concept of a minimum matching group of pedestrian steps. Taking the current position of the pedestrian as the center, the group extends forward and backward by a certain step length, and uses the sequence data of a certain step length to determine the current position of the pedestrian, and constructs the minimum unit of pedestrian walking trajectory matching and positioning, that is, the minimum matching group of pedestrian steps, such as Figure 3 As shown, the specific implementation method is as follows:

[0122] Generally speaking, the arm span of an adult with both arms outstretched is about 1m to 2m. In the same scene, the area within 2m from the user is basically the area that people can perceive. Different indoor scenes are generally converted through four ways: corners, doors, straight lines and diagonal lines, such as Figure 4 shown.

[0123] First, for Figure 4The left picture shows a single-line turning method. Through repeated measurement of the right-angle turning process in different indoor scenes, the team members found that the number of steps required for pedestrians to complete a right-angle turn under normal walking conditions is about 4 to 6.

[0124] Then, for Figure 4 For the double-line door-to-door method in the left picture, according to the design standards of the building, the effective width of the indoor public corridor is required to be more than 1.5m. In addition to the connection and transition at the scene boundary, the corresponding number of pedestrian walking steps is basically in the range of 4 to 6 steps.

[0125] Finally, for Figure 4 In the right figure, the straight line and the diagonal line are separated by only one wall. The indoor scene conversion can be realized by one step, and its connection method can be regarded as the separation or extension of the door method; however, the amount of sequence data of one step is limited, and it is basically impossible to identify the conversion of different indoor scenes. Therefore, the present invention still uses 4 to 6 steps of sequence data to identify the conversion of different indoor scenes in the straight line and diagonal connection methods.

[0126] In summary, the present invention proposes the concept of a minimum matching group of pedestrian steps. Taking the current position of the pedestrian as the center, the concept extends forward and backward by a certain step length, and uses the sequence data of a certain step length to determine the current position of the pedestrian, and constructs the minimum unit for matching and positioning the pedestrian's walking trajectory, that is, the minimum matching group of pedestrian steps, such as Figure 3 As shown in the figure, based on the minimum matching group of pedestrian steps, when pedestrians locate and navigate in the internal area of ​​a scene (corner or opposite door), the mean of the time series data of each sensor in the minimum matching group of pedestrian steps is calculated based on the minimum matching group of pedestrian steps, and this mean is used as the basic data for estimating the current position of the pedestrian to judge and identify the conversion of different indoor scenes.

[0127] Pedestrian positioning is performed based on the minimum matching group of pedestrian steps, with higher positioning accuracy, stronger resistance to external interference, and better robustness.

[0128] The theoretical analysis of this embodiment is as follows, which mainly evaluates and compares three algorithms: dynamic time warping, multi-dimensional dynamic time warping, and cosine similarity:

[0129] To verify the reliability of the estimation results, the experimental results of this embodiment are as follows, wherein the statistical table of evaluation indicators of three different algorithms for indoor scene conversion recognition is shown in Table 1;

[0130] Table 1 Statistics of evaluation indicators of different algorithms for indoor scene conversion recognition

[0131]

[0132] An indoor scene transition recognition experiment was conducted in two teaching buildings of a certain university, mainly including two scene transition modes: turning and passing through a door. Among them, the turning scene is located on the second floor of the School of Veterinary Medicine of a certain university. Figure 5 The door-passing scenes include the door scene between Room 136 and Room 140 of the Department of Surveying and Geographic Information, the door scene between Room 236 and Room 240, and the door scene of entering and exiting Room 316 from the open corridor space, as shown in Figure 1. Figure 6 As shown in the figure. The dark lines represent the expected recognition intervals, while the light lines represent the actual moving trajectories. The experimental data collection device is a Meizu m1 metal Android phone, which mainly collects multi-source sensor data such as Wi-Fi RSSI, gravity sensor, magnetometer sensor, gyroscope sensor, acceleration sensor, light intensity sensor and sound pressure sensor.

[0133] First, the results of different algorithms in the two scene conversions of turning and passing through doors are analyzed, and the optimal algorithm is selected. In order to evaluate the effects of three different algorithms, dynamic time warping, multi-dimensional dynamic time warping and cosine similarity, on indoor scene conversion recognition, two evaluation indicators, precision and F1score, are selected and calculated based on all sensor data obtained by smartphones. The statistical table of evaluation indicators for indoor scene conversion recognition by different algorithms is shown in Table 1. From Table 1, we can see that the sliding window cosine similarity algorithm performs best in terms of precision and F1 score in both scenarios. Among them, in the door passing scene, the accuracy of the cosine similarity algorithm reaches 96.10%. Therefore, the next step will be to analyze the positioning results of different sensors based on the cosine similarity algorithm.

[0134] Then, the optimal algorithm (cosine similarity) is matched with different sensors or sensor combinations to find the optimal match for indoor scene conversion. Before selecting different sensors, a Pearson correlation analysis is first performed on each sensor to measure the correlation between each different sensor and the scene conversion; Figure 7 The correlation of different sensors in the recognition of door transition scene is shown. According to the results of Pearson correlation analysis, the top five sensors with the strongest correlation with scene transition are selected for experiments, namely light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis and magnetometer sensor z-axis.

[0135] In the door-to-door scenario, the results of indoor scene conversion recognition of different sensors are shown in Table 2:

[0136] Table 2 Analysis of indoor scene conversion recognition results of different sensors in door scenes

[0137]

[0138] As shown in Table 2, the data fused by the acceleration sensor, gyroscope sensor, magnetometer sensor, gravity sensor, light intensity sensor, and sound pressure sensor performed the best, and all data could be predicted without missing any data. Similarly, the data fusion of the top five sensors with the strongest positive correlation and the fusion of all sensors could predict all data, and the accuracy rate was over 80%. Even if a single sensor has a strong correlation, it performs poorly in prediction. Therefore, the use of multi-sensor data fusion will perform better in the recognition of door scene transitions than the use of single sensor data.

[0139] Before collecting sensor data for turning scenarios, perform Pearson correlation analysis on each sensor. Figure 8 The correlation of different sensors in the recognition of turning scene transitions is shown, among which the strongest correlation is the gyroscope z-axis. The results of indoor scene transition recognition of different sensors in the turning scene are shown in Table 3:

[0140] Table 3 Analysis of indoor scene transition recognition results of different sensors in turning scenarios

[0141]

[0142] As shown in Table 3, using the gyroscope sensor z-axis alone can achieve an accuracy of 94.75% and an F1score of 0.9026, and can predict all data. Therefore, using the sliding window and the gyroscope sensor z-axis in the turning scene can accurately predict the turning scene.

[0143] In summary, the sliding window cosine similarity algorithm combined with multiple sensor fusion can achieve the best effect in door transition recognition, and the sliding window cosine similarity algorithm combined with the gyroscope z-axis can achieve the best effect in turning scene recognition, and the accuracy rate is above 94%, with excellent stability and reliability.

[0144] Finally, the optimal algorithm and the optimal sensor were used in different groups of people for adaptability analysis. Three people conducted experiments, collected data at the same location in each scene, and collected data in different areas and locations multiple times. The results of three different people in the two scene conversion recognition are shown in Table 4:

[0145] Table 4 Results of different people in the recognition of two scene transitions

[0146]

[0147] As shown in Table 4, the accuracy and F1score of the three people are maintained in a stable range. The accuracy is higher in the door-passing scene, and the average accuracy is above 92% in the turning scene. The maximum F1score value of the two scene conversion recognitions reaches 0.9632, and there is no missed detection. Therefore, the sliding window combined with the cosine similarity algorithm proposed in this paper can effectively identify indoor scene conversions; if different sensors are selected in the recognition of different indoor scene conversions, better performance will be shown.

[0148] It should be understood that parts not elaborated in detail in this specification belong to the prior art.

[0149] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A method for identifying indoor scene transitions of a pedestrian minimum step matching group, characterized in that: The following steps are involved: Step 1: Construct an indoor pedestrian walking scene, collect pedestrian information in real time through a smartphone, and construct the minimum unit for matching and positioning pedestrian walking trajectories; Step 2: Using the real-time collected pedestrian information, a sliding window match is performed based on the minimum matching group of pedestrian steps, and the cosine similarity algorithm is used to complete the preliminary positioning of the pedestrian's indoor position; Step 3: Integrate the real-time collected pedestrian information and use the cosine similarity algorithm to accurately match and locate the indoor position of pedestrians, thereby realizing indoor scene conversion recognition based on the minimum matching group of pedestrian steps; Step 1 describes the construction of an indoor pedestrian walking scene, as follows: Indoor pedestrians hold a smart phone mobile terminal, start from any indoor scene, walk along the corridor, pass through the indoor scene conversion area, and arrive at another adjacent scene indoors; Step 1 describes collecting pedestrian information in real time through a smartphone mobile terminal, as follows: When pedestrians are walking, the smartphone is used to collect real-time Wi-Fi RSSI data, the acceleration of the phone in three directions, the angular velocity of the phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment. The pedestrian information includes: Wi-Fi RSSI data, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone on three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment; The specific implementation of constructing the minimum unit for matching and positioning pedestrian walking trajectories, that is, the minimum matching group of pedestrian steps, includes the following sub-steps: Step 1.1: When pedestrians are walking, the Wi-Fi physical address MAC data and signal strength RSSI data collected by the smart phone mobile terminal are obtained in real time, as well as the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone in three axes, the strength and direction of the surrounding magnetic field, the gravity acceleration of the mobile phone, the light intensity of the surrounding environment, and the sequence data of the sound pressure in the surrounding environment; Step 1.2: In special locations of indoor scenes, such as corners or door crossings, specific signal changes will occur, and the built-in sensors of Android phones can collect the specific signal change sequence data corresponding to special scenes; when walking and shaking the phone, the acceleration, angular velocity and gravity acceleration of the phone will change in three axes, and the phone's acceleration sensor, gyroscope and gravity sensor can collect these changes; when moving from one scene to another, the magnetic field and light intensity around the phone will change, and the phone's magnetometer sensor and light intensity sensor can collect these changes; when pedestrians turn, the direction of the phone will change, and the phone's compass sensor can collect these changes; the opening and closing of doors usually produce specific sounds, and the phone can recognize the changes in these sounds, and the phone's sound pressure sensor can collect these changes; Step 1.3: Perform Pearson correlation analysis on the sequence data collected by each sensor. Finally, the top five sensors with the strongest correlation with scene transitions are selected for experiments based on the precision and F1score scores, namely, light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis, and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene transitions of facing doors or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to identify indoor scene transitions. Step 1.4: The indoor scene is converted to facing the door and turning. Pearson correlation analysis is performed on the sequence data collected by each sensor. The top five sensors with the strongest correlation with scene conversion are finally selected for experiment based on the accuracy and F1score scores, namely light intensity sensor, magnetometer sensor x-axis, gravity sensor y-axis, acceleration sensor y-axis and magnetometer sensor z-axis. The correlation between the five different sensors or the combination of these five sensors and the two scene conversions of facing the door or turning is measured, and then different sequence data of multi-source sensors of smartphones are used to distinguish the indoor scene facing the door or turning area. The smartphone mobile terminal identifies whether the current scene is facing the door by integrating the acceleration of the three axes of the smartphone, the angular velocity of the three axes of the smartphone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the smartphone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment. The z-axis data of the gyroscope sensor can be used to identify whether the current scene is turning. Step 1.5: The smartphone mobile terminal identifies whether the current scene is facing the door through the fusion of data such as the acceleration of the three axes of the phone, the angular velocity of the three axes of the phone, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure of the surrounding environment. In the scene facing the door, firstly, the acceleration and angular velocity data may show specific patterns, such as deceleration, stop or turn, etc.; secondly, the magnetic field data and gravity acceleration data can be used to assist in positioning and determining the direction, and the mobile phone can use these data to determine the user's direction and position; in addition, the light intensity data can sense the lighting conditions of the environment, and changes in light intensity may provide additional clues; the sound pressure data can be used to identify the sound characteristics and noise in the environment. The sound level; the opening and closing of doors usually produce specific sounds, which can be captured by the mobile phone and used to identify the opposite door scene; the z-axis data of the gyroscope sensor is used to identify whether the current scene is turning; the gyroscope sensor determines the rotation state of the device by measuring the angular velocity; in the turning scene, the direction of the device will change, so the z-axis data of the gyroscope will also change; when the device starts to turn, the angular velocity data of the z-axis will fluctuate or increase significantly due to the change in direction; the sharper the turn, the greater the absolute value of the angular velocity data; based on the minimum matching group of pedestrian steps, the mean of the time series data of each sensor in the minimum matching group of pedestrian steps is calculated, and this mean is used as the basic data for estimating the current position of the pedestrian; Step 1.6: Determine the minimum matching group of pedestrian steps, take the current position of the pedestrian as the center, and extend a certain step length forward and backward with the current position of the pedestrian as the center, use the sequence data of a certain step length to determine the current position of the pedestrian, and construct the minimum unit of pedestrian walking trajectory matching and positioning, that is, the minimum matching group of pedestrian steps; The real-time collection of pedestrian information described in step 2 is as follows: Use a smartphone to collect real-time Wi-Fi physical address MAC data and signal strength RSSI data, as well as the acceleration of the phone in three directions, the angular velocity of the phone's three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment; The minimum matching group of human steps is matched by sliding window, and the cosine similarity algorithm is used to complete the preliminary positioning of the indoor position of pedestrians, which specifically includes the following steps: Step 2.1: The present invention uses the minimum matching group of pedestrian steps to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching; Step 2.2: In each matching window, sort the WiFi signals according to their RSSI strength, select the top k WiFi signals with the strongest strength, and perform cosine similarity matching on the physical address MAC data; Step 2.3: Based on the cosine similarity matching of the physical address MAC data, perform cosine similarity matching of the WiFi signal strength RSSI data; The calculation formula of the Euclidean distance algorithm is as follows: Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point X and point Y represent two signal strength RSSI vectors respectively. Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between two signal strengths in n-dimensional space; Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching; In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then sorted according to the size of the distance, and the first k windows with the smallest distance are selected as the matching results; The cosine similarity matching of the physical address MAC data is calculated by the following specific formula: Among them, A represents the physical address MAC data vector returned by the sliding window in step 2.1, B represents the existing physical address MAC data vector, a i represents the vector data of vector A at the i-th moment, b i Represents the vector data of vector B at the i-th moment, Similarity(A,B) represents the cosine similarity matching of the two vectors, thereby obtaining the similarity between the physical address MAC data and the existing physical address MAC data in a pedestrian step minimum matching group window, and then through the sliding window method in step 2.1, the similarity calculation of the signal strength RSSI data and the sensor data of all pedestrian step minimum matching group windows is realized; Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are. The cosine similarity matching of the WiFi signal strength RSSI data is performed, and the specific calculation formula is as follows: Wherein, C represents the WiFi signal strength RSSI data vector stored in the sliding window returned in step 2.2, and D represents the existing WiFi signal strength RSSI data vector; c i Represents the vector data of vector C at the i-th moment, d i Represents the vector data of vector D at the i-th moment. Similarity(C,D) represents the similarity between the WiFi signal strength RSSI data and the existing WiFi signal strength RSSI data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors. Then, the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized by the sliding window method. Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are. Step 3 integrates the real-time collected pedestrian information as follows: Sliding window matching is performed based on the minimum matching group of pedestrian steps, integrating the Wi-Fi RSSI data at each moment, the acceleration of the mobile phone in three directions, the angular velocity of the mobile phone on three axes, the strength and direction of the surrounding magnetic field, the gravitational acceleration of the mobile phone, the light intensity of the surrounding environment, and the sound pressure in the surrounding environment; In step 3, the cosine similarity algorithm is used to accurately match and locate the indoor position of pedestrians, thereby realizing indoor scene conversion recognition based on the minimum matching group of pedestrian steps, as follows: Step 3.1: The present invention adopts the minimum matching group of pedestrian steps and a certain step length to match the sliding window, and then uses the Euclidean distance algorithm in each window to achieve feature matching; Step 3.2: In each matching window, sort the sensor data according to their Euclidean distance, select the first k data with the smallest distance, and perform cosine similarity matching of the sensor data based on the cosine similarity matching of the WiFi signal strength RSSI data; Step 3.3: Based on the cosine similarity matching of the sensor data, perform cosine similarity matching of the pedestrian walking trajectory sequence; Step 1 constructs the minimum unit for pedestrian walking trajectory matching and positioning, as follows: Taking the pedestrian's current position as the center, the data of a certain step length is extended forward and backward to determine the pedestrian's current position, and the minimum unit for matching and positioning the pedestrian's walking trajectory is constructed, that is, the minimum matching group of pedestrian steps; The calculation formula of the Euclidean distance algorithm is as follows: Where i is the number of the signal strength RSSI vector space dimension, n is the number of the signal strength RSSI vector space dimension, i = 1, 2, ... n; (x i -y i ) 2 Represents the square of the difference between point X and point Y in the i-th dimension; point P and point Q represent two signal strength RSSI vectors, Represents the cumulative sum of the differences between two signal strength RSSI vectors in all n dimensions, Represents the Euclidean distance between two signal strength RSSI vectors, that is, the straight-line distance between two signal strengths in n-dimensional space; Euclidean distance can intuitively measure the difference between two vectors, so as to perform sliding window feature matching; In the sliding window matching process, the Euclidean distance between each window and the feature point to be matched is recorded, and then sorted according to the size of the distance, and the first k windows with the smallest distance are selected as the matching results; The cosine similarity matching of the sensor data is calculated as follows: Where, E represents the WiFi signal strength RSSI data vector stored in step 3.1 returned by the sliding window, and F represents the sensor data vector stored in the sliding window; e i Represents the vector data of vector E at the i-th moment, f i Represents the vector data of the i-th moment of vector F; Similarity(E,F) represents the similarity between the signal strength RSSI data and the sensor data in a pedestrian step minimum matching group window obtained by matching the cosine similarity of the two vectors, and then the similarity calculation between the signal strength RSSI data and all pedestrian step minimum matching group windows of the sensor data is realized through the sliding window method; Cosine similarity measures the similarity between two vectors by measuring the cosine value of the angle between the inner product space of the two vectors. The closer the cosine value is to 1, the closer the angle between the two vectors is to 0 degrees, and the closer the directions of the vectors are, the more similar the two vectors are. The specific calculation formula for the cosine similarity matching of pedestrian walking trajectory sequences is as follows: Where G represents the Wi-Fi RSSI data and sensor data vector stored in the sliding window returned in step 3.2, and H represents the pedestrian walking trajectory sequence vector; g i represents the vector data of the i-th moment of vector G, h i Represents the vector data of vector H at the i-th moment; Similarity(G,H) represents the cosine similarity matching of two vectors to obtain the similarity of signal strength RSSI data combined with sensor data and pedestrian walking trajectory in a pedestrian step minimum matching group window, and then through the sliding window method, the similarity calculation of signal strength RSSI data combined with sensor data and pedestrian walking trajectory all pedestrian step minimum matching group windows is realized, thereby realizing the accurate matching and positioning of pedestrian indoor positions.

Citation Information

Patent Citations

  • Indoor positioning method and indoor positioning system based on weighted extended Kalman filtering

    CN112797985A

  • Indoor positioning method based on multiple sensors of smart phone

    CN116437003A