Control method, device, equipment and storage medium of drinking water equipment
The wearable device uses the frequency changes generated by the vibration of the air in the container to determine whether the water cup is full, solving the problems of water overflow and waste in the existing technology, and achieving precise control and safe operation of drinking water equipment.
Patent Information
- Application Number
- CN202110267955.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-03-12
AI Technical Summary
Mechanical delay technology and infrared sensing technology in existing drinking water equipment have problems with water overflow, waste and inaccurate control. Especially when there is direct sunlight or obstructions, it is difficult to accurately judge whether the water cup is full.
Through the linkage between wearable devices and drinking water equipment, the frequency change of the water filling sound generated by the air vibration in the container is used to determine whether the container is filled with water, and a device shutdown command is sent to stop water dispensing.
It achieves precise control of drinking water equipment, avoids water overflow and waste, improves operational flexibility and safety, saves water resources, and avoids burn accidents.
Smart Images

Figure CN115067755B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a control method, device, equipment and storage medium for drinking water equipment. Background Art
[0002] Drinking water equipment is a device used to store water and heat or cool water for people to drink. Currently, smart drinking water equipment on the market is usually equipped with a special switch that can automatically control the closure of the faucet, so that users do not need to rely on subjective judgment whether the cup is full of water, making it more convenient to get water.
[0003] In the related art, drinking water equipment controls the water output by setting a faucet with mechanical delay technology. The user only needs to turn on the faucet, and the drinking water equipment will automatically turn off after a certain period of time; or, the drinking water equipment is provided with an infrared sensing device, and the user places the water cup in the infrared sensing area. The infrared rays emitted by the infrared transmitting tube can be reflected back to the infrared receiving tube due to the obstruction of the water cup, and the opening and closing of the faucet can be controlled by detecting whether there is reflected infrared rays.
[0004] However, the delay time of mechanical delay technology is fixed. When the water cup used by the user is small, it may cause water overflow. If the water cup is large, the switch needs to be turned on multiple times. Infrared sensing is easily affected by direct sunlight and only controls the water flow based on reflected infrared rays. The user still needs to subjectively judge whether the water is full. When there are fixed obstructions in the infrared sensing area, it will also cause waste of water resources. Summary of the invention
[0005] The present application provides a control method, device, equipment and storage medium for drinking water equipment. The technical solution is as follows:
[0006] On the one hand, an embodiment of the present application provides a method for controlling a drinking water device, the method being applied to a wearable device, a communication connection being established between the wearable device and the drinking water device, the method comprising:
[0007] In response to the drinking water device being in a water discharging state, collecting water pouring sound through a microphone, the water pouring sound being generated by air vibration in the container;
[0008] Based on the frequency change of the water filling sound, determining a water stop judgment result, the water stop judgment result is used to indicate whether the container is full of water, and the frequency of the water filling sound is related to the water level in the container;
[0009] In response to the water stop judgment result indicating that the container is full of water, a device shutdown instruction is sent to the drinking water device, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
[0010] On the other hand, an embodiment of the present application provides a control device for a drinking water device, the device comprising:
[0011] A collection module, configured to collect water injection sound through a microphone in response to the drinking water device being in a water outlet state, wherein the water injection sound is generated by air vibration in the container;
[0012] A first determination module is used to determine a water stop judgment result based on the frequency change of the water filling sound, wherein the water stop judgment result is used to indicate whether the container is filled with water, and the frequency of the water filling sound is related to the water level in the container;
[0013] The sending module is used to send a device shutdown instruction to the drinking water device in response to the water stop judgment result indicating that the container is full of water, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
[0014] On the other hand, an embodiment of the present application provides a wearable device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the control method of the drinking water equipment as described in the above aspects.
[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by a processor to implement the control method of the drinking water equipment as described in the above aspects.
[0016] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a wearable device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the wearable device executes the control method of the drinking water device provided in various optional implementations of the above aspects.
[0017] The beneficial effects of the technical solution provided by the embodiments of the present application include at least:
[0018] In the embodiment of the present application, through the linkage between the wearable device and the drinking water device, the frequency of the water filling sound generated by the air vibration in the container changes with the water surface height, and the water filling degree of the container is accurately judged. The wearable device completes the control of water stop of the drinking water device. Compared with the related art of using mechanical delay technology or infrared reflection to control water stop, it is faster and more accurate, can avoid the situation that the container is not filled with water or water overflows, saves water resources and also avoids the occurrence of scalding accidents; moreover, the wearable device has the characteristic of being portable, is not restricted by scenes and time, and is flexible and easy to operate. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0020] Figure 2 is a flow chart of a control method of a drinking water device provided by an exemplary embodiment of the present application;
[0021] Figure 3 is a flow chart of a method for controlling a drinking water device provided by another exemplary embodiment of the present application;
[0022] Figure 4 is a schematic diagram of performing time-frequency conversion on a sound signal provided by an exemplary embodiment of the present application;
[0023] Figure 5 is a flow chart of a method for controlling a drinking water device provided by another exemplary embodiment of the present application;
[0024] Figure 6 is a flow chart of a method for controlling a drinking water device provided by another exemplary embodiment of the present application;
[0025] Figure 7 is a flow chart of a method for controlling a drinking water device provided by another exemplary embodiment of the present application;
[0026] Figure 8 is a structural block diagram of a control device for a drinking water device provided by an exemplary embodiment of the present application;
[0027] Fig. 9 It is a structural block diagram of a wearable device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0029] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0030] In the related art, the drinking water equipment controls the water output by setting a faucet with mechanical delay technology. The user only needs to turn on the faucet, and the drinking water equipment will automatically turn off after a certain period of time; or, the drinking water equipment is provided with an infrared sensing device, and the user places the water cup in the infrared sensing area. The infrared rays emitted by the infrared transmitting tube can be reflected back to the infrared receiving tube due to the obstruction of the water cup, and the opening and closing of the faucet are controlled by detecting whether there is reflected infrared rays. However, the delay time of the mechanical delay technology is fixed. When the container used by the user is small, it may cause water overflow. If the container is large, the user needs to turn on the switch multiple times to fill the container with water. Infrared sensing is easily affected by direct sunlight, and the water flow is controlled only based on the reflected infrared rays. The user still needs to subjectively judge whether the water is full. In addition, when there are fixed obstructions in the infrared sensing area, or the user fails to move the container out of the infrared sensing area in time, it will also cause a waste of water resources.
[0031] In order to solve the above technical problems, the present application provides a wearable device, which can be a portable device such as a smart watch, smart glasses, a smart phone, a personal laptop, etc. In a possible implementation, the present application embodiment uses the wearable device as Figure 1 The smart watch shown is used as an example for explanation. The wearable device includes a strap 101 and a dial 102, wherein the strap 101 is used to fix the dial 102 on the user's wrist, and the dial 102 is provided with components such as a processor, a memory, a microphone, a battery, and a screen. A communication connection is established between the wearable device and the drinking water device 103. Optionally, a communication connection is established between the wearable device and the drinking water device 103 via a wireless network or Bluetooth. In a possible implementation, when it is determined that the drinking water device 103 enters the water outlet state, the wearable device collects the sound of water injection through the microphone, and then determines whether the container is filled with water based on the sound of water injection. If it is determined that the container is filled with water, a device shutdown instruction is sent to the drinking water device 103, thereby achieving precise control of the drinking water device, without the need for the user to subjectively judge the water receiving condition of the container, so as to simplify the user operation.
[0032] Figure 2 A flow chart of a biorhythm monitoring method provided by an exemplary embodiment of the present application is shown. This embodiment is described by taking the method used in a wearable device as an example, wherein a communication connection is established between the wearable device and a drinking water device, and the method comprises the following steps:
[0033] Step 201, in response to the drinking water device being in a water outlet state, collecting water injection sound through a microphone, the water injection sound being generated by air vibration in the container.
[0034] In a possible implementation, a communication connection is established between the wearable device and the drinking water device. When the drinking water device enters the water outlet state from the water stop state, a water outlet signal is sent to the wearable device. After receiving the water outlet signal, the wearable device determines that the drinking water device is in the water outlet state, and then turns on the microphone to collect the water injection sound. The water injection sound refers to the sound generated when the water outlet of the drinking water device is injected into the container, causing the air in the container to vibrate.
[0035] Optionally, a communication connection is established between the wearable device and the drinking water device via Bluetooth; or, a near field communication (NFC) card for controlling the water supply and water stop of the drinking water device is stored in the wearable device. For example, for drinking water devices in schools or workplaces, users can set a corresponding electronic NFC water card through the wearable device. The wearable device can control the opening and closing of the drinking water device within a preset range near the drinking water device based on the user's triggering operation of the electronic NFC water card.
[0036] Optionally, after the user places the container on the water inlet of the drinking water device, the user can trigger the wearable device to send a water outlet instruction to the drinking water device, control the drinking water device to enter the water outlet state and turn on the microphone; or, after the user places the container on the water inlet of the drinking water device, the user can trigger the control or button in the drinking water device to make the drinking water device enter the water outlet state, and the drinking water device sends a water outlet signal to the wearable device, so that the wearable device turns on the microphone to determine when the water needs to be stopped.
[0037] In order to reduce the impact of interfering sound sources in the surrounding environment (such as the conversations of nearby people, the water filling sound of adjacent drinking water equipment, etc.) on wearable devices and improve the judgment accuracy of wearable devices, wearable devices use directional microphones to collect water filling sounds.
[0038] Step 202, based on the frequency change of the water filling sound, determine the water stop judgment result, the water stop judgment result is used to indicate whether the container is full of water, and the frequency of the water filling sound is related to the water level in the container.
[0039] According to physical knowledge, when using a container to collect water, as water continues to flow in, the air in the container is quickly squeezed out by the water, especially for containers with smaller bottle mouths, the internal air cannot be discharged quickly, and the air column from the water surface to the container mouth will vibrate and make sounds, and as the height of the air column decreases, its vibration frequency gradually increases, causing the pitch of the water filling sound to become higher. When the container is full of water, the frequency reaches its maximum value. Therefore, wearable devices can judge whether the container is full of water based on the frequency changes of the water filling sound.
[0040] The wearable device collects the sound of water injection at certain time intervals to obtain the frequency of the water injection sound at each collection moment, and then determines the current amount of water injected into the container based on the change of the frequency of the water injection sound over time. When the frequency of the water injection sound corresponds to the frequency of the container being filled with water, the water stop judgment result is determined to be that the container is full of water, that is, the drinking water equipment needs to stop injecting water.
[0041] Step 203, in response to the water stop judgment result indicating that the container is full of water, a device shutdown instruction is sent to the drinking water device, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
[0042] In a possible implementation, when it is determined that the container is full of water, the wearable device sends a device shutdown instruction to the drinking device through a communication connection, or the wearable device controls the NFC card corresponding to the drinking device to cut off communication with the drinking device, thereby controlling the drinking device to stop discharging water.
[0043] To sum up, in the embodiments of the present application, through the linkage between the wearable device and the drinking water device, the frequency of the water filling sound generated by the air vibration in the container changes with the water surface height, and the water filling degree of the container is accurately judged. The wearable device completes the control of water stop of the drinking water device. Compared with the related art of using mechanical delay technology or infrared reflection to control water stop, it is faster and more accurate, can avoid the situation that the container is not filled with water or water overflows, saves water resources and also avoids the occurrence of scalding accidents; moreover, the wearable device has the characteristic of being portable, is not restricted by scenes and time, and is flexible and easy to operate.
[0044] In one possible implementation, in order to improve the accuracy of the water outage judgment result, the wearable device uses a machine learning model to predict the main frequency at the next sampling moment based on the measured main frequency, so as to determine whether the current container is full of water, so as to avoid water overflow in the container due to judgment delay. Figure 3 A flowchart of a biorhythm monitoring method provided by another exemplary embodiment of the present application is shown. This embodiment is described by taking the method used in a wearable device as an example, wherein a communication connection is established between the wearable device and a drinking water device, and the method comprises the following steps:
[0045] Step 301, in response to the drinking water device being in a water outlet state, collecting water injection sound through a microphone, the water injection sound being generated by air vibration in the container.
[0046] The specific implementation of step 301 can refer to the above step 201, and the embodiment of the present application will not be repeated here.
[0047] Step 302 , performing spectrum analysis on the sound signal of the water injection sound to generate a frequency variation curve of the water injection sound, where the frequency variation curve is a curve showing the main frequency of the water injection sound changing with time.
[0048] The wearable device uses the frequency change of the water injection sound to determine whether the container is full of water. Therefore, the wearable device needs to perform spectrum analysis on the sound signal of the water injection sound collected to obtain the frequency change of the water injection sound. The wearable device generates a frequency change curve of the water injection sound based on the main frequency corresponding to each acquisition moment (i.e., the frequency of the water injection sound), and then performs prediction analysis based on the frequency change curve to determine whether the water injection sound at the current moment is the sound of the container being filled with water.
[0049] In a possible implementation, step 302 includes the following steps:
[0050] Step 302a: using an analog-to-digital converter to convert the analog signal collected by the microphone at the current sampling moment into a digital signal.
[0051] The wearable device uses a microphone to convert the sound signal of water injection into an analog electrical signal, and then uses an analog-to-digital converter to convert the obtained analog electrical signal into a digital signal, thereby performing spectrum analysis on the digital signal.
[0052] Step 302b, performing digital filtering processing on the digital signal to obtain a time domain signal with noise removed.
[0053] In order to obtain the main frequency of the water injection sound more accurately, the wearable device needs to remove the noise signal in the digital signal and use the microprocessor in the wearable device to perform digital filtering on the converted digital signal.
[0054] Step 302c: convert the time domain signal into a frequency domain signal, and determine the main frequency of the water injection sound at the current sampling moment based on the frequency domain signal.
[0055] Spectral analysis is a technique for decomposing complex signals into simpler signals. In one possible implementation, the microprocessor in the wearable device uses the Fast Fourier Transform (FFT) principle to convert the filtered time domain signal into a frequency domain signal, and analyzes the frequency domain signal to determine the dominant frequency of the signal at each sampling moment. Figure 4The figure shows the process of converting the time domain signal of the water injection sound at a certain acquisition moment into the frequency domain signal. Through the frequency domain signal, it can be determined that the main frequency at that moment is 139.9746 Hz.
[0056] Step 302d: Generate a frequency variation curve based on the main frequency at each sampling moment.
[0057] After the wearable device obtains the main frequency at the current sampling moment, the frequency change curve is updated based on the frequency change curve from the initial sampling moment to the previous sampling moment and the main frequency at the current sampling moment.
[0058] Step 303: input the frequency variation curve into the frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment.
[0059] The wearable device uses a frequency prediction model to predict the main frequency of the water filling sound at the next sampling moment, thereby obtaining the trend of the main frequency from the current sampling moment to the next sampling moment, thereby determining whether the main frequency at the current sampling moment is the main frequency when the container is filled with water.
[0060] In a possible implementation, the frequency prediction model in the present application adopts a grey prediction model. Grey prediction refers to the use of the Grey System Theory Model (GM model) to estimate and predict the development and change laws of the system behavior characteristics. At the same time, it can also estimate and calculate the time when the abnormal situation of the behavior characteristics occurs, as well as study the future time distribution of events in a specific time or interval. The above process is essentially a process of treating "random process" as "grey process", "random variable" as "grey variable", and using the GM (1,1) model in grey system theory to deal with the problem. Grey prediction has a wide range of applications in economic fields such as industry, agriculture, and commerce, as well as in environmental, social, and military fields, especially in predicting and analyzing future development trends based on currently available data.
[0061] The principle of using the GM (1,1) model for prediction is as follows:
[0062] Assume that the known reference data column is x (0) =(x (0) (1),x (0) (2),…,x (0) (n)), where x (0) (n) is the main frequency of the water injection sound, and a cumulative sequence is generated:
[0063]
[0064] in
[0065] Get the mean series z (1) (k) = 0.5x (1) (k)+0.5x (1) (k-1),k=2,3,…,n
[0066] Then (0) =(z (0) (1),z (0) (2),…,z (0) (n)).
[0067] So the grey differential equation is established as x (0) (k)+az (1) (k)=b,k=2,3,…,n
[0068] The corresponding whitened differential equation is
[0069] Remember u=(a,b) T ,Y=(x (0) (2),x (0) (3),…,x (0) (n)) T , By the least squares method, we can obtain Reaching the minimum
[0070] So solving the equation we get
[0071] Through the grey model, the development trend of the water filling frequency of the unknown container can be predicted, and the main frequency of the water filling sound at the next sampling moment can be obtained.
[0072] Optionally, the frequency prediction model may also adopt other machine learning models that can perform predictions, which is not limited in the embodiments of the present application.
[0073] Step 304, determining a water outage judgment result based on the frequency variation curve and the main frequency of the water injection sound at the next sampling moment.
[0074] In a possible implementation, step 304 includes the following steps:
[0075] Step 304a, generating a frequency prediction curve based on the frequency variation curve and the main frequency of the water injection sound at the next sampling moment, wherein the frequency prediction curve includes the main frequency of the water injection sound at the next sampling moment.
[0076] The wearable device uses the grey model to predict the main frequency of the water injection sound at the next sampling moment, and thus obtains the frequency prediction curve based on the generated frequency change curve, that is, the left side of the frequency point corresponding to the current sampling moment is the actually measured frequency change curve, and the right side is the predicted frequency change curve.
[0077] Step 304b, in response to the main frequency at the current moment being the mutation point of the frequency prediction curve, determining that the water stop judgment result is that the current moment is the water injection stop moment, and the change rates of the curve slopes on both sides of the mutation point in the frequency prediction curve are different.
[0078] Through spectrum analysis, the wearable device obtains the main frequency at each sampling moment, and then uses gray prediction to analyze the frequency at the next sampling moment, and finally determines the water cut-off moment. It can be seen from the above equation that when the water in the container is full, the frequency curve of the whole process will have a mutation point, and this mutation point is the moment of water cut-off. Therefore, the wearable device determines whether the container is full of water by judging whether the frequency point corresponding to the current sampling moment is the mutation point in the frequency prediction curve. Among them, the mutation point refers to the point where the curve trends on both sides are inconsistent, which can be regarded as the different rate of change (second-order derivative) of the slope of the curve on both sides. At present, the bottle body and bottle mouth of most containers (such as thermos cups) are different in shape (the diameter of the bottle mouth is smaller than the diameter of the bottle body), so when the water surface reaches the junction of the bottle body and the bottle mouth, the wearable device can determine that the current moment corresponds to the mutation point.
[0079] Step 305, in response to the water stop judgment result indicating that the container is full of water, a device shutdown instruction is sent to the drinking water device, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
[0080] The specific implementation of step 305 can refer to the above step 203, and the embodiment of the present application will not be repeated here.
[0081] In an embodiment of the present application, the main frequency of the water injection sound is obtained through spectrum analysis, and a frequency change curve is generated based on the main frequency of the water injection sound at each collection moment, so that the main frequency of the water injection sound at the next collection moment can be predicted using a frequency prediction model, and then it is determined whether the main frequency at the current moment is a mutation point, so as to determine whether the container is full of water, thereby improving the accuracy of water outage judgment.
[0082] exist Figure 3 Based on Figure 5 , which shows a flow chart of a biorhythm monitoring method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method used in a wearable device as an example, and a communication connection is established between the wearable device and the drinking water device. After the above step 302, the following steps are also included:
[0083] Step 306: determine a target frequency curve based on the frequency variation curve, where the target frequency curve is a curve obtained by performing a spectrum analysis on the water injection sound of the complete water injection process in advance.
[0084] Since the shapes of containers on the market are different, the frequency change curves corresponding to different containers vary greatly, and there may be certain noise in the actual water collection process. In order to improve the accuracy of frequency prediction of wearable devices, in one possible implementation, the developer pre-collects water using containers of various common shapes, and measures the complete water collection process in an interference-free scenario to obtain frequency curves corresponding to various types of containers, and stores them in the wearable device. After the wearable device generates a frequency change curve based on the main frequency at each moment, it determines the target frequency curve from the stored frequency curves, and then uses the target frequency curve to correct the frequency change curve, so that the main frequency at the next sampling moment predicted by the subsequent model is more accurate.
[0085] In a possible implementation, the process of the wearable device determining the target frequency curve from the stored frequency curves is as follows:
[0086] Step 306a: determine the similarity between the frequency change curve and each candidate frequency curve.
[0087] Step 306b: determine the candidate frequency curves whose similarity is higher than the similarity threshold as the target frequency curves.
[0088] The wearable device calculates the similarity between the frequency change curve and each stored candidate frequency curve, and determines a target frequency curve with a similarity higher than a similarity threshold from the candidate frequency curves, wherein the container type corresponding to the target frequency curve is similar to the container type corresponding to the container used by the user in the current water collection process.
[0089] Optionally, the wearable device determines the candidate frequency curve with a similarity higher than a similarity threshold (eg, 95%) as the target frequency curve; or, the wearable device determines the candidate frequency curve with the highest similarity as the target frequency curve.
[0090] Step 307: perform curve correction on the frequency variation curve according to the target frequency curve.
[0091] The wearable device performs curve correction on the frequency change curve according to the target frequency curve, which can avoid the influence of noise accidentally collected during the water collection process on the frequency change curve.
[0092] In another possible implementation, the control method of the drinking water equipment provided in the embodiment of the present application further includes the following steps:
[0093] Step 1: Display a container selection list, wherein the container selection list includes at least one container selection control, and different container selection controls correspond to different container types.
[0094] Before determining that the drinking water device enters the water dispensing state, or during the water dispensing process of the drinking water device, the wearable device displays a container selection list on the screen, which includes at least one container selection control corresponding to a container type (such as icons corresponding to containers of different shapes) for the user to select. The user can select the container type to enable the wearable device to determine the corresponding target frequency curve.
[0095] Step 2: In response to a trigger operation on a target container selection control, a frequency curve corresponding to the target container selection control is determined as a target frequency curve.
[0096] When a trigger operation on a target container selection control is received, the wearable device determines the frequency curve corresponding to the target container selection control as the target frequency curve, and then uses the target frequency curve to correct the frequency change curve.
[0097] The above step 303 includes the following steps:
[0098] Step 308: Input the frequency variation curve after curve correction into the frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment.
[0099] In an embodiment of the present application, the frequency change curve generated by the wearable device is corrected using a pre-measured target frequency curve, which can avoid the influence of noise accidentally collected during the water injection process on the frequency change curve, thereby improving the accuracy of the subsequent frequency prediction model in predicting the main frequency and achieving precise control of the drinking water equipment.
[0100] exist Figure 2 Based on Figure 6 , which shows a flow chart of a biorhythm monitoring method provided by another exemplary embodiment of the present application. This embodiment is described by taking the method used in a wearable device as an example, and a communication connection is established between the wearable device and the drinking water device. The following steps are also included before the above step 201:
[0101] Step 204, collecting water injection sound during the first water injection process of the current login account, and generating a frequency change curve of the first water injection process.
[0102] In order to further accurately control the drinking water equipment, make the water output of the drinking water equipment meet the user's needs, and realize personalized control of the drinking water equipment, in a possible implementation mode, if the user uses the wearable device to control the automatic shutdown of the drinking water equipment for the first time, the wearable device collects the water injection sound of the complete water injection process and generates a frequency change curve.
[0103] Step 205: associate and store the frequency change curve with the current login account.
[0104] Users usually use the same container to collect water for a long time, so wearable devices can provide users with a frequency change curve storage mechanism. For example, when a user uses a wearable device for the first time, or uses a container to collect water for the first time, the wearable device associates and stores the frequency change curve with the current login account, so that the wearable device can subsequently control the water supply and water cut-off of the drinking device based on the user's usage habits.
[0105] In addition, when the user uses the wearable device for the first time, or uses a certain container for the first time, a new container type can be set to be added to the wearable device, so that the wearable device stores the frequency change curves corresponding to each container type.
[0106] The above step 202 also includes the following steps:
[0107] Step 206, based on the frequency change curve stored in association with the current login account and the frequency change of the water injection sound, determine the water outage judgment result.
[0108] When the user gets water again, if the frequency change curve corresponding to the current login account has been stored in the wearable device, the water outage judgment result can be determined based on the frequency change curve stored in association with the current login account and the frequency change of the water filling sound, and the frequency of the water filling sound when the container is filled with water can be determined in advance, so that the wearable device can accurately control the drinking water equipment based on its own habits.
[0109] In an embodiment of the present application, during the first water filling process of the currently logged-in account, the wearable device generates a frequency change curve of the water filling process based on the water filling sound collected by the microphone, and stores it in association with the currently logged-in account. In the subsequent control process of the drinking water equipment, the water stop judgment result is determined based on the pre-stored frequency change curve and the real-time measured frequency of the water filling sound, thereby improving the accuracy of controlling the water stop of the drinking water equipment.
[0110] In summary of the above embodiments, in an illustrative example, the control process of the drinking water equipment is as follows: Figure 7 shown.
[0111] Step 701, collecting water injection sound.
[0112] Step 702: Analog to Digital (A / D conversion).
[0113] Step 703: digital filtering.
[0114] Step 704: perform FFT on the digital signal.
[0115] Step 705, GM prediction.
[0116] Step 706, judging whether the container is full of water based on the frequency. If yes, proceed to step 707; otherwise, proceed to step 701.
[0117] Step 707, control the drinking water device to stop discharging water.
[0118] Figure 8 : is a structural block diagram of a control device for a drinking water device provided by an exemplary embodiment of the present application, the device comprising:
[0119] A collection module 801 is used for collecting water injection sound through a microphone in response to the drinking water device being in a water outlet state, wherein the water injection sound is generated by air vibration in the container;
[0120] A first determination module 802 is used to determine a water stop judgment result based on the frequency change of the water filling sound, wherein the water stop judgment result is used to indicate whether the container is full of water, and the frequency of the water filling sound is related to the water level in the container;
[0121] The sending module 803 is used to send a device shutdown instruction to the drinking water device in response to the water stop judgment result indicating that the container is full of water, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
[0122] Optionally, the first determining module 802 includes:
[0123] A generating unit, configured to perform spectrum analysis on the sound signal of the water injection sound to generate a frequency variation curve of the water injection sound, wherein the frequency variation curve is a curve showing the main frequency of the water injection sound varying with time;
[0124] An input unit, used for inputting the frequency variation curve into a frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment;
[0125] The first determining unit is used to determine the water outage judgment result based on the frequency change curve and the main frequency of the water injection sound at the next sampling moment.
[0126] Optionally, the generating unit is further used for:
[0127] Using an analog-to-digital converter, convert the analog signal collected by the microphone at the current sampling moment into a digital signal;
[0128] Performing digital filtering on the digital signal to obtain a time domain signal with noise removed;
[0129] Converting the time domain signal into a frequency domain signal, and determining the main frequency of the water injection sound at the current sampling moment based on the frequency domain signal;
[0130] The frequency variation curve is generated based on the main frequency at each sampling time.
[0131] Optionally, the first determining unit is further configured to:
[0132] Based on the frequency variation curve and the main frequency of the water injection sound at the next sampling moment, a frequency prediction curve is generated, wherein the frequency prediction curve includes the main frequency of the water injection sound at the next sampling moment;
[0133] In response to the main frequency at the current moment being the mutation point of the frequency prediction curve, the water stop judgment result is determined as the current moment being the water injection stop moment, and the change rates of the curve slopes on both sides of the mutation point in the frequency prediction curve are different.
[0134] Optionally, the device further comprises:
[0135] A second determination module is used to determine a target frequency curve based on the frequency change curve, wherein the target frequency curve is a curve obtained by pre-spectral analysis of the water injection sound of the complete water injection process;
[0136] A correction module, used for performing curve correction on the frequency change curve according to the target frequency curve;
[0137] The input unit is further used for:
[0138] The frequency variation curve corrected by the curve is input into the frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment.
[0139] Optionally, the second determining module includes:
[0140] A second determining unit, configured to determine a similarity between the frequency change curve and each candidate frequency curve;
[0141] The third determining unit is configured to determine the candidate frequency curve whose similarity is higher than a similarity threshold as the target frequency curve.
[0142] Optionally, the device further comprises:
[0143] A display module, used to display a container selection list, wherein the container selection list includes at least one container selection control, and different container selection controls correspond to different container types;
[0144] The third determining module is configured to determine, in response to a triggering operation on a target container selection control, a frequency curve corresponding to the target container selection control as the target frequency curve.
[0145] Optionally, the device further comprises:
[0146] A generation module, used for collecting water injection sound during the first water injection process of the current login account, and generating a frequency change curve of the first water injection process;
[0147] A storage module, used for associating and storing the frequency change curve with the current login account;
[0148] The first determining module includes:
[0149] The fourth determination unit is used to determine the water outage judgment result based on the frequency change curve stored in association with the current login account and the frequency change of the water injection sound.
[0150] To sum up, in the embodiments of the present application, through the linkage between the wearable device and the drinking water device, the frequency of the water filling sound generated by the air vibration in the container changes with the water surface height, and the water filling degree of the container is accurately judged. The wearable device completes the control of water stop of the drinking water device. Compared with the related art of using mechanical delay technology or infrared reflection to control water stop, it is faster and more accurate, can avoid the situation that the container is not filled with water or water overflows, saves water resources and also avoids the occurrence of scalding accidents; moreover, the wearable device has the characteristic of being portable, is not restricted by scenes and time, and is flexible and easy to operate.
[0151] Please refer to Fig. 9 , which shows a block diagram of a terminal provided by an exemplary embodiment of the present application. The terminal 900 may be a smart phone, a tablet computer, a wearable device, etc. The terminal 900 in the present application may include one or more of the following components: a processor 910, a memory 920, and a display screen 930.
[0152] The processor 910 may include one or more processing cores. The processor 910 uses various interfaces and lines to connect the various parts of the entire terminal 900, and executes various functions and processes data of the terminal 900 by running or executing instructions, programs, code sets or instruction sets stored in the memory 920, and calling data stored in the memory 920. Optionally, the processor 910 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 910 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display screen 930; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 910, but may be implemented by a separate chip.
[0153] The memory 920 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 920 includes a non-transitory computer-readable storage medium. The memory 920 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book), etc., created according to the use of the terminal 900.
[0154] The display screen 930 is used to receive a touch operation on or near the display screen using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The display screen 930 is usually provided on the front panel of the terminal 900 .
[0155] In addition, those skilled in the art can understand that the structure of the terminal 900 shown in the above drawings does not constitute a limitation on the terminal 900, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal 900 also includes a radio frequency circuit, a shooting component, a sensor, an audio circuit, a wireless fidelity (WiFi) component, a power supply, a Bluetooth component, and other components, which will not be described in detail here.
[0156] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the control method of the drinking water equipment described in the above embodiments.
[0157] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the control method of the drinking water device provided in various optional implementations of the above aspects.
[0158] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0159] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling a drinking water device, characterized in that: The method is applied to a wearable device, a communication connection is established between the wearable device and a drinking water device, and the method comprises: In response to the drinking water device being in a water discharging state, collecting water pouring sound through a microphone, the water pouring sound being generated by air vibration in the container; Performing spectrum analysis on the sound signal of the water injection sound to generate a frequency change curve of the water injection sound, wherein the frequency change curve is a curve of the main frequency of the water injection sound changing with time; Based on the frequency change curve, determining a target frequency curve from candidate frequency curves, wherein the target frequency curve is a curve obtained by pre-spectral analysis of the water injection sound of the complete water injection process, and the candidate frequency curve includes a frequency change curve associated with a current login account of the wearable device; According to the target frequency curve, performing curve correction on the frequency change curve; Inputting the frequency change curve corrected by the curve into a frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment; generating a frequency prediction curve based on the frequency change curve and the main frequency of the water injection sound at the next sampling moment, wherein the frequency prediction curve includes the main frequency of the water injection sound at the next sampling moment; In response to the main frequency at the current moment being a mutation point of the frequency prediction curve, determining that the water stop judgment result is that the container is full of water, and the current moment is the water filling stop moment, and the change rates of the curve slopes on both sides of the mutation point in the frequency prediction curve are different; In response to the water stop judgment result indicating that the container is full of water, a device shutdown instruction is sent to the drinking water device, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
2. The method according to claim 1, characterized in that The performing spectrum analysis on the sound signal of the water injection sound to generate a frequency change curve of the water injection sound includes: Using an analog-to-digital converter, convert the analog signal collected by the microphone at the current sampling moment into a digital signal; Performing digital filtering on the digital signal to obtain a time domain signal with noise removed; Converting the time domain signal into a frequency domain signal, and determining the main frequency of the water injection sound at the current sampling moment based on the frequency domain signal; The frequency variation curve is generated based on the main frequency at each sampling time.
3. The method according to claim 1, characterized in that The step of determining a target frequency curve from candidate frequency curves based on the frequency change curve comprises: Determining the similarity between the frequency change curve and each candidate frequency curve; The candidate frequency curve whose similarity is higher than a similarity threshold is determined as the target frequency curve.
4. The method according to claim 1, characterized in that The method further comprises: Displaying a container selection list, wherein the container selection list includes at least one container selection control, and different container selection controls correspond to different container types; In response to a triggering operation on a target container selection control, a frequency curve corresponding to the target container selection control is determined as the target frequency curve.
5. The method according to any one of claims 1 to 4, characterized in that: In response to the drinking water device being in a water outlet state, before collecting the water injection sound through the microphone, the method further includes: Collecting water injection sound during the first water injection process of the current login account, and generating a frequency change curve of the first water injection process; Associating and storing the frequency change curve with the current login account; The method further comprises: The water outage judgment result is determined based on the frequency change curve stored in association with the current login account and the frequency change of the water injection sound.
6. A control device for drinking water equipment, characterized in that: The device comprises: A collection module, configured to collect water injection sound through a microphone in response to the drinking water device being in a water outlet state, wherein the water injection sound is generated by air vibration in the container; A first determination module is used to perform spectrum analysis on the sound signal of the water injection sound to generate a frequency change curve of the water injection sound, where the frequency change curve is a curve showing the main frequency of the water injection sound changing with time; Based on the frequency change curve, determining a target frequency curve from candidate frequency curves, wherein the target frequency curve is a curve obtained by pre-spectral analysis of the water injection sound of the complete water injection process, and the candidate frequency curve includes a frequency change curve associated with a current login account of the wearable device; According to the target frequency curve, performing curve correction on the frequency change curve; Inputting the frequency variation curve corrected by the curve into a frequency prediction model to obtain the main frequency of the water injection sound at the next sampling moment; Based on the frequency variation curve and the main frequency of the water injection sound at the next sampling moment, a frequency prediction curve is generated, wherein the frequency prediction curve includes the main frequency of the water injection sound at the next sampling moment; In response to the main frequency at the current moment being a mutation point of the frequency prediction curve, determining that the water stop judgment result is that the container is full of water, and the current moment is the water filling stop moment, and the change rates of the curve slopes on both sides of the mutation point in the frequency prediction curve are different; The sending module is used to send a device shutdown instruction to the drinking water device in response to the water stop judgment result indicating that the container is full of water, and the drinking water device is used to stop discharging water after receiving the device shutdown instruction.
7. A wearable device, characterized in that: The wearable device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the control method of the drinking water equipment as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the control method of the drinking water equipment as described in any one of claims 1 to 5.
