A terminal interaction event driven smart phone positioning fusion method and system
Patent Information
- Application Number
- CN202611170754.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-04
AI Technical Summary
[0005]然而,现有定位方法普遍未能将这些自然发生的终端交互事件系统化地纳入定位状态估计框架
[0031] This invention aims to unlock the positioning value of terminal interaction events and broaden the sources of correction information. Existing methods typically treat actions such as QR code scanning, Bluetooth check-in, taking photos, and text input as application-layer operations, failing to extract the spatial and state information within them. This invention transforms these natural interaction events into location anchors, velocity constraints, and sensor error correction observations, enabling the system to obtain additional correction sources even under GNSS obstruction, wireless signal fluctuations, or inertial drift, effectively improving the robustness of positioning estimation in complex environments.
Smart Images

Figure CN122679489B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent terminal positioning and navigation technology, specifically relating to a smartphone positioning fusion method and system driven by terminal interaction events. Background Technology
[0002] With the widespread adoption of smartphones and mobile internet, location-based services have permeated various applications, including indoor and outdoor navigation, personnel management, trajectory tracking, and mobile social networking. Existing smartphone positioning solutions typically rely on multiple information sources, such as Global Navigation Satellite System (GNSS), Wi-Fi, Bluetooth, Ultra-Wideband (UWB), Inertial Measurement Unit (IMU), and map matching, to estimate user location through multi-source fusion methods.
[0003] In open outdoor environments, GNSS typically provides a relatively stable absolute position reference. However, when users enter complex scenarios such as indoor spaces, high-rise buildings, or urban canyons, satellite signals are susceptible to obstruction, multipath effects, and non-line-of-sight propagation, leading to significant drift, jumps, and even floor misjudgments in positioning results. To mitigate these issues, existing technologies generally incorporate auxiliary methods such as wireless signal fingerprinting, pedestrian dead reckoning (PDR), and building floor plan constraints. Among them, wireless signal positioning methods rely on pre-deployed infrastructure or offline signal fingerprint databases. Dynamic changes in the environment (such as adding or removing Wi-Fi routers or replacing Bluetooth beacons) directly affect positioning accuracy and robustness. Although PDR methods based on MEMS inertial sensors do not rely on external signals, the inherent bias, noise, and temperature drift problems of low-cost sensors, coupled with frequent changes in the way the phone is carried (such as holding it, shaking it, making a call, or placing it in a pocket), lead to a rapid accumulation of heading errors, making it difficult to maintain reliable position estimates in the long run. Map matching or trajectory smoothing methods are usually used as post-processing steps, which have limited improvement on real-time positioning and are difficult to accurately correct for specific locations or motion states.
[0004] It is worth noting that smartphones continuously generate a large number of terminal interaction events with spatial or state semantics during daily use. For example, scanning a fixed QR code usually indicates that the user is near the location where the QR code is placed; Bluetooth check-in can reflect that the user has entered a specific area; user interactions such as "confirm current location" or floor correction within an application directly imply the user's subjective judgment of the area; taking photos usually corresponds to a short pause and a relatively stable state of phone posture; continuous text input indicates that the user is in a state of slow movement or stillness. Although these interaction events are not continuous location signal sources, they can provide low-frequency but effective spatial and state constraint information.
[0005] However, existing positioning methods generally fail to systematically incorporate these naturally occurring terminal interaction events into the positioning state estimation framework. On the one hand, these events are mostly treated as application-layer functions or user operation behaviors, and the location, floor, motion state, and sensor error information contained within them are not effectively extracted and utilized. On the other hand, the spatial accuracy and constraint strength of different interaction events vary significantly (e.g., QR code anchor point accuracy can reach sub-meter level, while Bluetooth check-in only provides regional range), and existing solutions lack a unified classification modeling and observation noise configuration strategy. In addition, interaction events are characterized by low frequency, discreteness, and non-periodicity, making it difficult to directly integrate them into the continuous positioning update process. Simple event-triggered instantaneous correction may cause sudden trajectory changes, reducing the spatial coherence of positioning results and user experience.
[0006] In conclusion, designing a positioning enhancement scheme that balances event classification modeling, differentiated noise configuration, and smooth fusion updates while making full use of existing interactive data from smartphones remains a crucial issue that urgently needs to be addressed in the current field of smartphone positioning technology. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a smartphone positioning fusion method and system driven by terminal interaction events. The systematizes terminal interaction events during smartphone use into two types of observations: location anchors and state constraints. A Kalman filter fusion mechanism with a time decay window is introduced to enable low-frequency discrete interaction behaviors to participate in positioning state updates smoothly and continuously, thereby improving the coherence and reliability of positioning trajectories in complex environments.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0009] A smartphone location fusion method driven by terminal interaction events, the method comprising:
[0010] Step 1: Obtain the original location status of the smartphone, and construct a location status vector and the corresponding covariance matrix based on the original location status;
[0011] Step 2: Update the positioning state vector and covariance matrix of the previous time step according to the state prediction model to obtain the predicted state vector and the predicted covariance matrix.
[0012] Step 3: Continuously detect whether the smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, classify the terminal interaction events into Class A location anchor point events or Class B state correction events. Among them, Class A location anchor point events are used to provide location and floor constraints; Class B state correction events are used to provide speed constraints or sensor error correction constraints.
[0013] Step 4: Based on the type of the terminal interaction event, construct the corresponding event observations and configure the initial observation noise matrix;
[0014] Step 5: After the terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, the event observations corresponding to the same terminal interaction event participate in the positioning fusion at multiple consecutive positioning update times; according to the time difference between the current time and the time when the terminal interaction event is triggered, the initial observation noise matrix is incrementally adjusted to obtain the attenuated observation noise matrix;
[0015] Step 6: Input the corresponding event observations and the attenuated observation noise matrix into the Kalman filter to update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix.
[0016] Step 7: Output the fusion localization results.
[0017] Furthermore, in step 1, the positioning state vector includes the smartphone's planar position, floor, planar velocity, and zero bias of the three-axis gyroscope angular velocity in the current positioning coordinate system.
[0018] Furthermore, in step 2, the state prediction model performs state propagation on the positioning state vector of the previous moment based on the time interval between adjacent positioning update moments to obtain the predicted state vector of the current moment; and calculates the predicted covariance matrix of the current moment based on the covariance matrix, process noise matrix of the previous moment, and the state transition matrix or Jacobian matrix corresponding to the state prediction model.
[0019] Furthermore, in step 3, the type A location anchor point events include QR code scanning events, Bluetooth check-in events, and location anomaly user confirmation events; the type B state correction events include photo stabilization events and slow text input events.
[0020] Furthermore, in step 4, for the QR code scanning event, planar position observation and floor observation are constructed based on the correspondence between QR code identifiers and planar coordinates and floors stored in the pre-established anchor point database; for the Bluetooth check-in event, planar position observation and floor observation are constructed based on the area center coordinates and floors corresponding to the Bluetooth beacon identifier or check-in area identifier; for the location anomaly user confirmation event, planar position observation and floor observation are constructed based on the confirmation result selected by the user from the candidate location or candidate floor list; for the photo stabilization event, near-zero planar velocity observation is constructed, and zero-bias observation of the three-axis gyroscope angular velocity is constructed based on the average value of the three-axis gyroscope angular velocity within a short window near the photo capture time; for the low-speed text input event, weak velocity constraint observation is constructed based on the input method activation state, continuous input duration, and input frequency.
[0021] Furthermore, in step 5, the event fusion window has a preset window length, and the event fusion window starts from the trigger time of the terminal interaction event; when the current location update time is within the event fusion window, the time difference between the current time and the event trigger time is calculated; a time decay factor is calculated based on the time difference, the time decay factor takes the minimum value at the event trigger time, and monotonically increases as the time difference increases; the initial observation noise matrix is multiplied by the time decay factor to obtain the decayed observation noise matrix, so that the event observation weight is strongest in the early stage of the event trigger and gradually weakens as the time difference increases; when the time difference between the current time and the event trigger time exceeds the window length, the event observation automatically becomes invalid.
[0022] Furthermore, in step 6, the Kalman filter calculates the observation residual, residual covariance, and Kalman gain based on the predicted state vector, the predicted covariance matrix, the event observations, the corresponding observation matrix, and the attenuated observation noise matrix. The Kalman gain is used to perform weighted correction on the predicted state vector to obtain the updated state vector, and the covariance matrix is updated synchronously, so that the terminal interaction event participates in the positioning state estimation in a continuously filtered and updated manner.
[0023] On the other hand, the present invention provides a smartphone positioning fusion system driven by terminal interaction events, comprising:
[0024] The acquisition module is used to acquire the original location status of the smartphone and construct a location status vector and the corresponding covariance matrix based on the original location status.
[0025] The prediction module is used to update the positioning state vector and covariance matrix of the previous moment according to the state prediction model, so as to obtain the predicted state vector and the predicted covariance matrix.
[0026] A detection module is used to continuously detect whether a smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, the events are classified into either Type A location anchor events or Type B state correction events. Type A location anchor events provide location and floor constraints; Type B state correction events provide speed constraints or sensor error correction constraints. According to the type of terminal interaction event, corresponding event observations are constructed and an initial observation noise matrix is configured. After a terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, event observations corresponding to the same terminal interaction event participate in positioning fusion at multiple consecutive positioning update times. Based on the time difference between the current time and the trigger time of the terminal interaction event, the initial observation noise matrix is incrementally adjusted to obtain an attenuated observation noise matrix.
[0027] The update output module is used to input the corresponding event observations and the attenuated observation noise matrix into the Kalman filter, update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix; output the fused positioning result.
[0028] Thirdly, the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned terminal interaction event-driven smartphone positioning fusion method.
[0029] Fourthly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned terminal interaction event-driven smartphone positioning fusion method.
[0030] The beneficial effects of this invention are as follows:
[0031] This invention aims to unlock the positioning value of terminal interaction events and broaden the sources of correction information. Existing methods typically treat actions such as QR code scanning, Bluetooth check-in, taking photos, and text input as application-layer operations, failing to extract the spatial and state information within them. This invention transforms these natural interaction events into location anchors, velocity constraints, and sensor error correction observations, enabling the system to obtain additional correction sources even under GNSS obstruction, wireless signal fluctuations, or inertial drift, effectively improving the robustness of positioning estimation in complex environments.
[0032] Classification modeling and differentiated noise configuration enhance the rationality of fusion. Different events exhibit significant differences in spatial accuracy and constraint strength. This invention classifies events into Class A location anchor events and Class B state correction events, constructs observation equations for each, and configures differentiated initial observation noise based on event reliability. QR code anchors are configured with strong constraints, Bluetooth check-in with weak region-level constraints, and user confirmation events with abnormal positioning are configured with corresponding location and floor constraints based on the candidate region size and user confirmation results. Photo events are provided with near-zero velocity and gyroscope zero-bias correction, and text input is provided with weak velocity constraints. This avoids the overuse of weak events or the underutilization of strong events, making the fusion results more reasonable and reliable.
[0033] The event window and time decay are updated smoothly to avoid abrupt trajectory changes. This invention does not employ instantaneous hard correction triggered by events. Instead, a short-term fusion window is established after the event is triggered, allowing event observations to participate in filtering and fusion at multiple consecutive update moments. The event weight is gradually reduced by increasing observation noise over time, eventually exiting automatically. This mechanism enables smooth intervention and decay of event constraints, effectively suppressing positioning drift while maintaining the spatial continuity and smoothness of the trajectory.
[0034] Multi-dimensional state collaborative correction improves the overall stability of the system. This invention simultaneously maintains planar position, floor level, planar velocity, and gyroscope zero bias in a unified state vector, enabling type A events to correct position and floor level, and type B events to correct velocity and sensor error. This expands from single-position correction to multi-dimensional state collaborative correction, which is beneficial for improving the long-term anti-drift capability and state estimation reliability of smartphone positioning systems in complex environments such as indoor spaces, high-rise buildings, and urban canyons. Attached Figure Description
[0035] Figure 1 This is a flowchart of a smartphone positioning fusion method driven by terminal interaction events according to the present invention.
[0036] Figure 2 This is a block diagram of a smartphone positioning fusion system driven by terminal interaction events according to the present invention;
[0037] Figure 3 This is a schematic diagram of the classification observation model for Class A location anchor point events and Class B state correction events of the present invention. Detailed Implementation
[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0039] This invention establishes a step-by-step solution to the technical challenge of how terminal interaction events can serve smartphone positioning: first, it addresses the issue of using interaction events as a source of positioning observations; second, it addresses how to classify, model, and reliably represent different interaction events; and finally, it addresses how to smoothly integrate low-frequency discrete events into continuous positioning updates. Through this progressive processing, this invention can transform location-related and state-related events generated during smartphone use into effective observation information for positioning fusion, and improve the continuity, spatial consistency, floor discrimination reliability, and state estimation stability of smartphone positioning trajectories in complex environments without significantly increasing hardware costs or user workload. Specifically, for example... Figure 1 As shown, the present invention provides a smartphone positioning fusion method driven by terminal interaction events, comprising:
[0040] Step 1: Obtain the original positioning status of the smartphone and construct a positioning state vector and corresponding covariance matrix based on the original positioning status. The original positioning status can come from GNSS, Wi-Fi, Bluetooth, ultra-wideband, inertial positioning, map matching, or an existing multi-source fusion positioning system, and at least includes positioning-related information such as the smartphone's current planar position, floor, and planar velocity. The positioning state vector includes planar position, floor, planar velocity, and zero bias of the three-axis gyroscope angular velocity, used to uniformly represent the position state, motion state, and sensor error state.
[0041] Step 2: Update the positioning state vector and covariance matrix from the previous time step using the state prediction model to obtain the predicted state vector and predicted covariance matrix. This step is used to maintain the continuous propagation of the positioning state before the introduction of interactive event observations.
[0042] Step 3: Continuously detect whether the smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, classify the terminal interaction events into Class A location anchor events or Class B state correction events. Class A location anchor events include QR code scanning events, Bluetooth check-in events, and positioning anomaly confirmation events, which are used to provide location and floor constraints. Class B state correction events include photo stabilization events and slow text input events, which are used to provide speed constraints or sensor error correction constraints.
[0043] If no terminal interaction event is detected, no new event observation is built, the system outputs the current positioning result, or the predicted state is used as the current positioning state for the next positioning update time.
[0044] Step 4: Based on the type of terminal interaction event, construct the corresponding event observations and configure the initial observation noise matrix. For Type A location anchor point events, construct planar location and floor observations based on the QR code anchor point database, Bluetooth check-in area information, or location anomaly confirmation results; for Type B state correction events, such as stable photo-taking events, construct near-zero velocity observations, and construct zero-biased three-axis gyroscope angular velocity observations based on the average three-axis gyroscope angular velocity within a short time window near the photo-taking time; for Type B state correction events, such as low-speed text input events, construct weak velocity constraint observations.
[0045] Step 5: After the terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, the event observations corresponding to the same terminal interaction event participate in positioning fusion at multiple consecutive positioning update times; based on the time difference between the current time and the time when the terminal interaction event is triggered, the initial observation noise matrix is incrementally adjusted to obtain the attenuated observation noise matrix.
[0046] Step 6: Input the event observations and the attenuated observation noise matrix into the Kalman filter to update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix. When there are both type A location anchor events and type B state correction events at the same positioning update time, the updates can be performed sequentially in the order of type A first and then type B, or multiple event observations can be combined and updated uniformly.
[0047] Step 7: Output the fused positioning results. Output the fused planar position, floor, planar velocity, zero-bias estimate of the three-axis gyroscope angular velocity, the currently active event type, and the continuous positioning trajectory. Use the updated positioning status as the input for the next moment's state prediction and event fusion.
[0048] like Figure 2As shown, the method of this invention relies on a corresponding system for execution. This system includes a positioning status acquisition module, a terminal interaction event detection module, an event type classification module, an event observation construction module, an observation noise configuration module, an event fusion window management module, a Kalman fusion update module, and a positioning result output module. These modules work together to complete the functions of steps 1-7. Specifically, the working relationships between the modules are as follows: the positioning status acquisition module provides the current status and covariance to the Kalman fusion update module; the terminal interaction event detection module sends the detected events to the event type classification module; the event type classification module drives the event observation construction module to generate observations based on the event category; the observation noise configuration module sets the initial observation noise according to the event type; the event fusion window management module records the event trigger time, event observation value, initial observation noise, and window length; the Kalman fusion update module calls the corresponding observation model for filtering and updating within the event window's validity period; and the positioning result output module outputs the updated positioning status. Thus, low-frequency, discrete terminal interaction events are transformed into external observation information that can enter the continuous positioning status estimation process.
[0049] Furthermore, in step 1:
[0050] The positioning status acquisition module is used to acquire and maintain the original positioning status of the smartphone. The original positioning status can come from GNSS, Wi-Fi, Bluetooth, ultra-wideband, inertial positioning, map matching, or an existing multi-source fusion positioning system. This invention does not limit the source of the original positioning results, only requiring that the system can obtain or calculate basic positioning information such as the smartphone's current planar position, floor level, and planar velocity.
[0051] Based on the acquired original positioning status, this system constructs a current-time positioning status vector for filtering and fusion. :
[0052] (1)
[0053] in, and This indicates the planar position of the smartphone in the current positioning coordinate system. Indicates the floor level. and This represents the planar velocity components along the x and y axes in the current positioning coordinate system. , , The zero bias of the angular velocity of the three-axis gyroscope is represented by the superscript T, which indicates transpose, and the subscript k, which indicates the current time k. This is the positioning state vector. It also includes location, floor, motion status, and sensor error status, enabling different types of terminal interaction events to enter the filtering framework in the form of unified state variables.
[0054] Furthermore, in step 2:
[0055] In the filtering implementation, the system uses Kalman filtering to predict and update the state based on observations. When there are no event observations, the system maintains its positioning state according to the state prediction model. The state prediction model is as follows:
[0056] (2)
[0057] in, For process noise, This represents the positioning state vector from the previous moment. The time interval between adjacent positioning update moments is... The state transition matrix is :
[0058] (3)
[0059] The state prediction process is as follows:
[0060] (4)
[0061] (5)
[0062] in, This is the predicted state vector at time k, obtained from the updated state vector at time k-1. This is the updated state vector at time k-1. The predicted covariance matrix at time k is obtained by predicting the covariance matrix at time k-1 based on the updated covariance matrix. The covariance matrix after time k-1 is updated. This is the process noise matrix.
[0063] Furthermore, in step 3:
[0064] like Figure 3 As shown, the terminal interaction event detection module is used to detect interaction events generated by the smartphone system or application software. These interaction events include QR code scanning events, Bluetooth check-in events, location anomaly user confirmation events, camera stabilization events, and slow text input events. QR code scanning events can be triggered by the scanning interface; Bluetooth check-in events can be triggered by Bluetooth beacon recognition or a check-in application; location anomaly user confirmation events can be triggered by the location system detecting an anomaly, at which point the system sends a minimal interaction request to the user, who then responds with their current location or area through clicks, selections, or confirmations; camera stabilization events can be triggered by the camera; and slow text input events can be determined by the input method activation status, continuous input duration, and input frequency.
[0065] The event type classification module categorizes interactive events into two types based on their location implications. The first type, Class A, consists of location anchor point events, including QR code scanning events, Bluetooth check-in events, and location anomaly user confirmation events. These events provide planar location and floor constraints. The second type, Class B, consists of state correction events, including photo stabilization events and slow text input events. These events typically do not provide absolute location but can provide speed constraints or sensor error correction information.
[0066] Furthermore, in step 4:
[0067] The event observation construction module is used to generate corresponding observations based on the event type. For example... Figure 2 As shown, for Type A events, this module constructs location and floor observations; for Type B events, this module constructs velocity-constrained observations or gyroscope-based zero-bias observations. The observation noise configuration module is used to set the initial observation noise matrix according to the reliability and constraint strength of different events.
[0068] Type A location anchor events are used to correct the planar position and floor status of smartphones. These events include QR code scanning events, Bluetooth check-in events, and user confirmation events for location anomalies. A common characteristic of Type A events is that they can obtain specific location, area, or floor information through event identifiers or user selections, thus enabling the construction of location and floor observations.
[0069] For QR code scanning events, when a smartphone scans a preset QR code, the system obtains the QR code number or QR code content identifier and queries the pre-established anchor point database for the corresponding planar coordinates and floor. The anchor point database includes at least the QR code identifier, the x-coordinate and y-coordinate of the QR code's location, and the floor number. Since users typically need to approach and align themselves with the QR code when scanning, the positional constraints for QR code scanning events are relatively strong.
[0070] For Bluetooth check-in events, when a smartphone detects a Bluetooth check-in action, the system obtains the Bluetooth beacon identifier, check-in point number, or area identifier generated by the check-in application, and queries the area center coordinates and floor corresponding to that check-in point. Since Bluetooth check-in usually indicates that the user is located within a certain check-in area, rather than necessarily at a precise point, the area-level location constraint corresponding to the Bluetooth check-in event is weaker than that of the QR code scanning event.
[0071] For user confirmation events related to location anomalies, when the original positioning system detects location drift or floor determination anomalies, the system provides the user with a list of candidate locations, candidate areas, or candidate floors. After the user makes a selection, the system generates the corresponding planar location and floor observation based on the user's confirmation. The constraint strength of this event is related to the size of the candidate area, the accuracy of the user's selection, and the location anomaly detection results, and is typically between that of QR code scanning events and Bluetooth check-in events.
[0072] The aforementioned Type A events are uniformly constructed as location and floor observations. :
[0073] (6)
[0074] in, and Indicates the planar location corresponding to event type A. Indicates the corresponding floor. For QR code scanning events, , and It represents the coordinates of the QR code anchor point and the floor; for Bluetooth check-in events, it represents the center coordinates of the check-in area and the floor; for location anomaly user confirmation events, it represents the representative coordinates and floor corresponding to the user confirmation area.
[0075] The observation equation for Class A events is:
[0076] (7)
[0077] in, For Class A event observation noise, the Class A event observation matrix is... for:
[0078] (8)
[0079] To represent the reliability differences among different Type A events, this invention configures different initial observation noise matrices for different events. The initial observation noise matrices for QR code scanning events, Bluetooth check-in events, and location anomaly user confirmation events are respectively set as follows: , and :
[0080] (9)
[0081] Among them, the standard deviation of the plane position corresponding to the QR code scanning event is 0.5m, the standard deviation of the plane position corresponding to the Bluetooth check-in event is 2m, the standard deviation of the plane position corresponding to the location abnormality user confirmation event is 1m, and the standard deviation of the floor is 0.1 floors.
[0082] When a Type A event is triggered, the system does not directly replace the current location result with the event anchor point location, but instead... , The corresponding initial observation noise matrix is input into the Kalman fusion update module. This processing method allows QR code scanning, Bluetooth check-in, or user confirmation results to participate in the positioning status update in the form of filtered observations, maintaining trajectory continuity while correcting position and floor.
[0083] Type B state correction events are used to correct the planar velocity state and sensor error state of a smartphone. These events include photo stabilization events and low-speed text input events. A common characteristic of Type B events is that they typically do not provide absolute position and floor information, but they can reflect the user's motion state or the phone's stabilization state near the time of the event, making them suitable for constructing velocity-constrained observations or sensor error correction observations.
[0084] For image stabilization events, an image stabilization event is generated when the system detects a camera activation or image capture completion. Users typically pause briefly while taking a photo, and the phone's posture is relatively stable at the moment of capture. Therefore, this invention uses image stabilization events to construct near-zero planar velocity observations and zero-bias angular velocity observations from a three-axis gyroscope.
[0085] Let the time of the photo-taking event be... The system selects a short time window near the time the photo was taken, for example:
[0086] (10)
[0087] Collect the triaxial gyroscope angular velocity sequence within this short time window. , , And calculate the average angular velocity of each of the three axes. , , :
[0088] (11)
[0089] n represents the corresponding sequence index, and N represents the total number of elements in the corresponding sequence.
[0090] When the phone's posture is relatively stable during the photo-taking process, the true angular velocities of the three axes should be close to zero. Therefore, the average values of the three-axis angular velocities mentioned above can be used as observation information for the zero bias of the three-axis gyroscope. This allows for the construction of an observational measure for stable photo-taking events. :
[0091] (12)
[0092] The first two components represent near-zero planar velocity observations, while the last three components represent zero-bias angular velocity observations from a three-axis gyroscope.
[0093] The observation equation for a stable photographic event is:
[0094] (13)
[0095] in, To account for the noise in the observations of image-stabilized events, the observation matrix of image-stabilized events is: :
[0096] (14)
[0097] The initial observation noise matrix for image stabilization events is set to :
[0098] (15)
[0099] The standard deviation of the planar velocity is 0.2 m / s, and the standard deviation of the zero bias of the three-axis gyroscope is 0.02 rad / s.
[0100] For low-speed text input events, the system detects whether the input method is active and determines whether continuous text input has lasted for a preset time. Considering that users are not necessarily completely still when inputting text, but may be in a state of brief pause, slow walking, or low-speed movement, this invention does not treat text input events as strong zero-speed constraints, but rather as weak speed constraints.
[0101] The observations for low-speed text input events are constructed as follows: :
[0102] (16)
[0103] Its observation equation is:
[0104] (17)
[0105] in, The text input low-speed event observation noise is represented by the text input low-speed event observation matrix. :
[0106] (18)
[0107] The initial observation noise matrix for low-speed text input events is set as follows: :
[0108] (19)
[0109] This setting corresponds to a velocity standard deviation of 0.5 m / s. With this setting, text input events can suppress velocity state divergence without overly constraining the user's motion state to a stationary state.
[0110] When a Type B event is triggered, the system does not directly modify the positioning result. Instead, it inputs the corresponding velocity observation, three-axis gyroscope zero-bias observation, and observation noise into the Kalman fusion update module. Image stabilization events are primarily used to correct planar velocity and three-axis gyroscope zero-bias, while low-speed text input events are mainly used for weakly constrained planar velocity. Thus, state information from natural mobile phone interactions can be incorporated into the positioning state estimation.
[0111] Furthermore, in step 5:
[0112] To address the difficulty of smoothly integrating low-frequency discrete interactive events into a continuous positioning process, an event fusion window and a time-decay filter update mechanism are established. The event fusion window management module of this invention establishes a short-term fusion window after an event is triggered, and sets time-decay observation weights within the window, enabling event observations to participate in Kalman filtering in a finite-duration, continuously updated, and gradually weakening manner.
[0113] Let the time of occurrence of a certain terminal interaction event be... The event fusion window is defined as:
[0114] (20)
[0115] in, This is the length of the event fusion window. Within this event fusion window, event observations continuously participate in filtering updates at multiple positioning update times; after the event fusion window expires, event observations automatically become invalid and no longer participate in positioning status updates.
[0116] To express the characteristic that event constraints gradually become invalid over time, let the current location update time be... With the event triggering time The time difference between them is :
[0117] (twenty one)
[0118] when Define the time decay factor. :
[0119] (twenty two)
[0120] in, Let be the attenuation coefficient. Then, the event observation noise changes with time as follows:
[0121] (twenty three)
[0122] in, The initial observation noise matrix for the event (corresponding to each initial observation noise matrix in step 4). This is the decayed observation noise matrix used for filtering updates at the current time. When an event is first triggered, the event constraint effect is strong; as the current time approaches the end of the window, the observation noise increases and the event weight decreases; once the window length is exceeded, the event observation is no longer used.
[0123] Furthermore, in step 6:
[0124] The Kalman fusion update module is used to perform state prediction, residual calculation, Kalman gain calculation, state update, and covariance update.
[0125] When the event fusion window management module determines that there are valid event observations at the current time, the Kalman fusion update module selects the corresponding observations, observation matrix, and currently attenuated observation noise according to the event type. For any event observation, the filtering update process can be uniformly represented as:
[0126] (twenty four)
[0127] (25)
[0128] (26)
[0129] (27)
[0130] (28)
[0131] in, For the event observations at time k, For the corresponding observation matrix, This is the observation noise matrix after time decay. To observe the residuals, For residual covariance, For Kalman gain, Let k be the updated state vector. This is the predicted state vector at time k, obtained from the updated state vector at time k-1. Let k be the covariance matrix after time k. The predicted covariance matrix at time k is obtained by predicting the covariance matrix at time k-1 based on the updated covariance matrix. It is an identity matrix, and the superscript -1 indicates that the matrix is inverted.
[0132] When both Type A position anchor point events and Type B state correction events exist at the same positioning update time, the system can update them in the order of Type A first, then Type B. That is, first use position and floor observations to correct the plane position and floor state, and then use velocity constraints or gyroscope zero bias observations to correct the motion state and sensor error state.
[0133] Furthermore, in step 7:
[0134] The positioning result output module is used to output the fused planar position, floor, planar velocity, gyroscope zero bias estimate, currently active event type, and continuous positioning trajectory.
[0135] On the other hand, the present invention provides a smartphone positioning fusion system driven by terminal interaction events, which includes modules capable of implementing the steps of the aforementioned method, specifically including:
[0136] The acquisition module is used to acquire the original location status of the smartphone and construct a location status vector and the corresponding covariance matrix based on the original location status.
[0137] The prediction module is used to update the positioning state vector and covariance matrix of the previous moment according to the state prediction model, so as to obtain the predicted state vector and the predicted covariance matrix.
[0138] A detection module is used to continuously detect whether a smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, the events are classified into either Type A location anchor events or Type B state correction events. Type A location anchor events provide location and floor constraints; Type B state correction events provide speed constraints or sensor error correction constraints. According to the type of terminal interaction event, corresponding event observations are constructed and an initial observation noise matrix is configured. After a terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, event observations corresponding to the same terminal interaction event participate in positioning fusion at multiple consecutive positioning update times. Based on the time difference between the current time and the trigger time of the terminal interaction event, the initial observation noise matrix is incrementally adjusted to obtain an attenuated observation noise matrix.
[0139] The update output module is used to input the corresponding event observations and the attenuated observation noise matrix into the Kalman filter, update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix; output the fused positioning result.
[0140] Thirdly, the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned terminal interaction event-driven smartphone positioning fusion method.
[0141] Fourthly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned terminal interaction event-driven smartphone positioning fusion method.
[0142] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A smartphone positioning fusion method driven by terminal interaction events, characterized in that, The method includes: Step 1: Obtain the original location status of the smartphone, and construct a location status vector and the corresponding covariance matrix based on the original location status; Step 2: Update the positioning state vector and covariance matrix of the previous time step according to the state prediction model to obtain the predicted state vector and the predicted covariance matrix. Step 3: Continuously detect whether the smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, classify the terminal interaction events into Class A location anchor point events or Class B state correction events. Class A location anchor point events are used to provide location and floor constraints; Class B state correction events are used to provide speed constraints or sensor error correction constraints. Class A location anchor point events include QR code scanning events, Bluetooth check-in events, and location anomaly user confirmation events; Class B state correction events include photo stabilization events and slow text input events. Step 4: Based on the type of the terminal interaction event, construct the corresponding event observations and configure the initial observation noise matrix; for the QR code scanning event, construct planar position observations and floor observations based on the correspondence between QR code identifiers and planar coordinates and floors stored in the pre-established anchor point database; for the Bluetooth check-in event, construct planar position observations and floor observations based on the area center coordinates and floors corresponding to the Bluetooth beacon identifier or check-in area identifier; for the location anomaly user confirmation event, construct planar position observations and floor observations based on the confirmation result selected by the user from the candidate location or candidate floor list; for the stable photo-taking event, construct near-zero planar velocity observations, and construct zero-bias observations of the three-axis gyroscope angular velocity based on the average value of the three-axis gyroscope angular velocity within a short-time window near the photo-taking time; for the low-speed text input event, construct weak velocity constraint observations based on the input method activation state, continuous input duration, and input frequency. Step 5: After the terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, the event observations corresponding to the same terminal interaction event participate in the positioning fusion at multiple consecutive positioning update times; according to the time difference between the current time and the time when the terminal interaction event is triggered, the initial observation noise matrix is incrementally adjusted to obtain the attenuated observation noise matrix; Step 6: Input the corresponding event observations and the attenuated observation noise matrix into the Kalman filter to update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix. Step 7: Output the fusion localization results.
2. The smartphone positioning fusion method driven by terminal interaction events according to claim 1, characterized in that, In step 1, the positioning state vector includes the smartphone's planar position, floor, planar velocity, and zero bias of the three-axis gyroscope angular velocity in the current positioning coordinate system.
3. The smartphone positioning fusion method driven by terminal interaction events according to claim 1, characterized in that, In step 2, the state prediction model performs state propagation on the positioning state vector of the previous moment based on the time interval between adjacent positioning update moments to obtain the predicted state vector of the current moment; and calculates the predicted covariance matrix of the current moment based on the covariance matrix, process noise matrix of the previous moment and the state transition matrix or Jacobian matrix corresponding to the state prediction model.
4. The smartphone positioning fusion method driven by terminal interaction events according to claim 1, characterized in that, In step 5, the event fusion window has a preset window length, and the event fusion window starts from the triggering time of the terminal interaction event; When the current location update time is within the event fusion window, calculate the time difference between the current time and the event trigger time; The time decay factor is calculated based on the time difference. The time decay factor takes the minimum value at the time the event is triggered and increases monotonically as the time difference increases. The initial observation noise matrix is multiplied by the time decay factor to obtain the decayed observation noise matrix, so that the event observation weight is strongest in the early stage of the event triggering and gradually weakens as the time difference increases; when the time difference between the current time and the event triggering time exceeds the window length, the event observation automatically becomes invalid.
5. The smartphone positioning fusion method driven by terminal interaction events according to claim 1, characterized in that, In step 6, the Kalman filter calculates the observation residual, residual covariance, and Kalman gain based on the predicted state vector, the predicted covariance matrix, the event observations, the corresponding observation matrix, and the attenuated observation noise matrix. The Kalman gain is used to weight and correct the predicted state vector to obtain the updated state vector, and the covariance matrix is updated synchronously, so that the terminal interaction events participate in the positioning state estimation in a continuously filtered and updated manner.
6. A smartphone positioning fusion system driven by terminal interaction events, characterized in that, include: The acquisition module is used to acquire the original location status of the smartphone and construct a location status vector and the corresponding covariance matrix based on the original location status. The prediction module is used to update the positioning state vector and covariance matrix of the previous moment according to the state prediction model, so as to obtain the predicted state vector and the predicted covariance matrix. The detection module continuously detects whether the smartphone system or application software generates terminal interaction events. Based on the positioning meaning contained in the terminal interaction events, the terminal interaction events are divided into Class A location anchor events or Class B state correction events. Class A location anchor events provide location and floor constraints; Class B state correction events provide speed constraints or sensor error correction constraints. Class A location anchor events include QR code scanning events, Bluetooth check-in events, and location anomaly user confirmation events; Class B state correction events include photo stabilization events and slow text input events. Based on the type of the terminal interaction event, construct corresponding event observations and configure an initial observation noise matrix; for the QR code scanning event, construct planar position observations and floor observations based on the correspondence between QR code identifiers and planar coordinates and floors stored in the pre-established anchor point database; for the Bluetooth check-in event, construct planar position observations and floor observations based on the area center coordinates and floors corresponding to the Bluetooth beacon identifier or check-in area identifier; for the location anomaly user confirmation event, construct planar position observations and floor observations based on the confirmation result selected by the user from the candidate location or candidate floor list; for the photo stabilization event, construct near-zero planar velocity observations, and construct zero-bias observations of the three-axis gyroscope angular velocity based on the mean of the three-axis gyroscope angular velocity within a short-time window near the photo capture time; for the low-speed text input event, construct weak velocity constraint observations based on the input method activation state, continuous input duration, and input frequency. After the terminal interaction event is triggered, an event fusion window is established, and within the event fusion window, the event observations corresponding to the same terminal interaction event participate in the positioning fusion at multiple consecutive positioning update times; the initial observation noise matrix is incrementally adjusted according to the time difference between the current time and the time when the terminal interaction event is triggered, so as to obtain the attenuated observation noise matrix; The update output module is used to input the corresponding event observations and the attenuated observation noise matrix into the Kalman filter, update the predicted state vector and the predicted covariance matrix, and obtain the updated state vector and the updated covariance matrix; output the fused positioning result.
7. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the terminal interaction event-driven smartphone positioning fusion method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, enable the processor to implement a smartphone positioning fusion method driven by terminal interaction events as described in any one of claims 1-5.
Citation Information
Patent Citations
Mobile phone GNSS (Global Navigation Satellite System) pseudo-range positioning method fusing robust noise adjustment and vertical constraint
CN122043515A
Intelligent three-dimensional positioning method and system based on Bluetooth beacons and LoRa ad hoc network
CN122109988A