Disclosure of Invention
The application mainly provides an intelligent home control method and device and a computer readable storage medium, and convenience of a user can be improved.
In order to solve the technical problem, the application adopts a technical scheme that: the method for controlling the smart home comprises the following steps: receiving control information sent by a plurality of voice acquisition devices, wherein the control information comprises a control instruction and sound source distances between the plurality of voice acquisition devices and a user; calculating the position of the user according to the sound source distances between the voice acquisition equipment and the user; and sending the control instruction to the smart home corresponding to the position of the user.
Wherein the step of calculating the position of the user according to the sound source distances between the plurality of voice collecting devices and the user comprises: acquiring the equipment positions of the plurality of voice acquisition equipment in a family layout; and calculating the user position of the user in the family layout according to the equipment positions of the voice acquisition equipment and the sound source distance between the voice acquisition equipment and the user.
Wherein the step of obtaining the device positions of the plurality of voice collecting devices in the family layout comprises: acquiring device mark points of the voice acquisition devices in the family layout; the step of calculating the user position of the user in the family layout according to the device positions of the voice acquisition devices and the sound source distances between the voice acquisition devices and the user comprises: and determining a plurality of circumferential boundaries by respectively taking the equipment mark points of the plurality of voice acquisition equipment as the center and taking the sound source distance between the plurality of voice acquisition equipment and the user as the radius, and selecting the intersection points of the plurality of circumferential boundaries as the user positions of the user in the family layout.
Wherein, the number of the voice acquisition equipment is three.
Wherein the step of obtaining the device positions of the plurality of voice collecting devices in the family layout comprises: acquiring equipment coordinate values of the plurality of voice acquisition equipment in the family layout; the step of calculating the user position of the user in the family layout according to the device positions of the voice acquisition devices and the sound source distances between the voice acquisition devices and the user comprises: and calculating the user coordinates of the user in the family layout according to the equipment coordinate values of the voice acquisition equipment and the sound source distance between the voice acquisition equipment and the user.
Wherein the step of sending the control instruction to the smart home corresponding to the location of the user comprises: and sending the control instruction to the smart home in the room where the user position is located.
Wherein the step of sending the control instruction to the smart home in the room where the user location is located includes: acquiring a plurality of room positions in the family layout; and determining the position of the room where the user position is located in the family layout so as to send the control instruction to the smart home in the room where the user position is located.
Wherein the step of sending the control instruction to the smart home corresponding to the location of the user comprises: and calculating the distances between the position of the user and the plurality of smart homes in the home layout so as to send the control command to the smart home with the minimum distance.
In order to solve the above technical problem, another technical solution adopted by the present application is: an intelligent home control device is provided, which includes a processor and a memory, where the memory stores computer instructions, and the processor is coupled to the memory and executes the computer instructions when in operation to implement the method as described above.
In order to solve the above technical problem, the present application adopts another technical solution: there is provided a computer readable storage medium having stored thereon a computer program for execution by a processor to implement a method as described above.
The beneficial effect of this application is: different from the prior art, the method and the device receive control information sent by the voice acquisition equipment, wherein the control information comprises a control instruction and sound source distances between the voice acquisition equipment and a user; calculating the position of the user according to the sound source distances between the voice acquisition equipment and the user; the method for sending the control instruction to the intelligent home corresponding to the position of the user selects the corresponding intelligent home according to the position of the user, so that the step that the user further selects a plurality of identical intelligent homes is omitted, and the convenience of the user is improved.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be noted that the following examples are only illustrative of the present application, and do not limit the scope of the present application. Likewise, the following examples are only some examples and not all examples of the present application, and all other examples obtained by a person of ordinary skill in the art without any inventive step are within the scope of the present application.
The terms "first", "second" and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise. All directional indications (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of an intelligent home control method provided in the present application, where the control method in the present embodiment includes:
s110: receiving control information sent by a plurality of voice acquisition devices;
the control information comprises a control instruction and sound source distances between the voice acquisition equipment and a user.
Specifically, when a user wants to control the smart home in a home, the smart home can be controlled through voice, for example, the user says "turn on the air conditioner", at the moment, a plurality of voice acquisition devices can acquire the voice of the user and analyze the voice to obtain a control instruction of "turn on the air conditioner", and in a specific application scene, each room in the home is provided with the voice acquisition device.
Further, after the voice acquisition equipment acquires the voice, the sound source distance between the voice acquisition equipment and the user is determined, the determining method can calculate the distance through sound decibels, the farther the distance is, the smaller the sound decibel is, otherwise, the larger the sound decibel is, and the sound source distance can also be determined in a mode of installing a distance sensor on the voice acquisition equipment for detection.
Optionally, the voice collecting device may be an intelligent speaker.
S120: calculating the position of the user according to the sound source distances between the voice acquisition equipment and the user;
referring to fig. 2, fig. 2 is a schematic flowchart illustrating an embodiment of step S120 in fig. 1, in which step S120 may specifically include:
s1201: acquiring equipment positions of a plurality of voice acquisition equipment in a family layout;
specifically, the device positions of a plurality of voice collecting devices may be collected in advance to construct a family layout, and the family layout may be stored.
Optionally, in an embodiment, the step S1201 is specifically: the method comprises the steps of obtaining device marking points of a plurality of voice acquisition devices in a family layout, namely marking the positions of the plurality of voice acquisition devices through the device marking points in the process of constructing the family layout by acquiring the device positions of the plurality of voice acquisition devices in advance.
Optionally, in another embodiment, the step S1201 is specifically: the method comprises the steps of obtaining device coordinate values of a plurality of voice acquisition devices in a family layout, namely, in the process of constructing the family layout by acquiring device positions of the plurality of voice acquisition devices in advance, constructing a coordinate system, wherein the coordinate system can be a two-dimensional coordinate system or a three-dimensional coordinate system, and then giving the device coordinate values to the plurality of voice acquisition devices according to the device positions of the plurality of voice acquisition devices.
S1202: and calculating the user position of the user in the family layout according to the equipment positions of the voice acquisition equipment and the sound source distance between the voice acquisition equipment and the user.
Optionally, in an embodiment, the step S1202 specifically includes: and determining a plurality of circumferential boundaries by respectively taking the equipment mark points of the plurality of voice acquisition equipment as the center and taking the sound source distance between the plurality of voice acquisition equipment and the user as the radius, and selecting the intersection points of the plurality of circumferential boundaries as the user positions of the user in the family layout.
Optionally, in a specific application scenario, the number of the voice collecting devices is three, and the intersection point of the plurality of circumferential boundaries is one, so that the user position of the user in the family layout can be accurately determined.
Optionally, in another embodiment, the step S1202 specifically includes: and calculating the user coordinates of the user in the family layout according to the equipment coordinate values of the voice acquisition equipment and the sound source distance between the voice acquisition equipment and the user.
S130: and sending a control instruction to the intelligent home corresponding to the position of the user.
Optionally, in an embodiment, the step S130 specifically includes: the method includes the steps of sending a control instruction to an intelligent home in a room where a user position is located, obtaining a plurality of room positions in a home layout, namely in the process of a pre-constructed home layout, including the position layout of the rooms, then determining the room position where the user position is located in the home layout, for example, determining the position layout of the room where the intersection point is located in the home layout by taking the intersection point of a plurality of circumferential boundaries as the user position of the user in the home layout, and further sending the control instruction to the intelligent home in the room where the user position is located, for example, if the room where the user position is located is a main bedroom, and the control instruction is 'on air conditioner', then sending the control instruction to the air conditioner in the main bedroom.
Optionally, in another embodiment, the step S130 specifically includes: and calculating the distances between the position of the user and the plurality of smart homes in the home layout so as to send a control command to the smart home with the minimum distance.
Referring to fig. 3, fig. 3 is a schematic block diagram of an embodiment of an intelligent home control device provided in the present application, where a computer device in the present embodiment includes a processor 210 and a memory 220, the processor 210 is coupled to the memory 220, and the processor 210 executes instructions when operating to implement an intelligent home control method in any of the above embodiments.
The processor 210 may also be referred to as a Central Processing Unit (CPU). The processor 210 may be an integrated circuit chip having signal processing capabilities. The processor 210 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor, but is not limited thereto.
Referring to fig. 4, fig. 4 is a schematic block diagram of an embodiment of a computer-readable storage medium provided in the present application, in which a computer program 310 is stored, and the computer program 310 can be executed by a processor to implement the smart home control method in any of the above embodiments.
Optionally, the readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or may be a terminal device such as a computer, a server, a mobile phone, or a tablet.
Different from the prior art, the method and the device receive control information sent by the voice acquisition equipment, wherein the control information comprises a control instruction and sound source distances between the voice acquisition equipment and a user; calculating the position of the user according to the sound source distances between the voice acquisition equipment and the user; the method for sending the control instruction to the intelligent home corresponding to the position of the user selects the corresponding intelligent home according to the position of the user, so that the step that the user further selects a plurality of identical intelligent homes is omitted, and the convenience of the user is improved.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.