Inductive searching method, device and computer equipment
Patent Information
- Application Number
- CN202610946822.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请实施例提供了无感查寝方法、装置及计算机设备,可以解决当前查寝技术下的查寝结果可信度不高的技术问题
[0039] This application provides a method, apparatus, and computer device for contactless dormitory check-in. The method is applied to a contactless dormitory check-in device, which is installed on a target bed in the dormitory to be checked. The method includes: in response to a disturbance, collecting multiple disturbance signals within a preset area; analyzing the disturbance signals to obtain a distance value from the disturbance source and an energy value characterizing the disturbance intensity; filtering the current disturbance signals for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: a fan blowing, a curtain swaying, or a tissue moving slightly; if the target disturbance signal indicates someone is in the dormitory, the check-in result is determined to be someone in the dormitory, and the pre-bound target person is marked as being in the dormitory. In this application, automatic dormitory check-in improves efficiency while achieving real-time check-in, resulting in more reliable results and suitability for dynamically changing environments. It can cover real-time dormitory check-in needs throughout the entire time period, improving the reliability of the check-in results.
Smart Images

Figure CN122598285A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of dormitory inspection technology, and in particular to non-intrusive dormitory inspection methods, devices, and computer equipment. Background Technology
[0002] Currently, when people reside in centralized dormitories, room checks are commonly used to ensure their safety. For example, with numerous school dormitories, the need to guarantee the safety of everyone in each dormitory is substantial. Based on current policy support for building safe campuses, market research has revealed significant market potential.
[0003] Currently, dormitory check-in technology uses either app-based check-in or manual checks. However, manual checks are inefficient, and the results cannot represent the actual situation at future times because the number of people is constantly changing. Similarly, app-based check-in cannot record in real time; it only indicates that people are currently in the dormitory. In other words, current check-in results are time-sensitive and cannot cover the entire time period. Therefore, current technology suffers from a lack of reliability in dormitory check-in results. Summary of the Invention
[0004] This application provides a non-intrusive dormitory inspection method, device, and computer equipment, which can solve the technical problem of low reliability of dormitory inspection results under current dormitory inspection technology.
[0005] In a first aspect, embodiments of this application provide a method for non-contact dormitory inspection, the method being applied to a non-contact dormitory inspection device, the device being installed on a target bed in the dormitory to be inspected, the method comprising:
[0006] In response to the presence of disturbance, multiple disturbance signals are collected within a preset area;
[0007] The disturbance signal is analyzed to obtain the distance from the disturbance source and the energy value characterizing the disturbance intensity.
[0008] Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference to obtain a target disturbance signal without environmental interference. The environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissues moving slightly.
[0009] If the target disturbance signal indicates that someone is in the room, the room check result is determined to be in the room, and the pre-bound target person is marked as in the room.
[0010] In some embodiments, environmental interference filtering is performed on the current disturbance signal based on the distance value and the energy value to obtain a target disturbance signal free from environmental interference, including:
[0011] Calculate the difference between the maximum and minimum distance values to obtain the distance difference;
[0012] If the distance difference is within the preset distance difference threshold range, the current disturbance signal that lasts for more than the preset time threshold is recorded as an environmental interference signal.
[0013] If the distance difference exceeds a preset distance difference threshold range, the current disturbance signal whose energy value is within a preset first energy threshold range is recorded as an environmental interference signal.
[0014] If the distance difference exceeds the preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, it is further determined whether it is the environmental interference signal;
[0015] The environmental interference signal is filtered from the set including the current disturbance signal to obtain the target disturbance signal without environmental interference.
[0016] In some embodiments, if the distance difference exceeds a preset distance difference threshold range, then for current disturbance signals whose energy values are outside a preset first energy threshold range, it is further determined whether they are environmental interference signals, including:
[0017] If the distance difference exceeds a preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, the signal sequence is obtained by sorting the signals according to the order of their energy values.
[0018] The energy values in the signal sequence are subtracted sequentially to remove noise signals from the signal sequence. The energy difference between the energy value of the noise signal and the energy of the adjacent signal is less than a preset second energy threshold range, and the upper limit of the second energy threshold range is less than the upper limit of the first energy threshold range.
[0019] Add adjacent positive numbers together, and then add adjacent negative numbers together after taking the absolute value of each number until the sum reaches the preset total threshold.
[0020] If the number of signals reaching the total threshold exceeds a preset number, then it is determined to be an environmental interference signal;
[0021] If the number of signals reaching the total threshold does not exceed a preset number, then it is determined that the signal is not an environmental interference signal.
[0022] In some embodiments, the distance difference threshold range, the preset first energy threshold range, and the preset time threshold are associated with the environmental interference.
[0023] In some embodiments, the non-intrusive dormitory check device is connected to a backend server. The step of determining the dormitory check result as "in the dormitory" and marking the pre-bound target person as "in the dormitory" if the target disturbance signal indicates someone is present includes:
[0024] The occupancy status information of the dormitory will be sent to the backend server for display of occupancy status.
[0025] In response to a change in the presence of a person, the status information in the backend server is updated for display purposes.
[0026] In some embodiments, the step of filtering the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal free from environmental interference includes:
[0027] Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference. The filtered environmental interference information is sent to the background server for anomaly analysis and display. The anomaly analysis obtains at least one actual environmental interference from the following: fan blowing, curtain swaying, and tissue slightly moving.
[0028] In response to the anomaly analysis feedback result from the backend server, the actual environmental interference obtained from the analysis is filtered out from the current set of disturbance signals to obtain the target disturbance signal without environmental interference.
[0029] In some embodiments, in response to the presence of a disturbance, multiple disturbance signals within a preset area are collected, including:
[0030] In response to the existing disturbance, the size of the time window for signal acquisition is determined based on the required accuracy of the night check.
[0031] Multiple disturbance signals within a preset area are acquired using a sliding window method based on the time window size.
[0032] In some embodiments, the non-contact dormitory check device includes a hardware layer and a software layer. The hardware layer includes a main control chip for core processing and a sensor module for data acquisition. The software layer includes an application layer, a middleware layer, and a hardware abstraction layer. The application layer is used for status output, background reporting of status information, anomaly filtering, and upgrades. The middleware layer includes a task scheduling module, a communication protocol parsing module, a network connection configuration module, and a sensor driver module. The hardware abstraction layer is used to encapsulate direct operations on the hardware.
[0033] Secondly, embodiments of this application also provide a non-contact dormitory inspection device. The method is applied to the non-contact dormitory inspection device, which is installed on the target bed in the dormitory to be inspected. The device includes the following components:
[0034] The signal acquisition and analysis unit is used to acquire multiple disturbance signals within a preset area in response to existing disturbances.
[0035] The signal acquisition and analysis unit is also used to analyze the disturbance signal to obtain the distance value from the disturbance source and the energy value characterizing the disturbance intensity;
[0036] A filtering unit is used to filter the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissue paper moving slightly.
[0037] The result output unit is used to determine the dormitory check result as "in dormitory" if the target disturbance signal indicates that someone is in the dormitory, and to mark the pre-bound target person as "in dormitory".
[0038] Thirdly, embodiments of this application also provide a non-contact dormitory check computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-mentioned method.
[0039] This application provides a method, apparatus, and computer device for contactless dormitory check-in. The method is applied to a contactless dormitory check-in device, which is installed on a target bed in the dormitory to be checked. The method includes: in response to a disturbance, collecting multiple disturbance signals within a preset area; analyzing the disturbance signals to obtain a distance value from the disturbance source and an energy value characterizing the disturbance intensity; filtering the current disturbance signals for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: a fan blowing, a curtain swaying, or a tissue moving slightly; if the target disturbance signal indicates someone is in the dormitory, the check-in result is determined to be someone in the dormitory, and the pre-bound target person is marked as being in the dormitory. In this application, automatic dormitory check-in improves efficiency while achieving real-time check-in, resulting in more reliable results and suitability for dynamically changing environments. It can cover real-time dormitory check-in needs throughout the entire time period, improving the reliability of the check-in results. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating the non-intrusive dormitory check method provided in this application embodiment;
[0042] Figure 2 A power supply circuit diagram provided for an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the upgrade process provided in an embodiment of this application;
[0044] Figure 4 A network configuration process diagram provided for an embodiment of this application;
[0045] Figure 5 This application provides an information reporting flowchart for its embodiments.
[0046] Figure 6 A schematic block diagram of the non-contact dormitory check device provided in the embodiments of this application;
[0047] Figure 7 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0050] It should also be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0051] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0052] Currently, when people reside in centralized dormitories, room checks are commonly used to ensure their safety. For example, with numerous school dormitories, the need to guarantee the safety of everyone in each dormitory is substantial. Based on current policy support for building safe campuses, market research has revealed significant market potential.
[0053] Currently, dormitory check-in technology uses either app-based check-in or manual checks. However, manual checks are inefficient, and the results cannot represent the actual situation at future times because the number of people is constantly changing. Similarly, app-based check-in cannot record in real time; it only indicates that people are currently in the dormitory. In other words, current check-in results are time-sensitive and cannot cover the entire time period. Therefore, existing technologies suffer from the technical problem of low reliability in dormitory check-in results.
[0054] Figure 1 This is a flowchart illustrating the contactless dormitory inspection method provided in this application embodiment. The method is applied to a contactless dormitory inspection device, which is installed on the target bed in the dormitory to be inspected, such as... Figure 1 As shown, the method includes the following steps S110-S140:
[0055] S110. In response to the existing disturbance, collect multiple disturbance signals within a preset area;
[0056] In some embodiments, this contactless dormitory check method is applied to a contactless dormitory check computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, PDA, or laptop, etc. Remote version upgrades can be performed via a 4G network and a server.
[0057] In some embodiments, the present non-contact dormitory check method is applied to a non-contact dormitory check computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet computer, handheld computer, or laptop computer, etc.
[0058] The non-contact dormitory check device comprises a hardware layer and a software layer. The hardware layer includes a main control chip for core processing and sensor modules for data acquisition. The software layer includes an application layer, a middleware layer, and a hardware abstraction layer. The application layer handles status output, background reporting of status information, anomaly filtering, and upgrades. The middleware layer includes a task scheduling module, a communication protocol parsing module, a network connection configuration module, and a sensor driver module. The hardware abstraction layer encapsulates direct hardware operations.
[0059] As an example, the software system architecture diagram is divided into three layers, from top to bottom: OC-1 layer, OC-2 layer, and OC-3 layer.
[0060] The OC-1 layer is the application layer, which includes the APP layer and EXAMPLE examples for user development. The examples demonstrate the usage of various modules such as peripherals, networks, and communications, providing a reference. The APP is an interface provided for users to implement the application layer code, making it easy for users to design their own application layer programs.
[0061] The OC-2 layer is the lib layer, which contains pre-built libraries, open third-party libraries (users can also port their own third-party libraries), driver header files, and platform interfaces.
[0062] The OC-3 layer is the OS (Operating system) layer, which corresponds to the module's operating system.
[0063] Figure 2 The power supply circuit diagram provided in this application embodiment includes a USBLC6-2SC6 ESD protection chip and a CC pull-down resistor. For example... Figure 2 As shown, the Type-C interface uses a 16-pin surface mount connector (model TYPEC-16P). Its power supply pins VBUS (including two sets, VBUS-A4 / B9 and VBUS-B4 / A9) are connected in parallel to the VCC network of the circuit board to provide a +5V input voltage for the subsequent power conversion circuit. The ground pins GND (including two sets, GND-A1 / B12 and GND-B1 / A12) are connected to the common ground (DGND) of the circuit board, forming a complete power supply loop.
[0064] After the USB cable is plugged in, the 5V power supply enters the device from the adapter through the VBUS pin. After high-frequency noise is filtered out by the filter capacitor (C6, 0.1μF) in the power supply circuit, it is input to the power supply input terminal of the main control chip ML307C. The operating voltage range is 3.4V to 4.5V. It is then converted to a typical value of 4.0V by the subsequent LDO or DC-DC converter to provide continuous and stable power to the entire system.
[0065] The diagram shows pins CC1 (A5) and CC2 (B5), both pulled down to DGND via resistor R6 (5.1kΩ). These pull-down resistors serve two purposes: source detection and cable polarity identification / reverse insertion support. As a source detection pin, when the Type-C power adapter (DFP, i.e., the downstream port) detects the 5.1kΩ pull-down resistor on the CC pin, it recognizes a device connected to the UFP (upstream port), thus enabling VBUS power output. Without this pull-down resistor, some Type-C power adapters will not recognize the device and will refuse to supply power. Regarding cable polarity identification and reversible insertion support, the dual-path configuration of CC1 and CC2 allows the Type-C interface to be inserted in either direction. Regardless of the user's insertion orientation of the USB cable, at least one CC pin will establish a valid connection with the power adapter, ensuring continuous power supply.
[0066] In the circuit diagram, USB_DP corresponds to DP1-A6 and DP2-B6, and USB_DN corresponds to DN1-A7 and DN2-B7, which are USB 2.0 differential data lines with Type-C interfaces, connected to the USB programming / debugging interface of the main control chip ML307C. Since the device is only used as a power input in daily use, the data lines are left floating during normal operation; however, during firmware programming or debugging, they are connected to a computer via USB for downloading programs through the host computer (aboot.exe).
[0067] To protect the main control chip from electrostatic discharge (ESD) and transient overvoltage, an ESD protection chip U4 (model USBLC6-2SC6) is included in the circuit. This chip is a dual-channel ESD protection device specifically designed for USB interfaces, and its connection method is as follows:
[0068] Pins 1 and 6 of U4 are connected to the USB_DP and USB_DN data lines, respectively;
[0069] Pins 2 and 5 of U4 are connected to the positive power supply VCC and DGND, providing a clamping voltage reference;
[0070] Pins 3 and 4 of U4 are the anodes of the internal protection diode and are connected to DGND.
[0071] When electrostatic discharge occurs at the USB interface, such as when static electricity from the user's body is discharged through the metal casing during plugging and unplugging, or when a transient overvoltage occurs, the transient voltage suppression diode inside the USBLC6-2SC6 quickly conducts, with a response time of less than 1 picosecond. This clamps the overvoltage spikes on the data line to a safe range of VCC +0.7V and DGND -0.7V, with a maximum clamping voltage of approximately 6.8V. This ensures that the transient voltage across the USB_DP / USB_DN pins of the main control chip does not exceed their absolute maximum rated value, effectively protecting the chip's internal ESD structure from damage. Simultaneously, the device's extremely low junction capacitance ensures uninterrupted transmission of high-speed USB 2.0 signals.
[0072] In the circuit, C6 is a power supply decoupling capacitor connected between VCC and DGND. Its functions include: filtering out high-frequency noise on the USB power line to provide a clean input voltage for the subsequent power conversion chip; and acting as an energy storage capacitor to provide local charge reserves during the module's instantaneous high current demand, reducing the impact of power drop on system stability.
[0073] In addition, the power loop formed between the VBUS pin and DGND is as short and wide as possible to reduce line impedance, reduce voltage drop, and ensure that the device can still obtain sufficient voltage at the farthest USB power supply distance.
[0074] The circuit design also considers the following abnormal scenario protections: overcurrent protection, reverse insertion protection, and electrostatic discharge (ESD) withstand voltage. For overcurrent protection, the Type-C interface specification requires the upstream adapter to automatically limit current or shut down when the output is overloaded, eliminating the need for an additional fuse inside the device and reducing BOM costs. For reverse insertion protection, due to the physically symmetrical design of Type-C and the presence of CC logic, there is no reverse insertion risk as with traditional Micro-USB, eliminating the need for an additional anti-reverse diode, simplifying the circuit and reducing conduction voltage drop losses. For ESD withstand voltage, the USBLC6-2SC6 provides ±8kV protection against contact discharge, meeting the ESD robustness requirements of industrial-grade products and ensuring long-term stable operation of the device in dormitory use scenarios with frequent plugging and unplugging.
[0075] Through the above-described embodiment of the Type-C power supply interface circuit, the device can obtain a stable and reliable 5V DC power supply through a regular USB cable. It also features ESD protection, reversible plug compatibility, and anti-interference capabilities, fully fulfilling the interface requirements for powering the device through a USB cable, and fully considering the high-current transient characteristics and high-frequency electromagnetic compatibility requirements of the 4G module.
[0076] Remote version upgrades can be performed via 4G network and server. In some embodiments, when a device has a vulnerability or requires a feature update, the firmware needs to be re-flashed. The firmware version to be updated is uploaded to the server, and then the firmware on the server is downloaded to a designated file area via the network. The device's API function calls the relevant code to verify the firmware version and perform the update. After the upgrade is complete, the result is sent back to the server.
[0077] like Figure 3 The diagram shown is a schematic representation of the upgrade process provided in an embodiment of this application.
[0078] In this embodiment, the device establishes a connection with the backend OTA server via a 4G cellular network (based on the TCP / IP protocol stack of the ML307C module), enabling fully automated upgrades including remote firmware version detection, download, verification, installation, and result reporting, without the need for manual on-site flashing. The specific implementation steps are as follows:
[0079] The first step is to obtain the local version number.
[0080] After the device powers on or enters a periodic upgrade check cycle, the MCU main control chip first reads the currently running firmware version information from a designated system area in the internal Flash. Specifically, during system compilation and flashing, the version number string is stored in the version information partition of the Flash; the MCU reads this partition by calling the internal API function cm_system_get_version() and stores the version number in the memory variable local_ver; if the read fails, the local version number is set to V0.0.0 by default, and an exception log is triggered, prompting the administrator to check the firmware integrity.
[0081] The second step is to check online.
[0082] The MCU confirms that the current 4G network is connected, and then performs a network check operation. It obtains the IP address corresponding to the OTA server domain name through DNS resolution; establishes a TCP connection with the OTA server; if the network is abnormal or the server is unresponsive, it triggers a retry mechanism: retrying at intervals of 5 minutes, 15 minutes, and 30 minutes, for a total of 3 retries. If all retries fail, the upgrade process is exited, and the process waits for the next check cycle to trigger again.
[0083] The third step is to request upgrade information.
[0084] After the TCP connection is successfully established, the MCU sends an upgrade query request to the OTA server.
[0085] The fourth step is to download the firmware to the OTA partition. After receiving a valid upgrade response, the MCU starts the firmware download process.
[0086] The fifth step is to verify the integrity of the firmware. After the download is complete, the MCU immediately verifies the integrity of the firmware data in the OTA partition to ensure that the file has not been tampered with or damaged during the transmission process.
[0087] Step 6: Initiate the upgrade by calling the system's FOTA interface. After successful verification, the MCU calls the official FOTA API according to the documentation to perform a secure system upgrade.
[0088] Step 7: Wait for automatic restart.
[0089] After the FOTA API execution is complete, the system will trigger a hardware reset and automatically restart, rather than being manually reset by the application layer. The restart process takes approximately 5-10 seconds. After restarting, the bootloader first checks the upgrade flag, confirms that the upgrade is complete, and clears the flag to zero. Then, it loads the new system main program and starts the operating system and various tasks such as radar acquisition, network connection, and MQTT communication. After startup, the application layer reads the local version number again through step one. If it successfully reads new_version, it indicates that the upgrade has taken effect at the system level.
[0090] Step 8: Verify and report the new version results. After the system restarts successfully, the MCU executes the final result reporting process.
[0091] Note that only the `system_patch.bin` file can be used, not the full `.bin` file. Downloaded data must be stored in the OTA partition, not the user partition. Upgrades must use the official FOTA API; you cannot manually flash the Flash. Power outages during upgrades will brick the board. HTTPS downloads require a certificate, while HTTP downloads do not. A version number verification is required for a successful upgrade.
[0092] In this embodiment, disturbance refers to changes in non-static signals in the environment detected by a radar sensor such as the USRR235 24GHz human presence radar sensor. These changes include human entry and exit, subtle breathing movements, turning over, and abnormal interference such as fan oscillation, curtain swaying, and tissue movement. The 24GHz human presence radar sensor is used to detect whether there are moving, slightly moving, or stationary human bodies in the environment. The monitoring distance can reach up to 6 meters, and the detection results can be output via serial port or GPIO port.
[0093] As an example, the system reads the GPIO level of the radar sensor or the distance / energy value output by the UART serial port in real time through the MCU. When the signal amplitude or frequency deviates from the background noise threshold, it determines that there is a disturbance.
[0094] S110 includes S1101-S1102:
[0095] S1101. In response to the existing disturbance, determine the size of the time window for signal acquisition based on the required accuracy of the detection.
[0096] The accuracy requirements for room checks are derived from the system's preset performance indicators. Accuracy should be ≥99% in interference-free scenarios and ≥98% in interference-affected scenarios. Based on these requirements, the system dynamically or statically determines the size of the data collection time window.
[0097] As one possible implementation, considering the need to complete abnormal filtering and output a stable state in the presence of interference, while also taking into account real-time performance and accuracy, a base time window of 60 seconds is set. This window length can cover at least one complete human breathing cycle of about 3 to 5 seconds and the periodic changes of common interferences such as fan rotation cycles, while also meeting the requirement of outputting filtering results within 60 seconds.
[0098] Furthermore, the system adaptively adjusts the window size based on the current environmental state. If the distance value fluctuation is less than the first threshold (e.g., distance difference < 10 cm) within multiple consecutive windows, indicating a stable environment, the window can be shortened to 30 seconds to accelerate the response. If high-frequency sudden interference is detected (e.g., distance value abrupt changes more than 5 times / 10 seconds), the window is extended to 90 seconds to accumulate more samples and suppress false positives. The window size adjustment is achieved through the collaboration of the MCU's internal timer and the task scheduling system.
[0099] S1102. Based on the time window size, collect multiple disturbance signals within a preset area using a sliding window method.
[0100] Based on the determined time window size, such as a base window of 60 seconds, the system collects multiple disturbance signals within a preset area using a sliding window method.
[0101] The preset area is the effective detection range of the radar sensor, with a maximum distance of 6 meters and an adjustable coverage angle. The system maintains a cyclic dataset with a capacity of N, where N is the total window duration / sliding step, and N=6 under the basic window, with a sliding step of 10 seconds and a data update cycle of 10 seconds. Each data unit contains a sequence of distance and energy values collected within that 10-second window.
[0102] Within each sliding cycle, the following acquisition and update operations are performed: The range and energy values output by the radar are read via the UART interface at a fixed sampling rate, e.g., 10Hz, and the statistical characteristics within that 10-second period are calculated: average range, maximum and minimum range, and peak and trough values of the energy value sequence. These statistical characteristics are stored as a data unit at the tail of a circular queue; simultaneously, the oldest data unit at the head of the queue is removed, i.e., the sliding operation is performed, ensuring that the queue always retains all feature data within the most recent 60 seconds or the current window setting.
[0103] The multiple perturbation signals include, but are not limited to: distance value change sequences, energy intensity change sequences, GPIO level state change times, and peak-trough difference sequences derived from the algorithm. To reduce storage overhead, the system only saves necessary statistics rather than the original sampling points, such as the distance range, median energy, and counts of energy exceeding the threshold within each 10-second segment.
[0104] When a new data unit is enqueued, the system triggers an anomaly filtering algorithm. All distance values in the queue are sorted, and the difference between the maximum and minimum distances is calculated. If this difference is consistently less than a set threshold, it is considered an abnormal interference scenario, such as a fan continuously blowing, and the system outputs an "unmanned" status. Otherwise, the energy values are sorted; if all energy values are less than 20, it is also considered abnormal. Otherwise, the energy difference between adjacent peaks and troughs is further calculated, and the cumulative number of differences > 130 is counted. If the cumulative number is > 5, it is considered abnormal; otherwise, it is considered that a human is present.
[0105] Through the aforementioned sliding window acquisition method, the system can continuously update the environmental status with a granularity of 10 seconds. This ensures data timeliness, with a rapid response of ≤3 seconds for human entry directly triggered by GPIO level. The sliding window is used for robust filtering, and continuous monitoring of interference signals within a 60-second time window is achieved, providing a reliable data foundation for subsequent status output and reporting.
[0106] S120. Analyze the disturbance signal to obtain the distance value from the disturbance source and the energy value characterizing the disturbance intensity;
[0107] In this embodiment, the MCU main control chip ML307C receives the raw detection data frames output from the USRR235 radar sensor via the UART serial port at a preset sampling rate.
[0108] Each frame of data contains at least target distance information and reflected signal energy intensity information. Based on the sliding window dataset maintained above, i.e., N data units within the current time window, each unit corresponding to statistical characteristics within a 10-second sliding period, the system performs the following multidimensional analysis on all perturbation signals within the window to extract accurate distance and energy values.
[0109] The system reads the raw target distance values detected by the radar from each data cell in the sliding window dataset, forming a set of distance values R = {r1, r2, ..., r} under the current window. nThe following distance feature extraction operations are then performed: distance sorting and range calculation. All distance values in set R are sorted in ascending order to obtain the maximum distance value R_max and the minimum distance value R_min, and the distance range ΔR = R_max - R_min is calculated. This distance range ΔR is directly used for subsequent anomaly scene determination. For example, it is compared with a preset distance threshold of 15cm to determine whether a fixed interference source exists. Simultaneously, ΔR is also output as a distance feature value characterizing the spatial distribution range of the disturbance.
[0110] After removing invalid field values from set R that are significantly deviated from the physical detection range (e.g., less than 0.1m or greater than 6m), the arithmetic mean of the remaining effective distance values is calculated as R_avg = (Σr_i) / m (where m is the number of effective points). This R_avg is output as the physical distance value of the current disturbance source relative to the sensor, which is used to subsequently determine the bed area or spatial location of the human body.
[0111] The system synchronously reads the energy intensity value of the radar reflection signal from each data unit, forming the energy value set E = {e1, e2, ... e} for the current window. n Since the human body's micro-movements in breathing, heartbeat, and abnormal interference from fans and bed curtains exhibit different temporal characteristics in the energy spectrum, the system performs the following energy feature extraction operations.
[0112] S130. Based on the distance value and the energy value, perform environmental interference filtering on the current disturbance signal to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: fan blowing, bed curtains swaying, and tissue paper moving slightly.
[0113] S130 includes S1301-S1305:
[0114] The distance difference threshold range, the preset first energy threshold range, and the preset time threshold are associated with the environmental interference.
[0115] S1301. Calculate the difference between the maximum distance value and the minimum distance value to obtain the distance difference;
[0116] S1302. If the distance difference is within the preset distance difference threshold range, the current disturbance signal whose duration exceeds the preset time threshold is recorded as an environmental interference signal.
[0117] As an example, the preset distance difference threshold range is 5 meters. The preset time threshold is 5 minutes.
[0118] Signals with a distance difference within 5 meters and a duration exceeding 5 minutes are considered environmental interference signals. Signals with a duration of less than 5 minutes are considered random noise and must be eliminated by clearing the abnormality buffer.
[0119] S1303. If the distance difference exceeds the preset distance difference threshold range, the current disturbance signal whose energy value is within the preset first energy threshold range is recorded as an environmental interference signal.
[0120] As an example, the first energy threshold range is set to 20. When the distance difference exceeds 5 meters, the current disturbance signal with an energy value within 20 is recorded as an environmental interference signal.
[0121] S1304. If the distance difference exceeds the preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, continue to determine whether it is the environmental interference signal.
[0122] S1304 includes steps A1-A5:
[0123] A1. If the distance difference exceeds the preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, the signal sequence is obtained by sorting the signals according to the size of the energy values.
[0124] Energy value sorting and baseline determination: The set E is sorted in ascending order, and it is determined whether all energy values are lower than a preset low energy threshold, such as 20. If all are lower than 20, a "very low energy" flag is directly output, indicating that the current disturbance may come from non-living objects or distant, small interference. This determination result serves as one of the quantitative representations of energy values.
[0125] A2. The energy values in the signal sequence are subtracted sequentially to remove noise signals from the signal sequence, wherein the energy difference between the energy value of the noise signal and the energy of the adjacent signal is less than a preset second energy threshold range, and the upper limit of the second energy threshold range is less than the upper limit of the first energy threshold range.
[0126] As an example, the second energy threshold range is set to 5.
[0127] A sliding comparison is performed on the time-domain energy sequences in set E to identify local maxima and local minima. Specifically, for the i-th point in the sequence, if E_i > E_{i-1} and E_i > E_{i+1}, it is determined to be a peak; if E_i < E_{i-1} and E_i < E_{i+1}, it is determined to be a trough. After traversing the entire window sequence, the peak sequence P = {p1, p2, ...} and the trough sequence V = {v1, v2, ...} are obtained.
[0128] Adjacent peaks and troughs are paired sequentially over time, and the energy difference ΔE = E_peak - E_valley (absolute value) between each pair is calculated, forming a new difference dataset D = {ΔE1, ΔE2, ...}. This difference dataset D is the core quantitative indicator representing the energy value of the disturbance intensity. A larger ΔE indicates more drastic signal fluctuations, corresponding to large human movements or strong interference; a smaller ΔE indicates a stable signal, corresponding to unmanned or static micro-movement scenarios. Noise signals with an energy difference less than 5 are removed.
[0129] A3. Add adjacent positive numbers together, and take the absolute value of adjacent negative numbers before adding them together until the sum reaches the preset total threshold.
[0130] As an example, the preset total threshold is 130.
[0131] The system further counts the cumulative number of times the value in D exceeds the preset high-energy threshold, which is also the preset total threshold of 130. This cumulative number is used as the energy intensity feature value of the final output for subsequent anomaly filtering. If the cumulative number is >5, it is determined to be abnormal interference.
[0132] After completing the above analysis, the system outputs the following parameters as analysis results to the anomaly filtering algorithm module: the range ΔR and the average distance R_avg, where ΔR is used to determine the stability of the environmental space, and R_avg is used to locate the disturbance source; and the dataset D of energy differences between adjacent peaks and troughs and the cumulative count C exceeding the threshold of 130, where the C value directly reflects the intensity level of the disturbance within the current window. The higher the C value, the more severe the disturbance, and the more likely it is to be judged as a real human presence.
[0133] Through the joint analysis of the range domain and energy domain, the system transforms the original radar echo signal into numerical features with clear physical meaning, providing accurate data support for subsequent abnormal scenario filtering and manned / unmanned status determination.
[0134] A4. If the number of signals reaching the total threshold exceeds a preset number, it is determined to be an environmental interference signal.
[0135] Output the dataset D of energy differences between adjacent peaks and troughs and the cumulative count C of those exceeding the threshold of 130. The C value directly reflects the intensity level of the disturbance within the current window. The higher the C value, the more severe the disturbance, and the more likely it is to be judged as a real human presence.
[0136] A5. If the number of signals reaching the total threshold does not exceed the preset number, then it is determined that the signal is not an environmental interference signal.
[0137] The smaller the C value, the weaker the disturbance, and the more likely it is to be judged as unmanned, thus classifying these signals as noise signals and not as environmental interference signals.
[0138] S1305. Filter the environmental interference signal from the set including the current disturbance signal to obtain the target disturbance signal without environmental interference.
[0139] In this embodiment, the MCU main control chip, based on the distance range ΔR, energy value set E, and adjacent peak-valley energy difference set D and their cumulative count C in the output sliding window dataset, employs a cascaded multi-level filtering strategy to accurately identify and eliminate environmental interference signals from a mixed set containing both real human signals and environmental interference signals. The final output is a target disturbance signal that only represents the presence of the human body. The specific filtering process consists of the following three cascaded stages:
[0140] The first stage involves primary filtering based on distance stability to eliminate static or quasi-static environmental interference.
[0141] The system first processes the current window distance value set R = {r1, r2, ..., r...} obtained above. n The range ΔR = R_max - R_min is used to determine the distance.
[0142] If ΔR is less than a preset first distance threshold, preferably 15cm, it indicates that the distance values of all sampling points within the current window are highly concentrated, and there is no significant spatial displacement change. This situation is common when a fan continuously blows in a directional manner, causing the radar echo to generate stable clutter at a fixed distance; when a bed curtain maintains a small-amplitude periodic sway in a light breeze; or when a tissue makes local reciprocating motion at an air conditioner vent. Although these interference sources generate signals, their spatial positions remain almost unchanged for a period of time, which is significantly different from the distance migration characteristics of a real human body entering or leaving, which is usually accompanied by continuous displacement of tens of centimeters or more.
[0143] In response to the determination result of ΔR < 15cm, the system directly marks all signals in the current window as environmental interference signals and removes them from the set of disturbance signals as a whole. The unmanned state is output as the filtering result of the current window and is not entered into the subsequent energy domain analysis.
[0144] The second stage involves secondary filtering based on the energy baseline to eliminate weak-energy non-biological interference.
[0145] If the distance range ΔR ≥ 15cm, it indicates that the signal has a certain spatial displacement. At this time, the system activates the energy baseline filtering mechanism to filter the energy value set E = {e1, e2, ..., e} obtained in step S120. nA full sort is performed, and the sorted global values are used for judgment: if all energy values in set E are lower than a preset low energy threshold, preferably 20, which is based on the sensor's measured empirical value of environmental noise when there is no human target, then it is determined that the signal energy in the current window is too weak to characterize human activity. This situation corresponds to small disturbances at a distance, such as curtains swaying slightly at a distance, ventilation ducts vibrating slightly, or inanimate objects reflecting light, such as plastic film swaying, whose reflection cross-section and energy echo are much lower than the signal strength generated by the rise and fall of the human chest cavity.
[0146] In response to the judgment result that all energy values are < 20, the system classifies the current window signal as an environmental interference signal and filters it, outputs an unmanned status, and marks the interference type as weak energy interference for subsequent reporting.
[0147] The third stage involves high-order filtering based on dynamic energy fluctuations to eliminate strong periodic interference.
[0148] If the distance range ΔR ≥ 15cm and there is an energy value ≥ 20, it indicates that the signal has a certain strength and spatial variation, but it may still be due to strong environmental interference, such as the rotation of a fan blade the size of a human body or the violent swaying of a large-scale bed curtain. The system further uses the output dataset of adjacent peak and trough energy differences D = {ΔE1, ΔE2, ...} and its cumulative count C to perform higher-order determination: the system counts the number of times all ΔE values in the statistical dataset D exceed a preset high-energy threshold, preferably 130, to obtain the cumulative count C.
[0149] If C > 5, it indicates frequent and significant energy fluctuations within the 60-second window, with extremely large peaks and troughs. This characteristic typically corresponds to non-biological interference sources with mechanical periodicity or randomness, such as high-speed rotating fan blades repeatedly cutting radar beams or large-scale swaying bed curtains periodically obstructing reflection paths. This contradicts the smooth and regular energy fluctuations characteristic of human breathing or natural walking. In response, the system identifies the current window signal as environmental interference and filters it entirely, outputting an unmanned state.
[0150] If the cumulative count C = 0, meaning that no large energy change ΔE > 130 occurs within the entire 60-second window, it indicates that the signal energy change is gradual and consistent with the typical characteristics of human existence, such as slight chest movements caused by breathing or small movements of a person turning over in bed. The system identifies the signal in this window as a target disturbance signal without environmental interference, confirms the presence of a person, and retains it for output.
[0151] If the cumulative count C satisfies 0 < C ≤ 5, it indicates that there is a certain degree of energy fluctuation in the current window but it has not reached the interference judgment threshold, and the signal attribute is uncertain. To avoid false alarms caused by frequent state transitions, the system activates a hysteresis hold strategy: keeping the output state of the previous window unchanged (i.e., state locking), while temporarily storing the unresolved signals of the current window in a buffer, waiting for the data to be supplemented in the next sliding cycle before re-judging. This mechanism effectively suppresses the instantaneous impact of brief sudden interference, such as people passing by quickly without stopping, on the state output, ensuring the stability of the dormitory check status output.
[0152] The final output of the target disturbance signal.
[0153] After the above three-level filtering, the system successfully separates the filtered environmental interference signals from the original mixed disturbance signal set, including distance-stable interference, weak-energy interference (e.g., all E < 20) and high-fluctuation periodic interference (e.g., C > 5). These signals will be marked as abnormal interference and trigger the information reporting process.
[0154] The retained target disturbance signals include the confirmed manned status C = 0 and the valid signal locked after hysteresis. The target disturbance signals are output to the application layer in the form of manned / unmanned binary status flags and filtered energy characteristic values for subsequent status indication and background reporting.
[0155] Through the above-mentioned cascaded multi-level filtering strategy, the system achieves accurate elimination of environmental interference signals, ensuring that fans, curtains, tissues, etc. can output accurate human presence status in various complex scenarios, meeting the performance requirements of accuracy ≥98% and 60 seconds in interference scenarios.
[0156] S130 also includes S1306-S1307:
[0157] S1306. Based on the distance value and the energy value, perform environmental interference filtering on the current disturbance signal, and send the filtered environmental interference information to the background server for anomaly analysis and display. The anomaly analysis obtains at least one actual environmental interference from the following: fan blowing, bed curtain swaying, and tissue paper moving slightly.
[0158] In this embodiment, after performing preliminary abnormal scenario filtering locally, the MCU main control chip marks the current disturbance signal that cannot be clearly determined to be the presence of a human body but has regular or continuous fluctuation characteristics as suspicious environmental interference. The corresponding feature information is packaged and reported to the backend server through the 4G network based on the MQTT protocol. The backend server then performs refined anomaly analysis, classification and identification, and visualization.
[0159] Based on the output distance and energy values, the system extracts a quantized feature vector F = {f1, f2, f3, f4} to distinguish different types of environmental interference. A Fast Fourier Transform or zero-crossing rate statistical analysis is performed on the energy value set E to obtain the dominant frequency of the current disturbance signal's time-domain fluctuation. The system then encapsulates the aforementioned feature vector F, along with the timestamp of the current window, the device ID, and a summary of the original disturbance signal, including a reduced set of distance / energy sampling points from the last 60 seconds, into a JSON-formatted anomaly reporting data packet, and publishes it to the backend server via a preset topic using the MQTT protocol.
[0160] After receiving the reported data packet, the backend server starts the anomaly analysis engine and uses a combination of rule-based decision-making and pattern matching to perform multi-dimensional classification and identification of the feature vector F, specifically outputting at least one of the following actual environmental interference types:
[0161] Fan-induced interference identification: When the server detects that the fluctuation periodicity f1 is stable between 2Hz and 5Hz (corresponding to the common speed range of electric fans), and the distance drift amplitude f2 is small, usually <30cm, because the fan position is fixed, and the energy fluctuation intensity f3 exhibits highly regular periodic pulses, with the cumulative count C increasing uniformly over time, then the current environmental interference is determined to be "fan-induced interference". The server adds the interference confidence level (e.g., 95%) to the identification result.
[0162] Curtain swaying interference identification: When the server detects that the fluctuation periodicity characteristic f1 is in the low frequency range of 0.3Hz to 1Hz, corresponding to the swaying of the curtains caused by natural wind or air conditioning, and the drift amplitude f2 is relatively large, usually ≥50cm, and because the curtain is wide, and the energy fluctuation intensity f3 shows an asymmetrical slow rise and rapid fall pattern with uneven distribution of peak and trough differences, then the current environmental interference is determined to be "curtain swaying".
[0163] For the identification of paper towel micro-motion interference, when the server detects that the fluctuation periodic feature f1 is random high frequency with no stable fundamental frequency, and the distance drift amplitude f2 is extremely small (usually <10cm), while the energy baseline level f4 is always below the low energy threshold, but the energy fluctuation intensity f3 has occasional spikes, then the current environmental interference is determined to be "paper towel micro-motion".
[0164] If the feature vector F does not match any of the three typical patterns mentioned above, but the energy baseline level f4 remains below the threshold, the server will classify it as an "unknown weak interference" category, pending manual review or model iterative learning.
[0165] After the backend server completes the classification and recognition, it will perform the following display and interaction operations:
[0166] The identified actual environmental interference type, occurrence time, duration, location of the device, and confidence level information will be displayed in real time on the front-end interface of the management platform in the form of charts or alarm cards, reminding administrators that the radar detection in the dormitory area has a known interference source, avoiding misinterpretation as real human activity.
[0167] Meanwhile, the server will send the identified actual environmental interference type back to the corresponding local MCU device via MQTT downlink message or HTTP response, as the basis for the control command for precise filtering in step S1307.
[0168] S1307. In response to the anomaly analysis feedback result from the background server, the actual environmental interference obtained from the analysis is filtered from the current set of disturbance signals to obtain the target disturbance signal without environmental interference.
[0169] In this embodiment, after receiving the anomaly analysis feedback result returned by the backend server, i.e., a clear label of the actual environmental interference type, such as "fan blowing", the local MCU device initiates a targeted interference suppression process to dynamically remove the waveform characteristics of this specific type of interference from the current set of disturbance signals in the sliding window, and finally outputs a pure target disturbance signal representing the presence of the human body.
[0170] Feedback results are analyzed and matched with filtering strategies. The MCU receives feedback messages from the backend server via MQTT subscription topics, and parses out the interference type label and confidence level. Based on different interference types, the system matches corresponding differentiated filtering strategies: if the feedback result is "fan blowing," the system activates an adaptive notch filter locally. Specifically, based on the fluctuation periodicity characteristic f1 returned by the backend, the system precisely locks the frequency component in the spectrum of the energy value sequence E, attenuates its amplitude to less than 10% of its original value, thereby separating the periodic echo component generated by the fan blade rotation from the mixed signal, and retaining the non-periodic human breathing and movement signals.
[0171] If the feedback result is that the bed curtains are fluttering, the system activates the slow-change trend suppression algorithm. It employs a combination of sliding window mean smoothing and trend term extraction to subtract the slowly drifting baseline components from the distance value set R as a trend term.
[0172] In practice, a second-order polynomial is used to fit the distance sequence, and the fitted trend curve is subtracted from the original distance signal, retaining only the local high-frequency detail components. The minute distance changes caused by human breathing are contained in these residual details, thereby filtering out the interference from the fluttering of the bed curtains.
[0173] If the feedback result is a slight movement of the tissue, the system activates a spike suppression and energy threshold enhancement strategy. Since the slight movement of the tissue manifests as an occasional spike with extremely low energy, the system introduces an "energy residence time" constraint in the determination of the energy value set E. When the energy value at a certain moment exceeds the threshold of 130, it is determined whether the spike can persist for more than 200ms. If not, the spike is directly discarded as random noise and does not participate in the subsequent cumulative count C, thereby effectively suppressing false triggers caused by the slight movement of the tissue.
[0174] After matching the appropriate filtering strategy, the system reconstructs all N data units within the current sliding window unit by unit. Based on the reconstructed cleaned window dataset W', the system follows the instructions in the document. Figure 7 The algorithm filtering process shown is re-executed to determine the state.
[0175] Finally, the target disturbance signal without environmental interference is output to the application layer in two ways: GPIO level (high level / low level) and serial port structured data. This is used to drive the local status indicator light and report to the background to update the dormitory occupancy status. In this way, even when there are multiple complex environmental interferences such as fans blowing, curtains fluttering, and tissues moving slightly, the presence of a human body can still be accurately detected, ensuring the accuracy of dormitory checks.
[0176] Through the aforementioned cloud-based collaborative analysis and feedback mechanism, the system achieves a closed-loop interference filtering architecture of local coarse screening, cloud-based fine classification, and local targeted suppression. This effectively overcomes the limitations of a single local algorithm in classification capabilities in complex scenarios and significantly improves the robustness and accuracy of human presence detection in interfering scenarios.
[0177] S140. If the target disturbance signal indicates that someone is in the room, the room check result is determined to be in the room, and the pre-bound target person is marked as in the room.
[0178] After confirming the target personnel ID, the system performs the following operations to determine the person's on-dormitory status and update local records. Upon confirming the dormitory check result, the "occupied" target disturbance signal is logically quantized into an "on-dormitory" result value. This result value is simultaneously bound to the current system time, forming a triplet record of personnel ID, on-dormitory status, and timestamp. The current system time is automatically synchronized by the ML307C module via the cellular network NTP.
[0179] To prevent data loss due to unexpected power outages, the MCU writes the sleep state triplet into the state record area of the Flash file system, ensuring that the device can restore its previous valid state after a restart. A dual-backup storage strategy is employed during writing; if an error occurs in area A, the system automatically switches to area B to guarantee data storage reliability.
[0180] In some embodiments, an LED status indicator is added. The system can also drive the local LED status indicator through the GPIO port to change the light color from green to red when switching from "no one" to "dormitory", and continue to maintain this indication state after the switch until the next status change.
[0181] The non-contact dormitory check device is connected to the backend server. Following S140, this includes S150-S160:
[0182] S150. Send the occupancy status information of the dormitory to the backend server for display of occupancy status;
[0183] Once the "in-dorm" tag is confirmed locally, the system immediately triggers the MQTT status reporting process to synchronize the "in-dorm" tag to the backend server.
[0184] The MCU publishes the aforementioned message body to the topic subscribed to by the backend server via the established MQTT connection with a QoS=1 quality of service level. QoS=1 ensures that the message is successfully received by the server at least once. After sending the PUBLISH message, the MCU starts a timeout timer with a timeout threshold set to 2 seconds. If a PUBACK acknowledgment message is received from the server within the timeout threshold, the reporting is complete and the process ends. If no PUBACK is received within the timeout period, the transmission is considered a failure, triggering a retransmission mechanism. The MCU retransmits the message at exponential backoff intervals of 500ms, 1s, and 2s, up to a maximum of 3 retransmissions. If the transmission still fails after 3 retransmissions, the MCU writes the currently reported message to the local Flash queue for retransmission and displays a local status indicator light (indicating a network error; retransmission will be prioritized after the network recovers).
[0185] After receiving the MQTT report message, the backend server verifies the seq_no anti-replay mechanism. If it confirms that the message has not been processed repeatedly, it parses it and writes it to the database status change history table, while simultaneously updating the latest status record of the current device. The server uses WebSocket long connection or Server-Sent Events technology to send the "occupied / in-dorm" status information to all connected display terminals in real time via incremental push, such as the dormitory management duty room monitoring screen. The bed card of the corresponding dormitory changes from empty / gray status to occupied / red highlighted status, accompanied by a flashing entry animation.
[0186] As an example, the student's dormitory status list item in the counselor's mobile application / mini-program is updated to "In Dormitory✓" and the status update time is displayed;
[0187] As an example, the campus security management platform's web interface marks the dormitory as "checked / normal" on the floor plan, and displays specific personnel information and status time when the mouse hovers over it.
[0188] If the current time is after the nighttime dormitory check deadline (e.g., 23:00), and the dormitory reports "in attendance" for the first time, the server will automatically generate a "dormitory check completed" log for subsequent attendance statistics and screening of abnormal absentees, without requiring manual operation by dormitory staff.
[0189] S160. In response to a change in the presence status information, update the status information in the backend server for display purposes.
[0190] In this embodiment, the system continuously monitors changes in the state of human presence. Once any change occurs in the state, including the entry of someone from no one, the departure of someone from no one, and the intermediate transition from being in the dormitory to being suspected of leaving the dormitory, the state update process is triggered to ensure that the backend server always maintains the latest real state and provides real-time data refresh for the front-end display.
[0191] This application provides a method, apparatus, and computer device for contactless dormitory check-in. The method is applied to a contactless dormitory check-in device, which is installed on a target bed in the dormitory to be checked. The method includes: in response to a disturbance, collecting multiple disturbance signals within a preset area; analyzing the disturbance signals to obtain a distance value from the disturbance source and an energy value characterizing the disturbance intensity; filtering the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: a fan blowing, a curtain swaying, or a tissue moving slightly; if the target disturbance signal indicates someone is present, the dormitory check result is determined to be someone in the dormitory, and the pre-bound target person is marked as present. In this application, automatic dormitory check-in improves efficiency while achieving real-time check-in, resulting in more reliable results, suitable for dynamically changing environments. It can cover real-time dormitory check-in needs throughout the entire time period, improving the reliability of the check-in results.
[0192] In some embodiments, such as Figure 4The diagram shows the network configuration process. It includes enabling the radio frequency (RF) function, detecting the SIM card status, registering with the cellular network, activating the PDP context, and entering the network detection loop. Enabling the RF function means turning on the module's RF via the API function `cm_modem_set_cfun(1)`; otherwise, the SIM card cannot be recognized, and network access is impossible. Detecting the SIM card status involves using the API function `cm_modem_get_cpin()` to wait for the SIM card to be ready and determining whether there is no card, a PIN lock, or a damaged SIM card based on the return value. Registering with the cellular network involves using the API function `cm_modem_get_cereg_state()` to connect the module to the operator's base station.
[0193] Activating the PDP context means obtaining the IP address through the API function cm_modem_get_pdp_state(1). Entering the network detection loop requires that the SIM card be ready, the network be successfully registered, and the PDP be successfully activated simultaneously.
[0194] In some embodiments, such as Figure 5 The diagram shows the information reporting flowchart, which includes steps such as status / abnormal information reporting, server reception, server processing, and backend display. Status / abnormal information reporting includes SIM card abnormalities, network disconnection, prolonged unchanged sensor status, and abnormal interference. MQTT reporting is triggered by status changes, abnormal occurrences, or heartbeats. The server then receives and processes the information, and finally, the backend displays the results.
[0195] Figure 6 This is a schematic block diagram of a non-contact dormitory check device provided in an embodiment of this application. Figure 6 As shown, corresponding to the above-described contactless dormitory check method, this application also provides a contactless dormitory check device 600. The contactless dormitory check device 600 includes a unit for performing the above-described contactless dormitory check method, and can be configured in terminals such as desktop computers, tablet computers, and laptops. Specifically, please refer to... Figure 6 The non-contact dormitory check device 600 includes a signal acquisition and analysis unit 601, a filtering unit 602, and a result output unit 603, wherein:
[0196] The signal acquisition and analysis unit 601 is used to acquire multiple disturbance signals within a preset area in response to the presence of a disturbance.
[0197] The signal acquisition and analysis unit 601 is also used to analyze the disturbance signal to obtain the distance value from the disturbance source and the energy value characterizing the disturbance intensity.
[0198] The filtering unit 602 is used to filter the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference. The environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissue paper moving slightly.
[0199] The result output unit 603 is used to determine the dormitory check result as "in dormitory" if the target disturbance signal indicates that someone is in the dormitory, and to mark the pre-bound target person as "in dormitory".
[0200] In some embodiments, the filtering unit 602 performs environmental interference filtering on the current disturbance signal based on the distance value and the energy value to obtain a target disturbance signal free from environmental interference, specifically for:
[0201] Calculate the difference between the maximum and minimum distance values to obtain the distance difference;
[0202] If the distance difference is within the preset distance difference threshold range, the current disturbance signal that lasts for more than the preset time threshold is recorded as an environmental interference signal.
[0203] If the distance difference exceeds a preset distance difference threshold range, the current disturbance signal whose energy value is within a preset first energy threshold range is recorded as an environmental interference signal.
[0204] If the distance difference exceeds the preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, it is further determined whether it is the environmental interference signal;
[0205] The environmental interference signal is filtered from the set including the current disturbance signal to obtain the target disturbance signal without environmental interference.
[0206] In some embodiments, the filtering unit 602, when performing the function of determining whether a current disturbance signal whose energy value is outside a preset first energy threshold range is an environmental interference signal if the distance difference exceeds a preset distance difference threshold range, specifically uses the following methods:
[0207] If the distance difference exceeds a preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, the signal sequence is obtained by sorting the signals according to the order of their energy values.
[0208] The energy values in the signal sequence are subtracted sequentially to remove noise signals from the signal sequence. The energy difference between the energy value of the noise signal and the energy of the adjacent signal is less than a preset second energy threshold range, and the upper limit of the second energy threshold range is less than the upper limit of the first energy threshold range.
[0209] Add adjacent positive numbers together, and then add adjacent negative numbers together after taking the absolute value of each number until the sum reaches the preset total threshold.
[0210] If the number of signals reaching the total threshold exceeds a preset number, then it is determined to be an environmental interference signal;
[0211] If the number of signals reaching the total threshold does not exceed a preset number, then it is determined that the signal is not an environmental interference signal.
[0212] In some embodiments, the non-contact dormitory check device 600 further includes a server docking module. The non-contact dormitory check device is connected to a backend server. After determining that the dormitory check result is "in the dormitory" if the target disturbance signal indicates that someone is in the dormitory, and marking the pre-bound target person as "in the dormitory", the server docking module is specifically used for:
[0213] The presence status information is sent to the backend server for display purposes.
[0214] In response to a change in the presence of a person, the status information in the backend server is updated for display purposes.
[0215] In some embodiments, when the filtering unit 602 performs environmental interference filtering on the current disturbance signal based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, it is specifically used for:
[0216] Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference. The filtered environmental interference information is sent to the background server for anomaly analysis and display. The anomaly analysis obtains at least one actual environmental interference from the following: fan blowing, curtain swaying, and tissue slightly moving.
[0217] In response to the anomaly analysis feedback result from the backend server, the actual environmental interference obtained from the analysis is filtered out from the current set of disturbance signals to obtain the target disturbance signal without environmental interference.
[0218] In some embodiments, the signal acquisition and analysis unit 601, in response to a present disturbance, acquires multiple disturbance signals within a preset area, specifically for:
[0219] In response to the existing disturbance, the size of the time window for signal acquisition is determined based on the required accuracy of the night check.
[0220] Multiple disturbance signals within a preset area are acquired using a sliding window method based on the time window size.
[0221] In summary, the non-intrusive dormitory check device 600 in this embodiment of the application collects multiple disturbance signals within a preset area in response to existing disturbances; analyzes the disturbance signals to obtain the distance value from the disturbance source and the energy value characterizing the disturbance intensity; filters the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: fan blowing, bed curtains fluttering, and tissue paper moving slightly; if the target disturbance signal indicates that someone is in the dormitory, the dormitory check result is determined to be that the person is in the dormitory, and the pre-bound target person is marked as being in the dormitory. In this application, automatic dormitory check improves efficiency while achieving real-time dormitory check, making the results more reliable and suitable for dynamically changing environments. It can cover the real-time dormitory check needs of the entire time period, improving the reliability of the dormitory check results.
[0222] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned non-contact dormitory check device and its various units can be referred to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and brevity, these details will not be repeated here.
[0223] The aforementioned contactless dormitory check device can be implemented as a computer program, which can, for example... Figure 7 It runs on the computer device shown.
[0224] Please see Figure 7 , Figure 7 This is a schematic block diagram of a computer device 700 provided in an embodiment of this application. The computer device 700 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0225] See Figure 7 The computer device 700 includes a processor 702, a memory, and a network interface 705 connected via a system bus 701. The memory may include a non-volatile storage medium 703 and internal memory 704.
[0226] The non-volatile storage medium 703 may store an operating system 7031 and a computer program 7032. The computer program 7032 includes program instructions that, when executed, cause the processor 702 to perform a non-intrusive sleep check method.
[0227] The processor 702 provides computing and control capabilities to support the operation of the entire computer device 700.
[0228] The internal memory 704 provides an environment for the execution of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can perform a non-sensory sleep check method.
[0229] This network interface 705 is used for network communication with other devices. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 700 to which the present application is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0230] The processor 702 is used to run the computer program 7032 stored in the memory to perform the following steps:
[0231] In response to the presence of disturbance, multiple disturbance signals are collected within a preset area;
[0232] The disturbance signal is analyzed to obtain the distance from the disturbance source and the energy value characterizing the disturbance intensity.
[0233] Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference to obtain a target disturbance signal without environmental interference. The environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissues moving slightly.
[0234] If the target disturbance signal indicates that someone is in the room, the room check result is determined to be in the room, and the pre-bound target person is marked as in the room.
[0235] It should be understood that in the embodiments of this application, the processor 702 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0236] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program instructions. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0237] It should be noted that the specific embodiments are merely illustrative examples intended to aid in understanding the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. The scope of protection of this application is determined by the contents of the claims. Specific embodiments, parameter ranges, or technical features described in the specification should not be construed as undue limitation or expansion of the scope of protection of the claims. The technical effects described in the specification are only used to illustrate the innovation of the present invention. Any technical solution that does not simultaneously possess all the technical features of the present invention, even if it claims to solve the same technical problem, does not fall within the scope of protection of the present invention.
[0238] Therefore, this application also provides a storage medium that can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When executed by a processor, the program instructions cause the processor to perform the following steps:
[0239] In response to the presence of disturbance, multiple disturbance signals are collected within a preset area;
[0240] The disturbance signal is analyzed to obtain the distance from the disturbance source and the energy value characterizing the disturbance intensity.
[0241] Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference to obtain a target disturbance signal without environmental interference. The environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissues moving slightly.
[0242] If the target disturbance signal indicates that someone is in the room, the room check result is determined to be in the room, and the pre-bound target person is marked as in the room.
[0243] The storage medium can be any computer-readable storage medium that can store program code, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0244] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0245] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0246] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the apparatus of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0247] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.
[0248] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A non-intrusive dormitory check method, characterized in that, The method is applied to a non-contact dormitory inspection device, the device being installed on a target bed in the dormitory to be inspected, and the method includes: In response to the presence of disturbance, multiple disturbance signals are collected within a preset area; The disturbance signal is analyzed to obtain the distance from the disturbance source and the energy value characterizing the disturbance intensity. Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference to obtain a target disturbance signal without environmental interference. The environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissues moving slightly. If the target disturbance signal indicates that someone is in the room, the room check result is determined to be in the room, and the pre-bound target person is marked as in the room.
2. The method according to claim 1, characterized in that, Environmental interference filtering is performed on the current disturbance signal based on the distance value and the energy value to obtain a target disturbance signal free from environmental interference, including: Calculate the difference between the maximum and minimum distance values to obtain the distance difference; If the distance difference is within the preset distance difference threshold range, the current disturbance signal that lasts for more than the preset time threshold is recorded as an environmental interference signal. If the distance difference exceeds a preset distance difference threshold range, the current disturbance signal whose energy value is within a preset first energy threshold range is recorded as an environmental interference signal. If the distance difference exceeds the preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, it is further determined whether it is the environmental interference signal; The environmental interference signal is filtered from the set including the current disturbance signal to obtain the target disturbance signal without environmental interference.
3. The method according to claim 2, characterized in that, If the distance difference exceeds a preset distance difference threshold range, then for current disturbance signals whose energy values are outside a preset first energy threshold range, it is further determined whether they are environmental interference signals, including: If the distance difference exceeds a preset distance difference threshold range, then for the current disturbance signal whose energy value is outside the preset first energy threshold range, the signal sequence is obtained by sorting the signals according to the order of their energy values. The energy values in the signal sequence are subtracted sequentially to remove noise signals from the signal sequence. The energy difference between the energy value of the noise signal and the energy of the adjacent signal is less than a preset second energy threshold range, and the upper limit of the second energy threshold range is less than the upper limit of the first energy threshold range. Add adjacent positive numbers together, and then add adjacent negative numbers together after taking the absolute value of each number until the sum reaches the preset total threshold. If the number of signals reaching the total threshold exceeds a preset number, then it is determined to be an environmental interference signal; If the number of signals reaching the total threshold does not exceed a preset number, then it is determined that the signal is not an environmental interference signal.
4. The method according to claim 2, characterized in that, The distance difference threshold range, the preset first energy threshold range, and the preset time threshold are associated with the environmental interference.
5. The method according to claim 1, characterized in that, The non-intrusive dormitory check device is connected to a backend server. If the target disturbance signal indicates someone is present, the check result is determined to be someone in the dormitory, and the pre-bound target person is marked as being in the dormitory. This includes: The occupancy status information of the dormitory will be sent to the backend server for display of occupancy status. In response to a change in the presence of a person, the status information in the backend server is updated for display purposes.
6. The method according to claim 5, characterized in that, The step of filtering the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal free from environmental interference includes: Based on the distance value and the energy value, the current disturbance signal is filtered for environmental interference. The filtered environmental interference information is sent to the background server for anomaly analysis and display. The anomaly analysis obtains at least one actual environmental interference from the following: fan blowing, curtain swaying, and tissue slightly moving. In response to the anomaly analysis feedback result from the backend server, the actual environmental interference obtained from the analysis is filtered out from the current set of disturbance signals to obtain the target disturbance signal without environmental interference.
7. The method according to claim 1, characterized in that, In response to the presence of a disturbance, multiple disturbance signals within a preset area are collected, including: In response to the existing disturbance, the size of the time window for signal acquisition is determined based on the required accuracy of the night check. Multiple disturbance signals within a preset area are acquired using a sliding window method based on the time window size.
8. The method according to claim 1, characterized in that, The non-intrusive dormitory check device includes a hardware layer and a software layer. The hardware layer includes a main control chip for core processing and a sensor module for data acquisition. The software layer includes an application layer, a middleware layer, and a hardware abstraction layer. The application layer is used for status output, background reporting of status information, anomaly filtering, and upgrades. The middleware layer includes a task scheduling module, a communication protocol parsing module, a network connection configuration module, and a sensor driver module. The hardware abstraction layer is used to encapsulate direct operations on the hardware.
9. A non-contact dormitory check device, characterized in that, The method according to any one of claims 1 to 8 is applied to a non-contact dormitory inspection device, the device being installed on a target bed in the dormitory to be inspected, the device comprising: The signal acquisition and analysis unit is used to acquire multiple disturbance signals within a preset area in response to existing disturbances. The signal acquisition and analysis unit is also used to analyze the disturbance signal to obtain the distance value from the disturbance source and the energy value characterizing the disturbance intensity; A filtering unit is used to filter the current disturbance signal for environmental interference based on the distance value and the energy value to obtain a target disturbance signal without environmental interference, wherein the environmental interference includes one or more of the following: fan blowing, curtains swaying, and tissue paper moving slightly. The result output unit is used to determine the dormitory check result as "in dormitory" if the target disturbance signal indicates that someone is in the dormitory, and to mark the pre-bound target person as "in dormitory".
10. A non-contact dormitory check computer device, characterized in that, The method includes a memory, a processor, and a non-intrusive bed-checking program stored in the memory and executable on the processor, wherein the processor executes the non-intrusive bed-checking program to implement the steps of the non-intrusive bed-checking method according to any one of claims 1 to 8.