Disclosure of Invention
In view of the above, it is necessary to provide a voice control method, a smart home system, a storage medium, and a computer device for solving the problem of voice command collision in the prior art.
One aspect of the present invention provides a voice control method, including:
acquiring a current control instruction in the voice information;
judging whether the current control instruction conflicts with an executed control instruction or not;
if yes, acquiring at least one piece of environmental parameter information in the current environment, and making a suggestion scheme according to the environmental parameter information;
the proposed scheme is enabled.
The embodiment of the invention judges whether the current instruction conflicts with the executed control instruction or not, sends the voice prompt information to prompt the user whether to start the proposal or not when judging that the current instruction conflicts with the executed control instruction, and formulates the executable proposal according to the detected environmental parameter information and the current control instruction and starts the proposal when acquiring the confirmed voice control instruction fed back by the user. The problem that the current voice control instruction conflicts with the previous voice control instruction is solved, the intelligent home system is optimized, and the user experience is improved.
The voice control method, wherein the step of obtaining at least one environmental parameter information in the current environment further comprises the steps of:
sending a voice prompt, wherein the voice prompt information is used for prompting a user whether the current control instruction conflicts with an executed control instruction or not and whether a proposal is started or not;
and when a confirmed voice control instruction fed back by the user is acquired, determining to acquire at least one environmental parameter information in the current environment. And sending out voice prompt to provide selection for the user, and controlling according to the requirement of the user. And if the user does not need to start the proposal, no instruction is executed, and the user is waited to issue the control instruction.
The voice control method, wherein the step of determining whether the current control command conflicts with the executed control command includes:
inquiring at least one target intelligent home device associated with the current intelligent home device corresponding to the current control instruction from a pre-stored application environment list, and inquiring a target use state corresponding to the target intelligent home device in the application environment list;
determining the current use state of the target intelligent household equipment according to the executed control instruction;
and when the current use state is inconsistent with any one of the target use states, determining that the current control instruction conflicts with the executed control instruction.
The application environment list is preset and stored in the intelligent home system, and a user can set and edit the application environment list according to use habits. The reasonable application environments of the intelligent household equipment are set through the application environment list so as to achieve the purposes of saving energy and improving living comfort. The application environment list comprises intelligent household equipment conflicting with the intelligent household corresponding to the current control instruction and the use state of the intelligent household equipment, for example, when an air conditioner is opened, a window is closed; for another example, when the humidifier is turned on, the dehumidifier is turned off, etc.
The target application environment of each intelligent household device is stored in the intelligent household system, and the system determines whether the current control instruction and the executed control instruction conflict or not according to the target application environment and the current application environment, so that the accuracy of voice control can be improved.
The voice control method, wherein the step of formulating a suggested solution according to the environmental parameter information and the current control instruction comprises:
extracting at least one piece of key parameter information associated with the current smart home device from the environment parameter information;
inquiring prestored environment parameter conditions of the current intelligent household equipment operation;
when the key parameter information meets the environmental parameter condition, formulating a proposal for executing the current control instruction and adjusting the use state of the target smart home equipment to be consistent with the target use state;
and when the key parameter information does not meet the environmental parameter condition, making a proposal for rejecting the current control instruction.
The intelligent home system stores the operating environment parameter conditions of each intelligent home device, detects the parameter information of the current environment, and determines the key parameter information in the detected environment parameter information, wherein the key parameter information is the related parameter of the intelligent home device corresponding to the current control instruction. When the key parameter information meets the environment parameter condition of the intelligent household equipment operation corresponding to the current control instruction, formulating a proposal scheme for executing the current control instruction, closing the equipment corresponding to the control instruction which conflicts with the current control instruction, and starting the proposal scheme. And when the key parameter information does not meet the environment parameter condition of the intelligent household equipment operation corresponding to the current control instruction, formulating a proposal for rejecting the current control instruction.
The voice control method, wherein before the step of determining whether the current control command conflicts with the executed control command, the method further comprises:
and detecting the time interval between the current control instruction and the previous control instruction, and when the time interval is greater than a preset time interval, executing the step of judging whether the current control instruction conflicts with the executed control instruction. The intention of the user to send the control instruction is determined by detecting the time interval between the current control instruction and the previous control instruction in the voice message. And when the time interval between the current control instruction and the previous control instruction is smaller than the preset time interval, such as 1s, determining that the current control instruction is the control instruction which the user actually wants to send, and directly executing the current control instruction.
Another aspect of the present invention provides an intelligent home system, including:
the acquisition unit is used for acquiring a current control instruction in the voice information;
the judging unit is used for judging whether the current control instruction conflicts with the executed control instruction or not;
the scheme making unit is used for obtaining at least one environmental parameter information in the current environment and making a proposal according to the environmental parameter information;
an execution unit to enable the proposed scheme.
The smart home system further includes:
and the prompting unit is used for sending a voice prompt, the voice prompt information is used for prompting the user whether the current control instruction conflicts with the executed control instruction or not, and whether a proposal is started or not, and when a confirmed voice control instruction fed back by the user is obtained, at least one environmental parameter information in the current environment is determined to be obtained.
The above smart home system, wherein the determining unit is configured to:
inquiring at least one target intelligent home device associated with the current intelligent home device corresponding to the current control instruction from a pre-stored application environment list, and inquiring a target use state corresponding to the target intelligent home device in the application environment list;
determining the current use state of the target intelligent household equipment according to the executed control instruction;
and when the current use state is inconsistent with any one of the target use states, determining that the current control instruction conflicts with the executed control instruction.
The above-mentioned smart home systems, wherein, the scheme formulation unit is specifically configured to:
extracting at least one piece of key parameter information associated with the current smart home device from the environment parameter information;
inquiring prestored environment parameter conditions of the current intelligent household equipment operation;
when the key parameter information meets the environmental parameter condition, formulating a proposal for executing the current control instruction and adjusting the use state of the target smart home equipment to be consistent with the target use state;
and when the key parameter information does not meet the environmental parameter condition, making a proposal for rejecting the current control instruction.
Above-mentioned intelligent home systems, wherein, include:
and the detection unit is used for detecting the time interval between the current control instruction and the previous control instruction.
The invention also relates to a storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
These and other aspects of embodiments of the invention will be apparent with reference to the following description and attached drawings. In the description and drawings, particular embodiments of the invention have been disclosed in detail as being indicative of some of the ways in which the principles of the embodiments of the invention may be practiced, but it is understood that the scope of the embodiments of the invention is not limited correspondingly. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Referring to fig. 1, a voice control method of smart home devices in a first embodiment of the present invention includes steps S11-S15.
In step S11, the current control command in the voice message is obtained.
In the above steps, the voice information may be collected by a voice collecting device such as a microphone. When the voice information is acquired, keywords in the voice information are extracted, wherein the keywords comprise an execution subject, namely the smart home device, and an execution action, such as turning on or off. And determining a control instruction in the voice message according to the extracted keywords, such as turning on an air conditioner, turning off a light and the like.
In step S12, it is determined whether the current control command conflicts with the executed control command, if yes, step S13 is executed, otherwise step S15 is executed.
The user generally does not remember the use state of the indoor intelligent household equipment at all times, and the currently sent voice control instruction often conflicts with the previously sent voice control instruction. The smart home devices corresponding to the two conflicting control instructions are different devices, that is, the subsequent control instruction affects the use of the device corresponding to the previous control instruction, or the previous control instruction affects the use of the device corresponding to the subsequent control instruction. For example, when the previous control command is "open a window" or "open a door", and the current user issues a control command to "open an air conditioner", the "open a window" or "open a door" affects the use effect of the air conditioner, that is, the control commands to "open a window", "open a door", and "open an air conditioner" conflict with each other.
Step S13, sending a voice prompt message, where the voice prompt message is used to prompt the user whether the current control command conflicts with the executed control command, and whether the proposed solution is enabled. The prompt message is, for example, a voice message "whether the current instruction conflicts with the executed instruction and the suggested scheme is enabled" sent by the smart home system, and waits for the voice message fed back by the user.
Step S14, when a confirmed voice control instruction fed back by a user is obtained, at least one environmental parameter information in the current environment is obtained, the suggested scheme is formulated according to the environmental parameter information, and the suggested scheme is started.
And when voice information which is sent by a user and used for determining starting of the suggested scheme is acquired, acquiring the ring parameter information of the current intelligent home. The environmental parameter information may be obtained by sensors, such as temperature sensors, humidity sensors, etc., and the system determines the appropriate control instruction recommendations based on the environmental parameter information. For example, the current user sends a control command of opening the air conditioner to conflict with a previous control command of opening the window, and whether the air conditioner needs to be opened is determined according to the temperature information in the current environment. For example, when the temperature in the current environment exceeds a preset temperature or a preset temperature range, the proposed scheme is: the air conditioner is opened and the window is closed.
The request for the recommended control instruction can be sent out in the form of voice, and the user can also send the request or the negative request in the form of voice. For example, the smart home system sends a voice message of "please confirm whether to open the air conditioner and close the window" by voice.
In step S15, the current control command is executed.
In the embodiment, whether the current instruction conflicts with the executed control instruction is judged, if yes, a proper proposal is made according to the detected environmental parameter information and the current control instruction, and the proposal is started. The control of the intelligent household equipment in the embodiment is more intelligent and humanized.
It can be understood that the voice prompt message according to another embodiment of the present invention may also prompt the user whether to execute the current control instruction, and if a certain voice control instruction sent by the user is obtained, execute the current voice control instruction; and if the voice control rejection instruction sent by the user is obtained, the current voice control instruction is not executed.
Referring to fig. 2, a voice control method for smart home in a second embodiment of the present invention includes steps S21-S29.
In step S21, the current control command in the voice message is obtained.
In step S22, it is determined whether the current control command conflicts with the executed control command, if yes, step S23 is executed, otherwise step S29 is executed.
In the above step, the step of determining whether the current control instruction conflicts with the executed control instruction includes:
step S221, at least one target intelligent home device associated with the current intelligent home device corresponding to the current control instruction is inquired from a prestored application environment list, and a target use state corresponding to the target intelligent home device in the application environment list is inquired;
step S222, determining the current use state of the target intelligent household equipment according to the executed control instruction;
step S223, when the current usage state is inconsistent with any of the target usage states, determining that the current control instruction conflicts with the executed control instruction.
The application environment list stores the corresponding relation between each intelligent home device and the target intelligent home device associated with each intelligent home device, and the target use state of the associated target intelligent home device. For example, in the application environment list, the air conditioner is associated with smart home devices such as a door and a window, and correspondingly, when the air conditioner is opened, the target use state of the door and the window is a closed state.
The application environment list is preset and stored in the intelligent home system, and a user can set and edit the application environment list according to use habits. The reasonable application environments of the intelligent household equipment are set through the application environment list so as to achieve the purposes of saving energy and improving living comfort. The application environment list comprises target intelligent household equipment associated with the intelligent household corresponding to the current control instruction and a target use state of the target intelligent household equipment, for example, when an air conditioner is started, a window is closed; for another example, when the humidifier is turned on, the dehumidifier is turned off, etc.
And determining the current use state of each intelligent household device in the intelligent control system according to the executed control instruction so as to determine the current application environment of the target intelligent household device. It can be understood that, when the control instruction is executed, the use state of the corresponding smart home device may also be recorded, and when it is necessary to determine whether the control instruction conflicts, the recorded information may be directly called.
In specific implementation, a target intelligent home device associated with the current intelligent home device corresponding to the current control instruction in the intelligent home system and a target use state of the target intelligent home device under the current control instruction are inquired in the application environment list. And determining the current use state of the target intelligent household equipment according to the executed control command. And when the inquired current use state of any one target intelligent household device is inconsistent with the target use state, determining that the current control instruction conflicts with the executed control instruction. For example, the current control instruction is "open the air conditioner", the current smart home device corresponding to the instruction is the air conditioner, and in the application environment list, the window and the door of the target smart home device corresponding to the open air conditioner are in a closed state. When a window is opened or a door is opened in an actual scene, it is determined that the current control command 'open air conditioner' conflicts with the executed control command 'open window' or 'open door'.
Step S23, sending a voice prompt message, where the voice prompt message is used to prompt the user whether the current control command conflicts with the executed control command and to enable the suggested solution.
Step S24, when a confirmed voice control instruction fed back by a user is obtained, at least one piece of environmental parameter information in the current environment is obtained, and at least one piece of key parameter information of the intelligent household equipment corresponding to the current control instruction in the environmental parameter information is determined.
In the above steps, when the current control instruction conflicts with the previous control instruction, for example, when the current door and window is opened and the control instruction of the user is "open the air conditioner", the system sends a voice prompt message "whether to start the proposal or not when the control instruction conflicts with the executed control instruction".
When the user sends out a voice control command for refusing to start the suggested scheme, the system does not make the suggested scheme and directly executes the current control command.
And when receiving confirmation information fed back by the user, acquiring environment parameter information, and determining key parameter information corresponding to the current control instruction in the environment parameter information. The environment parameter information acquired by the intelligent home system comprises a plurality of parameters, such as a temperature parameter, a humidity parameter, an illumination parameter and the like. In the smart home system, each smart home device corresponds to at least one piece of key environmental parameter information, for example, the key parameter information corresponding to the air conditioner is a temperature parameter, and the key parameter information corresponding to the humidifier is a humidity parameter. The key parameter information corresponding to each smart home device may be pre-stored in the smart home system.
And step S25, inquiring the pre-stored environment parameter conditions of the intelligent household equipment corresponding to the current control instruction.
And step S26, when the key parameter information meets the environmental parameter condition, formulating a proposal for executing the current control instruction and adjusting the use state of the target smart home equipment to be consistent with the target use state.
And step S27, when the key parameter information does not meet the environmental parameter condition, making a proposal for rejecting the current control instruction.
In the operation process of each intelligent household device, the intelligent household system records environmental parameter information, such as temperature and humidity information, in the operation process of the device. And analyzing the recorded environment parameter information to form the environment parameter condition of the operation of each intelligent household device, and storing the environment parameter condition of each intelligent household device in the intelligent household system. For example, the current control command is "turn on the air conditioner", and the corresponding environmental parameter conditions are as follows: the ambient temperature exceeds a degrees celsius (high temperature threshold) or is below b degrees celsius (low temperature threshold).
It can be understood that the environment parameter conditions of each smart home device may also be pre-stored in the smart home system.
When the temperature parameter corresponding to the current control instruction of turning on the air conditioner meets the environmental parameter condition of the air conditioning equipment, the formulated proposal is as follows: the air conditioner is opened and the window is closed. When the current temperature parameter of the current control instruction 'turn on the air conditioner' does not meet the environmental parameter condition corresponding to the air conditioning equipment, the formulated proposal is as follows: the command to turn on the air conditioner is cancelled, i.e., no control is performed. That is, when the user sends an instruction to turn on the air conditioner, the current ambient temperature is appropriate, that is, between a and b degrees centigrade, turning on the air conditioner may cause waste, and then a proposal for canceling turning on the air conditioner is made.
When the temperature in the current environment exceeds a ℃ or is lower than b ℃, the formulated proposal is as follows: the air conditioner is opened and the window is closed.
Further, when the suggested scheme is started, voice prompt can be performed, and the voice prompt content includes the use state information of the target smart home device and the information of the formulated suggested scheme, so that the user can know the current situation of the smart home device, for example, the suggested scheme is "a window is opened, and an instruction to open an air conditioner is cancelled".
Step S28, the suggested scheme is enabled.
In step S29, the current control command is executed.
In this embodiment, a target smart home device corresponding to a current control instruction in the application environment list is queried, and the target smart home device and the application environment of the current smart home device affect each other. And inquiring the target use state of the target intelligent household equipment under the current control instruction, and comparing whether the target use state of the target intelligent household equipment is consistent with the current use state to determine whether the current control instruction conflicts with the executed control instruction. And when the current control instruction conflicts with the executed control instruction, judging whether the key parameter information corresponding to the current intelligent equipment in the detected environment parameters meets the environment parameter condition of the current intelligent household equipment operation. If the environmental parameter condition is met, suggesting that the user execute the current control instruction and execute a suggestion scheme for adjusting the use state of the target intelligent household equipment to be matched with the target use state; and if the condition is not met, suggesting the user not to execute the current control instruction.
Further, in another embodiment of the present invention, before the step S22 is executed, the method may further include a step S1 of detecting a time interval between a current control command and a previous control command. When the time interval is greater than the preset time interval, step S22 is performed.
When a user sends a voice command, the user often corrects immediately after sending the command, for example, the user sends a control command of "open humidifier" in the previous second and sends a control command of "open window" in the next second, wherein "open window" is the control command corrected by the user. In the above step S1, the intention of the user to send the control command is determined by detecting the time interval between the current control command and the previous control command in the voice message. And when the time interval between the current control instruction and the previous control instruction is smaller than the preset time interval, such as 1s, determining that the current control instruction is the control instruction which the user actually wants to send, and directly executing the current control instruction.
Referring to fig. 3, an intelligent home system according to a third embodiment of the present invention includes:
an obtaining unit 100, configured to obtain a current control instruction in the voice information;
a judging unit 200, configured to judge whether the current control instruction conflicts with an executed control instruction;
the scheme making unit 400 is configured to, when a confirmed voice control instruction fed back by a user is obtained, obtain at least one piece of environmental parameter information in a current environment, and make the suggested scheme according to the environmental parameter information and the current control instruction;
an execution unit 500 for enabling the proposed scheme.
Further, the smart home system further includes:
a prompting unit 300, configured to send a voice prompt, where the voice prompt information is used to prompt a user whether the current control instruction conflicts with an executed control instruction, and whether to start a suggested scheme, and when a confirmed voice control instruction fed back by the user is obtained, at least one piece of environment parameter information in the current environment is determined to be obtained.
Further, the determining unit 200 is specifically configured to:
inquiring at least one target intelligent home device associated with the current intelligent home device corresponding to the current control instruction from a pre-stored application environment list, and inquiring a target use state corresponding to the target intelligent home device in the application environment list;
determining the current use state of the target intelligent household equipment according to the executed control instruction;
and when the current use state is inconsistent with any one of the target use states, determining that the current control instruction conflicts with the executed control instruction.
Further, the scheme making unit 400 is specifically configured to:
extracting at least one piece of key parameter information associated with the current intelligent household equipment corresponding to the current control instruction from the environment parameter information;
inquiring prestored environment parameter conditions of the current intelligent household equipment operation;
when the key parameter information meets the environmental parameter condition, formulating a proposal for executing the current control instruction and adjusting the use state of the target smart home equipment to be consistent with the target use state;
and when the key parameter information does not meet the environmental parameter condition, making a proposal for rejecting the current control instruction.
Further, the smart home system further includes:
a detection unit 600, configured to detect a time interval between the current control instruction and a previous control instruction. And when the time interval is larger than a preset time interval, executing a step of judging whether the current control instruction conflicts with the executed control instruction.
The smart home system of this embodiment may be configured to execute the technical solution of any one of the method embodiments shown in fig. 1 to fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
The invention also relates to a storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.