Dynamic label coordinate solution method, device, equipment and medium

The dynamic tag coordinate calculation method addresses the issue of coordinate errors in UWB positioning systems by filtering data from base stations, ensuring consistent and reliable processing, thus enhancing the accuracy and stability of tag position calculations.

CN119052918BActive Publication Date: 2025-03-18SHANGHAI SHANYUAN ELECTRONICS SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411183871.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-03-18
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

UWB positioning systems face challenges in achieving precise location calculations due to tag position coordinate errors and fluctuations caused by dynamic environments, leading to inconsistent data processing across different data protocols and algorithms.

Method used

A dynamic tag coordinate calculation method that involves receiving data from base stations, filtering out anomalies using defined algorithms, and calculating the tag's position based on valid data, ensuring consistent and reliable data processing.

Benefits of technology

The method enhances the accuracy and stability of tag position calculations by filtering out exceptional data and maintaining data consistency across different protocols and algorithms, improving the reliability of positioning systems in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119052918B_ABST
    Figure CN119052918B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and medium for solving the coordinates of a dynamic tag, which are applied to a host computer, and include: S101: receiving data information from a base station, wherein a reader is provided on opposite sides of the base station, and the data information includes an identification code of the base station, an identification code of the positioning tag, an identification code of the reader, ranging data and a corresponding timestamp; S102: screening the ranging data according to a set time interval to obtain valid ranging data; S103: filtering the valid ranging data to obtain filtered data; S104: calculating the coordinates of the positioning tag according to the filtered data and the coordinates of the reader. The present invention proposes a coordinate solution after ranging by a single base station, which eliminates abnormal values ​​and jump values ​​in a dynamic environment through an effective data screening and abnormal filtering mechanism, thereby improving the accuracy of ranging data and the accuracy of coordinates in dynamic scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of UWB positioning technology, and in particular to a method, device, equipment and medium for solving dynamic tag coordinates. Background Art

[0002] The UWB (Ultra-Wideband) positioning system consists of hardware positioning equipment, positioning algorithms and servers. It mainly uses algorithms such as TDOA and TWR to achieve positioning and ranging. Through the positioning base station and server solution, it can realize functions such as real-time display of personnel location, historical track playback, personnel attendance, electronic fences, behavior analysis, multi-card identification, and intelligent inspection. In order to achieve precise positioning, the UWB positioning system generally needs to deploy base stations in the positioning area and wear tags for personnel or equipment. Through the communication between the tag and a single or multiple base stations, the positioning system can calculate the distance between the tag and the base station, and then determine the location of the tag (that is, the person or equipment carrying the tag) through the algorithm.

[0003] Although the ranging algorithm used for traditional base station positioning is known, the coordinate calculation algorithm corresponding to the server is not unified through different data protocols. In addition, in actual use, the tag is always in a dynamic state. Due to the influence of environmental factors, the positioning accuracy will deviate and fluctuate. The conventional calculation and calculation of coordinates will definitely lead to deviation of the tag coordinate position. It is necessary to introduce a better solution algorithm and add a filtering algorithm to ensure data smoothness.

[0004] Therefore, it is necessary to propose a dynamic tag coordinate solution method, device, equipment and medium to solve the above problems. Summary of the invention

[0005] The object of the present invention is to provide a dynamic tag coordinate solution method, device, equipment and medium, so as to improve the problem of deviation in tag coordinate position calculation caused by deviation and fluctuation in tag positioning.

[0006] In a first aspect, the present invention provides a method for solving dynamic tag coordinates, which is applied to a host computer and comprises:

[0007] S101: receiving data information from the base station, wherein a reader is disposed on two opposite sides of the base station, respectively, and the data information includes an identification code of the base station, an identification code of the positioning tag, an identification code of the reader, ranging data, and a corresponding timestamp;

[0008] S102: Screening the distance measurement data according to a set time interval to obtain valid distance measurement data;

[0009] S103: Filtering the effective ranging data to obtain filtered data;

[0010] S104: Calculate the coordinates of the positioning tag according to the filtered data and the coordinates of the reader.

[0011] In a possible embodiment, filtering the valid ranging data includes: filtering each valid ranging value using a first filtering algorithm, where the first filtering algorithm includes:

[0012] If the change value of the effective ranging value within the set time range is greater than the set change value, the count of the abnormal data counter is increased by 1. When the count value of the abnormal data counter exceeds the set data value, the filtered value list is cleared, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0;

[0013] If the change value of the effective ranging value within the set time range is less than or equal to the set change value, the effective ranging value is stored in the filtered value list, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-sided reading counter are all reset to 0.

[0014] In a possible embodiment, filtering the valid ranging data includes: filtering the valid ranging value corresponding to each target moment within the set time interval using a second filtering algorithm, wherein the second filtering algorithm includes:

[0015] If the positioning tag has only one valid ranging value of the reader at the target time, determine the direction of the positioning tag at the target time according to the reader corresponding to the valid ranging value at the target time;

[0016] If the filtered value list is empty, storing the effective distance measurement value at the target time into the filtered value list;

[0017] If the filtered value list is not empty, determining whether the positioning tag is located in the base station at the target time;

[0018] If it is not located in the base station, obtain the valid ranging value added most recently in the filtered value list, determine whether the reader corresponding to the valid ranging value added most recently is consistent with the reader corresponding to the valid ranging value at the target time, and if they are consistent, use the first filtering algorithm to filter the valid ranging value at the target time; if they are inconsistent, add 1 to the count value of the abnormal type counter, and when the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter to 0;

[0019] If it is located within the base station, add 1 to the count value of the single-sided reading counter. When the count value of the single-sided reading counter is greater than the set reading value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-sided reading counter to 0.

[0020] In a possible embodiment, the second filtering algorithm further includes:

[0021] If the positioning tag has valid ranging values ​​of two readers at the target time, and at least one of the two valid ranging values ​​at the target time is greater than the distance between the two readers, then the positioning tag is outside the base station at the target time;

[0022] Obtaining the smallest effective ranging value among the effective ranging values ​​of the two readers, and determining the direction of the positioning tag at the target time according to the reader corresponding to the smallest effective ranging value;

[0023] Determine whether the identifier of the positioning tag at the target time is an identifier within the base station;

[0024] If it is the base station internal identifier, the count value of the base station exit counter is increased by 1. When the count value of the base station exit counter is greater than 1, the identifier of the positioning tag target time is adjusted to the base station external identifier, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-side reading counter are all reset to 0;

[0025] If it is not the identifier within the base station, obtain the most recently added valid ranging value in the filtered value list, and determine whether the reader corresponding to the most recently added valid ranging value is consistent with the reader corresponding to the minimum valid ranging value. If they are consistent, use the first filtering algorithm to filter the minimum valid ranging value; if they are inconsistent, add 1 to the count value of the abnormal type counter. When the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-sided reading counter to 0.

[0026] In a possible embodiment, the second filtering algorithm further includes:

[0027] If the positioning tag has valid ranging values ​​of the two readers at the target time, and the two valid ranging values ​​at the target time are both smaller than the distance between the two readers, then the positioning tag is located in the base station at the target time;

[0028] Determine whether the identifier of the positioning tag at the target time is an identifier within the base station;

[0029] If it is the base station internal identifier, the two valid ranging values ​​at the target time are stored in the filtered value list;

[0030] If it is not the identifier within the base station, the count value of the base station entry counter is increased by 1. When the count value of the base station entry counter is greater than 1, the identifier of the positioning tag target moment is adjusted to the base station internal identifier, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-sided reading counter are all reset to 0.

[0031] In a possible embodiment, the value range of the set time range and the set time interval are both 0.8 seconds to 1.2 seconds.

[0032] In a possible embodiment, step S104 includes:

[0033] If the filtered data corresponds to one of the readers, the positioning tag is close to the corresponding reader, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the corresponding reader;

[0034] If the filtered data corresponds to two of the readers and at least one of the filtered data is greater than the spacing between the two readers, the positioning tag is located outside the base station and close to the reader corresponding to the minimum value in the filtered data, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the two readers;

[0035] If the filtered data corresponds to two readers and the filtered data is smaller than the distance between the two readers, the positioning tag is located in the base station, and the middle value of the coordinates of the two readers is calculated to obtain the coordinates of the positioning tag.

[0036] In the second aspect, an embodiment of the present invention further provides a dynamic tag coordinate solution device, which includes a module / unit that executes any possible design method of the first aspect above. These modules / units can be implemented by hardware, or by hardware executing corresponding software implementations.

[0037] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the electronic device can implement any possible design method of the first aspect.

[0038] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium comprising a computer program, and when the computer program runs on an electronic device, the electronic device executes any possible design method of the first aspect above.

[0039] In a fifth aspect, an embodiment of the present invention further provides a method comprising a computer program product, which, when running on an electronic device, enables the electronic device to execute any possible design of any of the above aspects.

[0040] The beneficial effects of the present invention are as follows: a coordinate solution after single base station ranging is proposed, and the differences between different protocols and algorithms are bridged through unified screening, filtering and calculation steps, ensuring the consistency and reliability of data processing. Through effective data screening and abnormal filtering mechanisms, abnormal values ​​and jump values ​​in dynamic environments are eliminated, improving the accuracy of ranging data and coordinate accuracy in dynamic scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of the flow chart of the dynamic label coordinate solution method of the present invention.

[0042] Figure 2 The figure is a flow chart of a dynamic tag coordinate solution method in a specific embodiment of the present invention.

[0043] Figure 3 It is a schematic diagram of the dynamic label coordinate solving device of the present invention.

[0044] Figure 4 It is a schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In view of the problems existing in the above-mentioned technologies, an embodiment of the present invention provides a method for solving the coordinates of a dynamic tag, which is applied to a host computer. Figure 1 , the method comprising:

[0047] S101: Receive data information from a base station, wherein a reader is provided on two opposite sides of the base station, the two opposite sides being the left side and the right side or the front side and the rear side, and the data information includes an identification code of the base station, an identification code of the positioning tag, an identification code of the reader, ranging data and a corresponding timestamp.

[0048] S102: Screening the distance measurement data according to a set time interval to obtain valid distance measurement data.

[0049] S103: Filter the valid ranging data to obtain filtered data.

[0050] S104: Calculate the coordinates of the positioning tag based on the filtered data and the coordinates of the reader.

[0051] In this embodiment, the ranging data is screened at a set time interval to obtain valid ranging data. The main purpose is to remove outdated data and retain only the latest and most effective ranging data, thereby reducing the complexity of data processing and unnecessary calculations. The valid ranging data is filtered to remove abnormal values ​​and jump values ​​to obtain filtered data, thereby improving positioning accuracy and stability. This dynamic tag coordinate solution method effectively solves the positioning accuracy and stability problems through a series of steps and logics, realizes unified data processing and efficient positioning solution, and is suitable for dynamic environment positioning needs in practical applications.

[0052] In a specific embodiment, filtering the effective ranging data includes: filtering each effective ranging value using a first filtering algorithm, the first filtering algorithm includes: if there is a change value of the effective ranging value within a set time range that is greater than the set change value, then adding 1 to the count of the abnormal data counter, when the count value of the abnormal data counter exceeds the set data value, clearing the filtered value list, and resetting the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter to 0. If there is a change value of the effective ranging value within the set time range that is less than or equal to the set change value, the effective ranging value is stored in the filtered value list, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0.

[0053] Specifically, the filtered value list is a first-in-first-out queue for storing the filtered valid ranging values, the abnormal data counter is used to record the number of abnormal changes in the valid ranging values, the abnormal type counter is used to record the number of data anomalies that jump to different readers, the base station exit counter is used to record the number of times the positioning tag moves from inside the base station to outside the base station, the base station entry counter is used to record the number of times the positioning tag moves from outside the base station to inside the base station, and the single-sided reading counter is used to record the number of times the positioning tag is measured by the same reader.

[0054] In a preferred embodiment, the range of the set time range and the set time interval are both 0.8 seconds to 1.2 seconds, preferably, the set time range is 1 second. Further, the set change value range is 1.7-2.3 meters, and the set data value is 2.

[0055] In this embodiment, if the time range is set to 1 second, the change value is set to 2 meters, and the change value of the effective distance measurement value can be understood as the difference between the effective distance measurement value at the target moment and the effective distance measurement value at the moment 1 second before the target moment, the change value of the effective distance measurement value is greater than 2 meters, the mobile change is large, and it is judged as abnormal data and filtered out. By monitoring the change amount of the distance measurement value, the abnormal data with large fluctuations is identified and eliminated in real time, reducing the influence of environmental interference and measurement error on positioning accuracy. When it is detected that the change of the effective distance measurement value is too large (i.e. abnormal) and accumulates to a certain extent (exceeding the set data value), the system will clear the filtered value list and reset all related counters. This mechanism helps to prevent system performance degradation or errors caused by continuous abnormal data accumulation. When the change of the effective distance measurement value is less than or equal to the set change value within the set time range, the system regards it as normal data and stores it in the filtered value list. At the same time, all related counters are reset, indicating that no abnormality occurs at present. This processing method ensures that normal data can be retained and used for subsequent analysis. The data in the filtered value list is screened and verified, and has high stability and reliability. These data can be used for subsequent positioning, tracking or other applications, thereby improving the data processing efficiency and accuracy of the entire system.

[0056] In a specific embodiment, the effective ranging data is filtered, including: using a second filtering algorithm to filter the effective ranging value corresponding to each target moment within a set time interval, the second filtering algorithm includes: if the positioning tag has only one effective ranging value of a reader at the target moment, according to the reader corresponding to the effective ranging value at the target moment, determine the direction of the positioning tag at the target moment. If the filtered value list is empty, store the effective ranging value at the target moment in the filtered value list. If the filtered value list is not empty, determine whether the positioning tag is located in the base station at the target moment. If it is not located in the base station, obtain the latest effective ranging value added in the filtered value list, determine whether the reader corresponding to the latest effective ranging value is consistent with the reader corresponding to the effective ranging value at the target moment, and if they are consistent, use the first filtering algorithm to filter the effective ranging value at the target moment. If they are inconsistent, the count value of the abnormal type counter is increased by 1. When the count value of the abnormal type counter exceeds the set type value, the filtered value list is cleared, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-side reading counter are all reset to 0. If it is located in the base station, the count value of the single-side reading counter is increased by 1. When the count value of the single-side reading counter is greater than the set reading value, the filtered value list is cleared, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-side reading counter are all reset to 0. Specifically, the set type value and the set reading value are 2.

[0057] In this embodiment, each valid ranging value at the target time is screened using the second filtering algorithm, which can ensure that only data that meets certain conditions is retained. This helps to reduce abnormal data caused by environmental factors, equipment failure or interference, thereby improving the accuracy of positioning. When there is only one ranging value, the direction is determined directly according to the reader. When the filtered value list is empty, the current valid ranging value is directly stored. When the filtered value list is not empty, the data in different situations is processed by further judgment and filtering to ensure the accuracy and stability of the data. When the positioning tag is not located in the base station, by comparing whether the reader corresponding to the latest added valid ranging value is consistent with the reader at the target time, it can be detected whether the data is abnormal. If the readers are different, it is considered to be abnormal data jumping from one side to the other side, the count value of the abnormal type counter will increase, and the relevant counter will be reset when the set threshold is exceeded, which helps to quickly identify and deal with abnormal data. When the positioning tag is located in the base station, if data is continuously obtained from the reader on the same side, the count value of the single-side reading counter will increase. When the set reading value is exceeded, the filtered value list will be cleared and the relevant counter will be reset. Multiple counters (abnormal data counter, abnormal type counter, base station exit counter, base station entry counter, single-side reading counter) are used to track and manage different types of events and states, providing strong support for system monitoring, debugging and optimization.

[0058] In a preferred embodiment, the second filtering algorithm also includes: if the positioning tag has valid ranging values ​​of two readers at the target time, and at least one of the two valid ranging values ​​at the target time is greater than the distance between the two readers, then the positioning tag is located outside the base station at the target time. The smallest effective ranging value among the effective ranging values ​​of the two readers is obtained, and the direction of the positioning tag at the target time is determined according to the reader corresponding to the smallest effective ranging value. It is determined whether the identification of the positioning tag at the target time is an identification inside the base station. If it is an identification inside the base station, the count value of the outgoing base station counter is increased by 1. When the count value of the outgoing base station counter is greater than 1, the identification of the positioning tag at the target time is adjusted to an identification outside the base station, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0. If it is not an internal identifier of the base station, obtain the latest valid ranging value added in the filtered value list, and determine whether the reader corresponding to the latest valid ranging value is consistent with the reader corresponding to the minimum valid ranging value. If they are consistent, use the first filtering algorithm to filter the minimum valid ranging value. If they are inconsistent, add 1 to the count value of the abnormal type counter. When the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter to 0.

[0059] In this embodiment, when it is detected that at least one of the two valid ranging values ​​is greater than the reader spacing, it is determined that the positioning tag is outside the base station. When the positioning tag moves from inside the base station to outside the base station, by setting the base station counter, the state change of the positioning tag can be accurately and reliably tracked. When the positioning tag is inside the base station, the data is further filtered by checking whether the reader corresponding to the valid ranging value newly added to the filtered value list is consistent with the reader corresponding to the current minimum valid ranging value. When abnormal data is detected, the exception handling mechanism is triggered to filter out abnormal data that jumps from one side to the other, thereby improving the reliability and stability of the data. When the count value of the abnormal type counter exceeds the set type value, the system clears the filtered value list and resets all related counters. This mechanism helps to quickly respond to and restore the system status, and prevents the accumulation of abnormal data from causing system performance degradation.

[0060] In one embodiment, the second filtering algorithm also includes: if the positioning tag has valid ranging values ​​of two readers at the target time, and the two valid ranging values ​​at the target time are both less than the distance between the two readers, then the positioning tag is located in the base station at the target time. Determine whether the identification of the positioning tag at the target time is an identification within the base station. If it is an identification within the base station, the two valid ranging values ​​at the target time are stored in the filtered value list. If it is not an identification within the base station, the count value of the base station counter is increased by 1. When the count value of the base station counter is greater than 1, the identification of the positioning tag at the target time is adjusted to the base station identification, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station counter, the count value of the base station counter, and the count value of the single-side reading counter are all reset to 0.

[0061] In this embodiment, when the valid ranging values ​​obtained by the positioning tag from the two readers at the target time are all less than the distance between the two readers, it is judged that the positioning tag is located inside the base station. After judging that the positioning tag is inside the base station, the identification of the positioning tag will be checked. If the identification of the positioning tag is an identification inside the base station, it means that the position of the tag is correctly identified, and the two valid ranging values ​​are stored in the filtered value list. If the identification of the positioning tag is not an identification inside the base station, the identification of the positioning tag will not be adjusted immediately, but the number of times entering the base station will be counted by a base station entry counter. Only when the count value of the base station entry counter is greater than 1, the state identification of the tag will be adjusted to the base station internal identification. This design increases the stability of the state update, which can avoid the wrong adjustment of the identification due to short-term anomalies and ensure the continuity and stability of positioning. The entire processing logic takes into account a variety of possible situations and anomalies, and improves the robustness and stability of the system through reasonable judgment and processing mechanisms. Even if errors or anomalies occur in some cases, the system can resume normal operation through gradual state updates and data resets.

[0062] In another embodiment, step S104 includes: if the filtered data corresponds to one reader, the positioning tag is close to the corresponding one reader, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the corresponding one reader. If the filtered data corresponds to two readers and at least one of the filtered data is greater than the spacing between the two readers, the positioning tag is located outside the base station and close to the reader corresponding to the minimum value in the filtered data, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the two readers. If the filtered data corresponds to two readers and the filtered data is less than the spacing between the two readers, the positioning tag is located inside the base station, and the middle value of the coordinates of the two readers is calculated to obtain the coordinates of the positioning tag.

[0063] In this embodiment, a one-dimensional positioning algorithm is adopted, and the base station is composed of two readers, and the distance between the two readers is about 2 to 3 meters. If the positioning tag is read by only one reader, the positioning tag must be on the side of this reader. If it is read by two readers, it is necessary to compare the distance measurement of the two readers. When the distance measurement is less than the distance between the two readers, it is considered that the positioning tag is in the middle of the two readers. If both distance measurements are greater than the distance between the readers, the data with a short distance is taken out, and the positioning tag is on the side of the reader with a short distance. Therefore, after the base station pushes, the host computer service needs to wait for comparison, because each reader data is pushed in a separate data packet through the UDP protocol. The data packets of different readers are separated, and it is necessary to wait to determine whether they are read by two readers at the same time, so as to determine the direction of the positioning tag. When the direction of the positioning tag is known, the coordinates of the positioning tag can be calculated using the algorithm. The coordinates of the two readers of a single base station are known, and the coordinates of the two readers determine a straight line. The distance from this point of the positioning tag to a certain reader is known, and the coordinates of the positioning tag can be calculated by calculation.

[0064] See also Figure 2 , the implementation process of the dynamic label coordinate solution method of the present invention is explained below in conjunction with specific embodiments.

[0065] Prepare equipment: Host computer: for example, computer (Windows system)

[0066] Positioning base station: 1. Communicate with tags via UWB; 2. Calculate distance information; 3. Send distance information to the host computer via the serial port.

[0067] Positioning tag: 1. Communicate with base station via UWB.

[0068] Host computer software: 1. Software running on the host computer, which can communicate with the base station through the serial port; 2. Obtain ranging information; 3. Filter algorithm; 4. Solve coordinates.

[0069] Implementation process:

[0070] 1. Place the base station and tag at the designated location, enter the coordinates of the two readers of the base station and the left and right directions of the readers in the host computer system, and create an object for the positioning tag.

[0071] 2. The staff carries the positioning tag and walks a certain distance near the base station.

[0072] 3. The host computer receives data information in real time. Because it is a dual-reader base station, the positioning tag will be read by two readers at the same time at any position near the base station. Therefore, it is necessary to determine the specific direction of the tag and cache the ranging pushed by the base station each time into the tagRanges list of the positioning tag object tag, and store the base station, ranging and timestamp.

[0073] 4. The scheduled task is executed every second, and the valid ranging data is taken from the tagRanges of the positioning tag object tag, including: the current time minus the time in the queue, and only the data within one second is taken as the valid ranging data to obtain a list of valid ranging data.

[0074] 5. Then filter and traverse the valid ranging data list, and store the filtered data in the filtered value list observations. The first list is empty and stored normally. Subsequent storage requires additional filtering logic.

[0075] Filtering logic 1: Based on the personnel's step frequency, as long as the type remains unchanged, filter out large abnormal data exceeding 2m per second. Each time errorDataCount is increased by 1, if it is normal data, errorDataCount, errorTypeCount, outCount, inCount, oneTypeCount are reset to 0; when errorDataCount>2, observations are cleared, errorDataCount, errorTypeCount, outCount, inCount, oneTypeCount are reset to 0 and statistics are restarted.

[0076] Filter logic 2: Determine the data in the list. If there is only one ranging measurement, the direction can be directly determined. If observations is empty, store it normally. Determine whether the tag is marked in the base station. If it is not in the base station, take out the last data of observations and compare the reader ID of the last data with the reader ID of this data. If the readers are the same, first determine the filter logic 1. If normal, it is considered to be valid data and stored in observations normally. Reset errorDataCount, errorTypeCount, outCount, inCount, and oneTypeCount to 0. If the readers are different, it is considered to be abnormal data jumping from one side to the other. Add errorTypeCount+1 and filter directly. When errorTypeCount is greater than 2, clear observations, reset errorDataCount, errorTypeCount, outCount, inCount, and oneTypeCount to 0 and restart counting. If it is in the base station, do not process the data of a ranging measurement. Add oneTypeCount+1. When it is greater than 2, clear observations, reset errorDataCount, errorTypeCount, outCount, inCount, and oneTypeCount to 0 and restart counting.

[0077] If there are two ranging, when the ranging has data greater than the head spacing, it is considered to be outside the base station, take out the shortest distance value, and determine whether there is an entry into the base station mark in. If there is, it is considered to be walking out of the base station from inside the base station, and give outCount+1. When outCount is greater than 1, it is considered to be out of the base station. Change the mark to outside the base station out, clear observations, take out the minimum ranging value in the list and consider it to be the most valid data, reset errorDataCount, errorTypeCount, outCount, inCount, oneTypeCount to 0 and start counting again. If it is not inside the base station, take out the last data of observations, get its head ID, and compare it with the head of this data. If it is the same as the last head, first judge the filtering logic 1. If it is normal, it is considered to be valid data and stored in observations normally. Reset errorDataCount, errorTypeCount, outCount, inCount, oneTypeCount to 0. If the heads are different, it is considered to be abnormal data jumping from one side to the other side, give errorTypeCount+1, and filter directly. When errorTypeCount is greater than 2, clear observations and reset errorDataCount, errorTypeCount, outCount, inCount, and oneTypeCount to 0 and restart counting.

[0078] If both distance measurements are less than the reader spacing, it is considered to be inside the base station. Check whether there is an entry into the base station mark in. If there is a mark, store the data normally. If there is no mark, it is considered to have just entered and inCount+1 is added. When inCount is greater than 1, it is considered to have truly entered the base station. Change the mark to inside the base station in, clear observations, take out the minimum distance measurement value in the list and consider it to be the most valid data, reset errorDataCount, errorTypeCount, outCount, inCount, oneTypeCount to 0 and restart counting.

[0079] 6. If the scheduled task per second can obtain a distance measurement value through the final filtering, the coordinates of the positioning tag can be calculated.

[0080] 7. If the coordinates of the two readers are known, the distance of the tag from the reader and the side of the reader, the coordinates of the positioning tag can be calculated. If it is inside the base station, the coordinates are calculated as the middle value of the two reader coordinates.

[0081] In addition, the present invention also proposes a dynamic label coordinate solution device, which is applied to the host computer, see Figure 3 The device includes: an acquisition unit 301, which is used to receive data information from a base station, the data information includes an identification code of the base station, an identification code of a positioning tag, ranging data, and a corresponding timestamp; a screening unit 302, which is used to screen the ranging data according to a set time interval to obtain valid ranging data; a filtering unit 303, which is used to filter the valid ranging data, remove abnormal values ​​and jump values, and obtain filtered data values; a calculation unit 304, which is used to calculate the coordinates of the positioning tag according to the filtered data. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0082] In some other embodiments of the present invention, an electronic device is disclosed. Figure 4 , the electronic device may include: one or more processors 401; memory 402; display 403; one or more applications (not shown); and one or more computer programs 404, and the above components may be connected via one or more communication buses 405. The one or more computer programs 404 are stored in the above memory 402 and configured to be executed by the one or more processors 401, and the one or more computer programs 404 include instructions, which can be used to execute the following: Figure 1 and Figure 3 And each step in the corresponding embodiment.

[0083] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0084] Each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk, etc., various media that can store program codes.

[0086] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and changes can be made to these embodiments. However, it should be understood that such modifications and changes are within the scope and spirit of the present invention in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with ordinary skills in the field to which the present invention belongs. The words "including" and the like used herein mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

Claims

1. A method for calculating dynamic label coordinates, characterized in that: Applied to a host computer, the method includes: S101: receiving data information from a base station, wherein a reader is disposed on two opposite sides of the base station, and the data information includes an identification code of the base station, an identification code of the positioning tag, an identification code of the reader, ranging data, and a corresponding timestamp; S102: Screening the distance measurement data according to a set time interval to obtain valid distance measurement data; S103: Filtering the effective ranging data to obtain filtered data; S104: Calculating the coordinates of the positioning tag according to the filtered data and the coordinates of the reader; Filtering the valid ranging data includes: filtering each valid ranging value using a first filtering algorithm, wherein the first filtering algorithm includes: If the change value of the effective ranging value within the set time range is greater than the set change value, the count of the abnormal data counter is increased by 1. When the count value of the abnormal data counter exceeds the set data value, the filtered value list is cleared, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0; If the change value of the effective ranging value within the set time range is less than or equal to the set change value, the effective ranging value is stored in the filtered value list, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0; Filtering the effective ranging data includes: filtering the effective ranging values ​​corresponding to each target moment within the set time interval using a second filtering algorithm, wherein the second filtering algorithm includes: If the positioning tag has only one valid ranging value of the reader at the target time, determine the direction of the positioning tag at the target time according to the reader corresponding to the valid ranging value at the target time; If the filtered value list is empty, storing the effective distance measurement value at the target time into the filtered value list; If the filtered value list is not empty, determining whether the positioning tag is located in the base station at the target time; If it is not located in the base station, obtain the valid ranging value added most recently in the filtered value list, determine whether the reader corresponding to the valid ranging value added most recently is consistent with the reader corresponding to the valid ranging value at the target time, and if they are consistent, use the first filtering algorithm to filter the valid ranging value at the target time; if they are inconsistent, add 1 to the count value of the abnormal type counter, and when the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter to 0; If it is located within the base station, add 1 to the count value of the single-sided reading counter. When the count value of the single-sided reading counter is greater than the set reading value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-sided reading counter to 0.

2. The method according to claim 1, characterized in that The second filtering algorithm also includes: If the positioning tag has valid ranging values ​​of two readers at the target time, and at least one of the two valid ranging values ​​at the target time is greater than the distance between the two readers, then the positioning tag is outside the base station at the target time; Obtaining the smallest effective ranging value among the effective ranging values ​​of the two readers, and determining the direction of the positioning tag at the target time according to the reader corresponding to the smallest effective ranging value; Determine whether the identifier of the positioning tag at the target time is an identifier within the base station; If it is the base station internal identifier, the count value of the base station exit counter is increased by 1. When the count value of the base station exit counter is greater than 1, the identifier of the positioning tag target time is adjusted to the base station external identifier, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-side reading counter are all reset to 0; If it is not the identifier within the base station, obtain the most recently added valid ranging value in the filtered value list, and determine whether the reader corresponding to the most recently added valid ranging value is consistent with the reader corresponding to the minimum valid ranging value. If they are consistent, use the first filtering algorithm to filter the minimum valid ranging value; if they are inconsistent, add 1 to the count value of the abnormal type counter. When the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-sided reading counter to 0.

3. The method according to claim 2, characterized in that The second filtering algorithm also includes: If the positioning tag has valid ranging values ​​of the two readers at the target time, and the two valid ranging values ​​at the target time are both smaller than the distance between the two readers, then the positioning tag is located in the base station at the target time; Determine whether the identifier of the positioning tag at the target time is an identifier within the base station; If it is the base station internal identifier, the two valid ranging values ​​at the target time are stored in the filtered value list; If it is not the identifier within the base station, the count value of the base station entry counter is increased by 1. When the count value of the base station entry counter is greater than 1, the identifier of the positioning tag target moment is adjusted to the base station internal identifier, the filtered value list is cleared, the minimum value in the filtered value list is taken out and determined as the filtered value, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-sided reading counter are all reset to 0.

4. The method according to claim 1, characterized in that The value ranges of the set time range and the set time interval are both 0.8 seconds to 1.2 seconds.

5. The method according to any one of claims 1 to 4, characterized in that Step S104 includes: If the filtered data corresponds to one of the readers, the positioning tag is close to the corresponding reader, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the corresponding reader; If the filtered data corresponds to two of the readers and at least one of the filtered data is greater than the spacing between the two readers, the positioning tag is located outside the base station and close to the reader corresponding to the minimum value in the filtered data, and the coordinates of the positioning tag are calculated based on the filtered data and the coordinates of the two readers; If the filtered data corresponds to two readers and the filtered data is smaller than the distance between the two readers, the positioning tag is located in the base station, and the middle value of the coordinates of the two readers is calculated to obtain the coordinates of the positioning tag.

6. A dynamic label coordinate solving device, characterized in that: Applied to a host computer, the device comprises: An acquisition unit, used for receiving data information from a base station, wherein a reader is provided on two opposite sides of the base station, and the data information includes an identification code of the base station, an identification code of the positioning tag, ranging data and a corresponding timestamp; A screening unit, used to screen the distance measurement data according to a set time interval to obtain valid distance measurement data; A filtering unit, used for filtering the effective ranging data to obtain a filtered data value; A calculation unit, used to calculate the coordinates of the positioning tag according to the filtered data; The filtering unit filters the valid ranging data, specifically for: filtering each valid ranging value using a first filtering algorithm, wherein the first filtering algorithm includes: If the change value of the effective ranging value within the set time range is greater than the set change value, the count of the abnormal data counter is increased by 1. When the count value of the abnormal data counter exceeds the set data value, the filtered value list is cleared, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0; If the change value of the effective ranging value within the set time range is less than or equal to the set change value, the effective ranging value is stored in the filtered value list, and the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter are all reset to 0; The filtering unit filters the effective ranging data, specifically for: filtering the effective ranging value corresponding to each target moment within the set time interval using a second filtering algorithm, wherein the second filtering algorithm includes: If the positioning tag has only one valid ranging value of the reader at the target time, determine the direction of the positioning tag at the target time according to the reader corresponding to the valid ranging value at the target time; If the filtered value list is empty, storing the effective distance measurement value at the target time into the filtered value list; If the filtered value list is not empty, determining whether the positioning tag is located in the base station at the target time; If it is not located in the base station, obtain the valid ranging value added most recently in the filtered value list, determine whether the reader corresponding to the valid ranging value added most recently is consistent with the reader corresponding to the valid ranging value at the target time, and if they are consistent, use the first filtering algorithm to filter the valid ranging value at the target time; if they are inconsistent, add 1 to the count value of the abnormal type counter, and when the count value of the abnormal type counter exceeds the set type value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the outgoing base station counter, the count value of the incoming base station counter, and the count value of the single-side reading counter to 0; If it is located within the base station, add 1 to the count value of the single-sided reading counter. When the count value of the single-sided reading counter is greater than the set reading value, clear the filtered value list, and reset the count value of the abnormal data counter, the count value of the abnormal type counter, the count value of the base station exit counter, the count value of the base station entry counter, and the count value of the single-sided reading counter to 0.

7. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program; The processor is configured to execute the computer program stored in the memory so as to enable the electronic device to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Positioning method, device and system and storage medium

    CN114339608A