Equipment control method based on artificial intelligence
By converting real-time voice commands into text and using session identifiers to build command flag functions to match the preset commands of smart home devices, the problem of inaccurate control of smart home devices is solved and precise control and intelligence of multiple devices are achieved. degree of improvement.
Patent Information
- Application Number
- CN202411918305.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The effectiveness of the prior art to accurately control devices in smart homes needs to be improved, mainly due to the complex network architecture of communication connections between smart devices.
Adopting a device control method based on artificial intelligence, by obtaining real-time voice instructions and converting them into real-time text instructions, using the Session identifier of the real-time text instructions to construct a real-time instruction flag function, and then matching the best preset instructions in the instruction set, Determine the corresponding device.
The precise control of smart home devices has been realized, the degree of intelligence of the equipment is improved, and the user's voice instructions can be more accurately executed.
Smart Images

Figure CN119360852A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to an equipment control method based on artificial intelligence. Background Art
[0002] With the development of IoT technology, a large number of devices are connected to the IoT in various ways. These devices are no longer just various types of sensors, but have gradually evolved into devices that not only provide sensor functions but also actuator functions. These devices are usually called smart devices. Take the smart home based on IoT technology as an example. In a smart home, all household electrical devices may be connected to the IoT, such as TVs, air conditioners, and stereos. After all these electrical devices are connected to the network, the most important thing is to achieve accurate control of them. However, due to the complex network architecture for communication between smart devices, the effect of accurate control of each device in the scene by existing technologies needs to be improved. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes an equipment control method based on artificial intelligence.
[0004] The technical solution of the present invention is: an artificial intelligence-based device control method comprises the following steps:
[0005] S1, obtaining real-time voice instructions of the scene, and converting the real-time voice instructions into real-time text instructions;
[0006] S2, matching the best preset instruction for the real-time text instruction in the instruction set according to the real-time instruction flag function of the real-time text instruction;
[0007] S3. Determine the device corresponding to the best preset instruction.
[0008] Furthermore, S2 includes the following sub-steps:
[0009] S21, building a matching dialogue for the real-time text instruction;
[0010] S22, generating a Session identifier for the real-time text instruction according to the matching dialogue corresponding to the real-time text instruction;
[0011] S23, constructing a real-time instruction flag function according to the Session identifier of the real-time text instruction;
[0012] S24. According to the real-time instruction flag function, the best preset instruction is matched for the real-time text instruction in the instruction set.
[0013] The beneficial effect of the above further scheme is: in the present invention, the real-time voice instructions issued by the user in the scene are not necessarily the same as several preset instructions in the instruction set, and most of the time there is a deviation between the real-time voice instructions and the preset instructions. And the real-time voice instructions are more specific most of the time, so it is necessary to match the preset instructions according to the real-time text instructions corresponding to the real-time voice instructions. The Session identifier of the real-time text instruction is stored on the server side and is used to track the data of the user's session status. Therefore, the present invention uses the characteristic parameters of the real-time text instruction to construct a marking function, thereby completing the instruction matching.
[0014] Furthermore, S21 includes the following sub-steps:
[0015] S211, splitting the real-time text instruction to obtain an operation type instruction and an operation parameter instruction;
[0016] S222, converting each character in the operation type instruction into a word vector form, and converting each parameter in the operation parameter instruction into a binary form;
[0017] S223. Generate a matching dialogue according to the converted operation type instruction and operation parameter instruction.
[0018] The beneficial effect of the above further scheme is that in the present invention, after the user's real-time voice command is converted into a real-time text command, the real-time text command can also be completed to ensure that the real-time text command can clearly indicate the type of operation that the smart home device needs to perform, such as switching, adjusting and querying, etc. This is the core part of the command and determines the behavior of the device. The real-time text command may also include certain operation parameters, because for some operation types, the user needs to provide additional parameters to further refine the operation; for example, if you want to adjust the light brightness, the user needs to specify a specific brightness value; if you want to set the air conditioning temperature, the user needs to specify a specific temperature value.
[0019] Furthermore, in S223, the expression for matching the conversation Talk is: ; In the formula, C1 represents the word vector value of the first character in the operation type instruction, C i Represents the word vector value of the i-th character in the operation type instruction, C I represents the word vector value of the Ith character in the operation type instruction, N1 represents the binary value of the first parameter in the operation parameter instruction, and N j Indicates the binary value of the jth parameter in the operation parameter instruction, N J It represents the binary value of the jth parameter in the operation parameter instruction, I represents the number of characters in the operation type instruction, J represents the number of parameters in the operation parameter instruction, and ID represents the user's identity number.
[0020] Furthermore, in S23, the expression of the real-time instruction flag function Z is: ; In the formula, Talk ID represents the Session identifier of the matching conversation, HASH(·) represents the hash operation, e represents the exponent, and t0 represents the ideal response time of the real-time text command.
[0021] The above further scheme has the beneficial effect that: in the present invention, each session usually has a unique identifier, namely Session ID, which is used to distinguish different user sessions. Calculating the hash value of the ID usually involves using a hash function, which can convert data of any length (such as a string ID) into a hash value of a fixed length. The ideal response time refers to the ideal time from the issuance of an instruction to the system starting to execute the instruction.
[0022] Further, S24 includes the following sub-steps:
[0023] S241, inputting the real-time text instruction and each standard instruction in the instruction set into the query function, and obtaining the query value between the real-time text instruction and each standard instruction by using the real-time instruction flag function;
[0024] S242: Use the standard instruction corresponding to the maximum query value as the best preset instruction.
[0025] Further, in S241, the expression of the query function Y is: ; Wherein, Cos(·) represents the text similarity function, A0 represents the real-time text instruction, B represents the standard instruction of the instruction set, Z represents the real-time instruction flag function of the real-time text instruction, rand(·) represents the generation of a random number between 0 and 1, and D represents the default value of the ID field corresponding to the standard instruction of the instruction set.
[0026] The beneficial effect of the above further scheme is: in the present invention, the instruction set is stored in a table called instructions, and each instruction has a unique id field, and the ID field can be set with a default value, which is helpful for data management and integrity.
[0027] Furthermore, in S3, a command line tool is used to determine a device corresponding to the best preset instruction.
[0028] The beneficial effect of the above further solution is that in the present invention, command line tools (such as lsusb, lspci and dmesg, etc.) can be used to list the devices connected to the system and view their detailed information.
[0029] The beneficial effects of the present invention are as follows: the present invention provides a device control method based on artificial intelligence, which converts the real-time voice instructions output by the user in the scene into text to obtain real-time text instructions, matches the parameters of the real-time text instructions with the most suitable preset instructions in the instruction set, and determines the exact device corresponding to the real-time voice instruction through the preset instructions; the present invention can perform a comprehensive analysis of the voice instructions appearing in the scene to obtain the most accurate preset instructions, and control the equipment through the preset instructions, thereby achieving precise control of multiple devices and improving the intelligence level of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The figure is a flow chart of an artificial intelligence-based device control method. DETAILED DESCRIPTION
[0031] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.
[0032] like Figure 1 As shown, the present invention provides an artificial intelligence-based device control method comprising the following steps:
[0033] S1, obtaining real-time voice instructions of the scene, and converting the real-time voice instructions into real-time text instructions;
[0034] S2, matching the best preset instruction for the real-time text instruction in the instruction set according to the real-time instruction flag function of the real-time text instruction;
[0035] S3. Determine the device corresponding to the best preset instruction.
[0036] In this embodiment of the present invention, S2 includes the following sub-steps:
[0037] S21, building a matching dialogue for the real-time text instruction;
[0038] S22, generating a Session identifier for the real-time text instruction according to the matching dialogue corresponding to the real-time text instruction;
[0039] S23, constructing a real-time instruction flag function according to the Session identifier of the real-time text instruction;
[0040] S24. According to the real-time instruction flag function, the best preset instruction is matched for the real-time text instruction in the instruction set.
[0041] The beneficial effect of the above further scheme is: in the present invention, the real-time voice instructions issued by the user in the scene are not necessarily the same as several preset instructions in the instruction set, and most of the time there is a deviation between the real-time voice instructions and the preset instructions. And the real-time voice instructions are more specific most of the time, so it is necessary to match the preset instructions according to the real-time text instructions corresponding to the real-time voice instructions. The Session identifier of the real-time text instruction is stored on the server side and is used to track the data of the user's session status. Therefore, the present invention uses the characteristic parameters of the real-time text instruction to construct a marking function, thereby completing the instruction matching.
[0042] In this embodiment of the present invention, S21 includes the following sub-steps:
[0043] S211, splitting the real-time text instruction to obtain an operation type instruction and an operation parameter instruction;
[0044] S222, converting each character in the operation type instruction into a word vector form, and converting each parameter in the operation parameter instruction into a binary form;
[0045] S223. Generate a matching dialogue according to the converted operation type instruction and operation parameter instruction.
[0046] The beneficial effect of the above further scheme is that in the present invention, after the user's real-time voice command is converted into a real-time text command, the real-time text command can also be completed to ensure that the real-time text command can clearly indicate the type of operation that the smart home device needs to perform, such as switching, adjusting and querying, etc. This is the core part of the command and determines the behavior of the device. The real-time text command may also include certain operation parameters, because for some operation types, the user needs to provide additional parameters to further refine the operation; for example, if you want to adjust the light brightness, the user needs to specify a specific brightness value; if you want to set the air conditioning temperature, the user needs to specify a specific temperature value.
[0047] In the embodiment of the present invention, in S223, the expression for matching the conversation Talk is: ; In the formula, C1 represents the word vector value of the first character in the operation type instruction, C i Represents the word vector value of the i-th character in the operation type instruction, C I represents the word vector value of the Ith character in the operation type instruction, N1 represents the binary value of the first parameter in the operation parameter instruction, and N j Indicates the binary value of the jth parameter in the operation parameter instruction, N J It represents the binary value of the jth parameter in the operation parameter instruction, I represents the number of characters in the operation type instruction, J represents the number of parameters in the operation parameter instruction, and ID represents the user's identity number.
[0048] In the embodiment of the present invention, in S23, the expression of the real-time instruction flag function Z is: ; In the formula, Talk ID represents the Session identifier of the matching conversation, HASH(·) represents the hash operation, e represents the exponent, and t0 represents the ideal response time of the real-time text command.
[0049] The above further scheme has the beneficial effect that: in the present invention, each session usually has a unique identifier, namely Session ID, which is used to distinguish different user sessions. Calculating the hash value of the ID usually involves using a hash function, which can convert data of any length (such as a string ID) into a hash value of a fixed length. The ideal response time refers to the ideal time from the issuance of an instruction to the system starting to execute the instruction.
[0050] In this embodiment of the present invention, S24 includes the following sub-steps:
[0051] S241, inputting the real-time text instruction and each standard instruction in the instruction set into the query function, and obtaining the query value between the real-time text instruction and each standard instruction by using the real-time instruction flag function;
[0052] S242: Use the standard instruction corresponding to the maximum query value as the best preset instruction.
[0053] In the embodiment of the present invention, in S241, the expression of the query function Y is: ; Wherein, Cos(·) represents the text similarity function, A0 represents the real-time text instruction, B represents the standard instruction of the instruction set, Z represents the real-time instruction flag function of the real-time text instruction, rand(·) represents the generation of a random number between 0 and 1, and D represents the default value of the ID field corresponding to the standard instruction of the instruction set.
[0054] The beneficial effect of the above further scheme is: in the present invention, the instruction set is stored in a table called instructions, and each instruction has a unique id field, and the ID field can be set with a default value, which is helpful for data management and integrity.
[0055] In the embodiment of the present invention, in S3, a command line tool is used to determine a device corresponding to the best preset instruction.
[0056] The beneficial effect of the above further solution is that in the present invention, command line tools (such as lsusb, lspci and dmesg, etc.) can be used to list the devices connected to the system and view their detailed information.
[0057] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. An artificial intelligence-based device control method, characterized in that: The following steps are involved: S1, obtaining real-time voice instructions of the scene, and converting the real-time voice instructions into real-time text instructions; S2, matching the best preset instruction for the real-time text instruction in the instruction set according to the real-time instruction flag function of the real-time text instruction; S3. Determine the device corresponding to the best preset instruction.
2. The artificial intelligence-based device control method according to claim 1, characterized in that: The S2 comprises the following sub-steps: S21, building a matching dialogue for the real-time text instruction; S22, generating a Session identifier for the real-time text instruction according to the matching dialogue corresponding to the real-time text instruction; S23, constructing a real-time instruction flag function according to the Session identifier of the real-time text instruction; S24. According to the real-time instruction flag function, the best preset instruction is matched for the real-time text instruction in the instruction set.
3. The artificial intelligence-based device control method according to claim 2, characterized in that: The S21 includes the following sub-steps: S211, splitting the real-time text instruction to obtain an operation type instruction and an operation parameter instruction; S222, converting each character in the operation type instruction into a word vector form, and converting each parameter in the operation parameter instruction into a binary form; S223. Generate a matching dialogue according to the converted operation type instruction and operation parameter instruction.
4. The artificial intelligence-based device control method according to claim 3, characterized in that: In S223, the expression for matching the dialogue Talk is: ; In the formula, C1 represents the word vector value of the first character in the operation type instruction, C i Represents the word vector value of the i-th character in the operation type instruction, C I represents the word vector value of the Ith character in the operation type instruction, N1 represents the binary value of the first parameter in the operation parameter instruction, and N j Indicates the binary value of the jth parameter in the operation parameter instruction, N J It represents the binary value of the jth parameter in the operation parameter instruction, I represents the number of characters in the operation type instruction, J represents the number of parameters in the operation parameter instruction, and ID represents the user's identity number.
5. The artificial intelligence-based device control method according to claim 2, characterized in that: In S23, the expression of the real-time instruction flag function Z is: ; In the formula, Talk ID represents the Session identifier of the matching conversation, HASH(·) represents the hash operation, e represents the exponent, and t0 represents the ideal response time of the real-time text command.
6. The artificial intelligence-based device control method according to claim 2, characterized in that: The S24 comprises the following sub-steps: S241, inputting the real-time text instruction and each standard instruction in the instruction set into the query function, and obtaining the query value between the real-time text instruction and each standard instruction by using the real-time instruction flag function; S242: Use the standard instruction corresponding to the maximum query value as the best preset instruction.
7. The artificial intelligence-based device control method according to claim 6, characterized in that: In S241, the expression of the query function Y is: ; Wherein, Cos(·) represents the text similarity function, A0 represents the real-time text instruction, B represents the standard instruction of the instruction set, Z represents the real-time instruction flag function of the real-time text instruction, rand(·) represents the generation of a random number between 0 and 1, and D represents the default value of the ID field corresponding to the standard instruction of the instruction set.
8. The device control method based on artificial intelligence according to claim 1, characterized in that: In S3, a command line tool is used to determine a device corresponding to the best preset instruction.
Citation Information
Patent Citations
Voice identification method and device
CN108288468A
Voice recognition equipment control method, voice recognition equipment and center control server
CN108663942A
Application control method and device, equipment and storage medium
CN112825030A
Smart home voice control method and system, electronic equipment and storage medium
CN114863928A
Method for controlling mobile phone through sound
CN117831531A