Control method, device, household appliance and storage medium of voice-controlled knock switch
Through the technology combined with sound sensor and vibration sensor, the zero-crossing rate and short-time energy of the audio signal are used to determine the knocking area and force, which solves the problem of accidentally triggering the knocking switch of household appliances and improves the accuracy and reliability of control.
Patent Information
- Application Number
- CN202011137445.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-10-22
AI Technical Summary
The knock switches of existing household appliances are prone to misoperation due to mistriggering or temperature changes, and the probability of mistriggering is higher.
The combination of sound sensor and vibration sensor is used to determine the strike area and force through the zero crossing rate and short-term energy of the audio signal, and accurately control the opening or closing of the sound-controlled strike switch to reduce false triggering.
It significantly reduces the false triggering operation of the tap switch and improves the accuracy and reliability of control.
Smart Images

Figure CN112272019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic switch control, and in particular to a control method, device, household appliance and storage medium for a voice-controlled knock switch. Background Art
[0002] At present, general household appliances can be turned on and off by using the power button on the remote control or touch panel. In order to improve the convenience of controlling household appliances, the relevant technology detects the knock event by detecting the deformation of the knock switch panel through the piezoelectric sensor installed in the knock switch, and then realizes the power on and off operation of the household appliance according to the detection result of the knock event. On the one hand, this method is prone to false triggering due to accidental touch; on the other hand, the knock switch panel will produce corresponding deformation with temperature changes or the passage of time, causing the piezoelectric sensor to receive the wrong signal, further increasing the probability of false triggering. Summary of the invention
[0003] In view of this, an object of the embodiments of the present invention is to provide a control method, device, household appliance and storage medium for a voice-controlled knock switch, which can reduce false triggering operations of turning the knock switch on or off.
[0004] According to a first aspect of the present invention, an embodiment provides a control device for a voice-controlled knock switch, the control device comprising:
[0005] A sound sensor, used to obtain the audio signal generated by the voice-controlled knock switch;
[0006] A control processing component is connected to the sound sensor and is used to control the opening or closing of the voice-controlled knocking switch according to the zero-crossing rate and short-time energy of the audio signal.
[0007] The control device according to the embodiment of the present invention has at least the following beneficial effects: the audio signal generated after the voice-controlled knock switch is knocked is obtained according to the sound sensor, and based on the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force, the control processing component can determine the knocking area and the knocking force according to the zero-crossing rate and short-time energy of the audio signal respectively, and then more accurately control the opening or closing of the voice-controlled knock switch, thereby reducing the false triggering of the voice-controlled knock switch.
[0008] Optionally, the voice-controlled knock switch is provided with a panel, and the sound sensor is installed at the center of the panel. The sound sensor is installed at the center of the panel, and the audio signals acquired from all directions at the center are more uniform, stronger, and present more obvious rules, making the subsequent processing of the audio signal more accurate and simpler, and further reducing the false triggering operation of the voice-controlled knock switch.
[0009] Optionally, the voice-controlled knock switch is provided with a panel, the panel is divided into an effective knock zone and an invalid knock zone, and the sound sensor is installed at the center of the effective knock zone. Knocking within the effective knock zone is easier to identify, and knocking within the invalid knock zone is not easy to identify, thereby further reducing false triggering operations caused by the invalid knock zone; the sound sensor is installed at the center of the effective knock zone, and the audio signals obtained from all directions at the center are more uniform, stronger, and present more obvious rules, making the subsequent processing of audio signals more accurate and simpler, further reducing false triggering operations of the voice-controlled knock switch.
[0010] Optionally, the sound sensor is in close contact with the back of the sound-controlled knock switch panel. In this case, the sound sensor receives the audio signal through solid conduction, and the sound-controlled knock switch panel does not need to have a honeycomb receiving hole, which can make the received audio signal as undistorted as possible and also maintain the integrity and aesthetics of the sound-controlled knock switch panel.
[0011] Optionally, the control device further includes:
[0012] A vibration sensor is connected to the control processing component and is used to obtain the vibration signal generated by the voice-controlled knock switch.
[0013] By using a vibration sensor to detect whether the voice-controlled knock switch panel is vibrating, it is determined that the audio signal comes from the voice-controlled knock switch panel, thereby reducing false triggering caused by audio signals generated by sound sources other than the voice-controlled knock switch panel, and further reducing false triggering operations.
[0014] According to a second aspect of the present invention, an embodiment provides a control method for a voice-controlled knock switch, the control method comprising:
[0015] Acquiring an audio signal detected by the sound sensor;
[0016] Determine the zero crossing rate and short-time energy according to the audio signal;
[0017] The voice-activated tapping switch is controlled to be turned on or off according to the zero-crossing rate and the short-time energy.
[0018] The control method according to the embodiment of the present invention has at least the following beneficial effects: when the voice-controlled knock switch is knocked, the sound sensor receives the audio signal generated by the voice-controlled knock switch due to the knocking, and utilizes the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force, and determines the knocking area and the knocking force respectively according to the zero-crossing rate and short-time energy of the audio signal, thereby more accurately controlling the opening or closing of the voice-controlled knock switch, thereby reducing false triggering operations.
[0019] Optionally, controlling the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and the short-time energy includes:
[0020] Inputting the zero-crossing rate and the short-time energy into a preset audio classifier to obtain a classification result of whether the audio signal is a valid signal;
[0021] When the classification result is that the audio signal is a valid signal, the voice-controlled knocking switch is controlled to be turned on or off.
[0022] A preset audio classifier is used to determine whether an audio signal is a valid signal. Since the preset audio classifier is trained and learned based on training data with known classification results, it can be applied to situations where the classification rules are obvious or not. It has a wider application range and more accurate results.
[0023] Optionally, the preset audio classifier is constructed by the following steps:
[0024] Collecting and marking the audio signal of the voice-controlled knock switch to obtain a data sample;
[0025] The zero-crossing rate and the short-time energy of the audio signal are used as input parameters for training, and a support vector machine is used to train the data samples to construct the preset audio classifier.
[0026] The support vector machine method is used to train the data sampling. When the training samples of the audio signal are relatively small or linearly inseparable, more accurate training results can still be obtained.
[0027] Optionally, the control method further includes:
[0028] The voice-controlled knocking switch is controlled to be turned on or off according to the number of valid signals and the time interval of the valid signals.
[0029] By increasing the number of valid signal detections and limiting the time interval of valid signals, false triggering operations due to false touches can be further reduced.
[0030] Optionally, determining the zero-crossing rate and the short-time energy according to the audio signal includes:
[0031] Acquire a vibration signal detected by a vibration sensor;
[0032] When the amplitude of the vibration signal exceeds a preset amplitude, the zero crossing rate and the short-time energy are determined according to the audio signal.
[0033] When the voice-controlled knock switch is knocked, the vibration sensor and the sound sensor respectively receive the vibration signal and the audio signal generated by the voice-controlled knock switch due to the knocking. When the amplitude of the vibration signal is greater than the preset amplitude, it indicates that the knocking occurs within the voice-controlled knock switch panel area or the effective knocking area. The voice-controlled knock switch is turned on or off according to the zero-crossing rate and short-time energy of the audio signal, thereby reducing the false start-up operation of the voice-controlled knock switch caused by the audio signal generated by the sound source in the area other than the voice-controlled knock switch panel. When the amplitude of the vibration signal is less than the preset amplitude, it indicates that the knocking occurs outside the voice-controlled knock switch panel area or the effective knocking area. No subsequent operation is performed, that is, there is no need to control the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and short-time energy of the audio signal. The execution process is simple and easy to operate.
[0034] According to an embodiment of the third aspect of the present invention, a control device for a voice-controlled knock switch is provided, comprising: a memory, a control processor, and a computer program stored in the memory and executable on the control processor, wherein the control method described in the embodiment of the second aspect is implemented when the control processor executes the computer program.
[0035] The control device according to the embodiment of the present invention has at least the following beneficial effects: the audio signal generated after the voice-controlled knock switch is knocked is obtained according to the sound sensor, and based on the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force, the control processing component can determine the knocking area and the knocking force according to the zero-crossing rate and short-time energy of the audio signal respectively, and then more accurately control the opening or closing of the voice-controlled knock switch, thereby reducing the false triggering of the voice-controlled knock switch.
[0036] A household appliance provided according to an embodiment of a fourth aspect of the present invention includes the control device described in the embodiment of the first aspect or the control device described in the embodiment of the third aspect.
[0037] The household appliance according to the embodiment of the present invention has at least the following beneficial effects: an audio signal generated after a voice-controlled knock switch is knocked is obtained according to a sound sensor, and based on the principle that the zero-crossing rate of the obtained audio signal changes with the change of the knocking area and the short-time energy of the obtained audio signal changes with the change of the knocking force, the control processing component can determine the knocking area and the knocking force according to the zero-crossing rate and short-time energy of the audio signal respectively, thereby more accurately controlling the opening or closing of the voice-controlled knock switch, thereby reducing false triggering of the voice-controlled knock switch.
[0038] According to a fifth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the control method as described in the second aspect of the embodiment.
[0039] By executing a program executable by the processor, the audio signal generated by the voice-controlled knock switch after being knocked is obtained according to the sound sensor, and utilizing the principle that the zero-crossing rate of the obtained audio signal changes with the change of the knocking area and the short-time energy of the obtained audio signal changes with the change of the knocking force, the control processing component can determine the knocking area and the knocking force according to the zero-crossing rate and short-time energy of the audio signal respectively, and then more accurately control the opening or closing of the voice-controlled knock switch, thereby reducing the false triggering of the voice-controlled knock switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a structural schematic diagram of a control device in an embodiment of the present invention;
[0041] Figure 2 is another structural schematic diagram of a control device in an embodiment of the present invention;
[0042] Figure 3 is another structural schematic diagram of a control device in an embodiment of the present invention;
[0043] Figure 4 is a flow chart of steps in a control method according to an embodiment of the present invention;
[0044] Figure 5 It is a flow chart of steps for controlling the opening or closing of a voice-controlled knocking switch according to a zero-crossing rate and a short-time energy in a control method according to an embodiment of the present invention;
[0045] Figure 6 Another flow chart of steps for controlling the opening or closing of a voice-controlled knocking switch according to a zero-crossing rate and a short-time energy in a control method according to an embodiment of the present invention;
[0046] Figure 7 It is a flow chart of steps for constructing a preset classifier in the control method of an embodiment of the present invention;
[0047] Figure 8 is another step flow chart of the control method of an embodiment of the present invention;
[0048] Fig. 9 is another structural schematic diagram of a control device in an embodiment of the present invention;
[0049] Fig.10 It is a structural schematic diagram of a household appliance in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0051] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0052] In the description of the present invention, "several" means one or more, "more" means more than two, and "greater than", "less than", "exceed" etc. are understood to exclude the number itself. If there is a description of the first, second, third, etc., it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0053] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0054] The embodiment of the present invention provides a control method and device of a voice-controlled knock switch, and a household appliance. The household appliance adopts a voice-controlled knock switch as a control switch for turning on or off, and the control device controls the voice-controlled knock switch by the control method. The control device includes: a sound sensor for acquiring an audio signal generated by the voice-controlled knock switch; and a control processing component connected to the sound sensor for controlling the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and short-time energy of the audio signal. That is, a sound sensor is provided on the household appliance, and the sound sensor is used to receive the audio signal generated by the voice-controlled knock switch. In this case, the control processing component uses the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force, and can determine the knocking area and the knocking force respectively according to the zero-crossing rate and short-time energy of the audio signal, thereby more accurately controlling the opening or closing of the household appliance and reducing the false triggering of the voice-controlled knock switch. Among them, the zero-crossing rate refers to the number of times the audio signal passes through the zero point, that is, the number of times the audio signal changes from positive to negative or from negative to positive; the short-time energy refers to the energy of the audio signal in a shorter time, and the shorter time usually refers to one frame, that is, the short-time energy refers to the energy of the audio signal in one frame. The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0055] like Figure 1 As shown, Figure 1 1 is a schematic diagram of a control device 110 for a voice-activated knock switch according to an embodiment of the present invention. The control device 110 for a voice-activated knock switch comprises a sound sensor 112 and a control processing component 111. The sound sensor 112 is mounted on the voice-activated knock switch 120 and connected to the control processing component 111.
[0056] It should be noted that the sound sensor 112 can be installed at different positions on the front side of the voice-controlled knock switch 120 panel, or can be set at different positions on the back side of the voice-controlled knock switch 120 panel, and this embodiment does not impose any specific restrictions on it.
[0057] Those skilled in the art will appreciate that the sound sensor 112 may be a microphone sensor, or a sound wave wireless receiver or other device, and this embodiment does not impose any specific limitation thereto.
[0058] It should be noted that the control processing component 111 may be electrically connected to the sound sensor 112 or wirelessly connected, and this embodiment does not impose any specific limitation thereto.
[0059] Those skilled in the art will appreciate that the control processing component 111 may be an independent device or a module device used in conjunction with a household appliance. When the control processing component 111 is an independent device, the control processing component 111 may be wirelessly connected to the sound sensor 112; when the control processing component 111 is disposed on a household appliance, the control processing component 111 may be electrically connected to the sound sensor 112.
[0060] A sound sensor 112 is installed on the voice-controlled knock switch 120, and the sound sensor 112 is used to obtain the audio signal generated after the voice-controlled knock switch 120 is knocked; the control processing component 111 uses the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force. The knocking area and the knocking force can be determined according to the zero-crossing rate and short-time energy of the audio signal respectively, and the opening or closing of the voice-controlled knock switch 120 can be controlled more accurately, thereby reducing the false triggering of the voice-controlled knock switch.
[0061] Optionally, the voice-controlled knock switch 120 is provided with a panel, and the sound sensor 112 is installed at the center of the panel of the voice-controlled knock switch 120. The shape of the panel of the voice-controlled knock switch 120 can be regular, such as circular, square or diamond, or irregular. The sound sensor 112 is installed at the center of the panel of the voice-controlled knock switch 120. The audio signals acquired from all directions at the center are more uniform, stronger, and more regular, making the subsequent processing of audio signals more accurate and simpler, further reducing the false triggering operation of the voice-controlled knock switch 120. The panel of the voice-controlled knock switch 120 is set to a regular shape, and the audio signals generated by knocking on the panel of the voice-controlled knock switch 120 are more evenly distributed, making the subsequent processing of audio signals more accurate, and further reducing false triggering operations.
[0062] Optionally, the voice-controlled knock switch 120 is provided with a panel, and the sound sensor 112 is closely attached to the back of the panel of the voice-controlled knock switch 120. In this case, the sound sensor 112 receives the audio signal generated by the sound-controlled knock switch 120 being knocked through solid conduction, and the panel of the voice-controlled knock switch 120 does not need to have a honeycomb-shaped receiving hole, which can make the received audio signal as undistorted as possible and also maintain the integrity and aesthetics of the panel of the voice-controlled knock switch 120.
[0063] like Figure 2 As shown, Figure 21 is a schematic diagram of the structure of a control device 110 of a voice-controlled knock switch provided by another embodiment of the present invention. The voice-controlled knock switch 120 is provided with a panel, and a sound sensor 112 is installed on the panel of the voice-controlled knock switch 120. The panel of the voice-controlled knock switch 120 is divided into an effective knocking area 121 and an invalid knocking area 122. Except for the effective knocking area 121, the rest of the panel of the voice-controlled knock switch 120 is the invalid knocking area 122; the sound sensor 112 is installed at the center of the effective knocking area 121.
[0064] It should be noted that the shape of the effective knocking area 121 is not limited and can be a regular shape or an irregular shape. Regular shapes include squares, rectangles, diamonds and circles, etc.; if the effective knocking area 121 is set to a regular shape, the audio signal generated by knocking in the effective knocking area 121 is more evenly distributed, so that the subsequent processing of the audio signal is more accurate, and false triggering is further reduced; if the effective knocking area 121 is set to a circle, the audio signals generated by the same knocking in different directions at the same distance from the center of the circle are of the same size, and the regularity presented is more obvious.
[0065] Knocking within the effective knocking area 121 is more easily identified, while knocking within the invalid knocking area 122 is not easily identified, thereby further reducing false triggering operations caused by the invalid knocking area 122; the sound sensor 112 is installed at the center of the effective knocking area 121, and the audio signals obtained from all directions at the center are more uniform, stronger, and have more obvious patterns, making subsequent audio signal processing more accurate and simpler, further reducing false triggering operations of the voice-controlled knocking switch 120.
[0066] Optionally, the sound sensor 112 can be close to the back of the effective knocking area 121. In this case, the sound sensor 112 receives the audio signal generated by the knocking of the effective knocking area 121 through solid conduction, and the panel of the voice-controlled knocking switch 120 does not need to have a honeycomb receiving hole, which can make the received audio signal as undistorted as possible and also maintain the integrity and aesthetics of the panel of the voice-controlled knocking switch 120.
[0067] like Figure 3 As shown, Figure 3 1 is a schematic diagram of the structure of a control device 110 of a voice-controlled knock switch provided by another embodiment of the present invention. The control device 110 of the voice-controlled knock switch 120 includes a sound sensor 112, a vibration sensor 113 and a control processing component 111. The voice-controlled knock switch 120 is provided with a panel. The sound sensor 112 and the vibration sensor 113 are both installed on the panel of the voice-controlled knock switch 120. The sound sensor 112 and the vibration sensor 113 are both connected to the control processing component 111.
[0068] It should be noted that the sound sensor 112 and the vibration sensor 113 can be installed at different positions on the front side of the voice-controlled knock switch 120 panel, or can be set at different positions on the back side of the voice-controlled knock switch 120 panel, and this embodiment does not impose specific restrictions on them.
[0069] Those skilled in the art will appreciate that the sound sensor 112 may be a microphone sensor, or a sound wave wireless receiver, etc., and this embodiment does not impose any specific restrictions thereon. The vibration sensor 113 may be an angular velocity sensor, such as a gyroscope, or a displacement sensor, and this embodiment does not impose any specific restrictions thereon.
[0070] It should be noted that the control processing component 111 may be electrically connected to the sound sensor 112 and the vibration sensor 113 or wirelessly connected, and this embodiment does not impose any specific limitation thereto.
[0071] Those skilled in the art will appreciate that the control processing component 111 may be an independent device or a module device used in conjunction with a household appliance. When the control processing component 111 is an independent device, the control processing component 111 may be wirelessly connected to the sound sensor 112 and the vibration sensor 113. When the control processing component 111 is disposed on a household appliance, the control processing component 111 may be electrically connected to the sound sensor 112 and the vibration sensor 113.
[0072] A vibration sensor 113 is installed on the panel of the voice-controlled knock switch 120. The vibration sensor 113 is used to detect whether the panel of the voice-controlled knock switch 120 vibrates, and the audio signal is determined to be from the panel of the voice-controlled knock switch 120, thereby reducing false triggering caused by audio signals generated by other sound sources other than the panel of the voice-controlled knock switch 120. A sound sensor 112 is installed on the panel of the voice-controlled knock switch 120, and the sound sensor 112 is used to obtain the audio signal generated by the panel of the voice-controlled knock switch 120; the control processing component 111 uses the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force, and can determine the knocking area and the knocking force respectively according to the zero-crossing rate and short-time energy of the audio signal, so as to more accurately control the opening or closing of the voice-controlled knock switch 120, thereby reducing false triggering operations.
[0073] Optionally, the vibration sensor 113 is installed on the panel of the voice-activated knock switch 120. The vibration sensor 113 is installed at the center of the panel of the voice-activated knock switch 120 to better detect vibrations generated in all directions, making the detection result more accurate.
[0074] Optionally, the voice-controlled knock switch 120 is provided with a panel, and the panel of the voice-controlled knock switch 120 is divided into an effective knock area 121 and an invalid knock area 122. The panel of the voice-controlled knock switch 120, except the effective knock area 121, is the invalid knock area 122, and the vibration sensor 113 is installed at the center of the effective knock area 121. Knocking within the effective knock area 121 is more easily identified, and knocking within the invalid knock area 122 is not easily identified, thereby further reducing false triggering operations caused by the invalid knock area 122; the vibration sensor 113 is installed at the center of the effective knock area 121 to better detect vibrations generated in all directions, making the detection result more accurate.
[0075] Optionally, the vibration sensor 113 is closely attached to the back of the effective knocking area 121. In this case, the vibration sensor 113 receives the vibration signal generated by the voice-controlled knocking switch 120 being knocked through solid conduction. The panel of the voice-controlled knocking switch 120 does not need to have a honeycomb-shaped receiving hole, which can make the intensity of the received vibration signal as large as possible while also maintaining the integrity and aesthetics of the panel of the voice-controlled knocking switch 120.
[0076] The embodiment of the present invention further provides a control method of a voice-controlled knock switch, which is applied to the control device provided in the household appliance in the above embodiment, wherein the structure or component composition of the control device has been described in detail in the above embodiment and will not be repeated here. Figure 4 As shown, the control method of the embodiment of the present invention includes but is not limited to step S110, step S120, and step S130.
[0077] Step S110, obtaining an audio signal detected by a sound sensor;
[0078] Step S120, determining the zero-crossing rate and short-time energy according to the audio signal;
[0079] Step S130: controlling the voice-activated tapping switch to be turned on or off according to the zero-crossing rate and the short-time energy.
[0080] In step S130, the acquired audio signal is firstly subjected to centering processing, and then the peak signal is extracted from the audio signal after the centering processing to calculate the zero-crossing rate and the short-time energy, which can be calculated specifically by the following formulas (1) and (2).
[0081]
[0082]
[0083] Among them, sgn[] represents the symbol function, that is,
[0084] Z n represents the zero-crossing rate, En represents short-time energy, N represents the frame length of the audio signal, n represents the number of frames, m represents the number of sampling times, and x n (m) represents the mth sampling value of the nth frame.
[0085] Due to the different structures and materials of the front and back panels of different voice-activated knock switches, such as some parts have hollow backs and some parts have solid backs; some panels are flat and some are curved; some materials are plastic and some are metal, etc. The zero-crossing rate and short-time energy of the audio signals generated by different voice-activated knock switches will show different rules. Therefore, the method of controlling the opening or closing of the voice-activated knock switch according to the zero-crossing rate and short-time energy is not limited.
[0086] When the voice-controlled knock switch is knocked, the sound sensor receives the audio signal generated by the sound-controlled knock switch due to the knocking, obtains the zero-crossing rate and the short-time energy according to the audio signal, and controls the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and the short-time energy; utilizes the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force; determines the knocking area and the knocking force respectively according to the zero-crossing rate and the short-time energy of the audio signal, and then controls the opening or closing of the voice-controlled knock switch more accurately, thereby reducing false triggering operations.
[0087] Alternatively, if Figure 5 As shown, Figure 5 yes Figure 4 FIG. 1 is a flowchart of an embodiment of a detailed process of step S130 in FIG. 1 , wherein step S130 includes but is not limited to step S1300.
[0088] S1300: When the zero-crossing rate is within a preset range and the short-time energy is greater than a preset value, the voice-controlled knocking switch is controlled to be turned on or off.
[0089] It should be noted that the preset range of the zero-crossing rate and the preset value of the short-time energy need to be determined according to the material and structure of the voice-controlled knock switch, and this embodiment does not impose specific restrictions on them.
[0090] When the zero-crossing rate of the audio signal received by the sound sensor changes linearly with the distance from the tapping point to the sound sensor, the zero-crossing rate is within the preset range, which indicates that the distance from the tapping point to the sound sensor is within the preset range; the short-time energy is greater than the preset value, which indicates that the tapping force is greater than the set threshold; based on the zero-crossing rate being within the preset range, it is determined that the tapping distance is within the predetermined range, and then the short-time energy is greater than the preset value to determine that the tapping force is greater than the set threshold, thereby reducing false triggering operations.
[0091] Alternatively, if Figure 6 As shown, Figure 6 yes Figure 4FIG. 1 is a flow chart of another embodiment of the detailed process of step S130 in FIG. 1 , wherein step S130 includes but is not limited to step S1301 and step S1302.
[0092] S1301, inputting the zero-crossing rate and the short-time energy into a preset audio classifier to obtain a classification result of whether the audio signal is a valid signal;
[0093] S1302: When the classification result shows that the audio signal is a valid signal, the voice-controlled knocking switch is controlled to be turned on or off.
[0094] The preset audio classifier is a prediction model obtained by training based on a certain number of audio signal collection samples. The more samples collected, the more accurate the prediction result. The input of the preset audio classifier is the zero-crossing rate and short-time energy of the audio signal, and the output result is a valid signal or an invalid signal. The training method of the preset audio classifier can adopt a machine learning method or a deep learning method. The preset audio classifier can adopt an offline training method, that is, the training is completed before use and is not updated during use. The offline training method is simpler to operate. The preset audio classifier can also adopt an online training method, that is, the training is completed before use and is continuously updated according to actual conditions during use. The results of the online training method are more accurate.
[0095] The zero-crossing rate of the audio signal received by the sound sensor changes linearly or nonlinearly with the distance of the tapping point from the sound sensor. A preset audio classifier can be used to determine whether the audio signal is a valid signal, and then control the opening or closing of the voice-controlled tapping switch to reduce the probability of misoperation. A preset audio classifier is used to determine whether the audio signal is a valid signal. Since the preset audio classifier is trained and learned based on training data with known classification results, it can be applied to situations where the classification rules are obvious or not, with a wider range of applications and more accurate results.
[0096] Alternatively, if Figure 7 As shown, Figure 7 It is a flowchart of steps of an embodiment of a method for constructing a preset audio classifier, including but not limited to step S210 and step S220.
[0097] Step S210, collecting and marking the audio signal of the voice-controlled knock switch to obtain a data sample;
[0098] Step S220: using the zero-crossing rate and short-time energy of the audio signal as input parameters for training, using a support vector machine to train the data samples, and constructing a preset audio classifier.
[0099] The collected audio signals of the voice-controlled knocking switch panel are marked as valid audio signals and invalid audio signals according to actual conditions to form data collection samples; the data collection samples are trained based on a support vector machine, and the data collection samples are divided into training samples and test samples. Both the training samples and the test samples contain valid audio signal samples and invalid audio signal samples. The input is the zero-crossing rate and short-time energy of the audio signal, and the output is a valid signal or an invalid signal.
[0100] The support vector machine method is used to train the data sampling. When the training samples of the audio signal are relatively small or linearly inseparable, more accurate training results can still be obtained.
[0101] Optionally, the voice-activated knocking switch is turned on or off according to the number of valid signals and the time interval of the valid signals.
[0102] It should be noted that the number of valid signals can be 1, 2 or 3 times, and this embodiment does not impose any specific limitation thereto.
[0103] It should be noted that the interval time of the effective signal can be 200ms, 300ms, or 500ms, and can be appropriately set according to actual use needs. This embodiment does not impose any specific limitation on it.
[0104] Optionally, the number of valid signals is set to 2 times, and the interval time of the valid signal is set to 200ms; when a valid audio signal is detected, the number of valid signals is set to 1 and the timing starts, and the valid audio signal is continuously detected within 200ms. When no valid signal is detected within 200ms, the number of valid signals is set to 0, and the detection is restarted; when a valid signal is detected within 200ms, the number of valid signals is set to 2, and the voice-controlled knocking switch is controlled to be turned on or off.
[0105] By increasing the number of valid signal detections and limiting the time interval of valid signals, false triggering operations due to false touches can be further reduced.
[0106] Alternatively, if Figure 8 As shown, Figure 8 It is a step flow chart of another method for controlling a voice-controlled knock switch provided by an embodiment of the present invention, including but not limited to step S310, step S320 and step S330.
[0107] Step S310, obtaining a vibration signal detected by the vibration sensor and an audio signal detected by the sound sensor;
[0108] Step S320: When the amplitude of the vibration signal is greater than the preset amplitude, the zero-crossing rate and the short-time energy are calculated according to the audio signal; otherwise, the audio signal is not processed;
[0109] Step S330: Control the voice-activated tapping switch to be turned on or off according to the zero-crossing rate and the short-time energy.
[0110] When the voice-controlled knock switch is knocked, the vibration sensor and the sound sensor respectively detect the vibration signal and audio signal generated by the voice-controlled knock switch due to the knocking. When the amplitude of the vibration signal is greater than the preset amplitude, it indicates that the knocking occurs within the voice-controlled knock switch panel area or the effective knocking area. The voice-controlled knock switch is then turned on or off according to the zero-crossing rate and short-time energy of the audio signal, thereby reducing the false start-up operation of the voice-controlled knock switch caused by the audio signal generated by the sound source in the area other than the voice-controlled knock switch panel. When the amplitude of the vibration signal is less than the preset amplitude, it indicates that the knocking occurs outside the voice-controlled knock switch panel area or the effective knocking area. No subsequent operations are performed, that is, there is no need to control the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and short-time energy of the audio signal. The execution process is simple and easy to operate.
[0111] Reference Fig. 9 , Fig. 9 1 is a schematic diagram of the structure of a control device 110 provided in an embodiment of the present invention. The control device 110 in the embodiment of the present invention is built in a household appliance and includes one or more control processors 1101 and a memory 1102. Fig. 9 In the figure, a control processor 1101 and a memory 1102 are taken as an example.
[0112] The control processor 1101 and the memory 1102 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0113] The memory 1102, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 1102 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1102 may optionally include a memory 1102 remotely arranged relative to the control processor 1101, and these remote memories 1102 may be connected to the control device 110 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0114] Those skilled in the art will understand that Fig. 9 The device structure shown in the figure does not constitute a limitation on the control device 110, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0115] The non-transient software program and instructions required to implement the control method applied to the control device 110 in the above embodiment are stored in the memory 1102. When executed by the control processor 1101, the control method applied to the control device 110 in the above embodiment is executed, for example, the control method described above is executed. Figure 4 Steps S110 to S130 of the method, Figure 5 In the method step S1300, Figure 6 Step S1301 and step S1302 of the method, Figure 7 Method steps S210 and S220.
[0116] Reference Fig.10 , Fig.10 1 is a schematic diagram of a household appliance 100 provided in an embodiment of the present invention, and the household appliance 100 includes the control device 110 of the above embodiment. The household appliance 100 includes an air conditioner, a refrigerator, a water heater, a washing machine, etc., and this embodiment does not specifically limit them.
[0117] A sound sensor is arranged on the voice-controlled knock switch panel of the household appliance 100, and the principle that the zero-crossing rate of the acquired audio signal changes with the change of the knocking area and the short-time energy of the acquired audio signal changes with the change of the knocking force is utilized; the control device 110 can determine the knocking area and the knocking force according to the zero-crossing rate and the short-time energy of the audio signal respectively, and then more accurately control the opening or closing of the household appliance 100, thereby reducing false triggering operations.
[0118] A vibration sensor and a sound sensor are provided on the voice-controlled knock switch panel of the household appliance 100. The vibration sensor detects whether vibration occurs in the voice-controlled knock switch panel area or the effective knocking area, and determines that the audio signal comes from the voice-controlled knock switch panel area or the effective knocking area. When knocking occurs in the voice-controlled knock switch panel area or the effective knocking area, the voice-controlled knock switch is turned on or off according to the zero-crossing rate and short-time energy of the audio signal, thereby reducing the false start-up operation of the voice-controlled knock switch caused by the audio signal generated by the sound source in the area other than the voice-controlled knock switch panel; when knocking occurs outside the voice-controlled knock switch panel area or the effective knocking area, no subsequent operation is performed, that is, there is no need to control the voice-controlled knock switch to be turned on or off according to the zero-crossing rate and short-time energy of the audio signal. The execution process is simple and easy to operate.
[0119] Since the household appliance 100 in this embodiment has the control device 110 in any of the above embodiments, the household appliance 100 in this embodiment has the hardware structure of the control device 110 in the above embodiments, and can enable the control processor in the control device 110 to call the control program of the household appliance 100 stored in the memory to achieve control of the control device 110. The specific implementation method of the air conditioner 100 in this embodiment can refer to the above embodiments, and will not be repeated here to avoid redundancy.
[0120] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, one embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium storing a computer-executable program, the computer-executable program being executed by one or more control processors, for example, Fig. 9 The execution of one of the control processors 1101 in the method may enable the one or more control processors 1101 to execute the control method in the method embodiment described above, such as executing the control method described above. Figure 4 Steps S110 to S130 of the method, Figure 5 In the method step S1300, Figure 6 Step S1301 and step S1302 of the method, Figure 7 Method steps S210 and S220.
[0122] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0123] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A control device for a voice-activated knock switch, characterized in that: The control device comprises: A sound sensor for acquiring an audio signal generated by the voice-controlled knock switch; the voice-controlled knock switch is provided with a panel, the panel including an effective knock area; a vibration sensor connected to the control processing component and configured to obtain a vibration signal generated by the voice-controlled knock switch; A control processing component is connected to the sound sensor and is used to determine the zero-crossing rate and short-time energy according to the audio signal when the amplitude of the vibration signal exceeds a preset amplitude, and determine whether the audio signal is a valid signal according to the zero-crossing rate and short-time energy of the audio signal. If the audio signal is a valid signal, control the opening or closing of the voice-controlled knocking switch; the zero-crossing rate represents the position information of the knocking area, and the short-time energy represents the magnitude information of the knocking force; the preset amplitude is determined according to the panel area or the effective knocking area.
2. The control device for the voice-activated knock switch according to claim 1, characterized in that: The sound sensor is installed at the center of the panel.
3. The control device for the voice-activated knock switch according to claim 1, characterized in that: The panel is divided into an effective knocking area and an invalid knocking area, and the sound sensor is installed at the center of the effective knocking area.
4. The control device for the voice-activated knock switch according to claim 2 or 3, characterized in that: The sound sensor is closely attached to the back of the panel.
5. A method for controlling a voice-activated knock switch, characterized in that: The control method includes: Acquire an audio signal detected by a sound sensor; acquire a vibration signal detected by a vibration sensor; When the amplitude of the vibration signal exceeds a preset amplitude, a zero-crossing rate and a short-time energy are determined based on the audio signal; the zero-crossing rate represents position information of the tapping area, and the short-time energy represents magnitude information of the tapping force; the voice-controlled tapping switch is provided with a panel, the panel includes an effective tapping area, and the preset amplitude is determined based on the panel area or the effective tapping area; Whether the audio signal is a valid signal is determined according to the zero-crossing rate and the short-time energy. If the audio signal is a valid signal, the voice-controlled knocking switch is controlled to be turned on or off.
6. The control method of the voice-activated knock switch according to claim 5, characterized in that: The determining whether the audio signal is a valid signal according to the zero-crossing rate and the short-time energy, and if the audio signal is a valid signal, controlling the voice-controlled knock switch to be turned on or off, includes: Inputting the zero-crossing rate and the short-time energy into a preset audio classifier to obtain a classification result of whether the audio signal is a valid signal; When the classification result is that the audio signal is a valid signal, the voice-controlled knocking switch is controlled to be turned on or off.
7. The control method of the voice-activated knock switch according to claim 6, characterized in that: The preset audio classifier is constructed by the following steps: Collecting and marking the audio signal of the voice-controlled knock switch to obtain a data sample; The zero-crossing rate and the short-time energy of the audio signal are used as training input parameters, and a support vector machine is used to train the data samples to construct the preset audio classifier.
8. The method for controlling a voice-activated knock switch according to claim 6, wherein: The control method further includes: The voice-activated knock switch is controlled to be turned on or off according to the number of valid signals and the time interval of the valid signals.
9. A control device for a voice-activated knock switch, characterized in that: include: A memory, a control processor, and a computer program stored in the memory and executable on the control processor, wherein the control processor implements the control method according to any one of claims 5 to 8 when executing the computer program.
10. A household appliance, characterized in that: The method comprises the control device according to any one of claims 1 to 4 or the control device according to claim 9.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the control method according to any one of claims 5 to 8.
