Data real-time collection and analysis method based on zigbee precise positioning system
By eliminating extreme points, dynamically correcting path loss, and generating confidence weights in the ZigBee positioning system, the problems of signal noise and channel adaptation are solved, achieving high-precision and stable real-time positioning results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALLISWELL QINGDAO IOT TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-03
AI Technical Summary
Existing ZigBee positioning systems suffer from non-stationary signal strength sequences in complex dynamic environments, leading to numerous noise artifacts. Channel attenuation parameters cannot be dynamically compensated, and equal weighting ignores differences in signal quality. Positioning results are easily affected by poor-quality links, and accumulated biases result in poor system stability.
The system generates a subset of effective signals by removing extreme points through a sliding window, dynamically corrects the path loss slope, generates confidence weights, constructs key-value pair stable distance features, performs weighted intersection calculations on convergence nodes and evaluates positioning consistency, and triggers historical benchmark updates.
It improves signal quality stability, enhances adaptability to non-stationary channels, improves the consistency of positioning results and the system's anti-interference capability, and ensures the long-term stability of high-precision real-time positioning.
Smart Images

Figure CN122120914B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wireless communication and signal processing technology, and relates to a method for real-time data acquisition and analysis based on a ZigBee precision positioning system. Background Technology
[0002] The surge in demand for high-precision location services in scenarios such as the Industrial Internet of Things (IIoT) and smart security has made ZigBee positioning solutions, with their advantages of low power consumption, easy networking, and low cost, the mainstream choice for short-to-medium range area positioning. Existing technologies typically rely on reference nodes transmitting radio frequency carriers, with terminal devices or coordinators receiving signal strength indications through periodic sampling and combining them with geometric intersection models to invert the spatial coordinates of the target.
[0003] However, in real-world, complex, and dynamic environments, traditional ZigBee positioning systems exhibit the following specific technical problems in real-time data acquisition and post-processing: Radio frequency signals are susceptible to multipath effects, metal blockage, and co-channel crosstalk during propagation, resulting in non-stationary fluctuations in the acquired signal strength sequence. Traditional preprocessing often relies on fixed-step filtering or single-threshold truncation, which easily leads to aliasing between instantaneous interference pulses and normal environmental noise. This results in the reference data input to the ranging model carrying a large amount of noise artifacts, amplifying subsequent distance calculation errors and limiting the purity and accuracy of real-time acquisition and analysis of the underlying coefficient data.
[0004] Existing ranging architectures generally rely on empirical formulas and set fixed channel attenuation parameters. When encountering personnel movement, layout adjustments, or temperature and humidity fluctuations on site, the channel attenuation parameters cannot dynamically compensate for sudden changes in channel propagation characteristics, causing a systematic shift in distance conversion results. This makes it difficult to adapt to non-stationary channel conditions, resulting in a lack of adaptability to dynamic scenarios in the distance inversion stage during real-time data acquisition and analysis.
[0005] When multiple reference nodes work together to solve the problem, traditional architectures typically assign equal weights to the ranging data reported by all links and perform geometric intersection. This homogenization strategy ignores the differences in real-time signal quality, causing data from links with strong interference or obstruction to excessively influence the overall coordinate calculation. This disrupts the spatial consistency of the positioning results and weakens the system's anti-interference capability, making the post-processing stages of real-time data acquisition and analysis susceptible to bias from poor-quality link data.
[0006] Existing positioning architectures, after outputting coordinates, mostly rely on passive recording or simple retry mechanisms to cope with positioning offsets caused by sudden environmental changes. This processing mode causes the deviation to accumulate continuously within consecutive sampling periods, which restricts the long-term stable operation of high-precision real-time positioning systems. Summary of the Invention
[0007] In view of this, in order to solve the problems mentioned in the background technology, a real-time data acquisition and analysis method based on the ZigBee precise positioning system is proposed.
[0008] The objective of this invention can be achieved through the following technical solution: a real-time data acquisition and analysis method based on a ZigBee precise positioning system, comprising: windowing and accumulating the original signal strength sequence of the ZigBee reference node and removing extreme points to generate an effective signal subset; comparing the fluctuation characteristic values of the effective signal subset with the historical average fluctuation characteristic values to determine the current signal propagation environment state type and generate a state identifier.
[0009] The path loss slope is dynamically corrected based on the status flag. The statistical mean of the effective signal subset is substituted into the linear attenuation model to generate the relative distance estimate between nodes. The relative distance estimate is then compared with the historical output sequence to perform time series deviation quantization. Confidence weights are generated together with the status flag to construct a key-value pair stable distance feature, which is then sent to the sink node.
[0010] The convergence node receives stable distance features, performs weighted intersection calculations based on confidence weights to generate target positioning coordinates, calculates the Euclidean distance between the target positioning coordinates and the known physical coordinates of each reference node as the actual solution distance, and subtracts the actual solution distance from the estimated relative distance between the corresponding nodes to obtain the intersection residuals for each reference node. Based on the intersection residuals, the discrete evaluation index and the root mean square error are calculated to evaluate the positioning consistency. If the standard is met, the target positioning coordinates are output; otherwise, the reduced-weight positioning result is output and the historical statistical benchmark is updated.
[0011] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) The present invention performs sliding window accumulation on the original signal strength sequence through reference nodes and removes extreme points based on local mean deviation and local standard deviation conditions to generate an effective signal subset, which solves the problem of instantaneous interference pulse and normal background noise mixing caused by traditional filtering, improves the purity of the reference data input to the subsequent ranging model, suppresses the interference of noise artifacts on distance calculation from the source, and ensures the signal quality stability of the real-time acquisition and analysis link.
[0012] (2) This invention extracts the fluctuation feature values of the effective signal subset and performs continuous window ratio increment verification with the historical fluctuation feature average value to dynamically generate a status identifier representing the static environment or dynamic interference environment. This solves the problem that fixed channel attenuation parameters cannot dynamically compensate for sudden changes in channel propagation characteristics, and enables the correction of path loss slope to follow changes in the actual environment, thereby enhancing the real-time adaptability of the distance inversion link to non-stationary channel conditions.
[0013] (3) This invention constructs a key-value pair stable distance feature containing distance value and weight by performing segmented verification based on near and far field safety thresholds on the relative distance estimate and the historical output sequence and combining it with the state identifier to generate confidence weights. This solves the problem of poor link data excessively restricting the overall coordinates in the traditional equal weight geometric intersection, enabling the aggregation node to suppress the interference of low confidence data when solving, and improving the spatial consistency of the positioning results and the system's anti-interference capability.
[0014] (4) This invention calculates the discrete evaluation index of the convergence residual sequence by the convergence node and compares it with the root mean square error. When the index is not met, it outputs the weighted positioning result and triggers the synchronous update of the historical statistical benchmark of each reference node. This solves the problem of continuous accumulation of deviation caused by traditional passive recording or simple retry mechanism, realizes the self-healing closed loop of system statistical benchmark, and ensures the long-term operation stability of high-precision real-time positioning system. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the real-time data acquisition and analysis method based on the ZigBee precise positioning system in this invention;
[0017] Figure 2 This is a flowchart of the method for generating status identifiers in this invention;
[0018] Figure 3 This is a flowchart of the method for obtaining confidence weights in this invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0021] The specific scheme of the real-time data acquisition and analysis method based on the ZigBee precise positioning system provided by the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Please see Figure 1 As shown, the implementation of the present invention includes S1 to S3: In order to solve the problems of dynamic changes in the signal propagation environment caused by personnel movement, equipment movement and multipath effect in application scenarios based on ZigBee wireless positioning technology, which leads to drastic fluctuations in the received signal strength indication sequence, mismatch of path loss model parameters, decrease in ranging accuracy and poor stability of final positioning coordinates, the present invention constructs an optimized method from front-end signal preprocessing and environmental state identification, through environmental adaptive ranging and confidence weighted feature generation, to back-end weighted positioning solution and consistency closed-loop verification.
[0023] This method achieves self-correction and parameter self-healing of localization results in complex scenarios by combining dynamic filtering and environment recognition at the bottom node side with weighted geometric calculation and consistency verification at the convergence node side.
[0024] The bottom-level nodes dynamically eliminate extreme points using the local statistical features of a sliding window to generate a subset of effective signals, and identify the current environmental state type by comparing the trend ratio of the signal variance to the historical benchmark. This state type is not only used to dynamically adjust the path loss slope to correct the distance estimate, but also combined with the temporal continuity bias of ranging to assign multi-dimensional confidence weights to the distance data, ultimately outputting stable distance features in key-value pair form.
[0025] After receiving key-value pairs, the aggregation node transforms the confidence weights into a diagonal weight matrix to participate in the first-order Taylor expansion of the localization circle intersection solution, causing the spatial intersection to automatically tilt towards nodes with higher confidence. After the solution, the localization consistency is evaluated by comparing the range and root mean square error of the intersection residuals. When the range is too large and there is abnormal pulling, a weight reduction result is output, and the current statistical benchmark is synchronously updated to the lower-level nodes, forming a closed-loop self-healing iteration of the algorithm parameters.
[0026] S1. Window accumulation is performed on the original signal strength sequence of the ZigBee reference node and extreme points are removed to generate an effective signal subset. The fluctuation characteristic value of the effective signal subset is compared with the historical fluctuation characteristic mean to determine the state type of the current signal propagation environment and generate a state label.
[0027] Considering that ZigBee signals are susceptible to multipath effects and non-line-of-sight interference caused by personnel and equipment movement when propagating indoors or in industrial settings, the directly acquired raw signal strength sequence usually contains a large amount of abrupt high-frequency pulse noise. If this noise is not effectively removed, it will lead to deviations in subsequent distance inversion. Simultaneously, the positioning system needs to determine whether the current environment is experiencing static fluctuations or deteriorating dynamic interference, enabling proactive data purification and channel environment type identification at the front end.
[0028] In one specific embodiment, the method for obtaining the effective signal subset is as follows: in an indoor target monitoring area where multiple ZigBee reference nodes are deployed, the ZigBee reference nodes are controlled to continuously collect wireless signals in chronological order within a preset sampling period, for example at 100 millisecond intervals, to generate an original signal strength sequence.
[0029] The original signal strength sequence is accumulated and buffered within a sliding window of length N; for example, N can be set to 10. The sum of the N signal strength data within the sliding window is divided by N to calculate the arithmetic mean as the local mean. The sum of the squares of the differences between each of the N signal strength data and the local mean is calculated, and the square root of the sum of squares is taken after dividing by N to calculate the local standard deviation.
[0030] Signal strength data within a sliding window that meets the condition that the absolute value of the difference from the local mean is greater than twice the local standard deviation indicates that the data has deviated from the normal signal fluctuation range within the current window. It belongs to the abnormal reception value caused by sudden non-line-of-sight interference or equipment transient abnormality. Therefore, it is determined as an extreme point and is removed. The remaining signal strength data after removing the extreme points are recombined in the original time order to generate an effective signal subset.
[0031] Further, please refer to Figure 2 As shown, the steps for generating the status identifier are as follows: S11, calculate the variance of all signal strength data within the effective signal subset, and use the variance value as the fluctuation feature value characterizing the signal dispersion within the current window; extract the historical fluctuation feature mean value corresponding to the historical time window from the locally stored historical statistical benchmark, wherein the historical fluctuation feature mean value is the average value of multiple historical fluctuation feature values recorded within the same sampling period.
[0032] S12. Calculate the ratio between the current fluctuation characteristic value and the historical fluctuation characteristic mean, and extract the ratios of three consecutive time windows to form a ratio sequence.
[0033] S13. Determine whether all ratios in the ratio sequence are greater than 1, and whether the ratio sequence satisfies the condition that each subsequent term is greater than the preceding term.
[0034] If any of the above conditions are not met, it indicates that the signal dispersion has not shown a continuous expansion trend and the channel propagation characteristics are relatively stable. In this case, the current signal propagation environment is determined to be a static environment, and a first state identifier is generated. If both of the above conditions are met, it indicates that the signal fluctuation characteristics are continuously amplified over time, and the channel is experiencing cumulative interference such as people passing through, equipment moving, or sudden changes in the electromagnetic environment. In this case, the current signal propagation environment is determined to be a dynamic interference environment, and a second state identifier is generated.
[0035] It should be noted that during the system cold start phase, there is no local historical statistical benchmark. At this time, the fluctuation characteristic value calculated in the first sampling window is directly used as the initial value of the historical fluctuation characteristic mean, and is updated in subsequent windows according to the moving average or replacement strategy.
[0036] S2. Based on the status flag, the path loss slope is dynamically corrected. The statistical mean of the effective signal subset is substituted into the linear attenuation model to generate the relative distance estimate between nodes. The relative distance estimate is quantized with the time series deviation of the historical output sequence. Together with the status flag, confidence weights are generated to construct a key-value pair stable distance feature, which is then sent to the sink node.
[0037] Traditional wireless signal ranging typically relies on a fixed path loss slope. However, signal attenuation intensifies under dynamic interference environments, and a fixed slope can lead to systematic overestimation of distance estimates. Furthermore, a single ranging result cannot reflect its temporal rationality and reliability under the current environment. If distance data without reliability assessment is reported directly, it will cause geometric divergence at the aggregation node.
[0038] Therefore, by parsing the status identifier to extract the corresponding environmental dynamic factors, multiplying them by the preset base slope to obtain the real-time corrected path loss slope; substituting the statistical mean of the effective signal subset and the corrected slope into the linear attenuation model to solve for the relative distance; further comparing the difference between the current distance and the historical output, and calculating the confidence weight in combination with the environmental attenuation coefficient, the distance and weight are finally encapsulated as key-value pair features and transmitted in a targeted manner.
[0039] In one specific embodiment, firstly, the corresponding environmental dynamic factor is extracted based on the state identifier: if it is the first state identifier, it indicates that the current channel propagation characteristics are stable and the signal attenuation law is consistent with the baseline model, so there is no need to scale the model parameters, and the constant 1 is used as the environmental dynamic factor.
[0040] If the status is the second state, it indicates that the channel is experiencing increased abnormal signal fluctuations due to dynamic interference, and the actual attenuation level has exceeded the expectations of the baseline model. Therefore, it is necessary to perform reverse suppression on the model parameters based on the fluctuation amplification ratio. Thus, the current fluctuation characteristic value is divided by the historical average fluctuation characteristic value to calculate the amplification factor. Then, the value 1 is added to the product of the preset adjustment coefficient and the difference between the amplification factor and 1 to calculate the environmental dynamic factor. The adjustment coefficient can be set to 0 to 1.
[0041] The local preset base slope is obtained. This base slope is calibrated through a standard reference environment during the system initialization phase. Since the path loss slope directly determines the rate attenuation of signal strength with distance, and the base slope only characterizes the reference attenuation law under ideal or static conditions, by multiplying the base slope by the environmental dynamic factor, the reference attenuation rate can be proportionally converted according to the actual interference level of the current environment, so that the corrected slope conforms to the real channel attenuation characteristics, thereby calculating the path loss slope under the current environment.
[0042] After obtaining the path loss slope that adapts to the current channel characteristics, in order to retrieve the actual spatial distance between nodes, it is necessary to further extract the statistical characteristics of the signal strength and solve the model. Therefore, the arithmetic mean of all signal strength data in the effective signal subset is calculated to obtain the statistical mean.
[0043] Substituting the statistical mean and the path loss slope under the current environment into a preset linear attenuation model, and solving the problem through formula inversion, estimates of the relative distance between nodes are generated. The linear attenuation model is as follows: ,in, This represents the statistical mean of a subset of valid signals. Let represent the reference value of the received signal strength at a reference distance of 1 meter from the transmitting node, n represent the path loss slope under the current environment, and d represent the estimated relative distance between the nodes to be solved. This is achieved by substituting the statistical mean into... By performing transposition and logarithmic inverse operations on the formula, d can be solved in reverse.
[0044] Furthermore, to prevent biased ranging data from interfering with subsequent spatial calculations, the generated relative distance estimates need to be quantified using a temporal dimension for reliability. Please refer to [link to relevant documentation]. Figure 3 As shown, the steps of the confidence weight acquisition method are as follows: S21, extract the historical distance estimate of the previous time window output from the local cached historical output sequence, and calculate the absolute value of the difference between the current relative distance estimate and the historical distance estimate.
[0045] S22. Determine whether the historical distance estimate is greater than a preset distance safety threshold. The distance safety threshold can be set as a long-distance boundary reference value pre-calibrated based on the physical dimensions of the actual positioning site.
[0046] If the historical distance estimate is greater than the distance safety threshold, it indicates that the current ranging is in the mid-far field stable range. The relative change in the distance value can characterize the continuity of time series and avoid the calculation distortion caused by the denominator approaching zero. Then, the ratio of the absolute value of the difference to the historical distance estimate is calculated to obtain the relative change rate of distance. The relative change rate of distance is then subtracted from the preset full score of the basic weight, and the maximum value between the difference and the preset lower limit weight is taken to calculate the basic weight score. The full score of the basic weight is used for weight normalization calibration, for example, it can be set to 1. The lower limit weight is used to prevent the basic weight score from becoming negative due to the excessive relative change rate, which would cause divergence in the subsequent weighted intersection solution. For example, it can be set to 0.1.
[0047] If the historical distance estimate is less than or equal to the distance safety threshold, it indicates that the current distance measurement is in the near field or short distance range. Then, it is further determined whether the absolute value of the difference is greater than the preset near field jump threshold. The near field jump threshold can be set to 40% of the distance safety threshold.
[0048] If the value exceeds the near-field jump threshold, it indicates a drastic and abnormal change in the near-field distance. In this case, the base weight full score is multiplied by the preset extremely low retention ratio to calculate the base weight score. For example, the extremely low retention ratio can be set to a constant between 0.1 and 0.2.
[0049] If the near-field jump threshold is less than or equal to the near-field distance fluctuation, it means that the near-field distance fluctuation is within the normal range. Then, the basic weight full score is multiplied by the preset minimum retention ratio to calculate the basic weight score. For example, the minimum retention ratio can be set to a constant between 0.5 and 0.7 to ensure the basic credibility of short-distance nodes and prevent excessive weight decay.
[0050] S23. Calculate the attenuation coefficient based on the status indicator: If it is the first status indicator, it indicates that the channel is in a stable state and the signal quality has not deteriorated. No additional attenuation penalty is required, so the attenuation coefficient is 1.
[0051] If it is the second state identifier, it indicates that the channel is in a dynamic interference state. Since the ranging result itself has been affected by model mismatch, the basic weight score needs to be reduced twice to match the degree of environmental degradation. Therefore, the environmental dynamic factor is extracted as the attenuation coefficient.
[0052] The confidence weight is calculated by multiplying the base weight score by a decay factor. This confidence weight characterizes the reliability of the current distance estimate in subsequent positioning calculations. A higher weight value indicates that the contribution of the distance data to the final positioning coordinates should be enhanced, while a lower weight value indicates that it should be weakened.
[0053] Furthermore, in order to associate the relative distance estimates between nodes with their confidence evaluations and pass them to the pooling node for subsequent weighted calculation, both need to be encapsulated in a structured data format. The method for obtaining the stable distance features is as follows: the relative distance estimates between nodes are used as the distance field, the confidence weights are used as the weight field, and the distance field and the weight field are combined to form a stable distance feature in the format of a key-value pair array.
[0054] S3. The convergence node receives stable distance features, performs weighted intersection calculation based on confidence weights to generate target positioning coordinates, calculates discrete evaluation index based on intersection residuals and evaluates positioning consistency with root mean square error. If the standard is met, the target positioning coordinates are output; otherwise, the reduced-weight positioning result is output and the historical statistical benchmark is updated.
[0055] Typically, when a sink node faces distance data uploaded by multiple reference nodes, the reliability of the distance data varies due to the different microenvironments of each node. If the traditional unweighted least squares method is used, the positioning coordinates will be shifted by low-reliability abnormal data. At the same time, relying solely on the absolute value of the error in a single calculation cannot identify whether there are residual anomalies in individual directions in the spatial geometric intersection. Furthermore, when the physical environment changes over a long period of time, maintaining a fixed historical statistical benchmark will cause the path loss model parameters to deviate from the actual channel characteristics.
[0056] Therefore, by receiving the key-value pair feature extraction weight field uploaded by each node, a diagonal weight matrix is constructed. The weighted normal equation is solved by combining the first-order Taylor expansion linearized positioning circle equation system to output the target coordinates. After the solution, the difference sequence between the actual solution distance and the estimated distance of each node is calculated. The range and root mean square error are extracted for consistency comparison. Based on the comparison results, the coordinates are directly output or the weight is reduced and an alarm is triggered. When the evaluation fails to meet the standard, the synchronous coverage update of the historical statistical benchmark is forcibly triggered.
[0057] In one specific embodiment, firstly, the convergence node constructs a set of positioning circle equations based on a two-dimensional coordinate plane, with the known physical coordinates of each ZigBee reference node as the center and the relative distance estimate between nodes in the received stable distance features as the radius. The variables of each equation are the unknown horizontal and vertical coordinates of the target node. Using the geometric centroid of the known physical coordinates of all reference nodes as the initial coordinates, the multiple positioning circle equations are expanded in first order Taylor at the initial coordinates, ignoring higher-order infinitesimal terms, and transformed into a set of linear error equations about the coordinate correction.
[0058] Extract the confidence weights carried in each stable distance feature, construct a diagonal weight matrix using the confidence weights as the main diagonal elements, multiply both sides of the linear error equation system by the transpose of the diagonal weight matrix on the left, and then multiply by the diagonal weight matrix on the left again to construct a weighted normal equation system.
[0059] By performing matrix inversion and matrix multiplication on the weighted normal equations, the offset corrections for the target node's x and y coordinates are obtained. These corrections are then superimposed onto the initial coordinates to generate the target's positioning coordinates. These target positioning coordinates represent the optimal spatial geometric estimate of the target node's location within the current monitoring area, after comprehensively considering the ranging confidence levels of each reference node.
[0060] Furthermore, to verify the reliability of the above geometric intersection results and eliminate the interference of low-confidence node data on positioning accuracy, it is necessary to perform consistency verification on the solution process. Therefore, the consistency of positioning is evaluated based on the discrete evaluation index and the root mean square error, which specifically includes: calculating the Euclidean distance between the target positioning coordinates and the known physical coordinates of each reference node as the actual solution distance; subtracting the estimated relative distance between nodes in the corresponding stable distance feature from the actual solution distance to obtain the intersection residual corresponding to each reference node; and arranging the intersection residuals of all participating reference nodes in order to form an intersection residual sequence.
[0061] The difference between the maximum and minimum values in the intersection residual sequence is calculated as the discrete evaluation index. At the same time, the square root of the average of the sum of squares of each term in the intersection residual sequence is calculated as the root mean square error. The relationship between the discrete evaluation index and the root mean square error is compared: if the discrete evaluation index is less than or equal to a preset multiple, such as 1.5 times the root mean square error, it means that the intersection residual distribution corresponding to each reference node is relatively concentrated, and the spatial geometric intersection is not disturbed by individual abnormal directions. Then, the positioning consistency is judged to be up to standard, and the current target positioning coordinates are directly output.
[0062] Otherwise, if the discrete evaluation index is greater than the root mean square error of the preset multiple, it indicates that there are outliers in the intersection residual sequence that deviate from the center, and the spatial intersection is affected by local unknown occlusion or the ranging jump causes anomalies. In this case, the positioning consistency is judged to be insufficient, and a residual over-limit warning label is added to the current target positioning coordinates as a downweighted positioning result.
[0063] Meanwhile, when the positioning consistency is insufficient, it indicates that the channel propagation characteristics of the current physical environment have shifted, and the existing historical statistical benchmarks cannot accurately characterize the current channel state. Therefore, it is necessary to trigger the historical statistical benchmark update. Specifically, when the positioning consistency is determined to be insufficient, the aggregation node extracts the statistical mean of the effective signal subset reported by each reference node at the current time and the currently calculated fluctuation characteristic value, and uniformly distributes it to the corresponding reference nodes through the downlink communication link.
[0064] After receiving the command, each reference node weights and merges the received statistical mean and fluctuation characteristic value with its corresponding local historical statistical mean and historical fluctuation characteristic mean according to a preset sliding smoothing coefficient, thereby completing the smooth update of the historical statistical benchmark. The sliding smoothing coefficient is a constant greater than 0 and less than 1, for example, it can be set to a value between 0.2 and 0.4.
[0065] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0066] Those skilled in the art will recognize that the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0067] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0068] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0069] Finally, the above description is only a preferred embodiment of the present invention and is 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 data real-time collection and analysis method based on a ZigBee precise positioning system, characterized in that, include: The original signal strength sequence of the ZigBee reference node is accumulated by a window and extreme points are removed to generate an effective signal subset. The fluctuation characteristic value of the effective signal subset is compared with the historical fluctuation characteristic mean to determine the state type of the current signal propagation environment and generate a state identifier. Among them, the state type is static environment, and a first state identifier is generated; the state type is dynamic interference environment, and a second state identifier is generated. The path loss slope is dynamically adjusted based on the status identifier. The statistical mean of the effective signal subset is substituted into the linear attenuation model to generate relative distance estimates between nodes. The relative distance estimates are then compared with the historical output sequence to quantize the time-series deviation and obtain the basic weight score. The attenuation coefficient is calculated based on the status identifier: if it is the first status identifier, the attenuation coefficient is 1; if it is the second status identifier, the environmental dynamic factor is extracted as the attenuation coefficient. The basic weight score is multiplied by the attenuation coefficient to calculate the confidence weight. A key-value pair stable distance feature is constructed and sent to the sink node. The path loss slope is dynamically corrected based on the status identifier, specifically including: Based on the status identifier, the corresponding environmental dynamic factor is extracted: if it is the first status identifier, the constant 1 is used as the environmental dynamic factor; if it is the second status identifier, the current fluctuation characteristic value is divided by the historical fluctuation characteristic average value to calculate the amplification factor, and then the value 1 is added to the product of the preset adjustment coefficient and the difference between the amplification factor and 1 to calculate the environmental dynamic factor. Obtain the local preset base slope, multiply the base slope by the environmental dynamic factor, and calculate the path loss slope under the current environment; The method for obtaining the stable distance feature is as follows: The relative distance estimates between nodes are used as the distance field, the confidence weights are used as the weight field, and the distance field and the weight field are combined to form a stable distance feature in the format of a key-value pair array. The aggregation node receives stable distance features, performs weighted intersection calculations based on confidence weights to generate target positioning coordinates, calculates discrete evaluation indicators based on intersection residuals and evaluates positioning consistency with root mean square error. If the standard is met, the target positioning coordinates are output; otherwise, the reduced-weight positioning result is output and the historical statistical benchmark is updated.
2. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, The method for obtaining the effective signal subset is as follows: The ZigBee reference node is controlled to continuously collect wireless signals in chronological order within a preset sampling period to generate the original signal strength sequence. The original signal strength sequence is input into a sliding window of length N for accumulation and buffering; Sum the N signal strength data points within the sliding window and divide by N to calculate the arithmetic mean as the local mean; calculate the sum of squares of the differences between each of the N signal strength data points and the local mean, divide the sum of squares by N, and take the square root to calculate the local standard deviation. Signal strength data within the sliding window that satisfy the condition that the absolute value of the difference from the local mean is greater than a preset multiple of the local standard deviation are identified as extreme points and removed. The remaining signal strength data after removing extreme points are then recombined in the original time order to generate an effective signal subset.
3. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, The method for generating the status identifier is as follows: The variance of all signal strength data within the effective signal subset is calculated and used as the fluctuation characteristic value. The mean of historical fluctuation characteristics corresponding to the historical time window is extracted from the historical statistical benchmark stored locally. Calculate the ratio between the current volatility characteristic value and the historical volatility characteristic mean, and extract the ratios from multiple consecutive time windows to form a ratio sequence; Determine whether all ratios in the ratio sequence are greater than 1, and whether the ratio sequence satisfies the condition that each subsequent term is greater than the preceding term. If none of the above conditions are met, the current signal propagation environment is determined to be a static environment. If both of the above conditions are met simultaneously, the current signal propagation environment is determined to be a dynamic interference environment.
4. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, The method for obtaining the estimated relative distance between nodes is as follows: The statistical mean is obtained by taking the arithmetic mean of all signal strength data within the effective signal subset. Substituting the statistical mean and the path loss slope under the current environment into the preset linear decay model, the relative distance between nodes is estimated by inversion of the formula.
5. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, The method for obtaining the basic weight score is as follows: Extract the historical distance estimate from the previous time window output from the local cached historical output sequence, and calculate the absolute value of the difference between the current relative distance estimate and the historical distance estimate; Determine whether the historical distance estimate is greater than the preset distance safety threshold; If the distance exceeds the safety threshold, the ratio of the absolute value of the difference to the historical distance estimate is calculated to obtain the relative change rate of the distance. The relative change rate of the distance is then subtracted from the preset full score of the basic weight, and the maximum value between the difference and the preset lower limit weight is taken to calculate the basic weight score. If the difference is less than or equal to the distance safety threshold, then it is further determined whether the absolute value of the difference is greater than the preset near-field jump threshold; if it is greater than the near-field jump threshold, then the basic weight full score is multiplied by the preset extremely low retention ratio to calculate the basic weight score. If the value is less than or equal to the near-field transition threshold, the basic weight full score is multiplied by the preset minimum retention ratio to calculate the basic weight score; where the extremely low retention ratio is less than the minimum retention ratio.
6. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, The method for obtaining the target positioning coordinates is as follows: The aggregation node constructs multiple positioning circle equations with the known physical coordinates of each ZigBee reference node as the center and the relative distance estimate between nodes in the received stable distance features as the radius. Using the geometric centroid of the known physical coordinates of all reference nodes as the initial coordinates, the equations of multiple positioning circles are expanded in first order Taylor at the initial coordinates and transformed into a system of linear error equations. Extract the confidence weights carried in each stable distance feature, and construct a diagonal weight matrix using the confidence weights as the main diagonal elements; Multiply both sides of the linear error equation system by the transpose of the diagonal weight matrix on the left, and then multiply by the diagonal weight matrix on the left again to construct a weighted normal equation system. The weighted normal equations are inverted and multiplied to obtain the coordinate correction values. These correction values are then superimposed onto the initial coordinates to generate the target positioning coordinates.
7. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 1, characterized in that, Based on the consistency between the discrete evaluation index calculated from the intersection residual and the root mean square error evaluation, the specific aspects include: The Euclidean distance between the target positioning coordinates and the known physical coordinates of each reference node is calculated as the actual solution distance. The difference between the actual solution distance and the estimated relative distance between the corresponding nodes is used to obtain the intersection residuals corresponding to each reference node. All intersection residuals constitute the intersection residual sequence. The range of the convergent residual sequence is calculated as a discrete evaluation index, and the root mean square error of the convergent residual sequence is also calculated. Compare the relationship between the discrete evaluation index and the root mean square error: if the discrete evaluation index is less than or equal to the root mean square error of a preset multiple, the positioning consistency is determined to be up to standard, and the current target positioning coordinates are directly output; otherwise, the positioning consistency is determined to be insufficient, and a residual error exceeding the standard warning label is added to the current target positioning coordinates as a reduced-weight positioning result.
8. The real-time data acquisition and analysis method based on the ZigBee precise positioning system as described in claim 7, characterized in that, The triggering of historical statistical benchmark updates specifically includes: When the positioning consistency is insufficient, the aggregation node extracts the statistical mean and fluctuation characteristic value of the effective signal subset reported by each reference node at the current time, and uniformly distributes them to the corresponding reference nodes. After receiving the instruction, each reference node will weight and merge the received statistical mean and fluctuation characteristic value with the corresponding local historical statistical mean and historical fluctuation characteristic mean according to the preset sliding smoothing coefficient, so as to complete the smooth update of the historical statistical benchmark.