Real-time speech stream dialogue interaction method and system based on large language model

By employing dual-path parallel processing and a context management mechanism based on a large language model, the problem of insufficient fusion between the client-side and server-side results was solved, improving the accuracy of speech recognition and the naturalness of the response, optimizing the speech synthesis rhythm, and achieving more efficient voice interaction.

CN121191519BActive Publication Date: 2026-02-24MINIMALIST INTERNET (BEIJING) INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511729337.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-24
Estimated Expiration
2045-11-24

AI Technical Summary

Technical Problem

Existing technologies lack an effective fusion mechanism between edge recognition and server-side results, leading to text fragmentation or repeated backtracking, low efficiency in utilizing context windows, disjointed speech synthesis rhythm, lack of speech-driven forward-looking reasoning mechanism, and redundant prompt word injection, which affects model convergence and real-time performance.

Method used

A dual-path parallel processing mechanism is adopted. The initial text hypothesis is generated by the acoustic model and compared and fused with the reconstructed text on the server to construct the final text with confidence labels. Combined with the context management mechanism of the large language model, natural language response is generated, and the next round of inference is predicted by tone, pause and speech rate parameters to optimize the speech synthesis rhythm.

Benefits of technology

It improves the accuracy and naturalness of speech recognition, reduces text fragmentation and repetitive backtracking, enhances context preservation, reduces latency, reduces redundant prompts, and improves the model's real-time performance and human-likeness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121191519B_ABST
    Figure CN121191519B_ABST
Patent Text Reader

Abstract

The application discloses a real-time voice stream dialogue interaction method and system based on a large language model, and belongs to the technical field of voice recognition, natural language processing and man-machine interaction. The method comprises the following steps: S1, dividing a voice signal according to a 320 ms time window; S2, generating a preliminary text hypothesis locally and uploading a frame to a server to accurately reconstruct the text through double-path parallel processing; S3, fusing to generate a final text with a confidence label; S4, inputting the text into a large language model with a context management mechanism to generate a natural language response; S5, performing rhythm-aware voice synthesis output; S6, updating a dialogue cache and synchronizing a language model state; S7, predicting a semantic trend in advance by adopting a delay buffer release mechanism; and S8, introducing a round-level intonation / rhythm parameter for semantic adjustment. The method has the beneficial effects that response delay is reduced, the recognition accuracy is improved by fusing the confidence label, and the coherence and naturalness of multi-round interaction are enhanced by modeling the context and intonation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of speech recognition, natural language processing and human-computer interaction, and more specifically, to a real-time speech stream dialogue interaction method and system based on a large language model. Background Technology

[0002] In recent years, with the rapid development of speech recognition, natural language processing, and generative models, voice dialogue technology based on large language models has been widely applied in customer service, intelligent assistants, education, and other scenarios. Traditional systems often adopt a sequential structure of speech-to-text + text-to-speech + text-to-speech, using ASR models and rule-based dialogue logic to achieve initial interaction. Subsequently, the introduction of the Transformer architecture and the improved capabilities of large language models (such as the GPT series) have made the dialogue content more coherent and semantically deep. At the same time, voice front-ends have gradually evolved towards lower latency and higher robustness, supporting a more natural real-time interactive experience.

[0003] However, the existing technology still has the following shortcomings: (1) There is no effective fusion mechanism between the end-side recognition and the server-side results, which easily leads to text gaps or repeated backtracking; (2) The context window utilization efficiency is low, and cross-wheel information is broken; (3) The speech synthesis rhythm is not coherent, resulting in unnatural response; (4) There is a lack of speech-driven forward reasoning mechanism, and the language model response is lagging; (5) The prompt word injection is seriously redundant, affecting the model convergence and real-time performance. Summary of the Invention

[0004] The purpose of this invention is to provide a real-time speech stream dialogue interaction method and system based on a large language model to solve the problems mentioned in the background technology: (1) There is no effective fusion mechanism between the end-side recognition and the server-side results, which easily leads to text gaps or repeated backtracking; (2) The context window utilization efficiency is low, and cross-round information is broken; (3) The speech synthesis rhythm is not coherent, resulting in unnatural response; (4) There is no speech-driven forward reasoning mechanism, and the language model response is lagging; (5) The prompt word injection is seriously redundant, affecting the model convergence and real-time performance.

[0005] Technical solution: The real-time voice stream dialogue interaction method based on a large language model includes the following steps:

[0006] S1. The collected continuous speech signal is divided into segments according to a fixed time window of 320 milliseconds to obtain a speech frame sequence;

[0007] S2. The speech frame sequence is processed in parallel through a dual-path system. One path generates preliminary text hypotheses locally using an acoustic model, while the other path uploads the original frame data to a remote server for accurate text reconstruction.

[0008] S3. Compare and fuse the preliminary text assumptions with the reconstructed text from the server to construct the final text with confidence labels;

[0009] S4. Input the final text containing confidence labels into a large language model with a context management mechanism to generate a corresponding natural language response;

[0010] S5. Perform speech synthesis and layout on the response text, and output it in sequence according to the rhythm tags;

[0011] S6. Store the content of this round of interaction in the history cache and refresh the dialogue state in the large language model simultaneously;

[0012] S7. The method further includes a delayed prediction mechanism, which predicts the semantic direction of a speech frame within 20 milliseconds after the speech frame enters the local channel, and pre-sets the next round of inference window for the large language model.

[0013] S8. The method also includes a round-level policy injection mechanism, which quantifies the intonation changes, pause patterns and speech rate distribution in multi-round voice interaction into numerical parameters and inputs them into the large language model for semantic trend adjustment.

[0014] Preferably, the speech frame segmentation process in S1 further includes the following steps:

[0015] S1-1. The acquired continuous speech signal is resampled at a fixed sampling rate of 24kHz and divided into 320-millisecond speech frames in a non-overlapping window format.

[0016] S1-2. Perform a short-time Fourier transform on each speech frame and extract 40-dimensional log-Mel spectrum features;

[0017] S1-3. Perform frame normalization on the extracted Mel spectrum features to fix the mean of the extracted Mel spectrum features to zero and the variance to one.

[0018] Preferably, the server-side text reconstruction path in S2 further includes the following steps:

[0019] S2-1. Perform time alignment processing on the uploaded audio frames, and use a multi-scale dynamic time warping network for alignment matching;

[0020] S2-2. Use the integrated Transformer-CTC architecture for high-confidence identification and attach the confidence distribution to each token output;

[0021] S2-3. The output token sequence is timestamped against the local text hypothesis, and reconstruction fusion candidates are generated based on the offset value.

[0022] Preferably, the high-confidence identification process in S2-2 further includes the following steps:

[0023] S2-2-1. During each round of inference, the intermediate layer attention map of the Transformer is normalized and compressed, and added as an auxiliary feature to the CTC output layer;

[0024] S2-2-2. Set dynamic temperature parameters to adjust the output probability, where the temperature T fluctuates within the range of [0.8, 1.2] based on the context consistency score.

[0025] Preferably, in the fusion of the local preliminary text assumption and the server text in S3, an asymmetric merging mechanism is further adopted. The asymmetric merging mechanism is fixed with the server text as the main body and traces the local assumption content character by character. If the number of consecutive character matches is less than a set threshold of 4, the local path is truncated to avoid the spread of errors.

[0026] Preferably, the S4 large language model response generation process further includes the following steps:

[0027] S4-1. Segment the input text into semantic blocks, with each block containing no more than 128 tokens, and establish cross-block pointer chains for semantic coherence reference;

[0028] S4-2. Use the cross-round caching mechanism to extract the semantic backbone vector from the previous round of dialogue as the semantic starting point for the current inference, and perform forward attention initialization.

[0029] Preferably, the semantic chunking establishment in S4-1 further includes the following steps:

[0030] S4-1-1. The text is segmented into predicate center segments through syntactic analysis, and each segment is constructed into a tree-like nested structure for use when embedding the language model;

[0031] S4-1-2. Set minimum syntactic completeness constraints when dividing blocks to ensure that the subject-verb relationship is preserved after each block is broken down, thereby improving the accuracy of model inference.

[0032] Preferably, the dialogue state cache synchronization refresh mechanism of S6 further includes the following steps:

[0033] S6-1. Perform positional encoding on the keywords in the current round response, and generate a dialogue summary index based on the TF-IDF confidence of the keywords in the current round response in the context;

[0034] S6-2. Establish a hash mapping table using the summary index as the key, link it to the top 3 items with the highest matching strength in the dialogue summary in the previous round of cache, and construct a memory link;

[0035] S6-3. Utilize the context span formed by memory links to update the prompt word buffer and filter out content tokens that do not contribute anything.

[0036] Preferably, the mapping relationship between the digest index and the previous round of cache in S6-2 further includes the following steps:

[0037] S6-2-1. Calculate the dot product similarity between the current summary vector and the historical summary vectors. Mark a significant match when the similarity value is higher than 0.85.

[0038] S6-2-2. An index timing adjustment strategy is adopted for the significant matching items, and the sentence segment in the historical summary corresponding to the significant matching item that is closest to the current round of speech is placed at the beginning of the prompt word.

[0039] A real-time speech stream dialogue interaction system based on a large language model is designed according to the real-time speech stream dialogue interaction method based on a large language model.

[0040] Compared with the prior art, the advantages of this invention are:

[0041] (1) Introducing a fixed 320ms non-overlapping window + 40-dimensional Mel spectrum feature structure improves the representation stability and semantic preservation of speech frames, which is better than the semantic drift problem introduced by existing variable windows or overlapping windows.

[0042] (2) The innovative use of a lightweight end-side model + server-side precision model parallel collaborative architecture not only reduces latency but also improves overall recognition accuracy, solving the bottleneck of single-path difficulty in balancing performance and timeliness in existing technologies.

[0043] (3) The final text is generated by using a confidence threshold and character tracing mechanism, and combined with an asymmetric fusion strategy, which effectively avoids the common problem of existing end-side assumption errors "polluting" the final recognition results.

[0044] (4) Based on semantic backbone vector retrieval and combined with multi-turn dialogue semantic chain structure, the context preservation ability is enhanced, which is superior to the memory mechanism of traditional large language models that only rely on fixed windows.

[0045] (5) Introduce 128Token block partitioning + syntactic structure recognition + cross-chain pointers to avoid the problem of response semantic fragmentation caused by random Token context demarcation points.

[0046] (6) Design a summary-index-hash mapping mechanism to dynamically extract information fragments with high context relevance and reconstruct prompt words, effectively reducing invalid token input and improving reasoning efficiency.

[0047] (7) Link the intonation, punctuation rhythm and language stress model in the language response to control the speech synthesis rhythm, realize the natural pronunciation distribution within the 140ms beat segment, and improve the coherence and anthropomorphism of speech interaction.

[0048] (8) By predicting semantic direction within 20ms and injecting strategies based on high-order speech parameters such as speech rate, pauses, and intonation, the large language model has the ability to proactively adjust its response, which is different from the traditional a posteriori processing strategy. Attached Figure Description

[0049] Figure 1 This is a schematic diagram of the overall process of the real-time voice stream dialogue interaction method based on a large language model according to the present invention. Detailed Implementation

[0050] For examples, please refer to Figure 1 The real-time voice stream dialogue interaction method based on a large language model includes the following steps:

[0051] S1. The collected continuous speech signal is divided into segments according to a fixed time window of 320 milliseconds to obtain a speech frame sequence;

[0052] S2. The speech frame sequence is processed in parallel through a dual-path system. One path generates preliminary text hypotheses locally using an acoustic model, while the other path uploads the original frame data to a remote server for accurate text reconstruction.

[0053] S3. Compare and fuse the initial text assumptions with the reconstructed text from the server to construct the final text with confidence labels;

[0054] S4. Input the final text containing confidence labels into a large language model with a context management mechanism to generate the corresponding natural language response;

[0055] S5. Perform speech synthesis and layout on the response text, and output it in sequence according to the rhythm tags;

[0056] S6. Store the content of this round of interaction in the history cache and refresh the dialogue state in the large language model simultaneously;

[0057] S7. The method also includes a delayed release prediction mechanism, which predicts the semantic direction of a speech frame within 20 milliseconds after it enters the local channel, thus pre-setting the next round of inference window for the large language model.

[0058] S8. The method also includes a round-level policy injection mechanism, which quantifies intonation changes, pause patterns and speech rate distribution in multi-round voice interaction into numerical parameters and inputs them into a large language model for semantic trend adjustment.

[0059] Specifically, in this method, S1 uses a non-overlapping time window to segment the speech signal, with a fixed frame length of 320ms, corresponding to 7680 samples (24kHz sampling rate). S2's local acoustic model is a lightweight Transformer-Conv structure with four parallel convolutional channels (each with receptive fields of 20ms, 40ms, 80ms, and 160ms), followed by a two-layer Self-Attention to build initial hypotheses. The server-side reconstruction path uses a 6-layer Transformer-CTC network, with token-level output including a confidence distribution (value range [0,1], retaining 3 decimal places). S3's fusion mechanism employs an asymmetric character-level merging strategy, setting a character matching threshold of 4, and retaining confidence labels in the fusion output for subsequent model use. S4's language model is a large, fine-tuned language model with a context window length of 4096 tokens, using a continuous dialogue embedding mechanism, supporting token-level summary compression and synchronous update of prompt words. S5 uses the FastSpeech2 model with a rhythm controller, synthesizing a minimum speech segment every 140ms. The synthesized rhythm is driven by punctuation, syntax, and token confidence. S6 uses a hash list and TF-IDF filtering mechanism for cache management to ensure efficient use of the token context window space. In S7, the delay release mechanism is triggered within 20ms and combines the embedding of the three token features in the frame header for direction prediction. In S8, intonation, pauses, and speech rate are quantized into floating-point vectors in the range [-1, 1], which are inserted as additional parameters into the language model input structure.

[0060] The speech frame segmentation process of S1 further includes the following steps:

[0061] S1-1. The acquired continuous speech signal is resampled at a fixed sampling rate of 24kHz and divided into 320-millisecond speech frames in a non-overlapping window format.

[0062] S1-2. Perform a short-time Fourier transform on each speech frame and extract 40-dimensional log-Mel spectrum features;

[0063] S1-3. Perform frame normalization on the extracted Mel spectrum features to fix the mean of the extracted Mel spectrum features to zero and the variance to one.

[0064] Specifically, after each round of speech acquisition, 24kHz resampling is performed using linear interpolation. Then, during frame segmentation, non-overlapping segmentation is performed directly using a window width of 7680 sampling points to ensure the integrity of the speech information. The short-time Fourier transform uses a 25ms window length and a 10ms shifting window to obtain 40-dimensional log-Mel spectrum (MelFilterBank) features. The Mel filter spacing exhibits an exponential scale, adapting to the distribution of Chinese speech. The normalization process performs z-score normalization on each Mel spectrum dimension within a sliding window of 16 frames to enhance noise resistance.

[0065] The server-side text reconstruction pathway in S2 further includes the following steps:

[0066] S2-1. Perform time alignment processing on the uploaded audio frames, and use a multi-scale dynamic time warping network for alignment matching;

[0067] S2-2. Use the integrated Transformer-CTC architecture for high-confidence identification and attach the confidence distribution to each token output;

[0068] S2-3. The output token sequence is timestamped against the local text hypothesis, and reconstruction fusion candidates are generated based on the offset value.

[0069] Specifically, the multi-scale dynamic time warping network (CTC) employs parallel attention aggregation at three scales (20ms, 40ms, and 80ms) during time alignment, uniformly mapping it to the token alignment table. The CTC model consists of six encoder layers, each containing multi-head attention (8 heads) and a feedforward network (2048 dimensions), outputting token positions with confidence scores. During timestamp alignment, tokens are sorted according to the difference between their start time offset and the local hypothesis, with offsets less than 50ms considered as fusion candidates.

[0070] The high-confidence identification process of S2-2 also includes the following steps:

[0071] S2-2-1. Normalize and compress the attention map of the intermediate layer of Transformer during each round of inference, and add it as an auxiliary feature to the CTC output layer;

[0072] S2-2-2. Set dynamic temperature parameters to adjust the output probability, where the temperature T fluctuates within the range of [0.8, 1.2] based on the context consistency score.

[0073] Specifically, the attention map is extracted in the fifth layer of the Transformer, and after column normalization (Softmax), it is average pooled to form a 64-dimensional auxiliary vector, which is injected into the CTC output layer through the residual channel. The temperature T is calculated based on the BLEU score between the current round and the previous round of text and the semantic nesting depth. If the BLEU is lower than 0.4 or the nesting level is more than 3 levels, then T is increased to 1.2.

[0074] In the initial local text assumptions and server-side text fusion of S3, an asymmetric merging mechanism is further adopted. This asymmetric merging mechanism uses the server-side text as the main body and traces the local assumption content character by character. If the number of consecutive character matches is less than a set threshold of 4, the local path is truncated to avoid the spread of errors.

[0075] Specifically, a sliding window strategy is used for character comparison. The server-side text is used as a reference. Each time the text is moved forward, the number of complete matches between the first four characters and the characters in the local hypothetical window is compared. If the number of matches is less than 4, the path is considered unreliable and the local path is truncated. Conversely, if the number of matches is greater than or equal to 4, the path is retained and the server-side confidence value is synchronized to improve text consistency.

[0076] The S4 large language model response generation process further includes the following steps:

[0077] S4-1. Segment the input text into semantic blocks, with each block containing no more than 128 tokens, and establish cross-block pointer chains for semantic coherence reference;

[0078] S4-2. Use the cross-round caching mechanism to extract the semantic backbone vector from the previous round of dialogue as the semantic starting point for the current inference, and perform forward attention initialization.

[0079] Specifically, each semantic block is limited to 128 tokens, using regular expressions to split sentences and logically group them based on verbs and conjunctions. Blocks are separated by embedded identifiers. <seqx>"The connection, the cross-round cache is represented by a token-level key-value chain, and the embedding vector generated in each round of dialogue is cached in an independent tensor space (maximum capacity 64 rounds), which serves as the initial value of the master control weight for the next round of Attention."

[0080] The semantic chunking of S4-1 also includes the following steps:

[0081] S4-1-1. The text is segmented into predicate center segments through syntactic analysis, and each segment is constructed into a tree-like nested structure for use when embedding the language model;

[0082] S4-1-2. Set minimum syntactic completeness constraints when dividing blocks to ensure that the subject-verb relationship is preserved after each block is broken down, thereby improving the accuracy of model inference.

[0083] Specifically, the spaCy tool, based on dependency syntax, is used to analyze Chinese sentences. Subject-predicate structures are extracted and a syntax tree is constructed as the semantic framework before embedding into the language model. The syntactic completeness constraint criteria are: each token must belong to at least one predicate center; if the syntactic structure is incomplete when a chunk is truncated, it is forcibly extended to the nearest complete segment to avoid misinterpretation.

[0084] The S6 dialogue state cache synchronization refresh mechanism further includes the following steps:

[0085] S6-1. Perform positional encoding on the keywords in the current round of response and generate a dialogue summary index based on the TF-IDF confidence of the keywords in the current round of response in the context;

[0086] S6-2. Establish a hash mapping table using the summary index as the key, link it to the top 3 items with the highest matching strength in the dialogue summary in the previous round of cache, and build a memory link;

[0087] S6-3. Utilize the context span formed by memory links to update the prompt word buffer and filter out content tokens that do not contribute anything.

[0088] Specifically, after each round of responses, the keywords are filtered using TF-IDF to select the Top-5, and positional encoding is added to them (based on BERT relative position embedding). The summary index is a 128-dimensional vector calculated by averaging these 5 keyword vectors, serving as the semantic label for the current round of dialogue. A hash key-value table is built to index the most similar summary item from the previous round (keeping a maximum of 3 items). When updating the prompt word buffer, tokens with a semantic contribution of less than 0.2 are directly removed.

[0089] The mapping relationship between the summary index and the previous round of cache in S6-2 also includes the following steps:

[0090] S6-2-1. Calculate the dot product similarity between the current summary vector and the historical summary vectors. Mark a significant match when the similarity value is higher than 0.85.

[0091] S6-2-2. For significant matches, adopt an index timing adjustment strategy to place the sentence segment in the historical summary that is closest to the current round of speech at the beginning of the prompt word.

[0092] Specifically, the summary vectors are calculated using a cosine similarity approximation dot product method, with a similarity exceeding 0.85 considered relevant. After establishing the index mapping, the order of historical speech fragments corresponding to the matching summaries is adjusted, selecting those closest to the current speech time and placing them at the beginning of the current prompt word list to optimize the semantic guidance effect in the next round.

[0093] The real-time speech stream dialogue interaction system based on the large language model is designed according to the real-time speech stream dialogue interaction method based on the large language model.

[0094] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and modifications can be made to the present invention without departing from the spirit and scope thereof, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.< / seqx>

Claims

1. A real-time speech stream dialogue interaction method based on a large language model, characterized in that, The real-time voice stream dialogue interaction method based on a large language model includes the following steps: S1. The collected continuous speech signal is divided into segments according to a fixed time window of 320 milliseconds to obtain a speech frame sequence; S2. The speech frame sequence is processed in parallel through a dual-path system. One path generates preliminary text hypotheses locally using an acoustic model, while the other path uploads the original frame data to a remote server for accurate text reconstruction. S3. Compare and fuse the preliminary text assumptions with the reconstructed text from the server to construct the final text with confidence labels; S4. Input the final text containing confidence labels into a large language model with a context management mechanism to generate a corresponding natural language response; S5. Perform speech synthesis and layout on the response text, and output it in sequence according to the rhythm tags; S6. Store the content of this round of interaction in the history cache and refresh the dialogue state in the large language model simultaneously; S7. The method further includes a delayed prediction mechanism, which predicts the semantic direction of a speech frame within 20 milliseconds after the speech frame enters the local channel, and pre-sets the next round of inference window for the large language model. S8. The method also includes a round-level policy injection mechanism, which quantifies the intonation changes, pause patterns and speech rate distribution in multi-round voice interaction into numerical parameters and inputs them into the large language model for semantic trend adjustment.

2. The real-time speech stream dialogue interaction method based on a large language model according to claim 1, characterized in that, The speech frame segmentation process of S1 further includes the following steps: S1-1. The acquired continuous speech signal is resampled at a fixed sampling rate of 24kHz and divided into 320-millisecond speech frames in a non-overlapping window format. S1-2. Perform a short-time Fourier transform on each speech frame and extract 40-dimensional log-Mel spectrum features; S1-3. Perform frame normalization on the extracted Mel spectrum features to fix the mean of the extracted Mel spectrum features to zero and the variance to one.

3. The real-time speech stream dialogue interaction method based on a large language model according to claim 1, characterized in that, The server-side text reconstruction path in S2 further includes the following steps: S2-1. Perform time alignment processing on the uploaded audio frames, and use a multi-scale dynamic time warping network for alignment matching; S2-2. Use the integrated Transformer-CTC architecture for high-confidence identification and attach the confidence distribution to each token output; S2-3. The output token sequence is timestamped against the local text hypothesis, and reconstruction fusion candidates are generated based on the offset value.

4. The real-time speech stream dialogue interaction method based on a large language model according to claim 3, characterized in that, The high-confidence identification process in S2-2 further includes the following steps: S2-2-1. During each round of inference, the intermediate layer attention map of the Transformer is normalized and compressed, and added as an auxiliary feature to the CTC output layer; S2-2-2. Set dynamic temperature parameters to adjust the output probability, where the temperature T fluctuates within the range of [0.8, 1.2] based on the context consistency score.

5. The real-time speech stream dialogue interaction method based on a large language model according to claim 1, characterized in that, In the process of merging the local initial text assumptions and the server text in S3, an asymmetric merging mechanism is further adopted. The asymmetric merging mechanism is fixed with the server text as the main body and traces the local assumption content character by character. If the number of consecutive character matches is less than a set threshold of 4, the local path is truncated to avoid the spread of errors.

6. The real-time speech stream dialogue interaction method based on a large language model according to claim 1, characterized in that, The natural language response generation process of S4 further includes the following steps: S4-1. Segment the input text into semantic blocks, with each block containing no more than 128 tokens, and establish cross-block pointer chains for semantic coherence reference; S4-2. Use the cross-round caching mechanism to extract the semantic backbone vector from the previous round of dialogue as the semantic starting point for the current inference, and perform forward attention initialization.

7. The real-time speech stream dialogue interaction method based on a large language model according to claim 6, characterized in that, The semantic block establishment in S4-1 also includes the following steps: S4-1-1. The text is segmented into predicate center segments through syntactic analysis, and each segment is constructed into a tree-like nested structure for use when embedding the language model; S4-1-2. Set minimum syntactic completeness constraints when dividing blocks to ensure that the subject-verb relationship is preserved after each block is broken down, thereby improving the accuracy of model inference.

8. The real-time speech stream dialogue interaction method based on a large language model according to claim 1, characterized in that, The dialogue state cache synchronization refresh mechanism of S6 further includes the following steps: S6-1. Perform positional encoding on the keywords in the current round response, and generate a dialogue summary index based on the TF-IDF confidence of the keywords in the current round response in the context; S6-2. Establish a hash mapping table using the summary index as the key, link it to the top 3 items with the highest matching strength in the dialogue summary in the previous round of cache, and construct a memory link; S6-3. Utilize the context span formed by memory links to update the prompt word buffer and filter out content tokens that do not contribute anything.

9. The real-time speech stream dialogue interaction method based on a large language model according to claim 8, characterized in that, The mapping relationship between the digest index and the previous round of cache in S6-2 also includes the following steps: S6-2-1. Calculate the dot product similarity between the current summary vector and the historical summary vectors. Mark a significant match when the similarity value is higher than 0.

85. S6-2-2. For the current summary vector marked as a significant match, adopt the index timing adjustment strategy to move the sentence segment in the historical summary corresponding to the current summary vector marked as a significant match to the beginning of the prompt word.

10. A real-time speech stream dialogue interaction system based on a large language model, relating to the real-time speech stream dialogue interaction method based on a large language model as described in any one of claims 1-9, characterized in that, The real-time voice stream dialogue interaction system based on the large language model is designed according to the real-time voice stream dialogue interaction method based on the large language model.

Citation Information

Patent Citations

  • Management method, system and equipment integrating large language model and voice recognition

    CN118350859A

  • Vehicle-mounted streaming language dialogue interaction system and method based on large language model

    CN119832915A