A method and device for extracting voice information
By obtaining the theme space in the process of multiple iteration training, and expressing the vocabulary as a regularization and abstraction of Pinyin or text, the problem of text conversion error of voice information extraction in existing technology has been solved, and the accuracy and generalization of information extraction are improved. ability.
Patent Information
- Application Number
- CN202010469029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-28
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2040-05-28
AI Technical Summary
The prior art has text conversion errors in the process of voice information extraction, resulting in poor credibility of information extraction and insufficient generalization ability.
By obtaining the theme space corresponding to the initialization vocabulary point corresponding to different theme categories during multiple iteration training, the vocabulary is represented by Pinyin and/or text, and regularization and abstraction are performed. Match in the voice document to be processed.
It improves the accuracy, speed and generalization ability of information extraction of interest, and enhances the credibility of information extraction.
Smart Images

Figure CN111797228B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech processing, and in particular to a speech information extraction method and device. Background Art
[0002] Voice is an important carrier of information, and there is a need for voice information extraction in the prior art. In the prior art, in order to verify whether the customer service staff is doing their job properly, it is often necessary to determine whether the customer service staff mentioned certain preset conversation content in the conversation with the customer. Usually, the judgment of this type of information is made by listening to the call recording. However, the method of listening to the call recording requires a dedicated person to listen to the entire recording before making a judgment, which results in a huge waste of manpower and time costs.
[0003] In order to solve the above problem of extracting information from voice, an existing VIE (voice information extraction) method is to first convert the voice into text and then use business keywords for matching.
[0004] However, in the process of converting speech to text, the text converted from speech is often not what the speech expresses, resulting in text conversion errors. For example, errors in homophone recognition lead to text conversion errors; because the background of the voice call is too noisy, the speech cannot be converted into the correct text information; because of the accent problem, the accurate corresponding words cannot be found during the conversion, resulting in the final text and the speech to express completely different meanings, etc.
[0005] Due to the above errors in the text converted from speech, the credibility of the speech information extraction results is poor when the business keywords are used for subsequent matching. In addition, since the business keywords cannot be exhaustively listed, the generalization ability of speech information extraction is poor. Summary of the invention
[0006] To solve the problems in the prior art, an embodiment of the present invention provides a method and device for extracting speech information.
[0007] In a first aspect, an embodiment of the present invention provides a method for extracting speech information, comprising: a training step, the training step comprising: obtaining a topic space corresponding to an initialization vocabulary point corresponding to different topic categories during multiple iterative training processes; representing the vocabulary in each of the topic spaces with pinyin and / or text; regularizing and abstracting each of the topic spaces to obtain corresponding regular expressions; a prediction step, the prediction step comprising: using each of the obtained regular expressions to match in a speech document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0008] Furthermore, the obtaining of topic spaces corresponding to the initialization vocabulary points corresponding to different topic categories includes: converting iterative training samples into word vectors through a preset algorithm and clustering them, thereby obtaining topic spaces corresponding to the initialization vocabulary points corresponding to different topic categories.
[0009] Furthermore, the vocabulary in each of the subject spaces is represented by pinyin and / or text, including: all the vocabulary in each of the subject spaces is first converted into pinyin, and then matched using preset pinyin keywords, the successfully matched vocabulary is represented by the corresponding pinyin keyword, and the unsuccessfully matched vocabulary is restored to text representation.
[0010] Furthermore, in the first iteration, the iterative training sample is an initial voice document, which is a document obtained by subjecting the voice data to voice recognition and preliminary word segmentation processing; in subsequent iterations, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration.
[0011] Furthermore, before converting the iterative training samples into word vectors through a preset algorithm and clustering them, the method also includes: tagging the iterative training samples with parts of speech, and further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table; wherein the part-of-speech adjacency relationship table includes a plurality of preset part-of-speech adjacency relationship combinations with priority levels.
[0012] Furthermore, the iterative training samples are further segmented according to a preset part-of-speech adjacency relationship table, including: extracting the part-of-speech tagging information of the iterative training samples, sequentially covering a corresponding number of multiple adjacent parts-of-speech according to a preset sliding window, matching two adjacent parts-of-speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combining the texts corresponding to the two adjacent parts-of-speech into one word according to the order of priority of the successfully matched part-of-speech adjacency relationship combinations from high to low.
[0013] Furthermore, after further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table, and before converting the iterative training samples into word vectors through a preset algorithm and clustering them, the method also includes: processing the iterative training samples using a TF-IDF algorithm to obtain weights of different words in the iterative training samples; according to a preset threshold, setting low-weight words as stop words, and expressing the iterative training samples using high-weight words.
[0014] Furthermore, in the subsequent iteration, the iterative training sample is obtained by replacing corresponding words in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration, and filtering using the stop words obtained in the previous iteration.
[0015] Furthermore, the method further comprises: starting from the second iteration, using the obtained regular expression to perform verification in a test set, and terminating the iteration when a preset accuracy rate is reached.
[0016] Furthermore, the preset algorithm includes a word2vec algorithm.
[0017] In a second aspect, an embodiment of the present invention provides a speech information extraction device, comprising: a training module, used to: obtain a topic space corresponding to an initialization vocabulary point corresponding to different topic categories during multiple iterative training processes; represent the vocabulary in each of the topic spaces with pinyin and / or text; regularize and abstract each of the topic spaces to obtain corresponding regular expressions; a prediction module, used to: use each of the obtained regular expressions to match in a speech document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0018] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method provided in the first aspect when executing the computer program.
[0019] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.
[0020] The speech information extraction method and device provided by the embodiment of the present invention obtain the topic space corresponding to the initialization vocabulary point corresponding to different topic categories during multiple iterative training processes; represent the vocabulary in each of the topic spaces with pinyin and / or text; regularize and abstract each of the topic spaces to obtain corresponding regular expressions; and then use the obtained regular expressions to match the speech document to be processed, so as to obtain whether the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression, thereby improving the accuracy, speed and generalization ability of extracting information of interest. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flow chart of a method for extracting voice information provided by an embodiment of the present invention;
[0023] Figure 2 is a flow chart of a method for extracting voice information provided by another embodiment of the present invention;
[0024] Figure 3 It is an example of a combination of part-of-speech adjacency relations in a method for extracting speech information provided by an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of clustering results after word2vec processing in a speech information extraction method provided by an embodiment of the present invention;
[0026] Figure 5 It is a structural schematic diagram of a voice information extraction device provided by an embodiment of the present invention;
[0027] Figure 6 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Figure 1 FIG. 1 is a flow chart of a method for extracting voice information provided by an embodiment of the present invention. Figure 1 As shown, the method includes:
[0030] Step 101, training step, the training step includes: obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories during multiple iterative training processes; representing the vocabulary in each of the topic spaces with pinyin and / or text; regularizing and abstracting each of the topic spaces to obtain corresponding regular expressions.
[0031] The training module of the speech information extraction device obtains regular expressions corresponding to various preset subject categories for speech information extraction by executing the training steps. During the training, initialization vocabulary points are first set according to different subject categories, and the initialization vocabulary points can be accumulated by observing a large amount of existing speech document data. For example, for the housing area subject category, the initialization vocabulary points include 75 square meters, three rooms, etc.
[0032] According to the preset initialization vocabulary points corresponding to different topic categories, in the process of multiple iterative training, the topic space corresponding to the initialization vocabulary points corresponding to different topic categories is obtained by the preset method. The topic space is a word cloud set, which is aggregated based on the initialization vocabulary points corresponding to different topic categories. Through this aggregation, words with the same meaning can be aggregated together, so that the words used to represent the corresponding topic category can be extracted to the maximum extent, thereby improving the generalization ability of speech information extraction.
[0033] After obtaining the subject space corresponding to each type of initialization vocabulary point, the vocabulary in each subject space is represented by pinyin and / or text according to different characteristics. For example, some words will have consistency errors during text recognition, that is, each time a similar pronunciation appears, it will be mistakenly recognized as the same content. For such words, all of their text can be converted into pinyin, and pinyin is used to represent the expression of the vocabulary in the semantic space. Words that have been correctly recognized can be expressed in text.
[0034] After obtaining each topic space expressed by pinyin and / or text, each of the topic spaces is regularized and abstracted to obtain corresponding regular expressions. Since the amount of speech data is very large, it is not possible to perform classification and information extraction based solely on clustering results. It is necessary to regularize and abstract each of the topic spaces to obtain corresponding regular expressions to further extract features, thereby achieving accurate and rapid extraction of speech information.
[0035] Step 102, prediction step, the prediction step includes: using each of the obtained regular expressions to match in the voice document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0036] After obtaining the regular expressions corresponding to the respective subject spaces, the respective regular expressions can be used as classifiers of the respective subject spaces. The prediction module of the speech information extraction device uses the respective regular expressions obtained to match the speech documents to be processed. If the match is successful, the document to be processed contains the subject category corresponding to the subject space corresponding to the respective regular expressions; if the match is unsuccessful, the document to be processed does not contain the subject category corresponding to the subject space corresponding to the respective regular expressions. In this way, it is possible to obtain whether the speech contains information of interest.
[0037] The embodiment of the present invention obtains the topic space corresponding to the initialization vocabulary points corresponding to different topic categories during multiple iterative training processes; represents the vocabulary in each of the topic spaces with pinyin and / or text; regularizes and abstracts each of the topic spaces to obtain corresponding regular expressions; and then uses the obtained regular expressions to match the voice document to be processed, so as to obtain information on whether the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression, thereby improving the accuracy, speed and generalization ability of extracting information of interest.
[0038] Further, based on the above embodiment, the obtaining of the topic space corresponding to the initialization vocabulary points corresponding to different topic categories includes: converting the iterative training samples into word vectors through a preset algorithm and clustering them, thereby obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories.
[0039] According to the preset initialization vocabulary points corresponding to different topic categories, in the process of multiple iterative training, the iterative training samples are converted into word vectors and clustered by a preset algorithm, so as to obtain the topic space corresponding to each type of the initialization vocabulary points; the preset algorithm can adopt an algorithm including the word2vec algorithm that can be converted into word vectors and clustered; taking the word2vec algorithm as an example, after the conversion, the entries with similar meanings will have a clustering phenomenon, such as *unit, unit, *hall and the like are clustered together. Since an aggregation is performed according to the meaning of words by algorithms such as word2vec, as long as a starting point is given, the words within a threshold range of the point are considered to be a statement with great relevance to the words at the point, and a small word cloud set related to the starting point can be obtained. This word cloud set can be called a topic space, which is clustered based on the initialization vocabulary points corresponding to different topic categories. Through this aggregation, words with the same meaning can be clustered together, so the words used to characterize the corresponding topic category can be extracted to the maximum extent, thereby improving the generalization ability of speech information extraction.
[0040] On the basis of the above-mentioned embodiments, the embodiments of the present invention obtain the topic space corresponding to the initialization vocabulary points corresponding to different topic categories by converting iterative training samples into word vectors through a preset algorithm and clustering them, thereby facilitating the acquisition of the topic space.
[0041] Further, based on the above embodiment, the vocabulary in each of the subject spaces is represented by pinyin and / or text, including: all the vocabulary in each of the subject spaces is first converted into pinyin, and then matched using preset pinyin keywords, the successfully matched vocabulary is represented by the corresponding pinyin keyword, and the unsuccessfully matched vocabulary is restored to text representation.
[0042] After the iterative training samples are converted into word vectors and clustered by a preset algorithm to obtain the subject space corresponding to each type of initialization vocabulary point, all the words in each subject space are first converted into pinyin, and then matched using preset pinyin keywords. The words that are successfully matched are represented by the corresponding pinyin keywords, and the words that are unsuccessfully matched are restored to text representation. Some of the text in each subject space is converted into pinyin because errors may occur when recognizing some text. After observing the overall data, it is found that these data are consistent, that is, each time a similar pronunciation appears, it will be mistakenly recognized as the same content. For such words, all of their text is converted into pinyin, and pinyin is used to represent the expression of the word in the semantic space. For the remaining words, text is still used for expression. In this way, the accuracy and credibility of speech information extraction can be greatly improved.
[0043] On the basis of the above-mentioned embodiments, the embodiments of the present invention convert all the words in each subject space into pinyin first, and then use preset pinyin keywords for matching. The successfully matched words are represented by corresponding pinyin keywords, and the unsuccessfully matched words are restored to text representation, thereby greatly improving the accuracy and credibility of voice information extraction.
[0044] Further, based on the above embodiment, in the first iteration, the iterative training sample is an initial voice document, and the initial voice document is a document after the voice data has been processed through voice recognition and preliminary word segmentation; in subsequent iterations, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration.
[0045] During the iterative training, in the first iteration, the iterative training sample is an initial voice document, which is a document after voice data has been processed through voice recognition and preliminary word segmentation; in subsequent iterations, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration, thereby achieving gradual optimization. Among them, the corresponding vocabulary in the iterative training sample corresponding to the previous iteration refers to the vocabulary corresponding to the regular expression obtained in the previous iteration, a subject space corresponds to at least one regular expression, each regular expression corresponds to a subject space, and the vocabulary contained in the subject space is the vocabulary corresponding to the corresponding regular expression. In the embodiment of the present invention, the vocabulary includes single words.
[0046] On the basis of the above-mentioned embodiment, the embodiment of the present invention realizes a gradually optimized iterative training process by replacing corresponding words in iterative training samples corresponding to the previous iteration according to the regular expression obtained in the previous iteration in subsequent iterations.
[0047] Further, based on the above embodiment, before converting the iterative training samples into word vectors through a preset algorithm and clustering them, the method also includes: tagging the iterative training samples with parts of speech, and further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table; wherein the part-of-speech adjacency relationship table includes a preset plurality of part-of-speech adjacency relationship combinations with priority levels.
[0048] The embodiment of the present invention obtains meaningful Bi-Grams by using part of speech as a regular connecting point. Bi-Grams can also be called Bi-Phrase, which represents a bigram. Two words obtained by segmentation are combined to form a new bigram. The regular combination between parts of speech is obtained by observing a large amount of sampled data. The part of speech adjacency relationship combination in the part of speech adjacency relationship table is based on the point of interest. After studying a large number of obtained segmentations, various individual segmentations are associated to make the segmentations that cannot have a clear meaning when expressed alone become a combination of segmentations, and their meanings can be basically determined. For example, "adjust to 75" belongs to the vm combination (verb + numeral combination). Compared with the independent "adjust to" and the independent "75" that cannot express a clear meaning, the vm combination "adjust to 75" has a clear meaning, which is conducive to the analysis and clustering processing of algorithms such as word2vec, and more and more accurate information can be extracted.
[0049] On the basis of the above-mentioned embodiments, the embodiments of the present invention can extract more and more accurate information by tagging the iterative training samples with parts of speech and further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table, thereby improving the comprehensiveness and accuracy of speech information extraction.
[0050] Further, based on the above embodiment, the iterative training sample is further segmented according to a preset part-of-speech adjacency relationship table, including: extracting the part-of-speech tagging information of the iterative training sample, sequentially covering a corresponding number of multiple adjacent parts-of-speech according to a preset sliding window, matching two adjacent parts of speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combining the texts corresponding to the two adjacent parts of speech into one word according to the order of priority of the successfully matched part-of-speech adjacency relationship combinations from high to low.
[0051] After the iterative training sample is segmented, part-of-speech tagging is performed to obtain part-of-speech tagging information. The part-of-speech tagging information includes the part-of-speech of each segmented word. The part-of-speech tagging information of the iterative training sample is extracted, and a corresponding number of adjacent parts-of-speech are sequentially covered according to a preset sliding window, and two adjacent parts-of-speech are respectively matched with the part-of-speech adjacency relationship combination contained in the part-of-speech adjacency relationship table, and the texts corresponding to the two adjacent parts-of-speech are combined into one word according to the priority of the successfully matched part-of-speech adjacency relationship combination from high to low.
[0052] For example, if the sliding window is 3, and the first few parts of speech of the iterative training samples are vuumvun, the sliding window will first cover vuv, and match vu and uv with the part-of-speech adjacency relationship combination contained in the part-of-speech adjacency relationship table in turn. If the part-of-speech adjacency relationship table contains the part-of-speech adjacency relationship combination vu and uv, then vu and uv are successfully matched, and then word segmentation is performed according to the priority level. For example, if the priority level of vu is greater than uv, the vu combination is retained and the uv combination is abandoned. That is, in the text corresponding to this part of speech, the vocabulary corresponding to u is combined with the vocabulary corresponding to the previous v to form a new word. If a combination of adjacent parts of speech cannot be matched successfully, it is directly abandoned. After processing this sliding window, the sliding window covers uvm and performs similar processing; and so on, until the sliding window covers the parts of speech corresponding to all iterative training samples, and finally all the data is processed.
[0053] On the basis of the above-mentioned embodiments, the embodiments of the present invention extract the part-of-speech tagging information of the iterative training samples, cover a corresponding number of adjacent parts-of-speech in sequence according to a preset sliding window, match two adjacent parts-of-speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combine the texts corresponding to the two adjacent parts-of-speech into one word according to the order of priority from high to low of the successfully matched part-of-speech adjacency relationship combinations, thereby improving the accuracy of word segmentation, thereby further improving the accuracy of speech information extraction.
[0054] Further, based on the above embodiment, after the iterative training sample is further segmented according to the preset part-of-speech adjacency relationship table, and before the iterative training sample is converted into a word vector through a preset algorithm and clustered, the method also includes: processing the iterative training sample using the TF-IDF algorithm to obtain the weights of different words in the iterative training sample; according to a preset threshold, setting low-weight words as stop words, and expressing the iterative training sample using high-weight words.
[0055] The characteristics of the TF-IDF algorithm are: the importance of a word increases in proportion to the number of times it appears in the file, but at the same time it decreases inversely with the frequency of its appearance in the corpus. This importance can be represented by the weight. The higher the weight, the more important it is. Using this method, the words in the entire vocabulary are cleaned, and the words after removing stop words (words that are not very useful for semantic analysis) are used to represent and express the corpus (iterative training data, voice document samples).
[0056] After being processed by the TF-IDF algorithm, the accuracy of vector expression and clustering by the subsequent word2vec algorithm is improved, and the number of word vectors to be processed can be reduced, thereby speeding up the calculation.
[0057] On the basis of the above embodiments, the embodiment of the present invention processes the iterative training samples using the TF-IDF algorithm to obtain the weights of different words in the iterative training samples; according to the preset threshold, the low-weight words are set as stop words, and the iterative training samples are expressed using high-weight words, thereby improving the accuracy and efficiency of speech information extraction.
[0058] Further, based on the above embodiment, in the subsequent iteration, the iterative training sample is obtained by replacing the corresponding words in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration, and filtering with the stop words obtained in the previous iteration.
[0059] As mentioned above, in the subsequent iteration process after the first iteration, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration. Further, since stop words can be obtained through the TF-IDF algorithm in each iteration process, in order to further improve the effectiveness of the voice document and remove noise, the stop words obtained in the previous iteration can be used to further filter the voice document obtained by replacement, and then the obtained voice document can be subsequently processed.
[0060] On the basis of the above-mentioned embodiments, the embodiments of the present invention further improve the accuracy and efficiency of speech information extraction by replacing corresponding words in the iterative training samples corresponding to the previous iteration with the regular expression obtained in the previous iteration in subsequent iterations, and filtering the speech document obtained by using the stop words obtained in the previous iteration.
[0061] Further, based on the above embodiment, starting from the second iteration, the obtained regular expression is used for verification in a test set, and the iteration is terminated when a preset accuracy rate is reached.
[0062] Starting from the second iteration, the obtained regular expression is used for verification in the test set. When the preset accuracy is reached, the iteration is terminated, thereby obtaining a classifier corresponding to each regular expression for voice information extraction. After a certain number of trainings, when the classifier can reach the specified accuracy, it means that a classifier that meets the performance index has been obtained. In the subsequent application process, the text after the BiGrams operation is input into the classifier, and the content of the topic of interest in the conversation can be identified. For example, in the embodiment of the present invention, the goal is to review whether the broker has mentioned several factors that must be confirmed with the owner when performing house maintenance: price, area, address, and willingness to sell. Therefore, the classifier trained according to this requirement can identify whether the conversation contains the above-mentioned necessary factors. Of course, for other purposes, as long as the training keywords of BiGrams are modified accordingly (modify the combination of part-of-speech adjacency relationships according to the application scenario), the voice data can be targetedly identified according to the method provided in the embodiment of the present invention, which greatly improves the overall recognition efficiency.
[0063] On the basis of the above-mentioned embodiment, the embodiment of the present invention starts from the second iteration, uses the obtained regular expression to perform verification in the test set, and terminates the iteration when a preset accuracy rate is reached, thereby obtaining a classifier for speech information recognition.
[0064] The embodiment of the present invention aims at the problems existing in the current VIE and proposes two key design points: 1. Bi-Phrase, using named entities to combine meaningful words; 2. Under the premise of the assumption of consistency of speech translation errors, the word vector is trained in the local constraint space, and the similarity of the word vector is used to summarize the regular group, and the word vector is iterated again to finally find the intent representation space.
[0065] Figure 2 It is a flow chart of a method for extracting voice information provided by another embodiment of the present invention. Figure 3 This is an example of a combination of adjacent parts of speech relationships in a method for extracting speech information provided by an embodiment of the present invention. Figure 4 FIG. 1 is a schematic diagram of clustering results after word2vec processing in a speech information extraction method provided by an embodiment of the present invention. Figure 2 , Figure 3 and Figure 4 Another specific example of the speech information extraction method is given below.
[0066] First, obtain sufficient sampling space
[0067] 1) Select two cities, Harbin and Wuxi, one in the south and one in the north;
[0068] 2) Obtain the full amount of online transcription data
[0069] Second, conduct data exploration and observation
[0070] 1) Each of the 400 calls corresponds to a document text. We first use existing methods to perform word segmentation and part-of-speech analysis on the text;
[0071] 2) Use part of speech as the connecting point of the rules to obtain meaningful Bi-Grams (same as Bi-Phrase above), which is further segmented. The word segmentation process has a combination priority. When combining, select three consecutive words as a candidate library, and match in the candidate library to see if there is a bi-gram that meets the priority. If there is, the candidate library moves down until the end. When matching, match the two adjacent part-of-speech combinations with the part-of-speech adjacency relationship combinations in the part-of-speech adjacency relationship table. Figure 3 As shown, it is an example of a part-of-speech adjacency relationship combination in the voice information extraction method provided by an embodiment of the present invention. A part-of-speech adjacency relationship combination can be selected according to a combination of interest to form a part-of-speech adjacency relationship table.
[0072] 3) Accumulate initial vocabulary points through observation. The initial vocabulary points are used for aggregation processing.
[0073] Third, the first word2vec of the initial point
[0074] 1) Obtain stop words according to weights through TF-IDF; use the TF-IDF algorithm to clean the words in the entire vocabulary and remove stop words. Stop words refer to words that are not very useful for semantic analysis.
[0075] 2) After removing common words, express the document, and then do the first word2vec to get the word vector expression.
[0076] After word2vec conversion, words can be converted into expressions in vector space, such as Figure 4 As shown. One advantage of word2vec is that after conversion, words with similar meanings will cluster, for example Figure 4 The * unit in the upper left corner, the unit and the like are gathered together. With such aggregation, you can proceed to the next step.
[0077] 3) Perform most_like vocabulary search based on the initialization vocabulary point.
[0078] Since the words are aggregated according to their meanings in the previous step, as long as a starting point is given, the words within a threshold range of the point are considered to be a statement with great relevance to the words at the point, and a small word cloud set related to the starting point can be obtained. For example, it will be found that the words "Unit 2, Hall 1, Unit, Unit 4" are clustered together.
[0079] Fourth, create TopicSpace
[0080] According to the word cloud set obtained by initializing the vocabulary point, the word cloud set is regularized and abstracted. For some characters, all are converted into pinyin: errors will occur when recognizing some characters, but after observing the overall data, it is found that these errors are consistent, that is, each time a similar pronunciation appears, it will be mistakenly recognized as the same wrong content. For such words, all their characters are converted into pinyin, and pinyin is used to represent the expression of the word in the semantic space.
[0081] During regular abstraction, all words are first converted into pinyin, and a full match is first performed using the preset pinyin keywords obtained from the previous step of analysis. Matched keywords mean that the corresponding vocabulary must be expressed in phonetic terms. Those that do not match are converted into text and regular abstraction of the text is performed.
[0082] In the second iteration, the regular expression is used to replace the corresponding words in the ALL RAW Document (initial voice document).
[0083] Fifth, Nth word2vec
[0084] 1) For the changed corpus, recalculate word2vec and perform a second sorting;
[0085] 2) Repeat the above process in sequence, and verify the accuracy of information extraction on the test set starting from the second time;
[0086] 3) After reaching a certain accuracy rate on the test set, the iteration stops.
[0087] Figure 5 FIG. 1 is a schematic diagram of the structure of a speech information extraction device provided by an embodiment of the present invention. Figure 5 As shown, the device includes a training module 10 and a prediction module 20, wherein: the training module 10 is used to: obtain the topic space corresponding to the initialization vocabulary point corresponding to different topic categories during multiple iterative training processes; represent the vocabulary in each of the topic spaces with pinyin and / or text; regularize and abstract each of the topic spaces to obtain corresponding regular expressions respectively; the prediction module 20 is used to: use the obtained each of the regular expressions to match in the voice document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0088] The embodiment of the present invention obtains the topic space corresponding to the initialization vocabulary points corresponding to different topic categories during multiple iterative training processes; represents the vocabulary in each of the topic spaces with pinyin and / or text; regularizes and abstracts each of the topic spaces to obtain corresponding regular expressions; and then uses the obtained regular expressions to match the voice document to be processed, so as to obtain information on whether the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression, thereby improving the accuracy, speed and generalization ability of extracting information of interest.
[0089] Further, based on the above embodiment, when the prediction module 10 is used to obtain the topic space corresponding to the initialization vocabulary points corresponding to different topic categories, it is specifically used to: convert the iterative training samples into word vectors through a preset algorithm and cluster them, so as to obtain the topic space corresponding to the initialization vocabulary points corresponding to different topic categories.
[0090] On the basis of the above-mentioned embodiments, the embodiments of the present invention obtain the topic space corresponding to the initialization vocabulary points corresponding to different topic categories by converting iterative training samples into word vectors through a preset algorithm and clustering them, thereby facilitating the acquisition of the topic space.
[0091] Further, based on the above embodiment, when the prediction module 10 is used to represent the vocabulary in each of the subject spaces with pinyin and / or text, it is specifically used to: convert all the vocabulary in each of the subject spaces into pinyin first, and then match them using preset pinyin keywords, the successfully matched vocabulary is represented by the corresponding pinyin keywords, and the unsuccessfully matched vocabulary is restored to text representation.
[0092] On the basis of the above-mentioned embodiments, the embodiments of the present invention convert all the words in each subject space into pinyin first, and then use preset pinyin keywords for matching. The successfully matched words are represented by corresponding pinyin keywords, and the unsuccessfully matched words are restored to text representation, thereby greatly improving the accuracy and credibility of voice information extraction.
[0093] Further, based on the above embodiment, in the first iteration, the iterative training sample is an initial voice document, and the initial voice document is a document after the voice data has been processed through voice recognition and preliminary word segmentation; in subsequent iterations, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration.
[0094] On the basis of the above-mentioned embodiment, the embodiment of the present invention realizes a gradually optimized iterative training process by replacing corresponding words in iterative training samples corresponding to the previous iteration according to the regular expression obtained in the previous iteration in subsequent iterations.
[0095] Further, based on the above embodiment, the prediction module 10 is also used to: perform part-of-speech tagging on the iterative training samples, and further perform word segmentation processing on the iterative training samples according to a preset part-of-speech adjacency relationship table before converting the iterative training samples into word vectors through a preset algorithm and performing clustering; wherein the part-of-speech adjacency relationship table includes a preset plurality of part-of-speech adjacency relationship combinations with priority levels.
[0096] On the basis of the above-mentioned embodiments, the embodiments of the present invention can extract more and more accurate information by tagging the iterative training samples with parts of speech and further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table, thereby improving the comprehensiveness and accuracy of speech information extraction.
[0097] Further, based on the above embodiment, when the prediction module 10 is used to perform further word segmentation processing on the iterative training sample according to a preset part-of-speech adjacency relationship table, it is specifically used to: extract the part-of-speech tagging information of the iterative training sample, cover a corresponding number of multiple adjacent parts of speech in sequence according to a preset sliding window, match two adjacent parts of speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combine the texts corresponding to the two adjacent parts of speech into one word according to the order of priority of the successfully matched part-of-speech adjacency relationship combinations from high to low.
[0098] On the basis of the above-mentioned embodiments, the embodiments of the present invention extract the part-of-speech tagging information of the iterative training samples, cover a corresponding number of adjacent parts-of-speech in sequence according to a preset sliding window, match two adjacent parts-of-speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combine the texts corresponding to the two adjacent parts-of-speech into one word according to the order of priority from high to low of the successfully matched part-of-speech adjacency relationship combinations, thereby improving the accuracy of word segmentation, thereby further improving the accuracy of speech information extraction.
[0099] Further, based on the above embodiment, the prediction module 10 is used to: process the iterative training samples using the TF-IDF algorithm to obtain the weights of different words in the iterative training samples; set low-weight words as stop words according to a preset threshold, and express the iterative training samples using high-weight words, after further segmenting the iterative training samples according to a preset part-of-speech adjacency relationship table and before converting the iterative training samples into word vectors through a preset algorithm and clustering them.
[0100] On the basis of the above embodiments, the embodiment of the present invention processes the iterative training samples using the TF-IDF algorithm to obtain the weights of different words in the iterative training samples; according to the preset threshold, the low-weight words are set as stop words, and the iterative training samples are expressed using high-weight words, thereby improving the accuracy and efficiency of speech information extraction.
[0101] Further, based on the above embodiment, in the subsequent iteration, the iterative training sample is obtained by replacing the corresponding words in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration, and filtering with the stop words obtained in the previous iteration.
[0102] On the basis of the above-mentioned embodiments, the embodiments of the present invention further improve the accuracy and efficiency of speech information extraction by replacing corresponding words in the iterative training samples corresponding to the previous iteration with the regular expression obtained in the previous iteration in subsequent iterations, and filtering the speech document obtained by using the stop words obtained in the previous iteration.
[0103] Further, based on the above embodiment, the training module 10 is also used to start from the second iteration, use the obtained regular expression to perform verification in the test set, and the iteration is terminated when a preset accuracy rate is reached.
[0104] On the basis of the above-mentioned embodiment, the embodiment of the present invention starts from the second iteration, uses the obtained regular expression to perform verification in the test set, and terminates the iteration when a preset accuracy rate is reached, thereby obtaining a classifier for speech information recognition.
[0105] The device provided in the embodiment of the present invention is used for the above method. The specific functions can refer to the above method flow, which will not be repeated here.
[0106] Figure 6 FIG. 1 is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the following method: a training step, wherein the training step includes: obtaining the topic space corresponding to the initialization vocabulary point corresponding to different topic categories during multiple iterations of training; representing the vocabulary in each of the topic spaces with pinyin and / or text; performing regularization abstraction on each of the topic spaces to obtain corresponding regular expressions respectively; a prediction step, wherein the prediction step includes: matching the obtained regular expressions in the speech document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0107] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0108] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the methods provided in the above-mentioned embodiments, for example, including: a training step, the training step including: obtaining a topic space corresponding to an initialization vocabulary point corresponding to different topic categories during multiple iterative training processes; representing the vocabulary in each of the topic spaces with pinyin and / or text; regularizing and abstracting each of the topic spaces to obtain corresponding regular expressions respectively; a prediction step, the prediction step including: using each of the obtained regular expressions to match in a voice document to be processed, if the match is successful, the document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression.
[0109] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting speech information, characterized in that: include: The training step includes: obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories during multiple iterations of training; representing the vocabulary in each of the topic spaces with pinyin and / or text; performing regularization abstraction on each of the topic spaces to obtain corresponding regular expressions respectively; obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories includes: converting the iterative training samples into word vectors through a preset algorithm and clustering them according to the preset initialization vocabulary points corresponding to different topic categories, so as to obtain the topic space corresponding to the initialization vocabulary points corresponding to different topic categories; wherein the topic space is aggregated with the initialization vocabulary points and the vocabulary with the same meaning as the initialization vocabulary points; A prediction step, the prediction step comprising: using each of the obtained regular expressions to match in the voice document to be processed, if the match is successful, the voice document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the voice document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression; Before converting the iterative training samples into word vectors by a preset algorithm and performing clustering, the method further includes: The iterative training samples are tagged with parts of speech, and further segmented according to a preset part-of-speech adjacency relationship table; wherein the part-of-speech adjacency relationship table includes a plurality of preset part-of-speech adjacency relationship combinations with priority levels.
2. The method for extracting speech information according to claim 1, characterized in that: The method of expressing the vocabulary in each of the subject spaces with pinyin and / or text includes: first converting all the vocabulary in each of the subject spaces into pinyin, then matching them using preset pinyin keywords, expressing the successfully matched vocabulary with the corresponding pinyin keywords, and restoring the unsuccessfully matched vocabulary to text representation.
3. The method for extracting speech information according to claim 1 or 2, characterized in that: In the first iteration, the iterative training sample is an initial voice document, which is a document obtained by performing voice recognition and preliminary word segmentation on the voice data; in subsequent iterations, the iterative training sample is a voice document obtained by replacing the corresponding vocabulary in the iterative training sample corresponding to the previous iteration according to the regular expression obtained in the previous iteration.
4. The method for extracting speech information according to claim 1, characterized in that: The further word segmentation processing of the iterative training samples according to the preset part-of-speech adjacency relationship table includes: Extract the part-of-speech tagging information of the iterative training sample, cover a corresponding number of multiple adjacent parts of speech in sequence according to a preset sliding window, match two adjacent parts of speech with the part-of-speech adjacency relationship combinations contained in the part-of-speech adjacency relationship table, and combine the texts corresponding to the two adjacent parts of speech into one word according to the order of priority of the successfully matched part-of-speech adjacency relationship combinations from high to low.
5. The method for extracting speech information according to claim 1 or 4, characterized in that: After further segmenting the iterative training samples according to the preset part-of-speech adjacency relationship table, and before converting the iterative training samples into word vectors by a preset algorithm and clustering them, the method further includes: Processing the iterative training samples using the TF-IDF algorithm to obtain weights of different words in the iterative training samples; According to a preset threshold, low-weight words are set as stop words, and high-weight words are used to express the iterative training samples.
6. The method for extracting speech information according to claim 5, characterized in that: In subsequent iterations, the iterative training samples are obtained by replacing corresponding words in the iterative training samples corresponding to the previous iteration according to the regular expression obtained in the previous iteration, and filtering using the stop words obtained in the previous iteration.
7. The method for extracting speech information according to claim 1, characterized in that: The method further comprises: starting from the second iteration, using the obtained regular expression to perform verification in a test set, and terminating the iteration when a preset accuracy rate is reached.
8. The method for extracting speech information according to claim 1, characterized in that: The preset algorithm includes the word2vec algorithm.
9. A speech information extraction device, characterized in that: include: A training module, for: obtaining a topic space corresponding to initialization vocabulary points corresponding to different topic categories during multiple iterations of training; Representing the words in each of the subject spaces with pinyin and / or text; performing regularization and abstraction on each of the subject spaces to obtain corresponding regular expressions; The step of obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories comprises: according to the preset initialization vocabulary points corresponding to different topic categories, converting the iterative training samples into word vectors through a preset algorithm and performing clustering, thereby obtaining the topic space corresponding to the initialization vocabulary points corresponding to different topic categories; wherein the initialization vocabulary points and words having the same meaning as the initialization vocabulary points are aggregated in the topic space; The prediction module is used to: use each of the obtained regular expressions to match in the voice document to be processed, if the match is successful, the voice document to be processed contains the topic category corresponding to the topic space corresponding to the corresponding regular expression; if the match is unsuccessful, the voice document to be processed does not contain the topic category corresponding to the topic space corresponding to the corresponding regular expression; Before the prediction module is used to convert the iterative training samples into word vectors through a preset algorithm and perform clustering, it is also used to: tag the iterative training samples with parts of speech, and further segment the iterative training samples according to a preset part-of-speech adjacency relationship table; wherein the part-of-speech adjacency relationship table includes a plurality of preset part-of-speech adjacency relationship combinations with priority levels.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the voice information extraction method according to any one of claims 1 to 8 are implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the voice information extraction method as claimed in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for determining theme of voice information
CN110727759A