A corpus expansion method, device and equipment for speech recognition and a storage medium

By using the maximum forward matching algorithm and knowledge graph integration technology, the speech recognition corpus was expanded independently, solving the problem of low semantic recognition efficiency in voice interaction in smart cockpits, and achieving efficient and accurate corpus expansion and voice response.

CN115757814BActive Publication Date: 2026-04-10XINGHE ZHILIAN AUTOMOBILE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

The current semantic recognition efficiency of voice interaction in smart cockpits is low, mainly manifested in rejection and deviation from the original semantics. This is due to insufficient semantic scene coverage and missing model corpus. Existing artificial corpus expansion schemes have low efficiency and accuracy.

Method used

The maximum forward matching algorithm is used to segment the corpus to be expanded, determine the part of speech, and identify entities using preset contextual collocation rules. The text entities in the set are integrated with the knowledge graph, and new nodes are added to the speech recognition model as slots to realize the speech fallback strategy.

Benefits of technology

It improved the efficiency and accuracy of corpus expansion, and independently expanded the speech recognition corpus, thereby enhancing the accuracy and responsiveness of semantic understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757814B_ABST
    Figure CN115757814B_ABST
Patent Text Reader

Abstract

The application discloses a corpus expansion method, device and equipment for speech recognition and a storage medium. The method comprises the following steps: performing word segmentation on the text in the collected corpus to be expanded by using a maximum forward matching algorithm, determining the part of speech of the segmented words in the text, and determining the segmented words with the pre-marked part of speech as entities according to a preset context collocation rule; identifying the pre-built scene recognition model in the corpus to be expanded, and determining the text with two entities in the text as in-set text; establishing a child node in the parent node in the pre-built knowledge graph through in-set calculation, integrating the entities of the in-set text into the knowledge graph; and synchronizing the newly added nodes in the knowledge graph to the speech recognition model through a protocol generation rule, making the word slot effective, and serving as a speech bottom-up strategy. The corpus for speech recognition can be autonomously expanded, and the corpus expansion efficiency and precision are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent perception, in particular to a corpus expansion method and device for speech recognition, equipment and storage medium. BACKGROUND

[0002] At present, speech interaction in intelligent cockpit becomes an important human-computer interaction mode, but the efficiency of semantic recognition in the use process of user speech interaction is low, mainly in two aspects: the first aspect is rejection, and the result is no response or "I can't understand", the second aspect is that the execution deviates from the original semantics, such as the user saying "open the rear window", and the result is to open all the windows. The main reason for the above two aspects is that the semantic scene coverage is insufficient and the model corpus is missing. The current solution relies on personnel to annotate the corpus for rejection, expand the corpus, and improve the effect of semantic understanding. However, the efficiency and accuracy of the corpus expansion scheme through artificial expansion are low. SUMMARY

[0003] In order to solve the above problems, the present application provides a corpus expansion method, device, equipment and storage medium for speech recognition, which can autonomously expand the corpus for speech recognition, greatly improving the efficiency and accuracy of corpus expansion.

[0004] The present application provides a corpus expansion method for speech recognition, which comprises:

[0005] The text in the collected corpus to be expanded is segmented by using the maximum forward matching algorithm, the part of speech of the segmented text is determined, and the segmented text with a pre-marked part of speech is determined as an entity according to a preset context matching rule;

[0006] The scene recognition model pre-built in the corpus to be expanded is identified, and the text with two entities in the text is determined as an in-set text;

[0007] The parent node is retrieved in the pre-built knowledge graph by aggregation calculation, and the child node is established, and the entity of the in-set text is integrated into the knowledge graph;

[0008] The newly added node in the knowledge graph is synchronized to the speech recognition model by using the protocol generation rule, becomes a word slot, and is used as a speech bottom-up strategy.

[0009] Preferably, the text in the collected corpus to be expanded is segmented by using the maximum forward matching algorithm, specifically comprising:

[0010] S201, a string with a preset maximum matching character length is taken from the text in the corpus to be expanded from front to back;

[0011] S202, judging whether the taken string exists in the preset corpus or not;

[0012] When the string does not exist, step S203 is executed;

[0013] When the string exists, the string segmentation succeeds, and step S205 is returned;

[0014] S203, the string segmentation fails, and the last character of the string is deleted;

[0015] S204, judging whether the length of the taken string is 0 or not;

[0016] If yes, the string segmentation of the maximum matching character length this time fails, and step S205 is executed;

[0017] If no, step S202 is returned;

[0018] S205, judging whether the length of the remaining characters in the text of the corpus to be expanded after the string segmentation this time is 0 or not;

[0019] If yes, the string segmentation judgment ends;

[0020] If no, the string segmentation has not ended, and step S206 is executed;

[0021] S206, judging whether the length of the remaining characters in the text of the corpus to be expanded after the string segmentation this time is not greater than the maximum matching character length or not;

[0022] If yes, all the remaining characters are taken as the taken string, and step 202 is returned;

[0023] If no, the string of the maximum matching character length is taken again from the front to the back in all the remaining characters, and step S202 is returned.

[0024] Preferably, the corpus to be expanded includes text data that cannot be recognized by a preset semantic model library during voice recognition, text data of which the instruction execution is wrong during voice recognition, text data that is determined as a repeated instruction during voice recognition, and text data that is determined as negative by a preset emotion analysis model during voice recognition;

[0025] The part of speech of the segmented text is determined, and specifically includes:

[0026] A first probability P T (n) that the segmented word T is a noun is calculated, and a second probability P T,n (v) that the segmented word T is a verb is calculated. T T,v

[0027] ​​When the first probability is not less than the second probability, and the first probability is not less than a preset word segmentation probability, the word T is determined as a noun;

[0028] When the second probability is not less than the first probability, and the second probability is not less than a preset word segmentation probability, the word T is determined as a verb;

[0029] Wherein, M is the total number of times of appearance of the word T in the preset training corpus, C T,n is the first number of times that the word T is marked as a noun by the preset part-of-speech tagging model in the training corpus, C T,v is the second number of times that the word T is marked as a verb by the part-of-speech tagging model in the training corpus.

[0030] As a preferred solution, the parent node is established in the pre-built knowledge graph by the aggregation calculation, and the entities of the in-set text are integrated into the knowledge graph, specifically comprising:

[0031] The two entities of the in-set text are searched for nodes in the knowledge graph by the aggregation calculation;

[0032] The searched node path is taken as a parent node, as a scene layer or an intent layer of the knowledge graph, and another node is taken as a child node, as a word slot layer of the knowledge graph, to complete the integration of the entities of the in-set text.

[0033] Preferably, the method further comprises:

[0034] For the out-of-set text in the to-be-expanded corpus which is not determined as the in-set text, an out-of-set root node is added in the knowledge graph;

[0035] The added out-of-set root node is traversed to determine whether there is an entity under the root node in the out-of-set text;

[0036] If there is, the entity of the out-of-set text does not add a root node, and other entities in the out-of-set text become child nodes;

[0037] When the entities of the in-set text do not exist under the root node, the entity with a high weight sequence in the text is taken as a parent node, and the entity with a low weight sequence is taken as a child node;

[0038] The weight sequence is specifically a sequence obtained by sorting the number of appearances of the entities in all out-of-set texts according to the number of appearances.

[0039] As a preferred solution, the added node in the knowledge graph is synchronized to the speech recognition model by the protocol generation rule to become a word slot, and as a speech bottom-up strategy, specifically comprising:

[0040] Call Chinese-English translation interface, English translation of node entity, packaged into data structure;

[0041] The data structure of the text and the protocol field of the text are synchronized to the speech recognition model for training, and the newly added node entity becomes effective as a word slot and becomes a feature in the speech recognition model.

[0042] Preferably, after determining the entity, the method further comprises:

[0043] Obtain search hot words in a first preset period from a search website, and obtain network topics and hot words in the first preset period from a mainstream network platform, and take the obtained search hot words, network topics and hot words as training data;

[0044] The training data obtained is processed by a neural network model, and the training data after the processing is subjected to business-related judgment, and the training data irrelevant to the business is removed;

[0045] The training data after removing the irrelevant data is tagged with a part of speech, and is added to the part-of-speech tagging model for training.

[0046] Another embodiment of the application provides a speech recognition corpus expansion device, the device comprising:

[0047] The analysis module is configured to perform word segmentation on the collected text in the corpus to be expanded by using a maximum forward matching algorithm, determine the part of speech of the segmented words in the text, and determine the segmented words with pre-marked parts of speech as entities according to a preset context collocation rule;

[0048] The recognition module is configured to recognize the pre-built scene recognition model in the corpus to be expanded, and determine the text with two entities in the text as an intra-set text;

[0049] The first integration module is configured to establish a child node by retrieving a parent node in the pre-built knowledge graph through aggregation calculation, and integrate the entities of the intra-set text into the knowledge graph;

[0050] The effective module is configured to synchronize the newly added node in the knowledge graph to the speech recognition model by using a protocol generation rule, so as to make the word slot effective and serve as a speech bottom-up strategy.

[0051] As a preferred solution, the analysis module is specifically configured to:

[0052] S201, in the text in the corpus to be expanded, a string with a preset maximum matching character length is taken from the front to the back;

[0053] S202, Determine whether the selected string exists in the preset corpus;

[0054] If it does not exist, proceed to step S203;

[0055] If the string exists, the word segmentation is successful, and the process returns to step S205.

[0056] S203, the string failed to be segmented; delete the last character of the string.

[0057] S204, determine whether the length of the selected string is 0;

[0058] If so, the string segmentation with the longest matching character length fails, proceed to step S205;

[0059] If not, return to step S202;

[0060] S205, determine whether the remaining character length of the text in the corpus to be expanded after this word segmentation is 0;

[0061] If so, end the word segmentation judgment;

[0062] If not, proceed to step S206 if the word segmentation is not yet complete.

[0063] S206, determine whether the remaining character length of the text in the corpus to be expanded after this word segmentation is not greater than the maximum matching character length;

[0064] If so, take all remaining characters as the obtained string and return to step 202;

[0065] If not, among all the remaining characters, take the string with the longest matching character again from front to back, and return to step S202.

[0066] Preferably, the corpus to be expanded includes text data that cannot be recognized by the preset semantic model library during speech recognition, text data with instruction execution errors during speech recognition, text data that is determined to be a repetitive instruction during speech recognition, and text data that is determined to be negative by the preset sentiment analysis model during speech recognition.

[0067] The parsing module is also used for:

[0068] Calculate the first probability P that the segmented word T is classified as a noun. T (n)=C T,n / M, and the second probability P of being classified as a verb. T (v)=C T,v / M;

[0069] When the first probability is not less than the second probability, and the first probability is not less than a preset word segmentation probability, the word T is determined as a noun;

[0070] When the second probability is not less than the first probability, and the second probability is not less than a preset word segmentation probability, the word T is determined as a verb;

[0071] Wherein, M is a total number of occurrences of the word T in a preset training corpus, C T,n is a first number of times that the word T is marked as a noun by a preset part-of-speech tagging model in the training corpus, C T,v is a second number of times that the word T is marked as a verb by the part-of-speech tagging model in the training corpus.

[0072] Preferably, the first integration module is specifically used for:

[0073] Node retrieval is performed on two entities of the in-set text in the knowledge graph through aggregation calculation;

[0074] The retrieved node path is taken as a parent node, as a scene layer or an intent layer of the knowledge graph, and another node is taken as a child node, as a word slot layer of the knowledge graph, so as to complete integration of the entities of the in-set text.

[0075] Preferably, the device further comprises:

[0076] The second integration module is specifically used for:

[0077] An out-set root node is added in the knowledge graph for out-set text in the to-be-expanded corpus which is not determined as in-set text.

[0078] Traversal is performed on the added out-set root node to determine whether an entity in the out-set text exists under the root node.

[0079] If the entity exists, the entity of the out-set text does not add a root node, and other entities in the out-set text become child nodes.

[0080] When the entities of the in-set text do not exist under the root node, an entity with a high weight sequence in the text is taken as a parent node, and an entity with a low weight sequence is taken as a child node.

[0081] The weight sequence is specifically a sequence obtained by sorting all entities in all out-set texts according to the number of occurrences of the entities.

[0082] Preferably, the effectiveness module is specifically used for:

[0083] A Chinese-English translation interface is called to perform English translation on the node entity, and the node entity is packaged into a data structure.

[0084] The data structure of the text and the protocol field of the text are synchronized to training of the speech recognition model, and the newly added node entity becomes a word slot and becomes a feature in the speech recognition model, so that when similar speech is recognized, the word slot is used as a parameter of the speech bottom-up text to perform corresponding instruction control.

[0085] Preferably, the device further comprises:

[0086] The quality inspection module is specifically configured to:

[0087] The search hot words in a first preset period are obtained from a search website, and the network topics and hot words in the first preset period are obtained from a mainstream network platform, and the obtained search hot words, network topics and hot words are used as training data.

[0088] The obtained training data is processed by a neural network model, and the training data after the processing is subjected to a business-related judgment, and the training data irrelevant to the business is removed.

[0089] The training data after the irrelevant data is removed is marked with a part of speech, and is added to the part of speech marking model for training.

[0090] The embodiment of the application further provides a terminal device, including a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and the processor executes the computer program to realize the speech recognition corpus expansion method of any one of the above embodiments.

[0091] The embodiment of the application further provides a computer readable storage medium, including a stored computer program, wherein when the computer program runs, the device where the computer readable storage medium is located executes the speech recognition corpus expansion method of any one of the above embodiments.

[0092] The application provides a corpus expansion method, device and equipment for voice recognition and a storage medium. The corpus expansion method comprises the following steps: performing word segmentation on the text in the collected corpus to be expanded by using a maximum forward matching algorithm, determining the part of speech of the segmented words in the text, and determining the segmented words with a pre-marked part of speech as entities according to a preset context collocation rule; identifying the pre-built scene recognition model in the corpus to be expanded, and determining the text with two entities in the text as in-group text; establishing a child node of a parent node in the pre-built knowledge graph by means of in-group calculation, integrating the entities of the in-group text into the knowledge graph; synchronizing the newly added nodes in the knowledge graph to the voice recognition model by means of a protocol generation rule, making the word slots effective, and serving as a voice bottom-up strategy. The in-group text in the corpus to be expanded is determined by means of word segmentation analysis and label division, the in-group text is integrated into the knowledge graph of the voice recognition corpus by means of in-group calculation, the nodes after integration are made effective, and the expansion of the corpus to be expanded is completed. The corpus for voice recognition can be expanded autonomously, and the corpus expansion efficiency and precision are greatly improved. BRIEF DESCRIPTION OF DRAWINGS

[0093] Figure 1 is a flowchart of a corpus expansion method for voice recognition provided by an embodiment of the application;

[0094] Figure 2 is a flowchart of corpus word segmentation provided by an embodiment of the application;

[0095] Figure 3 is a structural diagram of a corpus expansion device for voice recognition provided by an embodiment of the application;

[0096] Figure 4 is a structural diagram of a terminal device provided by an embodiment of the application. DETAILED DESCRIPTION

[0097] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.

[0098] Embodiment one

[0099] Referring to Figure 1 is a flowchart of a corpus expansion method for voice recognition provided by an embodiment of the application, and the method comprises steps S1-S4.

[0100] S1, determining the part-of-speech of the text in the collected text corpus to be expanded and writing, and determining the part-of-speech of the pre-labeled word in the word as an entity according to the preset context collocation rule;

[0101] S2, the scene recognition model in the pre-built corpus is identified, and the text with two entities in the text is determined as an in-set text;

[0102] S3, the parent node is retrieved in the pre-built knowledge graph by aggregation calculation, and the child node is established, and the entity of the in-set text is integrated into the knowledge graph;

[0103] S4, the newly added node in the knowledge graph is synchronized to the speech recognition model by the protocol generation rule, becomes the word slot, and is used as the speech bottom-up strategy.

[0104] In the specific implementation of the embodiment, the data requiring input of the corpus to be expanded is received, the corpus to be expanded is segmented by corpus analysis, the part-of-speech of each word is determined, and the entity in the word is determined according to the context collocation rule, which is specific to:

[0105] The text in the collected corpus to be expanded is segmented by the maximum forward matching algorithm, and the part-of-speech of each word after segmentation is recognized. According to the recognized part-of-speech and the collocation order of each word in each corpus to be expanded, the words with different parts-of-speech in the word are determined as entities according to the preset context collocation rule.

[0106] For example, according to the predetermined collocation context rule, the corpus to be expanded "help me open the air conditioner" can recognize "open" as a verb and "air conditioner" as a noun. It is judged whether the word is an entity, and the preset context collocation rule is combined. V+n structure, n is an entity, so it is judged that the word air conditioner is an entity. Other entities in other contexts can also be recognized by setting other context collocation rules.

[0107] The label of the in-set text represents the current recognized execution scene type, such as music, air conditioner, sound effect, telephone and the like, which are in the type set trained by the scene recognition model, and the label of the out-set text represents the type not planned to be recognized in advance, such as automatic driving, auxiliary driving and the like, which do not exist in the training corpus.

[0108] The in-set text and the out-set text are distinguished by whether they can be recognized by the scene recognition model and the number of entities in the text.

[0109] When the text of the corpus to be expanded can be recognized by the scene recognition model, and the number of entities in the text is two, the text is determined as an in-set text;

[0110] Otherwise, the text is determined as out-of-distribution text;

[0111] The two labels of in-distribution text and out-of-distribution text do not have high requirements on the accuracy of the model, and a binary classification can be used to achieve the same, the in-distribution text data can identify the scene, and the number of entities is 2, and the non-in-distribution text is determined as out-of-distribution.

[0112] The parent node is retrieved in the pre-built knowledge graph through the aggregation calculation, the child node is established, the entity of the in-distribution text is integrated into the knowledge graph, and the integration of the in-distribution text is realized.

[0113] The newly added node in the knowledge graph is synchronized to the speech recognition model through the protocol generation rule, becomes a word slot, and is used as a speech bottom-up strategy; after the entity of the word slot is effective, similar text is recognized in the subsequent speech recognition model, the word slot layer triggered by the effective word slot is executed, the speech bottom-up strategy is executed, and the corresponding speech response is completed.

[0114] The in-distribution text in the to-be-expanded corpus is determined through word segmentation analysis and label division, the in-distribution text is integrated into the knowledge graph of the speech recognition corpus through aggregation calculation, the integrated node is effective, and the expansion of the to-be-expanded corpus is completed. The corpus can be expanded independently, and the efficiency and accuracy of corpus expansion are greatly improved.

[0115] Embodiment two

[0116] In another embodiment provided by the application, referring to Figure 2 is a flowchart of corpus word segmentation provided by the embodiment of the application, comprising the following steps:

[0117] The text in the collected to-be-expanded corpus is segmented by the maximum forward matching algorithm, and specifically comprises:

[0118] S201, a string with a preset maximum matching character length is taken from the front to the rear in the text in the to-be-expanded corpus;

[0119] S202, it is judged whether the taken string exists in the preset corpus library or not;

[0120] When it does not exist, step S203 is executed;

[0121] When it exists, the string segmentation is successful, and step S205 is returned;

[0122] S203, the string segmentation fails, and the last character of the string is deleted;

[0123] S204, it is judged whether the length of the taken string is 0 or not;

[0124] If yes, the string segmentation of the current maximum matching character length fails, and step S205 is executed;

[0125] If no, return to step S202;

[0126] S205, judge whether the remaining character length of the text in the corpus to be expanded after the current segmentation is 0;

[0127] If yes, end the segmentation judgment;

[0128] If no, the segmentation is not finished, and step S206 is executed;

[0129] S206, judge whether the remaining character length of the text in the corpus to be expanded after the current segmentation is not greater than the maximum matching character length;

[0130] If yes, take all the remaining characters as the obtained string, and return to step 202;

[0131] If no, in all the remaining characters, take the string of the maximum matching character length again from the front to the back, and return to step S202.

[0132] In the specific implementation of the embodiment, the segmentation is performed by maximum forward matching, the maximum matching character length is set, the character length of the text is calculated in the text, and it is judged whether the selected string exists in the corpus;

[0133] When it does not exist, the last character of the string is deleted, and it is judged again whether the selected string exists in the preset corpus; if it does not exist, the last character of the string is deleted, and it is judged again whether the selected string exists in the preset corpus, until the selected string exists in the preset corpus or the length of the selected string is 0;

[0134] When it exists, the string segmentation is successful, the string of the maximum matching character length is taken after the successfully segmented string, it is judged again whether the selected string exists in the preset corpus, and the text in the expanded corpus is segmented in turn;

[0135] In the specific implementation, the maximum matching character length is set to 5, that is, it is assumed that the maximum length of a word is 5.

[0136] The words existing in the preset corpus are: "we", "often", "often have", "have opinions", "have intentions", "opinions", "disagreements", "I", "us", "often", "often", "have", "intention", "see";

[0137] The "we often have opinions and disagreements" is divided by maximum forward matching.

[0138] First round: take the string "we often have" according to the maximum matching character length, take the word in the positive direction, and if the matching fails, remove the last character of the matching field each time.

[0139] "we often have", match 5-word in the corpus, no match, substring length minus 1 becomes "we often".

[0140] "we often", match 4-word in the corpus, no match, becomes "we often".

[0141] "we often", match 3-word in the corpus, no match, becomes "we often".

[0142] "we often", match 2-word in the corpus, match successfully, output "we often", input becomes "have opinions".

[0143] Second round: take "often have opinions" according to the maximum matching character length in the remaining text;

[0144] "often have opinions", match 5-word in the corpus, no match, substring length minus 1 becomes "often have".

[0145] "often have", match 4-word in the corpus, no match, substring length minus 1 becomes "often have".

[0146] "often have", match 3-word in the corpus, no match, substring length minus 1 becomes "often".

[0147] "often", match 2-word in the corpus, match, output "often", input becomes "have opinions".

[0148] In this way, until the input length is 0, the scanning is terminated.

[0149] Finally, record the obtained segmentation each time to obtain the result of the forward maximum matching algorithm: we / often / have opinions / disagreement.

[0150] Through maximum forward matching, the segmentation of the to-be-expanded corpus is accurately completed.

[0151] Example three

[0152] In another embodiment provided by the present application, the to-be-expanded corpus includes text data that cannot be recognized by a preset semantic model library during voice recognition, text data with instruction execution errors during voice recognition, text data determined as repeated instructions during voice recognition, and text data determined as negative by a preset emotion analysis model during voice recognition.

[0153] The part of speech of the text is determined, and specifically includes:

[0154] The first probability P that the segmented word T is a noun T (n) = C T,n / M, and the second probability P that the segmented word T is a verb T (v) = C T,v / M;

[0155] When the first probability is not less than the second probability, and the first probability is not less than a preset segmentation probability, the word T is determined to be a noun;

[0156] When the second probability is not less than the first probability, and the second probability is not less than a preset segmentation probability, the word T is determined to be a verb;

[0157] wherein M is a total number of occurrences of the word T in a preset training corpus, C T,n is a first number of times that the word T is marked as a noun by a preset part-of-speech tagging model in the training corpus, C T,v is a second number of times that the word T is marked as a verb by the part-of-speech tagging model in the training corpus.

[0158] In the specific implementation of the embodiment, when the corpus is expanded, the user unrecognized text and the text with an error execution intention are mainly detected and collected. The user unrecognized text specifically refers to data that is recognized as unknown by the cloud semantic model. The text with an error execution intention mainly has the following characteristics: a repeated instruction, an emotional text, and an unsuccessful execution. The repeated instruction is an instruction with the same context. The emotional text is a text that is determined to be negative by an emotion model. The unsuccessful execution is that the local end has no feedback after the cloud end issues an instruction.

[0159] The data that cannot be processed by the original speech recognition is input as the corpus to be expanded, so that the unknown corpus can be expanded autonomously and accurately, the expansion efficiency is improved, and the waste of resources caused by the expansion of the corpus that can be recognized is avoided.

[0160] When the part-of-speech of the segmented word is determined, the segmented word is mainly a noun and a verb. For other unnecessary words, the corpus is generally not used for recognition, so that the execution efficiency of the model is improved.

[0161] The first probability P that the segmented word T is a noun T (n) = C T,n / M; the second probability P that the segmented word T is a verb T (v) = C T,v / M; M is a total number of occurrences of the word T in a preset training corpus, C T,n is a first number of times that the word T is marked as a noun by a preset part-of-speech tagging model in the training corpus, C T,vThe second number of times that the word T in the training corpus is marked as a verb by the part-of-speech tagging model;

[0162] When the first probability is not less than the second probability, and the first probability is not less than a preset word segmentation probability, the word T is determined as a noun.

[0163] When the second probability is not less than the first probability, and the second probability is not less than a preset word segmentation probability, the word T is determined as a verb.

[0164] It should be noted that when the recognized part-of-speech in the corpus also includes other words, the probability thereof can be calculated, and then compared, and the part-of-speech is determined by using a similar principle.

[0165] By probability calculation, the part-of-speech of the word can be accurately determined, which facilitates subsequent entity judgment and integration of entities.

[0166] Embodiment Four

[0167] In another embodiment provided by the present application, the step S3 specifically comprises:

[0168] The two entities of the in-set text are subjected to node retrieval in the knowledge graph by means of the aggregation calculation;

[0169] The retrieved node path is taken as a parent node, as a scene layer or an intent layer of the knowledge graph, and another node is taken as a child node, as a word slot layer of the knowledge graph, to complete the integration of the entities of the in-set text.

[0170] In the specific implementation of the present embodiment, when the in-set text is integrated, the in-set text has two entities, one of which has a node as a scene layer or an intent layer, and the other of which has a node as a word slot layer.

[0171] The two entities are subjected to node retrieval in a preset knowledge graph by means of the aggregation calculation, and when the node path of one of the entities is retrieved, the retrieved node path is taken as a parent node, as a scene layer or an intent layer of the knowledge graph, and the node of the other entity is taken as a child node of the parent node, to complete the integration of the entities of the in-set text.

[0172] For example, "sound effect is adjusted to cinema mode", the node "sound effect", the node "cinema mode", and "sound effect" and "cinema mode" are simultaneously subjected to retrieval, and if the "sound effect" has an intent layer, the "cinema mode" is taken as a child node, becoming a word slot layer.

[0173] By means of the aggregation calculation method for the in-set text, the integration of the in-set text can be quickly completed, and the expansion of the in-set text in the to-be-expanded corpus is realized.

[0174] Embodiment Five

[0175] In another embodiment provided by the application, the method further comprises:

[0176] adding an out-of-set root node in the knowledge graph for the out-of-set text in the corpus to be expanded;

[0177] traversing the added out-of-set root node to determine whether the entity in the out-of-set text exists under the root node;

[0178] if the entity exists, the entity in the out-of-set text does not add a root node, and other entities in the out-of-set text become child nodes;

[0179] when the entities in the in-set text do not exist under the root node, the entity in the text with a higher weight sequence is taken as a parent node, and the entity with a lower weight sequence is taken as a child node;

[0180] The weight sequence is specifically a sequence obtained by sorting the number of occurrences of the entity in all out-of-set texts according to the number of occurrences.

[0181] In the embodiment, the in-set text is recognized by processing and identifying the text in the corpus to be expanded, and the other is the out-of-set text.

[0182] For the entity in the out-of-set text, if the same entity exists, the value of the entity is assigned a value of 1, and the more the entity exists, the higher the weight value of the entity is. All entities are counted, and a weight sequence is obtained by sorting the weight values.

[0183] adding an out-of-set root node in the knowledge graph for the out-of-set text in the corpus to be expanded;

[0184] traversing the added out-of-set root node to determine whether the entity in the out-of-set text exists under the root node;

[0185] if the entity exists, the entity in the out-of-set text does not add a root node, and other entities in the out-of-set text become child nodes;

[0186] when the entities in the in-set text do not exist under the root node, the entity in the text with a higher weight sequence is taken as a parent node, and the entity with a lower weight sequence is taken as a child node, to complete the integration of the out-of-set text.

[0187] The integration of the out-of-set text is realized by traversing the added root node.

[0188] Embodiment six

[0189] In another embodiment provided by the application, the step S4 specifically comprises:

[0190] Call the Chinese-English translation interface to translate the node entity into English, and pack it into a data structure;

[0191] The data structure of the text and the protocol field of the text are synchronized to the speech recognition model for training, and the newly added node entity becomes a word slot that takes effect and becomes a feature in the speech recognition model.

[0192] In the specific implementation of the embodiment, the newly added word slot in the knowledge graph becomes a child node, and the Chinese-English translation interface is called to translate the node entity into English according to the protocol generation rule, and the data structure is packed, for example: {{service: "scene layer node English translation"}, {intent: "intent layer node English translation"}, {slot: "word slot layer node English translation"}, {text: "node extraction source text"}, {word slot: "node entity name"}.

[0193] The data structure of the text and the protocol field of the text are synchronized to the speech recognition model for training, and the newly added node entity becomes a word slot that takes effect and becomes a feature in the speech recognition model.

[0194] When similar voice phrases are recognized, the word slot serves as a parameter of the voice bottom-up text, for example, the user says "turn on the energy-saving mode of the air conditioner", and there is no energy-saving mode at present. The mechanism establishes the "energy-saving mode" entity under the "air conditioner" parent-child node, becomes the "air conditioner--energy-saving mode" parent-child node, and synchronizes to the recognition model. When the user says "turn on the energy-saving mode of the air conditioner" again, the cloud model is semantically recognized to make a bottom-up "the current air conditioner has no energy-saving mode", which avoids the problem of silent response. The newly added parent node in the knowledge graph is automatically pushed to the back end after exceeding the set threshold, and is configured and developed by product personnel to improve the function. It solves the problem that the function cannot be perceived by the user with high perception and high frequency.

[0195] Embodiment seven

[0196] In another embodiment provided by the application, after determining the entity, the method further comprises:

[0197] Obtaining search hot words in a first preset period from a search website, and obtaining network topics and hot words in the first preset period from a mainstream network platform, and taking the obtained search hot words, network topics and hot words as training data;

[0198] The training data obtained is processed by a neural network model, and the training data after the processing is subjected to business-related judgment, and the training data irrelevant to the business is removed;

[0199] The training data of irrelevant data is labeled with a part-of-speech, and is added to the part-of-speech labeling model for training.

[0200] In the specific implementation of the embodiment, the identification of entities relies on part-of-speech labeling and statistical methods, but there is a lack of part-of-speech labeling for network new words, popular networks and the like, and there are cases where it is difficult to judge or judge incorrectly, so a neural network model detection mechanism is introduced, specifically:

[0201] Daily top 50 search hot words are obtained from a search website, and network topics and hot words are obtained from a mainstream network platform every day, and the obtained search hot words, network topics and hot words are used as training data;

[0202] The obtained training data is processed by a neural network model, and the training data after the deduplication processing is subjected to a business relevance judgment, and an output is obtained whether it is relevant to the business, wherein 0 is not relevant to the business, and 1 is relevant to the business, and the training data not relevant to the business is removed;

[0203] The training data of irrelevant data is labeled with a part-of-speech, and is added to the part-of-speech labeling model for training;

[0204] The training data is repeatedly obtained, processed, removed and labeled according to a training cycle of once a day, and the part-of-speech labeling model is periodically trained.

[0205] Through periodic model training, the accuracy of the part-of-speech labeling model can be accurately ensured.

[0206] Embodiment eight

[0207] Reference Figure 3 It is a structure schematic view of a speech recognition corpus expansion device provided by the embodiment of the application, the device comprises: a parameter acquisition module, a judgment module and a control module;

[0208] The parameter acquisition module is used for acquiring vehicle state information of a vehicle end and environmental parameters outside the vehicle in response to a starting request input by a user;

[0209] The judgment module is used for generating a starting instruction when the vehicle state information meets a preset starting condition and the environmental parameters meet a preset safety condition;

[0210] The control module is used for controlling the vehicle end to enter an immersive cabin mode according to the starting instruction.

[0211] The speech recognition corpus expansion device provided by the embodiment can perform all steps and functions of the speech recognition corpus expansion method provided by any of the above embodiments, and the specific functions of the device will not be described here.

[0212] Embodiment Nine

[0213] Referring to Figure 4 is a structural diagram of a terminal device provided by an embodiment of the present application. The terminal device comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, for example, a corpus expansion program for speech recognition. The processor implements the steps in each of the embodiments of the method for corpus expansion for speech recognition when executing the computer program, for example, steps S1-S4 shown in the figure. Alternatively, the processor implements the functions of each module in each of the embodiments of the device when executing the computer program. Figure 1

[0214] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the device for corpus expansion for speech recognition. For example, the computer program can be divided into several modules, and the specific functions of each module have been described in detail in any of the embodiments of the method for corpus expansion for speech recognition. Here, the specific functions of the device will not be described again.

[0215] The device for corpus expansion for speech recognition can be a desktop computer, a notebook, a palm computer, a cloud server, and other computing devices. The device for corpus expansion for speech recognition can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the diagram is only an example of the device for corpus expansion for speech recognition, and does not constitute a limitation on the device for corpus expansion for speech recognition, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the device for corpus expansion for speech recognition can also include an input / output device, a network access device, a bus, etc.

[0216] ​The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor. The processor is a control center of the speech recognition corpus expansion writing device, and is connected with various parts of the speech recognition corpus expansion writing device through various interfaces and lines.

[0217] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the speech recognition corpus expansion writing device by running or executing the computer program and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0218] The modules of the corpus expansion device for speech recognition are integrated in the form of software function units and sold or used as independent products, which can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0219] It should be noted that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which are also considered within the scope of protection of the present application.

Claims

1. A corpus expansion method for speech recognition, characterized by, The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises:

2. The method of claim 1, wherein, The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises:

3. The method of claim 1, wherein the corpus expansion is performed by, The method comprises: The method comprises: The first probability that the tokenized word T is classified as a noun and the second probability that the tokenized word T is classified as a verb ; The method comprises: The method comprises: wherein M is a total number of occurrences of the word T in a preset training corpus, is a first number of times that the word T in the training corpus is labeled as a noun by a preset part-of-speech tagging model, is a second number of times that the word T in the training corpus is labeled as a verb by the part-of-speech tagging model.

4. The method of claim 1, wherein the corpus expansion is performed by a voice recognition engine. The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: The method comprises: If the out-of-set text entity exists, no root node is added, and other entities in the out-of-set text become child nodes; When the in-set text entity does not exist under the root node, the entity with a higher weight sequence in the text is taken as a parent node, and the entity with a lower weight sequence is taken as a child node; The weight sequence is specifically a sequence obtained by counting the number of occurrences of all entities in the out-of-set text and sorting the number of occurrences.

5. The method of claim 1, wherein the corpus expansion is performed by a voice recognition engine. The protocol generation rule is used to synchronize the added node in the knowledge graph to the speech recognition model, so that the word slot is effective, and the speech bottom-up strategy is used, and the speech bottom-up strategy is specifically as follows: An English translation interface is called to translate the node entity into English, and the data structure is packaged; The data structure of the text package and the protocol field of the text are synchronized to the speech recognition model for training, and the newly added node entity becomes effective as a word slot and becomes a feature in the speech recognition model, so that when a similar speech strategy is recognized, the word slot is taken as a parameter of the speech bottom-up text to perform corresponding instruction control.

6. The method of claim 3, wherein the corpus expansion is performed by a voice recognition engine. After the entity is determined, the method further includes: obtaining search hot words in a first preset period from a search website, and obtaining network topics and hot words in the first preset period from a mainstream network platform, and taking the obtained search hot words, network topics and hot words as training data; processing the obtained training data by using a neural network model, and performing business-related judgment on the training data after the processing, and removing training data irrelevant to the business; annotating the training data after the irrelevant data is removed, and adding the training data to the part-of-speech annotation model for training.

7. A corpus expansion apparatus for speech recognition, characterized by comprising: The device includes: The parsing module is configured to perform word segmentation on the text in the collected to-be-expanded corpus by using a maximum forward matching algorithm, determine the part-of-speech of the segmented words in the text, and determine the segmented words with pre-labeled part-of-speech as entities according to a preset context collocation rule; The recognition module is configured to recognize the pre-built scene recognition model in the to-be-expanded corpus, and determine the text with two entities in the text as in-set text; The first integration module is configured to search for nodes of the two entities of the in-set text in the knowledge graph by using a collection calculation, take the searched node path as a parent node, take another node as a child node, and complete integration of the entities of the in-set text. The effective module is configured to synchronize the added node in the knowledge graph to the speech recognition model by using a protocol generation rule, so that the word slot is effective, and the speech bottom-up strategy is used.

8. A terminal device, comprising: The computer readable storage medium includes a stored computer program, wherein the computer readable storage medium controls the device to perform the corpus expansion method for speech recognition when the computer program runs.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium includes a stored computer program, wherein the computer readable storage medium controls the device to perform the corpus expansion method for speech recognition when the computer program runs.

Citation Information

Patent Citations

  • Word slot identification method and device and electronic equipment

    CN112632987A

  • Semantic understanding method and system for knowledge graph intelligent question and answer

    CN114117069A