Keyword detection method, computing device, computer storage medium and computer program product
By using pre-constructed vocabulary databases to match keywords in specific fields, the problem of low keyword detection accuracy in the fields of finance, communication and other fields in the prior art is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411552363.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-28
AI Technical Summary
The existing keyword detection methods based on general speech recognition systems are less accurate in specific fields such as finance and communication, and it is difficult to accurately identify and understand professional terms and keywords.
By obtaining the voice signal to be detected, preprocessing is performed to generate the target voice signal, performing speech recognition to obtain text information, and using a pre-constructed vocabulary library based on specific domain knowledge to improve detection accuracy.
Improve the accuracy of keyword detection in specific fields, and enable more efficient identification and understanding of professional terms and keywords in the field.
Smart Images

Figure CN119541469A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a keyword detection method, a computing device, a computer storage medium, and a computer program product. Background Art
[0002] In today's information society, speech recognition technology has made significant progress. At present, there are some solutions that can detect keywords in speech using general speech recognition systems. Existing speech recognition systems can provide relatively accurate and reliable recognition results when processing general speech content. However, when it comes to specific fields, such as finance and communications, existing keyword detection methods based on general speech recognition systems often have technical problems of low accuracy. Summary of the invention
[0003] Embodiments of the present application provide a keyword detection method, a computing device, a computer storage medium, and a computer program product.
[0004] In a first aspect, an embodiment of the present application provides a keyword detection method, comprising:
[0005] Acquire a voice signal to be detected;
[0006] Preprocessing the speech signal to be detected to generate a target speech signal;
[0007] Performing speech recognition on the target speech signal to obtain text information corresponding to the target speech signal;
[0008] Acquire a pre-built vocabulary library, wherein the vocabulary library includes a plurality of keywords, and the vocabulary library is built based on knowledge in a specific field;
[0009] The text information is matched with the multiple keywords in the vocabulary library to obtain a detection result of the speech signal to be recognized.
[0010] In a second aspect, an embodiment of the present application provides a keyword detection device, comprising:
[0011] A signal acquisition module, used to acquire a voice signal to be detected;
[0012] A signal preprocessing module, used for preprocessing the speech signal to be detected to generate a target speech signal;
[0013] A speech recognition module, used to perform speech recognition on the target speech signal to obtain text information corresponding to the target speech signal;
[0014] A vocabulary library acquisition module is used to acquire a pre-built vocabulary library, wherein the vocabulary library includes a plurality of keywords and is generated based on knowledge in a specific field;
[0015] The keyword matching module is used to match the text information with the multiple keywords in the vocabulary library to obtain the detection result of the speech signal to be recognized.
[0016] In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component;
[0017] The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the keyword detection method provided in the embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application provides a computer storage medium storing a computer program, which, when executed by a computer, implements the keyword detection method provided in the embodiment of the present application.
[0019] In a fifth aspect, a computer program product is provided in an embodiment of the present application. The computer program product includes a computer program code. When the computer program code is executed by a computer, the keyword detection method provided in the embodiment of the present application is implemented.
[0020] The embodiment of the present application adopts the following technical solutions: obtaining a voice signal to be detected; preprocessing the voice signal to be detected to generate a target voice signal; performing voice recognition on the target voice signal to obtain text information corresponding to the target voice signal; obtaining a pre-constructed vocabulary library, wherein the vocabulary library includes a plurality of keywords, and the vocabulary library is constructed and generated based on knowledge of a specific field; and matching the text information with the plurality of keywords in the vocabulary library to obtain a detection result of the voice signal to be recognized. By performing keyword detection on the voice signal to be detected based on a pre-constructed vocabulary library for a specific field, the accuracy of keyword detection in a specific field can be improved.
[0021] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 A flowchart of a keyword detection method provided by an embodiment of the present application is shown;
[0024] Figure 2 A block diagram of a keyword detection device provided by an embodiment of the present application is shown;
[0025] Figure 3 A block diagram of a computing device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0027] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0028] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0030] With the continuous development of speech technology, there are already some general speech recognition systems that can detect keywords in speech. However, in specific fields such as financial communications, these general systems face many challenges.
[0031] The field of financial communications is highly professional and complex, and contains a large number of unique and precise professional terms and keywords, such as "credit derivatives", "quantitative easing policy", "cross-border payment settlement", etc. These terms and keywords have strict definitions and specific connotations in terms of semantics, context and usage rules.
[0032] Existing general speech recognition systems are not optimized specifically for the financial communications field, so when performing keyword detection on speech in this field, it is often difficult to accurately identify and understand these professional terms and keywords. This results in the inability to achieve the required high accuracy during the quality inspection process, which may miss important information or produce erroneous detection results.
[0033] In order to solve the technical problems existing in the related art, the embodiment of the present application provides a keyword detection method, by adopting the following methods: obtaining a voice signal to be detected; preprocessing the voice signal to be detected to generate a target voice signal; performing voice recognition on the target voice signal to obtain text information corresponding to the target voice signal; obtaining a pre-constructed vocabulary library, which includes multiple keywords, and the vocabulary library is constructed and generated based on knowledge of a specific field; matching the text information with the multiple keywords in the vocabulary library to obtain a detection result of the voice signal to be recognized. The technical solution of performing keyword detection on the voice signal to be detected based on the pre-constructed vocabulary library for the specific field can improve the accuracy of keyword detection in the specific field.
[0034] Figure 1 A flowchart of a keyword detection method provided by an embodiment of the present application is shown. Figure 1 As shown, the keyword detection method may specifically include the following steps:
[0035] 101, obtaining a voice signal to be detected.
[0036] 102, preprocessing the speech signal to be detected to generate a target speech signal.
[0037] In an embodiment of the present application, preprocessing the detected speech signal may include performing noise reduction processing, endpoint detection, pre-emphasis and other processing on the detected speech signal, so as to obtain a target speech signal with good quality and clear boundaries, so as to prepare for the subsequent speech recognition step and improve the accuracy of speech recognition.
[0038] Among them, when the voice signal to be detected is subjected to noise reduction processing, the voice signal to be detected can be first divided into short time frames (for example, 20-30ms) using techniques such as short-time Fourier transform, and its power spectrum density is calculated for each short time frame. Then, the power spectrum of the background noise can be estimated by statistically analyzing the power spectrum densities of multiple short time frames, such as calculating the average power spectrum density or the median power spectrum density. The characteristics of the noise can be determined using methods based on the statistical characteristics of the noise, such as noise mean estimation, noise variance estimation, etc. After determining the characteristics of the noise, the corresponding noise part can be subtracted from each frame of the voice signal, for example, a filter-based method or a model-based method can be used to eliminate the noise.
[0039] Endpoint detection may adopt energy detection method, zero-crossing rate detection method, double threshold method, etc., for example.
[0040] Pre-emphasis can be used to increase the high frequency part of the speech signal to be detected, so as to enhance the high frequency components of the speech signal, reduce the attenuation of the high frequency part, and improve the clarity and intelligibility of the speech signal. For example, a first-order high-pass filter can be used to process the speech signal to be detected, so as to perform pre-emphasis processing on the speech signal to be detected.
[0041] 103 , performing speech recognition on the target speech signal to obtain text information corresponding to the target speech signal.
[0042] In an embodiment of the present application, a speech recognition model may be used to perform speech recognition on a target speech signal. The speech recognition model may include a traditional model, a deep learning model, and the like.
[0043] Among them, the traditional model may include, for example, a hidden Markov model combined with a Gaussian mixture model; the deep learning model may include, for example, a convolutional neural network model, a long short-term memory network, a bidirectional long short-term memory network, etc.
[0044] When performing speech recognition on a target speech signal using a speech recognition model, feature extraction may be first performed on the target speech signal to obtain a feature vector suitable for model input, wherein the feature extraction may extract Mel-frequency cepstral coefficients or other deep features.
[0045] After the feature vector is extracted, it can be input into the speech recognition model, which outputs a probability distribution vector. Each element in the probability distribution vector can represent the probability of a possible character or word. Furthermore, the decoding algorithm can be used to obtain the path with the highest probability from the probability distribution vector, that is, the most likely text sequence, and output it as the text information corresponding to the target speech signal.
[0046] In an embodiment of the present application, the speech recognition model can be pre-trained and generated using an optimization algorithm such as stochastic gradient descent. During the training process, a sample speech signal can be input into the model, and the model outputs a predicted text sequence. Then, the loss function (such as cross entropy loss) between the predicted text and the real text is calculated, and the loss is back-propagated to each parameter of the model through the back-propagation algorithm. The model parameters are updated according to the optimization algorithm to gradually reduce the loss. The training process usually requires a large number of iterations until the performance of the model on the validation set is no longer significantly improved, that is, it reaches a convergence state.
[0047] 104, obtaining a pre-built vocabulary library, wherein the vocabulary library includes a plurality of keywords, and the vocabulary library is built based on knowledge in a specific field.
[0048] The specific field may include, for example, law, medicine, finance, computer science, etc. The field to which the vocabulary library belongs may be the same as the field to which the speech signal to be detected belongs.
[0049] In one embodiment of the present application, multiple keywords included in the vocabulary library can be used to perform quality inspection on the voice signal to be detected, that is, to detect whether the voice content of the voice signal to be detected contains keywords in the vocabulary library. These keywords can be some sensitive words.
[0050] When determining the keywords in the vocabulary, you can choose them based on specific quality inspection needs and industry standards. For example, you can determine the most representative and important keywords by working with domain experts, analyzing historical quality inspection data, and referring to relevant regulations and standards.
[0051] 105 , matching the text information with a plurality of keywords in the vocabulary library to obtain a detection result of the speech signal to be recognized.
[0052] By comparing the voice signal to be detected with these keywords, it is possible to effectively detect whether there are words in the voice content that may cause concern or require special treatment. For example, in certain quality inspection scenarios, words such as "unqualified", "serious defects" and "safety hazards" may be set as sensitive words. If the voice signal to be detected contains these sensitive words, it can promptly remind quality inspectors to conduct more in-depth inspections and treatments of related products or processes.
[0053] In some embodiments, the keyword detection method may further include:
[0054] Acquire domain-specific knowledge documents;
[0055] Perform text preprocessing on the knowledge document to obtain the target knowledge document;
[0056] Extract keywords from the target knowledge document to obtain multiple keywords;
[0057] Generate a vocabulary based on multiple keywords.
[0058] Among them, knowledge documents may include academic papers, technical reports, industry standards and other knowledge documents, which may contain rich domain-related knowledge.
[0059] Next, these knowledge documents may be subjected to text preprocessing. In one embodiment of the present application, this step may involve removing noise (such as punctuation marks, irrelevant formats, etc.), word segmentation, and data cleaning to obtain refined target knowledge documents in preparation for the next step of keyword extraction.
[0060] After the target knowledge document is prepared, keyword extraction can be performed through natural language processing technology, such as statistical analysis, machine learning or deep learning methods, to extract keywords that best represent the characteristics of the field from the document. These keywords are frequently used by experts in the field and are important for understanding the entire field of knowledge.
[0061] Finally, these extracted keywords can be used to generate a vocabulary. This vocabulary can be used in a variety of applications, such as information retrieval, text classification, semantic analysis, etc. It can improve the accuracy and efficiency of these applications because they are built on a comprehensive and accurate domain knowledge. In addition, this vocabulary can also help automatically detect and filter sensitive words to ensure that the content of communication and publication meets the standards and requirements of specific fields.
[0062] When generating a vocabulary database, the vocabulary database may first be structurally designed to determine the storage structure of the vocabulary database. For example, it may be stored in a database, a text file, an XML file, etc. The field structure of the vocabulary database may also be designed. The field structure may include fields such as the keyword itself, the frequency of occurrence, and related topics, thereby providing rich information for subsequent keyword matching.
[0063] After the vocabulary database is constructed, the extracted multiple keywords can be put into the database according to the structural design of the vocabulary database, that is, for each keyword, its relevant information is filled into the corresponding field.
[0064] In some embodiments, performing text preprocessing on a knowledge document to obtain a target knowledge document may be specifically implemented as follows:
[0065] Removing stop words from the knowledge document to obtain a first knowledge document;
[0066] The first knowledge document is segmented to obtain a target knowledge document.
[0067] Among them, stop words can refer to words that appear frequently in the text but contribute little to semantic expression, such as "de" (的), "shi" (是), "zai" (在), etc. Removing stop words can reduce the computational complexity of subsequent processing and improve the accuracy of keyword extraction.
[0068] After removing stop words from the knowledge document to obtain the first knowledge document, word segmentation processing can also be performed on the first knowledge document, so that continuous text can be segmented into individual words.
[0069] In some embodiments, extracting keywords from the target knowledge document to obtain multiple keywords can be specifically implemented as follows:
[0070] Count the occurrence frequency of each word in the target knowledge document;
[0071] Take the words with occurrence frequencies higher than the preset threshold as keywords.
[0072] In an embodiment of the present application, a preset frequency threshold can be set, and the words with occurrence frequencies higher than the threshold are taken as keywords. For example, if the number of times a word appears in the document exceeds a certain proportion of the total number of words in the document, it is taken as a keyword.
[0073] In another embodiment of the present application, the TF-IDF (Term Frequency-Inverse Document Frequency) method can also be used to extract keywords from the target knowledge document. This keyword extraction method can take into account the occurrence frequency (TF) of the word in the target document and the inverse document frequency (IDF). TF represents the frequency of a word in the target document, and IDF represents the rarity of a word in the target document set. The higher the TF-IDF value, the more important the word is in the current document and the rarer it is in the entire document set.
[0074] In another embodiment of the present application, a keyword extraction method based on the topic model can also be used. The topic model can discover the potential topics in the target document and extract keywords related to the topics.
[0075] In some embodiments, extracting keywords from the target knowledge document to obtain multiple keywords can be specifically implemented as follows:
[0076] Perform named entity recognition on the target knowledge document;
[0077] Take the named entities in the target knowledge document as keywords.
[0078] Named Entity Recognition (NER) is a natural language processing technology that can identify entities with specific meanings from text, such as names of people, places, organizations, time expressions, quantity expressions, etc. These entities usually carry key information in the text and are of great significance for understanding text content and mining knowledge.
[0079] Since these named entities often represent important concepts, events or participants in the field, using the named entities in the target knowledge document as keywords can ensure that the vocabulary is closer to the actual application scenario. For example, in the legal field, the identified entities may include the name of the legal document, the name of the historical case, specific legal clauses, etc.; in the medical field, they may include the name of the disease, the name of the drug, the treatment method, etc.
[0080] By incorporating these named entities into the vocabulary, the practicality and professionalism of the vocabulary in a specific field can be improved.
[0081] In some embodiments, the keyword detection method further includes:
[0082] Obtain sample speech signals in a specific field;
[0083] Perform speech recognition on the sample speech to obtain sample text information;
[0084] Perform keyword recognition on the sample text information to obtain at least one keyword;
[0085] Write at least one keyword into the vocabulary.
[0086] The sample voice signal may be, for example, a voice signal collected in an actual working environment.
[0087] The specific implementation method of performing speech recognition and keyword extraction on the sample speech signal can refer to the above-mentioned processing process of the speech signal to be detected, which will not be repeated here.
[0088] By collecting keywords from voice signals collected in an actual working environment, the keywords in the vocabulary library can be made more suitable for actual usage scenarios.
[0089] In some embodiments, matching the text information with a plurality of keywords in the vocabulary library to obtain the detection result of the speech signal to be recognized can be specifically implemented as follows:
[0090] Accurately matching the text information with multiple keywords in the vocabulary library to obtain a first matching result;
[0091] Perform fuzzy matching between the text information and multiple keywords in the vocabulary library to obtain the second matching result
[0092] A detection result is obtained based on the first matching result and the second matching result.
[0093] Exact matching can be achieved by comparing each word or phrase in the text information obtained through speech recognition with the keywords in the vocabulary library one by one. If they are exactly the same, it is considered an exact match. For example, if the text information is "the product surface is smooth" and the vocabulary library has the keyword "the product surface is smooth", it will be considered an exact match. After the match is successful, the keywords that have been successfully matched and their positions in the text information can be recorded. A data structure can be used to store this information, such as a list or a dictionary. For example, a dictionary can be created with the key being the keyword and the value being a list of positions in the text information.
[0094] If there is no exact match for the keyword, the first matching result is marked as empty.
[0095] Fuzzy matching refers to a matching method that allows a certain degree of similarity or uncertainty in the process of matching text information with a vocabulary library, rather than requiring complete and accurate consistency.
[0096] In the embodiments of the present application, fuzzy matching can be performed in the following manner:
[0097] Similarity calculation based on word vectors: Pre-trained word vector models (such as Word2Vec, GloVe, etc.) can be used to convert words in text information and keywords in the vocabulary into vector representations. Then the similarity between these vectors is calculated, usually using metrics such as cosine similarity or Euclidean distance. A similarity threshold is set, and when the similarity exceeds the threshold, it is considered a successful fuzzy match.
[0098] Edit distance calculation: Calculate the edit distance between the words in the text information and the keywords in the vocabulary, that is, the minimum number of editing operations (such as inserting, deleting, and replacing characters) required to convert from one word to another. Set an edit distance threshold. When the edit distance is less than the threshold, it is considered a successful fuzzy match.
[0099] Matching based on semantic networks: If semantic network resources are available, the semantic network can be used to determine the semantic relationship between words in the text information and keywords in the vocabulary. For example, if two words are close in the semantic network or can be connected through a certain path, they can be considered semantically related, and the fuzzy match is determined to be successful.
[0100] For successful fuzzy matching, record the relevant keywords, similarity values (or metrics such as edit distance), and positions in the text information. Data structures can also be used to store this information.
[0101] If there are no keywords that match successfully through fuzzy matching, mark the second matching result as empty.
[0102] If both the first matching result and the second matching result are not empty, they can be combined to form a comprehensive list of matching results. This list can be sorted according to the importance or similarity of the matches for subsequent analysis and processing. For example, keywords that match exactly can be listed first, followed by keywords that match through fuzzy matching in descending order of similarity.
[0103] Based on the integrated matching results, the final detection result can be generated. The detection result can be a report containing information such as the matching keywords, the type of match (exact match or fuzzy match), the similarity value (if it is a fuzzy match), and the position in the text information.
[0104] In the embodiments of this application, the final detection result can also include the original text information, which can be used for manual review. Through manual review, it can be determined whether there are words in the text information that do not exist in the keywords but can be recognized as keywords. If there are such words in the text information, they can be updated to the vocabulary as keywords.
[0105] The keyword recognition method provided by the embodiments of this application will be described below in combination with specific application scenarios. It should be noted that the following content is only used to illustrate the implementation method of this application in one embodiment and does not make any improper limitation to this application.
[0106] Suppose a customer service center of an e-commerce company wants to detect whether a specific keyword is involved in the calls between customer service and customers. First, obtain the voice signal to be detected between the customer service and the customer. Perform preprocessing such as denoising and enhancement on this voice signal to be detected to generate a target voice signal. Then perform speech recognition on the target voice signal to obtain the corresponding text information.
[0107] The company has pre-constructed a vocabulary based on e-commerce domain knowledge. This vocabulary can be obtained by acquiring knowledge documents in the e-commerce domain, such as product introductions, after-sales policies, etc.; removing stop words like "de" (的), "le" (了), etc. from these knowledge documents to obtain the first knowledge document; performing word segmentation on the first knowledge document, counting the occurrence frequency of each word, and taking the words with an occurrence frequency higher than a preset threshold as keywords, or performing named entity recognition on the first knowledge document and taking the named entities therein as keywords, and generating a vocabulary based on these keywords. At the same time, sample voice signals in the e-commerce domain are also obtained, speech recognition and keyword recognition are performed on them, and the recognized keywords are written into the vocabulary.
[0108] Next, the obtained text information is matched with multiple keywords in the vocabulary library. First, an exact match is performed. For example, if a customer mentions "return goods within seven days without any reason", it can be directly and accurately matched to this keyword in the vocabulary library, and the first matching result is obtained. Then a fuzzy match is performed. For example, if a customer asks "Can I return goods within seven days?", after fuzzy matching, it can also be associated with the keyword "return goods within seven days without any reason", and the second matching result is obtained.
[0109] Finally, based on the first matching result and the second matching result, the detection result of the voice signal to be detected is obtained comprehensively. For example, the number and frequency of the keyword "seven-day no-reason return" in the conversation between the customer service and the customer within a certain period of time are counted, so as to evaluate the service quality of the customer service and the main concerns of the customer.
[0110] Figure 2 A block diagram of a keyword detection device provided by an embodiment of the present application is shown as follows: Figure 2 As shown, the keyword detection device may specifically include:
[0111] The signal acquisition module 201 is used to acquire the voice signal to be detected;
[0112] The signal preprocessing module 202 is used to preprocess the speech signal to be detected to generate a target speech signal;
[0113] The speech recognition module 203 is used to perform speech recognition on the target speech signal to obtain text information corresponding to the target speech signal;
[0114] A vocabulary library acquisition module 204 is used to acquire a pre-built vocabulary library, wherein the vocabulary library includes a plurality of keywords and is generated based on knowledge in a specific field;
[0115] The keyword matching module 205 is used to match the text information with a plurality of keywords in the vocabulary library to obtain a detection result of the speech signal to be recognized.
[0116] In some embodiments, the keyword detection device further includes:
[0117] Document acquisition module, used to obtain knowledge documents in specific fields;
[0118] A text preprocessing module is used to perform text preprocessing on knowledge documents to obtain target knowledge documents;
[0119] A keyword extraction module is used to extract keywords from the target knowledge document to obtain multiple keywords;
[0120] The vocabulary library building module is used to generate a vocabulary library based on multiple keywords.
[0121] In some embodiments, the text preprocessing module is specifically used to:
[0122] Removing stop words from the knowledge document to obtain a first knowledge document;
[0123] The first knowledge document is segmented to obtain a target knowledge document.
[0124] In some embodiments, the keyword extraction module may be specifically used for:
[0125] Count the frequency of occurrence of each word in the target knowledge document;
[0126] Words with a frequency higher than a preset threshold are used as keywords.
[0127] In some embodiments, the keyword extraction module may be specifically used for:
[0128] Perform named entity recognition on the target knowledge document;
[0129] The named entities in the target knowledge document are used as keywords.
[0130] In some embodiments, the keyword detection device further includes:
[0131] A sample signal acquisition module is used to acquire sample speech signals in a specific field;
[0132] The sample speech recognition module is used to perform speech recognition on the sample speech to obtain sample text information;
[0133] A sample keyword recognition module is used to perform keyword recognition on sample text information to obtain at least one keyword;
[0134] The keyword writing module is used to write at least one keyword into the vocabulary library.
[0135] In some embodiments, the keyword matching module 205 may be specifically used to:
[0136] Accurately matching the text information with multiple keywords in the vocabulary library to obtain a first matching result;
[0137] Perform fuzzy matching between the text information and multiple keywords in the vocabulary library to obtain the second matching result
[0138] A detection result is obtained based on the first matching result and the second matching result.
[0139] Figure 2 The keyword detection device can perform Figure 1The implementation principle and technical effect of the keyword detection method described in the embodiment are not described in detail. The specific way in which each module and unit performs operations in the keyword detection device in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.
[0140] In a possible design, the keyword detection device provided in the embodiment of the present application can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 301 and a processing component 302;
[0141] The storage component 301 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 302 to implement the keyword detection method provided in the embodiment of the present application.
[0142] Of course, the computing device may also include other components, such as input / output interfaces, communication components, etc. The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc. The communication component is configured to facilitate wired or wireless communication between the computing device and other devices.
[0143] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0144] When the computing device is a physical device, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device.
[0145] The embodiment of the present application further provides a computer-readable storage medium storing a computer program, which can implement the keyword detection method provided in the embodiment of the present application when executed by a computer.
[0146] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the keyword detection method provided in the embodiment of the present application when executed by a computer.
[0147] The processing components in the above corresponding embodiments may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing components may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0148] The storage component is configured to store various types of data to support operations in the device. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0150] 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.
[0151] 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.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application 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 application.
Claims
1. A keyword detection method, characterized in that: include: Acquire a voice signal to be detected; Preprocessing the speech signal to be detected to generate a target speech signal; Performing speech recognition on the target speech signal to obtain text information corresponding to the target speech signal; Acquire a pre-built vocabulary library, wherein the vocabulary library includes a plurality of keywords, and the vocabulary library is built based on knowledge in a specific field; The text information is matched with the multiple keywords in the vocabulary library to obtain a detection result of the speech signal to be recognized.
2. The method according to claim 1, characterized in that The method further comprises: Acquire knowledge documents in the specific field; Performing text preprocessing on the knowledge document to obtain a target knowledge document; Extracting keywords from the target knowledge document to obtain the multiple keywords; The vocabulary library is generated based on the plurality of keywords.
3. The method according to claim 2, characterized in that The performing text preprocessing on the knowledge document to obtain the target knowledge document comprises: removing stop words from the knowledge document to obtain a first knowledge document; The first knowledge document is subjected to word segmentation processing to obtain the target knowledge document.
4. The method according to claim 3, characterized in that The keyword extraction of the target knowledge document to obtain the multiple keywords includes: Counting the frequency of occurrence of each word in the target knowledge document; Words with a frequency higher than a preset threshold are used as keywords.
5. The method according to claim 3, characterized in that: The keyword extraction of the target knowledge document to obtain the multiple keywords includes: Performing named entity recognition on the target knowledge document; The named entities in the target knowledge document are used as keywords.
6. The method according to claim 2, characterized in that The method further comprises: Acquiring a sample speech signal in the specific field; Performing speech recognition on the sample speech to obtain sample text information; Performing keyword recognition on the sample text information to obtain at least one keyword; The at least one keyword is written into the vocabulary library.
7. The method according to claim 1, characterized in that The matching of the text information with the multiple keywords in the vocabulary library to obtain the detection result of the speech signal to be recognized includes: Accurately matching the text information with the multiple keywords in the vocabulary library to obtain a first matching result; The text information is fuzzily matched with the multiple keywords in the vocabulary library to obtain a second matching result. The detection result is obtained based on the first matching result and the second matching result.
8. A computing device, characterized in that including a processing component and a storage component; The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the keyword detection method according to any one of claims 1 to 7.
9. A computer storage medium, characterized in that A computer program is stored, and when the computer program is executed by a computer, the keyword detection method according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The computer program product comprises computer program code, and when the computer program code is executed by a computer, the keyword detection method according to any one of claims 1 to 7 is implemented.