Voice quality inspection method and device, electronic equipment and computer readable storage medium
By performing text conversion, semantic division and text fusion of dialogue speech in voice quality inspection technology, the problem of difficulty in understanding complex dialogue in the existing technology is solved, and more efficient and accurate voice quality inspection is achieved.
Patent Information
- Application Number
- CN202411630454.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The existing voice quality inspection technology is difficult to deeply understand the dialogue content in complex dialogue voice, resulting in a lot of room for improvement in the accuracy of voice quality inspection.
By converting the target dialogue speech into dialogue text, semantic division is performed to obtain semantic blocks and categories, combining knowledge graphs and semantic sentence databases for text fusion, and finally quality inspection is performed to improve the accuracy of speech quality inspection.
It achieves in-depth understanding and analysis of complex dialogues, improves the efficiency and accuracy of voice quality inspection, and can more accurately evaluate the rationality of the business provider's answers.
Smart Images

Figure CN119517029A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, is applicable to the field of financial technology, and in particular to a voice quality inspection method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] Voice quality inspection technology is a technology that detects the quality of voice data. In the field of financial technology, it is often necessary to evaluate the rationality of the service provider's answer based on the voice data of the conversation between the customer and the service provider. For example, in the voice quality inspection of bank customer service conversations in the insurance industry, evaluating the rationality of customer service answers based on the conversation voice is helpful in making improvement suggestions.
[0003] Existing speech quality inspection technologies rely on keyword matching and basic sentiment analysis, which makes it difficult to deeply understand the conversation content in complex conversational speech, resulting in much room for improvement in the accuracy of speech quality inspection.
[0004] Therefore, how to provide a voice quality inspection method that can improve the accuracy of voice quality inspection has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a speech quality inspection method and device, an electronic device, and a computer-readable storage medium, which can improve the accuracy of speech quality inspection.
[0006] To achieve the above object, a first aspect of an embodiment of the present application provides a speech quality inspection method, the method comprising:
[0007] Obtain target conversation voice;
[0008] Converting the target conversation speech into text to obtain a target conversation text;
[0009] Semantically dividing the target dialogue text to obtain target semantic blocks and semantic block categories; wherein the semantic block category represents the category to which the target semantic block belongs;
[0010] According to the target semantic block, information is searched on a preset knowledge graph to obtain entity triple text;
[0011] Reading sentences from a preset semantic sentence database according to the semantic block category to obtain standard semantic sentences;
[0012] Perform text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain a target quality inspection prompt text;
[0013] A quality inspection is performed on the target quality inspection prompt text to obtain a speech quality inspection result; wherein the speech quality inspection result is used to indicate whether the target dialogue speech quality inspection is qualified or unqualified.
[0014] In some embodiments, the semantic segmentation of the target dialogue text to obtain target semantic blocks and semantic block categories includes:
[0015] Performing keyword detection on the target conversation text to obtain target keywords;
[0016] Generate a target semantic block and a semantic block category according to the target keyword; wherein the target semantic block is empty;
[0017] Taking a sentence containing the target keyword in the target dialogue text as a first candidate sentence, and adding the first candidate sentence to the target semantic block;
[0018] Context extraction is performed on sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences, and the second candidate sentences are added to the target semantic block.
[0019] In some embodiments, performing context extraction on sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences includes:
[0020] Determine a sentence in the target dialogue text that is adjacent to the first candidate sentence and before the first candidate sentence as a target question sentence;
[0021] Performing question-answer pair recognition on the target question sentence and the first candidate sentence to obtain a first question-answer pair recognition category;
[0022] If the first question-answer pair recognition category indicates that the target question sentence and the first candidate sentence are a question-answer pair, determining the target question sentence as the second candidate sentence;
[0023] Determine a sentence in the target dialogue text that is adjacent to the first candidate sentence and follows the first candidate sentence as a target answer sentence;
[0024] Performing question-answer pair recognition on the first candidate sentence and the target answer sentence to obtain a second question-answer pair recognition category;
[0025] If the second question-answer pair recognition category indicates that the first candidate sentence and the target answer sentence are a question-answer pair, the target answer sentence is determined as the second candidate sentence.
[0026] In some embodiments, before performing text fusion according to the semantic block category, the standard semantic sentence, the target semantic block, and the entity triple text to obtain the target quality inspection prompt text, the method further includes:
[0027] Calculate the similarity between the standard semantic sentence and each sentence in the target semantic block to obtain sentence similarity;
[0028] Each sentence in the target semantic block is filtered according to the sentence similarity, and then the target semantic block is updated.
[0029] In some embodiments, the step of performing quality inspection on the target quality inspection prompt text to obtain a speech quality inspection result includes:
[0030] Performing text quality inspection on the target quality inspection prompt text through a pre-trained large language model to obtain a semantic block quality inspection result corresponding to the target semantic block; wherein the semantic block quality inspection result is used to indicate whether the target semantic block has passed or failed the quality inspection;
[0031] The speech quality inspection result is determined according to the semantic block quality inspection result corresponding to the target semantic block.
[0032] In some embodiments, searching for information on a preset knowledge graph according to each sentence in the target semantic block to obtain entity triple text includes:
[0033] Performing entity recognition on each sentence of the target semantic block to obtain a target entity;
[0034] Perform semantic entity extraction on the knowledge graph according to the target entity and the semantic block category to obtain a complete entity name and an entity category, wherein the entity category is the same as the semantic block category;
[0035] The entity triple text is generated according to the target entity, the entity full name and the entity category.
[0036] In some embodiments, the extracting semantic entities from the knowledge graph according to the target entity and the semantic block category to obtain the complete entity name and entity category includes:
[0037] Perform entity comparison on candidate entities in the knowledge graph according to the target entity to obtain an initially selected entity;
[0038] Extracting the name corresponding to the initially selected entity from the knowledge graph to obtain the initial selected entity full name, and extracting the category corresponding to the initial selected entity full name from the knowledge graph to obtain the initial selected entity category,
[0039] Determining the initially selected entity category that is the same as the semantic block category as the entity category;
[0040] The initially selected entity full name corresponding to the entity category is determined as the entity full name.
[0041] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a speech quality inspection device, the device comprising:
[0042] A voice acquisition module, used to acquire the target conversation voice;
[0043] A text conversion module, used for converting the target dialogue speech into text to obtain a target dialogue text;
[0044] A semantic segmentation module, used to perform semantic segmentation on the target dialogue text to obtain a target semantic block and a semantic block category; wherein the semantic block category represents the category to which the target semantic block belongs;
[0045] An information search module, used to search for information on a preset knowledge graph according to the target semantic block to obtain entity triple text;
[0046] A sentence search module, used to read sentences from a preset semantic sentence database according to the semantic block category to obtain a standard semantic sentence;
[0047] A text fusion module, used to perform text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain a target quality inspection prompt text;
[0048] The result determination module is used to perform quality inspection on the target quality inspection prompt text to obtain a voice quality inspection result; wherein the voice quality inspection result is used to indicate whether the target dialogue voice quality inspection is qualified or unqualified.
[0049] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the speech quality inspection method described in the first aspect when executing the computer program.
[0050] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the speech quality inspection method described in the first aspect.
[0051] The speech quality inspection method, speech quality inspection device, electronic device and computer-readable storage medium proposed in the present application, when the target conversation speech needs to be quality inspected, the method first converts the target conversation speech into a target conversation text, and based on the text content with different semantics in the target conversation text, at least one target semantic block and the semantic block category corresponding to the target semantic block can be divided. Not only is the entity triple text obtained by searching according to the target semantic block, but also the standard semantic sentence is obtained by reading according to the semantic block category. Then, the texts in various forms (i.e., the semantic block categories, standard semantic sentences, target semantic blocks and entity triple texts mentioned above) are subjected to text fusion and quality inspection to obtain the speech quality inspection results. In summary, the present application realizes the in-depth understanding and analysis of complex conversations, and improves the efficiency and accuracy of speech quality inspection.
[0052] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 is a flow chart of a voice quality inspection method provided in an embodiment of the present application;
[0054] Figure 2 yes Figure 1 Flowchart of step 103 in
[0055] Figure 3 yes Figure 2 Flowchart of step 204 in
[0056] Figure 4 yes Figure 1 Flowchart of step 104 in;
[0057] Figure 5 yes Figure 4 A flowchart of step 402 in FIG.
[0058] Figure 6 is a flow chart of a voice quality inspection method provided by another embodiment of the present application;
[0059] Figure 7 yes Figure 1 Flow chart of step 107 in;
[0060] Figure 8 It is a module structure block diagram of the speech quality inspection device provided in an embodiment of the present application;
[0061] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0065] First, some nouns involved in this application are analyzed:
[0066] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0067] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text comprehension. Natural language processing is commonly used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information image processing, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0068] The embodiments of the present application provide a speech quality inspection method and a speech quality inspection device, an electronic device, and a computer-readable storage medium, which can improve the accuracy of speech quality inspection.
[0069] The speech quality inspection method provided in the embodiment of the present application can be applied to the terminal and the server side, and can also be software running on the server side. The server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the speech quality inspection method, etc., but is not limited to the above forms.
[0070] The present application can be used in many general or special computer system environments or configurations. For example: server computers, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0071] The embodiments of the present application provide a speech quality inspection method and a speech quality inspection device, an electronic device, and a computer-readable storage medium, which are specifically illustrated by the following embodiments. First, the speech quality inspection method in the embodiments of the present application is described.
[0072] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0073] Reference Figure 1 , Figure 1 It is an optional flowchart of the voice quality inspection method provided in an embodiment of the present application, which may include but is not limited to steps 101 to 107.
[0074] Step 101, obtaining target conversation voice;
[0075] Step 102, converting the target conversation speech into text to obtain the target conversation text;
[0076] Step 103, semantically dividing the target dialogue text to obtain target semantic blocks and semantic block categories; wherein the semantic block category represents the category to which the target semantic block belongs;
[0077] Step 104, searching for information on a preset knowledge graph according to the target semantic block to obtain entity triple text;
[0078] Step 105, reading sentences from a preset semantic sentence database according to the semantic block category to obtain a standard semantic sentence;
[0079] Step 106, performing text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain the target quality inspection prompt text;
[0080] Step 107, performing quality inspection on the target quality inspection prompt text to obtain a voice quality inspection result; wherein the voice quality inspection result is used to indicate whether the target dialogue voice quality inspection is qualified or unqualified.
[0081] In the steps 101 to 107 shown in the embodiment of the present application, when it is necessary to perform quality inspection on the target dialogue speech, the target dialogue speech is first converted into a target dialogue text, and at least one target semantic block and a semantic block category corresponding to the target semantic block can be obtained based on the text content with different semantics in the target dialogue text. Not only is the entity triple text obtained by searching according to the target semantic block, but also the standard semantic sentence is obtained by reading according to the semantic block category. Then, the texts in various forms (i.e., the semantic block categories, standard semantic sentences, target semantic blocks, and entity triple texts mentioned above) are subjected to text fusion and quality inspection to obtain the speech quality inspection results. In summary, the present application achieves an in-depth understanding and analysis of complex dialogues, and improves the efficiency and accuracy of speech quality inspection.
[0082] In step 101 of some embodiments, a target conversation voice is obtained. The target conversation voice refers to the voice emitted by more than two speakers. For example, in the field of financial technology, a customer and an agent have a conversation, and the voice output by both parties during the conversation can be used as the target conversation voice. Specifically, when the voice quality inspection method is applied to a terminal, the target conversation voice can be obtained by recording, Bluetooth transmission, wired transmission, or downloading. When the target obtains the voice by recording, the terminal is correspondingly configured with a microphone, and audio is collected by the microphone to achieve the recording of the target conversation voice. When the voice quality inspection method is applied to the server side, the target conversation voice can be uploaded to the server side by the terminal, or downloaded by the server side from other servers or databases.
[0083] In step 102 of some embodiments, the target conversation speech is converted into text to obtain the target conversation text. The target conversation speech can be converted into text using a speech-to-text recognition algorithm to obtain the target conversation text.
[0084] Speech-to-text recognition algorithm is a technology that analyzes and recognizes the text / speech content of a speaker from speech data. It can be used to improve the naturalness and friendliness of human-computer interaction, as well as to provide more text information and services. The main task of speech-to-text recognition is to convert speech data into corresponding text.
[0085] In one example, the following conversation occurred between a customer and an agent:
[0086] Customer: "My finger is broken, please help me make an appointment with a doctor at Y Hospital" (referred to as c1),
[0087] Agent: "OK, I'll make an appointment for you with an orthopedic doctor at Y Hospital" (referred to as s1).
[0088] Customer: "Yes" (referred to as c2),
[0089] Agent: "The orthopedic specialist appointments are this afternoon and tomorrow afternoon. Which date do you want to make an appointment?" (abbreviated as s2),
[0090] Customer: "The sooner the better" (abbreviated as c3),
[0091] Agent: “OK, I’ll make an appointment for you with an orthopedic specialist at 3pm today” (abbreviated as S3).
[0092] Agent: "Do you have any other requirements? Let me introduce you to a product, our rapid outpatient reservation service" (abbreviated as S4).
[0093] Customer: “No thanks” (abbreviated as c5).
[0094] The above c1, s1, c2, s2, c3, s3, c4, s4, and c5 together form the target dialogue text.
[0095] In step 103 of some embodiments, semantic partitioning is performed on the target dialogue text to obtain target semantic chunks and semantic chunk categories. A target semantic chunk is a text chunk that contains at least one sentence, and the semantics of each sentence are the same. The semantic chunk category represents the category to which the target semantic chunk belongs. For example, the semantic chunk categories include hospital information category, appointment date category, etc.
[0096] In one embodiment, referring to Figure 2 , step 103 may include:
[0097] Step 201, perform keyword detection on the target dialogue text to obtain target keywords;
[0098] Step 202, generate target semantic chunks and semantic chunk categories according to the target keywords; wherein, the target semantic chunks are empty;
[0099] Step 203, use the sentences in the target dialogue text that contain the target keywords as the first candidate sentences, and add the first candidate sentences to the target semantic chunks;
[0100] Step 204, perform context extraction on the sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences, and add the second candidate sentences to the target semantic chunks.
[0101] The advantages of the embodiments of steps 201 to 204 are that, on the basis of being able to partition the target semantic chunks, the sentence richness is improved.
[0102] In step 201, a keyword library can be preset in advance, and the keyword library includes reference keywords. Perform word segmentation on the target dialogue text to obtain candidate words; determine the candidate words that are the same as the reference keywords as the target keywords.
[0103] In one embodiment, step 201 may include: perform text cleaning on the target dialogue text to remove irrelevant characters, numbers, punctuation marks, etc. to obtain the first dialogue text; split the first dialogue text into words or phrases to process it into a structure suitable for analysis to obtain a plurality of first candidate words; perform stop word removal on each first candidate word to delete common words without actual meaning, such as "is", "of", "and", etc. to reduce interference and obtain second candidate words; determine the second candidate words that are the same as the reference keywords as the target keywords. In this way, the keyword detection efficiency is improved.
[0104] In step 202, a target semantic block and a semantic block category are generated corresponding to a target keyword. The target semantic block is initially empty. For example, based on the above c1, s1, c2, s2, c3, s3, c4, s4 and c5, the target keyword is hospital, then the target semantic block is semantic1 = [], and the semantic block category is the hospital information category. For another example, based on the above c1, s1, c2, s2, c3, s3, c4, s4 and c5, the target keyword is date or afternoon, then the target semantic block is semantic2 = [], and the semantic block category is the appointment date category.
[0105] In step 203, for example, if the target keyword is hospital / doctor, c1, s1, and s2 containing hospital are taken as the first candidate sentences, and the first candidate sentences are added to the target semantic block, and the target semantic block is updated to semantic1 = [c1, s1, s2]. For another example, if the target keyword is appointment / date / afternoon, c1, s1, s2, and s3 containing appointment / date / afternoon are taken as the first candidate sentences, and the first candidate sentences are added to the target semantic block, and the target semantic block is updated to semantic2 = [c1, s1, s2, s3].
[0106] In step 204, based on step 203, context extraction is performed on sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences, so as to obtain more target semantic blocks of sentences.
[0107] In one embodiment, referring to Figure 3 , step 204 may include:
[0108] Step 301, determining a sentence in the target dialogue text that is adjacent to the first candidate sentence and before the first candidate sentence as a target question sentence;
[0109] Step 302, performing question-answer pair recognition on the target question sentence and the first candidate sentence to obtain a first question-answer pair recognition category;
[0110] Step 303: if the first question-answer pair recognition category characterizes that the target question sentence and the first candidate sentence are a question-answer pair, the target question sentence is determined as the second candidate sentence;
[0111] Step 304, determining a sentence in the target dialogue text that is adjacent to the first candidate sentence and after the first candidate sentence as a target answer sentence;
[0112] Step 305, performing question-answer pair recognition on the first candidate sentence and the target answer sentence to obtain a second question-answer pair recognition category;
[0113] Step 306: If the second question-answer pair recognition category indicates that the first candidate sentence and the target answer sentence are a question-answer pair, the target answer sentence is determined as the second candidate sentence.
[0114] In step 301, for example, the target dialogue text includes c1, s1, c2, s2, c3, s3, c4, s4 and c5. If the first candidate sentence is c1, since there is no sentence before c1, the initial question sentence cannot be obtained. If the first candidate sentence is s2, c2 is determined as the initial question sentence.
[0115] In step 302, the target question sentence and the first candidate sentence can be identified as question-answer pairs by a pre-built classifier to obtain a first question-answer pair identification category. The first question-answer pair identification category characterizes whether the target question sentence and the first candidate sentence are a question-answer pair or not. The classifier can be constructed in the following manner: Based on the labeled question-answer pair data, supervised learning methods (such as logistic regression, support vector machine, deep learning model, etc.) are used for training to establish a classifier for determining question-answer pairs.
[0116] In step 303, if the first question-answer pair identification category representation target question sentence and the first candidate sentence are a question-answer pair, it means that the target question sentence has a strong semantic association with the first candidate sentence, and the target question sentence can be determined as the second candidate sentence, and thus added to the first semantic block to obtain the second semantic block. For example, if the first question-answer pair identification category representation c2 and s2 are a question-answer pair, then on the basis of the first semantic block being semantic1=[c1, s1, s2], the second semantic block can be obtained as semantic1=[c1, s1, c2, s2].
[0117] In step 304, for example, the target dialogue text includes c1, s1, c2, s2, c3, s3, c4, s4, and c5. If the first candidate sentence is s1, c2 is determined as the target answer sentence.
[0118] In step 305, the first candidate sentence and the target answer sentence can be identified as question-answer pairs by a pre-built classifier to obtain a first question-answer pair identification category. The first question-answer pair identification category characterizes whether the target question sentence and the first candidate sentence are a question-answer pair or not. The classifier can be constructed in the following manner: Based on the labeled question-answer pair data, supervised learning methods (such as logistic regression, support vector machine, deep learning model, etc.) are used for training to establish a classifier for determining question-answer pairs.
[0119] In step 306, if the first question-answer pair identification category representation target question sentence and the first candidate sentence are a question-answer pair, it means that the target answer sentence has a strong semantic association with the first candidate sentence, and the target answer sentence can be determined as the second candidate sentence, and thus added to the first semantic block to obtain a second semantic block. For example, if the first question-answer pair identification category representation s1 and c2 are a question-answer pair, then on the basis of the first semantic block being semantic2 = [c1, s1, s2, s3], the second semantic block can be obtained as semantic2 = [c1, s1, c2, s2, s3].
[0120] It should be noted that when identifying question-answer pairs, the above classifier not only considers whether the latter sentence responds to the previous sentence, but also whether the content of the response conforms to the semantic block category. This is achieved by adjusting the parameters of the classifier during the training process.
[0121] The benefit of the above-mentioned embodiment of step 301 to step 306 is that by identifying whether a sentence is in the question-answer pair expanded semantic block, the sentence richness of the target semantic block obtained by division is improved, and the accuracy of division is ensured.
[0122] In step 104 of some embodiments, information is searched on a preset knowledge graph according to the target semantic block to obtain entity triple text. A knowledge graph is a knowledge base represented in the form of a graph structure, which is mainly used to store, organize and represent various information. A knowledge graph describes entities and the relationships between them to facilitate information retrieval, reasoning and sharing.
[0123] In one embodiment, referring to Figure 4 , step 104 may include:
[0124] Step 401, performing entity recognition on each sentence of the target semantic block to obtain a target entity;
[0125] Step 402, extracting semantic entities from the knowledge graph according to the target entity and the semantic block category, obtaining the complete entity name and entity category, where the entity category is the same as the semantic block category;
[0126] Step 403, generating entity triple text according to the target entity, the entity full name and the entity category.
[0127] In step 401, entity recognition is an important task in natural language processing (NLP), which aims to identify specific types of entities (such as names of people, places, organizations, time, date, etc.) from text.
[0128] In step 402, semantic entity extraction is performed on the knowledge graph based on the target entity and the semantic block category, with the goal of extracting entity information that is not only associated with the target entity but also has semantic information associated with the semantic block category, including the full name of the entity and the entity category.
[0129] In step 403, for example, if there is a "Temple of Heaven" entity in the target semantic block, the entity triple text queried on the knowledge graph includes Temple of Heaven, hospital name, and hospital.
[0130] The benefit of the embodiment of the above steps 401 to 403 is that the accuracy of information search can be improved.
[0131] In one embodiment, referring to Figure 5 , step 402 may include:
[0132] Step 501, perform entity comparison on candidate entities in the knowledge graph according to the target entity to obtain an initially selected entity;
[0133] Step 502: extract the name corresponding to the initially selected entity from the knowledge graph to obtain the full name of the initially selected entity, and extract the category corresponding to the full name of the initially selected entity from the knowledge graph to obtain the category of the initially selected entity;
[0134] Step 503, determining the initially selected entity category that is the same as the semantic block category as the entity category;
[0135] Step 504: determine the initially selected entity full name corresponding to the entity category as the entity full name.
[0136] The benefit of the embodiment of steps 501 to 504 is that it simplifies the process of extracting names and categories from the knowledge graph and improves the extraction efficiency.
[0137] In step 105 of some embodiments, a preset semantic sentence database is read according to the semantic block category to obtain a standard semantic sentence. The semantic sentence database includes candidate sentences with candidate semantic categories. The candidate sentences in the semantic sentence database whose candidate semantic categories are the same as the semantic block category are determined as standard semantic sentences.
[0138] In one embodiment, step 105 includes: performing semantic recognition on candidate sentences in the semantic sentence database to obtain candidate semantic categories; determining candidate sentences in the semantic sentence database whose candidate semantic categories are the same as the semantic block categories as standard semantic sentences.
[0139] In one embodiment, referring to Figure 6 Before step 106, the voice quality inspection method provided in this embodiment may further include:
[0140] Step 601, calculating the similarity between the standard semantic sentence and each sentence in the target semantic block to obtain sentence similarity;
[0141] Step 602: Filter each sentence in the target semantic block according to sentence similarity, and then update the target semantic block.
[0142] In step 601, a standard semantic sentence can be vector-embedded by a preset vector embedding model to obtain a standard semantic vector; each sentence in the target semantic block can be vector-embedded by the vector embedding model to obtain a candidate semantic vector; similarity is calculated based on the standard semantic vector and the candidate semantic vector to obtain sentence similarity. The vector embedding model can select a BERT sequence model. The cosine similarity function can be used for similarity calculation.
[0143] In step 602, the sentences in the target semantic block whose sentence similarity is less than the similarity threshold can be deleted to obtain the updated target semantic block. For example, the target semantic block is semantic1 = [c1, s1, c2, s2]. The standard semantic sentence: "I have made an appointment for you at xx department of xxx hospital". After inputting the BERT model, the standard semantic vector (1*d dimension, d represents the hidden vector dimension) is obtained, and the cosine similarity is calculated with each sentence in the target semantic block to obtain [0.51, 0.93, 0.09, 0.32]. Under this target semantic block, sentences with a threshold lower than 0.4 are removed, leaving semantic1 = [c1, s1]. Similarly, semantic2 = [s2, s3].
[0144] The benefit of the above-mentioned embodiment of step 601 to step 602 is that the sentences in the target semantic block can be filtered based on the standard semantic sentences, emphasizing the strong association between each sentence and the semantics in the target semantic block, thereby improving efficiency while ensuring accuracy.
[0145] In step 106 of some embodiments, text fusion is performed according to the semantic block category, standard semantic sentence, target semantic block and entity triple text to obtain the target quality inspection prompt text. For example, the semantic block category, standard semantic sentence, target semantic block and entity triple text are spliced to obtain the target quality inspection prompt text as [semantic block category, standard semantic sentence, target semantic block, entity triple text].
[0146] Step 107: Perform quality inspection on the target quality inspection prompt text to obtain a voice quality inspection result. The voice quality inspection result is used to indicate whether the target dialogue voice quality inspection is qualified or unqualified.
[0147] In one embodiment, referring to Figure 7 , step 107 may include:
[0148] Step 701, performing text quality inspection on the target quality inspection prompt text through the pre-trained large language model to obtain the semantic block quality inspection result corresponding to the target semantic block;
[0149] Step 702: Determine a speech quality inspection result according to the semantic block quality inspection result corresponding to the target semantic block.
[0150] In step 701, the semantic block quality inspection result is used to characterize whether the target semantic block has passed the quality inspection or failed the quality inspection. Large Language Model (LLM) refers to an artificial intelligence system that processes and generates natural language text based on deep learning technology, especially neural network models. Large language models are usually trained on a large amount of text data to learn the structure, grammar, semantics and contextual relationships of the language, so that they can perform a variety of language tasks. The following are some of the main features of large language models: Large scale: Large language models usually contain hundreds of millions to hundreds of billions of parameters, enabling them to capture complex language features. A lot of training data: Use large-scale text data for training, covering a variety of topics and styles to improve the model's language understanding and generation capabilities. Task diversity: Can perform a variety of natural language processing tasks, such as text generation, answering questions, translation, summarization, sentiment analysis, etc. Context understanding: Ability to understand and generate coherent text that conforms to the context, process longer text inputs, and help maintain the coherence of the conversation. Self-learning: Through pre-training and fine-tuning, it can be optimized on specific tasks or fields to improve performance.
[0151] In step 702, if the number of target semantic blocks is 1, the semantic block quality inspection result is determined as the speech quality inspection result. For example, if the semantic block quality inspection result is qualified, the speech quality inspection result is determined to be qualified. If the semantic quality inspection result is unqualified, the speech quality inspection result is unqualified.
[0152] If the number of target semantic blocks is more than 2, a comprehensive judgment is made based on the semantic block quality inspection results corresponding to each target semantic block to obtain a speech quality inspection result. For example, if there are at least two target semantic blocks with a semantic block quality inspection result of target semantic blocks above a predetermined ratio threshold and the quality inspection result is qualified, the speech quality inspection result is determined to be qualified; if there are no semantic block quality inspection results of target semantic blocks above a predetermined ratio threshold and the quality inspection result is qualified among at least two target semantic blocks, the speech quality inspection result is determined to be unqualified.
[0153] The benefit of the embodiment of the above steps 701 to 702 is that the speech quality inspection is performed in combination with a large language model, thereby improving the accuracy of the quality inspection.
[0154] The training process of the large language model can include: 1. For a batch of unlabeled dialogue samples, for each dialogue, obtain prompts of different semantic blocks. 2. Input each prompt into the large LLM model (gpt4) to obtain the conclusion and reason. Filter the data and retain the data with the correct conclusion. Obtain new input-output training samples. 3. Fine-tune the new training sample with the small LLM model (chatglm3), and the obtained model is the final quality inspection model.
[0155] In summary, the present application has at least the following beneficial effects: the method allows rapid adaptation to new tasks by dividing the entire conversation into multiple semantic blocks and streamlining the semantic blocks, integrating knowledge graphs, and using large language models for quality inspection, without the need for complex task engineering or manual labeling for specific tasks. In the field of customer service, the present application can help banks and other institutions improve the quality of customer service conversations, provide targeted training and improvement suggestions through in-depth analysis of conversation content, and thus improve customer satisfaction and service quality.
[0156] See also Figure 8 The embodiment of the present application also provides a speech quality inspection device, which can implement the above-mentioned speech quality inspection method. Figure 8 This is a module structure block diagram of the speech quality inspection device provided in an embodiment of the present application, and the device includes: a speech acquisition module 801, a text conversion module 802, a semantic division module 803, an information search module 804, a sentence search module 805, a text fusion module 806, and a result determination module 807. Among them, the speech acquisition module 801 is used to acquire the target dialogue speech; the text conversion module 802 is used to convert the target dialogue speech into text to obtain the target dialogue text; the semantic division module 803 is used to perform semantic division on the target dialogue text to obtain the target semantic block and the semantic block category; wherein the semantic block category represents the category to which the target semantic block belongs; the information search module 804 is used to perform information search on the preset knowledge graph according to the target semantic block to obtain the entity triple text; the sentence search module 805 is used to read the sentences from the preset semantic sentence database according to the semantic block category to obtain the standard semantic sentence; the text fusion module 806 is used to perform text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain the target quality inspection prompt text; the result determination module 807 is used to perform quality inspection on the target quality inspection prompt text to obtain the speech quality inspection result; wherein the speech quality inspection result is used to represent whether the target dialogue speech quality inspection is qualified or unqualified.
[0157] In one implementation, the semantic segmentation module 803 is specifically used to: perform keyword detection on the target dialogue text to obtain target keywords; generate a target semantic block and a semantic block category based on the target keywords; wherein the target semantic block is empty; take the sentence containing the target keyword in the target dialogue text as the first candidate sentence, and add the first candidate sentence to the target semantic block; determine the sentence in the target dialogue text that is adjacent to and before the first candidate sentence as the target question sentence; perform question-answer pair recognition on the target question sentence and the first candidate sentence to obtain a first question-answer pair recognition category; if the first question-answer pair recognition category indicates that the target question sentence and the first candidate sentence are a question-answer pair, then determine the target question sentence as the second candidate sentence; determine the sentence in the target dialogue text that is adjacent to and after the first candidate sentence as the target answer sentence; perform question-answer pair recognition on the first candidate sentence and the target answer sentence to obtain a second question-answer pair recognition category; if the second question-answer pair recognition category indicates that the first candidate sentence and the target answer sentence are a question-answer pair, then determine the target answer sentence as the second candidate sentence; and add the second candidate sentence to the target semantic block.
[0158] In one embodiment, before performing text fusion according to semantic block categories, standard semantic sentences, target semantic blocks and entity triple texts to obtain target quality inspection prompt text, the speech quality inspection device also includes: a semantic block update module, which is used to: calculate the similarity between the standard semantic sentence and each sentence in the target semantic block to obtain sentence similarity; filter each sentence in the target semantic block according to the sentence similarity, and then update the target semantic block.
[0159] It should be noted that the specific implementation of the speech quality inspection device is basically the same as the specific implementation example of the above-mentioned speech quality inspection method, and will not be repeated here.
[0160] The embodiment of the present application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the above-mentioned voice quality inspection method is realized when the program is executed by the processor. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0161] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0162] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0163] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the voice quality inspection method of the embodiment of this application;
[0164] Input / output interface 903, used to implement information input and output;
[0165] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0166] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0167] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0168] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned voice quality inspection method.
[0169] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0170] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0171] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0172] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0174] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0175] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0176] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0178] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0179] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0180] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A speech quality inspection method, characterized in that: The method comprises: Obtain target conversation voice; Converting the target conversation speech into text to obtain a target conversation text; Semantically dividing the target dialogue text to obtain target semantic blocks and semantic block categories; wherein the semantic block category represents the category to which the target semantic block belongs; According to the target semantic block, information is searched on a preset knowledge graph to obtain entity triple text; Reading sentences from a preset semantic sentence database according to the semantic block category to obtain standard semantic sentences; Perform text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain a target quality inspection prompt text; The target quality inspection prompt text is quality inspected to obtain a speech quality inspection result; wherein the speech quality inspection result is used to indicate whether the target dialogue speech quality inspection is qualified or unqualified.
2. The method according to claim 1, characterized in that The semantic segmentation of the target dialogue text to obtain target semantic blocks and semantic block categories includes: Performing keyword detection on the target conversation text to obtain target keywords; Generate a target semantic block and a semantic block category according to the target keyword; wherein the target semantic block is empty; Taking the sentence containing the target keyword in the target dialogue text as the first candidate sentence, and adding the first candidate sentence to the target semantic block; Context extraction is performed on sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences, and the second candidate sentences are added to the target semantic block.
3. The method according to claim 2, characterized in that The step of performing context extraction on sentences in the target dialogue text according to the first candidate sentences to obtain second candidate sentences includes: Determine a sentence in the target dialogue text that is adjacent to the first candidate sentence and before the first candidate sentence as a target question sentence; Performing question-answer pair recognition on the target question sentence and the first candidate sentence to obtain a first question-answer pair recognition category; If the first question-answer pair recognition category indicates that the target question sentence and the first candidate sentence are a question-answer pair, determining the target question sentence as the second candidate sentence; Determine a sentence in the target dialogue text that is adjacent to the first candidate sentence and follows the first candidate sentence as a target answer sentence; Performing question-answer pair recognition on the first candidate sentence and the target answer sentence to obtain a second question-answer pair recognition category; If the second question-answer pair recognition category indicates that the first candidate sentence and the target answer sentence are a question-answer pair, the target answer sentence is determined as the second candidate sentence.
4. The method according to any one of claims 1 to 3, characterized in that: Before performing text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain the target quality inspection prompt text, the method further includes: Calculate the similarity between the standard semantic sentence and each sentence in the target semantic block to obtain sentence similarity; Each sentence in the target semantic block is filtered according to the sentence similarity, and then the target semantic block is updated.
5. The method according to any one of claims 1 to 3, characterized in that: The quality inspection of the target quality inspection prompt text to obtain a voice quality inspection result includes: Performing text quality inspection on the target quality inspection prompt text through a pre-trained large language model to obtain a semantic block quality inspection result corresponding to the target semantic block; wherein the semantic block quality inspection result is used to indicate whether the target semantic block has passed or failed the quality inspection; The speech quality inspection result is determined according to the semantic block quality inspection result corresponding to the target semantic block.
6. The method according to any one of claims 1 to 3, characterized in that: The step of searching for information on a preset knowledge graph according to each sentence in the target semantic block to obtain entity triple text includes: Performing entity recognition on each sentence of the target semantic block to obtain a target entity; Perform semantic entity extraction on the knowledge graph according to the target entity and the semantic block category to obtain a complete entity name and an entity category, wherein the entity category is the same as the semantic block category; The entity triple text is generated according to the target entity, the entity full name and the entity category.
7. The method according to claim 6, characterized in that The extracting semantic entities from the knowledge graph according to the target entity and the semantic block category to obtain the complete entity name and entity category includes: Perform entity comparison on candidate entities in the knowledge graph according to the target entity to obtain an initially selected entity; Extracting the name corresponding to the initially selected entity from the knowledge graph to obtain the initial selected entity full name, and extracting the category corresponding to the initial selected entity full name from the knowledge graph to obtain the initial selected entity category, Determining the initially selected entity category that is the same as the semantic block category as the entity category; The initially selected entity full name corresponding to the entity category is determined as the entity full name.
8. A speech quality inspection device, characterized in that: The device comprises: A voice acquisition module, used to acquire the target conversation voice; A text conversion module, used for converting the target dialogue speech into text to obtain a target dialogue text; A semantic segmentation module, used to perform semantic segmentation on the target dialogue text to obtain a target semantic block and a semantic block category; wherein the semantic block category represents the category to which the target semantic block belongs; An information search module, used to search for information on a preset knowledge graph according to the target semantic block to obtain entity triple text; A sentence search module, used to read sentences from a preset semantic sentence database according to the semantic block category to obtain a standard semantic sentence; A text fusion module, used to perform text fusion according to the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain a target quality inspection prompt text; The result determination module is used to perform quality inspection on the target quality inspection prompt text to obtain a voice quality inspection result; wherein the voice quality inspection result is used to indicate whether the target dialogue voice quality inspection is qualified or unqualified.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Voice quality inspection method and device based on semantics
CN112037819A
Voice session quality inspection method and device, equipment and storage medium
CN115223592A
KR20240053994A
Cited By
Voice interaction method and device, electronic equipment and computer program product
CN121459794A
Voice interaction method and device, electronic equipment and computer program product
CN121459794B
Large model intelligent quality inspection method, device, equipment and medium
CN121765650A
AI question and answer accuracy optimization method and device, equipment and storage medium
CN122309686A