Intelligent toilet flushing valve water quantity control method and system based on millimeter wave radar

CN122980529APending Publication Date: 2026-10-27SVAVO TECH (HUIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611078754.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0005]本申请提供了一种基于毫米波雷达的智能便器冲水阀水量控制方法及系统,旨在解决现有便器感应冲水阀普遍采用单一红外传感检测人体存在,冲水参数为固定预设值的问题

Benefits of technology

第一,采用毫米波雷达与红外传感融合的检测方式,结合人体姿态、停留时长、存在状态与距离信息进行综合判断,有效提升行为识别的准确性,降低环境干扰导致的误触发与漏冲水概率,提升冲水控制的可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122980529A_ABST
    Figure CN122980529A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent bathroom equipment control, and provides a water quantity control method and system for a flushing valve of a smart toilet based on a millimeter wave radar. The method collects human posture data and stay duration data in a preset detection range of the toilet through the millimeter wave radar, collects human existence data and distance data in the preset detection range of the toilet through an infrared sensor, identifies a use behavior category of a user, and counts a single use duration of the user according to the use behavior category. According to the identified use behavior category and the counted single use duration, a preset water quantity optimization model is called to determine adaptive flushing quantity parameters and flushing duration parameters. The method effectively improves the accuracy of behavior identification, reduces the probability of false triggering and missed flushing caused by environmental interference, and improves the reliability of flushing control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent bathroom equipment control technology, and in particular to a method and system for controlling the water volume of an intelligent toilet flush valve based on millimeter-wave radar. Background Technology

[0002] Current toilet flush valves generally use a single infrared sensor to detect the presence of a human body, and the flushing parameters are fixed preset values.

[0003] Single infrared sensors have poor anti-interference capabilities and are easily affected by ambient temperature, light and obstructions. They have defects such as false triggering and water leakage. Furthermore, they cannot identify the user's usage behavior type and cannot distinguish the flushing needs of different usage scenarios.

[0004] Fixed flush volume and fixed flush duration control methods cannot match the cleaning requirements of different usage behaviors, which can easily lead to water waste and may also result in insufficient flush cleaning effect, making it impossible to achieve precise water-saving flush control. Summary of the Invention

[0005] This application provides a method and system for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar, aiming to solve the problem that existing toilet sensor flush valves generally use a single infrared sensor to detect the presence of a human body, and the flushing parameters are fixed preset values.

[0006] In a first aspect, embodiments of this application provide a method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar, the method comprising: The system collects human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar, and collects human presence data and distance data within a preset detection range of the toilet using infrared sensors. The system integrates human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories and calculate the duration of a single user session based on these categories. Based on the identified usage behavior categories and the statistically obtained single usage duration, the preset water volume optimization model is invoked to determine the appropriate flushing volume parameters and flushing duration parameters; according to the determined flushing volume parameters and flushing duration parameters, a flushing control command is generated and sent to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

[0007] In some embodiments, the step of collecting human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar includes: transmitting a frequency-modulated continuous wave signal to the preset detection range of the toilet using millimeter-wave radar, and receiving echo signals reflected by the human body within the detection range; performing frequency mixing, filtering, and analog-to-digital conversion processing on the echo signals to extract the micro-motion characteristics and position change characteristics of the human body; generating human posture data based on the micro-motion characteristics and position change characteristics, and generating dwell time data based on the time nodes when the human body enters and leaves the detection range.

[0008] In some embodiments, the step of collecting human presence data and distance data within a preset detection range of the toilet using infrared sensors includes: transmitting infrared detection signals to the preset detection range of the toilet using at least two sets of infrared sensors, receiving infrared feedback signals reflected by the human body within the detection range; generating human presence data based on the presence or absence of the infrared feedback signal, calculating the distance between the human body and the toilet based on the propagation time of the infrared feedback signal, and generating distance data.

[0009] In some embodiments, the process of fusing human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify the user's behavior category includes: using human presence data and distance data as analysis trigger conditions; when a human body is detected to enter a preset distance range and remain there, initiating the analysis and processing of human posture data; extracting three types of features from the human posture data: torso pitch angle, limb movement frequency, and position dwell state; matching these three types of features with a preset behavior feature library; and determining the user's behavior category based on the matching results.

[0010] In some embodiments, the step of calculating the user's single usage duration based on usage behavior categories includes: when a valid usage behavior category is identified, recording the current time as the start time of usage; continuously detecting human presence data and distance data, and when detecting that a human body leaves a preset detection range, recording the current time as the end time of usage; calculating the difference between the end time of usage and the start time of usage to generate the user's single usage duration.

[0011] In some embodiments, the step of calling a preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters includes: inputting the usage behavior category and the single usage duration into the preset water volume optimization model; the water volume optimization model first matches the corresponding basic water volume level and basic flushing duration according to the usage behavior category, and adjusts the flushing volume value and flushing duration value within the adjustable range of the corresponding level according to the value of the single usage duration, thereby generating the final flushing volume parameters and flushing duration parameters.

[0012] In some embodiments, generating flushing control instructions according to determined flushing volume parameters and flushing duration parameters includes: reading flushing volume parameters and flushing duration parameters, converting the parameters into flushing valve opening control quantities and valve opening duration control quantities; and encapsulating the valve opening control quantities and valve opening duration control quantities into flushing control instructions conforming to the flushing valve communication protocol.

[0013] In some embodiments, sending the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation includes: sending the flushing control command to the flushing valve execution unit via a wired communication link; controlling the flushing valve execution unit to adjust the valve opening according to the flushing control command, and simultaneously starting a timer; closing the valve when the timer duration reaches the value corresponding to the flushing duration parameter, thereby completing a single flushing operation.

[0014] In some embodiments, the method further includes: collecting multiple sets of actual water consumption sample data corresponding to different usage behavior categories and different usage durations; performing noise reduction and normalization processing on the sample data to establish a corresponding mapping relationship between usage behavior category, usage duration and flushing volume and flushing duration; generating an initial water consumption optimization model based on the corresponding mapping relationship, and continuously iterating and correcting the model parameters through actual flushing data to form a final water consumption optimization model.

[0015] Secondly, this application provides a smart toilet flush valve water volume control system based on millimeter-wave radar, the system comprising: The data acquisition unit is used to collect human posture data and dwell time data within the preset detection range of the toilet via millimeter-wave radar, and to collect human presence data and distance data within the preset detection range of the toilet via infrared sensor. The duration statistics unit is used to fuse human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories and count the duration of a single user session based on the behavior category. The operation completion unit is used to call the preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters; generate flushing control commands according to the determined flushing volume parameters and flushing duration parameters, and send the flushing control commands to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

[0016] This invention uses millimeter-wave radar and infrared sensors to collaboratively collect multi-dimensional detection data, integrates and identifies user behavior categories and single usage duration, and then adaptively matches flushing volume and flushing duration parameters through a water volume optimization model to ultimately drive the flushing valve to complete the flushing operation. It offers the following advantages: First, a detection method that combines millimeter-wave radar and infrared sensing is adopted. By combining human posture, dwell time, presence status and distance information for comprehensive judgment, the accuracy of behavior recognition is effectively improved, the probability of false triggering and water leakage caused by environmental interference is reduced, and the reliability of flushing control is improved.

[0017] Secondly, the flushing parameters are adaptively adjusted based on the usage behavior category and usage duration. It can output appropriate flushing intensity and flushing duration for different usage scenarios, reducing unnecessary water consumption while ensuring the flushing cleaning effect and achieving precise water saving.

[0018] Third, the method and steps are logically coherent and can be stably executed through programmed instructions. It can be directly adapted to the existing hardware structure of toilet flush valves, making it easy to achieve intelligent upgrades of the product.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0020] 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.

[0021] Figure 1 This is a schematic flowchart illustrating the steps of a method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar, provided in one embodiment of this application. Figure 2 This is a schematic diagram of the structure of a smart toilet flush valve provided in one embodiment of this application; Figure 3 This is a schematic block diagram of a smart toilet flush valve water volume control system based on millimeter-wave radar, provided in one embodiment of this application. Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation

[0023] 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 embodiments of this application, not all embodiments. 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.

[0024] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0025] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0026] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this 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.

[0027] It should also be 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.

[0028] Current toilet flush valves generally use a single infrared sensor to detect the presence of a human body, and the flushing parameters are fixed preset values.

[0029] Single infrared sensors have poor anti-interference capabilities and are easily affected by ambient temperature, light and obstructions. They have defects such as false triggering and water leakage. Furthermore, they cannot identify the user's usage behavior type and cannot distinguish the flushing needs of different usage scenarios.

[0030] Fixed flush volume and fixed flush duration control methods cannot match the cleaning requirements of different usage behaviors, which can easily lead to water waste and may also result in insufficient flush cleaning effect, making it impossible to achieve precise water-saving flush control.

[0031] Please refer to Figure 1 This application provides a method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar. The smart toilet flush valve, for example... Figure 2 As shown, the method is applied to computer equipment. The computer equipment can be deployed on a single server or a server cluster. It can also be deployed on handheld terminals, laptops, wearable devices, or robots, etc. It should be noted that every piece of information involved in the method provided in this application is extracted with the authorization of the relevant user and in accordance with relevant regulations, and will not infringe on user privacy.

[0032] The water volume control method for a smart toilet flush valve based on millimeter-wave radar provided in this application embodiment operates in the main control unit of the smart toilet flush valve. The hardware architecture of the smart toilet flush valve includes a millimeter-wave radar, at least two sets of infrared sensors, a main control unit, and a flush valve execution unit. The millimeter-wave radar and infrared sensors are both installed on the front detection side of the flush valve main unit, facing the toilet usage area. The main control unit has a built-in storage unit and a computing unit for storing preset parameters, running control logic, and executing data calculations. The flush valve execution unit includes a solenoid valve drive circuit and a water circuit solenoid valve for adjusting the water circuit on / off and opening degree according to control commands.

[0033] The provided method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar includes steps S101 to S103. Details are as follows: Step S101. Collect human posture data and dwell time data within the preset detection range of the toilet using millimeter-wave radar, and collect human presence data and distance data within the preset detection range of the toilet using infrared sensors.

[0034] Specifically, this step is the data source acquisition stage of the method, in which the main control unit drives the millimeter-wave radar and infrared sensor to work synchronously to collect human body detection data from different dimensions.

[0035] Before this step, the main control unit pre-configures the detection range parameters for two types of sensors: the millimeter-wave radar's detection range is set to a three-dimensional space extending 1.2 meters forward from the sensor's installation location, with a horizontal angle of 60 degrees and a vertical angle of 40 degrees, covering the entire usable area directly above the toilet; the infrared sensor's detection range is set to a fan-shaped area 0.1 to 1.0 meters away from the sensor, largely overlapping with the millimeter-wave radar's detection range to form a cross-validation detection area. Both types of sensors operate continuously at a fixed sampling frequency, for example, the millimeter-wave radar's sampling frequency is set to 20 Hz, and the infrared sensor's sampling frequency is set to 10 Hz. The sampling frequency parameters can be adjusted according to the detection accuracy requirements of the application scenario.

[0036] The specific execution process of this step is as follows: The main control unit sends a start acquisition command to the millimeter-wave radar. The millimeter-wave radar continuously emits detection signals and receives reflected echoes, extracting the original information of the human body's position and movement from the echoes to generate human posture data and dwell time data, which are then transmitted to the main control unit. Simultaneously, the main control unit sends start acquisition commands to each group of infrared sensors. The infrared sensors emit infrared detection signals and receive reflected signals, generating human presence data and distance data based on the presence and propagation characteristics of the reflected signals, which are then transmitted to the main control unit. The main control unit performs timestamp alignment processing on the data uploaded by the two types of sensors, binding and storing multi-source data collected at the same time to provide a time-matched data source for subsequent fusion operations.

[0037] Step S102. Perform fusion calculations on the human posture data and dwell time data collected by the millimeter-wave radar and the human presence data and distance data collected by the infrared sensor to identify the user's usage behavior category, and calculate the user's single usage time based on the usage behavior category.

[0038] Specifically, this step is the core computational step of the method, which completes the classification and identification of user behavior and the statistics of usage time based on the multi-source data collected in step S101.

[0039] The execution trigger logic of this step adopts a hierarchical wake-up mechanism: the main control unit first performs low-power real-time monitoring of the human presence data and distance data uploaded by the infrared sensor. When a human body is detected to enter a preset distance range and remain there for a preset duration threshold, depth calculation of the millimeter-wave radar data is then initiated to reduce the overall power consumption of the device. After triggering the depth calculation, the main control unit calls a preset data fusion algorithm to perform multi-dimensional cross-verification of the human posture data and dwell time data output by the millimeter-wave radar with the human presence data and distance data output by the infrared sensor: on the one hand, the infrared data verifies the real presence and distance position of the human body, eliminating non-human micro-motion interference detected by the millimeter-wave radar; on the other hand, the posture data of the millimeter-wave radar supplements the details of human movements, making up for the deficiency of the infrared sensor in not being able to identify posture types.

[0040] After completing the fusion verification, the main control unit extracts human behavior features from the valid data and matches them with pre-stored behavior feature templates to identify the user's usage behavior category. After identifying the valid usage behavior category, the main control unit starts the duration statistics logic, taking the moment when the behavior recognition takes effect as the starting point, continuously tracking the changes in the human body's state and location until the human body is detected to have completely left the detection range, at which point the timing stops, and the duration of the user's single usage session is calculated.

[0041] Step S103. Based on the identified usage behavior category and the statistically obtained single usage duration, call the preset water volume optimization model to determine the appropriate flushing volume parameters and flushing duration parameters; generate a flushing control command according to the determined flushing volume parameters and flushing duration parameters, and send the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

[0042] Specifically, this step is the output execution stage of the method. Based on the usage behavior category and single usage duration obtained in step S102, an appropriate flushing control command is generated and the flushing valve is driven to complete the action.

[0043] The specific execution process of this step is as follows: The main control unit uses the identified usage behavior category and the statistically obtained single usage duration as input parameters, and calls the water volume optimization model pre-stored in the storage unit. The water volume optimization model stores a set of basic flushing parameters corresponding to different behavior categories, as well as parameter adjustment rules corresponding to usage duration; the model matches the corresponding basic parameters according to the input behavior category, and then corrects the flushing parameters within a preset adjustable range according to the value of the single usage duration, finally outputting flushing volume parameters and flushing duration parameters adapted to the current usage scenario.

[0044] After obtaining the flushing volume and flushing duration parameters, the main control unit converts these two types of parameters into control quantities that the flushing valve actuator can recognize, and encapsulates them into complete flushing control instructions according to a preset communication protocol format. The main control unit sends the flushing control instructions to the flushing valve actuator via a wired communication link. Upon receiving the instructions, the flushing valve actuator adjusts the opening degree of the solenoid valve according to the opening control quantity in the instructions, and simultaneously starts a timer according to the duration control quantity in the instructions. After the timer expires, the solenoid valve closes, completing a single flushing operation. After the flushing action is completed, the flushing valve actuator returns a feedback signal indicating completion to the main control unit. The main control unit stores the behavior category, usage duration, flushing parameters, and execution result in its local operation log for subsequent model iteration and equipment status analysis.

[0045] In some embodiments, the step of collecting human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar includes: transmitting a frequency-modulated continuous wave signal to the preset detection range of the toilet using millimeter-wave radar, and receiving echo signals reflected by the human body within the detection range; performing frequency mixing, filtering, and analog-to-digital conversion processing on the echo signals to extract the micro-motion characteristics and position change characteristics of the human body; generating human posture data based on the micro-motion characteristics and position change characteristics, and generating dwell time data based on the time nodes when the human body enters and leaves the detection range.

[0046] This embodiment provides a detailed explanation of the specific implementation process of the millimeter-wave radar acquiring human posture data and dwell time data in step S101.

[0047] In this embodiment, the millimeter-wave radar adopts a frequency-modulated continuous wave operating mode, using the industrial-grade millimeter-wave band. Detection is achieved by transmitting linearly frequency-modulated continuous electromagnetic wave signals and receiving the echo signals reflected from the human body. The specific data acquisition process is divided into three stages: The first stage is the signal transmission and echo reception stage. Under the control of the main control unit, the millimeter-wave radar continuously transmits frequency-modulated continuous wave signals according to the preset frequency sweep period and frequency modulation bandwidth. When the signal propagates forward to the human body within the detection range, it generates a reflected echo. The receiving antenna of the millimeter-wave radar collects the reflected echo signal and transmits it to the signal processing front end inside the radar.

[0048] The second stage is the echo signal preprocessing stage. The radar signal processing front end mixes the transmitted signal and the received echo signal to generate an intermediate frequency (IF) signal containing range and velocity information. Then, the IF signal is subjected to analog filtering to remove environmental clutter and circuit noise. Finally, the analog IF signal is converted into a digital signal by an analog-to-digital converter and output to the arithmetic module of the main control unit.

[0049] The third stage is the feature extraction and data generation stage. The main control unit performs a fast Fourier transform on the digital intermediate frequency signal to extract the distance and velocity dimensions from the signal. It then uses an angle estimation algorithm to obtain the orientation angle information of the human body. Based on the distance, velocity, and angle information, it extracts the micro-motion features and position change features of the human body. The micro-motion features include the slight undulations of the human torso and the local motion signal features of the limbs. The position change features include the distance changes, angle shifts, and positional states of the human body within the detection area.

[0050] Based on the above characteristics, the main control unit generates human posture data through posture classification logic. The human posture data includes two basic posture labels: standing posture and sitting posture, as well as the corresponding posture confidence values. At the same time, the main control unit continuously tracks the appearance and disappearance of the human body in the detection area, records the time when the human body enters the detection range and the time when it leaves the detection range, and generates human body dwell time data based on the time nodes of the two moments.

[0051] In some embodiments, the step of collecting human presence data and distance data within a preset detection range of the toilet using infrared sensors includes: transmitting infrared detection signals to the preset detection range of the toilet using at least two sets of infrared sensors, receiving infrared feedback signals reflected by the human body within the detection range; generating human presence data based on the presence or absence of the infrared feedback signal, calculating the distance between the human body and the toilet based on the propagation time of the infrared feedback signal, and generating distance data.

[0052] This embodiment provides a detailed explanation of the specific implementation process of the infrared sensor collecting human presence data and distance data in step S101.

[0053] In this embodiment, two independent infrared ranging sensors are used. These sensors are installed at the upper and lower parts of the front of the flush valve main unit, respectively, forming two detection areas to expand the vertical detection coverage and avoid detection omissions caused by changes in human posture. Each infrared sensor operates based on the time-of-flight ranging principle. The specific data acquisition process is as follows: First, the main control unit synchronously sends detection trigger signals to the two sets of infrared sensors. The transmitting end of the infrared sensor emits an infrared pulse signal in the preset detection direction. When the signal encounters a human body or obstacle during propagation, it is reflected. The receiving end of the infrared sensor collects the reflected infrared feedback signal.

[0054] Secondly, the timing circuit inside the infrared sensor records the propagation time of the infrared pulse signal from transmission to reception, and transmits the propagation time data to the main control unit. The main control unit calculates the straight-line distance between the sensor and the reflecting object based on the speed of infrared light in air and the propagation time, generating corresponding distance data. The two sets of infrared sensors output their respective distance data, and the main control unit fuses and verifies the two sets of data, taking the valid value as the final distance detection result.

[0055] Meanwhile, the main control unit has preset thresholds for determining human presence: when the calculated distance value is within the preset effective detection range and the intensity of the reflected signal exceeds the preset signal strength threshold, it determines that a human body is present within the current detection range and generates corresponding human presence data; when the distance value exceeds the effective detection range or the signal strength is below the threshold, it determines that no human body is present within the current detection range and generates corresponding human presence data. Through dual determination of distance and signal strength, false detections caused by fixed objects such as walls or toilet seats can be effectively eliminated.

[0056] In some embodiments, the process of fusing human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify the user's behavior category includes: using human presence data and distance data as analysis trigger conditions; when a human body is detected to enter a preset distance range and remain there, initiating the analysis and processing of human posture data; extracting three types of features from the human posture data: torso pitch angle, limb movement frequency, and position dwell state; matching these three types of features with a preset behavior feature library; and determining the user's behavior category based on the matching results.

[0057] This embodiment provides a detailed explanation of the specific implementation process of multi-source data fusion operation and usage behavior category identification in step S102.

[0058] This embodiment employs a fusion computing logic combining infrared triggering and millimeter-wave recognition, ensuring both detection response speed and improved behavior recognition accuracy. The specific process is as follows: The first step is to analyze and determine the trigger conditions. The main control unit reads the human presence data and distance data uploaded by the infrared sensor in real time. When a human body is detected to enter the preset trigger distance range and the human body's presence state is maintained for a preset trigger duration threshold, the attitude analysis trigger conditions are determined to be met, and the deep analysis process of the millimeter-wave radar human attitude data is initiated. If the trigger conditions are not met, only the low-power detection state of the infrared sensor is maintained, and the millimeter-wave attitude calculation is not initiated, thereby reducing the standby power consumption of the device.

[0059] The second step is behavioral feature extraction. After triggering posture analysis, the main control unit extracts three core features from the human posture data output by the millimeter-wave radar: The first is the trunk pitch angle feature, which calculates the angle between the trunk axis and the vertical direction by fitting the spatial posture of the human trunk, reflecting the degree of bending or sitting posture; the second is the limb movement frequency feature, which counts the number of micro-movements of the human limbs and trunk per unit time, reflecting the activity level of the human body; the third is the positional dwell time feature, which counts the continuous dwell time of the human body in the same position within the detection area, reflecting the positional stability of the human body.

[0060] The third step is behavioral feature matching and recognition. The main control unit inputs the three types of extracted features into a pre-stored behavioral feature library, which pre-stores standard feature intervals corresponding to different usage behaviors. The main control unit calculates the matching degree between the three types of currently extracted features and each standard behavioral feature interval. When the overall matching degree exceeds a preset matching threshold, the corresponding behavior category is determined to be the current user's usage behavior category. In this embodiment, the usage behavior categories include urination and defecation behaviors, each corresponding to different feature intervals. The feature library can be constructed and calibrated through prior sample training.

[0061] In some embodiments, the step of calculating the user's single usage duration based on usage behavior categories includes: when a valid usage behavior category is identified, recording the current time as the start time of usage; continuously detecting human presence data and distance data, and when detecting that a human body leaves a preset detection range, recording the current time as the end time of usage; calculating the difference between the end time of usage and the start time of usage to generate the user's single usage duration.

[0062] This embodiment provides a detailed explanation of the specific implementation process of calculating the duration of a user's single use based on the usage behavior category in step S102.

[0063] In this embodiment, the usage time statistics are based on the results of valid usage behavior identification to avoid invalid timekeeping in non-usage scenarios. The specific statistical process is as follows: First, the timing start point is determined. When the main control unit completes the identification of the usage behavior category and the identification result is a valid usage behavior, it reads the current system time and records it as the usage start time, and at the same time starts the duration timer to accumulate the time. If the behavior identification result is a non-usage behavior, such as a person passing by or staying briefly, the duration statistics logic is not started, and the detection state continues.

[0064] Secondly, the timing process is continuously tracked. During the timing process, the main control unit continuously reads the detection data from the infrared sensor and millimeter-wave radar to verify the presence and positional changes of the human body in real time. If the human body is detected to briefly leave the detection range and the duration of the departure is less than the preset short-term departure threshold, it is determined to be temporary movement, and the timing is not terminated, but the current timing value continues to accumulate; if the duration of the departure exceeds the short-term departure threshold, it is determined to be the user's termination of use, and the timing is terminated.

[0065] Finally, the timing endpoint is determined and the duration is calculated. When the main control unit detects that a human body has completely left the preset detection range and no human body signal has been detected for several consecutive sampling cycles, it reads the current system time and records it as the end time of use. The main control unit calculates the time difference between the end time of use and the start time of use, and stores the corresponding difference as the user's single usage duration for subsequent flushing parameter matching.

[0066] In some embodiments, the step of calling a preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters includes: inputting the usage behavior category and the single usage duration into the preset water volume optimization model; the water volume optimization model first matches the corresponding basic water volume level and basic flushing duration according to the usage behavior category, and adjusts the flushing volume value and flushing duration value within the adjustable range of the corresponding level according to the value of the single usage duration, thereby generating the final flushing volume parameters and flushing duration parameters.

[0067] This embodiment provides a detailed explanation of the specific implementation process of calling the water volume optimization model to determine the flushing volume parameters and flushing duration parameters in step S103.

[0068] In this embodiment, the water volume optimization model adopts a two-level adjustment mechanism of "basic level matching + dynamic duration adjustment" to achieve adaptive matching of flushing parameters. The specific process is as follows: The first step is basic flush setting matching. The main control unit inputs the identified usage behavior category into the water volume optimization model. The model then matches the corresponding basic flush setting from a pre-stored parameter setting table based on the behavior category. For example, if the behavior is identified as urination, the basic flush setting for urination is matched, corresponding to a basic flush volume and a basic flush duration; if the behavior is identified as defecation, the basic flush setting for defecation is matched, corresponding to a higher basic flush volume and a longer basic flush duration. Each basic setting has corresponding lower and upper limits for parameters to ensure that the adjusted flush parameters always meet basic cleaning requirements without causing excessive waste.

[0069] The second step is dynamic adjustment of flushing duration. After matching the base setting, the model uses the statistically obtained single-use duration as the adjustment input, adjusting the flushing parameters within the adjustable range of the corresponding setting based on the numerical value of the usage duration. The specific adjustment rules are as follows: the usage duration is divided into multiple consecutive duration intervals, each interval corresponding to a different parameter adjustment ratio; the longer the usage duration, the higher the adjustment ratio between flush volume and flushing duration. The parameter adjustment follows a preset linear or piecewise linear pattern to ensure that the flushing intensity is positively correlated with the cleaning needs of the usage scenario.

[0070] The third step is the final parameter output. After completing the gear matching and duration adjustment, the model calculates the final flush volume parameters and flush duration parameters. The flush volume parameter corresponds to the valve opening degree of the flush valve, and the flush duration parameter corresponds to the continuous opening duration of the valve. Both types of parameters are output in numerical form to the instruction generation module of the main control unit.

[0071] In some embodiments, generating flushing control instructions according to determined flushing volume parameters and flushing duration parameters includes: reading flushing volume parameters and flushing duration parameters, converting the parameters into flushing valve opening control quantities and valve opening duration control quantities; and encapsulating the valve opening control quantities and valve opening duration control quantities into flushing control instructions conforming to the flushing valve communication protocol.

[0072] This embodiment provides a detailed explanation of the specific implementation process of generating flushing control commands in step S103.

[0073] In this embodiment, the generation of flushing control commands follows a preset communication protocol specification to ensure that the flushing valve execution unit can accurately identify and execute the commands. The specific generation process is as follows: First, control quantity conversion. The main control unit reads the flushing volume parameters and flushing duration parameters output by the water volume optimization model, and converts the flushing volume parameters into valve opening control quantities for the flushing valve. The valve opening control quantities are expressed as percentage values, corresponding to the degree of opening of the solenoid valve. The flushing duration parameters are converted into valve opening duration control quantities, expressed as integer values ​​in milliseconds, corresponding to the continuous energization time of the solenoid valve.

[0074] Secondly, the command frame is encapsulated. The main control unit encapsulates the valve opening control quantity, valve opening duration control quantity, and command checksum into a complete flushing control command frame according to a preset serial communication protocol format. The command frame includes a frame header, device address, command type, data, and checksum. The frame header identifies the start of the command, the device address matches the target flushing valve execution unit, the command type identifies the current command as a flushing control command, the data carries the opening and duration control quantities, and the checksum verifies the integrity of the command transmission to prevent data errors during transmission that could lead to malfunctions.

[0075] Finally, instruction caching and transmission triggering. The encapsulated flush control instruction is first stored in the transmission buffer of the main control unit. After the main control unit detects that the user has completely left the detection range and the flush triggering conditions are met, it sends the instruction in the buffer to the flush valve execution unit through the communication interface.

[0076] In some embodiments, sending the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation includes: sending the flushing control command to the flushing valve execution unit via a wired communication link; controlling the flushing valve execution unit to adjust the valve opening according to the flushing control command, and simultaneously starting a timer; closing the valve when the timer duration reaches the value corresponding to the flushing duration parameter, thereby completing a single flushing operation.

[0077] This embodiment provides a detailed description of the specific implementation process of sending the flushing control command and driving the flushing valve to complete the flushing operation in step S103.

[0078] This embodiment uses wired communication to transmit control commands, ensuring the stability and reliability of command transmission. The specific execution process is as follows: First, command transmission. The main control unit sends flushing control commands to the drive control terminal of the flushing valve actuator unit via a serial wired communication link. The communication link uses shielded ribbon cable connection, which can effectively shield electromagnetic interference in the humid environment of the bathroom and ensure the accuracy of command transmission.

[0079] Secondly, valve opening adjustment. After receiving the flushing control command, the flushing valve actuator first verifies the command frame. If the verification is successful, it parses out the valve opening control quantity and the valve opening duration control quantity. The drive circuit outputs a drive signal with a corresponding duty cycle according to the opening control quantity, controlling the solenoid valve core to open to the corresponding opening degree, so that the water circuit outputs water according to the set flow rate.

[0080] Finally, duration control and valve closure. Simultaneously with the opening of the solenoid valve, the timing module of the flushing valve actuator starts timing, comparing the current timing value with the opening duration control value in real time during the timing process. When the timing value reaches the value corresponding to the opening duration control value, the drive circuit cuts off the power supply signal to the solenoid valve, the valve core closes under the action of the reset mechanism, the water circuit is cut off, and a single flushing operation is completed. After the flushing operation is completed, the flushing valve actuator returns a feedback signal indicating completion to the main control unit, which updates the equipment operating status and records the flushing log.

[0081] In some embodiments, the method further includes: collecting multiple sets of actual water consumption sample data corresponding to different usage behavior categories and different usage durations; performing noise reduction and normalization processing on the sample data to establish a corresponding mapping relationship between usage behavior category, usage duration and flushing volume and flushing duration; generating an initial water consumption optimization model based on the corresponding mapping relationship, and continuously iterating and correcting the model parameters through actual flushing data to form a final water consumption optimization model.

[0082] This embodiment provides a detailed explanation of the construction and iteration process of the water optimization model. After the water optimization model is pre-built, it is stored in the storage module of the main control unit for use in the flushing control process. The specific construction process is as follows: The first step was sample data collection. A large number of real-world usage samples were collected in multi-scenario testing environments. Each sample group included usage behavior category labels, single usage duration, corresponding flush volume, flushing time, and cleaning effect evaluation data. Sample collection covered users of different genders and body types, as well as scenarios with different usage habits, ensuring the diversity and representativeness of the sample data.

[0083] The second step is sample data preprocessing. The collected raw sample data is denoised to remove invalid samples with abnormal usage time, abnormal flushing volume, or substandard cleaning effect, as well as interference data caused by accidental triggering or equipment failure. After denoising, all sample data is normalized to map parameter values ​​of different dimensions to a unified numerical range, eliminating the impact of dimensional differences on model construction.

[0084] The third step is to establish mapping relationships and generate the initial model. Based on the preprocessed sample data, the correspondence between usage time and flush volume, and flush duration under different usage behavior categories is statistically analyzed, and a segmented mapping relationship table between behavior category, usage time, and flush parameters is established. Based on the mapping relationship table, basic gear parameters and duration adjustment rules are set to generate an initial water volume optimization model.

[0085] The fourth step is model iteration and correction. After the initial model is put into actual use, usage data and flushing effect feedback data are continuously collected during actual operation, and new data are added to the sample library periodically. Based on the expanded sample library, the mapping relationship parameters are recalculated, and the model's level thresholds and adjustment ratios are corrected to ensure that the model continuously adapts to the needs of actual use scenarios, forming a continuous optimization model iteration mechanism.

[0086] In some embodiments, the main control unit has built-in device status monitoring logic. While executing the flushing control process, it collects the working status data of each hardware module in real time, including the echo signal strength of the millimeter-wave radar, the feedback signal quality of the infrared sensor, the driving current value of the flushing valve actuator and the valve action feedback signal.

[0087] The fault self-diagnosis logic operates according to a hierarchical detection mechanism: The first level is power-on self-test. Every time the equipment is powered on, the main control unit sends self-test commands to each module in sequence. Each module returns working status parameters. The main control unit determines whether each module is in normal working condition. If an abnormality is detected in a module, a corresponding fault code is generated. The second level is real-time monitoring during operation. During normal operation of the equipment, the main control unit periodically reads the working parameters of each module. When the parameters continuously deviate from the normal working range, it is determined that the corresponding module has experienced performance degradation or failure.

[0088] For different levels of faults, the equipment executes corresponding handling strategies: for minor faults such as slight decrease in sensor sensitivity, the main control unit automatically starts the calibration process, adjusts the detection threshold to compensate for the performance decline, and maintains normal equipment operation; for severe faults such as sensor failure or valve malfunction, the main control unit locks the automatic flushing function to prevent water leakage or accidental flushing, and generates fault information including fault type and fault time.

[0089] Fault information is uploaded to the cloud-based operation and maintenance platform via a wireless communication module. The platform can centrally manage the operating status of multiple devices and push fault alarm information to operation and maintenance personnel. Operation and maintenance personnel can remotely issue diagnostic commands through the platform, retrieve the device's operating logs and fault details, and realize remote troubleshooting and maintenance, forming a complete closed loop of "fault detection - fault reporting - remote operation and maintenance - status feedback", which significantly reduces the operation and maintenance cost of the device and the fault response time.

[0090] Please see Figure 3 As shown, Figure 3This is a schematic diagram of the structure of a millimeter-wave radar-based smart toilet flush valve water volume control system 200 provided in this application embodiment. The millimeter-wave radar-based smart toilet flush valve water volume control system 200 is used to execute the steps of the millimeter-wave radar-based smart toilet flush valve water volume control method shown in the above embodiments. The millimeter-wave radar-based smart toilet flush valve water volume control system 200 can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, laptop computer, wearable device, or robot.

[0091] like Figure 3 As shown, the intelligent toilet flush valve water volume control system 200 based on millimeter-wave radar includes: The data acquisition unit 201 is used to acquire human posture data and dwell time data within the preset detection range of the toilet via millimeter-wave radar, and to acquire human presence data and distance data within the preset detection range of the toilet via infrared sensor. The duration statistics unit 202 is used to perform fusion calculations on human posture data and dwell time data collected by millimeter-wave radar and human presence data and distance data collected by infrared sensor to identify the user's usage behavior category and count the user's single usage time based on the usage behavior category; The operation completion unit 203 is used to call the preset water volume optimization model according to the identified usage behavior category and the statistically obtained single usage duration, determine the appropriate flushing volume parameters and flushing duration parameters; generate flushing control commands according to the determined flushing volume parameters and flushing duration parameters, and send the flushing control commands to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

[0092] In some embodiments, the step of collecting human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar includes: transmitting a frequency-modulated continuous wave signal to the preset detection range of the toilet using millimeter-wave radar, and receiving echo signals reflected by the human body within the detection range; performing frequency mixing, filtering, and analog-to-digital conversion processing on the echo signals to extract the micro-motion characteristics and position change characteristics of the human body; generating human posture data based on the micro-motion characteristics and position change characteristics, and generating dwell time data based on the time nodes when the human body enters and leaves the detection range.

[0093] In some embodiments, the step of collecting human presence data and distance data within a preset detection range of the toilet using infrared sensors includes: transmitting infrared detection signals to the preset detection range of the toilet using at least two sets of infrared sensors, receiving infrared feedback signals reflected by the human body within the detection range; generating human presence data based on the presence or absence of the infrared feedback signal, calculating the distance between the human body and the toilet based on the propagation time of the infrared feedback signal, and generating distance data.

[0094] In some embodiments, the process of fusing human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify the user's behavior category includes: using human presence data and distance data as analysis trigger conditions; when a human body is detected to enter a preset distance range and remain there, initiating the analysis and processing of human posture data; extracting three types of features from the human posture data: torso pitch angle, limb movement frequency, and position dwell state; matching these three types of features with a preset behavior feature library; and determining the user's behavior category based on the matching results.

[0095] In some embodiments, the step of calculating the user's single usage duration based on usage behavior categories includes: when a valid usage behavior category is identified, recording the current time as the start time of usage; continuously detecting human presence data and distance data, and when detecting that a human body leaves a preset detection range, recording the current time as the end time of usage; calculating the difference between the end time of usage and the start time of usage to generate the user's single usage duration.

[0096] In some embodiments, the step of calling a preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters includes: inputting the usage behavior category and the single usage duration into the preset water volume optimization model; the water volume optimization model first matches the corresponding basic water volume level and basic flushing duration according to the usage behavior category, and adjusts the flushing volume value and flushing duration value within the adjustable range of the corresponding level according to the value of the single usage duration, thereby generating the final flushing volume parameters and flushing duration parameters.

[0097] In some embodiments, generating flushing control instructions according to determined flushing volume parameters and flushing duration parameters includes: reading flushing volume parameters and flushing duration parameters, converting the parameters into flushing valve opening control quantities and valve opening duration control quantities; and encapsulating the valve opening control quantities and valve opening duration control quantities into flushing control instructions conforming to the flushing valve communication protocol.

[0098] In some embodiments, sending the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation includes: sending the flushing control command to the flushing valve execution unit via a wired communication link; controlling the flushing valve execution unit to adjust the valve opening according to the flushing control command, and simultaneously starting a timer; closing the valve when the timer duration reaches the value corresponding to the flushing duration parameter, thereby completing a single flushing operation.

[0099] In some embodiments, the method further includes: collecting multiple sets of actual water consumption sample data corresponding to different usage behavior categories and different usage durations; performing noise reduction and normalization processing on the sample data to establish a corresponding mapping relationship between usage behavior category, usage duration and flushing volume and flushing duration; generating an initial water consumption optimization model based on the corresponding mapping relationship, and continuously iterating and correcting the model parameters through actual flushing data to form a final water consumption optimization model.

[0100] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the intelligent toilet flush valve water volume control system and each module described above based on millimeter-wave radar can be referred to the corresponding content in the various embodiments of the intelligent toilet flush valve water volume control method based on millimeter-wave radar, and will not be repeated here.

[0101] The aforementioned method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar can be implemented as a computer program, which can be used in various applications such as... Figure 3 It runs on the system shown.

[0102] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.

[0103] The storage medium can store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any millimeter-wave radar-based smart toilet flush valve water volume control method.

[0104] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0105] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar.

[0106] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 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 terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0107] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also 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. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0108] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: The system collects human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar, and collects human presence data and distance data within a preset detection range of the toilet using infrared sensors. The system integrates human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories and calculate the duration of a single user session based on these categories. Based on the identified usage behavior categories and the statistically obtained single usage duration, the preset water volume optimization model is invoked to determine the appropriate flushing volume parameters and flushing duration parameters; according to the determined flushing volume parameters and flushing duration parameters, a flushing control command is generated and sent to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

[0109] In some embodiments, the step of collecting human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar includes: transmitting a frequency-modulated continuous wave signal to the preset detection range of the toilet using millimeter-wave radar, and receiving echo signals reflected by the human body within the detection range; performing frequency mixing, filtering, and analog-to-digital conversion processing on the echo signals to extract the micro-motion characteristics and position change characteristics of the human body; generating human posture data based on the micro-motion characteristics and position change characteristics, and generating dwell time data based on the time nodes when the human body enters and leaves the detection range.

[0110] In some embodiments, the step of collecting human presence data and distance data within a preset detection range of the toilet using infrared sensors includes: transmitting infrared detection signals to the preset detection range of the toilet using at least two sets of infrared sensors, receiving infrared feedback signals reflected by the human body within the detection range; generating human presence data based on the presence or absence of the infrared feedback signal, calculating the distance between the human body and the toilet based on the propagation time of the infrared feedback signal, and generating distance data.

[0111] In some embodiments, the process of fusing human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify the user's behavior category includes: using human presence data and distance data as analysis trigger conditions; when a human body is detected to enter a preset distance range and remain there, initiating the analysis and processing of human posture data; extracting three types of features from the human posture data: torso pitch angle, limb movement frequency, and position dwell state; matching these three types of features with a preset behavior feature library; and determining the user's behavior category based on the matching results.

[0112] In some embodiments, the step of calculating the user's single usage duration based on usage behavior categories includes: when a valid usage behavior category is identified, recording the current time as the start time of usage; continuously detecting human presence data and distance data, and when detecting that a human body leaves a preset detection range, recording the current time as the end time of usage; calculating the difference between the end time of usage and the start time of usage to generate the user's single usage duration.

[0113] In some embodiments, the step of calling a preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters includes: inputting the usage behavior category and the single usage duration into the preset water volume optimization model; the water volume optimization model first matches the corresponding basic water volume level and basic flushing duration according to the usage behavior category, and adjusts the flushing volume value and flushing duration value within the adjustable range of the corresponding level according to the value of the single usage duration, thereby generating the final flushing volume parameters and flushing duration parameters.

[0114] In some embodiments, generating flushing control instructions according to determined flushing volume parameters and flushing duration parameters includes: reading flushing volume parameters and flushing duration parameters, converting the parameters into flushing valve opening control quantities and valve opening duration control quantities; and encapsulating the valve opening control quantities and valve opening duration control quantities into flushing control instructions conforming to the flushing valve communication protocol.

[0115] In some embodiments, sending the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation includes: sending the flushing control command to the flushing valve execution unit via a wired communication link; controlling the flushing valve execution unit to adjust the valve opening according to the flushing control command, and simultaneously starting a timer; closing the valve when the timer duration reaches the value corresponding to the flushing duration parameter, thereby completing a single flushing operation.

[0116] In some embodiments, the method further includes: collecting multiple sets of actual water consumption sample data corresponding to different usage behavior categories and different usage durations; performing noise reduction and normalization processing on the sample data to establish a corresponding mapping relationship between usage behavior category, usage duration and flushing volume and flushing duration; generating an initial water consumption optimization model based on the corresponding mapping relationship, and continuously iterating and correcting the model parameters through actual flushing data to form a final water consumption optimization model.

[0117] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the intelligent toilet flush valve water volume control method based on millimeter-wave radar provided in any embodiment of this application.

[0118] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0119] The above description is merely a specific embodiment 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 method for controlling the water volume of a smart toilet flush valve based on millimeter-wave radar, characterized in that, include: The system collects human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar, and collects human presence data and distance data within a preset detection range of the toilet using infrared sensors. The system integrates human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories and calculate the duration of a single user session based on these categories. Based on the identified usage behavior categories and the statistically obtained single usage duration, the preset water volume optimization model is invoked to determine the appropriate flushing volume parameters and flushing duration parameters; according to the determined flushing volume parameters and flushing duration parameters, a flushing control command is generated and sent to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.

2. The method according to claim 1, characterized in that, The process of collecting human posture data and dwell time data within a preset detection range of the toilet using millimeter-wave radar includes: The system transmits frequency-modulated continuous wave signals to a preset detection range of the toilet using millimeter-wave radar and receives echo signals reflected by the human body within the detection range. The echo signal is mixed, filtered, and converted from analog to digital to extract the micro-motion features and positional change features of the human body. Human posture data is generated based on micro-motion and position change features, and dwell time data is generated based on the time points when the human enters and leaves the detection range.

3. The method according to claim 1, characterized in that, The method of collecting human presence and distance data within a preset detection range of the toilet using an infrared sensor includes: At least two sets of infrared sensors emit infrared detection signals into a preset detection range of the toilet and receive infrared feedback signals reflected by the human body within the detection range. The presence of a human body is generated based on the presence or absence of an infrared feedback signal. The distance between the human body and the toilet is calculated based on the propagation time of the infrared feedback signal, and distance data is generated.

4. The method according to claim 1, characterized in that, The process involves fusing human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories, including: The human body presence data and distance data are used as analysis trigger conditions. When a human body is detected to enter the preset distance range and remain there, the analysis and processing of human posture data is initiated. Three types of features are extracted from human posture data: torso pitch angle, limb movement frequency, and positional dwell state. These three types of features are then matched with a pre-set behavioral feature database, and the user's usage behavior category is determined based on the matching results.

5. The method according to claim 1, characterized in that, The method of calculating the duration of a user's single use based on usage behavior categories includes: When a valid usage behavior category is identified, the current time is recorded as the start time of use; human presence data and distance data are continuously detected, and when a human body is detected to leave the preset detection range, the current time is recorded as the end time of use; Calculate the difference between the end time and the start time of use to generate the duration of a single user session.

6. The method according to claim 1, characterized in that, The process involves calling a preset water volume optimization model based on the identified usage behavior categories and the statistically obtained single usage duration to determine suitable flushing volume and flushing duration parameters, including: Input the behavior category and single usage duration into the preset water volume optimization model; The water volume optimization model first matches the corresponding basic water volume level and basic flushing time according to the usage behavior category. Then, it adjusts the flushing volume and flushing time values ​​within the adjustable range of the corresponding level based on the value of the single usage time, generating the final flushing volume and flushing time parameters.

7. The method according to claim 1, characterized in that, The process of generating flushing control commands according to the determined flushing volume parameters and flushing duration parameters includes: Read the flushing volume and flushing duration parameters, and convert the parameters into flushing valve opening control quantity and valve opening duration control quantity; The valve opening control quantity and the valve opening duration control quantity are encapsulated into a flushing control command that conforms to the flushing valve communication protocol.

8. The method according to claim 1, characterized in that, The step of sending the flushing control command to the flushing valve execution unit to drive the flushing valve to complete the flushing operation includes: The flushing control command is sent to the flushing valve execution unit via a wired communication link; The flush valve control unit adjusts the valve opening according to the flush control command and starts the timer. When the timer reaches the value corresponding to the flush duration parameter, the valve is closed to complete a single flush operation.

9. The method according to claim 1, characterized in that, The method further includes: Collect multiple sets of actual water consumption sample data corresponding to different usage behavior categories and different usage durations; The sample data was denoised and normalized to establish a mapping relationship between usage behavior categories, usage duration and flush volume and flush duration. An initial water volume optimization model is generated based on the corresponding mapping relationship. The model parameters are continuously iterated and corrected using actual flushing data to form the final water volume optimization model.

10. A smart toilet flush valve water volume control system based on millimeter-wave radar, used to implement the method as described in any one of claims 1-9, characterized in that, include: The data acquisition unit is used to collect human posture data and dwell time data within the preset detection range of the toilet via millimeter-wave radar, and to collect human presence data and distance data within the preset detection range of the toilet via infrared sensor. The duration statistics unit is used to fuse human posture data and dwell time data collected by millimeter-wave radar with human presence data and distance data collected by infrared sensors to identify user behavior categories and count the duration of a single user session based on the behavior category. The operation completion unit is used to call the preset water volume optimization model based on the identified usage behavior category and the statistically obtained single usage duration to determine the appropriate flushing volume parameters and flushing duration parameters; generate flushing control commands according to the determined flushing volume parameters and flushing duration parameters, and send the flushing control commands to the flushing valve execution unit to drive the flushing valve to complete the flushing operation.