Control method and device of intelligent closestool, electronic equipment and storage medium
Through radar signal acquisition and processing, the intelligent toilet determines the user's movement status and performs flush judgment or mode switching, solving the problems of automatic flush control misjudgment and privacy violations in the prior art, and improving the recognition accuracy and energy efficiency.
Patent Information
- Application Number
- CN202411644429.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-25
AI Technical Summary
The automatic flush control of existing smart toilets is likely to cause misjudgment, or infringe on user privacy, resulting in user resistance.
Through radar signal acquisition and processing, the user's motion state is determined, and whether to perform flushing or switching modes are performed, so as to realize flushing judgment and mode switching based on radar signal.
Improves the recognition accuracy of automatic flush control, protects user privacy, and reduces the energy consumption of smart toilets when switching to low-energy mode.
Smart Images

Figure CN119689896A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent sanitary ware, and in particular to a control method and device, electronic equipment, and storage medium for an intelligent toilet. Background Art
[0002] A smart toilet is a sanitary ware that integrates a variety of advanced technologies. Unlike traditional toilets, smart toilets do not require manual operation by users. They can automatically perform operations such as opening and closing the toilet lid, flushing, and cleaning according to actual needs, providing users with a more comfortable, hygienic, and intelligent user experience.
[0003] Among them, automatic flushing is one of the main functions of the smart toilet. After the user finishes using the smart toilet, the smart toilet will control the automatic flushing. The user does not need to touch the flush switch with his hands. It is clean and hygienic and brings convenience to the user.
[0004] In one related technology, infrared rays are used to detect whether there is someone near the smart toilet, and if there is someone, the toilet will automatically flush. However, this solution is prone to misjudgment, for example, when someone passes by or stays near the toilet, the toilet will also automatically flush. In another related technology, an infrared camera is used to identify the user's activities for automatic flushing. Although this solution has a high recognition accuracy, it will infringe on the user's privacy, causing users to easily have a certain resistance to such products. Summary of the invention
[0005] In view of the above problems, a control method and device, an electronic device, and a storage medium for a smart toilet are proposed to overcome the above problems or at least partially solve the above problems, including:
[0006] A method for controlling an intelligent toilet, the method comprising:
[0007] Determining an operation mode according to preset configuration information, and collecting radar signals based on the operation mode;
[0008] When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple moments, and the motion state of the user at multiple moments is determined according to the first point cloud information;
[0009] According to the motion state, determining whether to perform flushing or switch to the second mode;
[0010] When the operation mode is the second mode, the radar signal is processed to obtain the distance information of the user, and it is determined whether to switch to the first mode according to the distance information.
[0011] Optionally, the motion state includes a first state, a second state, and a third state, the first state is that the user is not within a preset range, the second state is that the user is moving within the preset range, and the third state is that the user is stationary within the preset range, and judging whether to flush or switch to the second mode according to the motion state includes:
[0012] If the motion state at the target moment is the first state, and the motion state at the second moment is the second state or the third state, flushing is performed; wherein the second moment is a plurality of consecutive moments before the target moment;
[0013] If the motion states at the target moment and the second moment are both the first state, switching to the second mode is performed.
[0014] Optionally, when the operating mode is the first mode, processing the radar signal to obtain first point cloud information at multiple moments, and determining the motion state of the user at multiple moments according to the first point cloud information includes:
[0015] determining a target range within the preset range;
[0016] For each third moment among the multiple moments, dividing the first point cloud information at the third moment into a plurality of second point cloud information within the target range and a plurality of third point cloud information outside the target range;
[0017] Comparing the first quantity of the second point cloud information with the first threshold to obtain a first comparison result, and comparing the second quantity of the third point cloud information with the second threshold to obtain a second comparison result;
[0018] The motion state of the user at the third moment is determined according to the first comparison result and the second comparison result.
[0019] Optionally, the processing the radar signal to obtain the distance information of the user includes:
[0020] Performing fast Fourier transform processing on the radar signal at the target moment and the radar signal at the moment before the target moment, respectively, to obtain first fast Fourier transform information and second fast Fourier transform information;
[0021] The first fast Fourier transform information and the second fast Fourier transform information are differentially processed to obtain differential information, and the distance information is determined based on the differential information.
[0022] Optionally, determining the motion state of the user at the third moment according to the first comparison result and the second comparison result includes:
[0023] If the first comparison result indicates that the first quantity is less than the first threshold value and the second comparison result indicates that the second quantity is greater than or equal to the second threshold value, the motion state at the third moment is the first state;
[0024] If the first comparison result indicates that the first number is greater than or equal to the first threshold, the motion state at the third moment is the second state;
[0025] If the first comparison result indicates that the first quantity is less than the first threshold and the second comparison result indicates that the second quantity is less than the second threshold, and the motion state at the moment before the third moment is the second state or the third state, then the motion state at the third moment is the third state.
[0026] Optionally, the distance information represents the distance between the user and the smart toilet, and the determining whether to switch to the first mode according to the distance information includes:
[0027] If the distance between the user and the smart toilet is less than or equal to a preset distance, the mode is switched to the second mode.
[0028] Optionally, after determining the motion state of the user at multiple moments according to the first point cloud information, the method further includes:
[0029] The motion states of the user at multiple moments are stored in a queue of a preset length.
[0030] A control device for an intelligent toilet, the device comprising:
[0031] A radar signal acquisition module, used to determine an operation mode according to preset configuration information, and to acquire radar signals based on the operation mode;
[0032] a first mode control module, configured to, when the operation mode is the first mode, process the radar signal to obtain first point cloud information at multiple moments, and determine the motion state of the user at multiple moments according to the first point cloud information;
[0033] A flushing and mode switching control module, used to determine whether to flush or switch to the second mode according to the motion state;
[0034] The second mode control module is used to process the radar signal to obtain the user's distance information when the operating mode is the second mode, and determine whether to switch to the first mode according to the distance information.
[0035] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the control method of the smart toilet as described above when executed by the processor.
[0036] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the control method of the smart toilet as described above is implemented.
[0037] The embodiments of the present invention have the following advantages: the embodiments of the present invention determine the operation mode according to preset configuration information, and collect radar signals based on the operation mode. When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple times, and the motion state of the user at multiple times is determined according to the first point cloud information. According to the motion state, it is determined whether to flush or switch to the second mode. When the operation mode is the second mode, the radar signal is processed to obtain the distance information of the user, and according to the distance information, it is determined whether to switch to the first mode. Flushing judgment or mode switching is achieved based on radar signals, and the accuracy of automatic flushing control recognition is improved while protecting user privacy. Moreover, when switching to the second mode, the energy consumption of the smart toilet can be effectively reduced, thereby improving the robustness of the smart toilet. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0039] Figure 1 is a flowchart of a method for controlling a smart toilet provided by an embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of a user's motion state switching process provided by an embodiment of the present invention;
[0041] Figure 3 is a control flow chart of a smart toilet provided by an embodiment of the present invention in a first mode;
[0042] Figure 4 is a control flow chart of a smart toilet provided by an embodiment of the present invention in a second mode;
[0043] Figure 5 is a system architecture diagram of a smart toilet provided by an embodiment of the present invention;
[0044] Figure 6It is a schematic diagram of the operation mode switching of the smart toilet provided by one embodiment of the present invention;
[0045] Figure 7 It is a structural block diagram of a control device for a smart toilet provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Reference Figure 1 , shows a flow chart of a control method of a smart toilet provided by an embodiment of the present invention, which may specifically include the following steps:
[0048] Step 101, determining an operation mode according to preset configuration information, and collecting radar signals based on the operation mode;
[0049] In this embodiment, the operation mode refers to the operation mode in which the smart toilet controls the automatic flushing function, which is divided into a first mode and a second mode, and the first mode and the second mode can be switched between each other. Among them, the first mode is an operation mode for flushing control or mode switching based on point cloud information, that is, a mode for actual flushing control. In the first mode, in order to more accurately determine the user's motion state within the preset range of the smart toilet, more radar signals need to be collected, and the radar signals need to be converted into point cloud information, so the overall energy consumption is high. The second mode is an operation mode for mode switching based on distance information, that is, a detection mode before entering flushing judgment and control. In the second mode, the first mode will be switched only when it is determined through distance information that there is someone within the preset range of the smart toilet. The overall energy consumption of the second mode is low and can be used as a normal operation mode.
[0050] Configuration information can store mode information related to the operating mode, such as the identifier of the current operating mode, so that the control system of the smart toilet can perform corresponding control according to the identifier; it can also define various parameters under different operating modes, such as the frequency, sampling rate, pulse width, etc. of the radar.
[0051] In actual applications, when the system of the smart toilet is initialized, either the first mode or the second mode can be selected as the initial operation mode, ie, the default mode, and the default mode is defined in the configuration information.
[0052] The radar signal may be a signal within a preset range of the smart toilet collected by a radar set in the smart toilet. As an example, the radar signal may be an intermediate frequency signal obtained by the radar by subtracting the transmitted and received chirp signals. In different operating modes, the working mode of the radar collecting signal is also different, and the relevant parameters of the corresponding operating mode can be obtained through configuration information.
[0053] In practical applications, the radar may be a millimeter-wave radar. A millimeter-wave radar is a radar system operating in the millimeter wave frequency band, usually with a frequency range of 30 GHz to 300 GHz, having high distance resolution and angle resolution, and being able to provide more precise target detection and imaging.
[0054] Step 102: When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple moments, and the motion state of the user at multiple moments is determined according to the first point cloud information;
[0055] Point cloud information refers to a data set consisting of a large number of three-dimensional points, each of which usually contains spatial coordinates (such as X, Y, Z) and possible other attributes (such as intensity, color, normal vector, etc.).
[0056] The motion state refers to the user's motion state within the preset range of the smart toilet, such as active, still, or stateless. The motion state can be used to determine whether the user has interacted with the smart toilet, such as using the smart toilet, or leaving the smart toilet after using it.
[0057] In a specific implementation, the radar signal collected at each moment may be processed based on three-dimensional FFT (Fast Fourier Transform), CFAR (Constant False Alarm Rate) and the like to obtain the first point cloud information at multiple moments.
[0058] Furthermore, at each moment, relevant features of the user's motion can be extracted through a large number of spatial coordinates in the first point cloud information, thereby determining the user's motion state.
[0059] Step 103, judging whether to flush or switch to the second mode according to the motion state;
[0060] In a specific implementation, flushing or switching to the second mode is performed according to different judgments of the user's motion state, and then corresponding control is performed. As an example, if the motion state indicates that the user has finished using the smart toilet, flushing is performed; if the motion state indicates that the user is not within the preset range of the smart toilet, switching to the second mode with lower power consumption is performed; if the motion state indicates that the user is using the smart toilet, or has just entered the preset range of the smart toilet, etc., no operation is performed.
[0061] In some embodiments of the present invention, the motion state includes a first state, a second state, and a third state, the first state is that the user is not within a preset range, the second state is that the user is moving within the preset range, and the third state is that the user is stationary within the preset range, and judging whether to flush or switch to the second mode according to the motion state includes:
[0062] If the motion state at the target moment is the first state, and the motion state at the second moment is the second state or the third state, flushing is performed; wherein the second moment is a plurality of consecutive moments before the target moment;
[0063] If the motion states at the target moment and the second moment are both the first state, switching to the second mode is performed.
[0064] In this embodiment, a state machine suitable for the smart toilet scenario is constructed, such as Figure 2 As shown, the state machine includes three motion states of the user within the preset range of the smart toilet, namely, state 1 (i.e., the first state, the user is not within the preset range), state 2 (i.e., the second state, the user is moving within the preset range), and state 3 (i.e., the third state, the user is stationary within the preset range). At multiple moments in a time period, the motion state of the user within the preset range of the smart toilet can remain in any of states 1-3, or be transformed in a predetermined order.
[0065] As an example, when no one is within the preset range of the smart toilet at a certain moment, the user's motion state is state 1; if no one is present for the next multiple consecutive moments, state 1 remains unchanged; when the user walks into the preset range, his motion state changes from state 1 to state 2 at the next moment; if the user in state 2 keeps moving within the preset range, such as walking, making movements that interact with the toilet, etc., his motion state remains unchanged at state 2 for the next multiple consecutive moments; if the user whose motion state is state 2 at a certain moment becomes still at the next moment, such as stopping, sitting still on the smart toilet, etc., he enters state 3; if the user whose motion state is state 3 remains still for multiple consecutive moments, state 3 remains unchanged. It should be noted that state 3 can only be switched from state 2, and cannot be switched directly from state 1 to state 3.
[0066] In this way, the user's motion state is classified into the first state, the second state, and the third state and their conversion relationship is clarified, so that the interaction with the smart toilet can be judged more accurately, and then the corresponding control judgment can be made more accurately.
[0067] Furthermore, in a specific implementation, the target moment can be the current moment when the smart toilet is in operation. If the user's motion state at the current moment is the first state, and each of the multiple second moments read consecutively before the current moment is one of the second state or the third state, it means that the user has finished using the smart toilet, and flushing control is performed at this time; if the current moment and the previous multiple consecutive moments are not the first state, it means that the user has not been in the preset range for a period of time. At this time, in order to save energy, switch to the second mode.
[0068] In some embodiments of the present invention, after determining the motion state of the user at multiple moments according to the first point cloud information, the method further includes:
[0069] The motion states of the user at multiple moments are stored in a queue of a preset length.
[0070] In this embodiment, the preset length corresponds to the total length of a time range, and each element in the queue is the motion state of the user at each moment. For example, a time period with a total length of 10 seconds corresponds to a queue with a length of 10, which stores the motion state of the user per second.
[0071] In a specific implementation, after the motion state of the user is determined at each moment, the corresponding motion state can be stored in the queue of the preset length so as to obtain the motion state at the next moment.
[0072] In some embodiments of the present invention, when the operating mode is the first mode, processing the radar signal to obtain first point cloud information at multiple moments, and determining the motion state of the user at multiple moments according to the first point cloud information includes:
[0073] determining a target range within the preset range;
[0074] For each third moment among the multiple moments, dividing the first point cloud information at the third moment into a plurality of second point cloud information within the target range and a plurality of third point cloud information outside the target range;
[0075] Comparing the first quantity of the second point cloud information with the first threshold to obtain a first comparison result, and comparing the second quantity of the third point cloud information with the second threshold to obtain a second comparison result;
[0076] The motion state of the user at the third moment is determined according to the first comparison result and the second comparison result.
[0077] In this embodiment, the preset range is a three-dimensional space range with the smart toilet as a reference. In a plane perspective, the preset range can be presented in a geometric shape such as a sector or a circle, and the radar collects signals within the preset range. The target range is defined within the preset range and is used to determine the actual range of the user's interaction with the smart toilet.
[0078] In a specific implementation, the target range can be a square box after converting a preset range of the three-dimensional space into a two-dimensional plane. For each third moment, when all radar signals within the preset range are converted into first point cloud information, the first point cloud information within the square box is divided into multiple second point cloud information, and the first point cloud information outside the square box is divided into multiple third point cloud information.
[0079] Furthermore, the amount of the second point cloud information is compared with the first threshold, and the amount of the third point cloud information is compared with the second threshold, so as to determine the motion state of the user at the third moment.
[0080] The above operation is performed for each third moment, so as to obtain the motion status of the user at multiple moments.
[0081] In some embodiments of the present invention, determining the motion state of the user at the third moment according to the first comparison result and the second comparison result includes:
[0082] If the first comparison result indicates that the first quantity is less than the first threshold value and the second comparison result indicates that the second quantity is greater than or equal to the second threshold value, the motion state at the third moment is the first state;
[0083] If the first comparison result indicates that the first number is greater than or equal to the first threshold, the motion state at the third moment is the second state;
[0084] If the first comparison result indicates that the first quantity is less than the first threshold and the second comparison result indicates that the second quantity is less than the second threshold, and the motion state at the moment before the third moment is the second state or the third state, then the motion state at the third moment is the third state.
[0085] In this embodiment, for each third moment, if the first number is less than the first threshold and the second number is greater than or equal to the second threshold, it means that there is no user activity within the preset range, and the user's motion state at this moment is the first state; if the first number is greater than or equal to the first threshold, it means that the user is moving within the preset range, and the user's motion state at this moment is the second state; if the first number is less than the first threshold, and the second number is less than the second threshold, and the motion state before this moment is the second state or the third state, it means that the user remains still within the preset range, and the motion state at this moment is the third state.
[0086] As an example, the operating logic of the smart toilet in the second mode can be as follows Figure 3 As shown, a radar signal (i.e., the original signal) is acquired and processed to obtain point cloud information. According to the above method for determining the target range, a box is drawn within the preset range, and the first point cloud information is divided into second point cloud information within the box and second point cloud information outside the box through the box.
[0087] Furthermore, the amount of second point cloud information and third point cloud information inside and outside the box is calculated, and compared with the preset first threshold and second threshold respectively to obtain a first comparison result and a second comparison result, the motion state at the previous moment is obtained from the queue, and the motion state at the current moment is judged in combination with the first comparison result, the second comparison result, and the third comparison result.
[0088] Furthermore, the motion state is stored in a queue to update the queue storing the motion state (ie, the state queue).
[0089] Finally, the conditions for switching the operating mode or performing flushing control are determined based on the motion state. If the switching conditions are met, the second mode (distance sensing mode) is switched. If the flushing conditions are met, the flushing signal is output to the flushing module of the smart toilet for flushing.
[0090] Step 104: When the operating mode is the second mode, the radar signal is processed to obtain the distance information of the user, and whether to switch to the first mode is determined according to the distance information.
[0091] In some embodiments of the present invention, the step of processing the radar signal to obtain the distance information of the user includes:
[0092] Performing fast Fourier transform processing on the radar signal at the target moment and the radar signal at the moment before the target moment, respectively, to obtain first fast Fourier transform information and second fast Fourier transform information;
[0093] The first fast Fourier transform information and the second fast Fourier transform information are differentially processed to obtain differential information, and the distance information is determined based on the differential information.
[0094] In a specific implementation, the target time may be the current time when the smart toilet is running, such as Figure 4 As shown, in the operation mode of the second mode, the radar signals (i.e., original signals) at the current moment and the previous moment are first processed by fast Fourier transform in the distance dimension to obtain the first fast Fourier transform information corresponding to the current moment and the second fast Fourier transform information corresponding to the previous moment. The first fast Fourier transform information and the second fast Fourier transform information are both range-fft (fast Fourier transform in the distance dimension) information. Each range-fft information can be represented by a complex array, and the elements of the array represent the intensity and phase of the radar signal at different frequency components.
[0095] Further, the first fast Fourier transform information and the second fast Fourier transform information are subjected to differential processing to obtain differential information. As an example, the arrays corresponding to the two fast Fourier transform information may be differentially obtained, and the result obtained is the differential information.
[0096] Furthermore, the first peak value (maximum value) that appears in the array corresponding to the differential information is determined, and the corresponding distance information is extracted according to the peak value, and the distance information is the relevant information about the distance between the user and the smart toilet. In particular, if the differential information at the current moment is all noise (invalid data) or has no peak value at all, the peak value at this moment is set to empty.
[0097] Based on the extracted distance information, the distance between the user and the smart toilet can be determined, and then whether there is someone within the preset range of the smart toilet. If there is someone, it is necessary to switch to the second mode for flushing control (i.e., point cloud sensing mode). If there is no one, repeat the above operation at the next moment.
[0098] In some embodiments of the present invention, the distance information represents the distance between the user and the smart toilet, and the determining whether to switch to the first mode according to the distance information includes:
[0099] If the distance between the user and the smart toilet is less than or equal to a preset distance, the mode is switched to the second mode.
[0100] In a specific implementation, the distance information represents the distance between the user and the smart toilet, which can be represented by a specific distance value, such as m, cm, etc. When the distance between the user and the smart toilet is less than or equal to the preset distance, it means that there is someone within the preset range of the smart toilet, and it is necessary to switch to the first mode for flushing control.
[0101] In some embodiments of the present invention, Figure 5 As shown, a system structure diagram of intelligent toilet control is also provided, the system includes a radar sensing module and a flushing control module, the radar sensing module includes an antenna module and an embedded processor module, as follows:
[0102] If the current mode is the first mode (point cloud perception mode), the embedded processor module will convert the collected radar signal into point cloud information to determine whether flushing is needed, and pass the flushing signal to the flushing control module through the GPIO / UART interface on the radar perception module; if the current mode is the second mode (distance perception mode), the collected radar signal will be converted into distance information to determine whether there is someone near the smart toilet.
[0103] According to the signal processing results of the two modes, the embedded processor module decides whether to switch the mode and transmits the signal of switching the mode to the antenna module so that the antenna module configures and sends the chirp signal of the corresponding mode.
[0104] This mode selection and signal transmission mechanism ensures the efficient operation of the system under different conditions, and can both accurately perceive environmental changes and effectively reduce power consumption.
[0105] For ease of understanding, the switching relationship between the first mode and the second mode can be as follows: Figure 6 As shown, in the first mode, if it is determined that the user's motion state is the first state (i.e., state 1) within a continuous moment, it switches to the second mode; in the second mode, if it is determined through distance information that there is someone within the range of the smart toilet, it switches to the first mode.
[0106] The embodiments of the present invention have the following advantages: the embodiments of the present invention determine the operation mode according to preset configuration information, and collect radar signals based on the operation mode. When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple times, and the motion state of the user at multiple times is determined according to the first point cloud information. According to the motion state, it is determined whether to flush or switch to the second mode. When the operation mode is the second mode, the radar signal is processed to obtain the distance information of the user, and according to the distance information, it is determined whether to switch to the first mode. Flushing judgment or mode switching is achieved based on radar signals, and the accuracy of automatic flushing control recognition is improved while protecting user privacy. Moreover, when switching to the second mode, the energy consumption of the smart toilet can be effectively reduced, thereby improving the robustness of the smart toilet.
[0107] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0108] Reference Figure 7 , shows a schematic diagram of the structure of a control device for a smart toilet provided by an embodiment of the present invention, which may specifically include the following modules:
[0109] A radar signal acquisition module 701, configured to determine an operation mode according to preset configuration information, and to acquire radar signals based on the operation mode;
[0110] A first mode control module 702, configured to, when the operation mode is the first mode, process the radar signal to obtain first point cloud information at multiple moments, and determine the motion state of the user at multiple moments according to the first point cloud information;
[0111] A flushing and mode switching control module 703, used to determine whether to flush or switch to the second mode according to the motion state;
[0112] The second mode control module 704 is used to process the radar signal to obtain the user's distance information when the operating mode is the second mode, and determine whether to switch to the first mode according to the distance information.
[0113] In some embodiments of the present invention, the motion state includes a first state, a second state, and a third state, the first state is that the user is not within a preset range, the second state is that the user is moving within the preset range, and the third state is that the user is stationary within the preset range. The flushing and mode switching control module 703 includes:
[0114] a flushing judgment submodule, configured to perform flushing if the motion state at the target moment is the first state and the motion state at the second moment is the second state or the third state; wherein the second moment is a plurality of consecutive moments before the target moment;
[0115] The second mode switching judgment submodule is used to switch to the second mode if the motion state at the target moment and the motion state at the second moment are both the first state.
[0116] In some embodiments of the present invention, the first mode control module 702 includes:
[0117] A target range determination submodule, used to determine a target range within the preset range;
[0118] a point cloud information division submodule, for dividing, for each third moment among the plurality of moments, the first point cloud information at the third moment into a plurality of second point cloud information within the target range, and a plurality of third point cloud information outside the target range;
[0119] a point cloud information comparison submodule, configured to compare a first quantity of the second point cloud information with a first threshold to obtain a first comparison result, and to compare a second quantity of the third point cloud information with a second threshold to obtain a second comparison result;
[0120] The motion state determination submodule is used to determine the motion state of the user at the third moment according to the first comparison result and the second comparison result.
[0121] In some embodiments of the present invention, the second mode control module 704 includes:
[0122] A fast Fourier transform processing submodule, used to perform fast Fourier transform processing on the radar signal at the target moment and the radar signal at the moment before the target moment, respectively, to obtain first fast Fourier transform information and second fast Fourier transform information;
[0123] The distance information determination submodule is used to perform differential processing on the first fast Fourier transform information and the second fast Fourier transform information to obtain differential information, and determine the distance information based on the differential information.
[0124] In some embodiments of the present invention, the motion state determination submodule includes:
[0125] a first state determining subunit, configured to determine that the motion state at the third moment is the first state if the first comparison result indicates that the first quantity is less than the first threshold value and the second comparison result indicates that the second quantity is greater than or equal to the second threshold value;
[0126] a second state determining subunit, configured to determine that the motion state at the third moment is the second state if the first comparison result indicates that the first number is greater than or equal to the first threshold;
[0127] The third state determination subunit is used to determine that if the first comparison result indicates that the first quantity is less than the first threshold value and the second comparison result indicates that the second quantity is less than the second threshold value, and the motion state at the previous moment before the third moment is the second state or the third state, then the motion state at the third moment is the third state.
[0128] In some embodiments of the present invention, the second mode control module 704 includes:
[0129] The second mode switching submodule is used to switch to the second mode if the distance between the user and the smart toilet is less than or equal to a preset distance.
[0130] In some embodiments of the present invention, the device further comprises:
[0131] The queue processing module is used to store the movement status of the user at multiple moments in a queue of a preset length.
[0132] Some embodiments of the present invention also provide an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the control method of the smart toilet as described above is implemented.
[0133] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the control method of the smart toilet as described above is implemented.
[0134] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above-mentioned smart toilet control method when executed by a processor.
[0135] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0136] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0137] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0138] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0139] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0142] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0144] The control method and device, electronic device, and storage medium of the provided smart toilet are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for controlling an intelligent toilet, characterized in that: The method comprises: Determining an operation mode according to preset configuration information, and collecting radar signals based on the operation mode; When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple moments, and the motion state of the user at multiple moments is determined according to the first point cloud information; According to the motion state, determining whether to perform flushing or switch to the second mode; When the operation mode is the second mode, the radar signal is processed to obtain the distance information of the user, and it is determined whether to switch to the first mode according to the distance information.
2. The method according to claim 1, characterized in that The motion state includes a first state, a second state and a third state, the first state is that the user is not within the preset range, the second state is that the user is moving within the preset range, and the third state is that the user is stationary within the preset range, and judging whether to flush or switch to the second mode according to the motion state includes: If the motion state at the target moment is the first state, and the motion state at the second moment is the second state or the third state, flushing is performed; wherein the second moment is a plurality of consecutive moments before the target moment; If the motion states at the target moment and the second moment are both the first state, switching to the second mode is performed.
3. The method according to claim 2, characterized in that When the operation mode is the first mode, the radar signal is processed to obtain first point cloud information at multiple moments, and the motion state of the user at multiple moments is determined according to the first point cloud information, including: determining a target range within the preset range; For each third moment among the multiple moments, dividing the first point cloud information at the third moment into a plurality of second point cloud information within the target range and a plurality of third point cloud information outside the target range; Comparing the first quantity of the second point cloud information with the first threshold to obtain a first comparison result, and comparing the second quantity of the third point cloud information with the second threshold to obtain a second comparison result; The motion state of the user at the third moment is determined according to the first comparison result and the second comparison result.
4. The method according to claim 1, characterized in that The step of processing the radar signal to obtain the distance information of the user includes: Performing fast Fourier transform processing on the radar signal at the target moment and the radar signal at the moment before the target moment, respectively, to obtain first fast Fourier transform information and second fast Fourier transform information; The first fast Fourier transform information and the second fast Fourier transform information are differentially processed to obtain differential information, and the distance information is determined based on the differential information.
5. The method according to claim 3, characterized in that: The determining the motion state of the user at the third moment according to the first comparison result and the second comparison result includes: If the first comparison result indicates that the first quantity is less than the first threshold value and the second comparison result indicates that the second quantity is greater than or equal to the second threshold value, the motion state at the third moment is the first state; If the first comparison result indicates that the first number is greater than or equal to the first threshold, the motion state at the third moment is the second state; If the first comparison result indicates that the first quantity is less than the first threshold and the second comparison result indicates that the second quantity is less than the second threshold, and the motion state at the moment before the third moment is the second state or the third state, then the motion state at the third moment is the third state.
6. The method according to claim 1 or 4, characterized in that: The distance information represents the distance between the user and the smart toilet, and the determining whether to switch to the first mode according to the distance information includes: If the distance between the user and the smart toilet is less than or equal to a preset distance, the mode is switched to the second mode.
7. The method according to claim 1, characterized in that After determining the motion state of the user at multiple moments according to the first point cloud information, the method further includes: The motion states of the user at multiple moments are stored in a queue of a preset length.
8. A control device for an intelligent toilet, characterized in that: The device comprises: A radar signal acquisition module, used to determine an operation mode according to preset configuration information, and to acquire radar signals based on the operation mode; a first mode control module, configured to, when the operation mode is the first mode, process the radar signal to obtain first point cloud information at multiple moments, and determine the motion state of the user at multiple moments according to the first point cloud information; A flushing and mode switching control module, used to determine whether to flush or switch to the second mode according to the motion state; The second mode control module is used to process the radar signal to obtain the user's distance information when the operating mode is the second mode, and determine whether to switch to the first mode according to the distance information.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the control method of the smart toilet as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the control method of the smart toilet according to any one of claims 1 to 7 is implemented.