US 11,836,448 B2
Method for semantic recognition and electronic device
Yuankai Guo, Beijing (CN); Bin Wang, Beijing (CN); Liang Shi, Beijing (CN); Erli Meng, Beijing (CN); Yulan Hu, Beijing (CN); Shuo Wang, Beijing (CN); and Yingzhe Wang, Beijing (CN)
Assigned to Beijing Xiaomi Pinecone Electronics Co., Ltd., Beijing (CN)
Filed by Beijing Xiaomi Pinecone Electronics Co., Ltd., Beijing (CN)
Filed on Dec. 23, 2020, as Appl. No. 17/133,126.
Claims priority of application No. 202010622078.2 (CN), filed on Jun. 30, 2020.
Prior Publication US 2021/0406462 A1, Dec. 30, 2021
Int. Cl. G06F 40/216 (2020.01); G06F 40/279 (2020.01); G06F 40/30 (2020.01); G06F 40/295 (2020.01); G06F 9/48 (2006.01)
CPC G06F 40/216 (2020.01) [G06F 40/295 (2020.01); G06F 40/30 (2020.01); G06F 9/4881 (2013.01)] 18 Claims
OG exemplary drawing
 
1. A computer-implemented method for semantic recognition, performed by a terminal, the method comprising:
in response to performing semantic analysis on information acquired by the terminal, acquiring a sentence to be processed;
performing word recognition on the sentence to be processed, to obtain a plurality of words and part-of-speech information corresponding to each of the plurality of words;
determining, with a pre-trained word processing model, a target set update operation corresponding to a set of words to be processed from a plurality of preset set update operations, according to a word to be processed in the set of words to be processed, part-of-speech information of the word to be processed, a first word, part-of-speech information of the first word and a dependency relationship of a second word; wherein the set of words to be processed is a set of words to be processed currently in the plurality of words; wherein the second word is a word that follows the word to be processed and has been determined to have a dependency relationship with the word to be processed in the plurality of words, and the first word includes a preset number of words following the second word, and wherein the word to be processed is a verb, and the first word is a subordinate word of the second word;
in response to that a dependency relationship corresponding to the target set update operation is a first dependency relationship, determining, through each of the plurality of preset set update operations, a respective dependency relationship of the word to be processed and a respective confidence level corresponding to the dependency relationship, and performing, according to the each of the plurality of preset set update operations, a respective update of the set of words to be processed; wherein the first dependency relationship indicates that a second-place word in two of the plurality of words is a subordinate word of a first-place word in the two of the plurality of words;
in response to that the dependency relationship corresponding to the target set update operation is not the first dependency relationship, determining, through the target set update operation, the dependency relationship of the word to be processed and the confidence level corresponding to the dependency relationship, and updating the set of words to be processed according to the target set update operation;
performing, according to the respective updated set of words to be processed, the step of determining, with the pre-trained word processing model, the target set update operation corresponding to the set of words to be processed from the plurality of preset set update operations, according to the word to be processed in the set of words to be processed and the part-of-speech information of the word to be processed, to the step of updating the set of words to be processed according to the target set update operation repeatedly, until obtaining a plurality of dependency parsing results of the sentence to be processed; wherein each of the dependency parsing results represents a respective set of dependency relationships among the plurality of words; and
taking a dependency parsing result with a highest one of multiple sums of confidence levels, each sum being a sum of a set of confidence levels corresponding to a respective set of dependency relationships among the plurality of words, as an optimal parsing result in the plurality of dependency parsing results, and performing the semantic recognition on the sentence to be processed according to the optimal parsing result, wherein the optimal parsing result is configured for the terminal to recognize semantically text obtained by the terminal.