Real-time distance measurement method and device based on UWB technology in leveling process

By using real-time distance measurement methods based on UWB technology, the data acquisition and filtering process in the leveling measurement process is dynamically adjusted, solving the accuracy and efficiency problems caused by environmental differences in leveling measurement, and realizing efficient distance measurement in different environments.

CN121865199APending Publication Date: 2026-04-14GUANGDONG QUANKE ENG TESTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-15
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing leveling methods struggle to balance distance measurement accuracy and operational efficiency under varying measurement environments. Fixed sampling strategies result in redundant data acquisition in favorable conditions or insufficient sampling in adverse conditions, impacting both measurement accuracy and efficiency.

Method used

The real-time ranging method using UWB technology determines the initial cumulative confidence level by acquiring ranging environment parameters, calculates discrete feature indicators and accumulates confidence increment values, dynamically adjusts the data acquisition duration and screening criteria, automatically terminates sampling, and selects high-confidence data for distance calculation.

Benefits of technology

While ensuring ranging accuracy, ranging efficiency was improved, avoiding oversampling in favorable environments and undersampling in adverse environments, thus achieving high efficiency and reliability in the ranging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121865199A_ABST
    Figure CN121865199A_ABST
Patent Text Reader

Abstract

The invention provides a real-time distance measurement method and device based on a UWB technology in a leveling process, and relates to the technical field of engineering surveying and mapping. According to the technical scheme provided by the invention, the initial cumulative confidence is determined according to the environment type by acquiring the ranging environment parameters, so that ranging environments with different qualities have differentiated confidence starting points. The current data quality is quantified by calculating discrete feature indexes in a continuous sampling period, and the current data quality is converted into a confidence increment value according to a mapping rule table to be accumulated into a target accumulated confidence coefficient. And when the target accumulated confidence reaches the target confidence threshold, sampling is automatically terminated, and target discrete ranging data is screened for distance calculation, so that excessive sampling in a good environment and insufficient sampling in a severe environment are avoided, and the ranging efficiency can be improved on the premise of ensuring the ranging precision corresponding to different measurement environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of engineering surveying technology, specifically to a real-time distance measurement method and device based on UWB technology in the process of leveling. Background Technology

[0002] Leveling is a fundamental method in surveying engineering used to determine the elevation of ground points, and it has wide applications in engineering construction, topographic mapping, deformation monitoring, and other fields. The basic principle of leveling is to use the horizontal line of sight provided by a level instrument, along with a leveling rod erected at the measuring point, to determine the elevation difference between two points by reading the leveling rod, and then calculate the elevation value of each point.

[0003] Common leveling methods in related technologies employ electronic levels in conjunction with barcode-coded leveling rods for automatic reading and data storage. Built-in image processing algorithms identify the barcode information on the leveling rod and calculate the reading, achieving digital acquisition of measurement data. However, this method has certain drawbacks in practical applications. Electronic levels typically use a fixed sampling strategy during data acquisition, failing to dynamically adjust the data acquisition time and data selection criteria based on variations in the quality of the actual measurement environment. When the measurement environment is ideal, redundant data acquisition follows the standard procedure, resulting in wasted time; when interference exists, the limited number of sampling attempts makes it difficult to guarantee data reliability, affecting measurement accuracy. This fixed sampling mode makes it difficult for existing leveling methods to simultaneously meet the distance measurement requirements of both accuracy and operational efficiency under different measurement environments. Summary of the Invention

[0004] This application provides a real-time ranging method and device based on UWB technology in the process of leveling, which can improve ranging efficiency while ensuring ranging accuracy in different measurement environments.

[0005] In a first aspect, this application provides a real-time ranging method based on UWB technology in leveling surveying, applied to a real-time ranging system, the real-time ranging system including a master node and multiple connected slave nodes, the method including: Responding to the ranging command input by the user, and determining the target confidence threshold according to the ranging accuracy requirements in the ranging command; Obtain the ranging environment parameters between the master node and each slave node, and determine the initial cumulative confidence level based on the environment type corresponding to the ranging environment parameters; Within a continuous sampling period, discrete ranging data between the master node and multiple slave nodes are collected, and discrete feature indices in the discrete ranging data are calculated. According to the preset mapping rule table, the discrete feature index is converted into confidence increment value, and the confidence increment value is added to the initial cumulative confidence level to obtain the target cumulative confidence level corresponding to different sampling periods; When the cumulative confidence of the target is greater than the target confidence threshold, the discrete ranging data of the target is selected from multiple discrete ranging data from the start of the measurement to the current sampling period, and the discrete ranging data of the target is combined into a ranging solution sequence. The distance calculation sequence is calculated using the UWB distance calculation formula to obtain the distance values ​​between the master node and each slave node.

[0006] By adopting the above technical solution, ranging environment parameters are acquired and the initial cumulative confidence level is determined according to the environment type, enabling ranging environments of different qualities to have differentiated confidence level starting points. Within a continuous sampling period, the current data quality is quantified by calculating discrete feature indicators and converted into confidence increment values ​​according to a mapping rule table, which are then accumulated into the target cumulative confidence level. When the data quality is high, a large confidence increment value results in a rapid increase in confidence; conversely, when the data quality is low, a small confidence increment value results in a slow increase in confidence. When the target cumulative confidence level reaches the target confidence threshold, sampling is automatically terminated, and target discrete ranging data is filtered for distance calculation. This avoids oversampling in favorable environments and undersampling in adverse environments, thereby improving ranging efficiency while ensuring ranging accuracy for different measurement environments.

[0007] Secondly, this application provides a real-time distance measuring device based on UWB technology for leveling surveys, the device comprising: The response startup module is used to respond to the ranging command input by the user and determine the target confidence threshold according to the ranging accuracy requirements in the ranging command; The initialization module is used to obtain the ranging environment parameters between the master node and each slave node, and determine the initial cumulative confidence based on the environment type corresponding to the ranging environment parameters; The data acquisition module is used to collect discrete ranging data between the master node and multiple slave nodes within a continuous sampling period, and to calculate discrete characteristic indices in the discrete ranging data. The confidence accumulation module is used to convert discrete feature indicators into confidence increment values ​​according to a preset mapping rule table, and accumulate the confidence increment values ​​into the initial cumulative confidence to obtain the target cumulative confidence corresponding to different sampling periods; The data processing module is used to filter out the discrete ranging data of the target from the start time of measurement to the current sampling period when the cumulative confidence of the target is greater than the target confidence threshold, and combine the discrete ranging data of the target into a ranging solution sequence. The output module is used to calculate the distance measurement sequence using the UWB distance calculation formula to obtain the distance measurement values ​​between the master node and each slave node.

[0008] Thirdly, this application provides a computer storage medium that stores multiple instructions adapted for loading by a processor and executing any of the methods described above.

[0009] Fourthly, this application provides an electronic device including a processor, a memory, and a transceiver. The memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform any of the methods described above.

[0010] In summary, the beneficial effects of the technical solution of this application include: By adopting the above technical solution, ranging environment parameters are acquired and the initial cumulative confidence level is determined according to the environment type, enabling ranging environments of different qualities to have differentiated confidence level starting points. Within a continuous sampling period, the current data quality is quantified by calculating discrete feature indicators and converted into confidence increment values ​​according to a mapping rule table, which are then accumulated into the target cumulative confidence level. When the data quality is high, a large confidence increment value results in a rapid increase in confidence; conversely, when the data quality is low, a small confidence increment value results in a slow increase in confidence. When the target cumulative confidence level reaches the target confidence threshold, sampling is automatically terminated, and target discrete ranging data is filtered for distance calculation. This avoids oversampling in favorable environments and undersampling in adverse environments, thereby improving ranging efficiency while ensuring ranging accuracy for different measurement environments. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a real-time distance measurement method based on UWB technology during a leveling process according to an embodiment of this application. Figure 2 This is a schematic diagram of a real-time ranging device based on UWB technology in a leveling process according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0012] Explanation of reference numerals in the attached drawings: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. Detailed Implementation

[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0014] In the description of the embodiments of this application, words such as "illustrative," "for example," or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "illustrative," "for example," or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Rather, the use of words such as "illustrative," "for example," or "for example" is intended to present the relevant concepts in a specific manner.

[0015] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple devices refer to two or more devices, and multiple screen terminals refer to two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0016] Please see Figure 1 This document presents a flowchart illustrating a real-time distance measurement method based on UWB (Ultra Wideband) technology during leveling, as provided in an embodiment of this application. This method can be implemented using a computer program, a microcontroller, or run on a real-time distance measurement device based on UWB technology in leveling processes using a von Neumann architecture. The computer program can be integrated into the application or run as a standalone utility application. The specific steps of the real-time distance measurement method based on UWB technology during leveling are described in detail below.

[0017] S101: Responds to the ranging command input by the user and determines the target confidence threshold according to the ranging accuracy requirements in the ranging command; The ranging command refers to the control command issued by the user through the human-computer interaction interface to initiate the ranging task. This command contains the accuracy requirements for this ranging task. The ranging accuracy requirement represents the allowable error range of the ranging result expected by the user, usually quantified in millimeters or centimeters. The target confidence threshold represents the critical criterion for determining whether the collected data is reliable enough to output the ranging result. Its value is usually set between 0 and 1, with higher values ​​indicating stricter requirements for data reliability. For example, when the user requires a ranging accuracy of ±5 mm, the target confidence threshold may be set to 0.95. However, when the accuracy requirement is relaxed to ±20 mm, the target confidence threshold can be reduced to 0.85, thus achieving a balance between accuracy requirements and data acquisition efficiency.

[0018] Specifically, when a user inputs a ranging command to the real-time ranging system via touchscreen, buttons, or remote commands, the command is first parsed to extract the ranging accuracy requirement parameters. An internally pre-established database maps ranging accuracy requirements to target confidence thresholds. This database, derived from statistical analysis of extensive experimental data, records the optimal confidence threshold values ​​for different accuracy levels. Based on the extracted ranging accuracy requirements, the corresponding target confidence threshold value is determined by querying the mapping database. This target confidence threshold will be used as a criterion in subsequent steps to control the duration of data acquisition and the rigor of data filtering. This approach allows for flexible adjustment of the ranging strategy according to different application scenarios, ensuring measurement reliability in high-precision scenarios while avoiding resource waste in low-precision scenarios.

[0019] In some embodiments, the response to ranging commands and the determination of target confidence thresholds can be achieved in various ways. Optionally, a hierarchical mapping approach can be used: First, the ranging accuracy requirements are divided into several standard levels, such as high accuracy (error ≤ 5mm), medium accuracy (error 5-15mm), and low accuracy (error > 15mm). Then, a fixed target confidence threshold is preset for each level, such as 0.95, 0.88, and 0.80 respectively. When a ranging command input by the user is received, the level range to which the accuracy requirement belongs is determined, and the preset target confidence threshold corresponding to that level is directly called. This method is simple to implement and responds quickly. Optionally, a continuous function mapping approach can be used: A mathematical function relationship is established between the ranging accuracy requirement and the target confidence threshold, such as using an exponential function or a piecewise linear function model. The accuracy requirement value is used as the input function as the independent variable to calculate the corresponding target confidence threshold. This method can achieve more precise threshold control and can provide a more reasonable confidence threshold for accuracy requirements between standard levels, thereby improving adaptability and flexibility. It is understandable that an adaptive adjustment method based on historical data learning can also be used to determine the target confidence threshold, which is not limited here.

[0020] S102: Obtain the ranging environment parameters between the master node and each slave node, and determine the initial cumulative confidence level based on the environment type corresponding to the ranging environment parameters; In real-time ranging, the master node refers to the UWB device that serves as the ranging reference point. It is typically fixed at a known location on a level or surveying equipment and is responsible for bidirectional ranging communication with multiple slave nodes. Slave nodes represent multiple UWB devices installed at the target point, which communicate with the master node via wireless signal transmission to achieve distance measurement. Ranging environment parameters represent environmental characteristics affecting the quality of UWB signal propagation, primarily including physical quantities such as signal-to-noise ratio, multipath effect strength, and signal attenuation coefficient. Environment type refers to different ranging scenario classifications based on ranging environment parameters, mainly including two categories: Line of Sight (LOS) and Non-Line of Sight (NLOS). Initial cumulative confidence represents the pre-assigned baseline confidence value based on the current ranging environment quality before data acquisition begins; this value reflects the initial impact of environmental conditions on ranging reliability.

[0021] Specifically, the master node sends probe signals to each slave node. During the round-trip signal transmission, the receiving device monitors and records raw parameters such as signal strength and noise power in real time, calculating the signal-to-noise ratio (SNR) as the primary ranging environment parameter. The acquired SNR value is compared with a pre-stored environment classification threshold; for example, an SNR greater than 20 dB is classified as a line-of-sight environment, and less than or equal to 20 dB is classified as a non-line-of-sight environment. After determining the environment type, a pre-set environment-confidence comparison table is consulted. This table, based on extensive experimental data, records the initial cumulative confidence values ​​corresponding to different environment types and their sub-levels. Based on the currently determined environment type, the corresponding initial cumulative confidence value is extracted from the comparison table and stored as the base value for confidence accumulation calculation in subsequent steps. This environment-aware initialization strategy allows the influence of environmental factors to be considered at the beginning of ranging, setting differentiated starting points for ranging environments of different qualities, thereby improving the reliability of the final ranging results.

[0022] In some embodiments, ranging environmental parameters and initial cumulative confidence can be obtained and determined in various ways. Optionally, a multi-parameter fusion evaluation method can be adopted: not only is the signal-to-noise ratio between the master node and each slave node obtained, but also multiple environmental parameters such as the standard deviation of the signal arrival time difference and the first-path power ratio are collected simultaneously. After normalizing these parameters, they are weighted and fused according to preset weight coefficients to obtain a comprehensive environmental quality score. Then, this score is compared with a multi-level environmental classification threshold to subdivide the environment into multiple levels such as excellent line-of-sight, normal line-of-sight, weak non-line-of-sight, and strong non-line-of-sight. Finally, the corresponding initial cumulative confidence is queried in the environment-confidence table according to the subdivided environmental level. This method can more comprehensively reflect the real situation of complex environments. Optionally, a dynamic threshold adjustment method can be used: Shortly before the ranging task begins (e.g., 1-2 seconds), multiple sets of signal-to-noise ratio sample data are continuously collected. The mean and variance of these samples are calculated. The environmental stability is judged based on the variance. When the variance is small, the environment is stable, and a standard environmental classification threshold is used for judgment. When the variance is large, the environment fluctuates drastically, and the environmental classification threshold is appropriately increased to more conservatively determine the environment type. Then, the initial cumulative confidence is determined based on the adjusted judgment result. This method can adapt to dynamic changes in environmental conditions. It is understood that an environment identification method based on a machine learning model can also be used to determine the environment type and the initial cumulative confidence; this is not limited here.

[0023] S103: During a continuous sampling period, collect discrete ranging data between the master node and multiple slave nodes, and calculate discrete characteristic indices in the discrete ranging data. The sampling period refers to the time unit for performing a ranging data acquisition at fixed time intervals, typically set to tens to hundreds of milliseconds, such as 50ms, 100ms, or 200ms. Discrete ranging data represents the single distance measurement value obtained by measuring the round-trip time between the master node and each slave node via UWB signals within each sampling period. Due to factors such as environmental noise and multipath interference, these data exhibit discrete distribution characteristics. The discrete characteristic index is used to represent the degree of deviation between the discrete ranging data acquired in the current sampling period and historical data, and is a statistical indicator for quantifying data volatility and consistency. A continuous sampling period refers to multiple consecutive time periods from the start of the measurement, where data is continuously acquired according to a preset sampling period time interval.

[0024] Specifically, based on the pre-configured sampling period parameters, a periodic timer is started. At the arrival of each sampling period, the master node sends a ranging request signal to each slave node. Upon receiving the request, the slave nodes immediately reply with a response signal. The master node records the precise timestamps of signal transmission and reception, and preliminarily calculates the discrete ranging data for the current sampling period based on the signal round-trip time. After acquiring the current discrete ranging data, the discrete feature index calculation module is immediately invoked. This module first extracts all discrete ranging data collected from the start of the measurement to the previous sampling period from the data cache, performs an arithmetic mean operation on these historical data to obtain the historical reference mean, and then calculates the absolute difference between the newly acquired discrete ranging data in the current sampling period and this historical reference mean. This absolute difference is used as the discrete feature index for the current period and recorded and stored.

[0025] S104: Convert discrete feature indicators into confidence increment values ​​according to the preset mapping rule table, and add the confidence increment values ​​to the initial cumulative confidence level to obtain the target cumulative confidence level corresponding to different sampling periods; The mapping rule table refers to a pre-established lookup table or function relationship used to convert discrete feature index values ​​into confidence increment values. This table records the confidence increase corresponding to discrete feature indices of different sizes. The confidence increment value represents the increase in cumulative confidence that should be achieved based on the data quality of the current sampling period. Its value typically ranges from 0 to a certain positive upper limit, reflecting the contribution of the current data to improving the overall measurement reliability. The target cumulative confidence level represents the comprehensive reliability assessment value of all collected data from the start of the measurement to the current sampling period. This value gradually increases with the continuous accumulation of high-quality data. The mapping rule table usually reflects a negative correlation between discrete feature indices and confidence increment values; that is, the smaller the discrete feature index, the more stable the data, and the larger the corresponding confidence increment value.

[0026] Specifically, this step is repeated in each sampling period, gradually increasing the target cumulative confidence level by continuously accumulating confidence increments until the target confidence threshold is reached or exceeded. Specifically, after obtaining the discrete feature index value for the current sampling period, the mapping transformation module is immediately invoked. This module first determines the type of the mapping rule table. If it is a discrete lookup table, the discrete feature index value is compared with the boundaries of each interval in the table to determine its interval range, and the corresponding confidence increment value is directly extracted. If it is a continuous function relationship, the discrete feature index is substituted as the independent variable into the mapping function for calculation to obtain a continuous confidence increment value. After obtaining the confidence increment value, the current cumulative confidence level value is read from memory (this value is the initial cumulative confidence level in the first sampling period, and the target cumulative confidence level updated in the previous period in subsequent sampling periods). The newly obtained confidence increment value is then arithmetically added to it to obtain the updated target cumulative confidence level value, which is stored for use in the next period. During the accumulation process, boundary checks are performed to ensure that the target cumulative confidence score does not exceed the theoretical upper limit (usually set to 1.0). After the confidence score update for this period is completed, the updated target cumulative confidence score is immediately compared with the target confidence threshold determined in step S101. If the target cumulative confidence score is still less than or equal to the target confidence threshold, the process continues to wait for the next sampling period and repeats steps S103 and S104. If the target cumulative confidence score is greater than the target confidence threshold, the subsequent data filtering and distance calculation process is triggered. This cyclic accumulation mechanism allows for adaptive adjustment of the data acquisition duration based on the actual ranging environment. In favorable environments with stable data, the confidence increment is larger, the confidence score grows rapidly, and the acquisition ends as soon as possible when the threshold is reached. In adverse environments with fluctuating data, the confidence increment is smaller, requiring more sampling periods to reach the confidence threshold, thus achieving an optimal balance between measurement efficiency and result reliability.

[0027] Specifically, after obtaining the discrete feature index values ​​for the current sampling period, the mapping transformation module is immediately invoked. This module first determines the type of the mapping rule table. If it is a discrete lookup table, the discrete feature index values ​​are compared with the boundaries of each interval in the table to determine the interval range to which they belong, and the confidence increment value corresponding to that interval is directly extracted. If it is a continuous function relationship, the discrete feature index is substituted as an independent variable into the mapping function for calculation to obtain a continuous confidence increment value. After obtaining the confidence increment value, the current initial cumulative confidence level or the target cumulative confidence level of the previous period is read from memory, and the newly obtained confidence increment value is arithmetically added to it to obtain the updated target cumulative confidence level value, which is then stored for use in subsequent periods.

[0028] S105: When the cumulative confidence of the target is greater than the target confidence threshold, the discrete ranging data of the target is selected from multiple discrete ranging data from the start time of measurement to the current sampling period, and the discrete ranging data of the target is combined into a ranging solution sequence; The measurement start time refers to the point in time when the user's ranging command is responded to and the first sampling period of data acquisition is initiated, serving as the starting point for the entire ranging process. The current sampling period represents the sampling period in which the target's cumulative confidence first exceeds the target confidence threshold. Target discrete ranging data refers to a subset of high-confidence data that meets quality standards and is selected from all collected discrete ranging data through a filtering algorithm; this data will be used for the final distance calculation. Data density statistics are used to quantitatively assess the degree of concentration in the discrete ranging data distribution, typically achieved by dividing the data range into several small intervals and counting the number of data points in each interval. The ranging calculation sequence refers to an ordered set of data formed by organizing the selected target discrete ranging data according to specific rules, containing all timestamps and relevant parameters required for distance calculation.

[0029] Specifically, after the confidence level is updated in each sampling cycle of step S104, the target cumulative confidence level is immediately compared with the target confidence threshold. When the target cumulative confidence level is detected to be greater than the target confidence threshold for the first time, the execution of the loop processes S103 and S104 is stopped, and the data filtering process is triggered instead. All discrete ranging data collected from the start of the measurement to the current sampling cycle are extracted from the data cache. First, a global statistical analysis is performed on this batch of data to calculate the minimum and maximum values ​​of the data, determining the range of data values. Then, this range is evenly divided into several equally wide sub-intervals (e.g., 20 intervals). The number of data points contained in each sub-interval is counted one by one to obtain the data density distribution of each interval. The data density of each interval is compared with a preset density threshold, which is usually set as a certain percentage of the total data volume (e.g., 20% or 30%). All intervals with data density exceeding this threshold are marked as high-density intervals. Then, all discrete ranging data are traversed to determine whether each data point falls within a high-density interval. Data points falling within high-density intervals are filtered out as target discrete ranging data. After filtering, the target discrete ranging data are sorted according to time sequence or according to the proximity to the center value of the interval, and the complete measurement information corresponding to each data point is extracted, including signal transmission timestamp, reception timestamp, slave node identifier, etc., and this information is organized into a structured ranging solution sequence.

[0030] In some embodiments, the selection of target discrete ranging data and the combination of ranging solution sequences can be achieved in various ways. Optionally, an intelligent selection method based on kernel density estimation can be adopted: apply a kernel density estimation algorithm (such as Gaussian kernel function) to all discrete ranging data to generate a continuous probability density distribution curve, find the peak point and its neighborhood on the density curve, calculate the density value of the density curve at each data point location, select all data points with a density value exceeding 50% of the peak density as target discrete ranging data, sort the selected data according to their density values ​​from high to low, prioritize the ranging record corresponding to the data point with the highest density value, extract the four key timestamps from each ranging record, and organize them into a ranging solution sequence according to the topological order from the master node to each slave node. This method does not make any prior assumptions about the data distribution pattern accumulated over multiple sampling periods and can adapt to the complex situation of multimodal distribution. It is understood that other methods can also be used to identify data-dense areas and select target data, which are not limited here.

[0031] S106: Use the UWB distance calculation formula to calculate the distance solution sequence and obtain the distance values ​​between the master node and each slave node.

[0032] The UWB distance calculation formula is a mathematical expression for distance calculation derived from the Time of Flight (ToF) principle of ultra-wideband signals.

[0033] Specifically, the ranging solution sequence is first parsed to identify the identifiers of each slave node. For each slave node, all discrete ranging data records related to that slave node are extracted from the solution sequence. For each slave node, multiple sets of timestamp data may be extracted (because during the cyclic accumulation of multiple sampling periods, data from multiple sampling periods may be selected as target data). The optimal dataset needs to be determined from these multiple sets of data. The determination criteria can be to select the set of data whose timestamp values ​​are closest to the median, or to select the set of data with the smallest corresponding discrete feature index, or to calculate the average of the timestamps of multiple sets of data to form a comprehensive timestamp. After determining the optimal dataset, four key timestamps are extracted from it. These timestamp values ​​are substituted into the UWB distance calculation formula to obtain the one-way distance between the master node and the slave node, i.e., the ranging value. The above calculation process is repeated for all slave nodes to obtain the complete set of ranging values ​​between the master node and each slave node.

[0034] Based on the above embodiments, as an optional implementation method, the method of obtaining the ranging environment parameters between the master node and each slave node in step S102 and determining the initial cumulative confidence based on the environment type corresponding to the ranging environment parameters can be specifically implemented through the following steps S201-S203.

[0035] S201: Obtain the signal-to-noise ratio between the master node and each slave node as a ranging environment parameter; The signal-to-noise ratio (SNR) is the ratio between the received useful signal power and the noise power. It is used to quantify the quality of the signal and is usually expressed in decibels.

[0036] Specifically, after the ranging task is initiated, the master node sends a probe signal to each slave node, and the slave nodes immediately reply with a response signal upon receiving the signal. During the round-trip signal transmission, the receiving device monitors and records the received signal power and background noise power in real time. The raw signal-to-noise ratio (SNR) is calculated by dividing the signal power value by the noise power value. This SNR is then converted to a base-10 logarithm and multiplied by 10 to obtain an SNR value in decibels. For each communication link between the master node and each slave node, signal power acquisition, noise power acquisition, and SNR calculation are performed separately, resulting in multiple independent SNR values. These SNR values ​​are recorded and stored as ranging environment parameters characterizing the current ranging environment quality, providing a data foundation for subsequent environment type determination.

[0037] S202: Compare the ranging environment parameters with the preset environment classification threshold to determine the environment type of the current ranging environment. The environment type includes line-of-sight environment and non-line-of-sight environment. The environment classification threshold refers to a pre-set critical criterion value used to distinguish different environment types. A line-of-sight environment refers to a ranging scenario where there is a direct propagation path between the master and slave nodes, and the signal is unobstructed. A non-line-of-sight environment refers to a ranging scenario where the direct propagation path between the master and slave nodes is blocked by obstacles, and the signal needs to be reflected or diffracted to reach its destination.

[0038] Specifically, each signal-to-noise ratio (SNR) value obtained between the master node and each slave node is compared with an environment classification threshold. When an SNR value is greater than the environment classification threshold, the ranging environment corresponding to that communication link is determined to be a line-of-sight (LAS) environment; when the SNR value is less than or equal to the environment classification threshold, it is determined to be a non-line-of-sight (NOS) environment. For multiple communication links between the master node and multiple slave nodes, environment type determination is performed separately, obtaining the environment type identifier for each link. In practical applications, the environment classification threshold is calibrated and set according to device characteristics and application scenarios. For example, the threshold is set to 18 dB in indoor environments and 20 dB in outdoor environments to ensure that the determination results conform to the actual environmental characteristics.

[0039] S203: Based on the preset environment-confidence comparison table, determine the environment type corresponding to the ranging environment parameter and determine the initial cumulative confidence. The initial cumulative confidence corresponding to the line-of-sight environment is greater than the initial cumulative confidence corresponding to the non-line-of-sight environment.

[0040] The environment-confidence level table refers to a pre-established data table that records the mapping relationship between different environment types and their corresponding initial cumulative confidence level values.

[0041] Specifically, after determining the environment type, a pre-defined environment-confidence comparison table is queried. This table records the initial cumulative confidence scores for line-of-sight (LOS) environments and non-LOS environments. The scores for LOS environments are significantly higher than those for non-LOS environments, reflecting the higher reliability of distance measurement data under LOS conditions. Based on the determined environment type identifier, a matching environment type entry is searched in the comparison table, and the corresponding initial cumulative confidence score is extracted. For multiple communication links between the master node and multiple slave nodes, the corresponding initial cumulative confidence scores are extracted from the comparison table according to their respective environment types. The extracted initial cumulative confidence scores are stored in memory as the starting reference value for subsequent confidence score accumulation calculations, setting differentiated confidence score starting points for distance measurement environments of different qualities.

[0042] Based on the above embodiments, as an optional implementation method, the method of calculating the discrete feature index in the discrete ranging data in step S103 can be specifically implemented through the following steps S301-S302.

[0043] S301: Calculate the arithmetic mean of all discrete ranging data collected from the start of the measurement to the previous sampling period, and use it as the historical reference mean. The arithmetic mean is the average of multiple sums divided by the number of values. The historical reference mean is the arithmetic mean of all collected discrete ranging data from the start of the measurement to the previous sampling period, used to characterize the central tendency of historical data.

[0044] Specifically, at the start of the current sampling period, all discrete ranging data collected from the start of the measurement to the previous sampling period are retrieved from the data cache. The total number of these discrete ranging data points is counted and recorded as the total data volume. The values ​​of all discrete ranging data points are summed to obtain the data sum. The data sum is divided by the data volume to obtain the arithmetic mean. This arithmetic mean is recorded and stored as the historical reference mean. When performing this step in the first sampling period, since no historical data has been collected, this step is skipped or the historical reference mean is set to a preset initial reference value. In each subsequent sampling period, as new data is continuously collected, the historical reference mean is recalculated and updated based on the continuously growing data set, reflecting the overall trend characteristics of the gradually accumulating ranging data.

[0045] S302: Calculate the absolute difference between the discrete ranging data collected in the current sampling period and the historical reference mean, and determine the absolute difference as the discrete feature index; wherein, the value of the discrete feature index is negatively correlated with the confidence increment value.

[0046] The absolute difference refers to the absolute value of the difference between two values, indicating the degree of deviation. A negative correlation refers to an inverse relationship between two variables; that is, when one variable increases, the other decreases.

[0047] Specifically, after acquiring the discrete ranging data values ​​collected in the current sampling period, the historical reference mean value calculated in step S301 is read from memory. The current discrete ranging data value is subtracted from the historical reference mean value to obtain the difference between the two. The absolute value of this difference is calculated to eliminate the influence of the positive and negative signs, resulting in an absolute difference value representing the degree of deviation. This absolute difference value is determined as the discrete characteristic index for the current sampling period and stored. The smaller the discrete characteristic index value, the better the consistency between the current data and the historical trend, the more stable the measurement environment, and the larger the corresponding confidence increment value; the larger the discrete characteristic index value, the further the current data deviates from the historical trend, the greater the fluctuation of the measurement environment, and the smaller the corresponding confidence increment value. This negative correlation is specifically reflected in subsequent steps through a mapping rule table or mapping function to ensure that the confidence increases rapidly when the data quality is high and slowly when the data quality is low.

[0048] Based on the above embodiments, as an optional implementation method, the method of filtering the target discrete ranging data from multiple discrete ranging data from the start time of measurement to the current sampling period in step S105 can be specifically implemented through the following steps S401-S402.

[0049] S401: Perform data density statistics on multiple discrete ranging data from the start of the measurement to the current sampling period to obtain the interval data density corresponding to each discrete ranging data; Data density statistics refers to a statistical method for quantitatively assessing the degree of concentration of data distribution. This is achieved by dividing the data range into several intervals and counting the number of data points within each interval. Interval data density refers to the number of data points contained within the interval containing a given data point, used to characterize the degree of clustering of data around that data point.

[0050] Specifically, first, all discrete ranging data are traversed to find the minimum and maximum values, determining the data range. This range is then evenly divided according to a preset number or width of intervals, forming several continuous and non-overlapping numerical intervals. Each discrete ranging data point is traversed one by one, determining which interval its value falls into and assigning it to that interval. The number of data points contained in each interval is counted, obtaining the data density value for each interval. For each discrete ranging data point, the data density value corresponding to its assigned interval is found and marked as the interval data density for that data point. After completing the interval assignment and density marking for all discrete ranging data, a complete statistical result containing the data density of each data point and its corresponding interval is obtained.

[0051] S402: Determine the discrete ranging data with an interval data density greater than a preset density threshold as the target discrete ranging data.

[0052] The preset density threshold refers to a pre-defined critical value used to determine whether data belongs to a high-density area. It is usually determined based on a certain proportion of the total data or based on statistical analysis results. Target discrete ranging data refers to a subset of data located in high-density areas selected from all discrete ranging data. This data has higher reliability and consistency.

[0053] Specifically, after completing the data density statistics, a pre-set density threshold value is read. This pre-set density threshold can be determined by setting it as a fixed percentage of the total data volume, or by calculating it based on statistical characteristics of all interval data densities, such as multiples of the median or mean. Each discrete ranging data point and its corresponding interval data density value is iterated through, and the interval data density value is compared with the pre-set density threshold. When the interval data density corresponding to a data point is greater than the pre-set density threshold, the data point is determined to be located in a high-density clustered area, and is selected and marked as target discrete ranging data. When the interval data density is less than or equal to the pre-set density threshold, the data point is determined to be located in a low-density discrete area or an edge area, and is not considered target discrete ranging data. After completing the comparison and selection of all data points, all data points marked as target discrete ranging data and their complete measurement information are extracted to form a target discrete ranging data set.

[0054] Based on the above embodiments, as an optional implementation method, in order to improve the actual ranging time and ranging efficiency, the sampling time can be shortened by adjusting the sampling period before step S105. Specifically, this can be achieved through the following steps.

[0055] If the target cumulative confidence level is less than or equal to the target confidence threshold, then the difference between the target confidence threshold and the target cumulative confidence level is calculated; the time window of the sampling period is adjusted according to the difference.

[0056] The difference refers to the numerical difference between the target confidence threshold value and the current cumulative target confidence value, used to represent the size of the gap between the current confidence level and the target threshold. The time window refers to the length of the sampling period, that is, the time interval between two adjacent data collections.

[0057] Specifically, after accumulating the confidence increment value in each sampling period, the updated target cumulative confidence value is compared with the target confidence threshold. When the target cumulative confidence is less than or equal to the target confidence threshold, it is determined that the current amount of collected data has not yet met the reliability requirements, and data collection needs to continue. At this time, the target cumulative confidence value is subtracted from the target confidence threshold value to obtain the difference between the two. The larger the difference, the further the current confidence is from the target requirement, and more data needs to be collected; the smaller the difference, the closer it is to the target requirement, and the less data needs to be supplemented. Based on the calculated difference, the time window of the sampling period is dynamically adjusted. The specific adjustment methods include: when the difference is large, shortening the time window to increase the sampling frequency, speeding up data collection, and enabling the confidence to grow faster; when the difference is small, extending the time window to reduce the sampling frequency, reducing unnecessary frequent sampling when approaching the target, saving computing resources and power consumption. The adjustment of the time window is achieved by modifying the timing parameters of the periodic timer, and the adjusted new time window is immediately applied to the next sampling period. This adaptive adjustment mechanism enables the sampling process to dynamically optimize the sampling strategy based on the progress of confidence accumulation, speeding up the collection progress when the confidence is low and smoothly transitioning when approaching the target, thus achieving a balance between sampling efficiency and resource consumption.

[0058] Based on the above embodiments, as an optional implementation method, in S106, the distance calculation sequence is calculated using the UWB distance calculation formula to obtain the distance values ​​between the master node and each slave node. This can be achieved through the following steps.

[0059] Extract the optimal dataset for each slave node from the ranging solution sequence. The optimal dataset includes the timestamps between each slave node and the master node. Substitute each timestamp into the UWB distance calculation formula to obtain the distance measurement value between the master node and each slave node.

[0060] The optimal dataset refers to the most representative combination of timestamp data extracted from each slave node in the ranging solution sequence. This data will be directly used for distance calculation. A timestamp is a precise point in time recorded during the transmission and reception of a UWB signal, including the time the master node transmits the signal, the time the slave node receives the signal, the time the slave node replies to the signal, and the time the master node receives the reply signal. The ranging value is the straight-line spatial distance between the master node and the slave node calculated using the timestamps.

[0061] The ranging solution sequence is parsed to identify the individual slave node identifiers. For each slave node, all discrete ranging data records related to that slave node are extracted from the ranging solution sequence. Due to the multiple sampling periods during the confidence accumulation process, each slave node corresponds to multiple sets of timestamp data. The optimal dataset is determined from these multiple sets of data using methods such as: selecting the set of timestamp data with the smallest corresponding discrete feature index value, or calculating the arithmetic mean of multiple sets of timestamp data at each time point to form a comprehensive timestamp, or selecting the set of timestamp values ​​closest to the median of each set of data. After extracting the optimal dataset, four key timestamp values ​​are obtained. These four timestamp values ​​are substituted into the UWB distance calculation formula to calculate the one-way distance. The above extraction and calculation process is repeated for all slave nodes to obtain a complete set of ranging values ​​between the master node and each slave node, and these ranging results are output or stored.

[0062] The formula for calculating UWB distance is: ; Where d is the distance measurement value. and For the timestamps sent and received from the node, and The timestamps for sending and receiving data by the master node are denoted by c, where c is the speed of light.

[0063] In this formula, d represents the distance measurement result between the master node and the slave node. TR1 represents the timestamp of the master node sending the ranging signal, and TS1 represents the timestamp of the slave node receiving the ranging signal. The difference between the two reflects the time it takes for the signal to travel from the master node to the slave node and the clock deviation between the two devices. TR2 represents the timestamp of the slave node sending the reply signal, and TS2 represents the timestamp of the master node receiving the reply signal. The difference between the two reflects the time it takes for the signal to travel from the slave node back to the master node and the clock deviation. c represents the speed of light constant, that is, the speed of electromagnetic waves in a vacuum.

[0064] The formula calculates distance based on the principle of two-way time-of-flight ranging. First, it calculates the first time difference, the time interval between the master node sending a signal and the slave node receiving it. Then, it calculates the second time difference, the time interval between the slave node sending a reply and the master node receiving it. Subtracting the second time difference from the first eliminates the clock skew between the two devices, as the clock skew affects both measurements simultaneously during the round trip; the subtraction cancels them out. Dividing the difference by 2 yields the net one-way flight time of the signal, since the signal travels a round trip from the master node to the slave node and back. The actual distance is the one-way distance. Finally, multiplying the one-way flight time by the speed of light constant, and applying the physical relationship that distance equals speed multiplied by time, calculates the actual spatial distance between the master and slave nodes.

[0065] In some embodiments, the buzzer module has multi-tone and multi-rhythm sound generation capabilities, enabling it to emit differentiated sound prompts based on different ranging states. The buzzer module integrates a programmable audio generator, supporting adjustments to the buzzer frequency and interval rhythm to achieve switching between various sound modes such as warning sounds and prompt sounds.

[0066] In some embodiments, the control program predefines the identity identifiers of each UWB module, designating one module as the master node and the other two modules as slave nodes A and B, respectively. The master node establishes bidirectional communication links with slave nodes A and B via the UWB communication protocol, and calculates the distances between the master node and slave node A, and between the master node and slave node B, respectively, according to the ranging method of this application. After calculating the two distance values, the master node sends these two distance data to slave nodes A and B via UWB signals, respectively, enabling each slave node to obtain complete distance information. The control program further calculates the distances between the master node and slave node A, the distances between the master node and slave node B, and the difference between the two distances, comparing each calculated distance value and difference value with pre-set distance thresholds and difference thresholds, respectively. When any distance value exceeds the corresponding distance threshold, or the distance difference exceeds the difference threshold, it is determined that the ranging result does not meet the set requirements, and the control program sends an alarm command to the buzzer module. Upon receiving the command, the buzzer module emits an alarm sound with a specific frequency and rhythm. When all distance values ​​do not exceed the distance threshold and the distance difference does not exceed the difference threshold, the ranging result is determined to meet the set requirements. The control program sends a qualified instruction to the buzzer module, and the buzzer module emits a qualified prompt sound that is different from the alarm sound.

[0067] In some embodiments, the master node, slave node A, and slave node B are each configured with an OLED display. The master node's OLED display shows the distance between the master node and slave node A, as well as the distance between the master node and slave node B, in real time. After receiving the distance data sent by the master node, the OLED displays of slave nodes A and B synchronously display the distance information between the master node and each slave node, realizing real-time visualization of the ranging results across multiple nodes.

[0068] In some embodiments, when the line-of-sight distance between the master node and slave node A, or between the master node and slave node B, exceeds a preset distance threshold, or the difference between the two line-of-sight distances exceeds a preset difference threshold, the control program determines that the current measurement state is unqualified and sends an alarm control signal to the buzzer module. The buzzer module responds to the signal by emitting a high-frequency or fast-paced unqualified alarm sound to remind the measurement personnel that the current position deviation is too large. When the measurement personnel adjust their position according to the sound prompts, so that the line-of-sight distance between the master node and each slave node, as well as the line-of-sight distance difference, is not greater than their respective specified thresholds, the control program determines that the measurement state has returned to qualified status and sends a qualified control signal to the buzzer module. The buzzer module switches to emitting a low-frequency or soothing qualified prompt sound, indicating to the measurement personnel that the current position meets the accuracy requirements.

[0069] The following are embodiments of the apparatus of this application, which can be used to execute the embodiments of the method of this application. For details not disclosed in the embodiments of the apparatus of this application, please refer to the embodiments of the method of this application.

[0070] Please see Figure 2 This illustration shows a schematic diagram of a real-time distance measuring device based on UWB technology during a leveling process, provided in an exemplary embodiment of this application. This device can be implemented entirely or partially through software, hardware, or a combination of both. The real-time distance measuring device based on UWB technology during a leveling process includes: The response startup module is used to respond to the ranging command input by the user and determine the target confidence threshold according to the ranging accuracy requirements in the ranging command; The initialization module is used to obtain the ranging environment parameters between the master node and each slave node, and determine the initial cumulative confidence based on the environment type corresponding to the ranging environment parameters; The data acquisition module is used to collect discrete ranging data between the master node and multiple slave nodes within a continuous sampling period, and to calculate discrete characteristic indices in the discrete ranging data. The confidence accumulation module is used to convert discrete feature indicators into confidence increment values ​​according to a preset mapping rule table, and accumulate the confidence increment values ​​into the initial cumulative confidence to obtain the target cumulative confidence corresponding to different sampling periods; The data processing module is used to filter out the discrete ranging data of the target from the start time of measurement to the current sampling period when the cumulative confidence of the target is greater than the target confidence threshold, and combine the discrete ranging data of the target into a ranging solution sequence. The output module is used to calculate the distance measurement sequence using the UWB distance calculation formula to obtain the distance measurement values ​​between the master node and each slave node.

[0071] This application also provides a computer storage medium that can store multiple instructions. The instructions are adapted to be loaded and executed by a processor using a real-time ranging method based on UWB technology in the leveling process described above. For details of the execution process, please refer to the specific description of the embodiments, which will not be repeated here.

[0072] Please see Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the electronic device 300 may include: at least one processor 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.

[0073] The communication bus 302 is used to enable communication between these components.

[0074] The user interface 303 may include a display screen and a camera.

[0075] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0076] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of digital signal processing, field-programmable gate array, or programmable logic array. The processor 301 may integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0077] The memory 305 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 305 may include a non-transitory computer-readable medium. The memory 305 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a real-time distance measurement method based on UWB technology during leveling.

[0078] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call the application program stored in the memory 305 for a real-time distance measurement method based on UWB technology in the leveling process. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.

[0079] An electronic device readable storage medium stores instructions that, when executed by one or more processors, cause the electronic device to perform one or more methods as described in the above embodiments.

[0080] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0081] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.

[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0085] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0086] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and practical application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.

Claims

1. A real-time distance measurement method based on UWB technology in leveling surveying, characterized in that, Applied to a real-time ranging system, the real-time ranging system including a master node and multiple connected slave nodes, the method includes: In response to a ranging command input by the user, a target confidence threshold is determined based on the ranging accuracy requirement in the ranging command; Obtain the ranging environment parameters between the master node and each of the slave nodes, and determine the initial cumulative confidence level based on the environment type corresponding to the ranging environment parameters; During a continuous sampling period, discrete ranging data between the master node and multiple slave nodes are collected, and discrete feature indices in the discrete ranging data are calculated. The discrete feature index is converted into a confidence increment value according to a preset mapping rule table, and the confidence increment value is added to the initial cumulative confidence level to obtain the target cumulative confidence level corresponding to different sampling periods. When the cumulative confidence of the target is greater than the target confidence threshold, the discrete ranging data of the target is selected from multiple discrete ranging data from the start time of measurement to the current sampling period, and the discrete ranging data of the target is combined into a ranging solution sequence. The distance calculation sequence is calculated using the UWB distance calculation formula to obtain the distance values ​​between the master node and each of the slave nodes.

2. The method according to claim 1, characterized in that, The step of obtaining ranging environment parameters between the master node and each of the slave nodes, and determining the initial cumulative confidence score based on the environment type corresponding to the ranging environment parameters, includes: The signal-to-noise ratio between the master node and each of the slave nodes is obtained as a ranging environment parameter. The ranging environment parameters are compared with a preset environment classification threshold to determine the environment type of the current ranging environment. The environment type includes line-of-sight environment and non-line-of-sight environment. Based on a preset environment-confidence comparison table, the environment type corresponding to the ranging environment parameter is determined to establish the initial cumulative confidence level. The initial cumulative confidence level corresponding to the line-of-sight environment is greater than that corresponding to the non-line-of-sight environment.

3. The method according to claim 1, characterized in that, The calculation of discrete feature indices in the discrete ranging data includes: Calculate the arithmetic mean of all discrete ranging data collected from the start of the measurement to the previous sampling period, and use it as the historical reference mean. Calculate the absolute difference between the discrete ranging data collected in the current sampling period and the historical reference mean, and determine the absolute difference as a discrete feature index; wherein, the value of the discrete feature index is negatively correlated with the confidence increment value.

4. The method according to claim 1, characterized in that, Target discrete ranging data is selected from multiple discrete ranging data points from the start of the measurement to the current sampling period, including: Data density statistics are performed on multiple discrete ranging data from the start of the measurement to the current sampling period to obtain the interval data density corresponding to each discrete ranging data. Discrete ranging data with a density greater than a preset density threshold in the specified interval are identified as target discrete ranging data.

5. The method according to claim 1, characterized in that, Before selecting the target discrete ranging data from multiple discrete ranging data from the measurement start time to the current sampling period when the target cumulative confidence level is greater than the target confidence threshold, the method further includes: If the target cumulative confidence level is less than or equal to the target confidence threshold, then calculate the difference between the target confidence threshold and the target cumulative confidence level. The time window of the sampling period is adjusted based on the difference.

6. The method according to claim 1, characterized in that, The step of calculating the distance between the master node and each of the slave nodes using the UWB distance calculation formula includes: The optimal dataset for each slave node is extracted from the ranging solution sequence, and the optimal dataset includes the timestamp between each slave node and the master node; Substituting each timestamp into the UWB distance calculation formula, the distance between the master node and each of the slave nodes is obtained.

7. The method according to claim 6, characterized in that, The formula for calculating the UWB distance is: ; Where d is the ranging value, and The timestamps for sending and receiving data from the slave node. and is the timestamp for the master node's transmission and reception, and c is the speed of light.

8. A real-time distance measuring device based on UWB technology for leveling surveys, characterized in that, The device includes: The response startup module is used to respond to the ranging command input by the user and determine the target confidence threshold according to the ranging accuracy requirement in the ranging command; An initialization module is used to obtain ranging environment parameters between the master node and each of the slave nodes, and to determine the initial cumulative confidence level according to the environment type corresponding to the ranging environment parameters; The data acquisition module is used to acquire discrete ranging data between the master node and multiple slave nodes within a continuous sampling period, and to calculate discrete feature indices in the discrete ranging data. The confidence accumulation module is used to convert the discrete feature index into a confidence increment value according to a preset mapping rule table, and accumulate the confidence increment value into the initial cumulative confidence to obtain the target cumulative confidence corresponding to different sampling periods; The data processing module is used to filter out the target discrete ranging data from multiple discrete ranging data from the start time of measurement to the current sampling period when the cumulative confidence of the target is greater than the target confidence threshold, and combine the target discrete ranging data into a ranging solution sequence. The output module is used to calculate the distance calculation sequence using the UWB distance calculation formula to obtain the distance values ​​between the master node and each of the slave nodes.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The device includes a processor, a memory, and a transceiver, wherein the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1 to 7.