Dual-axis gimbal UHF-RFID tag inventory method and apparatus

CN122572473BActive Publication Date: 2026-11-03HUAQIAO UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611062440.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-11-03
Estimated Expiration
2046-07-17

AI Technical Summary

Technical Problem

现有RFID技术在仓储库存盘点中存在识别盲区和设备成本高的问题,人工盘点结果差异大,且对环境要求高,难以在复杂环境下实现高效准确的库存管理。

Method used

A dual-axis gimbal UHF-RFID tag inventory counting method is adopted. The dual-axis gimbal drives the UHF antenna for scanning and identification. Combined with edge data processing and IoT communication, invalid data upload is reduced. The ESP32 main control module and UHF-RFID read/write module are used for tag reading. Environmental monitoring is carried out in conjunction with temperature, humidity, light and infrared sensors. Data is transmitted using the MQTT protocol, and the front-end interface is developed using the Flask framework.

Benefits of technology

It expanded the identification coverage, reduced the upload of invalid data, improved the accuracy and efficiency of inventory counting, and enabled real-time monitoring of equipment status and digital information management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122572473B_ABST
    Figure CN122572473B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of inventory checking system, and more particularly to a dual-axis holder UHF-RFID tag inventory checking method and device thereof.The method comprises S1, terminal hardware basis: installing a scanning device with a dual-axis holder in a storage warehouse, attaching a UHF-RFID tag on the surface of an item to be stored, and driving the scanning device to scan the UHF-RFID tag;S2, hardware end embedded software design;using the MQTT protocol to realize data transmission between the terminal device and the server;S3, service end and front end software design;S4, system integration and result analysis.The present application drives the UHF antenna through the dual-axis holder, scans and identifies the items with UHF-RFID tags in the environment, and combines the edge data processing mechanism to reduce the number of invalid data uploads, and at the same time, the system combines the Internet of Things communication and the Web visual interface to realize device state monitoring and digital information management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inventory counting system technology, and in particular to a dual-axis gimbal UHF-RFID tag inventory counting method and apparatus. Background Technology

[0002] In recent years, with the continuous development of IoT and digital management technologies, the informatization level of warehouse management has reached a relatively high level. RFID technology has been widely used in the field of warehouse management, improving the automation level and inventory efficiency of warehouse operations. However, some problems still exist in practical applications. For example, fixed RFID antennas have limited coverage, easily leading to blind spots when items are densely packed or obstructed. While some mobile inventory devices can improve the identification range, they are expensive and have high environmental requirements, such as flat ground and the need for auxiliary positioning markers, which are not conducive to warehouse deployment. Currently, RFID mainly relies on manual PDAs for inventory counting, and the methods of manual counting vary from person to person, resulting in inconsistent results. Especially in complex environments, the accuracy of inventory counting is greatly affected by factors such as the manual counting route, speed, PDA scanning range, and duration. UHF-RFID (Ultra-High Frequency Radio Frequency Identification) technology has significant advantages in identification distance and reading speed, enabling the identification of multiple tags in a shorter time. Introducing UHF-RFID into warehouse inventory counting systems is being considered to improve counting distance and efficiency. Summary of the Invention

[0003] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description and other accompanying drawings.

[0004] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a dual-axis gimbal UHF-RFID tag inventory counting method and device. This method uses a dual-axis gimbal to drive a UHF antenna to scan and identify items with UHF-RFID tags in the environment. Combined with an edge data processing mechanism, it reduces the amount of invalid data uploaded. At the same time, the system combines IoT communication and a web visualization interface to realize equipment status monitoring and digital information management. This invention provides a method for inventory counting of dual-axis gimbal UHF-RFID tags, including: S1. Terminal hardware basics: Install a scanning device with a dual-axis gimbal in the storage warehouse, and attach UHF-RFID tags to the surface of the items to be stored. The scanning device is equipped with an ESP32 main control module, a UHF-RFID read / write module, a UHF antenna, a horizontal servo, a pitch servo, an RTC clock, and an infrared sensor. A combination of horizontal and vertical servos forms a dual-axis gimbal. A UHF antenna and a UHF-RFID reader / writer module are installed at the end of the dual-axis gimbal to achieve dual-axis rotation. The ESP32 main control module is connected to the UHF-RFID reader / writer module to read and write UHF-RFID tags on the surface of items to be stored. The UHF antenna is connected to the UHF-RFID reader / writer module to achieve signal gain. An RTC clock is used to record time and continuously add time markers when the network is disconnected. An infrared sensor is used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tags for storage. S2. Hardware-side embedded software design: After the scanning device is powered on, it initializes the hardware and bus. After initialization, it enters the main software loop. In the main loop, if the scanning device detects that someone is in the storage warehouse, it starts the UHF-RFID reading and writing module. The dual-axis pan-tilt unit decides whether to start rotating scanning according to the internal clock. All the generated telemetry data and time logs are encapsulated and pushed to the designated MQTT server node via the local area network. S3. Server and Front-end Software Design: The server is developed using Python and the Flask framework, with real-time message push implemented through SocketIO and SQLite as the database. The system transmits data obtained from the hardware terminal to the server via the MQTT protocol, and sets up an HTTP interface for front-end interface access, parameter configuration, and business queries. The front-end interface is built based on Flask templates and native JavaScript. S4. System Integration and Result Analysis: Build a basic server environment on the PC belonging to the storage warehouse, deploy MQTT communication middleware and server business programs, install scanning equipment in the storage warehouse, and place multiple items with UHF-RFID tags attached within the antenna coverage area to be put into storage. Send a dual-axis PTZ scanning command from the front-end page, wait for the scanning device to complete a full scanning cycle, and then check if the number of tags recorded on the front-end is correct. Carry item A, which is to be put into storage, into the storage warehouse. After waiting for 10 seconds, carry item A, which is to be put into storage, out of the storage warehouse again. After the action is completed, check whether the corresponding entry and exit record has been added to the database transaction table. At the same time, the record is dynamically synchronized in real time on the front-end page.

[0005] In some embodiments, in step S1, the scanning device is further provided with a temperature and humidity sensor for detecting the temperature and humidity in the warehouse, a light sensor for detecting the current light intensity, and a digital microphone for receiving and transmitting sound. The temperature and humidity sensor, the light sensor, and the digital microphone are all connected to the ESP32 main control module.

[0006] In some embodiments, during step S2, the scanning device is further equipped with a network management module. After the scanning device is powered on, it first reads the historical Wi-Fi credentials stored in the ESP32 main control module NVS and attempts to connect. When in a new environment or when the connection times out, the device will automatically enter offline AP mode and turn on the wireless hotspot and the device's built-in configuration webpage. After the device successfully establishes a Wi-Fi connection, in the case of an unknown server IP in a new environment, the network management module uses the mDNS protocol to search for a message broker node registered with the set hostname in the local area network. After successful resolution, the dynamically obtained current IP is set as the target server address.

[0007] In some embodiments, during step S2, the scanning device is further equipped with a communication management module. The communication management module maintains a long TCP connection to the MQTT Broker using the PubSubClient library. After obtaining the IP address distributed by the network module, it performs authentication and login, and automatically subscribes to control downlink topics specific to the local ID. At the same time, the communication management module also has a built-in data storage queue. When network jitter causes the push to be disconnected, the sensor periodic reporting information, RFID events, and alarm events are all encapsulated as standard JSON objects and cached in the queue. Once the MQTT reconnection is detected, the module will automatically extract the backlogged data from the head of the queue and retransmit it with an accurate timestamp.

[0008] In some embodiments, in step S2, the scanning device is further equipped with an RFID service module. The RFID service module is used to realize data communication between the ESP32 main control module and the UHF-RFID read / write module, and at the same time determine the legality of the UHF-RFID tag. Since the same tag will be read multiple times in a very short time within the radio frequency range, the firmware sets up a sliding deduplication hash pool in memory, and saves the list of tags that have been confirmed as "in stock". For each identified tag, the module checks its RSSI. If the RSSI exceeds the set threshold and is identified multiple times in a row, it further determines whether the tag already exists in the stock list: if it does not exist, it is determined as an "in" event; if it exists, it is determined as an "out" event. The determination result is reported to the server in real time, and the status of the stock list is updated in memory.

[0009] In some embodiments, the dual-axis gimbal plans several horizontal and pitch observation points using a two-dimensional array structure. The specific angle intervals of the observation points can be remotely configured and adjusted through the system settings page on the front end. The system settings page adjusts the horizontal rotation angle range of the horizontal servo and the pitch rotation angle range of the pitch servo accordingly. The scanning trigger of the dual-axis gimbal includes timed triggering and manual triggering.

[0010] In some embodiments, in step S3, the server-side and front-end software design is mainly divided into a communication layer, a business processing layer, a data persistence layer, and a user interface presentation layer: The communication layer is used to receive data uploaded by hardware devices and send control commands. The business processing layer parses, validates, deduplicates, and distributes messages; The data persistence layer stores device registration information, environmental data, RFID events, inventory records, and alarm information into the database; The interface presentation layer displays the system status, device list, business logs, and configuration items to the user. The system deploys Mosquitto as an MQTT Broker message broker server on a PC server within the local area network. At the same time, it sets up engineering service configurations for authentication and topic permission isolation to prevent unauthorized devices from injecting false inventory information and to achieve targeted data collection and accurate delivery of instructions. By incorporating an mDNS service discovery mechanism during MQTT access, Mosquitto periodically broadcasts its service name and IP address within the local area network when the server starts up, using the mDNS protocol. After the scanning device powers on, there is no need to hardcode any server IP; it only needs to listen for the mDNS service type within the local area network to automatically resolve the dynamic IP of the currently available broker and establish a connection.

[0011] In some embodiments, to achieve long-term data storage, historical traceability, and dynamic display of front-end visual dashboards, a lightweight relational database, SQLite, is introduced on the server side. This database enables: recording device and asset information, recording edge hardware node information connected to the system, and known UHF-RFID tag file information; inventory business data, recording the session process of each scan by the PTZ, the inbound and outbound flow, and calculating and generating a snapshot of the "current status of assets in inventory" in real time; environmental monitoring and alarms, recording environmental sensor data such as temperature, humidity, and light, as well as abnormal alarm records generated after exceeding the safety threshold.

[0012] In some embodiments, step S3 further includes backend software design, where the server-side program undertakes the tasks of receiving data generated by the terminal device, updating inventory status, storing data, and responding to page requests. The backend is modularly divided according to function: The data receiving section is responsible for listening to MQTT topics and parsing the data uploaded by the device; The Web interface is responsible for accessing data on the front-end page; The business processing section completes the operations of updating RFID tag status, judging environmental data, and generating alarm records. The business processing section is further divided into several key functional modules, including: The device lifecycle management module is responsible for managing all connected edge hardware nodes, recording device registration information and last communication time, and dynamically maintaining the online / offline status of devices through a heartbeat mechanism. When a device goes offline abnormally, it sends a broadcast notification to other modules. The inventory business engine module subscribes to RFID event streams and maintains the in-stock asset view table in real time based on the tag entry and exit actions. It is also responsible for the full lifecycle management of PTZ scanning sessions: after receiving the "scan start" command, it creates a session record; after receiving the "scan end" and tag details, it automatically calculates the time spent on this inventory, the total number of tags, and the list of newly added or missing assets. The alarm rule engine module adopts a rule-driven design. This alarm rule engine module reads the alarm rules configured by the administrator from the database. When new data is received from the sensor data access layer, it compares the rules one by one to achieve timely warning. The device control and configuration center module, as the hub of the reverse control link, receives operation instructions from the web front end, converts the operation intentions at the business level into control messages specified by the underlying MQTT protocol, and then accurately sends them to the target device through the MQTT Broker.

[0013] A dual-axis pan-tilt UHF-RFID tag inventory counting device includes a scanning device, UHF-RFID tags affixed to the surface of items to be stored, and a server. The scanning device includes: ESP32 main control module; The UHF-RFID reader / writer module, together with the ESP32 main control module, is used to scan items with UHF-RFID tags attached in the storage warehouse. The UHF antenna, which is connected to the UHF-RFID read / write module, is used to enhance the signal and improve the reading accuracy of the UHF-RFID tag; The horizontal and vertical servos are combined to form a dual-axis gimbal, which drives the UHF-RFID reader / writer module and the UHF antenna to rotate and scan. RTC clock, used to record time and continuously add time stamps even when the network is offline; Infrared sensors are used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tag and put it into the warehouse. The server obtains data from the hardware terminal via the MQTT protocol and sets up an HTTP interface for front-end interface access, parameter configuration, and business queries. The ESP32 main control module is also connected to a temperature and humidity sensor for detecting temperature and humidity in the warehouse, a light sensor for detecting the current light intensity, and a digital microphone for receiving and transmitting sound.

[0014] By adopting the above technical solution, the beneficial effects of the present invention are: This invention uses the ESP32 as the main control chip, paired with a UHF-RFID read / write module to achieve tag reading and identification. A dual-axis gimbal drives the UHF antenna to change angles, thereby expanding the reading and identification coverage. The device side adopts a time window-based data filtering strategy to reduce invalid data uploads. The communication part uses the MQTT protocol to realize data transmission between the terminal device and the server. The server side is developed based on the Flask framework to complete functions such as RFID data reception, inventory status management, and environmental alarm processing. Combined with a web page, it realizes device status display, asset inventory record query, and visualization of environmental monitoring information.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.

[0016] Undoubtedly, such and other objects of the present invention will become more apparent after the following detailed description of the preferred embodiments, which are illustrated in various accompanying drawings and figures.

[0017] To make the above and other objects, features and advantages of the present invention more apparent and understandable, one or more preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0019] In the accompanying drawings, the same parts use the same reference numerals, and the drawings are schematic and not necessarily drawn to actual scale.

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on such drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the overall design process of the dual-axis gimbal UHF-RFID tag inventory counting method in some embodiments of the present invention; Figure 2 This is a schematic diagram of the overall structure of the scanning device in some embodiments of the present invention; Figure 3 This is a schematic diagram of the hardware architecture with ESP32 as the main control chip in some embodiments of the present invention; Figure 4 This is a schematic diagram of the embedded software design process in some embodiments of the present invention; Figure 5 This is a schematic diagram of the network management module operation flow in some embodiments of the present invention; Figure 6 This is a schematic diagram of the operation flow of the communication management module in some embodiments of the present invention; Figure 7 This is a schematic diagram of the operation flow of the RFID service module in some embodiments of the present invention; Figure 8 This is a schematic diagram of the operation flow of the auxiliary sensing acquisition and alarm module in some embodiments of the present invention; Figure 9 This is a schematic diagram illustrating the business logic relationships between the core data tables in some embodiments of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] Furthermore, in the description of this invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0024] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral unit; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. However, specifying a direct connection indicates that the two main bodies are not connected through a transitional structure, but rather formed as a whole through a connecting structure. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0025] In this invention, unless otherwise expressly specified and limited, the first feature "on" or "below" the second feature may be in direct contact with the first and second features, or indirect contact through an intermediate medium. In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0026] Reference Figures 1-3 , Figure 1 This is a schematic diagram of the overall design process of the dual-axis gimbal UHF-RFID tag inventory counting method in some embodiments of the present invention; Figure 2 This is a schematic diagram of the overall structure of the scanning device in some embodiments of the present invention; Figure 3 This is a schematic diagram of the hardware architecture with ESP32 as the main control chip in some embodiments of the present invention.

[0027] According to some embodiments of the present invention, the present invention provides a method for inventory counting of dual-axis pan-tilt UHF-RFID tags, comprising: S1. Terminal hardware basics: Install a scanning device with a dual-axis gimbal in the storage warehouse, and attach UHF-RFID tags to the surface of the items to be stored. The scanning device is equipped with an ESP32 main control module, a UHF-RFID read / write module, a UHF antenna, a horizontal servo, a pitch servo, an RTC clock, and an infrared sensor. A combination of horizontal and vertical servos forms a dual-axis gimbal. A UHF antenna and a UHF-RFID reader / writer module are installed at the end of the dual-axis gimbal to achieve dual-axis rotation. The ESP32 main control module is connected to the UHF-RFID reader / writer module to read and write UHF-RFID tags on the surface of items to be stored. The UHF antenna is connected to the UHF-RFID reader / writer module to achieve signal gain. An RTC clock is used to record time and continuously add time markers when the network is disconnected. An infrared sensor is used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tags for storage. The scanning device is also equipped with a temperature and humidity sensor for detecting temperature and humidity in the warehouse, a light sensor for detecting current light intensity, and a digital microphone for receiving and emitting sound. The temperature and humidity sensor, light sensor, and digital microphone are all connected to the ESP32 main control module. The scanning device periodically collects the ambient temperature, relative humidity, light intensity, and ambient noise intensity range through the sensors. If the environment exceeds the set threshold, it is judged to be abnormal and an alarm is uploaded in time. Considering that network fluctuations may cause reporting delays, the alarm logic must run locally on the ESP32. The system needs to allow the server to send the upper and lower limits of various environmental indicators, alarm anti-shake time, and cooling time. When the collected value exceeds the limit for a specified period of time, the device actively generates an alarm event and pushes it to the server to remind the management personnel to intervene. For the scanning equipment and UHF-RFID tags, the main control chip is Espressif Systems' ESP32-WROOM-32U module. The ESP32 chip natively integrates Wi-Fi communication functionality, is compatible with the standard TCP / IP protocol stack, and can directly connect to Wi-Fi without the need for an additional wireless chip. The UHF-RFID identification module uses the E720 read / write module. The E720 module has an internal power amplifier, which, when used with a directional antenna of appropriate gain, can achieve an effective reading distance of 10m. The E720 also features excellent anti-collision algorithms, maintaining stable identification performance even when multiple tags are present simultaneously, meeting the tag reading requirements in a warehouse environment. Both the horizontal and pitch servos are high-torque digital servos, capable of precisely positioning angles within a range of 0° to 180°, forming a dual-axis scanning gimbal for horizontal rotation and pitch adjustment. The RTC clock is a PCF8563. The RTC module is a low-power CMOS real-time clock / calendar device that supports wide voltage supply and has a built-in coin cell battery backup input. It continues timing even after the mains power is off. When the device is connected to a local area network and has access to the public network, the ESP32 obtains the standard time via the NTP protocol and writes it back to the calendar register of the calibrated PCF8563, thereby achieving global clock synchronization and time tracking in offline environments. The infrared sensor used is the SR602. The PIR (Pyroelectric Induction) human body sensor module can quickly detect changes in infrared radiation emitted by a person entering or leaving the monitored area and output a high-level signal. This signal is sent to the digital input pin of the ESP32 and can be used to trigger RFID partial scanning or provide a security alarm source for unauthorized entry. The temperature and humidity sensor, SHTC3, is used to monitor whether the temperature and humidity of the storage warehouse are abnormal. The light intensity sensor, BH1750, is used to determine the lighting status of the storage warehouse or sudden changes in light caused by unauthorized entry. The digital microphone, INMP441 omnidirectional microphone, transmits ambient sound directly to the ESP32 in high-quality digital signal form. The system extracts the audio signal locally and converts it into an approximate dB scale to monitor abnormal sounds or environmental noise in the laboratory.

[0028] Reference Figures 4-8 , Figure 4 This is a schematic diagram of the embedded software design process in some embodiments of the present invention; Figure 5 This is a schematic diagram of the network management module operation flow in some embodiments of the present invention; Figure 6 This is a schematic diagram of the operation flow of the communication management module in some embodiments of the present invention; Figure 7 This is a schematic diagram of the operation flow of the RFID service module in some embodiments of the present invention; Figure 8 This is a schematic diagram of the operation flow of the auxiliary sensing acquisition and alarm module in some embodiments of the present invention.

[0029] S2. Hardware-side embedded software design: After the scanning device powers on, it initializes the hardware and bus. After initialization, it enters the main software loop, such as... Figure 4 In the main loop, if the scanning device detects that someone is in the storage warehouse, the UHF-RFID reading and writing module is activated. The dual-axis pan-tilt unit decides whether to start rotating scanning based on the internal clock. All the generated telemetry data and time logs are encapsulated and pushed to the designated MQTT server node via the local area network. After the system is powered on, the ESP32 initializes each module and drives the RFID module into the ready state, waiting for identification trigger. When scanning and inventory are required, the ESP32 controls the pan-tilt unit to traverse the spatial nodes according to the set scanning path. At the same time, it receives data packets returned by the RFID reader to the main control board hardware buffer in real time and performs frame splitting and tag deduplication. The scanning device is also equipped with a network management module, such as Figure 5 After the scanning device is powered on, it first reads the historical Wi-Fi credentials stored in the ESP32 main control module NVS and attempts to connect. When in a new environment or when the connection times out, the device will automatically enter offline AP mode, turn on the wireless hotspot and the device's built-in configuration webpage. After the device successfully establishes a Wi-Fi connection, in the case of an unknown server IP in a new environment, the network management module uses the mDNS protocol to find the message broker node registered with the set hostname in the local area network. After successful resolution, the dynamically obtained current IP is set as the target server address. The network management module addresses the pain point of unclear network parameters when IoT devices are deployed to new environments, enabling a completely hard-coded intelligent network configuration and addressing workflow. Deployers can connect to the device's Wi-Fi hotspot via mobile phone or computer and configure the SSID and password of the new environment's Wi-Fi in the device's built-in webpage. Compared to the fixed IP configuration method in the firmware, this method can reduce the workload of reconfiguring the device on-site and improve the convenience of device deployment to a certain extent. The scanning device is also equipped with a communication management module, such as Figure 6 The communication management module maintains a long TCP connection to the MQTT Broker using the PubSubClient library. After obtaining the IP address distributed by the network module, it performs authentication and login, and automatically subscribes to control downlink topics unique to its local ID. At the same time, the communication management module also has a built-in data storage queue. When network jitter causes the push to be interrupted, the sensor periodic reporting information, RFID events and alarm events are all encapsulated as standard JSON objects and cached in the queue. Once the MQTT reconnection is detected, the module will automatically retrieve the backlogged data from the head of the queue and retransmit it with an accurate timestamp to ensure that there is no packet loss in the data of the cloud management center. The scanning device is also equipped with an RFID service module, such as Figure 7As shown, the RFID service module is used to realize data communication between the ESP32 main control module and the UHF-RFID read / write module, and at the same time determine the legality of the UHF-RFID tag. The program will handle the noise interference that may occur during the hardware transmission and reception process, and realize stable tag parsing and status judgment. In the program flow, the ESP32 will receive the serial port data transmitted back by the UHF-RFID read / write module. According to the communication protocol specified in the EPC Global UHF Class 1 Gen 2 / ISO 18000-6C standard, it will first check the frame header, then perform CRC check, and extract the legal EPC from it. Because the same tag will be read multiple times in a very short time within the radio frequency range, the firmware sets up a sliding deduplication hash pool in memory and saves a list of tags that have been confirmed as "in stock". For each identified tag, the module checks its RSSI. If the RSSI exceeds the set threshold and is identified multiple times in a row, it further determines whether the tag already exists in the stock list: if it does not exist, it is determined as an "inbound" event; if it exists, it is determined as an "outbound" event. The determination result is reported to the server in real time and the status of the stock list is updated in memory. The local debouncing and deduplication algorithm can avoid sending a large number of duplicate and useless messages to the MQTT channel, while ensuring the accuracy of asset migration status judgment in access control scenarios. The dual-axis gimbal uses a two-dimensional array structure to plan several horizontal and vertical observation points. The specific angle intervals of these observation points can be remotely configured and adjusted through the front-end system settings page. The system settings page correspondingly adjusts the horizontal rotation angle range of the horizontal servo and the pitch rotation angle range of the pitch servo. The dual-axis gimbal's scanning triggers include timed triggering and manual triggering. When executing a scanning task, the main controller will cause the servo to turn to the starting position, and then run sequentially according to the specific angles of the set coordinate group. After reaching the target physical location, it will pause briefly, such as 500 milliseconds. During this pause window, the RFID manager will be called to send an RFID query command to read surrounding tags. After the window ends, it will turn to the next scanning angle. After all points have been scanned, the system will extract the asset EPC set picked up during this period from the cache, package them together as a scan result, and send it back to the server. The scanning device is also equipped with an auxiliary sensor acquisition and alarm module, such as Figure 8 As shown, the auxiliary sensing acquisition module triggers the peripheral sensor workflow through a non-blocking timer: it reads the data sent by the temperature and humidity sensor through the I2C bus to obtain the temperature and humidity, sends the sampling lock period to the light intensity sensor to obtain the ambient brightness, extracts the audio sample set of the digital microphone from the DMA buffer to calculate the sound level intensity, and responds to and acquires the external input status of the infrared sensor.

[0030] To achieve effective monitoring of environmental conditions, the firmware is designed with a robust local alarm algorithm: the parameter dictionary issued by the management terminal, such as minimum temperature 5℃, maximum noise -30 dBFs, hysteresis 5%, and anti-shake trigger time 2000 milliseconds, is stored in the device's NVS memory. When the transient sensor reading exceeds the limit and continues to exceed the anti-shake time, the status bit is flipped and a push is triggered, effectively avoiding false alarms caused by people briefly walking around the sensor or by occasional loud noises.

[0031] S3. Server and Front-end Software Design: The server is developed using Python and the Flask framework, with real-time message push implemented through SocketIO and SQLite as the database. The system transmits data obtained from the hardware terminal to the server via the MQTT protocol, and sets up an HTTP interface for front-end interface access, parameter configuration, and business queries. The front-end interface is built based on Flask templates and native JavaScript. Server-side and front-end software design is mainly divided into the communication layer, business processing layer, data persistence layer, and interface presentation layer: The communication layer is used to receive data uploaded by hardware devices and send control commands. The business processing layer parses, validates, deduplicates, and distributes messages; The data persistence layer stores device registration information, environmental data, RFID events, inventory records, and alarm information into the database; The interface presentation layer displays the system status, device list, business logs, and configuration items to the user. The system deploys Mosquitto as an MQTT Broker message broker server on a PC server within the local area network. At the same time, it sets up engineering service configurations for authentication and topic permission isolation to prevent unauthorized devices from injecting false inventory information and to achieve targeted data collection and accurate delivery of instructions. By incorporating an mDNS service discovery mechanism during MQTT access, Mosquitto periodically broadcasts its service name and IP address within the local area network when the server starts up, using the mDNS protocol. After the scanning device is powered on, there is no need to hardcode any server IP. It only needs to listen for the mDNS service type within the local area network to automatically resolve the dynamic IP of the currently available Broker and establish a connection. This mechanism achieves "plug and play" and zero configuration and maintenance-free operation for IoT terminals. To achieve long-term data storage, historical traceability, and dynamic display on the front-end visual dashboard, the server-side utilizes the lightweight relational database SQLite. Compared to large databases such as MySQL and Microsoft SQL Server, SQLite requires no additional installation or configuration and runs as a single file, perfectly meeting the engineering requirements of stand-alone deployment and maintenance-free operation in storage warehouses. This database enables: recording equipment and asset information, recording edge hardware node information connected to the system, and known UHF-RFID tag file information; inventory business data, recording the session process of each scan by the PTZ camera, inbound and outbound flow, and calculating and generating a snapshot of the "current status of assets in inventory" in real time; and environmental monitoring and alarms, recording environmental sensor data such as temperature, humidity, and light, as well as abnormal alarm records generated after exceeding safety thresholds. Reference Figure 9 , Figure 9 This is a schematic diagram illustrating the business logic relationships between the core data tables in some embodiments of the present invention.

[0032] The core data table structure design specifically includes: The device registry is used to record basic information of ESP32 terminals connected to the system, making it easier to distinguish hardware nodes in different warehouses and locations on the server side. The asset tag registry, as the main table of the system's asset ledger, maps the originally meaningless EPCs into human-readable asset information and serves as the basis for displaying asset names on the front end. The RFID event log is a core business log. When the ESP32 detects that a tag has "entered" or "left" the reading range, it sends an event, which is then stored in this table by the server. The data in the front-end trend chart is aggregated from this table. The table is set with a joint unique constraint to avoid duplicate records caused by network fluctuations. The inventory session table is used to record each complete "rotation scan" action cycle of the PTZ. When the device starts and stops scanning, the server generates a session record based on this, which is used to evaluate the efficiency and workload of a single inventory. The inventory asset status table records a real-time snapshot of the warehouse's current assets. After the server receives RFID inbound / outbound events, it automatically adds to or deletes items from this table. The "current inventory quantity" displayed on the front-end page comes directly from this table. The alarm event table automatically generates an alarm record when the warehouse environment (such as temperature and humidity) exceeds the set safety threshold. The front-end dashboard will listen for and read the unprocessed alarms in the table in real time and display a pop-up notification. like Figure 9 The device, as the source of the data flow, generates scanning sessions and inbound / outbound logs; the inbound / outbound logs accumulate continuously, eventually driving the update of the status of assets in the warehouse; at the same time, the abnormal environmental data reported by the device forms alarm events.

[0033] The system also includes backend software design. The server-side program is responsible for receiving data generated by terminal devices, updating inventory status, storing data, and responding to page requests. The backend is modularized according to function: The data receiving section is responsible for listening to MQTT topics and parsing the data uploaded by the device; The Web interface is responsible for accessing data on the front-end page; The business processing section completes the operations of updating RFID tag status, judging environmental data, and generating alarm records. The business processing section is further divided into several key functional modules, including: The device lifecycle management module is responsible for managing all connected edge hardware nodes, recording device registration information and last communication time, and dynamically maintaining the online / offline status of devices through a heartbeat mechanism. When a device goes offline abnormally, it sends a broadcast notification to other modules. The inventory business engine module subscribes to RFID event streams and maintains the in-stock asset view table in real time based on the tag entry and exit actions. It is also responsible for the full lifecycle management of PTZ scanning sessions: after receiving the "scan start" command, it creates a session record; after receiving the "scan end" and tag details, it automatically calculates the time spent on this inventory, the total number of tags, and the list of newly added or missing assets. The alarm rule engine module adopts a rule-driven design. This alarm rule engine module reads the alarm rules configured by the administrator from the database, such as the temperature limit, duration, and cooling time. When new data is transmitted from the sensor data access layer, it compares each rule to achieve timely warning. By introducing the "hysteresis" and "cooling time" mechanisms, the system effectively avoids repeated alarm triggering when the sensor data fluctuates at the threshold critical point, ensuring that the issued alarm events are both accurate and have practical guiding significance. The device control and configuration center module, as the hub of the reverse control link, receives operation instructions from the web front end, converts the operation intentions at the business level into control messages specified by the underlying MQTT protocol, and then accurately sends them to the target device through the MQTT Broker.

[0034] S4. System Integration and Result Analysis: Build a basic server environment on the PC belonging to the storage warehouse, deploy MQTT communication middleware and server business programs, install scanning equipment in the storage warehouse, and place multiple items with UHF-RFID tags attached within the antenna coverage area to be put into storage. Send a dual-axis PTZ scanning command from the front-end page, wait for the scanning device to complete a full scanning cycle, and then check if the number of tags recorded on the front-end is correct. Carry item A, which is to be put into storage, into the storage warehouse. After waiting for 10 seconds, carry item A, which is to be put into storage, out of the storage warehouse again. After completing the action, check whether the corresponding entry and exit record has been added to the database transaction table. At the same time, the record is dynamically synchronized in real time on the front-end page. Keep the server program running with Mosquitto, connect a spare ESP32 terminal that has not been configured with any server IP address to the power supply, and check whether the terminal can automatically obtain the MQTT Broker address and go online within a few seconds. The Web dashboard "Device Management" page will refresh automatically, the device card will appear, and the status indicator light will turn green. When the device is online normally, briefly turn off the router's Wi-Fi for 10 seconds and then turn it back on. Does the front-end page normally display the device as "offline"? After the Wi-Fi is restored, does the device automatically reconnect and its status return to "online"? Is the data generated during this period not lost after reconnection? In the alarm rules, the upper limit of temperature is set to 35℃, the duration is 3 seconds, and the cooling time is 10 seconds. The sensor is heated by a heat source, and the temperature fluctuates rapidly between 33℃ and 37℃ for 15 seconds. If the temperature does not exceed 35℃ for 3 consecutive seconds, no alarm should be generated. If it exceeds 35℃ for 3 consecutive seconds, an alarm should be generated. Within 10 seconds after an alarm is generated, no new alarm should be generated even if the limit is exceeded again.

[0035] The present invention also provides a dual-axis gimbal UHF-RFID tag inventory counting device, including a scanning device, a UHF-RFID tag affixed to the surface of the items to be stored, and a server. The scanning device includes: ESP32 main control module; The UHF-RFID reader / writer module, together with the ESP32 main control module, is used to scan items with UHF-RFID tags attached in the storage warehouse. The UHF antenna, which is connected to the UHF-RFID read / write module, is used to enhance the signal and improve the reading accuracy of the UHF-RFID tag; The horizontal and vertical servos are combined to form a dual-axis gimbal, which drives the UHF-RFID reader / writer module and the UHF antenna to rotate and scan. RTC clock, used to record time and continuously add time stamps even when the network is offline; Infrared sensors are used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tag and put it into the warehouse. like Figure 2As shown, the scanning device adopts a box-type enclosed structure design, with reserved installation space for components such as the main control board, power module, servo drive module, and sensor interface. Considering that the equipment is mainly installed on a wall or column, an L-shaped wall-mounted bracket is designed at the rear of the main body, with a long strip mounting hole for easy adjustment and fixation according to the actual position during on-site installation. The UHF antenna is fixed to the bracket with bolts and nuts. The horizontal servo is installed inside the main body shell and is responsible for driving the entire lower structure to rotate horizontally. The pitch servo is installed below the horizontal rotation mechanism to adjust the antenna pitch angle. Both servos are high-torque servos with metal gears to meet the overall load requirements of the RFID antenna and bracket and ensure stability during operation. From the actual structural layout, the horizontal rotation mechanism is located at the center of the device, and is connected to the pitch platform below via servo connectors. This design allows the overall center of gravity of the device to be as close as possible to the center of rotation, thereby reducing the inertial effect generated during gimbal movement and improving operational stability. At the same time, during pitch movement, sufficient safety clearance is left between the antenna platform and the main body shell to prevent mechanical interference during movement.

[0036] The server obtains data from the hardware terminal via the MQTT protocol and sets up an HTTP interface for front-end interface access, parameter configuration, and business queries. The ESP32 main control module is also connected to a temperature and humidity sensor for detecting temperature and humidity in the warehouse, a light sensor for detecting the current light intensity, and a digital microphone for receiving and transmitting sound.

[0037] It should be understood that the embodiments disclosed herein are not limited to the specific processing steps or materials disclosed herein, but should be extended to equivalent substitutions of such features as understood by those skilled in the art. It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting.

[0038] The term "embodiment" in this specification refers to a specific feature or characteristic described in connection with an embodiment that is included in at least one embodiment of the invention. Therefore, phrases or "embodiments" appearing in various places throughout the specification do not necessarily refer to the same embodiment.

[0039] Furthermore, the described features or characteristics can be incorporated into one or more embodiments in any other suitable manner. In the above description, specific details, such as thickness, quantity, etc., are provided to provide a comprehensive understanding of embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented without the aforementioned specific details or may be implemented using other methods, components, materials, etc.

Claims

1. A method for inventory counting of dual-axis pan-tilt UHF-RFID tags, characterized in that, include S1. Terminal hardware basics: Install a scanning device with a dual-axis gimbal in the storage warehouse, and attach UHF-RFID tags to the surface of the items to be stored. The scanning device is equipped with an ESP32 main control module, a UHF-RFID read / write module, a UHF antenna, a horizontal servo, a pitch servo, an RTC clock, and an infrared sensor. A combination of horizontal and vertical servos forms a dual-axis gimbal. A UHF antenna and a UHF-RFID reader / writer module are installed at the end of the dual-axis gimbal to achieve dual-axis rotation. The ESP32 main control module is connected to the UHF-RFID reader / writer module to read and write UHF-RFID tags on the surface of items to be stored. The UHF antenna is connected to the UHF-RFID reader / writer module to achieve signal gain. An RTC clock is used to record time and continuously add time markers when the network is disconnected. An infrared sensor is used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tags for storage. S2. Hardware-side embedded software design: After the scanning device is powered on, it initializes the hardware and bus. After initialization, it enters the main software loop. In the main loop, if the scanning device detects that someone is in the storage warehouse, it starts the UHF-RFID reading and writing module. The dual-axis pan-tilt unit decides whether to start rotating scanning according to the internal clock. All the generated telemetry data and time logs are encapsulated and pushed to the designated MQTT server node via the local area network. S3. Server and Front-end Software Design: The server is developed using Python and the Flask framework, with real-time message push implemented through SocketIO and SQLite as the database. The system transmits data obtained from the hardware terminal to the server via the MQTT protocol. An HTTP interface is set up for front-end interface access, parameter configuration, and business queries. The front-end interface is built based on Flask templates and native JavaScript. S4. System Integration and Result Analysis: Build a basic server environment on the PC belonging to the storage warehouse, deploy MQTT communication middleware and server business programs, install scanning equipment in the storage warehouse, and place multiple items with UHF-RFID tags attached within the antenna coverage area to be put into storage. Send a dual-axis PTZ scanning command from the front-end page, wait for the scanning device to complete a full scanning cycle, and then check if the number of tags recorded on the front-end is correct. Carry item A, which is to be put into storage, into the storage warehouse. After waiting for 10 seconds, carry item A, which is to be put into storage, out of the storage warehouse again. After the action is completed, check whether the corresponding entry and exit record has been added to the database transaction table. At the same time, the record is dynamically synchronized in real time on the front-end page.

2. The dual-axis gimbal UHF-RFID tag inventory counting method according to claim 1, characterized in that, In step S1, the scanning device is also equipped with a temperature and humidity sensor for detecting the temperature and humidity in the warehouse, a light sensor for detecting the current light intensity, and a digital microphone for receiving and emitting sound. The temperature and humidity sensor, the light sensor, and the digital microphone are all connected to the ESP32 main control module.

3. The dual-axis gimbal UHF-RFID tag inventory counting method according to claim 1, characterized in that, In step S2, the scanning device is also equipped with a network management module. After the scanning device is powered on, it first reads the historical Wi-Fi credentials stored in the ESP32 main control module NVS and attempts to connect. When in a new environment or when the connection times out, the device will automatically enter offline AP mode, turn on the wireless hotspot and the device's built-in configuration webpage. After the device successfully establishes a Wi-Fi connection, in the case of an unknown server IP in a new environment, the network management module uses the mDNS protocol to find the message broker node registered with the set hostname in the local area network. After successful resolution, the dynamically obtained current IP is set as the target server address.

4. The dual-axis pan-tilt UHF-RFID tag inventory counting method according to claim 1, characterized in that, In step S2, the scanning device is also equipped with a communication management module. The communication management module maintains a long TCP connection to the MQTTBroker using the PubSubClient library. After obtaining the IP address distributed by the network module, it performs authentication and login, and automatically subscribes to control downlink topics specific to the local ID. At the same time, the communication management module also has a built-in data storage queue. When network jitter causes the push to be interrupted, the sensor's periodic reporting information, RFID events, and alarm events are all encapsulated as standard JSON objects and cached in the queue. Once the MQTT reconnection is detected, the module will automatically retrieve the backlogged data from the head of the queue and retransmit it with an accurate timestamp.

5. The dual-axis pan-tilt UHF-RFID tag inventory counting method according to claim 1, characterized in that, In step S2, the scanning device is also equipped with an RFID service module. The RFID service module is used to realize data communication between the ESP32 main control module and the UHF-RFID read / write module, and at the same time to determine the legality of the UHF-RFID tag. Since the same tag will be read multiple times in a very short time within the radio frequency range, the firmware sets up a sliding deduplication hash pool in memory, and at the same time saves the list of tags that have been confirmed as "in stock". For each identified tag, the module will check its RSSI. If the RSSI exceeds the set threshold and is identified multiple times in a row, it will further determine whether the tag already exists in the stock list: if it does not exist, it is determined as an "in" event; if it exists, it is determined as an "out" event. The determination result is reported to the server in real time, and the status of the stock list in memory is updated.

6. The dual-axis gimbal UHF-RFID tag inventory counting method according to claim 1, characterized in that, The dual-axis gimbal uses a two-dimensional array structure to plan several horizontal and vertical observation points. The specific angle intervals of the observation points can be remotely configured and adjusted through the front-end system settings page. The system settings page can adjust the horizontal rotation angle range of the horizontal servo and the pitch rotation angle range of the pitch servo. The scanning trigger of the dual-axis gimbal includes timed triggering and manual triggering.

7. The dual-axis pan-tilt UHF-RFID tag inventory counting method according to claim 1, characterized in that, In the S3 process, the server-side and front-end software design is mainly divided into the communication layer, business processing layer, data persistence layer, and interface presentation layer: The communication layer is used to receive data uploaded by hardware devices and send control commands. The business processing layer parses, validates, deduplicates, and distributes messages; The data persistence layer stores device registration information, environmental data, RFID events, inventory records, and alarm information into the database; The interface presentation layer displays the system status, device list, business logs, and configuration items to the user. The system deploys Mosquitto as an MQTT Broker message broker server on a PC server within the local area network. At the same time, it sets up engineering service configurations for authentication and topic permission isolation to prevent unauthorized devices from injecting false inventory information and to achieve targeted data collection and accurate delivery of instructions. By incorporating an mDNS service discovery mechanism during MQTT access, Mosquitto periodically broadcasts its service name and IP address within the local area network when the server starts up, using the mDNS protocol. After the scanning device powers on, there is no need to hardcode any server IP; it only needs to listen for the mDNS service type within the local area network to automatically resolve the dynamic IP of the currently available broker and establish a connection.

8. The dual-axis gimbal UHF-RFID tag inventory counting method according to claim 1, characterized in that, To achieve long-term data storage, historical traceability, and dynamic display on the front-end visual dashboard, a lightweight relational database, SQLite, was introduced on the server side. This database enables: recording device and asset information, recording edge hardware node information connected to the system, and known UHF-RFID tag file information; inventory business data, recording the session process of each scan by the PTZ, the inbound and outbound flow, and calculating and generating a snapshot of the "current status of assets in inventory" in real time; and environmental monitoring and alarms, recording environmental sensor data such as temperature, humidity, and light, as well as abnormal alarm records generated after exceeding the safety threshold.

9. The dual-axis gimbal UHF-RFID tag inventory counting method according to claim 1, characterized in that, The S3 step also includes backend software design. The server-side program is responsible for receiving data generated by terminal devices, updating inventory status, storing data, and responding to page requests. The backend is modularized according to function: The data receiving section is responsible for listening to MQTT topics and parsing the data uploaded by the device; The Web interface is responsible for accessing data on the front-end page; The business processing section completes the operations of updating RFID tag status, judging environmental data, and generating alarm records. The business processing section is further divided into several key functional modules, including: The device lifecycle management module is responsible for managing all connected edge hardware nodes, recording device registration information and last communication time, and dynamically maintaining the online / offline status of devices through a heartbeat mechanism. When a device goes offline abnormally, it sends a broadcast notification to other modules. The inventory business engine module subscribes to RFID event streams and maintains the in-stock asset view table in real time based on the tag entry and exit actions. It is also responsible for the full lifecycle management of PTZ scanning sessions: after receiving the "scan start" command, it creates a session record; after receiving the "scan end" command and tag details, it automatically calculates the time spent on this inventory, the total number of tags, and the list of newly added or missing assets. The alarm rule engine module adopts a rule-driven design. This alarm rule engine module reads the alarm rules configured by the administrator from the database. When new data is received from the sensor data access layer, it compares the rules one by one to achieve timely warning. The device control and configuration center module, as the hub of the reverse control link, receives operation instructions from the web front end, converts the operation intentions at the business level into control messages specified by the underlying MQTT protocol, and then accurately sends them to the target device through the MQTT Broker.

10. A dual-axis gimbal UHF-RFID tag inventory counting device, applied to the dual-axis gimbal UHF-RFID tag inventory counting method of claim 1, the device comprising a scanning device, UHF-RFID tags affixed to the surface of items to be stored, and a server, the scanning device comprising: ESP32 main control module; The UHF-RFID reader / writer module, together with the ESP32 main control module, is used to scan items with UHF-RFID tags attached in the storage warehouse. The UHF antenna, which is connected to the UHF-RFID read / write module, is used to enhance the signal and improve the reading accuracy of the UHF-RFID tag; The horizontal and vertical servos are combined to form a dual-axis gimbal, which drives the UHF-RFID reader / writer module and the UHF antenna to rotate and scan. RTC clock, used to record time and continuously add time stamps even when the network is offline; Infrared sensors are used to detect whether there are people in the storage warehouse and feed the data back to the ESP32 main control module. If there are people in the storage warehouse, the scanning device is activated to scan the UHF-RFID tag and put it into the warehouse. The server obtains data from the hardware terminal via the MQTT protocol and sets up an HTTP interface for front-end interface access, parameter configuration, and business queries. The ESP32 main control module is also connected to a temperature and humidity sensor for detecting temperature and humidity in the warehouse, a light sensor for detecting current light intensity, and a digital microphone for receiving and transmitting sound.

Citation Information

Patent Citations

  • Device for controlling camera by using radio frequency identification

    CN107967499A

  • Operation control method of RFID (Radio Frequency Identification Device) checking device and related equipment

    CN118821808A