Method, device and equipment for checking verbal skill consistency, medium and product

By converting recorded conversations into text data and using intent recognition and acoustic models, combined with role separation and standard customer service voiceprint vectors, we can verify the consistency of customer service scripts. This solves the shortcomings of existing technologies in assessing coherence and stability, and improves assessment efficiency and accuracy.

CN121835648APending Publication Date: 2026-04-10CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-10

Smart Images

  • Figure CN121835648A_ABST
    Figure CN121835648A_ABST
Patent Text Reader

Abstract

The invention discloses a verbal skill consistency checking method. The method comprises the following steps: converting an obtained conversation record into text data; based on the audio type of the dialogue record, performing role separation on the dialogue record, and extracting a dialogue text of a target customer service; using a pre-trained intention recognition model to recognize and label the intention category of each dialogue text, and classifying the dialogue texts according to the intention categories; and obtaining a standard verbal skill corresponding to each intention category, and performing consistency check on the dialogue text based on the standard verbal skill. According to the invention, the efficiency, precision and intelligent level of verbal skill consistency inspection can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of customer service script technology, and in particular to a method, apparatus, equipment, medium and product for verifying script consistency. Background Technology

[0002] Outbound call scripts are pre-reported dialogue content designed to standardize customer service work and ensure smooth communication. To guarantee the quality of customer service, it is necessary to verify the consistency between the call content and the standard scripts. Existing solutions mainly focus on keyword matching or rule judgment for single calls, lacking continuous tracking and analysis of the consistency of scripts in different calls for the same agent. This makes it difficult to assess their coherence and stability, and the reliance on fixed keywords and template matching makes it difficult to adapt to the characteristics of natural language expression, resulting in frequent misjudgments and omissions. Summary of the Invention

[0003] This invention provides a method for verifying the consistency of statements, which can effectively improve the efficiency, accuracy and intelligence of statements consistency verification.

[0004] In a first aspect, embodiments of the present invention provide a method for verifying the consistency of speech, including: Convert the acquired dialogue recordings into text data; Based on the audio type of the recorded conversation, the conversation is separated into roles, and the text of the conversation with the target customer service representative is extracted. Using a pre-trained intent recognition model, the intent category of each dialogue text is identified and labeled, and the dialogue text is classified according to the intent category; Obtain the standard dialogue text corresponding to each intent category, and perform a consistency check on the dialogue text based on the standard dialogue text.

[0005] Furthermore, the process of converting the acquired dialogue recordings into text data includes: Acquire the dialogue recording, and preprocess the dialogue recording to obtain a Mel spectrogram; The acoustic model is used to identify the Mel spectrogram, and the character probability sequence of each frame is output. By combining the language model, the linguistic plausibility probability of each character in the character probability sequence is calculated, and text data is output based on the linguistic plausibility probability.

[0006] Furthermore, the acoustic model adopts the Conformer-CTC model, which uses a multi-layer Conformer Block as the encoder.

[0007] Furthermore, when the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

[0008] Furthermore, when the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

[0009] Furthermore, the step of determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

[0010] Furthermore, the method also includes: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

[0011] Furthermore, the process of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

[0012] Furthermore, the training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

[0013] Furthermore, the method also includes: A binary cross-entropy loss function is constructed based on the true intent type and the predicted intent type identified by the intent recognition model; The intent recognition model is optimized by minimizing the binary cross-entropy loss function.

[0014] Furthermore, after classifying the dialogue text according to the intent category, the method further includes: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

[0015] Furthermore, the training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

[0016] Furthermore, the consistency check of the dialogue text based on the standard jargon includes: Obtain the standard semantic vector of the standard utterance; Calculate the second cosine similarity between the semantic embedding vector of the dialogue text and the standard semantic vector; Based on the second cosine similarity and the preset similarity grading interval, the consistency test result of the dialogue text is determined.

[0017] Furthermore, determining the consistency check result of the dialogue text based on the second cosine similarity and a preset similarity grading interval includes: When the second cosine similarity is within the preset first similarity grading range, the consistency of the dialogue text is determined to be excellent; When the second cosine similarity is within the preset second similarity grading interval, the consistency of the dialogue text is determined to be good. When the second cosine similarity is within the preset third similarity grading range, the consistency of the dialogue text is determined to be general. When the second cosine similarity is within the preset fourth similarity grading interval, the consistency of the dialogue text is determined to be poor. The similarity of the first similarity grading interval, the second similarity grading interval, the third similarity grading interval, and the fourth similarity grading interval decreases progressively.

[0018] Secondly, embodiments of the present invention provide a speech consistency verification device, comprising: The text conversion module is used to convert the acquired dialogue recordings into text data; The role separation module is used to separate the roles in the dialogue recording based on the audio type of the dialogue recording and extract the dialogue text of the target customer service representative. The intent recognition module is used to identify and label the intent category of each dialogue text using a pre-trained intent recognition model, and classify the dialogue text according to the intent category; The consistency verification module is used to obtain the standard dialogue text corresponding to each intent category and perform consistency verification on the dialogue text based on the standard dialogue text.

[0019] Furthermore, the text conversion module is specifically used for: Acquire the dialogue recording, and preprocess the dialogue recording to obtain a Mel spectrogram; The acoustic model is used to identify the Mel spectrogram, and the character probability sequence of each frame is output. By combining the language model, the linguistic plausibility probability of each character in the character probability sequence is calculated, and text data is output based on the linguistic plausibility probability.

[0020] Furthermore, when the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

[0021] Furthermore, when the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

[0022] Furthermore, the step of determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

[0023] Furthermore, the device also includes a standardization processing module for: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

[0024] Furthermore, the process of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

[0025] Furthermore, the training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

[0026] Furthermore, the device also includes a vector conversion module for: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

[0027] Furthermore, the training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

[0028] Thirdly, embodiments of the present invention provide an electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program; Wherein, when the processor executes the computer program, it implements the speech consistency verification method described in any of the first aspects above.

[0029] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed, implements the speech consistency verification method described in any of the first aspects above.

[0030] Fifthly, embodiments of the present invention provide a computer program product, including computer instructions, which, when executed by a processor, implement the speech consistency verification method described in any of the first aspects above.

[0031] Compared with existing technologies, the dialogue consistency verification method provided by this invention has the following advantages: It converts the acquired dialogue recordings into text data; based on the audio type of the dialogue recordings, it performs role separation on the recordings and extracts the dialogue text of the target customer service representative; using a pre-trained intent recognition model, it identifies and labels the intent category of each dialogue text and classifies the dialogue text according to the intent category; it obtains the standard dialogue text corresponding to each intent category and performs consistency verification on the dialogue text based on the standard dialogue text. This invention can effectively improve the efficiency, accuracy, and intelligence level of dialogue consistency verification. Attached Figure Description

[0032] To more clearly illustrate the technical features of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating a speech consistency verification method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a speech consistency verification device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] It should be noted that although functional modules are divided in the device schematic diagram and a 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 aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0036] 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 invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0037] Firstly, embodiments of the present invention provide a method for verifying the consistency of speech, see [link to relevant documentation]. Figure 1 This is a flowchart illustrating an embodiment of a speech consistency verification method provided by the present invention.

[0038] like Figure 1 As shown, the method includes the following steps: S1: Convert the acquired dialogue recordings into text data; Specifically, the process involves acquiring recordings of conversations between customer service representatives and customers, converting these recordings into text data, and then directly processing the text data in subsequent workflows.

[0039] S2: Based on the audio type of the recorded conversation, perform role separation on the recorded conversation and extract the dialogue text of the target customer service representative; Specifically, based on the audio type of the dialogue recording, a differentiated role separation scheme is adopted to identify and label the dialogue recordings as target customer service representatives and customers, and extract the dialogue text of the target customer service representatives, so that subsequent analysis can focus more on the service quality and consistency of the customer service representatives' words.

[0040] S3: Using a pre-trained intent recognition model, identify and label the intent category of each dialogue text, and classify the dialogue text according to the intent category; Specifically, using a pre-trained intent recognition model to label the intent categories of customer service dialogue texts and classifying the dialogue texts according to intent categories can better grasp the key information of the dialogue and provide a more targeted basis for subsequent consistency checks.

[0041] S4: Obtain the standard dialogue text corresponding to each intent category, and perform a consistency check on the dialogue text based on the standard dialogue text.

[0042] Specifically, a consistency quantification test is performed on customer service texts and standard scripts of the same intent category. This quantifies the degree of matching between the target customer service dialogue text and the standard script, thereby determining whether the customer service representative responded in accordance with the standard requirements. The test results are output, which can provide feedback for enterprises to continuously improve service processes, prompting customer service representatives to follow standard requirements and improve the overall quality and consistency of service.

[0043] In summary, this invention converts recorded conversations into text data, significantly improving the efficiency and convenience of data processing. By employing a differentiated role separation scheme based on the audio type of the conversation recording, it can more accurately identify target customer service representatives and customers, improving the efficiency and focus of analysis and more accurately evaluating customer service performance in conversations. Using a pre-trained intent recognition model to label the intent categories of customer service conversation texts, the texts are categorized according to intent categories, allowing subsequent analysis to be conducted separately for different types of intents. This enables more accurate verification of the consistency of customer service statements in different intent scenarios. Furthermore, by quantitatively verifying the consistency between customer service texts of the same intent category and standard statements, it allows for an objective and quantitative assessment of customer service quality, effectively improving the efficiency, accuracy, and intelligence level of statement consistency verification.

[0044] In an optional implementation manner, the conversion of the obtained conversation recording into text data includes: Obtain the conversation recording, and perform preprocessing on the conversation recording to obtain a Mel spectrogram; Use an acoustic model to recognize the Mel spectrogram, and output a character probability sequence for each frame; In combination with a language model, calculate the language rationality probability of each character in the character probability sequence, and output text data based on the language rationality probability.

[0045] Specifically, the original conversation recordings collected from different devices and different scenarios are uniformly standardized to a sampling rate of 16 kHz to ensure the consistency of the input audio format, and the RNNoise algorithm is used to perform noise reduction processing on the recordings to reduce background noise. Then, the processed audio signal is converted into a Mel spectrogram.

[0046] Input the converted Mel spectrogram into the acoustic model, model the preprocessed Mel spectrogram, convert the acoustic features into a character probability sequence, generate a character probability sequence corresponding to each frame of speech, and optimize the character probability sequence through CTC decoding. Based on the character probability sequence output by the acoustic model, find the target text sequence that is most likely to correspond to the speech semantics. The core of CTC decoding is to maximize the path probability, and the mathematical expression is: ; Where, is the input Mel spectrogram, is the target text sequence, is a possible intermediate path, is the set of all possible intermediate paths obtained by expanding the target text sequence y, is the total probability corresponding to the target text sequence y.

[0047] To solve the problem that the acoustic model may have correct characters but unreasonable combinations, such as recognizing "handle business" as "half handle business", an external language model is introduced to fuse the language rationality constraint. The fusion formula is as follows: ; Where, is the final score of the target text sequence y, and the higher the score, the more likely y is the correct text, is the probability of the target text sequence y output by the acoustic model (i.e., the above ), is the language rationality probability of the target text sequence y output by the language model, is the fusion coefficient, which is used to adjust the weight ratio of the acoustic model and the language model and can be fine-tuned according to the business scenario data.

[0048] Iterate through all possible text sequences and calculate the value of each sequence. The sequence with the highest score is selected as the final output text data.

[0049] This embodiment accurately converts recorded dialogues into structured text data, which can effectively improve the accuracy of speech-to-text conversion, reduce misidentification caused by similar acoustic features or unreasonable character combinations, and provide more reliable basic data for subsequent dialogue consistency analysis.

[0050] In one alternative implementation, the acoustic model employs a Conformer-CTC model, which uses a multi-layer Conformer Block as the encoder.

[0051] Specifically, in this embodiment, the acoustic model can adopt the Conformer-CTC model. The input layer of the model receives the feature sequence of the Mel spectrogram, and each feature vector corresponds to one frame of speech. The encoder of the model consists of multiple layers of Conformer Blocks stacked together. The structure of each Conformer Block is as follows: LayerNorm (layer normalization) -> FeedForward (feedforward network) -> MHSA (multi-head self-attention mechanism) -> ConvModule (convolutional module) -> FeedForward (feedforward network) -> LayerNorm (layer normalization); The model's output layer uses a CTC (Connected Temporal Classification) output layer to decode the features extracted by the encoder and output the character probability distribution corresponding to each frame of speech, that is, the probability of each candidate character in that frame.

[0052] This embodiment uses the Conformer-CTC model to identify the Mel spectrogram, which can extract speech acoustic features more accurately, greatly improve the speech recognition accuracy, and provide a high-quality text foundation for subsequent dialogue consistency analysis.

[0053] In one optional implementation, when the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

[0054] Specifically, when the audio type is dual-channel recording, the left and right channels of the dual-channel recording correspond to different speakers. Therefore, the audio is directly split into left and right channel audio through audio parsing technology. Based on the business scenario, clear role determination rules are preset, and the target customer service is locked through rule matching. For example, in the scenario where the customer service takes the initiative to make outbound calls or greets, the channel that initiates the call and generates the voice signal first corresponds to the target customer service.

[0055] This embodiment uses audio parsing technology to directly separate the left and right audio channels, and then accurately identifies the target customer service representative based on preset business rules, enabling quick and accurate role separation.

[0056] In an optional implementation, when the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

[0057] Specifically, when the audio type is mixed single-channel recording, the VAD algorithm based on the Conformer model is used to filter out valid speech segments from the mixed single-channel recording, removing invalid information such as silent intervals, speech overlap segments, and environmental noise segments. The VAD algorithm accurately identifies the start and end boundaries of speech by capturing the temporal and spectral characteristics of the speech signal, and outputs the valid speech segments in the form of time interval sets. The mathematical expression is: ; in, The total number of valid speech segments is determined by the frame-level judgment result of the VAD algorithm. Let be the start timestamp of the i-th valid speech segment. Let be the end timestamp of the i-th valid speech segment.

[0058] For each valid speech segment, Fourier transform and Mel filtering are performed to generate a Mel spectrogram. This Mel spectrogram is then input into the ECAPA-TDNN model. Through the collaborative processing of the model's convolutional layers, attention layers, and fully connected layers, the core speaker voiceprint features are extracted, generating an embedding vector. The mathematical expression is as follows: ; in, Let be the Mel spectrogram of the i-th valid speech segment. Let be the speaker embedding vector for the i-th valid speech segment.

[0059] Based on the similarity of the embedded vectors, all valid speech segments are clustered into two categories, with each cluster corresponding to a speaker, thus achieving separation of multiple speakers in a single channel. Based on the preset standard customer service voiceprint vector, one of the two speakers is selected as the target customer service representative.

[0060] This embodiment can achieve accurate separation and role labeling of multiple speakers in a single channel, providing accurate speaker identification for dialogue consistency analysis and improving the reliability and effectiveness of the analysis.

[0061] In one optional implementation, determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

[0062] Specifically, the system pre-stores standard customer service voiceprint vectors. This vector is generated from training voice samples of customer service personnel and serves as a fixed reference vector. The first cosine similarity between the center embedding vectors of the two clusters and the standard customer service voiceprint vector is calculated, and the mathematical expression is as follows: ; in, This represents the embedding vector generated from any speech segment. The first cosine similarity, They are vectors and The Euclidean norm (modulus) is used for normalization calculations.

[0063] The first cosine similarity between the two clusters is calculated. The higher the value, the more similar it is to the standard customer service voiceprint features. The speaker corresponding to the higher cluster is selected and labeled as the target customer service.

[0064] This embodiment can quantify the similarity between the speaker's voiceprint and the standard customer service voiceprint, accurately and efficiently identifying the target customer service representative from two speakers, providing a reliable basis for subsequent dialogue consistency analysis.

[0065] In an optional implementation, the method further includes: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

[0066] Specifically, to address the issues of explicit noise and formatting in target customer service dialogue texts, based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text, including meaningless interjections, filler words, and expressions unrelated to the core business. According to a pre-built symbol mapping table, the symbols in the dialogue text are converted, non-standard punctuation marks are uniformly mapped to standard symbols, and the representation of numbers and English letters in the text is standardized to avoid inconsistencies in semantic features due to differences in expression.

[0067] Furthermore, a collaborative mechanism of regular template optimization and BiLSTM model discrimination is adopted to perform secondary fine cleaning of the text, further improving the purity and standardization of the text and forming a standard text sequence.

[0068] This embodiment standardizes the target customer service dialogue text, improving its quality and standardization. This provides a cleaner and more unified data foundation for subsequent dialogue consistency analysis, which helps improve the accuracy and reliability of the analysis results.

[0069] In one optional implementation, the step of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

[0070] Specifically, an intent recognition model is constructed and trained. For each dialogue text, the two sentences preceding and following the current statement are concatenated. The concatenated context sequence is then input into the BERT model to generate a semantic vector that expresses the context of the current statement. The formula is as follows: ; in, The dialogue text representing the intent to be identified. This refers to the two sentences preceding and following the current statement.

[0071] semantic vectors The input is fed into the trained intent recognition model, where the semantic vector undergoes a linear transformation and temperature coefficient adjustment. The single intent probability is then output via Softmax activation, as shown in the following formula: ; in, This represents the probability distribution of the current text belonging to each single intent category. This is the classification weight matrix. For bias vectors, The temperature coefficient (when T>1, it can reduce model confidence and improve generalization robustness).

[0072] It should be noted that, based on business analysis needs, a probability vector can also be output for the current text belonging to each business intent tag, as shown in the following formula: ; in, It is the Sigmoid activation function. This is the probability vector of the current text belonging to each business intent tag.

[0073] Based on the probability values ​​output by the model, the intent category of the current dialogue text is determined and labeled.

[0074] This embodiment uses an intent recognition model to identify the intent in the dialogue text, which can effectively improve the accuracy and reliability of intent recognition and provide accurate intent annotation for subsequent dialogue consistency analysis.

[0075] In one optional implementation, the training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

[0076] Specifically, multiple historical dialogue texts from the target customer service business scenario are collected. For each historical dialogue text, it is concatenated according to a preset context window, and a historical semantic vector is generated by the BERT encoder. The true intent type of each historical dialogue text is labeled, and the historical semantic vector is paired with the corresponding true intent label to form a basic training sample set.

[0077] To simulate transcription noise and colloquial expressions in real-world scenarios, adversarial semantic vectors are constructed to improve the model's tolerance to noise and colloquial expressions in speech transcription. The formula is as follows: ; in, For the generated adversarial semantic vectors, The original historical semantic vector, The interference intensity coefficient, For loss function right The gradient represents the direction of the influence of small changes in the semantic vector on the intent recognition result. The sign function is used to determine the direction of the interference by taking the sign of the gradient.

[0078] Since the adversarial semantic vectors only add surface perturbations, and the core semantics are consistent with the original historical semantic vectors, the true intent labels of the original samples are directly used to form the adversarial training sample set.

[0079] The basic training sample set and the adversarial training sample set are mixed in a preset ratio to form the final training sample set, which is then used to train the intent recognition model.

[0080] This embodiment constructs an adversarial training sample set and trains the model by mixing the basic training sample set and the adversarial training sample set. This allows the model to learn the semantic features and intent correspondence of normal dialogue, and also enhances its tolerance to speech transcription noise and colloquial expressions by leveraging adversarial semantic vectors, thereby improving the model's robustness and generalization.

[0081] In an optional implementation, the method further includes: A binary cross-entropy loss function is constructed based on the true intent type and the predicted intent type identified by the intent recognition model; The intent recognition model is optimized by minimizing the binary cross-entropy loss function.

[0082] Specifically, based on the true intent type and the model-predicted intent type, a binary cross-entropy loss function adapted to multi-intent scenarios is constructed, as follows: ; in, This represents the total loss value. The smaller the loss value, the closer the model's prediction is to the true intention. For the true value of the j-th intent label, Let be the predicted probability of the j-th intent tag, where j is the intent tag index, with a value range of [1, J], and J is the preset total number of business intent tags.

[0083] The intent recognition model is optimized by finding the optimal parameters to minimize the total loss. The optimal parameters from the training process are then saved as the final intent recognition model.

[0084] This embodiment constructs a binary cross-entropy loss function based on the true intent type and the predicted intent type, and optimizes the intent recognition model by minimizing this loss function. This can accurately measure the difference between the model's prediction results and the true intent, and effectively improve the model's recognition accuracy in multi-intent scenarios.

[0085] In an optional implementation, after classifying the dialogue text according to the intent category, the method further includes: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

[0086] Specifically, by using a pre-trained semantic embedding model, dialogue texts of the same intent category are input into the model to generate high-dimensional semantic embedding vectors of fixed dimensions. These vectors can be directly used for subsequent semantic consistency scoring of the same intent. By calculating the similarity between vectors, the level of consistency of the speech of different customer service representatives and different calls can be quantified.

[0087] In one optional implementation, the training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

[0088] Specifically, for each business intent category, a training sample set is constructed, which includes the current sample, positive training samples, and negative training samples. Positive training samples are texts that are semantically equivalent to the current sample but have different expressions, while negative training samples are texts that have different semantics from the current sample (different intents or differences in the core semantics of the agreement graph).

[0089] The semantic embedding model can adopt the SimCSE-BERT model. The training sample set is input into the model, and the model is trained through a contrastive learning mechanism to capture semantic similarity features. During training, the InfoNCE loss function is constructed to quantify the model's prediction bias. The loss value is minimized through backpropagation to optimize the model parameters. The expression is as follows: ; in, This is the semantic embedding vector of the current sample. The semantic embedding vector of the positive sample. The semantic embedding vector of the negative sample. The cosine similarity function is used. This represents the total number of negative samples.

[0090] The semantic embedding model training method in this embodiment allows the model to fully learn the similarities and differences in semantics, improves the model's ability to represent semantics, and enables the generated semantic vectors to more accurately reflect the semantics of the dialogue text.

[0091] In one optional implementation, the consistency check of the dialogue text based on the standard dialogue script includes: Obtain the standard semantic vector of the standard utterance; Calculate the second cosine similarity between the semantic embedding vector of the dialogue text and the standard semantic vector; Based on the second cosine similarity and the preset similarity grading interval, the consistency test result of the dialogue text is determined.

[0092] Specifically, standard dialogue is input into the semantic embedding model to generate standard semantic vectors. For single-turn dialogue scenarios, the degree of matching between the semantic embedding vector of the customer service representative's actual dialogue and the standard semantic vector is calculated using cosine similarity. Higher similarity indicates greater semantic consistency, as shown in the formula: ; in, For standard discourse semantic vectors, Semantic embedding vectors of the actual customer service dialogue text. They are respectively and The Euclidean norm is used for normalization calculations.

[0093] It should be noted that, for multi-turn dialogue scenarios, the ratio of the intersection to the union of sets is used to quantify the consistency of intent coverage. This is equivalent to the second cosine similarity mentioned above, and the formula is: ; in, This is a set of intent sequences for standard multi-turn conversations. This is a set of intent sequences from actual multi-turn conversations with customer service representatives.

[0094] Finally, based on the second cosine similarity and the preset similarity grading interval, the consistency test result of the dialogue text is determined.

[0095] This embodiment can measure the semantic similarity between dialogue text and standard script with quantitative values. It uses cosine similarity to intuitively reflect semantic closeness. Combined with hierarchical intervals, it can quickly and accurately determine whether dialogue text meets the requirements of standard script, effectively improving the objectivity and accuracy of consistency testing.

[0096] In one optional implementation, determining the consistency check result of the dialogue text based on the second cosine similarity and a preset similarity grading interval includes: When the second cosine similarity is within the preset first similarity grading range, the consistency of the dialogue text is determined to be excellent; When the second cosine similarity is within the preset second similarity grading interval, the consistency of the dialogue text is determined to be good. When the second cosine similarity is within the preset third similarity grading range, the consistency of the dialogue text is determined to be general. When the second cosine similarity is within the preset fourth similarity grading interval, the consistency of the dialogue text is determined to be poor. The similarity of the first similarity grading interval, the second similarity grading interval, the third similarity grading interval, and the fourth similarity grading interval decreases progressively.

[0097] Specifically, based on the standardized requirements for customer service scripts, four progressively decreasing similarity grading intervals are defined. The interval boundary values ​​can be flexibly adjusted according to the actual business scenario. The default interval definitions are as follows: First similarity grading interval ( (), which represents a high similarity interval, corresponding to scenarios with highly consistent semantics; Second similarity grading interval (0.8 < (), which represents the medium to high similarity range, corresponding to scenarios with basically the same semantics; The third similarity grading interval (0.6 < (), which represents a medium similarity range, corresponding to scenarios with partially consistent semantics; Fourth similarity grading interval ( (), represents a low similarity interval, corresponding to scenarios with significant semantic differences.

[0098] The calculated second cosine similarity is matched with the preset grading intervals. When it matches the first similarity grading interval, it is judged as excellent consistency. When it matches the second similarity grading interval, it is judged as good consistency. When it matches the third similarity grading interval, it is judged as average consistency. When it matches the fourth similarity grading interval, it is judged as poor consistency.

[0099] This embodiment categorizes the consistency of dialogue text into four levels—excellent, good, average, and poor—based on the second cosine similarity and four preset similarity grading intervals. This allows for a more accurate and detailed assessment of the degree of matching between dialogue text and standard scripts.

[0100] Secondly, embodiments of the present invention provide a speech consistency verification device, see [link to relevant documentation]. Figure 2 This is a schematic diagram of one embodiment of a speech consistency verification device provided by the present invention.

[0101] like Figure 2 As shown, the device includes: The text conversion module 21 is used to convert the acquired dialogue recordings into text data; The role separation module 22 is used to separate the roles of the dialogue recording based on the audio type of the dialogue recording and extract the dialogue text of the target customer service representative. The intent recognition module 23 is used to identify and label the intent category of each dialogue text using a pre-trained intent recognition model, and classify the dialogue text according to the intent category; The consistency verification module 24 is used to obtain the standard dialogue text corresponding to each intent category and perform consistency verification on the dialogue text based on the standard dialogue text.

[0102] In one optional implementation, the text conversion module is specifically used for: Acquire the dialogue recording, and preprocess the dialogue recording to obtain a Mel spectrogram; The acoustic model is used to identify the Mel spectrogram, and the character probability sequence of each frame is output. By combining the language model, the linguistic plausibility probability of each character in the character probability sequence is calculated, and text data is output based on the linguistic plausibility probability.

[0103] In one optional implementation, when the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

[0104] In an optional implementation, when the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

[0105] In one optional implementation, determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

[0106] In one alternative embodiment, the apparatus further includes a standardization processing module for: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

[0107] In one optional implementation, the step of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

[0108] In one optional implementation, the training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

[0109] In an optional implementation, the apparatus further includes a vector transformation module for: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

[0110] In one optional implementation, the training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

[0111] It should be noted that the speech consistency verification device provided in this embodiment of the invention is used to execute all the process steps of the speech consistency verification method in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.

[0112] Thirdly, embodiments of the present invention provide an electronic device, see [link to previous document]. Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of the present invention.

[0113] like Figure 3 As shown, the device includes: Memory 31 is used to store computer programs; Processor 32 is used to execute the computer program; When the processor 32 executes the computer program, it implements the speech consistency verification method as described in any of the above embodiments.

[0114] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0115] The processor 32 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0116] The memory 31 can be used to store the computer programs and / or modules. The processor 32 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 31 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0117] It should be noted that the aforementioned electronic devices include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 3 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device. It may include more components than shown in the diagram, or combine certain components, or use different components.

[0118] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed, implements the speech consistency verification method described in any of the above embodiments.

[0119] It should be understood that the implementation of all or part of the above-mentioned method for verifying consistency of statements can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the above-mentioned method for dividing the three zones of spontaneous combustion in goaf areas. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0120] Fifthly, embodiments of this application also provide a computer program product, which is stored in a storage medium and executed by at least one processor to implement the speech consistency verification method described in any of the above embodiments.

[0121] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. It should be noted that, for those skilled in the art, several equivalent obvious modifications and / or equivalent substitutions can be made without departing from the technical principles of the present invention, and these obvious modifications and / or equivalent substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A method for verifying the consistency of sales scripts, characterized in that, include: Convert the acquired dialogue recordings into text data; Based on the audio type of the recorded conversation, the conversation is separated into roles, and the text of the conversation with the target customer service representative is extracted. Using a pre-trained intent recognition model, the intent category of each dialogue text is identified and labeled, and the dialogue text is classified according to the intent category; Obtain the standard dialogue text corresponding to each intent category, and perform a consistency check on the dialogue text based on the standard dialogue text.

2. The method for verifying the consistency of statements as described in claim 1, characterized in that, The process of converting the acquired dialogue recordings into text data includes: Acquire the dialogue recording, and preprocess the dialogue recording to obtain a Mel spectrogram; The acoustic model is used to identify the Mel spectrogram, and the character probability sequence of each frame is output. By combining the language model, the linguistic plausibility probability of each character in the character probability sequence is calculated, and text data is output based on the linguistic plausibility probability.

3. The method for verifying the consistency of statements as described in claim 2, characterized in that, The acoustic model adopts the Conformer-CTC model, which uses a multi-layer Conformer Block as the encoder.

4. The method for verifying consistency of statements as described in claim 1, characterized in that, When the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

5. The method for verifying the consistency of statements as described in claim 1, characterized in that, When the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

6. The method for verifying the consistency of statements as described in claim 5, characterized in that, The method of determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

7. The method for verifying consistency of statements as described in claim 1, characterized in that, The method further includes: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

8. The method for verifying consistency of statements as described in claim 1, characterized in that, The process of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

9. The method for verifying consistency of statements as described in claim 8, characterized in that, The training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

10. The method for verifying the consistency of statements as described in claim 9, characterized in that, The method further includes: A binary cross-entropy loss function is constructed based on the true intent type and the predicted intent type identified by the intent recognition model; The intent recognition model is optimized by minimizing the binary cross-entropy loss function.

11. The method for verifying consistency of statements as described in claim 1, characterized in that, After classifying the dialogue text according to the intent category, the method further includes: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

12. The method for verifying the consistency of statements as described in claim 11, characterized in that, The training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

13. The method for verifying the consistency of statements as described in claim 11, characterized in that, The consistency check of the dialogue text based on the standard jargon includes: Obtain the standard semantic vector of the standard utterance; Calculate the second cosine similarity between the semantic embedding vector of the dialogue text and the standard semantic vector; Based on the second cosine similarity and the preset similarity grading interval, the consistency test result of the dialogue text is determined.

14. The method for verifying consistency of statements as described in claim 13, characterized in that, The determination of the consistency check result of the dialogue text based on the second cosine similarity and a preset similarity grading interval includes: When the second cosine similarity is within the preset first similarity grading range, the consistency of the dialogue text is determined to be excellent; When the second cosine similarity is within the preset second similarity grading interval, the consistency of the dialogue text is determined to be good. When the second cosine similarity is within the preset third similarity grading range, the consistency of the dialogue text is determined to be general. When the second cosine similarity is within the preset fourth similarity grading interval, the consistency of the dialogue text is determined to be poor. The similarity of the first similarity grading interval, the second similarity grading interval, the third similarity grading interval, and the fourth similarity grading interval decreases progressively.

15. A speech consistency verification device, characterized in that, include: The text conversion module is used to convert the acquired dialogue recordings into text data; The role separation module is used to separate the roles in the dialogue recording based on the audio type of the dialogue recording and extract the dialogue text of the target customer service representative. The intent recognition module is used to identify and label the intent category of each dialogue text using a pre-trained intent recognition model, and classify the dialogue text according to the intent category; The consistency verification module is used to obtain the standard dialogue text corresponding to each intent category and perform consistency verification on the dialogue text based on the standard dialogue text.

16. The speech consistency verification device as described in claim 15, characterized in that, The text conversion module is specifically used for: Acquire the dialogue recording, and preprocess the dialogue recording to obtain a Mel spectrogram; The acoustic model is used to identify the Mel spectrogram, and the character probability sequence of each frame is output. By combining the language model, the linguistic plausibility probability of each character in the character probability sequence is calculated, and text data is output based on the linguistic plausibility probability.

17. The speech consistency verification device as described in claim 15, characterized in that, When the audio type is dual-channel recording, the role separation of the dialogue recording includes: Obtain the left and right channel audio from a dual-channel recording; The target customer service representative is determined from the left and right audio channels based on preset business rules.

18. The speech consistency verification device as described in claim 15, characterized in that, When the audio type is a mixed single-channel recording, the role separation of the dialogue recording includes: The VAD algorithm was used to identify valid speech segments in the recorded dialogue. Feature extraction is performed on each of the effective speech segments to generate a Mel spectrogram; The Mel spectrogram is encoded using the ECAPA-TDNN model to generate speaker embedding vectors; The speaker embedding vectors are clustered to obtain two clusters, each cluster corresponding to one speaker; Based on the preset standard customer service voiceprint vector, the target customer service representative is identified from two speakers.

19. The speech consistency verification device as described in claim 18, characterized in that, The method of determining the target customer service representative from two speakers based on a preset standard customer service voiceprint vector includes: Calculate the first cosine similarity between the center embedding vector of each cluster and the preset standard customer service voiceprint vector; The speaker corresponding to the cluster with higher cosine similarity to the first cluster is labeled as the target customer service representative.

20. The speech consistency verification device as described in claim 15, characterized in that, The device also includes a standardization processing module for: The dialogue text of the target customer service representative is standardized, including: Based on preset text cleaning rules, non-linguistic symbols and non-business statements are removed from the dialogue text; The symbols in the dialogue text are converted according to a pre-built symbol mapping table.

21. The speech consistency verification device as described in claim 15, characterized in that, The process of using a pre-trained intent recognition model to identify and label the intent category of each dialogue text includes: Build and train an intent recognition model; For each dialogue text, a preset number of preceding and following statements are obtained to form a semantic vector; The semantic vector is input into the trained intent recognition model, and the probability value of each dialogue text belonging to each preset intent category is output. The intent category of each dialogue text is determined based on the probability value.

22. The speech consistency verification device as described in claim 21, characterized in that, The training process of the intent recognition model includes: Obtain the historical semantic vectors of multiple historical dialogue texts, and label the true intent type of each historical dialogue text; Construct adversarial semantic vectors, which are simulated and generated semantic vectors with noise; The historical semantic vector labeled with intent type and the adversarial semantic vector are combined into training samples; The intent recognition model is trained using the training samples.

23. The speech consistency verification device as described in claim 15, characterized in that, The device further includes a vector conversion module for: The dialogue text is converted into semantic embedding vectors using a pre-trained semantic embedding model.

24. The speech consistency verification device as described in claim 23, characterized in that, The training process of the semantic embedding model includes: For each intent category, a training sample set is constructed, wherein each training sample in the training sample set includes the current training sample, positive training samples that are semantically equivalent to the current training sample, and negative training samples that are semantically different from the current training sample. The semantic embedding model is trained using the training sample set; Construct the InfoNCE loss function, and optimize the semantic embedding model through backpropagation by minimizing the loss value of the loss function.

25. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program; The processor, when executing the computer program, implements the speech consistency verification method as described in any one of claims 1 to 14.

26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the speech consistency verification method as described in any one of claims 1 to 14.

27. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the speech consistency verification method as described in any one of claims 1 to 14.