Sentence-meaning recognition method, sentence-meaning recognition device, sentence-meaning recognition apparatus and storage medium
The present disclosure provides a sentence-meaning recognition method, a sentence-meaning recognition apparatus, a sentence-meaning recognition equipment and a storage medium. The sentence-meaning recognition method includes: performing a character-based similarity calculation on a first sentence to be recognized and a second sentence obtained based on the first sentence to obtain a first similarity and a first sentence-meaning recognition result; determining whether the first similarity triggers an enhanced recognition according to an enhanced recognition condition; outputting the first sentence-meaning recognition result in a case where the enhanced recognition condition is not satisfied; in a case where the enhanced recognition condition is satisfied, performing a Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence to obtain a second similarity and a second sentence-meaning recognition result, and generating and outputting a third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result.
1. A sentence-meaning recognition method, comprising:
performing a character-based similarity calculation on a first sentence to be recognized and a second sentence obtained based on the first sentence to obtain a first similarity and a first sentence-meaning recognition result;
determining whether the first similarity triggers an enhanced recognition according to an enhanced recognition condition;
outputting the first sentence-meaning recognition result if the enhanced recognition condition is not satisfied, and if the enhanced recognition condition is satisfied, performing a Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence to obtain a second similarity and a second sentence-meaning recognition result; and
generating and outputting a third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result,
wherein the step of performing Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence, to obtain the second similarity and the second sentence-meaning recognition result comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing a vectorization processing on the obtained Chinese-phonetic-alphabets, respectively, and performing feature extraction on the vectorized Chinese-phonetic-alphabets by using a second deep learning model to obtain a third extraction result and a fourth extraction result;
performing a similarity calculation on the third extraction result and the fourth extraction result to obtain the second similarity; and
generating the second sentence-meaning recognition result according to the second similarity, and
wherein the step of converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing the vectorization processing on the obtained Chinese-phonetic-alphabets comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets;
dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of the Chinese-phonetic-alphabet of each character, and dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of a window with a fixed length; and
vectorizing the Chinese-phonetic-alphabets of each group.
2. The method of claim 1 , wherein the enhanced recognition condition comprises the first similarity being less than a first threshold and greater than a second threshold;
wherein when the first similarity is not greater than the second threshold, the first sentence-meaning recognition result is null.
3. The method of claim 1 , wherein the step of performing the character-based similarity calculation on the first sentence to be recognized and the second sentence obtained based on the first sentence to obtain the first similarity and the first sentence-meaning recognition result comprises:
performing a character-vectorization processing on the first sentence and the second sentence respectively, and extracting features from the vectorized first sentence and the vectorized second sentence by using a first deep learning model to obtain a first extraction result and a second extraction result;
performing a similarity calculation on the first extraction result and the second extraction result to obtain the first similarity; and
generating the first sentence-meaning recognition result according to the first similarity.
4. The method of claim 3 , wherein the step of performing the similarity calculation on the first extraction result and the second extraction result to obtain the first similarity comprises:
performing a similarity calculation on each of second extraction results extracted from multiple second sentences and the first extraction result respectively, to obtain a plurality of candidate similarities; and
determining the highest candidate similarity among the candidate similarities as the first similarity.
5. A sentence-meaning recognition method, comprising:
performing a character-based similarity calculation on a first sentence to be recognized and a second sentence obtained based on the first sentence to obtain a first similarity and a first sentence-meaning recognition result;
determining whether the first similarity triggers an enhanced recognition according to an enhanced recognition condition;
outputting the first sentence-meaning recognition result if the enhanced recognition condition is not satisfied, and if the enhanced recognition condition is satisfied, performing a Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence to obtain a second similarity and a second sentence-meaning recognition result; and
generating and outputting a third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result wherein
the step of generating and outputting the third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result comprises:
determining whether the first sentence-meaning recognition result and the second sentence meaning recognition result are the same;
wherein when the first sentence-meaning recognition result and the second sentence meaning recognition result are determined to not be the same, the third sentence-meaning recognition result is configured to be null and is output; and
wherein when the first sentence-meaning recognition result and the second sentence meaning recognition result are determined to be the same, the first sentence-meaning recognition result is output as the third sentence meaning recognition result.
6. The method of claim 1 , further comprising:
performing a voice recognition on voice information to obtain the first sentence.
7. The method of claim 6 , further comprises:
before the step of performing the voice recognition on voice information to obtain the first sentence, collecting the voice information.
8. The method of claim 1 , wherein the second sentence is obtained from a segmentation domain library based on the first sentence.
9. A sentence-meaning recognition apparatus, comprising:
a first recognition device that performs a character-based similarity calculation on a first sentence to be recognized and a second sentence obtained based on the first sentence to obtain a first similarity and a first sentence-meaning recognition result;
a determining device that determines whether the first similarity triggers an enhanced recognition according to an enhanced recognition condition;
a first output device that outputs the first sentence-meaning recognition result when the determination result is that the enhanced recognition is not triggered;
a second recognition device that, when the determination result is that the enhanced recognition is triggered, performs a Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence to obtain a second similarity and a second sentence-meaning recognition
result; and
a second output device that generates and output a third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result,
wherein the step of performing Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence, to obtain the second similarity and the second sentence-meaning recognition result comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing a vectorization processing on the obtained Chinese-phonetic-alphabets, respectively, and performing feature extraction on the vectorized Chinese-phonetic-alphabets by using a second deep learning model to obtain a third extraction result and a fourth extraction result;
performing a similarity calculation on the third extraction result and the fourth extraction result to obtain the second similarity; and
generating the second sentence-meaning recognition result according to the second similarity, and
wherein the step of converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing the vectorization processing on the obtained Chinese-phonetic-alphabets comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets;
dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of the Chinese-phonetic-alphabet of each character, and dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of a window with a fixed length; and
vectorizing the Chinese-phonetic-alphabets of each group.
10. The sentence-meaning recognition apparatus of claim 9 , wherein the second recognition device comprises:
an extraction element that converts the first sentence and the second sentence into Chinese-phonetic-alphabets and perform a vectorization processing on the obtained Chinese-phonetic-alphabets, respectively, and perform feature extraction on the vectorized Chinese-phonetic-alphabets by using a second deep learning model to obtain a third extraction result and a fourth extraction result;
a calculation element performs a similarity calculation on the third extraction result and the fourth extraction result to obtain the second similarity;
a generation element that generates the second sentence-meaning recognition result according to the second similarity.
11. The sentence-meaning recognition apparatus of claim 10 , wherein the extraction element further:
converts the first sentence and the second sentence into Chinese-phonetic-alphabets;
divide the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of the Chinese-phonetic-alphabet of each character, and divides the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of a window with a fixed length; and
vectorizes the Chinese-phonetic-alphabets of each group.
12. The sentence-meaning recognition apparatus of claim 9 , wherein the enhanced recognition condition comprises the first similarity being less than a first threshold and greater than a second threshold;
wherein when the first similarity is not greater than the second threshold, the first sentence-meaning recognition result is null.
13. The sentence-meaning recognition apparatus of claim 9 , further comprising:
a voice recognition device configured to perform a voice recognition on voice information to obtain the first sentence.
14. The sentence-meaning recognition apparatus of claim 12 , further comprising:
a voice recognition device that performs a voice recognition on voice information to obtain the first sentence.
15. The sentence-meaning recognition apparatus of claim 13 , further comprising: a collection device that collects the voice information.
16. The sentence-meaning recognition apparatus of claim 9 , further comprising:
a storage device that stores a segmentation domain library, wherein the second sentence is obtained from the segmentation domain library based on the first sentence.
17. A sentence-meaning recognition equipment, comprising:
one or more processors;
a memory that stores one or more programs,
wherein the one or more processors perform the method of claim 1 when the one or more programs are executed by the one or more processors.
18. A non-transitory storage medium storing a computer program, wherein the computer program is executed to implement the method of A sentence-meaning recognition method, comprising:
performing a character-based similarity calculation on a first sentence to be recognized and a second sentence obtained based on the first sentence to obtain a first similarity and a first sentence-meaning recognition result;
determining whether the first similarity triggers an enhanced recognition according to an enhanced recognition condition;
outputting the first sentence-meaning recognition result if the enhanced recognition condition is not satisfied, and if the enhanced recognition condition is satisfied, performing a Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence to obtain a second similarity and a second sentence-meaning recognition result; and
generating and outputting a third sentence-meaning recognition result according to the first sentence-meaning recognition result and the second sentence-meaning recognition result,
wherein the step of performing Chinese-phonetic-alphabet-based similarity calculation on the first sentence and the second sentence, to obtain the second similarity and the second sentence-meaning recognition result comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing a vectorization processing on the obtained Chinese-phonetic-alphabets, respectively, and performing feature extraction on the vectorized Chinese-phonetic-alphabets by using a second deep learning model to obtain a third extraction result and a fourth extraction result;
performing a similarity calculation on the third extraction result and the fourth extraction result to obtain the second similarity; and
generating the second sentence-meaning recognition result according to the second similarity, and
wherein the step of converting the first sentence and the second sentence into Chinese-phonetic-alphabets and performing the vectorization processing on the obtained Chinese-phonetic-alphabets comprises:
converting the first sentence and the second sentence into Chinese-phonetic-alphabets;
dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of the Chinese-phonetic-alphabet of each character, and dividing the Chinese-phonetic-alphabets of the first sentence and the second sentence into groups on the basis of a window with a fixed length; and
vectorizing the Chinese-phonetic-alphabets of each group.
19. The method of claim 5 , wherein the enhanced recognition condition comprises the first similarity being less than a first threshold and greater than a second threshold;
wherein when the first similarity is not greater than the second threshold, the first sentence-meaning recognition result is null.
20. The method of claim 5 , wherein the step of performing the character-based similarity calculation on the first sentence to be recognized and the second sentence obtained based on the first sentence to obtain the first similarity and the first sentence-meaning recognition result comprises:
performing a character-vectorization processing on the first sentence and the second sentence respectively, and extracting features from the vectorized first sentence and the vectorized second sentence by using a first deep learning model to obtain a first extraction result and a second extraction result;
performing a similarity calculation on the first extraction result and the second extraction result to obtain the first similarity; and
generating the first sentence-meaning recognition result according to the first similarity.
21. The method of claim 20 , wherein the step of performing the similarity calculation on the first extraction result and the second extraction result to obtain the first similarity comprises:
performing a similarity calculation on each of second extraction results extracted from multiple second sentences and the first extraction result respectively, to obtain a plurality of candidate similarities; and
determining the highest candidate similarity among the candidate similarities as the first similarity.
22. The method of claim 5 , further comprising:
performing a voice recognition on voice information to obtain the first sentence.
23. The method of claim 22 , further comprises:
before the step of performing the voice recognition on voice information to obtain the first sentence, collecting the voice information.
24. The method of claim 5 , wherein the second sentence is obtained from a segmentation domain library based on the first sentence.