A machine learning based monaural character recognition method and system
By using machine learning-based methods to build different scenario models, the system can identify mono recordings, solving the problem of inaccurate role identification in mono recordings. This enables accurate identification of agents and customers, improving the accuracy of business logic processing.
Patent Information
- Application Number
- CN202210318376.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-10-29
- Filing Date
- 2022-03-29
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-03-29
Smart Images

Figure CN114927129B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of speech recognition, in particular to a single-channel role recognition method and system based on machine learning. BACKGROUND
[0002] ASR (Automatic Speech Recognition Technology) is a technology that converts human language into text, and the concept of role recognition is involved in the recognition process. If it is a double-channel, it can support accurate role separation for recognition. The audio recordings of A and B roles are converted into text. If it is a single-channel, the roles can be split by technology according to the difference in tone, but the result of the split single-channel cannot distinguish between business roles and customer roles, which affects business quality inspection and other aspects when the business logic is processed. SUMMARY
[0003] The main purpose of the present application is to overcome the above-mentioned defects in the prior art, and to provide a single-channel role recognition method based on machine learning. Different models are established for different scenes, and the model recognition processing is performed on the recognition result of the single-channel audio, so that the agent side and the customer side can be accurately recognized.
[0004] The present application adopts the following technical scheme:
[0005] A single-channel role recognition method based on machine learning comprises the following steps:
[0006] Real-time automatic speech recognition is used to recognize single-channel voice data to obtain text data corresponding to single-role voice data;
[0007] Text data is subjected to text segmentation and keyword extraction to obtain a feature vector. The keywords include at least identity keywords, purpose keywords and appeal keywords;
[0008] The voice feature vector is input into different role recognition models, including a customer service scene model, a post-loan scene model and an electric sales scene model;
[0009] The agent side and the customer side are identified by the model.
[0010] Specifically, the role recognition model is improved by supervised learning, which specifically includes:
[0011] Text matching and regular expression are used for the application of the role recognition model to obtain the probability score of the customer side and the agent side, and the maximum probability score is taken;
[0012] The data of role replacement after manual review is collected for manual tagging;
[0013] After labeling, the data is input into a model to realize the perfection of the role recognition model.
[0014] Specifically, real-time automatic speech recognition is used to recognize monaural voice data, specifically including:
[0015] The waveform sound of the voice input is obtained, and the sound is segmented and framed by a moving window function to obtain different sound frame segments,
[0016] The waveform is converted into an observation sequence matrix by extracting the mel frequency cepstrum coefficient feature, and the observation sequence matrix is input into a pre-trained speech recognition model to obtain a possible text set, and a global optimal path is searched from the possible text set to convert the matrix into a final text.
[0017] Specifically, text data is subjected to text segmentation and keyword extraction, specifically including:
[0018] Text segmentation is performed based on a prefix dictionary to generate a directed acyclic graph composed of all possible wordings of the sentence text, and a maximum probability path is searched by dynamic programming to obtain a maximum segmentation combination based on word frequency; for words not included in the prefix dictionary, the words are predicted by using a hidden Markov model, and based on the jieba segmentation algorithm, the text content is subjected to segmentation processing in combination with a pre-established role recognition dictionary, and a segmentation result is obtained according to the maximum segmentation combination;
[0019] Keyword extraction is performed according to the segmentation result to calculate the term frequency-inverse document frequency of the words, and the term frequency-inverse document frequency is combined with a pre-established weight list of the words to extract words with a large weight proportion to obtain keywords to form a feature vector.
[0020] Another aspect of the application also includes a monaural role recognition system based on machine learning, comprising:
[0021] The speech recognition unit uses real-time automatic speech recognition to recognize monaural voice data to obtain text data corresponding to single-role voice;
[0022] The feature vector acquisition unit performs text segmentation and keyword extraction on the text data to obtain a feature vector; the keywords at least include an identity keyword, a purpose keyword and a demand keyword;
[0023] The model input unit inputs the voice feature vector into different role recognition models, and the role recognition models include a customer service scene model, a post-loan scene model and an electric sales scene model;
[0024] The role recognition unit identifies the agent side and the customer side through the model.
[0025] Specifically, the model perfecting unit perfects the role recognition model through supervised learning, specifically including:
[0026] The application of the character recognition model using word matching and regular expression is used to obtain the probability scores of the customer side and the agent side, and the maximum probability score is taken;
[0027] The data of the character replacement after manual review is collected for manual tagging;
[0028] After the tagging, the data is input into the model to realize the improvement of the character recognition model.
[0029] Specifically, in the speech recognition unit, real-time automatic speech recognition is performed on the monophonic speech data, and specifically includes:
[0030] The waveform sound of the speech input is obtained, and the sound is segmented and framed by a moving window function to obtain different sound frame segments,
[0031] The waveform is converted into an observation sequence matrix by extracting the mel frequency cepstral coefficient feature, the speech recognition model pre-trained is input, a possible text set is obtained, a global optimal path is searched from the text set, and the matrix is converted into the final text.
[0032] Specifically, in the feature vector acquisition unit, the text data is subjected to text segmentation and keyword extraction, and specifically includes:
[0033] Text segmentation: based on the prefix dictionary, a directed acyclic graph composed of all possible wordings of the sentence text is generated, the maximum probability path is searched by dynamic programming, and the maximum segmentation combination based on the word frequency is obtained; for the words not contained in the prefix dictionary, the words are predicted by using the hidden Markov model, and based on the jieba segmentation algorithm, the text content is subjected to segmentation processing in combination with the pre-established character recognition dictionary, and the segmentation result is obtained according to the maximum segmentation combination;
[0034] Keyword extraction: the word frequency-inverse document frequency of the words is calculated according to the segmentation result, the word frequency-inverse document frequency is combined with the pre-established weight list of the words, the words with large weight proportion are extracted, the keywords are obtained, and the feature vector is composed.
[0035] In another aspect of the present application, a monophonic character recognition device based on machine learning is provided, comprising:
[0036] at least one processor; and
[0037] a memory in communication connection with the at least one processor; wherein
[0038] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0039] The single-channel voice data is recognized by real-time automatic speech recognition to obtain text data corresponding to single-role voice;
[0040] Text segmentation and keyword extraction are performed on the text data to obtain a feature vector; the keywords at least include an identity keyword, a purpose keyword and a solicitation keyword;
[0041] The voice feature vector is input into different role recognition models, and the role recognition models include a customer service scene model, a post-loan scene model and an electric sales scene model;
[0042] The agent side and the customer side are identified by the models.
[0043] In another aspect, the application provides a computer readable storage medium having computer readable instructions stored thereon, the computer readable instructions being executable by a processor to implement the single-channel role recognition method based on machine learning.
[0044] Compared with the prior art, the application has the following beneficial effects:
[0045] The application provides a single-channel role recognition method based on machine learning, which recognizes single-channel voice data by real-time automatic speech recognition to obtain text data corresponding to single-role voice; performs text segmentation and keyword extraction on the text data to obtain a feature vector; the keywords at least include an identity keyword, a purpose keyword and a solicitation keyword; the voice feature vector is input into different role recognition models, and the role recognition models include a customer service scene model, a post-loan scene model and an electric sales scene model; the agent side and the customer side are identified by the models. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 A single-channel role recognition method based on machine learning is provided for the embodiment of the application;
[0047] Figure 2 A single-channel role recognition system structure diagram based on machine learning is provided for the embodiment of the application;
[0048] Figure 3 An embodiment schematic diagram of an electronic device is provided for the embodiment of the application;
[0049] Figure 4 An embodiment schematic diagram of a computer readable storage medium is provided for the embodiment of the application.
[0050] The application will be further described in detail below in combination with the drawings and specific embodiments. DETAILED DESCRIPTION
[0051] The application provides a single-channel role recognition method based on machine learning, which can establish different models for different scenes, recognize the model of the single-channel recording result, and accurately recognize the agent and the customer side.
[0052] As Figure 1 A flowchart of a single-channel role recognition method based on machine learning is provided for the embodiment of the application, which comprises the following steps:
[0053] S101: Real-time automatic speech recognition is used to recognize the single-channel voice data to obtain text data corresponding to the single role voice;
[0054] First, the model required for speech recognition is obtained, that is, a large amount of pre-acquired voice input is preprocessed, the features of the voice are extracted, and the model required for speech recognition is established on this basis (this is the training process). Secondly, in the new speech recognition process of the computer, the voice model stored in the computer is compared with the processed voice features according to the model of speech recognition, a series of optimal templates matched with the input voice are found out according to a certain search and matching strategy, and then the recognition result of the computer can be given according to the definition of the template (this is the recognition process). The training of the voice is signal processing and knowledge mining on the pre-collected voice and language to obtain the "acoustic model" and "language model" required for voice recognition, and this process is usually completed offline; the recognition process is automatic recognition of the real-time voice of the user, and this process is completed online. The recognition process is divided into "front end" and "back end" two modules, the "front end" functions are endpoint detection, noise reduction, feature extraction, etc., and the "back end" functions are statistical pattern recognition (also known as "decoding") of the feature vector of the user voice using the trained "acoustic model" and "language model", to obtain the text information contained in the voice.
[0055] Specifically, the real-time automatic speech recognition recognizes the single-channel voice data, which specifically comprises:
[0056] The waveform sound of the voice input is obtained, and the sound is segmented and framed by a moving window function to obtain different sound frame segments,
[0057] The waveform is converted into an observation sequence matrix by extracting the mel-frequency cepstral coefficient feature, the voice recognition model pre-trained is input, a possible text set is obtained, a global optimal path is found from the text set, and the matrix is converted into the final text.
[0058] S102: text data is performed text segmentation, keyword extraction, and feature vectors are obtained; the keywords at least include identity keywords, purpose keywords and appeal keywords;
[0059] Specifically, text data is performed text segmentation and keyword extraction, specifically including:
[0060] Text segmentation, based on prefix dictionary scanning, generating a directed acyclic graph composed of all possible wordings of sentence text, finding the maximum probability path through dynamic programming to obtain the maximum segmentation combination based on word frequency; for words not contained in the prefix dictionary, using the hidden Markov model to predict the words, and on the basis of the jieba segmentation algorithm, combining the pre-established role recognition dictionary, the text content is segmented and processed, and the segmentation result is obtained according to the maximum segmentation combination;
[0061] Keyword extraction, according to the segmentation result, the word frequency-inverse document frequency is calculated, the word frequency-inverse document frequency is combined with the pre-established weight list of words, the words with large weight proportion are extracted, the keywords are obtained, and the feature vectors are composed.
[0062] The keywords at least include identity keywords, purpose keywords and appeal keywords.
[0063] S103: input the voice feature vector into different role recognition models, the role recognition models include customer service scene model, post-loan scene model and electric sales scene model;
[0064] Scene 1:
[0065] Customer service system scene, the business scene of the customer service system is to solve the user's call problem, and in the dialogue with the user, there is a high probability of, such as 'Hello, xxx customer service for you', which represents the identity, such as 'What is your ID number', which solves the problem, such as 'I am querying for you, please wait';
[0066] Scene 2:
[0067] Post-loan system scene, the business scene of the post-loan system is a system that exists to solve the company's collection scene, and in the dialogue, there is a high probability of, such as 'This is xxx company', which represents the identity, such as 'You owe xxx yuan', which expresses the purpose, and 'You need to pay off before xx point', which is influenced by 'Otherwise it will affect personal credit';
[0068] Scene 3:
[0069] Electric sales system scene, the business scene of the electric sales system is used by the user telephone sales, and in the dialogue, there is a high probability of, such as 'This is xxx company', which represents the identity, and 'product function', which expresses the purpose;
[0070] It can be seen that the scene has a description of identity, purpose and appeal; therefore, when performing semantic analysis, the identity keyword, the purpose keyword and the appeal keyword.
[0071] S104: Identify the agent side and the customer side through the model.
[0072] Specifically, the role recognition model is perfected through supervised learning, specifically including:
[0073] The role recognition model is applied by adopting character matching and regular expression, and the probability score of the customer side and the agent side is obtained, and the maximum probability score is taken;
[0074] The data of role replacement after manual review is collected for manual tagging;
[0075] After tagging, the data is input into the model to realize the perfection of the role recognition model.
[0076] As Figure 2 the embodiment of the application also includes a single-channel role recognition system based on machine learning, comprising:
[0077] The speech recognition unit 201: using real-time automatic speech recognition to recognize the single-channel voice data to obtain the text data corresponding to the single role voice;
[0078] Specifically, in the speech recognition unit, the real-time automatic speech recognition recognizes the single-channel voice data, specifically including:
[0079] Obtain the waveform sound of the voice input, and cut the sound into different sound frame segments through the moving window function,
[0080] By extracting the mel-frequency cepstral coefficient feature, the waveform is converted into an observation sequence matrix, which is input into the pre-trained speech recognition model to obtain a possible text set, from which the global optimal path is found, and the matrix is converted into the final text.
[0081] The feature vector acquisition unit 202: text segmentation and keyword extraction are performed on the text data to obtain a feature vector; the keywords at least include an identity keyword, a purpose keyword and a claim keyword;
[0082] Specifically, in the feature vector acquisition unit, text segmentation and keyword extraction are performed on the text data, specifically including:
[0083] Text segmentation, based on prefix dictionary scanning, generates a directed acyclic graph composed of all possible wordings of the sentence text, finds the maximum probability path through dynamic programming, and obtains the maximum segmentation combination based on word frequency; for words not contained in the prefix dictionary, use the Hidden Markov Model to predict the words, and on the basis of the Jieba segmentation algorithm, combine the pre-established role recognition dictionary to perform text segmentation processing, and according to the maximum segmentation combination, obtain the segmentation result;
[0084] Keyword extraction, calculate the term frequency-inverse document frequency of the words according to the segmentation result, combine the term frequency-inverse document frequency with the pre-established weight list of the words, extract the words with large weight proportion, obtain the keywords, and form the feature vector.
[0085] Model input unit 203: input to different role recognition models according to the voice feature vector, the role recognition model includes customer service scene model, post-loan scene model, and electric sales scene model;
[0086] Scene 1:
[0087] Customer service system scene, the business scene of the customer service system is to solve the user's call problem, and in the dialogue with the user, there are high probability of 'Hello, XXX customer service for you', 'Your ID number is XXX', and 'I am querying for you, please wait';
[0088] Scene 2:
[0089] Post-loan system scene, the business scene of the post-loan system is a system that exists to solve the company's collection scene, and in the dialogue, there is a high probability of 'This is XXX company', 'You owe XXX yuan', and 'You need to pay off before XX o'clock', and 'Otherwise it will affect personal credit';
[0090] Scene 3:
[0091] Electric sales system scene, the business scene of the electric sales system is used by the user for telephone sales, and in the dialogue, there is a high probability of 'This is XXX company' and 'product function';
[0092] As can be seen, the scenes all describe identity, purpose and appeal; therefore, in semantic analysis, identity keywords, purpose keywords and appeal keywords.
[0093] Role recognition unit 204: identifies the agent side and the customer side through the model.
[0094] Specifically, it further includes a model improvement unit, which improves the role recognition model through supervised learning, specifically including:
[0095] Adopt character recognition model application of literal matching and regular expression, obtain probability score of customer party and sit party, take maximum probability score;
[0096] Collect data of role replacement after artificial re-inspection for artificial marking;
[0097] After marking, data is entered into a model, and the role recognition model is perfected.
[0098] As Figure 3 shown, an electronic device 300 is provided, which includes a memory 310, a processor 320, and a computer program 311 stored in the memory 320 and executable on the processor 320, and the processor 320 implements a single-channel role recognition method based on machine learning when executing the computer program 311.
[0099] In the specific implementation process, the processor 320 can implement Figure 1 any of the embodiments of the corresponding embodiments.
[0100] Since the electronic device introduced in the embodiment is a device used to implement the data processing apparatus in the embodiment, based on the method introduced in the embodiment, those skilled in the art can understand the specific implementation of the electronic device and its various forms, so the electronic device how to implement the method in the embodiment will not be introduced in detail, as long as the device used by those skilled in the art to implement the method in the embodiment belongs to the scope of the present application.
[0101] Please refer to Figure 4 , Figure 4 an embodiment of a computer readable storage medium provided in the embodiment.
[0102] As Figure 4 shown, the embodiment provides a computer readable storage medium 400, which stores a computer program 411, and the computer program 411 is executed by a processor to implement a single-channel role recognition method based on machine learning.
[0103] In the specific implementation process, the computer program 411 can implement Figure 1 any of the embodiments of the corresponding embodiments.
[0104] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0105] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, a system or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code thereon for use by or in connection with an instruction execution system. For the purposes of this description, a computer-usable or computer readable storage medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
[0106] The above merely provides the specific implementation of the present application, but the design concept of the present application is not limited thereto, and any non-essential change to the present application by using the concept should be regarded as the infringement of the protection scope of the present application.
Claims
1. A method for monaural character recognition based on machine learning, characterized in that, The method comprises the following steps: Single-channel voice data is recognized by real-time automatic speech recognition to obtain text data corresponding to single-role voice; Text data is tokenized based on business scenarios including customer service scenarios, post-loan scenarios and electric sales scenarios, and identity keywords, purpose keywords and appeal keywords are extracted to obtain a feature vector; The feature vector is input into a role recognition model matched with the business scenarios, and the role recognition model includes a customer service scenario model, a post-loan scenario model and an electric sales scenario model; The role recognition model is used to identify the agent side and the customer side; Text data is tokenized based on business scenarios including customer service scenarios, post-loan scenarios and electric sales scenarios, and identity keywords, purpose keywords and appeal keywords are extracted to obtain a feature vector, specifically including: Text tokenization: based on a prefix dictionary, a directed acyclic graph composed of all possible word combinations of a sentence text is generated, the maximum probability path is found by dynamic programming, and the maximum segmentation combination based on word frequency is obtained; for words not included in the prefix dictionary, an HMM model is used to predict the words, and based on the Jieba tokenization algorithm, the text content is tokenized by combining a pre-established role recognition dictionary, and the tokenization result is obtained according to the maximum segmentation combination; Keyword extraction: the term frequency-inverse document frequency of the words is calculated based on the tokenization result, the term frequency-inverse document frequency is combined with a pre-established weight list of the words, the words with a large weight proportion are extracted, and the keywords are obtained to form a feature vector; The single-channel role recognition method based on machine learning further comprises improving the role recognition model through supervised learning, specifically including: The role recognition model is applied by using character matching and regular expressions to obtain probability scores of the customer side and the agent side, and the maximum probability score is taken; Data of role replacement after manual review is collected for manual tagging; After tagging, the data is input into the model to improve the role recognition model; Real-time automatic speech recognition is used to recognize single-channel voice data, specifically including: Obtaining waveform sound of voice input, and cutting and framing the sound by using a moving window function to obtain different sound frame segments, Converting the waveform into an observation sequence matrix by extracting mel-frequency cepstral coefficient features, inputting the matrix into a pre-trained speech recognition model to obtain a possible text set, finding a global optimal path from the text set, and converting the matrix into a final text.
2. A machine learning based monaural character recognition system, characterized by, It comprises: A speech recognition unit: single-channel voice data is recognized by real-time automatic speech recognition to obtain text data corresponding to single-role voice; In the speech recognition unit, real-time automatic speech recognition is used to recognize single-channel voice data, specifically including: Obtaining waveform sound of voice input, and cutting and framing the sound by using a moving window function to obtain different sound frame segments, Converting the waveform into an observation sequence matrix by extracting mel-frequency cepstral coefficient features, inputting the matrix into a pre-trained speech recognition model to obtain a possible text set, finding a global optimal path from the text set, and converting the matrix into a final text. The feature vector acquisition unit acquires a feature vector by performing text segmentation on text data based on a business scenario including a customer service scenario, a post-loan scenario, and an electric sales scenario, and extracting an identity keyword, a purpose keyword, and a claim keyword. The model input unit inputs the feature vector into a role recognition model matched with the business scenario, and the role recognition model includes a customer service scenario model, a post-loan scenario model, and an electric sales scenario model. The role recognition unit identifies the agent side and the customer side through the role recognition model. The feature vector acquisition unit acquires a feature vector by performing text segmentation on text data based on a business scenario including a customer service scenario, a post-loan scenario, and an electric sales scenario, and extracting an identity keyword, a purpose keyword, and a claim keyword. The model input unit inputs the feature vector into a role recognition model matched with the business scenario, and the role recognition model includes a customer service scenario model, a post-loan scenario model, and an electric sales scenario model. The role recognition unit identifies the agent side and the customer side through the role recognition model. The feature vector acquisition unit acquires a feature vector by performing text segmentation on text data based on a business scenario including a customer service scenario, a post-loan scenario, and an electric sales scenario, and extracting an identity keyword, a purpose keyword, and a claim keyword. Text segmentation: based on a prefix dictionary, a directed acyclic graph composed of all possible word combinations of sentence text is generated, and the maximum probability path is found through dynamic programming to obtain the maximum segmentation combination based on word frequency. For words not included in the prefix dictionary, an HMM model is used to predict the words, and based on the Jieba segmentation algorithm, the text content is segmented and processed in combination with a pre-established role recognition dictionary. According to the maximum segmentation combination, the segmentation result is obtained. Keyword extraction: calculate the word frequency-inverse document frequency of the segmentation result, combine the word frequency-inverse document frequency with the pre-established word weight list, extract the words with large weight proportion, obtain the keywords, and form the feature vector. The model improvement unit improves the role recognition model through supervised learning, specifically including: Applying the role recognition model using text matching and regular expressions to obtain the probability score of the customer side and the agent side, and taking the maximum probability score. Collecting data for role replacement after manual review for manual labeling. After labeling, the data is input into the model to improve the role recognition model.
3. A single-channel role recognition device based on machine learning, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of claim 1.
4. A computer-readable storage medium having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method of claim 1.
Citation Information
Patent Citations
Model generation method, voiceprint recognition method and corresponding device
CN110853654A
Voice role segmentation method and device, computer equipment and storage medium
CN113192516A