A non-transitory storage medium having instructions stored herein, when the instructions are executed by a processor of an electronic device, the processor is configured to perform a voice data processing method based on deep learning, executable by an electronic device, the method comprising:
- converting voice data into target text data based on a preset voice recognition model;
- matching keyword text data corresponding to a predetermined target voice keyword with the target text data to obtain a first matching result;
- determining whether the voice data include the target voice keyword according to the first matching result, wherein if the first matching result indicates that the matching between the keyword text data and the target text data is successful, it is determined that the voice data include the target voice keyword;
- wherein the method further comprises:
- performing homophone expansion on the keyword text data to obtain at least one homophone text data, if the first matching result indicates that the matching between the keyword text data and the target text data is unsuccessful;
- matching each of the homophone text data with the target text data to obtain at least one second matching result;
- segmenting the target text data into at least one segmentation text, if the at least one second matching result indicates that at least one homophone text data is successfully matched with the target text data;
- extracting the segmentation text that matches the homophone text data from the at least one segmentation text, and replacing the homophone text data included in the segmentation text with the keyword text data to obtain a target segmentation text;
- training a preset statistical language model by:
- for each text training sentence included in the text training set, calculating a word occurrence probability of each word of the text training sentence in the text training set;
- calculating a sentence occurrence probability of the text training sentence based on the word occurrence probability of each word;
- obtaining the statistical language model based on the correspondence between each of the text training sentences and the sentence occurrence probability corresponding to the text training sentences;
- calculating an occurrence probability of the target segmentation text based on the statistical language model, the occurrence probability of the target segmentation text referring to a frequency of occurrence of the target segmentation text in sentences of a text training set in a first target corpus for training the preset language model;
- obtaining a probability interval corresponding to a text length of the target segmentation text, according to the text length of the target segmentation text and a pre-established mapping relationship between text length and probability;
- determining whether the occurrence probability is within the probability interval;
- determining a probability that the target text data belongs to a plurality of preset text classifications based on a preset text classification model, and obtaining a category vector of the target text data, if the occurrence probability is within the probability interval, wherein the text classification model is obtained by training based on a text corpus classification set including a plurality of text categories in a second target corpus;
- calculating a correlation degree value between the keyword text data and each of the text categories, to obtain a correlation degree vector between the target keyword and the plurality of text categories;
- performing a normalization processing to the correlation degree vector to obtain a normalized vector of the correlation degree vector;
- calculating a cosine similarity between the category vector and the normalization vector, wherein the cosine similarity is determined as a category matching degree between the keyword text data and the target text data;
- calculating a text data correlation degree between the keyword text data and the target text data based on the category matching degree and the occurrence probability;
- determining whether the voice data includes the target voice keyword by determining whether the text data correlation degree is greater than a preset degree threshold, wherein the voice data includes the target voice keyword is determined if the text data correlation degree is greater than or equal to the preset degree threshold.