Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to a first aspect of the embodiments of the present invention, there is provided a method for controlling an intelligent device, optionally, as shown in fig. 1, the method includes:
s102, acquiring a voice message sent by voice input equipment, wherein the voice input equipment is used for acquiring the voice message input by a user;
s104, analyzing the voice message to obtain a control instruction, wherein the control instruction is used for controlling the target intelligent equipment;
s106-1, under the condition that the voice input equipment and the target intelligent equipment are the same type of equipment, sending a control instruction to a first server of the voice input equipment, and controlling the target intelligent equipment by the first server;
s106-2, under the condition that the voice input device and the target intelligent device are different types of devices, the target intelligent device is controlled through a direct connection protocol or a control instruction is sent to a target server corresponding to the target intelligent device, and the target intelligent device is controlled by the target server.
Optionally, the voice input device in this embodiment may be an intelligent device with a microphone. A user may enter a voice message through the microphone. The voice input device can be in a standby state, and when the voice keywords of the user are received, the voice information after the keywords is determined as the voice message. For example, the user inputs "control the refrigerator freezing to rise once", "control" is a keyword, and "refrigerator freezing to rise once" is a voice message. And sending the voice message to the control center.
And after the second server serving as the control center obtains the voice message, analyzing the voice message to obtain a control instruction. Then, it is judged whether the device types of the target input device to be controlled by the control command and the voice input device are consistent. If the device types of the two devices are consistent, the second server can send the control instruction to the first server of the voice input device, and the first server controls the target intelligent device. If the device types of the target intelligent device and the target intelligent device are not consistent, the second server controls the target intelligent device through a direct connection protocol, or the second server sends a control instruction to a target server of the target intelligent device, and the target server controls the target intelligent device.
Optionally, all the servers mentioned in this application may be physical servers or cloud servers, and this embodiment is not limited.
Optionally, the type of the device involved in the present embodiment may be a brand or a lot number or a production date of the device, etc. Different types of devices correspond to different servers.
Fig. 2 is a schematic diagram of the control target smart device of the present embodiment. After the voice input equipment acquires the voice request of the user, the voice request is sent to the control center, and the control center analyzes the voice request to obtain a control instruction. And if the voice input equipment is consistent with the equipment type of the target intelligent equipment to be controlled by the control instruction, sending the control instruction to the first server, and controlling the target intelligent equipment by the first server. And if the voice input equipment is not consistent with the equipment type of the target intelligent equipment to be controlled by the control instruction, sending the control instruction to a target server of the target intelligent equipment, and controlling the target intelligent equipment by the target server. Or, the target intelligent device can be directly controlled through a direct connection protocol without participation of a target server.
Through the embodiment, by the method, in the process that the user controls the target intelligent device through the voice input device, if the device types of the voice input device and the target intelligent device are consistent, the first server controls the target intelligent device, and if the device types of the voice input device and the target intelligent device are not consistent, the target server controls the target intelligent device, so that the problem that the target intelligent device cannot be controlled due to compatibility is solved.
As an optional example, sending the control instruction to the target server corresponding to the target smart device includes:
determining an intelligent device set to which the target intelligent device belongs according to the device type of the target intelligent device;
determining a server corresponding to the intelligent device set as a target server corresponding to the target intelligent device;
and sending the control instruction to the target server.
Optionally, in this embodiment, an intelligent device set may be preset. The set of intelligent devices can be set according to requirements. For example, a plurality of target smart devices in the same batch may be set as devices in a smart device set, or a plurality of target smart devices in the same model may be set as devices in a smart device set, and so on. After the intelligent device set is determined, after a voice input device receives a voice message, if the device types of the voice input device and a target intelligent device to be controlled by a control instruction are different, the target intelligent device is judged to belong to which intelligent device set, and a target server corresponding to the intelligent device set is used for receiving the control instruction to control the target intelligent device.
As an alternative example, determining the smart device set to which the target smart device belongs according to the device type of the target smart device includes:
comparing the type mark of the device type of the target intelligent device with the second mark of each intelligent device set;
and determining the intelligent device set corresponding to the second mark which is the same as the type mark as the intelligent device set to which the target intelligent device belongs.
Optionally, in this embodiment, when determining to which smart device set the target smart device belongs, the second flag of each smart device set may be obtained. The second identities of the devices in each set of smart devices are the same. Then, the device identifier of the target smart device is compared with each second identifier, and if the device identifier is the same as the second identifier, it is indicated that the target smart device belongs to the smart device set. And controlling the target intelligent equipment by using the target server corresponding to the intelligent equipment set.
As an optional example, before determining the set of smart devices to which the target smart device belongs according to the device type of the target smart device, the method further includes:
configuring a target server for each intelligent device set;
and establishing a connection relation between the target server and the target intelligent device in the intelligent device set.
Optionally, in this embodiment, for a target server of one intelligent device set, the target server establishes a connection relationship with each intelligent device in the intelligent device set. And when the target server receives the control instruction of the target intelligent equipment, the control instruction is sent to the target intelligent equipment through the connection relation so as to control the target intelligent equipment.
As an alternative example, controlling the target smart device via the direct connection protocol includes:
establishing a connection relation between a second server for analyzing the voice message and each intelligent device through a direct connection protocol;
and after the control instruction is obtained through analysis, the control instruction is sent to the target intelligent equipment through the connection relation.
Optionally, in this embodiment, the second server configured to parse the voice message to obtain the control instruction may further establish a connection relationship with the target intelligent device through a direct connection protocol. After the control instruction is obtained through analysis, the control instruction is directly sent to the target intelligent device through the pre-established connection relation without forwarding of the target server.
As an alternative example, parsing the voice message to obtain the control instruction includes:
converting the voice message into text data;
and carrying out semantic recognition on the text data to obtain a control instruction.
As an optional example, performing semantic recognition on the text data, and obtaining the control instruction includes:
inputting the text data into a target neural network model, wherein the target neural network model is obtained by training an original neural network model by using sample text data, and the target neural network model is used for outputting a control instruction corresponding to the text data after the text data is input;
and acquiring a control instruction output by the target neural network model.
Alternatively, in this embodiment, the speech may be converted into text information, and then the text information is input into the target neural network model, and the recognition result is output by the target neural network model.
In this embodiment, the original neural network model may be trained in advance using the sample text data to obtain the target neural network model. The sample text data may be a data pair that includes the input text and the intended result. If the text is "day too hot, turn on air conditioner", the intended result is "turn on air conditioner cooling mode". And training the original neural network model through sample text data so as to obtain a target neural network model.
The description is given with reference to examples. Fig. 3 is a schematic diagram of the system of the present embodiment. According to the method, a user inputs a voice request at a voice input device such as a sound box end, a control center obtains the voice request input by the user, text information of the current user request is identified through an Automatic voice identification technology (asr), a specified Natural Language Understanding (NLU) model is used for carrying out semantic Understanding processing on the text information, and if the intention type of the current request is a control instruction for target equipment, the method can be automatically triggered to judge whether the equipment types of the current user sound box and the target equipment are the same. If the user's head unit is of the same device type as the target device, the target device may be directly controlled using the first server of the user's head unit. If the device types of the sound and the target device are different, the control instruction can be sent to a target server of the target device, and the target device is controlled by the target server. Or directly sending the control instruction to the target equipment through a direct connection protocol to control the target equipment. The method can control the target device through the user sound even if the target device and the user sound are not devices of the same brand. In any control method, after the control is finished, a control result is returned to the control center, and the control result is fed back to the user by the control center.
By adopting the technical scheme, after the server identifies the user intention according to the voice of the user, whether the marks of the sound box and the equipment to be controlled are consistent or not is judged, if not, the voice command is controlled by the distribution equipment to the equipment cloud providing the equipment control service for the given sound box, the command is analyzed and processed by the equipment cloud, and during expansion, the server does not need to be upgraded, and only needs to be expanded, analyzed and processed on the corresponding equipment cloud.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present application, there is also provided an intelligent device control apparatus, as shown in fig. 4, including:
an obtaining unit 402, configured to obtain a voice message sent by a voice input device, where the voice input device is used to obtain a voice message input by a user;
an analyzing unit 404, configured to analyze the voice message to obtain a control instruction, where the control instruction is used to control the target intelligent device;
a first sending unit 406, configured to send a control instruction to a first server of the voice input device when the voice input device and the target smart device are devices of the same type, where the first server controls the target smart device;
a second sending unit 408, configured to, when the voice input device and the target smart device are different types of devices, control the target smart device through a direct connection protocol or send a control instruction to a target server corresponding to the target smart device, where the target server controls the target smart device.
Optionally, the voice input device in this embodiment may be an intelligent device with a microphone. A user may enter a voice message through the microphone. The voice input device can be in a standby state, and when the voice keywords of the user are received, the voice information after the keywords is determined as the voice message. For example, the user inputs "control the refrigerator freezing to rise once", "control" is a keyword, and "refrigerator freezing to rise once" is a voice message. And sending the voice message to the control center.
And after the second server serving as the control center obtains the voice message, analyzing the voice message to obtain a control instruction. Then, it is judged whether the device types of the target input device to be controlled by the control command and the voice input device are consistent. If the device types of the two devices are consistent, the second server can send the control instruction to the first server of the voice input device, and the first server controls the target intelligent device. If the device types of the target intelligent device and the target intelligent device are not consistent, the second server controls the target intelligent device through a direct connection protocol, or the second server sends a control instruction to a target server of the target intelligent device, and the target server controls the target intelligent device.
Optionally, all the servers mentioned in this application may be physical servers or cloud servers, and this embodiment is not limited.
Optionally, the type of the device involved in the present embodiment may be a brand or a lot number or a production date of the device, etc. Different types of devices correspond to different servers.
Fig. 2 is a schematic diagram of the control target smart device of the present embodiment. After the voice input equipment acquires the voice request of the user, the voice request is sent to the control center, and the control center analyzes the voice request to obtain a control instruction. And if the voice input equipment is consistent with the equipment type of the target intelligent equipment to be controlled by the control instruction, sending the control instruction to the first server, and controlling the target intelligent equipment by the first server. And if the voice input equipment is not consistent with the equipment type of the target intelligent equipment to be controlled by the control instruction, sending the control instruction to a target server of the target intelligent equipment, and controlling the target intelligent equipment by the target server. Or, the target intelligent device can be directly controlled through a direct connection protocol without participation of a target server.
Through the embodiment, by the method, in the process that the user controls the target intelligent device through the voice input device, if the device types of the voice input device and the target intelligent device are consistent, the first server controls the target intelligent device, and if the device types of the voice input device and the target intelligent device are not consistent, the target server controls the target intelligent device, so that the problem that the target intelligent device cannot be controlled due to compatibility is solved.
For other examples of this embodiment, please refer to the above examples, which are not described herein.
Fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 5, including a processor 502, a communication interface 504, a memory 506, and a communication bus 508, where the processor 502, the communication interface 504, and the memory 506 are communicated with each other via the communication bus 508, and where,
a memory 506 for storing a computer program;
the processor 502, when executing the computer program stored in the memory 506, implements the following steps:
acquiring a voice message sent by voice input equipment, wherein the voice input equipment is used for acquiring the voice message input by a user;
analyzing the voice message to obtain a control instruction, wherein the control instruction is used for controlling the target intelligent equipment;
under the condition that the voice input equipment and the target intelligent equipment are the same type of equipment, sending a control instruction to a first server of the voice input equipment, and controlling the target intelligent equipment by the first server;
and under the condition that the voice input equipment and the target intelligent equipment are different types of equipment, controlling the target intelligent equipment through a direct connection protocol or sending a control instruction to a target server corresponding to the target intelligent equipment, and controlling the target intelligent equipment by the target server.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus. The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 506 may include, but is not limited to, the obtaining unit 402, the determining unit 404, the first sending unit 406, and the second sending unit 408 in the processing device of the request. In addition, the module may further include, but is not limited to, other module units in the processing apparatus of the request, which is not described in this example again.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the device implementing the processing method of the request may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of the above-mentioned intelligent device control method when running.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.