Voice text analysis method and device based on large language model, and storage medium
By performing silent segment removal, duplicate content merging, and text optimization on the voice data of telecom operator customers, the problem of large token volume in the large-text voice data processing of telecom operator customers was solved, achieving efficient and accurate voice-text analysis and reducing computing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies suffer from low processing efficiency, poor accuracy, and high computational costs when processing large amounts of voice text from telecom operators' customers, especially when dealing with invalid content, repetitive sentences, and technical terms.
We employ a speech-text analysis method based on a large language model. Through optimization processes such as silence segment removal, repetitive content merging, specialized terminology database, and digital encoding rules, combined with hierarchical semantic extraction, we reduce token consumption and improve processing efficiency and accuracy.
By reducing the amount of voice and text data, the consumption of computing resources is reduced, the efficiency and accuracy of data processing are improved, and the voice processing capabilities of telecom operators are enhanced.
Smart Images

Figure CN121811883A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a speech text analysis method and device based on a large language model and a storage medium. BACKGROUND
[0002] In the field of artificial intelligence and natural language processing, when processing customer speech large text models, existing technologies mainly rely on traditional speech recognition and text processing technologies. These technologies convert customer speech input into text through automatic speech recognition (ASR), and then perform keyword extraction, intent recognition, and other processing on the text. However, with the continuous expansion of telecom operator business and the increasing diversification of customer needs, traditional technologies face increasing challenges in processing large text models.
[0003] Customer speech data of telecom operators often contains a large amount of invalid content, repeated statements, and professional terms and numerical information. Existing technologies often fail to effectively remove these invalid contents, resulting in a huge Token amount in text model processing, which not only increases the computational cost, but also reduces the processing accuracy and efficiency. In addition, existing technologies lack efficient compression and encoding methods when processing professional terms and numerical information, resulting in excessive Token consumption in text model processing. Therefore, how to improve the processing efficiency and accuracy of speech large text and reduce the computational cost, and provide more efficient and accurate speech processing solutions, has become a research direction in the field. SUMMARY
[0004] At least one embodiment of the present application provides a speech text analysis method and device based on a large language model and a storage medium, to solve the problem of low processing efficiency and accuracy and high computational cost caused by large Token amount in existing speech large text processing.
[0005] To solve the above technical problems, the present application is implemented as follows:
[0006] In a first aspect, the present application provides a speech text analysis method based on a large language model, comprising:
[0007] performing silence segment removal processing on the input first speech data to obtain second speech data;
[0008] performing repeated content merging processing on the second speech data based on speech recognition technology to obtain first text data;
[0009] performing optimization processing on the first text data based on a pre-set special term library and numerical encoding rules to obtain second text data;
[0010] According to the pre-acquired text processing model, the second text data is subjected to hierarchical semantic extraction to obtain key semantic information.
[0011] Preferably, the method as described above, the mute segment cutting processing comprises:
[0012] The first voice data is subjected to segmentation processing based on a voice activity detection (VAD) algorithm to obtain a plurality of voice segments;
[0013] According to the audio features in each of the voice segments, an activity probability of each of the voice segments is obtained;
[0014] According to a preset threshold value and the activity probability, a mute segment in the voice segment is determined;
[0015] The mute segment is cut from the first voice data.
[0016] Preferably, the method as described above, the repeating content merging processing of the second voice data based on the speech recognition technology to obtain the first text data comprises:
[0017] The second voice data is subjected to speech recognition based on the speech recognition technology to obtain initial text data;
[0018] The initial text data is subjected to feature extraction to obtain sentence features corresponding to each sentence;
[0019] According to the sentence features, similarity values between the sentences are obtained;
[0020] Target sentences with similarity values greater than a preset similarity value threshold are merged into one sentence to obtain the first text data.
[0021] Specifically, the method as described above, the optimization processing of the first text data based on the preset special term library and the digital coding rule to obtain the second text data comprises:
[0022] Special terms in the first text data are compressed into corresponding compact codes based on the special term library:
[0023] Digital sequences in the first text data are subjected to hash value coding based on the digital coding rule to obtain corresponding hash values;
[0024] The second text data is obtained according to the compact codes and the hash values.
[0025] Preferably, the method as described above, the hierarchical semantic extraction of the second text data according to the pre-acquired text processing model to obtain the key semantic information comprises:
[0026] According to the business intent classifier in the text processing model, the business intent classification of the second text data is performed to obtain an intent classification result and a model confidence;
[0027] If the model confidence is greater than a pre-obtained confidence threshold, a target keyword extraction mode corresponding to the intent classification result is obtained according to a pre-defined intent classification result and keyword extraction mode mapping table;
[0028] If the model confidence is less than or equal to the confidence threshold, the target keyword extraction mode is determined by dynamic mode selection according to the intent classification result and / or context information;
[0029] According to the target keyword extraction mode, the keyword extraction of the second text data is performed to obtain the key semantic information.
[0030] Specifically, the method as described above, the business intent classification of the second text data according to the business intent classifier in the text processing model to obtain an intent classification result comprises:
[0031] The second text data is subjected to word segmentation processing to obtain a plurality of words or phrases;
[0032] The words or phrases are mapped to word vectors with a fixed length, and a word vector matrix is constructed;
[0033] The word vector matrix is input into a pre-trained text convolutional neural network model to obtain the intent classification result.
[0034] Specifically, the method as described above, the dynamic mode selection according to the intent classification result and / or context information to determine the target keyword extraction mode comprises:
[0035] According to the intent classification result and / or context information, an intent priority classification is performed to determine a primary intent and a secondary intent;
[0036] If the influence degree value of the secondary intent on the primary intent is less than or equal to an influence degree threshold, the target keyword extraction mode is determined to be a high-priority mode;
[0037] If the influence degree value of the secondary intent on the primary intent is greater than the influence degree threshold, the target keyword extraction mode is determined to be a mixed extraction mode according to context information, and the mixed extraction mode comprises at least one of rule engine extraction, model extraction and manual intervention.
[0038] Preferably, the method as described above, the speech recognition technology-based repeated content merging processing of the second speech data obtains first text data, comprising:
[0039] According to a preset fragmentation rule, the second speech data is divided into a plurality of speech segments;
[0040] The speech segments are subjected to speech recognition to obtain corresponding basic text segments, and context labels are generated for each basic text segment;
[0041] According to a time sequence, a target text segment and a reference segment in time are sequentially subjected to difference recognition to obtain corresponding difference text, wherein the target text segment is the basic text segment with an unprocessed context label, and when the target text segment is the first basic text segment, the context label corresponding to the target text segment is set as processed;
[0042] According to the difference text, context analysis is performed, the generated analysis result is merged into the reference text segment, and the context label corresponding to the current target text segment is updated as processed;
[0043] If the context labels corresponding to all the basic text segments are updated as processed, the reference text segment is recorded as the first text data, otherwise, another target text segment in time is subjected to the difference recognition.
[0044] Preferably, the method as described above, before the first text data is subjected to optimization processing based on a preset special term library and a digital coding rule to obtain second text data, further comprising:
[0045] According to stored static data, the first text data is filtered to obtain filtered first text data, and the static data includes user basic information.
[0046] In a second aspect, an embodiment of the present application provides a control device, comprising:
[0047] A preprocessing module is configured to perform mute segment cutting processing on input first speech data to obtain second speech data;
[0048] A first speech recognition module is configured to perform repeated content merging processing on the second speech data based on speech recognition technology to obtain first text data;
[0049] A text optimization module is configured to perform optimization processing on the first text data based on a preset special term library and a digital coding rule to obtain second text data;
[0050] The semantic extraction module is configured to perform hierarchical semantic extraction on the second text data according to a pre-acquired text processing model to obtain key semantic information.
[0051] In a third aspect, an electronic device is provided, which includes a processor, a memory, and a program stored in the memory and executable on the processor, and the program, when executed by the processor, implements the steps of the speech text analysis method based on a large language model.
[0052] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the speech text analysis method based on a large language model.
[0053] In a fifth aspect, a computer program product is provided, which includes computer instructions, and the computer instructions, when executed by a processor, implement the steps of the speech text analysis method based on a large language model.
[0054] Compared with the prior art, the speech text analysis method, device, and storage medium based on a large language model provided by the embodiments of the present application at least perform silence segment removal on voice data, and perform repeated content merging and compression optimization on text data, thereby reducing Token consumption in the entire large language model processing process, saving computing resources, and improving the efficiency and accuracy of data processing. BRIEF DESCRIPTION OF DRAWINGS
[0055] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments, and are not intended to limit the scope of the present application. Moreover, the same reference numerals are used throughout the several views to designate the same or similar parts. In the drawings:
[0056] Figure 1 One of the flowcharts of the speech text analysis method based on a large language model in the present application;
[0057] Figure 2 Another of the flowcharts of the speech text analysis method based on a large language model in the present application;
[0058] Figure 3 Another of the flowcharts of the speech text analysis method based on a large language model in the present application;
[0059] Figure 4This is the fourth flowchart of the speech-text analysis method based on a large language model in this application;
[0060] Figure 5 This is the fifth flowchart illustrating the speech-text analysis method based on a large language model in this application;
[0061] Figure 6 This is the sixth flowchart of the speech-text analysis method based on a large language model in this application;
[0062] Figure 7 This is a schematic diagram of the structure of a control device in this application;
[0063] Figure 8 This is a schematic diagram of the structure of an electronic device in this application. Detailed Implementation
[0064] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.
[0065] The terms “first,” “second,” etc., used in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The terms “and / or” in the specification and claims indicate at least one of the connected objects.
[0066] Please refer to Figure 1 The speech-text analysis method based on a large language model provided in this application includes:
[0067] Step S101: Perform silence segment removal processing on the input first speech data to obtain the second speech data;
[0068] Step S102: Based on speech recognition technology, the second speech data is processed to merge duplicate content to obtain the first text data;
[0069] Step S103: Based on a preset dedicated terminology database and digital encoding rules, the first text data is optimized to obtain the second text data;
[0070] Step S104: Based on the pre-acquired text processing model, perform hierarchical semantic extraction on the second text data to obtain key semantic information.
[0071] The speech-text analysis method based on a large language model provided in this embodiment prioritizes processing the silence segment of the first input speech data to obtain key semantic information, removing invalid speech content from the first speech data to obtain the second speech data. By reducing the amount of speech data that needs to be processed, unnecessary token consumption is reduced, which is beneficial to improving the efficiency of subsequent processing.
[0072] Furthermore, based on speech recognition technology, the second speech data is converted into text data, and duplicate content is merged to obtain the first text data. This facilitates subsequent natural language text processing based on the first text data. Moreover, by merging duplicate content, the amount of text data during text processing can be reduced, thereby reducing unnecessary token consumption and improving processing efficiency.
[0073] Preferably, for specific application scenarios, the first text data can be further optimized through text compression and other processes, resulting in the second text data. Taking a voice interaction scenario of a telecommunications operator as an example, since the voice data contains a large number of telecommunications technical terms, the text corresponding to these technical terms can be compressed and optimized based on a preset specialized terminology library to reduce the text length, thereby reducing the number of tokens and improving processing efficiency. Similarly, if the scenario also involves numerical codes such as phone numbers and package numbers, the original numerical codes in the text can be re-encoded based on preset numerical encoding rules to obtain shorter numerical sequences. This reduces token consumption and also facilitates encryption of numerical codes, improving data security.
[0074] Finally, based on the pre-obtained text processing model, hierarchical semantic extraction is performed on the obtained second text data to extract the required key semantic information.
[0075] In summary, this embodiment optimizes data processing by removing silence segments from speech data and merging and compressing duplicate content in text data. By compressing speech and text data during the data processing process, it reduces token consumption in the entire large-scale language model processing, saves computing resources, and improves the efficiency and accuracy of data processing.
[0076] See Figure 2 Preferably, as described above, the silent segment removal process includes:
[0077] Step S201: The first speech data is segmented based on the VAD algorithm to obtain multiple speech segments;
[0078] Step S202: Obtain the activity probability of each speech segment based on the audio features in each speech segment;
[0079] Step S203: Determine the silent segment in the speech segment based on the preset threshold and the activity probability;
[0080] Step S204: Remove the silence segment from the first voice data.
[0081] This embodiment illustrates the specific steps of the aforementioned silence segment removal process. First, the first speech data is segmented using the VAD algorithm to obtain multiple speech segments, each of which is a frame. Then, the speech activity probability corresponding to each frame is calculated based on the audio features in the speech data. This speech activity probability reflects whether the frame contains valid speech content. These audio features include, but are not limited to, parameters such as the energy, spectral distribution, and fundamental frequency of the audio signal. Next, the speech activity probability of each segment is judged according to a preset threshold. If the speech activity probability of a speech segment is greater than or equal to the preset threshold, it is considered a valid speech segment; otherwise, it is determined to be a silence segment without valid speech content. All silence segments are then removed from the first speech data, resulting in the second speech data after silence segment removal. This process not only reduces the amount of data in subsequent speech processing but also improves the accuracy and efficiency of speech recognition. Furthermore, the VAD algorithm has good adaptability and robustness, capable of handling silence detection tasks under different background noise and channel distortion conditions.
[0082] See Figure 3 Preferably, in the method described above, the step of merging duplicate content in the second speech data based on speech recognition technology to obtain the first text data includes:
[0083] Step S301: Perform speech recognition on the second speech data based on speech recognition technology to obtain initial text data;
[0084] Step S302: Extract features from the initial text data to obtain the sentence features corresponding to each sentence;
[0085] Step S303: Based on the statement features, obtain the similarity value between each statement;
[0086] Step S304: Merge the target statements with similarity values greater than a preset similarity value threshold into one statement to obtain the first text data.
[0087] This embodiment illustrates the specific steps of the above-mentioned duplicate content merging process. First, the second speech data is processed using speech recognition technology to obtain the corresponding initial text data. It should be noted that the text in this initial text data has already been segmented into sentences during speech recognition, i.e., the continuous speech stream is divided into sentences (independent sentences or phrase units) with complete semantics. Then, feature extraction is performed on the initial text data to obtain the sentence features corresponding to each sentence. These sentence features include, but are not limited to, keywords, sentence structure, and semantic information. Then, the similarity between sentences is determined based on these sentence features, i.e., the similarity value between each sentence is obtained. If the similarity value of two or more sentences exceeds a preset similarity threshold, these sentences are considered duplicate sentences and are merged into one sentence to obtain the first text data. This avoids repeatedly processing the same questions asked by users multiple times due to various reasons (e.g., network latency, slow system response, or user uncertainty), thus reducing token consumption and improving processing efficiency.
[0088] Specifically, as described above, the optimization processing of the first text data based on a preset specialized terminology database and numerical encoding rules to obtain the second text data includes:
[0089] Based on the specialized terminology database, the specialized terms in the first text data are compressed into corresponding compact codes:
[0090] Based on the aforementioned digital encoding rules, the numerical sequence in the first text data is hash-encoded to obtain the corresponding hash value;
[0091] The second text data is obtained based on the compact encoding and the hash value.
[0092] In this embodiment, the optimization processing steps for the first text data are illustrated. The optimization primarily involves two aspects: First, compressing specialized terms in the first text data into corresponding compact codes based on a pre-built specialized terminology library. Specifically, the pre-built specialized terminology library is a collection and organization of commonly used terms and professional vocabulary in relevant technical fields by a team of experts. Each term is then assigned a concise and easily identifiable compact code; for example, in the telecommunications operator field, "5G package" is mapped to "#5G#", and "fiber broadband" is mapped to "#FBB#". These compact codes not only significantly shorten the length of the original text but also improve the efficiency of subsequent processing. When the system receives input containing these terms, it automatically replaces these terms with the corresponding compact codes. For example, "I want to check the remaining amount of fifth-generation mobile communication technology packages" is converted to "check #5G# remaining amount", thereby quickly completing text compression and optimization. In this way, the construction of the specialized terminology library provides strong support for voice interaction in the corresponding technical fields, further enhancing user experience and system performance.
[0093] Secondly, the method involves hashing the numerical sequences in the first text data according to preset numerical encoding rules to obtain corresponding hash values. This utilizes numerical encoding optimization, a highly efficient strategy employed in various technical fields, especially in telecommunications operators, when processing large amounts of digital information. This technology primarily optimizes numerical sequences such as phone numbers and package numbers, aiming to reduce token consumption for data storage and transmission while maintaining data uniqueness and identifiability. In practice, the numerical encoding optimization technology uses a hash function to encode these numerical sequences, for example: Encode(13800138000)=#MD5(13800138000)1:6#. A hash function is an algorithm that can map data of arbitrary length to a fixed-length hash value, possessing characteristics such as one-wayness and collision resistance. By inputting numerical sequences such as phone numbers and package numbers into the hash function, the system can obtain a fixed-length hash value as a unique identifier for that numerical sequence. This hash value encoding not only significantly shortens the length of the original numerical sequence but also improves the efficiency of data storage and transmission. Furthermore, due to the one-way nature of hash functions, even if the original numerical sequence is leaked, the original information cannot be deduced from the hash value, further ensuring data security. Digital encoding optimization technology, with its high efficiency, simplicity, and security, provides strong support for improving system performance and protecting user privacy.
[0094] After obtaining the optimized compact encoding and hash value, the corresponding specialized terms or numerical sequences are replaced to obtain the optimized second text data. This shortens the text length of the second text data, reducing the token consumption of the system during further text processing, storage, and transmission.
[0095] It should be noted that since there is no strong correlation between the two optimization steps, they can be processed one after the other or simultaneously.
[0096] See Figure 4 Preferably, in the method described above, the step of performing hierarchical semantic extraction on the second text data according to a pre-acquired text processing model to obtain key semantic information includes:
[0097] Step S401: According to the business intent classifier in the text processing model, classify the second text data according to the business intent, and obtain the intent classification result and model confidence.
[0098] Step S402: If the confidence of the model is greater than the pre-obtained confidence threshold, then according to the predefined intent classification result and keyword extraction pattern mapping table, the target keyword extraction pattern corresponding to the intent classification result is obtained.
[0099] Step S403: If the model confidence is less than or equal to the confidence threshold, then perform dynamic mode selection based on the intent classification result and / or context information to determine the target keyword extraction mode;
[0100] Step S404: Based on the target keyword extraction pattern, extract keywords from the second text data to obtain the key semantic information.
[0101] This implementation demonstrates the steps for hierarchical semantic extraction of second text data to obtain key semantic information. After inputting the second text data into a pre-acquired text processing model, the business intent classifier within the model classifies the second text data according to business intent, obtaining the intent classification result and model confidence. Then, the obtained model confidence is compared with a preset confidence threshold. If the model confidence is greater than the threshold, it indicates that the model's classification result for the intent has high reliability. The system then determines the target keyword extraction mode corresponding to the intent classification result based on a predefined mapping table between intent classification results and keyword extraction modes. If the model confidence is less than or equal to the confidence threshold, it indicates that the model's classification result for the intent has uncertainty. In this case, dynamic mode selection is performed based on the intent classification result and / or contextual information to determine the target keyword extraction mode, ensuring accurate extraction of key information even under uncertainty. Afterward, keywords can be extracted from the second text data according to the determined target keyword extraction mode to obtain key semantic information.
[0102] It's important to note that the confidence threshold is set based on model performance evaluation and optimization. Specifically, this threshold originates from the training and validation process using a large amount of labeled data. During model training, the model's performance is evaluated using a validation set, recording metrics such as classification accuracy and recall at different confidence levels. By analyzing these metrics, a confidence threshold is determined that ensures both classification accuracy and effectively controls the false positive rate. Typically, this threshold is selected as the confidence value that achieves the optimal classification performance on the validation set, ensuring that the model can output reliable classification results in practical applications.
[0103] Taking the telecommunications operator sector as an example, in a specific embodiment, the detailed calculation process of the confidence threshold is as follows:
[0104] First, a large amount of customer voice data from the telecommunications operator sector was collected and labeled to form training and validation sets.
[0105] Second, training the training set: Use these data to train the text processing model, measure the difference between the model's predictions and the true labels using the cross-entropy loss function, and use an optimizer (such as Adam) to adjust the model parameters to minimize the loss function, thus obtaining a well-trained model.
[0106] Secondly, validation set performance evaluation: The validation set is input into the trained model. The model classifies the intent of each input sample and outputs the predicted probability of each intent category. For each sample, the intent category with the highest predicted probability is selected as the model's prediction result. Simultaneously, the model's classification accuracy, recall, and other metrics are recorded at different confidence levels. Here, confidence can be defined as the highest probability value of the predicted result.
[0107] Next, calculate the performance metrics at different confidence levels: Sort all samples on the validation set according to the highest predicted probability (i.e., confidence level) output by the model. For each possible confidence threshold (e.g., from 0.5 to 0.95, with a step size of 0.05), calculate the classification precision and recall at that threshold. Classification precision is the proportion of correctly classified samples out of the total number of samples at that threshold. Recall is the proportion of samples that are actually positive but are correctly classified as positive at that threshold.
[0108] Finally, determine the optimal confidence threshold: analyze the classification accuracy and recall under different confidence thresholds, and plot the Receiver Operating Characteristic Curve (ROC) or Precision-Recall Curve (PR) to visually demonstrate the model performance. Choose a confidence threshold that ensures both high classification accuracy (i.e., high precision) and effective control over the false positive rate (i.e., not too low recall). Typically, this threshold is selected as the confidence value that achieves the model's optimal classification performance (e.g., the highest F1 score) on the validation set.
[0109] See Figure 5 Specifically, in the method described above, the step of classifying the second text data according to the business intent classifier in the text processing model to obtain the intent classification result includes:
[0110] Step S501: Perform word segmentation on the second text data to obtain multiple words or phrases;
[0111] Step S502: Map the words or phrases to word vectors of fixed length and construct a word vector matrix;
[0112] Step S503: Input the word vector matrix into a pre-trained text convolutional neural network model to obtain the intent classification result.
[0113] This embodiment illustrates the steps for intent classification based on a business intent classifier. Since the input second text data primarily consists of sentences, for ease of analysis, the second text data is first preprocessed (i.e., segmented into words or phrases). Then, each word is represented by a word vector, mapping it to a fixed-length word vector. These word vectors are then arranged sequentially to form a word vector matrix, which serves as the model input. This mapping can be based on existing word vectors (e.g., Word2Vec, GloVe) or self-trained word vectors. Finally, the word vector matrix is input into a pre-trained text convolutional neural network model to obtain the intent classification result.
[0114] One embodiment illustrates how to construct and train a text convolutional neural network model, wherein model construction includes:
[0115] Convolutional layers: These layers use multiple convolutional kernels of varying sizes to perform convolution operations on the word vector matrix, extracting local features from the text. The size and number of convolutional kernels can be adjusted according to task requirements.
[0116] Pooling layer: Performs pooling operations (such as max pooling) on the feature map output by the convolutional layer, transforming the feature map into a fixed-length feature vector.
[0117] Fully connected layer: The feature vectors output from the pooling layer are input into the fully connected layer for classification. The number of output nodes of the fully connected layer is equal to the number of intent categories.
[0118] Model training includes:
[0119] Define the loss function: Use the cross-entropy loss function to measure the difference between the model's prediction and the true label.
[0120] Choose an optimizer: Use optimizers such as stochastic gradient descent (SGD) and Adam to adjust model parameters and minimize the loss function.
[0121] Training the model: The model is trained using labeled training data, and the model parameters are updated using the backpropagation algorithm.
[0122] To facilitate understanding of the steps involved in determining the target keyword extraction pattern for those skilled in the art, examples of the two selection methods are provided below:
[0123] Firstly, in one embodiment, the target keyword extraction pattern corresponding to the intent classification result is obtained based on a predefined mapping table between intent classification results and keyword extraction patterns. This is achieved by establishing a correspondence table between intent classification results and keyword extraction patterns. For example, in the telecommunications operator field, for the intent of "package change," a combination of regular expressions and Named Entity Recognition (NER) is used to extract the package number; for the intent of "business consultation," entity recognition technology is used to extract the consultation object, such as location, time, or specific business name. This pattern can accurately match the extraction logic according to different intents, effectively improving the accuracy and efficiency of keyword extraction and meeting the complex and ever-changing business needs of the telecommunications operator field. The following is an example of a correspondence table between intent classification results and keyword extraction patterns in the telecommunications operator field.
[0124] Intention Keyword extraction mode Example input Example output Package change Regular expression + business name NER "I want to change to 5G_256 package" {"package number": "5G_256"} Business consultation Entity recognition (location, time, object) "How much is the Global Enjoy Edition package traffic" {"consultation object": "Global Enjoy Edition"} Complaint Sentiment words + question type classification "5G_128 package traffic is too small" {"complaint type": "insufficient traffic"}
[0125] Secondly, the target keyword extraction mode is determined by dynamically selecting a mode based on the intent classification results and / or contextual information. The principle of dynamic adjustment lies in flexibly selecting the keyword extraction mode based on real-time contextual information. The following provides an example of its specific implementation.
[0126] Specifically, in the method described above, the step of dynamically selecting a pattern based on the intent classification result and / or contextual information to determine the target keyword extraction pattern includes:
[0127] Based on the intent classification results and / or context information, intent priority is classified to determine the main intent and secondary intents;
[0128] If the influence value of the secondary intent on the main idea is less than or equal to the influence threshold, then the target keyword extraction mode is determined to be a high-priority mode;
[0129] If the influence value of the secondary intent on the main idea is greater than the influence threshold, then the target keyword extraction mode is determined to be a hybrid extraction mode based on context information. The hybrid extraction mode includes at least one of rule engine extraction, model extraction, and manual intervention.
[0130] In this embodiment, due to the low confidence of the model, there may be cases of ambiguous input or conflicting intents. Therefore, firstly, the intent priority is classified according to the intent classification results and / or context information to determine the user's main intent and secondary intent. For example, when the user input is ambiguous (such as "I want to change the package"), the specific intent needs to be inferred from the context. If there is a conflict of intents (such as "consult and apply for a package"), the main intent needs to be split or the main intent needs to be selected.
[0131] Then, the appropriate extraction mode is dynamically selected according to the preset priority rules: if the main idea is clear, that is, the influence of the secondary intention on the main idea is less than the influence threshold, then the high priority mode is adopted; if there are multiple intentions or the intention is ambiguous, that is, the influence of the secondary intention on the main idea is greater than the influence threshold, then the most suitable hybrid mode (including: rule engine extraction, model extraction and manual intervention) needs to be selected in combination with context information to ensure the accuracy and efficiency of keyword extraction and realize personalized and intelligent voice data processing.
[0132] The following specific embodiments illustrate the entire input and output of the model.
[0133] Type: "I want to change my plan, but I don't know which one to choose."
[0134] analyze:
[0135] Intent Classification: {"Primary Intent": "Package Change", "Secondary Intent": "Business Inquiry"}.
[0136] Mode selection:
[0137] In the main image, select "Package Change" → Extract Package Number (if no specific number is provided, trigger the recommendation system).
[0138] Secondary intent: "Business Consultation" → Extract consultation targets (e.g., "Package Type").
[0139] Output: "Main Operation": {"Intent": "Package Change", "Suggestion": "Recommend Popular Packages"};
[0140] "Secondary Operation": {"Intent": "Business Inquiry", "Inquiry Target": "Package Type"}.
[0141] The above methods enable rapid identification of intent and accurate extraction of key information. This not only improves processing speed but also enhances the accuracy of information extraction, providing telecom operators with an efficient and flexible voice data processing solution.
[0142] See Figure 6 Preferably, in the method described above, the step of merging duplicate content in the second speech data based on speech recognition technology to obtain the first text data includes:
[0143] Step S601: Divide the second voice data into multiple voice segments according to the preset segmentation rules;
[0144] Step S602: Perform speech recognition on the speech segments to obtain corresponding basic text segments, and generate context markers for each of the basic text segments;
[0145] Step S603: According to the time sequence, the target text segment and the reference segment with the earlier time are sequentially identified to obtain the corresponding difference text. The target text segment is the basic text segment marked as unprocessed in the context. When the target text segment is the first basic text segment, the context tag corresponding to the target text segment is set to processed.
[0146] Step S604: Perform context analysis based on the difference text, merge the generated analysis results into the reference text fragment, and update the context tag corresponding to the current target text fragment to the processed tag.
[0147] Step S605: If all the context tags corresponding to the basic text segments are updated to the processed ones, then the reference text segment is recorded as the first text data; otherwise, the difference recognition is performed on another target text segment that is later in time.
[0148] This embodiment provides a streaming incremental processing method, which can be used as a specific implementation or further optimization of the above-mentioned duplicate content merging processing. Specifically, after obtaining the second voice data, it is divided into multiple voice segments according to a preset segmentation rule. For example, a 10-minute call is divided into 20 segments, each approximately 30 seconds long. This ensures that each segment contains sufficient information for subsequent speech recognition and analysis. It should be noted that, to ensure semantic integrity within the voice segments, the duration of each voice segment is fine-tuned by considering features such as natural pauses and intonation changes during segmentation. Then, speech recognition is performed on each speech segment to obtain the corresponding basic text segment, and a context marker is generated for each basic text segment. This context marker can indicate the relevance of its context and can characterize whether it has been processed. Next, according to the chronological order of the speech, difference recognition is performed on the target text segment and the earlier reference segment to obtain the corresponding difference text (e.g., focusing on newly appearing words, phrases, or sentence structure changes to accurately identify the difference). The target text segment is the basic text segment whose context marker is unprocessed. Then, context analysis is performed on the difference text to obtain the corresponding analysis results, which can greatly reduce the computational load and improve processing efficiency. It should be noted that when the target text segment is the first basic text segment in the chronological order, its corresponding context marker is directly set to processed, and when performing difference recognition or context analysis with subsequent target text segments, duplicate content is merged.
[0149] At this point, the analysis results are merged into the reference text fragment to form a complete dialogue context. Simultaneously, the context marker of the target text fragment corresponding to the differing text is updated to "processed" to avoid further processing. If the current target text fragment is the last basic text fragment—that is, after all basic text fragments have undergone difference and context analysis—the reference text fragment can be recorded as the first text data. This allows for the continued execution of the optimization process based on a preset specialized terminology database and numerical encoding rules to obtain the second text data. Otherwise, if it is determined that there are still unprocessed basic text fragments, the difference identification and context analysis steps are performed on another target text fragment that is later in time than the current target text fragment to ensure the normal operation of the entire scheme.
[0150] Preferably, the method described above, after obtaining the first text data, further includes:
[0151] The first text data is filtered based on the stored static data to obtain the filtered first text data, wherein the static data includes basic user information.
[0152] This embodiment also provides another streaming incremental processing method, namely a dynamic caching mechanism, specifically for the telecommunications operator field. Specifically, it involves: firstly, pre-storing static data such as basic user information (e.g., user profile, historical preferences) and package configurations (e.g., tariffs, data traffic rules) in a cache; then, when a user initiates a request, the cached static data (Cacheuser) is removed from the local input (Inputcurrent), retaining only the dynamic portion requiring real-time processing (Inputcached); subsequently, logical operations are performed only on the filtered dynamic data (Inputcached), significantly reducing computational load and I / O overhead. Caching static data reduces redundant computation, thereby improving overall system efficiency. This mechanism is particularly suitable for data scenarios with low change frequency but high access volume. It should be noted that the above two incremental processing methods avoid full-volume redundant processing, analyzing only incremental content, further improving processing efficiency, and achieving intelligent analysis and efficient processing of text information.
[0153] It should also be noted that both of the above incremental processing methods are used simultaneously.
[0154] The various methods of the embodiments of this application have been described above. Apparatus for implementing the above methods will now be provided.
[0155] See Figure 7 Another embodiment of this application provides a control device, including:
[0156] Preprocessing module 701 is used to perform silence segment removal processing on the input first speech data to obtain second speech data;
[0157] The first speech recognition module 702 is used to perform duplicate content merging processing on the second speech data based on speech recognition technology to obtain the first text data;
[0158] The text optimization module 703 is used to optimize the first text data based on a preset dedicated terminology library and digital encoding rules to obtain the second text data.
[0159] The semantic extraction module 704 is used to perform hierarchical semantic extraction on the second text data according to the pre-acquired text processing model to obtain key semantic information.
[0160] Preferably, in the control device described above, the preprocessing module includes:
[0161] The speech segmentation unit is used to segment the first speech data based on the VAD algorithm to obtain multiple speech segments;
[0162] An audio feature recognition unit is used to obtain the activity probability of each of the speech segments based on the audio features in each speech segment;
[0163] A silence recognition unit is used to determine the silence segment in the speech segment based on a preset threshold and the activity probability.
[0164] A silence removal unit is used to remove the silence segment from the first speech data.
[0165] Preferably, in the control device described above, the first voice recognition module includes:
[0166] A speech recognition unit is used to perform speech recognition on the second speech data based on speech recognition technology to obtain initial text data;
[0167] The statement feature extraction unit is used to extract features from the initial text data and obtain the statement features corresponding to each statement.
[0168] A similarity extraction unit is used to obtain similarity values between the statements based on the statement features;
[0169] The statement merging unit is used to merge target statements with similarity values greater than a preset similarity value threshold into one statement to obtain the first text data.
[0170] Specifically, in the control device described above, the text optimization module includes:
[0171] The terminology optimization unit is used to compress specialized terms in the first text data into corresponding compact codes based on the specialized terminology library:
[0172] The digital sequence optimization unit is used to perform hash value encoding on the digital sequence in the first text data based on the digital encoding rules to obtain the corresponding hash value;
[0173] A text integration unit is used to obtain the second text data based on the compact encoding and the hash value.
[0174] Preferably, in the control device described above, the semantic extraction module includes:
[0175] The intent classification unit is used to classify the second text data according to the business intent classifier in the text processing model, and obtain the intent classification result and the model confidence.
[0176] The first extraction mode determination unit is used to obtain the target keyword extraction mode corresponding to the intent classification result according to the predefined intent classification result and keyword extraction mode mapping table if the confidence of the model is greater than the pre-obtained confidence threshold.
[0177] The second extraction mode determination unit is used to determine the target keyword extraction mode by performing dynamic mode selection based on the intent classification result and / or context information if the model confidence is less than or equal to the confidence threshold.
[0178] The semantic extraction unit is used to extract keywords from the second text data according to the target keyword extraction pattern to obtain the key semantic information.
[0179] Specifically, in the control device described above, the intent classification unit includes:
[0180] The word segmentation subunit is used to segment the second text data into multiple words or phrases.
[0181] A word vector subunit is used to map the word or phrase into a word vector of fixed length and construct a word vector matrix;
[0182] The intent classification subunit is used to input the word vector matrix into a pre-trained text convolutional neural network model to obtain the intent classification result.
[0183] Specifically, in the control device described above, the second extraction mode determination unit includes:
[0184] The intent priority classification subunit is used to classify intent priorities based on the intent classification results and / or context information, and to determine the main intent and secondary intents.
[0185] The first extraction mode determination subunit is used to determine the target keyword extraction mode as a high-priority mode if the influence value of the secondary intention on the intention graph is less than or equal to the influence threshold.
[0186] The second extraction mode determination subunit is used to determine the target keyword extraction mode as a hybrid extraction mode based on context information if the influence value of the secondary intention on the intention graph is greater than the influence threshold. The hybrid extraction mode includes at least one of rule engine extraction, model extraction, and manual intervention.
[0187] Preferably, in the control device described above, the first voice recognition module includes:
[0188] The voice segmentation module is used to divide the second voice data into multiple voice segments according to preset segmentation rules;
[0189] The second speech recognition module is used to perform speech recognition on the speech segments to obtain corresponding basic text segments, and to generate context markers for each of the basic text segments;
[0190] The difference recognition module is used to sequentially perform difference recognition on the target text fragment and the reference fragment that comes first according to the time order to obtain the corresponding difference text. The target text fragment is the basic text fragment marked as unprocessed in the context. When the target text fragment is the first basic text fragment, the context mark corresponding to the target text fragment is set to processed.
[0191] The difference analysis module is used to perform context analysis based on the difference text, merge the generated analysis results into the reference text fragment, and update the context tag corresponding to the current target text fragment to the processed tag.
[0192] The text integration module is used to record the reference text segment as the first text data if the context tags corresponding to all the basic text segments are updated to the processed ones; otherwise, the difference recognition is performed on another target text segment with a later time.
[0193] Preferably, the control device described above further includes:
[0194] The text filtering module is used to filter the first text data based on the stored static data to obtain the filtered first text data, wherein the static data includes basic user information.
[0195] It should be noted that the control device in this embodiment is the same as the device described above. The implementation methods in each of the above embodiments are applicable to the embodiments of this device and can achieve the same technical effect. The device provided in this application embodiment can implement all the method steps implemented in the above method embodiments and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.
[0196] See Figure 8 Another embodiment of this application provides an electronic device 800, including: a processor 801, a memory 802, and a program stored in the memory 802 and executable on the processor 801. When the program is executed by the processor 801, it implements the steps of the speech-text analysis method based on a large language model as described above and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0197] Another embodiment of this application provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the speech-text analysis method based on a large language model as described above, achieving the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0198] Another embodiment of this application provides a computer program product, including computer instructions. When executed by a processor, the computer instructions implement the steps of the speech-text analysis method based on a large language model as described above, and achieve the same technical effect. To avoid repetition, the details will not be repeated here.
[0199] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0200] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0201] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A speech-text analysis method based on a large-scale language model, characterized in that, include: The first input speech data is processed by removing silence segments to obtain the second speech data; The second voice data is processed by merging duplicate content based on speech recognition technology to obtain the first text data. Based on a pre-defined specialized terminology database and numerical encoding rules, the first text data is optimized to obtain the second text data; Based on the pre-acquired text processing model, the second text data is subjected to hierarchical semantic extraction to obtain key semantic information.
2. The method according to claim 1, characterized in that, The silent segment removal procedure includes: The first speech data is segmented based on the Voice Activity Detection (VAD) algorithm to obtain multiple speech segments. Based on the audio features in each of the speech segments, the activity probability of each speech segment is obtained; Based on a preset threshold and the activity probability, the silent segment in the speech segment is determined; The silent segment is removed from the first voice data.
3. The method according to claim 2, characterized in that, The process of merging duplicate content in the second speech data based on speech recognition technology to obtain the first text data includes: The second speech data is subjected to speech recognition technology to obtain initial text data. Feature extraction is performed on the initial text data to obtain the sentence features corresponding to each sentence; Based on the characteristics of the statements, the similarity values between the statements are obtained; The target statements with similarity values greater than a preset similarity threshold are merged into one statement to obtain the first text data.
4. The method according to claim 1, characterized in that, The first text data is optimized based on a preset specialized terminology database and numerical encoding rules to obtain the second text data, including: Based on the specialized terminology database, the specialized terms in the first text data are compressed into corresponding compact codes: Based on the aforementioned digital encoding rules, the numerical sequence in the first text data is hash-encoded to obtain the corresponding hash value; The second text data is obtained based on the compact encoding and the hash value.
5. The method according to claim 1, characterized in that, The step of performing hierarchical semantic extraction on the second text data based on a pre-acquired text processing model to obtain key semantic information includes: Based on the business intent classifier in the text processing model, the second text data is classified according to business intent to obtain the intent classification result and the model confidence. If the confidence level of the model is greater than the pre-obtained confidence threshold, then the target keyword extraction mode corresponding to the intent classification result is obtained according to the predefined intent classification result and keyword extraction mode mapping table. If the model confidence is less than or equal to the confidence threshold, then dynamic mode selection is performed based on the intent classification result and / or context information to determine the target keyword extraction mode; Based on the target keyword extraction pattern, keywords are extracted from the second text data to obtain the key semantic information.
6. The method according to claim 5, characterized in that, The step of classifying the second text data according to the business intent classifier in the text processing model to obtain the intent classification result includes: The second text data is segmented to obtain multiple words or phrases; Map the words or phrases to word vectors of fixed length and construct a word vector matrix; The word vector matrix is input into a pre-trained text convolutional neural network model to obtain the intent classification result.
7. The method according to claim 5, characterized in that, The step of dynamically selecting a mode based on the intent classification result and / or context information to determine the target keyword extraction mode includes: Based on the intent classification results and / or context information, intent priority is classified to determine the main intent and secondary intents; If the influence value of the secondary intent on the main idea is less than the influence threshold, the target keyword extraction mode is determined to be a high-priority mode. If the influence value of the secondary intent on the main idea is greater than the influence threshold, the target keyword extraction mode is determined to be a hybrid extraction mode based on context information. The hybrid extraction mode includes at least one of rule engine extraction, model extraction, and manual intervention.
8. The method according to claim 1, characterized in that, Based on speech recognition technology, the second speech data is processed to merge duplicate content, resulting in the first text data, which includes: According to the preset segmentation rules, the second voice data is divided into multiple voice segments; The speech segments are subjected to speech recognition to obtain corresponding basic text segments, and context tags are generated for each of the basic text segments; Based on the time sequence, the target text fragment and the reference fragment that comes first are sequentially identified to obtain the corresponding difference text. The target text fragment is the basic text fragment marked as unprocessed in the context. When the target text fragment is the first basic text fragment, the context marker corresponding to the target text fragment is set to processed. Contextual analysis is performed on the differing text, the generated analysis results are merged into the reference text fragment, and the context tag corresponding to the current target text fragment is updated to the processed tag. If all the context tags corresponding to the basic text segments are updated to the processed ones, then the reference text segment is recorded as the first text data; otherwise, the difference recognition is performed on another target text segment that is later in time.
9. The method according to claim 1 or 8, characterized in that, Before optimizing the first text data based on a preset specialized terminology database and numerical encoding rules to obtain the second text data, the process further includes: The first text data is filtered based on the stored static data to obtain the filtered first text data, wherein the static data includes basic user information.
10. A control device, characterized in that, include: The preprocessing module is used to remove silence segments from the input first speech data to obtain the second speech data; The first speech recognition module is used to perform duplicate content merging processing on the second speech data based on speech recognition technology to obtain the first text data; The text optimization module is used to optimize the first text data based on a preset dedicated terminology library and digital encoding rules to obtain the second text data; The semantic extraction module is used to perform hierarchical semantic extraction on the second text data according to the pre-acquired text processing model to obtain key semantic information.
11. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the speech-text analysis method based on a large language model as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the speech-text analysis method based on a large language model as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the speech-text analysis method based on a large language model as described in any one of claims 1 to 9.