Voice quality inspection method and device, electronic equipment and computer readable storage medium
By converting speech to text and performing semantic segmentation and entity recognition, combined with text fusion of knowledge graphs and large language models, the problem of low accuracy in speech quality inspection in existing technologies is solved, achieving in-depth understanding and efficient quality inspection of complex dialogues.
Patent Information
- Application Number
- CN202411630454.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-11-14
AI Technical Summary
Existing voice quality inspection technologies struggle to deeply understand the content of complex dialogues, resulting in low accuracy in voice quality inspection.
By converting the target dialogue speech into text, performing semantic segmentation and semantic block category recognition, using knowledge graphs to find entity triple text, and combining large language models for text fusion and quality inspection, speech quality inspection results are generated.
It enables in-depth understanding and analysis of complex dialogues, improves the efficiency and accuracy of voice quality inspection, and provides more accurate quality inspection results.
Smart Images

Figure CN119517029B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and is suitable for the field of financial technology, in particular to a voice quality inspection method and device, an electronic device and a computer readable storage medium. BACKGROUND
[0002] The voice quality inspection technology is a technology for quality detection of voice data. In the field of financial technology, it is often necessary to evaluate the reasonableness of the answers of a service provider based on the dialogue voice data of a customer and the service provider. For example, in the voice quality inspection of the dialogue between a bank customer service and an insurance industry, evaluating the reasonableness of the answers of the customer service based on the dialogue voice is beneficial to making improvement suggestions.
[0003] The existing voice quality inspection technology relies on keyword matching and basic sentiment analysis, and it is difficult to deeply understand the dialogue content in complex dialogue voice, resulting in a large space for improvement of the accuracy of voice quality inspection.
[0004] Therefore, how to provide a voice quality inspection method capable of improving the accuracy of voice quality inspection has become a technical problem to be solved. SUMMARY
[0005] The main purpose of the embodiments of the present application is to provide a voice quality inspection method and device, an electronic device and a computer readable storage medium, which can improve the accuracy of voice quality inspection.
[0006] To achieve the above purpose, a first aspect of the embodiments of the present application provides a voice quality inspection method, which comprises:
[0007] obtaining a target dialogue voice;
[0008] performing text conversion on the target dialogue voice to obtain a target dialogue text;
[0009] performing semantic division on the target dialogue text to obtain a target semantic block and a semantic block category; wherein the semantic block category represents a category to which the target semantic block belongs;
[0010] performing information searching on a preset knowledge graph according to the target semantic block to obtain an entity triple text;
[0011] performing sentence reading on a preset semantic sentence database according to the semantic block category to obtain a standard semantic sentence;
[0012] performing 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] The target text is checked, and a voice quality inspection result is obtained, wherein the voice quality inspection result is used to represent that the target voice is qualified or unqualified.
[0014] In some embodiments, the target dialogue text is divided semantically to obtain a target semantic block and a semantic block category, including:
[0015] The target dialogue text is keyword detected to obtain a target keyword.
[0016] The target semantic block and the semantic block category are generated according to the target keyword, wherein the target semantic block is empty.
[0017] The sentence containing the target keyword in the target dialogue text is taken as a first candidate sentence, and the first candidate sentence is added to the target semantic block.
[0018] The context of the sentence in the target dialogue text is extracted according to the first candidate sentence to obtain a second candidate sentence, and the second candidate sentence is added to the target semantic block.
[0019] In some embodiments, the context of the sentence in the target dialogue text is extracted according to the first candidate sentence to obtain a second candidate sentence, including:
[0020] The sentence adjacent to and before the first candidate sentence in the target dialogue text is determined as a target question sentence.
[0021] The target question sentence and the first candidate sentence are question and answer pair identified to obtain a first question and answer pair identification category.
[0022] If the first question and answer pair identification category represents that the target question sentence and the first candidate sentence are a question and answer pair, the target question sentence is determined as the second candidate sentence.
[0023] The sentence adjacent to and after the first candidate sentence in the target dialogue text is determined as a target answer sentence.
[0024] The first candidate sentence and the target answer sentence are question and answer pair identified to obtain a second question and answer pair identification category.
[0025] If the second question and answer pair identification category represents that the first candidate sentence and the target answer sentence are a question and answer pair, the target answer sentence is determined as the second candidate sentence.
[0026] In some embodiments, before the 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 comprises:
[0027] performing similarity calculation on the standard semantic sentence and each sentence in the target semantic block to obtain a sentence similarity;
[0028] filtering each sentence in the target semantic block according to the sentence similarity, and updating the target semantic block.
[0029] In some embodiments, the quality inspection of the target quality inspection prompt text to obtain the voice quality inspection result comprises:
[0030] performing text quality inspection on the target quality inspection prompt text by 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 represent that the target semantic block is qualified or unqualified in quality inspection;
[0031] determining the voice quality inspection result according to the semantic block quality inspection result corresponding to the target semantic block.
[0032] In some embodiments, the information lookup of a preset knowledge graph according to each sentence in the target semantic block to obtain the entity triple text comprises:
[0033] performing entity recognition on each sentence of the target semantic block to obtain a target entity;
[0034] performing semantic entity extraction on the knowledge graph according to the target entity and the semantic block category to obtain an entity complete name and an entity category, the entity category being the same as the semantic block category;
[0035] generating the entity triple text according to the target entity, the entity complete name, and the entity category.
[0036] In some embodiments, the semantic entity extraction on the knowledge graph according to the target entity and the semantic block category to obtain the entity complete name and the entity category comprises:
[0037] performing entity comparison on a candidate entity in the knowledge graph according to the target entity to obtain an initial selected entity;
[0038] extracting a name corresponding to the initial selected entity from the knowledge graph to obtain an initial selected entity complete name, and extracting a category corresponding to the initial selected entity complete name from the knowledge graph to obtain an initial selected entity category,
[0039] determining the initial selected entity category as the entity category if the initial selected entity category is the same as the semantic block category;
[0040] determining the initial selected entity full name as the entity full name if the initial selected entity full name corresponds to the entity category.
[0041] To achieve the above object, a second aspect of the embodiment of the present application provides a voice quality inspection device, which comprises:
[0042] a voice acquisition module, configured to acquire target dialogue voice;
[0043] a text conversion module, configured to convert the target dialogue voice into target dialogue text;
[0044] a semantic division module, configured to divide the target dialogue text into target semantic blocks and semantic block categories; wherein the semantic block categories represent categories to which the target semantic blocks belong;
[0045] an information searching module, configured to search a preset knowledge graph according to the target semantic blocks, and obtain entity triple text;
[0046] a sentence searching module, configured to read a preset semantic sentence database according to the semantic block categories, and obtain standard semantic sentences;
[0047] a text fusion module, configured to fuse the semantic block categories, the standard semantic sentences, the target semantic blocks and the entity triple text, and obtain target quality inspection prompt text;
[0048] a result determining module, configured to inspect the target quality inspection prompt text, and obtain voice quality inspection results; wherein the voice quality inspection results represent whether the target dialogue voice is qualified or unqualified.
[0049] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the voice quality inspection method of the first aspect.
[0050] To achieve the above object, a fourth aspect of the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the voice quality inspection method of the first aspect.
[0051] The voice quality inspection method, the voice quality inspection device, the electronic equipment and the computer readable storage medium provided in the application, when facing the need to inspect the target dialogue voice, first convert the target dialogue voice into target dialogue text, and based on the text content of different semantics in the target dialogue text, at least one target semantic block and the semantic block category corresponding to the target semantic block can be divided. Not only the entity triple text is found according to the target semantic block, but also the standard semantic sentence is read according to the semantic block category. Then the text fusion is performed on the text in multiple forms (that is, the above-mentioned semantic block category, the standard semantic sentence, the target semantic block and the entity triple text), and then the quality inspection is performed to obtain the voice quality inspection result. In summary, the application realizes the in-depth understanding and analysis of the complex dialogue, and improves the efficiency and accuracy of the voice quality inspection.
[0052] Additional aspects and advantages of the application will be made apparent by the following description. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 is a flowchart of the voice quality inspection method provided by the embodiment of the application;
[0054] Figure 2 is Figure 1 is a flowchart of step 103 in
[0055] Figure 3 is Figure 2 is a flowchart of step 204 in
[0056] Figure 4 is Figure 1 is a flowchart of step 104 in
[0057] Figure 5 is Figure 4 is a flowchart of step 402 in
[0058] Figure 6 is a flowchart of the voice quality inspection method provided by another embodiment of the application;
[0059] Figure 7 is Figure 1 is a flowchart of step 107 in
[0060] Figure 8 is a module structure block diagram of the voice quality inspection device provided by the embodiment of the application;
[0061] Figure 9 is a hardware structure schematic diagram of the electronic equipment provided by the embodiment of the application. DETAILED DESCRIPTION
[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended 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 sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the sequence in the flowchart. The terms "first", "second", and the like in the description and 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 commonly understood by one of ordinary skill in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0065] First, the meanings of several terms involved in the present application are analyzed:
[0066] Artificial intelligence (AI): is a new technical science that studies, develops and applies systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, artificial intelligence aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. The field of research includes robots, language recognition, image recognition, natural language processing and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also the theory, method, technology and application system of using digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, to 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 use human language (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and is an interdisciplinary subject of computer science and linguistics, also commonly known as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, discourse understanding, etc. Natural language processing is commonly used in 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, etc. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research related to language processing, and language computing related linguistic research.
[0068] The embodiment of the present application provides a voice quality inspection method and device, an electronic device and a computer readable storage medium, and voice quality inspection accuracy can be improved.
[0069] The voice quality inspection method provided by the embodiment of the present application can be applied to a terminal and a server end, and can also be software running in the server end. The server end can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform. The software can be an application for implementing the voice quality inspection method, 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, multi-processor 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 a distributed computing environment, in which tasks are performed by remote processing devices connected by 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 voice quality inspection method and device, electronic device and computer readable storage medium provided by the embodiment of the present application are specifically described as follows: first, the voice quality inspection method in the embodiment of the present application is described.
[0072] It should be noted that in each specific embodiment of the present application, when relevant processing needs to be performed according to user information, user behavior data, user historical data and user location information and other data related to the identity or characteristics of the user, 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 sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiment of the present application to normally operate will be obtained.
[0073] Reference Figure 1 ,Figure 1 is an optional flowchart of the voice quality inspection method provided by the embodiment of the present application, which can include but is not limited to steps 101 to 107.
[0074] Step 101, obtaining target dialogue voice;
[0075] Step 102, text conversion is performed on the target dialogue voice to obtain target dialogue text;
[0076] Step 103, semantic division is performed on 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, information searching is performed on a preset knowledge graph according to the target semantic blocks to obtain entity triple text;
[0078] Step 105, sentence reading is performed on a preset semantic sentence database according to the semantic block category to obtain standard semantic sentences;
[0079] Step 106, text fusion is performed according to the semantic block category, the standard semantic sentences, the target semantic blocks and the entity triple text to obtain target quality inspection prompt text;
[0080] Step 107, quality inspection is performed on the target quality inspection prompt text to obtain voice quality inspection results; wherein the voice quality inspection results are used to represent whether the target dialogue voice is qualified or unqualified.
[0081] The steps 101 to 107 shown in the embodiment of the present application, when facing the need to inspect the target dialogue voice, first convert the target dialogue voice into target dialogue text. Based on the text content of different semantics in the target dialogue text, at least one target semantic block and the semantic block category corresponding to the target semantic block can be divided. Not only the entity triple text is found according to the target semantic block, but also the standard semantic sentences are read according to the semantic block category. Then, multiple forms of text (i.e. the above-mentioned semantic block category, standard semantic sentences, target semantic blocks and entity triple text) are fused and then inspected to obtain voice quality inspection results. In summary, the present application realizes in-depth understanding and analysis of complex dialogue, and improves the efficiency and accuracy of voice quality inspection.
[0082] In step 101 of some embodiments, target dialogue voice is obtained. The target dialogue voice refers to voice uttered by 2 or more speakers. For example, in the field of financial technology, a customer has a dialogue with an agent, and the voice output by both parties during the dialogue can be the target dialogue voice. Specifically, when the voice quality inspection method is applied in a terminal, the target dialogue voice can be obtained by recording, Bluetooth transmission, wired transmission, or downloading. When the target dialogue voice is obtained by recording, the terminal is correspondingly configured with a microphone, and audio collection is performed through the microphone to realize recording of the target dialogue voice. When the voice quality inspection method is applied in a server, the target dialogue voice can be uploaded to the server by the terminal, or downloaded from other servers or databases by the server.
[0083] In step 102 of some embodiments, text conversion is performed on the target dialogue voice to obtain target dialogue text. The target dialogue voice can be converted into text by using a speech text recognition algorithm to obtain the target dialogue text.
[0084] The speech text recognition algorithm is a technology for analyzing and recognizing the text / speech content of a speaker from speech data. It can be used to improve the naturalness and friendliness of human-computer interaction, and provide more text information and services. The main task of speech text recognition is to convert speech data into corresponding text.
[0085] In an example, the customer and the agent have the following dialogue:
[0086] Customer: "My finger is broken, help me make an appointment with the doctor of Y hospital" (abbreviated as c1),
[0087] Agent: "OK, I will make an appointment for you with the orthopedic doctor of Y hospital" (abbreviated as s1),
[0088] Customer: "OK" (abbreviated as c2),
[0089] Agent: "The orthopedic doctor's expert number is today afternoon and tomorrow afternoon, which date do you want to make an appointment for?" (abbreviated as s2),
[0090] Customer: "The sooner the better" (abbreviated as c3),
[0091] Agent: "OK, I will make an appointment for you with the orthopedic expert at 3 pm today" (abbreviated as s3).
[0092] Agent: "Do you have any other requirements, I will introduce a product to you, our express outpatient appointment service" (abbreviated as s4),
[0093] Customer: "No, thank you" (abbreviated as c5).
[0094] The c1, s1, c2, s2, c3, s3, c4, s4 and c5 above jointly constitute the target dialogue text.
[0095] In step 103 of some embodiments, the target dialogue text is semantically divided to obtain target semantic blocks and semantic block categories. The target semantic block is a text block containing at least one sentence, and the semantics of each sentence is the same. The semantic block category represents the category to which the target semantic block belongs. For example, the semantic block category includes a hospital information category, a reservation date category, and the like.
[0096] In an embodiment, referring to Figure 2 , step 103 can include:
[0097] Step 201, keyword detection is performed on the target dialogue text to obtain target keywords;
[0098] Step 202, target semantic blocks and semantic block categories are generated according to the target keywords; wherein the target semantic block is empty;
[0099] Step 203, a sentence containing the target keyword in the target dialogue text is taken as a first candidate sentence, and the first candidate sentence is added to the target semantic block;
[0100] Step 204, context extraction is performed on the sentences in the target dialogue text according to the first candidate sentence to obtain a second candidate sentence, and the second candidate sentence is added to the target semantic block.
[0101] The embodiments of steps 201 to 204 have the benefit of improving sentence richness on the basis of being able to divide the target semantic block.
[0102] In step 201, a keyword library can be set in advance, and the keyword library includes reference keywords. Tokenization is performed on the target dialogue text to obtain candidate words; and the candidate words that are the same as the reference keywords are determined as target keywords.
[0103] In an embodiment, step 201 can include: text cleaning is performed on the target dialogue text to remove irrelevant characters, numbers, punctuation marks, and the like to obtain a first dialogue text; the first dialogue text is split into words or word groups to process into a structure suitable for analysis to obtain a plurality of first candidate words; stop word removal is performed on each first candidate word to delete common words without actual meaning, such as "is", "of", "and", and the like, to reduce interference to obtain second candidate words; and the second candidate words that are the same as the reference keywords are determined as target keywords. In this way, the keyword detection efficiency is improved.
[0104] In step 202, one target keyword corresponds to generating one target semantic block and semantic block category. 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 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 appointment date category.
[0105] In step 203, for example, the target keyword is hospital / doctor, then c1, s1 and s2 containing the hospital are taken as the first candidate sentence, the first candidate sentence is added to the target semantic block, and then the target semantic block is updated to semantic1 = [c1, s1, s2]. For another example, the target keyword is appointment / date / afternoon, then c1, s1, s2 and s3 containing the appointment / date / afternoon are taken as the first candidate sentence, the first candidate sentence is added to the target semantic block, and then the target semantic block is updated to semantic2 = [c1, s1, s2, s3].
[0106] In step 204, based on step 203, the context of the sentences in the target dialogue text is also extracted according to the first candidate sentence to obtain the second candidate sentence, so as to obtain more target semantic blocks of the sentences.
[0107] In an embodiment, referring to Figure 3 , step 204 can include:
[0108] Step 301, determining the sentence adjacent to and before the first candidate sentence in the target dialogue text as the 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 represents that the target question sentence and the first candidate sentence are a question-answer pair, then determining the target question sentence as the second candidate sentence;
[0111] Step 304, determining the sentence adjacent to and after the first candidate sentence in the target dialogue text as the 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 identification 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, the initial question sentence cannot be obtained because there is no sentence before c1. 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 subjected to question-answer pair identification by a pre-constructed classifier to obtain a first question-answer pair identification category. The first question-answer pair identification category indicates that the target question sentence and the first candidate sentence are a question-answer pair or are not a question-answer pair. The classifier can be constructed by the following method: according to the labeled question-answer pair data, a supervised learning method (such as logistic regression, support vector machine, deep learning model, etc.) is used for training to establish a classifier for judging question-answer pairs.
[0116] In step 303, if the first question-answer pair identification category indicates that the target question sentence and the first candidate sentence are a question-answer pair, it indicates that the target question sentence has a relatively strong semantic association with the first candidate sentence, and the target question sentence can be determined as the second candidate sentence, thereby being added to the first semantic block to obtain a second semantic block. For example, if the first question-answer pair identification category indicates that c2 and s2 are a question-answer pair, based on the first semantic block semantic1=[c1, s1, s2], the second semantic block semantic1=[c1, s1, c2, s2] can be obtained.
[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 subjected to question-answer pair identification by a pre-constructed classifier to obtain a first question-answer pair identification category. The first question-answer pair identification category indicates that the target question sentence and the first candidate sentence are a question-answer pair or are not a question-answer pair. The classifier can be constructed by the following method: according to the labeled question-answer pair data, a supervised learning method (such as logistic regression, support vector machine, deep learning model, etc.) is used for training to establish a classifier for judging question-answer pairs.
[0119] In step 306, if the first question-answer pair identification category indicates that the target question sentence and the first candidate sentence are a question-answer pair, it means that the target answer sentence is semantically strongly associated 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 the second semantic block. For example, if the first question-answer pair identification category indicates that s1 and c2 are a question-answer pair, based on the first semantic block 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 performing question-answer pair identification, the above classifier not only considers whether the latter sentence responds to the former sentence and whether the content of the response conforms to the semantic block category, but also adjusts the parameters of the classifier through the training process.
[0121] The embodiment of steps 301-306 has the benefit of expanding the sentences in the semantic block by identifying whether it is a question-answer pair, improving the richness of the sentences in the target semantic block obtained by division, and ensuring the accuracy of the division.
[0122] In step 104 of some embodiments, information is searched in a preset knowledge graph according to the target semantic block to obtain entity triple text. The knowledge graph is a knowledge base represented in the form of a graph structure, mainly used for storing, organizing and representing various information. The knowledge graph describes entities and their relationships to facilitate information retrieval, reasoning and sharing.
[0123] In an embodiment, referring to Figure 4 , step 104 can include:
[0124] In step 401, entity recognition is performed on each sentence of the target semantic block to obtain target entities.
[0125] In step 402, semantic entity extraction is performed on the knowledge graph according to the target entities and the semantic block category to obtain entity full names and entity categories, and the entity categories are the same as the semantic block category.
[0126] In step 403, entity triple text is generated according to the target entities, entity full names and entity categories.
[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, place names, organization names, time, date, etc.) from text.
[0128] In step 402, the knowledge graph is subjected to semantic entity extraction according to the target entity and the semantic block category. The purpose is to extract entity information associated with not only the target entity but also the semantic information associated with the semantic block category, including the complete name of the entity and the category of the entity.
[0129] In step 403, for example, there is a "Tiantan" entity in the target semantic block, and the entity triple text including Tiantan, hospital name, and hospital is queried on the knowledge graph.
[0130] The embodiment of steps 401 to 403 has the advantage of improving the accuracy of information searching.
[0131] In an embodiment, referring to Figure 5 , step 402 can include:
[0132] Step 501, according to the target entity, the candidate entity in the knowledge graph is subjected to entity comparison, and the initial selected entity is obtained;
[0133] Step 502, the name corresponding to the initial selected entity is extracted from the knowledge graph, the complete name of the initial selected entity is obtained, and the category corresponding to the complete name of the initial selected entity is extracted from the knowledge graph, and the category of the initial selected entity is obtained;
[0134] Step 503, the initial selected entity category same as the semantic block category is determined as the entity category;
[0135] Step 504, the initial selected entity complete name corresponding to the entity category is determined as the entity complete name.
[0136] The embodiment of steps 501 to 504 has the advantage of simplifying the process of extracting the name and category from the knowledge graph and improving the extraction efficiency.
[0137] In step 105 of some embodiments, according to the semantic block category, the preset semantic sentence database is subjected to sentence reading, and the standard semantic sentence is obtained. The semantic sentence database includes candidate sentences with candidate semantic categories. The candidate sentence in the semantic sentence database with the same candidate semantic category as the semantic block category is determined as the standard semantic sentence.
[0138] In an embodiment, step 105 includes: performing semantic recognition on the candidate sentences in the semantic sentence database to obtain candidate semantic categories; and determining the candidate sentence in the semantic sentence database with the same candidate semantic category as the semantic block category as the standard semantic sentence.
[0139] In an embodiment, referring to Figure 6 , before step 106, the voice quality inspection method provided by the embodiment can further include:
[0140] Step 601, similarity calculation is performed between the standard semantic sentence and each sentence in the target semantic block to obtain a sentence similarity;
[0141] Step 602, filtering is performed on each sentence in the target semantic block according to the sentence similarity, and the target semantic block is updated.
[0142] In step 601, the 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 calculation is performed according to the standard semantic vector and the candidate semantic vector to obtain the sentence similarity. The vector embedding model can be a bert sequence model. The cosine similarity function can be used for similarity calculation.
[0143] In step 602, sentences in the target semantic block with a sentence similarity less than a similarity threshold value can be deleted to obtain an updated target semantic block. For example, the target semantic block is semantic1=[c1,s1,c2,s2]. The standard semantic sentence is: "You have been scheduled for the xx department of xxx hospital". The standard semantic vector (1*d dimension, d represents the hidden layer vector dimension) is obtained after inputting the bert model, and the cosine similarity is calculated with each sentence in the target semantic block to obtain [0.51, 0.93, 0.09, 0.32]. In this target semantic block, sentences with a threshold value less than 0.4 are removed, and the remaining semantic1=[c1,s1]. Similarly, semantic2=[s2,s3].
[0144] The embodiments of steps 601 to 602 have the benefit that the sentences in the target semantic block can be filtered based on the standard semantic sentence, emphasizing the strong association of each sentence in the target semantic block with the semantics, and improving efficiency on the basis of ensuring accuracy.
[0145] In step 106 of some embodiments, text fusion is performed 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. For example, the target quality inspection prompt text is obtained by splicing the semantic block category, the standard semantic sentence, the target semantic block, and the entity triple text.
[0146] Step 107, quality inspection is performed on the target quality inspection prompt text to obtain a voice quality inspection result. The voice quality inspection result is used to represent that the target dialogue voice quality inspection is qualified or unqualified.
[0147] In an embodiment, referring to Figure 7 , step 107 can include:
[0148] At step 701, a pre-trained large language model is used to perform text quality inspection on the target quality inspection prompt text to obtain semantic block quality inspection results corresponding to the target semantic blocks.
[0149] At step 702, the speech quality inspection result is determined according to the semantic block quality inspection results corresponding to the target semantic blocks.
[0150] In step 701, the semantic block quality inspection result is used to represent whether the target semantic block is qualified or unqualified. A large language model (LLM) refers to an artificial intelligence system based on deep learning technology, especially a neural network model, to process and generate natural language text. Large language models are usually trained on a large amount of text data to learn the structure, grammar, semantics, and context relationships of language, so as to perform various language tasks. The following are some main features of large language models: large scale: large language models usually contain hundreds of millions to tens of billions of parameters, allowing them to capture complex language features. Large training data: trained using large-scale text data, covering various 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, question answering, translation, summarization, sentiment analysis, etc. Context understanding: can understand and generate coherent text that meets the context, handle longer text inputs, and help maintain the coherence of a conversation. Self-learning: through pre-training and fine-tuning, it can be optimized for specific tasks or domains 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 as qualified. If the semantic block quality inspection result is unqualified, the speech quality inspection result is unqualified.
[0152] If the number of target semantic blocks is more than 2, the speech quality inspection result is determined according to the comprehensive judgment of the semantic block quality inspection results corresponding to each target semantic block. For example, if there are more than a predetermined proportion threshold of target semantic blocks with qualified semantic block quality inspection results in at least two target semantic blocks, the speech quality inspection result is determined as qualified. If there are no more than a predetermined proportion threshold of target semantic blocks with qualified semantic block quality inspection results in at least two target semantic blocks, the speech quality inspection result is determined as unqualified.
[0153] The embodiments of steps 701 to 702 have the benefit of combining large language models for speech quality inspection to improve the accuracy of quality inspection.
[0154] The training process of the large language model can include: 1. For a batch of unlabeled dialogue samples dialogue, for each dialogue, obtain prompts for different semantic blocks. 2. Input each prompt into the large LLM model (gpt4) to obtain conclusions and reasons. Screen the data and keep the data with correct conclusions. Obtain new input-output training samples. 3. Fine-tune the new training sample pair with a small LLM model (chatglm3) to obtain the final quality inspection model.
[0155] In summary of the above embodiments, the present application has at least the following beneficial effects: the method divides the entire dialogue into multiple semantic blocks, simplifies the semantic blocks, fuses the knowledge graph, and uses a large language model for quality inspection, allowing rapid adaptation to new tasks without the need for complex task engineering or manual annotation for specific tasks. In the customer service field, the present application can help banks and other institutions improve the quality of customer service dialogue, provide targeted training and improvement suggestions through in-depth analysis of dialogue content, thereby improving customer satisfaction and service quality.
[0156] Please refer to Figure 8 The embodiments of the present application also provide a voice quality inspection device, which can implement the voice quality inspection method described above, Figure 8 A module structure block diagram of the voice quality inspection device provided by the embodiments of the present application is shown in the figure. The device includes a voice acquisition module 801, a text conversion module 802, a semantic division module 803, an information searching module 804, a sentence searching module 805, a text fusion module 806, and a result determination module 807. The voice acquisition module 801 is configured to acquire target dialogue voice. The text conversion module 802 is configured to perform text conversion on the target dialogue voice to obtain target dialogue text. The semantic division module 803 is configured to perform semantic division on the target dialogue text to obtain target semantic blocks and semantic block categories. The semantic block category represents the category to which the target semantic block belongs. The information searching module 804 is configured to search for information in a preset knowledge graph according to the target semantic block to obtain entity triple text. The sentence searching module 805 is configured to read sentences from a preset semantic sentence database according to the semantic block category to obtain standard semantic sentences. The text fusion module 806 is configured to perform text fusion according to the semantic block category, the standard semantic sentences, the target semantic blocks, and the entity triple text to obtain target quality inspection prompt text. The result determination module 807 is configured to 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 represent whether the target dialogue voice is qualified or unqualified.
[0157] In an implementation, the semantic division module 803 is specifically configured to: perform keyword detection on the target dialogue text to obtain target keywords; generate a target semantic block and a semantic block category according to the target keywords; wherein the target semantic block is empty; take a sentence containing the target keywords in the target dialogue text as a first candidate sentence, and add the first candidate sentence to the target semantic block; determine a sentence adjacent to and before the first candidate sentence in the target dialogue text as a target question sentence; perform question-answer pair identification on the target question sentence and the first candidate sentence to obtain a first question-answer pair identification category; if the first question-answer pair identification category represents that the target question sentence and the first candidate sentence are a question-answer pair, determine the target question sentence as a second candidate sentence; determine a sentence adjacent to and after the first candidate sentence in the target dialogue text as a target answer sentence; perform question-answer pair identification on the first candidate sentence and the target answer sentence to obtain a second question-answer pair identification category; if the second question-answer pair identification category represents that the first candidate sentence and the target answer sentence are a question-answer pair, determine the target answer sentence as the second candidate sentence; and add the second candidate sentence to the target semantic block.
[0158] In an embodiment, before the text fusion is performed 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 voice quality inspection device further includes a semantic block updating module configured to: perform similarity calculation on the standard semantic sentence and each sentence in the target semantic block to obtain a sentence similarity; and filter each sentence in the target semantic block according to the sentence similarity, and update the target semantic block.
[0159] It should be noted that the specific implementation of the voice quality inspection device is basically the same as the specific embodiments of the voice quality inspection method described above, and will not be repeated here.
[0160] Embodiments of the present application also provide 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 program is executed by the processor to realize the voice quality inspection method described above. The electronic device can be any smart terminal including a tablet computer, a vehicle-mounted computer, etc.
[0161] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is illustrated, which includes:
[0162] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0163] The memory 902 can be implemented by a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 902 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 902 and are called and executed by the processor 901 to implement the voice quality inspection method of the embodiments of the present application.
[0164] The input / output interface 903 is configured to implement information input and output.
[0165] The communication interface 904 is configured to implement the communication interaction between the device and other devices. The communication can be implemented by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0166] The bus 905 is configured to transmit information between the components (for example, the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device.
[0167] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other through the bus 905 to realize the communication connection between the components in the device.
[0168] The embodiments of the present application further provide a storage medium, which is a computer readable storage medium, and is configured to store computer readable information. The storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the voice quality inspection method.
[0169] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely from the processor, which can be connected to the processor through a network. Examples of the above 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 used 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 by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0171] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0172] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0173] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0174] The terms "first", "second", "third", "fourth" and the like used in the specification of the present application and the above-described drawings, if any, are used to distinguish similar objects, and do not necessarily have to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0175] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B, and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, and c can be single or multiple.
[0176] In several embodiments provided in the 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, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0177] The units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0178] In addition, each functional unit in each embodiment of the application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0179] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for making an electronic device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0180] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A voice quality inspection method, characterized by, The method comprises: acquiring target dialogue voice; text conversion is carried out to the target dialogue voice, and target dialogue text is obtained; the target dialogue text is divided into semantic blocks and semantic block categories according to the target dialogue text, wherein the semantic block category represents the category to which the target semantic block belongs; information is searched in a preset knowledge graph according to the target semantic block, and entity triple text is obtained, including: entity recognition is performed on each sentence of the target semantic block to obtain a target entity; semantic entity extraction is performed on the knowledge graph according to the target entity and the semantic block category to obtain an entity full name and an entity category, and 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; a standard semantic sentence is obtained by reading a sentence in a preset semantic sentence database according to the semantic block category; text fusion is performed on the semantic block category, the standard semantic sentence, the target semantic block and the entity triple text to obtain target quality inspection prompt text; the target quality inspection prompt text is inspected to obtain a voice quality inspection result, wherein the voice quality inspection result is used to represent that the target dialogue voice is qualified or unqualified.
2. The method of claim 1, wherein, The target dialogue text is divided into target semantic blocks and semantic block categories according to the target dialogue text, including: target key words are obtained by detecting key words in the target dialogue text; target semantic blocks and semantic block categories are generated according to the target key words, wherein the target semantic block is empty; the sentence containing the target key words in the target dialogue text is taken as a first candidate sentence, and the first candidate sentence is added to the target semantic block; context extraction is performed on the sentences in the target dialogue text according to the first candidate sentence to obtain a second candidate sentence, and the second candidate sentence is added to the target semantic block.
3. The method of claim 2, wherein, The context extraction is performed on the sentences in the target dialogue text according to the first candidate sentence to obtain a second candidate sentence, including: the sentence adjacent to and before the first candidate sentence in the target dialogue text is determined as a target question sentence; a first question and answer pair recognition category is obtained by performing question and answer pair recognition on the target question sentence and the first candidate sentence; if the first question and answer pair recognition category represents that the target question sentence and the first candidate sentence are a question and answer pair, the target question sentence is determined as the second candidate sentence; the sentence adjacent to and after the first candidate sentence in the target dialogue text is determined as a target answer sentence; a second question and answer pair recognition category is obtained by performing question and answer pair recognition on the first candidate sentence and the target answer sentence; if the second question and answer pair recognition category represents that the first candidate sentence and the target answer sentence are a question and 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 the text fusion according to the semantic block category, the standard semantic sentence, the target semantic block, and the entity triple text is performed to obtain a target quality inspection prompt text, the method further comprises: calculating the similarity of the standard semantic sentence and each sentence in the target semantic block to obtain a sentence similarity; filtering each sentence in the target semantic block according to the sentence similarity, and updating the target semantic block.
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 comprises: performing text quality inspection on the target quality inspection prompt text by using 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 represent that the target semantic block is qualified or unqualified in quality inspection; determining the voice quality inspection result 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 semantic entity extraction of the knowledge graph according to the target entity and the semantic block category comprises: performing entity comparison on candidate entities in the knowledge graph according to the target entity to obtain an initial selected entity; extracting a name corresponding to the initial selected entity from the knowledge graph to obtain an initial selected entity complete name, and extracting a category corresponding to the initial selected entity complete name from the knowledge graph to obtain an initial selected entity category, determining the initial selected entity category that is the same as the semantic block category as the entity category; determining the initial selected entity complete name corresponding to the entity category as the entity complete name.
7. A voice quality monitoring device, characterized by The device comprises: a voice acquisition module configured to acquire target dialogue voice; a text conversion module configured to perform text conversion on the target dialogue voice to obtain target dialogue text; a semantic division module configured to perform semantic division on the target dialogue text to obtain a target semantic block and a semantic block category; wherein the semantic block category represents a category to which the target semantic block belongs; an information searching module configured to search a preset knowledge graph according to the target semantic block to obtain an entity triple text, comprising: performing entity recognition on each sentence of the target semantic block to obtain a target entity; performing semantic entity extraction of the knowledge graph according to the target entity and the semantic block category to obtain an entity complete name and an entity category, the entity category being the same as the semantic block category; and generating the entity triple text according to the target entity, the entity complete name, and the entity category; a sentence searching module configured to read a standard semantic sentence from a preset semantic sentence database according to the semantic block category to obtain a standard semantic sentence; a text fusion module configured 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. A result determining module is configured 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 represent that the target dialogue voice is qualified or unqualified in quality inspection.
8. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the method of any one of claims 1 to 6.
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