Processing method and device of the user input information
First Claim
1. A method of processing Chinese language user input during a natural language man-machine interaction, comprising:
- at a device having one or more processors and memory;
storing a respective usage rule for processing a Chinese natural language user request for a computer-executable task, wherein the computer-executable task corresponds to multiple alternative natural language expressions in the Chinese language, wherein the respective usage rule comprises a respective rule string that includes the multiple alternative natural language expressions in Chinese, at least one placeholder for inserting (i) a respective named entity in the respective rule string in accordance with Chinese grammatical rules, (ii) a respective command index number that corresponds to a command to process the computer-executable task, and (iii) a respective parameter string that identifies respective types of input values to be obtained from the user request and used to process the computer-executable task;
performing a first transformation on the respective rule string of the respective usage rule to obtain a respective regular expression pattern by converting one or more Chinese characters in the respective rule string into a first identifier, wherein the first identifier includes a regular expression for a respective string;
performing a second transformation on the respective rule string of the respective usage rule to obtain a respective standard regular expression by adding a second identifier immediately before the at least one placeholder and another instance of the second identifier immediately after the at least one placeholder in the respective rule string, wherein;
the second identifier includes a regular expression for a wildcard;
the respective regular expression pattern obtained from the respective rule string is different from the respective standard regular expression obtained from the respective rule string, andthe respective regular expression pattern obtained through the first transformation is the same as the respective standard regular expression obtained through the second transformation when the respective regular expression pattern obtained through the first transformation is filled with one or more correct named entities recognized from a Chinese language user input, at respective locations in the respective regular expression pattern corresponding to the at least one placeholder specified in the respective rule string;
receiving a speech input from a user using a microphone installed in the device;
converting the speech input into a Chinese text string through speech-to-text processing as a first text input in Chinese;
in accordance with a determination that the first user input in Chinese matches at least one of the multiple alternative natural language expressions in the respective rule string of the respective usage rule;
obtaining a concatenated parameter string using the respective regular expression pattern of the respective usage rule obtained through the first transformation and the respective standard regular expression of the respective usage rule obtained through the second transformation, including;
extracting one or more named entities from the first user input in Chinese; and
inserting the one or more named entities recognized from the first user input at locations of corresponding parameters in the concatenated parameter string of the respective usage rule; and
performing the computer-executable task by executing the command corresponding to the respective command index number using the concatenated parameter string and producing a result from the execution of the command.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and device for processing user input, including: storing a respective usage rule for processing a user request for a task, the respective usage rule comprising a respective rule string, a respective command index number, and a respective parameter string; performing a first transformation on the respective rule string of the respective usage rule to obtain a respective regular expression pattern; performing a second transformation on the respective rule string of the respective usage rule to obtain a respective standard regular expression; obtaining a user input that matches the respective rule string of the respective usage rule; obtaining a concatenated parameter string using the respective regular expression pattern and the respective standard regular expression; and executing a command corresponding to the respective command index number using the concatenated parameter string.
-
Citations
18 Claims
-
1. A method of processing Chinese language user input during a natural language man-machine interaction, comprising:
-
at a device having one or more processors and memory; storing a respective usage rule for processing a Chinese natural language user request for a computer-executable task, wherein the computer-executable task corresponds to multiple alternative natural language expressions in the Chinese language, wherein the respective usage rule comprises a respective rule string that includes the multiple alternative natural language expressions in Chinese, at least one placeholder for inserting (i) a respective named entity in the respective rule string in accordance with Chinese grammatical rules, (ii) a respective command index number that corresponds to a command to process the computer-executable task, and (iii) a respective parameter string that identifies respective types of input values to be obtained from the user request and used to process the computer-executable task; performing a first transformation on the respective rule string of the respective usage rule to obtain a respective regular expression pattern by converting one or more Chinese characters in the respective rule string into a first identifier, wherein the first identifier includes a regular expression for a respective string; performing a second transformation on the respective rule string of the respective usage rule to obtain a respective standard regular expression by adding a second identifier immediately before the at least one placeholder and another instance of the second identifier immediately after the at least one placeholder in the respective rule string, wherein; the second identifier includes a regular expression for a wildcard; the respective regular expression pattern obtained from the respective rule string is different from the respective standard regular expression obtained from the respective rule string, and the respective regular expression pattern obtained through the first transformation is the same as the respective standard regular expression obtained through the second transformation when the respective regular expression pattern obtained through the first transformation is filled with one or more correct named entities recognized from a Chinese language user input, at respective locations in the respective regular expression pattern corresponding to the at least one placeholder specified in the respective rule string; receiving a speech input from a user using a microphone installed in the device; converting the speech input into a Chinese text string through speech-to-text processing as a first text input in Chinese; in accordance with a determination that the first user input in Chinese matches at least one of the multiple alternative natural language expressions in the respective rule string of the respective usage rule; obtaining a concatenated parameter string using the respective regular expression pattern of the respective usage rule obtained through the first transformation and the respective standard regular expression of the respective usage rule obtained through the second transformation, including; extracting one or more named entities from the first user input in Chinese; and inserting the one or more named entities recognized from the first user input at locations of corresponding parameters in the concatenated parameter string of the respective usage rule; and performing the computer-executable task by executing the command corresponding to the respective command index number using the concatenated parameter string and producing a result from the execution of the command. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system of processing user input, comprising:
-
one or more processors; and memory having instructions stored thereon, the instructions, when executed by the one or more processors, cause the processors to perform operations comprising; storing a respective usage rule for processing a Chinese natural language user request for a computer-executable task, wherein the computer-executable task corresponds to multiple alternative natural language expressions in the Chinese language, wherein the respective usage rule comprises a respective rule string that includes the multiple alternative natural language expressions in Chinese, at least one placeholder for inserting a respective named entity in the respective rule string in accordance with Chinese grammatical rules, a respective command index number that corresponds to a command to process the computer-executable task, and a respective parameter string that identifies respective types of input values to be obtained from the user request and used to process the computer-executable task; performing a first transformation on the respective rule string of the respective usage rule to obtain a respective regular expression pattern by converting one or more Chinese characters in the respective rule string into a first identifier, wherein the first identifier includes a regular expression for a respective string; performing a second transformation on the respective rule string of the respective usage rule to obtain a respective standard regular expression by adding a second identifier immediately before the at least one placeholder and another instance of the second identifier immediately after the at least one placeholder in the respective rule string, wherein; the second identifier includes a regular expression for a wildcard; the respective regular expression pattern obtained from the respective rule string is different from the respective standard regular expression obtained from the respective rule string, and the respective regular expression pattern obtained through the first transformation is the same as the respective standard regular expression obtained through the second transformation when the respective regular expression pattern obtained through the first transformation is filled with one or more correct named entities recognized from a Chinese language user input, at respective locations in the respective regular expression pattern corresponding to the at least one placeholder specified in the respective rule string; receiving a speech input from a user using a microphone installed in the device; converting the speech input into a Chinese text string through speech-to-text processing as a first text input in Chinese; in accordance with a determination that the first user input in Chinese matches at least one of the multiple alternative natural language expressions in the respective rule string of the respective usage rule; obtaining a concatenated parameter string using the respective regular expression pattern of the respective usage rule obtained through the first transformation and the respective standard regular expression of the respective usage rule obtained through the second transformation, including; extracting one or more named entities from the first user input in Chinese; and inserting the one or more named entities recognized from the first user input at locations of corresponding parameters in the concatenated parameter string of the respective usage rule; and performing the computer-executable task by executing the command corresponding to the respective command index number using the concatenated parameter string and producing a result from the execution of the command. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer-readable medium having instructions stored thereon, the instructions, when executed by one or more processors, cause the processors to perform operations comprising:
-
storing a respective usage rule for processing a Chinese natural language user request for a computer-executable task, wherein the computer-executable task corresponds to multiple alternative natural language expressions in the Chinese language, wherein the respective usage rule comprises a respective rule string that includes the multiple alternative natural language expressions in Chinese, at least one placeholder for inserting (i) a respective named entity in the respective rule string in accordance with Chinese grammatical rules, (ii) a respective command index number that corresponds to a command to process the computer-executable task, and (iii) a respective parameter string that identifies respective types of input values to be obtained from the user request and used to process the computer-executable task; performing a first transformation on the respective rule string of the respective usage rule to obtain a respective regular expression pattern, by converting one or more Chinese characters in the respective rule string into a first identifier, wherein the first identifier includes a regular expression for a respective string; performing a second transformation on the respective rule string of the respective usage rule to obtain a respective standard regular expression by adding a second identifier immediately before the at least one placeholder and another instance of the second identifier immediately after the at least one placeholder in the respective rule string, wherein; the second identifier includes a regular expression for a wildcard; the respective regular expression pattern obtained from the respective rule string is different from the respective standard regular expression obtained from the respective rule string, and the respective regular expression pattern obtained through the first transformation is the same as the respective standard regular expression obtained through the second transformation when the respective regular expression pattern obtained through the first transformation is filled with one or more correct named entities recognized from a Chinese language user input, at respective locations in the respective regular expression pattern corresponding to the at least one placeholder specified in the respective rule string; receiving a speech input from a user using a microphone installed in the device; converting the speech input into a Chinese text string through speech-to-text processing as a first text input in Chinese; in accordance with a determination that the first user input in Chinese matches at least one of the multiple alternative natural language expressions in the respective rule string of the respective usage rule; obtaining a concatenated parameter string using the respective regular expression pattern of the respective usage rule obtained through the first transformation and the respective standard regular expression of the respective usage rule obtained through the second transformation, including; extracting one or more named entities from the first user input in Chinese; and inserting the one or more named entities recognized from the first user input at locations of corresponding parameters in the concatenated parameter string of the respective usage rule; and performing the computer-executable task by executing the command corresponding to the respective command index number using the concatenated parameter string and producing a result from the execution of the command. - View Dependent Claims (18)
-
Specification