Dialogue processing method and system based on large model
By analyzing the length of the dialogue text and the topic turning frequency, the initial semantic segmentation vector is generated, the topic coherence and logical reasoning are calculated, and the long and short-term memory network is used to generate intelligent responses, which solves the recognition accuracy and coherence problems of the existing dialogue system in complex scenarios, and improves the intelligence and coherence of the dialogue system.
Patent Information
- Application Number
- CN202510399406.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing dialogue systems deal with complex dialogue dependencies, it is difficult to fully characterize diverse context dependencies, resulting in limited recognition accuracy and complexity evaluation capabilities.
By obtaining the length value of the conversation text, detecting the topic turning frequency, generating initial semantic segmentation vectors, calculating the Euclidean distance of the topic coherence score and logical reasoning subvectors, identifying the topic turning pattern, generating complexity evaluation vectors, and using long and short-term memory networks to analyze historical statement sequences, dynamically update the dependency weight allocation table, and generate intelligent response output.
It improves the intelligence and coherence of the dialogue system in complex scenarios, realizes the precise grasp and response of the dialogue mode, and generates dialogue output containing rare knowledge points.
Smart Images

Figure CN120337941A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, and in particular, to a dialogue processing method and system based on a large model. Background Art
[0002] As an important branch in the field of artificial intelligence, the dialogue system plays a key role in human-computer interaction, natural language understanding, and intelligent decision-making support. The core lies in how to accurately capture and process the complex dependency relationships in the dialogue to achieve a more natural and efficient communication experience. Currently, with the increasing demand for intelligent conversations, researchers are paying more attention to how to improve the system's understanding ability of the dialogue context through technical means, which not only concerns technological progress but also directly affects the user experience and application value. However, existing methods still have significant limitations in dealing with dialogue dependency relationships. Traditional techniques mostly rely on rule-based analysis or shallow statistical models, making it difficult to comprehensively describe the diverse types of context dependencies in the dialogue, such as topic coherence, logical reasoning, emotional attitude, and knowledge transfer. As a result, the performance of the system in complex scenarios is not satisfactory. These methods often simplify the dependency relationship into a single dimension, unable to effectively distinguish different types of dependency features, thereby limiting the recognition accuracy of dialogue patterns and the evaluation ability of complexity. Summary of the Invention
[0003] The purpose of the present invention is to solve the above problems and provide a dialogue processing method and system based on a large model.
[0004] The technical solution of this application is implemented as follows: In a first aspect, this application provides a dialogue processing method based on a large model, which obtains the length value of the dialogue text. According to the length value of the dialogue text, it uses a pre-established semantic boundary identification set to detect the topic transition frequency value, and combines the historical statement sequence sorted by time within the context window to generate an initial semantic segmentation vector including the number of feature extraction dimensions; According to the initial semantic segmentation vector, it calculates the topic coherence score using a dependency weight assignment table, separates the sub-vectors with orthogonality degree higher than the preset threshold through the vector decomposition accuracy value, and generates a preliminary structured representation matrix; Extracts the emotional intensity fluctuation feature and knowledge density distribution feature from the preliminary structured representation matrix, and generates a refined structured representation matrix after adjusting the matrix rank; Calculates the Euclidean distance between the topic coherence sub-vector and the logical reasoning sub-vector in the refined structured representation matrix, judges the dependency similarity according to the separation threshold of the number of feature extraction dimensions, and generates a topic logical dependency matrix; If there are element values in the topic logical dependency matrix that exceed the preset threshold, then group the semantic fragment sequences, identify the coherence pattern clusters dominated by the topic transition frequency, and generate a pattern cluster recognition set; Based on the set of recognized pattern clusters, calculate the distribution uniformity of the semantic boundary identification set using information entropy, generate a quantization value of the dialogue complexity by combining the emotional intensity fluctuations, and obtain a complexity evaluation vector; Dynamically update the dependency weight allocation table based on the complexity evaluation vector to generate a context representation vector containing emotional features; Analyze the temporal changes of the historical statement sequence using a long short-term memory network, and generate an intelligent responsive output sequence according to the analysis results; If the deviation between the intelligent responsive output sequence and the semantic boundary identification set exceeds a preset threshold, adjust the dependency weight allocation table through backpropagation to generate an updated response sequence; Recalculate the topic coherence score according to the updated context representation vector, and generate a dialogue output text containing rare knowledge points for minor topic shifts.
[0005] The advantages or beneficial effects in the above technical solutions at least include: In a second aspect, the present application also provides a system for implementing the large model-based dialogue processing method as described above.
[0006] The advantages or beneficial effects in the above technical solutions at least include: This method first generates an initial semantic segmentation vector by analyzing features such as the length of the dialogue text and the frequency of topic turns, and constructs a structured representation matrix in combination with context information. Then, by calculating topic coherence and logical reasoning, identify the topic turn pattern and generate a complexity evaluation vector. Based on this vector, the present invention dynamically updates the dependency weight allocation and uses a long short-term memory network to analyze the temporal changes of the historical statement sequence to generate an intelligent response output. If there is a deviation between the output and the semantic boundary, it is adjusted through backpropagation. Finally, the present invention can generate a dialogue output containing rare knowledge points for minor topic shifts, effectively improving the intelligence and coherence of the dialogue system, and achieving accurate grasp and response to complex dialogue scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The drawings illustrate exemplary embodiments of the present application in embodiments of the present invention, and are used together with the description to explain the principles of the present application, including these drawings to provide a further understanding of the present application, and the drawings are included in this specification and constitute a part of this specification.
[0008] Figure 1 It is a flowchart of a large model-based dialogue processing method of the present invention; DETAILED DESCRIPTION OF THE EMBODIMENTS Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.
[0009] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0010] It should be understood that the term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules or units.
[0011] It should be noted that the modifications of "one" and "plural" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0012] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0013] A large model-based dialogue processing method includes: Step S101, obtain a dialogue text length value, according to the dialogue text length value, detect a topic transition frequency value by using a pre-established semantic boundary identification set, and combine with a historical statement sequence sorted by time within a context window to generate an initial semantic segmentation vector including the number of feature extraction dimensions.
[0014] Obtain the character count of the dialogue text, and get the text length value through a counting method. Based on the character count, use a pre-established semantic boundary marker set to detect the topic transition frequency and obtain the transition frequency value. Through the transition frequency value, combined with the historical statement sequence sorted by time within the context window, generate the sorted statement sequence data. For the sorted statement sequence data, extract the semantic boundary markers to obtain the boundary marker set. Through the boundary marker set, use a feature extraction method to generate the initial semantic segmentation vector and obtain the segmented vector data. Obtain the segmented vector data, combined with the historical statements in the context window, judge the semantic turning points in the vector to obtain the semantic transition distribution. According to the semantic transition distribution, use a clustering algorithm to group the segmented vectors to obtain the final semantic segmentation result.
[0015] Specifically, when processing the dialogue text, first determine its scale by calculating the text length value. For example, a dialogue contains 50 characters. Then, use a pre-established semantic boundary marker set, such as punctuation marks and specific keywords, to detect the topic transition frequency value. Suppose 3 topic transitions are detected in the dialogue, indicating that the dialogue content is relatively complex. Combine the historical statement sequence sorted by time within the context window, such as the first 5 statements, to generate the initial semantic segmentation vector containing the number of feature extraction dimensions. Specifically, use the TF-IDF algorithm to extract the keyword weights of each statement to form a 5-dimensional vector. Calculate the similarity between adjacent statements through cosine similarity. If the similarity is lower than 7, it is considered that there is semantic segmentation. Finally, generate the initial semantic segmentation vector containing 5 dimensions for subsequent semantic analysis and topic tracking.
[0016] Step S102, according to the initial semantic segmentation vector, calculate the topic coherence score using a dependency weight assignment table, and separate the sub-vectors with an orthogonality degree higher than the preset threshold through the vector decomposition accuracy value to generate a preliminary structured representation matrix.
[0017] Obtain the initial semantic segmentation vector, calculate the topic coherence score using a dependency weight assignment table to obtain the coherence distribution data. Through the coherence distribution data, use a vector decomposition method to separate the sub-vectors with an orthogonality degree higher than the preset threshold to obtain the decomposed sub-vector set. For the decomposed sub-vector set, generate a preliminary structured representation matrix to obtain the matrix data. According to the matrix data, combined with the association between semantic segmentation and topic coherence, use a clustering algorithm to group the matrix to obtain the grouped matrix sequence. Through the grouped matrix sequence, judge the matching degree between the orthogonality degree and the representation matrix to obtain the matching distribution result. Obtain the matching distribution result, combined with the relationship between weight assignment and decomposition accuracy, adjust the structured representation matrix to obtain the optimized representation matrix. For the optimized representation matrix, use the mapping rule between semantic segmentation and structured representation to generate the final semantic structure data.
[0018] Specifically, based on the initial semantic segmentation vector, a topic coherence score is calculated using a dependency weight distribution table, which is statistically generated from a specific domain corpus, and the weight values range from 0 to 1. For example, the weight of the keyword "climate change" in the environmental field is 8, while the weight of "financial policy" is 3. Through the weighted summation algorithm, the weight value of each dimension in the vector is multiplied by the corresponding eigenvalue, and the accumulated coherence score is obtained. Suppose the coherence score of a certain vector is 75. Then, the singular value decomposition algorithm is used to decompose the vector, and the orthogonality degree threshold is set to 6. The parts of the decomposed sub-vectors with an orthogonality degree higher than 6 are separated. For example, two sub-vectors are separated, and their orthogonality degrees are 72 and 65 respectively. These sub-vectors are recombined to generate a preliminary structured representation matrix, and the dimension of the matrix is 2×5, where each row represents a sub-vector and each column corresponds to the dimension of the original vector. To further optimize the matrix representation, the LDA topic model is introduced to analyze the topic distribution of the matrix and extract potential topic information. Suppose 3 topics are extracted, and their distribution probabilities are 45, 35, and 20 respectively, and finally a structured representation matrix with topic characteristics is formed for subsequent semantic association analysis and topic evolution modeling.
[0019] Step S103, extract the emotional intensity fluctuation feature and knowledge density distribution feature from the preliminary structured representation matrix, and generate a refined structured representation matrix after adjusting the matrix rank.
[0020] The distribution of emotional intensity and knowledge density is obtained from the preliminary data through a feature extraction method to obtain the fluctuation feature and density distribution data. According to the fluctuation feature and density distribution data, a structure matrix is constructed using matrix generation technology to obtain preliminary structured data. For the preliminary structured data, the correlation between the distribution feature and emotional intensity is obtained to get the correlation distribution result. If the correlation distribution result shows a significant correspondence between the fluctuation feature and knowledge density, the structure matrix is optimized through a rank adjustment method to obtain refined representation data. Through the refined representation data, an adjustment method is used to separate the independent components of emotional intensity and density distribution to obtain a separated feature set. According to the separated feature set, the matching degree between the fluctuation feature and the distribution feature is judged to obtain the matching distribution data. For the matching distribution data, a clustering algorithm is used to group the refined representation data to obtain the final grouping result.
[0021] Specifically, when extracting the emotional intensity fluctuation features from the preliminary structured representation matrix, an emotion dictionary matching algorithm is used to annotate the emotional polarity of the text data in the matrix. For example, a scoring method based on the VADER emotion dictionary is used to calculate the emotional score of each text segment. Suppose the emotional intensity value of a certain segment is 85. The sliding window algorithm is used to analyze the emotional score sequence to extract the fluctuation features. For example, the window size is 5, and the standard deviation of the emotional scores within the window is calculated to be 12, which is used as a quantitative indicator of emotional fluctuation. At the same time, the TF-IDF algorithm is used to calculate the knowledge density distribution features. For example, for the keyword "sustainable development" in the matrix, its TF-IDF value is 7, while the TF-IDF value of "energy transition" is 9. Through normalization, a knowledge density distribution vector is obtained. Combining the emotional fluctuation features and the knowledge density distribution features, a matrix rank adjustment algorithm is used to optimize the preliminary structured representation matrix. For example, through QR decomposition, the rank of the matrix is adjusted from 4 to 3, and after removing redundant information, a refined structured representation matrix is generated, and its dimension is 3×5. To further enhance the semantic expression ability of the matrix, a word embedding model is used to vectorize the text features in the matrix. For example, the BERT model is used to generate 768-dimensional word vectors, and the dimension is compressed to 50 through a dimensionality reduction algorithm, and finally a refined and efficient matrix representation is formed for subsequent semantic depth analysis and knowledge graph construction.
[0022] Step S104, calculate the Euclidean distance between the topic coherence sub-vector and the logical reasoning sub-vector in the refined structured representation matrix, and judge the dependence similarity according to the separation threshold of the feature extraction dimension number to generate a topic logical dependence matrix.
[0023] By calculating the Euclidean distance between topic coherence and logical reasoning, spatial difference data is obtained. If the spatial difference data exceeds the preset separation threshold, a feature extraction technique is used to decompose the representation matrix to obtain a dependence distribution result. According to the dependence distribution result, structured dependence data is constructed through a matrix generation technique to determine a topic logical dependence matrix. For the structured dependence data, the matching degree between the dependence similarity and the distribution result is obtained to get a matching distribution set. The clustering algorithm is used to group the matching distribution set to obtain a grouped feature subset. According to the grouped feature subset, the association strength between topic coherence and logical reasoning is judged to obtain association distribution data. An adjustment method is used to separate independent components from the association distribution data to obtain a refined topic logical feature set.
[0024] Specifically, when calculating the Euclidean distance between the topic coherence sub-vector and the logical reasoning sub-vector in the refined structured representation matrix, these two sub-vectors need to be extracted from the matrix first. Suppose the topic coherence sub-vector is [8, 6, 7] and the logical reasoning sub-vector is [5, 9, 4]. Then the formula for calculating the Euclidean distance is √((8 - 5)² + (6 - 9)² + (7 - 4)²), and the result is 5477. According to the separation threshold of the feature extraction dimension number, the threshold is set to 6. If the Euclidean distance is less than this threshold, it is considered that there is a dependence relationship between topic coherence and logical reasoning. Next, generate a topic logical dependence matrix and represent the dependence relationship as the element value in the matrix.
[0025] For example, if the Euclidean distance between topic A and topic B is 5, which is less than the threshold 6, the value at the corresponding position in the matrix is set to 1, indicating the existence of a dependence relationship; otherwise, it is set to 0. In this way, a complete topic logical dependence matrix can be constructed for subsequent analysis and application.
[0026] For example, in an information retrieval system, this matrix can be used to optimize the relevance and logic of search results and improve the user experience.
[0027] Step S105, if there are element values in the topic logical dependence matrix that exceed the preset threshold, group the semantic fragment sequence, identify the coherence pattern clusters dominated by the topic transition frequency, and generate a pattern cluster identification set.
[0028] If the element values in the dependence matrix corresponding to the topic logic exceed the preset threshold, obtain the positions of the elements exceeding the threshold through matrix analysis to get a preliminary segmentation point set. Group the semantic fragment sequence through the preliminary segmentation point set, use the K-means algorithm to identify the transition frequency within each group, and obtain the frequency distribution characteristics. Judge the coherence pattern according to the frequency distribution characteristics. If the fluctuation range of the transition frequency within the group is lower than the preset range, it is determined that this group forms a single coherence pattern to obtain a coherence pattern set. For each pattern in the coherence pattern set, obtain its frequency-dominant characteristic, identify the pattern clusters by comparing the frequency-dominant values to get the pattern cluster division result. Extract the boundary points of each pattern cluster from the pattern cluster division result to generate a boundary point sequence. Re-divide the semantic fragment sequence using the boundary point sequence, and generate a pattern cluster identification set by statistically analyzing the coherence pattern characteristics of the divided fragments. According to the frequency-dominant characteristics of each cluster in the pattern cluster identification set, judge its matching degree with the topic logic to obtain the final coherence pattern cluster division.
[0029] Specifically, when processing the semantic fragment sequence, first construct a logical dependency matrix. Each element in the matrix represents the logical association strength between two semantic fragments, and the preset threshold is 8. Through calculation, it is found that there are multiple element values in the matrix that exceed the threshold. For example, the association strength between fragment A and fragment B is 85, and the association strength between fragment C and fragment D is 9. Based on these association strengths that exceed the threshold, use the K-means clustering algorithm to group the semantic fragments. Set the number of clusters to 3, and optimize the cluster centers through iteration. Finally, assign fragments A, B, C, and D to different clusters respectively. Next, by analyzing the turning frequency of the topics within each cluster, identify the dominant coherence patterns. For example, the turning frequency of cluster 1 is 3, the turning frequency of cluster 2 is 5, and the turning frequency of cluster 3 is 2, thus generating a pattern cluster recognition set. Specifically, the coherence pattern of cluster 1 shows a smooth transition of topics, cluster 2 shows frequent topic switches, and cluster 3 shows a deep focus on topics. Through this series of processes, it can provide strong support for subsequent semantic analysis and content understanding.
[0030] Step S106, according to the pattern cluster recognition set, calculate the distribution uniformity of the semantic boundary identification set using information entropy, and generate a dialogue complexity quantization value in combination with the emotional intensity fluctuation to obtain a complexity evaluation vector.
[0031] Through the pattern cluster division recognition set, calculate the distribution uniformity of the identification set using information entropy to obtain a preliminary uniformity distribution result. According to the preliminary uniformity distribution result, obtain the division range of the semantic boundary and determine the semantic boundary distribution characteristics of the identification set. Through the semantic boundary distribution characteristics, analyze the generation situation of the emotional intensity fluctuation to obtain a fluctuation feature sequence. Use the fluctuation feature sequence to calculate the quantization value of the dialogue complexity, and judge the quantization value distribution range. According to the quantization value distribution range, combine the complexity evaluation criteria to generate a complexity evaluation vector. Through the complexity evaluation vector, analyze the relationship between the pattern cluster and the semantic boundary to determine the distribution characteristics of the final evaluation vector. Obtain the distribution characteristics of the final evaluation vector, judge the association trend between the dialogue complexity and the emotional intensity, and obtain an optimized quantization distribution.
[0032] Specifically, in the pattern cluster recognition set, first, the text data is divided into several pattern clusters through a clustering algorithm. For example, using the K-means algorithm, 1000 texts are divided into 5 clusters, with each cluster containing 200, 300, 150, 200, and 150 texts respectively. Then, the information entropy is used to calculate the distribution uniformity of the semantic boundary identification set. Assuming that the semantic boundary identification set contains 10 identifications and its calculated information entropy is 3, it indicates a relatively uniform distribution. The dialogue complexity quantization value is generated by combining the emotional intensity fluctuations. For example, each text is given an emotional score through an emotional analysis tool, and the calculated standard deviation is 8, indicating large emotional fluctuations. Finally, after normalizing the information entropy and the emotional standard deviation, a complexity evaluation vector [45, 8] is obtained for subsequent optimization of the dialogue system. Through this series of processes, the dialogue complexity can be accurately quantified, providing data support for system improvement.
[0033] Step S107: Dynamically update the dependency weight allocation table based on the complexity evaluation vector to generate a context representation vector containing emotional features.
[0034] Determine the dynamic adjustment direction of the vector through complexity evaluation to update the dependency weights. Use a preset threshold to judge the change trend of the dependency weights and obtain the dynamically updated allocation table. For the updated result of the allocation table, adjust the weight values to obtain an optimized dependency relationship. Extract key information from the emotional features and fuse it into the optimized dependency relationship to generate a preliminary representation vector. If there are significant patterns in the context table, enhance the preliminary representation vector through feature fusion to obtain a context-aware vector. According to the context-aware vector, use the support vector machine algorithm to judge the emotional tendency and generate a final representation vector. Through the final representation vector, determine the association strength between the emotional features and the context, and output the complete representation result.
[0035] Specifically, in the process of dynamically updating the dependency weight allocation table based on the complexity evaluation vector, it is first necessary to calculate the complexity value of each vector. Assume the input vector is [5, 3, 7], and use the complexity calculation formula C = 1 - (Σx_i^2)^(1 / 2), where x_i is the element in the vector. The calculated complexity C = 1 - (5^2 + 3^2 + 7^2)^(1 / 2) ≈ 24. Next, dynamically adjust the dependency weight allocation table according to the complexity value. Assume the initial weight allocation table is [4, 3, 3], and use the weight update formula w_i = w_i * (1 + C), where w_i is the element in the weight table. The updated weight table is [4 * 24, 3 * 24, 3 * 24] ≈ [496, 372, 372]. Then, use the updated weight table to generate a context representation vector containing sentiment features. Assume the context vector is [6, 4, 8], and use the weighted summation formula V = Σ(w_i * v_i), where v_i is the element in the context vector. The calculated representation vector V = 496 * 6 + 372 * 4 + 372 * 8 ≈ 2976 + 1488 + 2976 ≈ 744. Finally, analyze the representation vector through a sentiment feature extraction algorithm. Assume an SVM classifier is used for classification, and the obtained sentiment feature is positive. Through complexity evaluation, dynamic weight update, and sentiment feature extraction, the whole process generates a context representation vector with sentiment features.
[0036] Step S108: Analyze the temporal changes of the historical statement sequence using a long short-term memory network, and generate an intelligent responsive output sequence according to the analysis result.
[0037] Use a long short-term memory network to obtain a statement sequence from historical statements, and determine the temporal change characteristics through network processing. Obtain the sequence change trend from the temporal changes through temporal analysis to get the analysis result. For the analysis result, use a response generation technique to judge the output form of the intelligent response. If the sequence change exceeds the preset threshold, adjust the network processing parameters through the memory network to obtain optimized temporal change characteristics. According to the optimized temporal change characteristics, generate a new output sequence through the long short-term memory network. After obtaining the new output sequence, use temporal analysis to verify the accuracy of the response generation to get the final intelligent response sequence. Compare the final intelligent response sequence with the historical statements to judge whether the sequence change meets the expectation to get the verification result.
[0038] Specifically, when analyzing the temporal changes of the historical statement sequence, first preprocess the input historical statement sequence and convert it into a numerical sequence suitable for input to a long short-term memory network (LSTM).
[0039] For example, assume the input sentence sequence is "Market volatility intensifies, investor sentiment is low, and the expectation of policy adjustment rises". Each word is converted into a corresponding vector representation through word embedding technology. For example, "market" is converted into [12, 45, 67], and other words are also converted accordingly, forming a three-dimensional vector sequence. Then, this vector sequence is input into the LSTM model. The model structure contains 128 hidden units and is trained using the Adam optimizer with a learning rate set to 001. During the training process, the model continuously adjusts the weights through the backpropagation algorithm to minimize the prediction error. After 100 epochs of training, the model can capture the temporal dependence relationships in the sentence sequence, such as the correlation between "Market volatility intensifies" and "Investor sentiment is low". Based on the trained LSTM model, an intelligent responsive output sequence can be generated. For example, when "Market volatility intensifies" is input, the model outputs "It is recommended that investors operate cautiously and pay attention to policy adjustments". In this way, the LSTM model can effectively analyze the temporal changes of historical sentence sequences and generate corresponding intelligent responses.
[0040] Step S109, if the deviation between the intelligent responsive output sequence and the semantic boundary identification set exceeds the preset threshold, then adjust the dependency weight allocation table through backpropagation to generate an updated response sequence.
[0041] If the deviation between the intelligent response and the semantic boundary exceeds the deviation threshold, then obtain the proportion of the exceeded part through deviation calculation to get the deviation evaluation result. According to the deviation evaluation result, use a preset rule to judge whether to trigger an adjustment and determine the adjustment requirement status. Perform parameter correction on the weight allocation table through the backpropagation algorithm to generate adjusted dependency weight data. Obtain the adjusted dependency weight data, update the generation logic of the response sequence to get a preliminary updated sequence. Perform a consistency check on the preliminary updated sequence and the boundary identification to judge whether the sequence deviation meets the threshold requirement. If the check result shows that the deviation still exceeds the threshold, then adjust the preliminary updated sequence through an iterative optimization algorithm to generate a final updated sequence. Replace the original response sequence with the final updated sequence to complete the sequence generation process.
[0042] Specifically, when the deviation between the intelligent responsive output sequence and the semantic boundary identification set exceeds the preset threshold, first measure the deviation degree by calculating the mean square error (MSE) between the two. Assume the preset threshold is 05, and the actually calculated MSE is 08, indicating that the deviation exceeds the allowable range. At this time, use the backpropagation algorithm to adjust the dependency weight allocation table. During the backpropagation process, use the gradient descent method to update the weights, set the learning rate to 01, and gradually reduce the error through multiple iterations.
[0043] For example, in the first iteration, the weight update formula is: weight = weight - learning rate * gradient, where the gradient is calculated using the chain rule. After 10 iterations, the MSE drops to 04, which is lower than the preset threshold, indicating that the adjustment is effective. Then, a new response sequence is generated based on the updated weight assignment table. The new sequence is compared with the target identification set through semantic similarity calculation. Using the cosine similarity algorithm, the calculated similarity is 92, indicating that the semantics of the new sequence meet the expectations. Finally, the updated response sequence is output, and the parameter changes during the adjustment process are recorded for subsequent analysis and optimization. Through this series of operations, the output accuracy and semantic consistency of the intelligent response system are ensured.
[0044] Step S1010, recalculate the topic coherence score according to the updated context representation vector, and generate a dialogue output text containing rare knowledge points for minor topic drift.
[0045] Obtain the representation of updated data through the context vector, and use a recurrent neural network to determine the vector update result. Calculate the topic coherence score from the vector update result to obtain the coherence score value. If the coherence score is lower than the preset threshold, adjust the topic drift direction through drift. Obtain rare knowledge according to the topic drift direction, and determine the content included in the knowledge point. Generate a dialogue text through the content included in the knowledge point, and obtain a preliminary text using a text generation model. Extract features from the preliminary text to judge whether the text generation meets the coherence requirements. Adjust the drift generation parameters for the features to obtain the final dialogue text.
[0046] Specifically, in the updated context representation vector, first extract the semantic features of the text based on the BERT model to generate a 768-dimensional vector representation, and calculate the topic coherence score through cosine similarity.
[0047] For example, for two sentences "The principle of quantum computers" and "The applications of quantum entanglement", their vector similarity is 85, indicating a high degree of topic correlation. For minor topic drift, use the LDA topic model for analysis and find that the topic distribution similarity between "quantum entanglement" and "quantum bits" is 78, indicating the existence of minor drift. To further generate a dialogue output containing rare knowledge points, when using the GPT-3 model to input "The applications of quantum entanglement", the text "The key distribution mechanism of quantum entanglement in quantum communication" is generated, where "the key distribution mechanism" is a rare knowledge point. Calculate the term frequency-inverse document frequency of this knowledge point through the TF-IDF algorithm to be 12, indicating that it is relatively rare in the corpus. Finally, combine the topic coherence score and the generation result of rare knowledge points to optimize the information density and relevance of the dialogue output, ensuring that the technical content of the output not only conforms to the context logic but also contains in-depth knowledge.
[0048] For example, generate dialogue text such as "The key distribution mechanism of quantum entanglement in quantum communication has extremely high security, and its principle is based on the verification of Bell's inequality", where the "verification of Bell's inequality" further expands rare knowledge points and enhances the technical depth of the dialogue. Embodiments of the present invention also provide a system for implementing the above method.
[0049] Those skilled in the art should understand that the above embodiments are merely for clearly illustrating the present application and do not limit the scope of the present application. For those skilled in the art, other changes or variations can be made based on the above disclosure, and these changes or variations are still within the scope of the present application.
Claims
1. A dialogue processing method based on a large model, characterized in that: The method includes: Obtain the length value of the dialogue text. According to the length value of the dialogue text, detect the topic transition frequency value using a pre-established semantic boundary identification set, and combine with the historical statement sequence sorted by time within the context window to generate an initial semantic segmentation vector including the number of feature extraction dimensions; According to the initial semantic segmentation vector, calculate the topic coherence score using a dependency weight assignment table, separate sub-vectors with orthogonality degree higher than a preset threshold through the vector decomposition accuracy value, and generate a preliminary structured representation matrix; Extract the emotional intensity fluctuation feature and knowledge density distribution feature from the preliminary structured representation matrix, and generate a refined structured representation matrix after adjusting the matrix rank; Calculate the Euclidean distance between the topic coherence sub-vector and the logical reasoning sub-vector in the refined structured representation matrix, judge the dependency similarity according to the separation threshold of the number of feature extraction dimensions, and generate a topic logical dependency matrix; If there are element values in the topic logical dependency matrix that exceed the preset threshold, group the semantic segment sequence, identify the coherence pattern clusters dominated by the topic transition frequency, and generate a pattern cluster identification set; According to the pattern cluster identification set, calculate the distribution uniformity of the semantic boundary identification set using information entropy, and combine with the emotional intensity fluctuation to generate a dialogue complexity quantization value to obtain a complexity evaluation vector; Dynamically update the dependency weight assignment table based on the complexity evaluation vector to generate a context representation vector containing emotional features; Use a long short-term memory network to analyze the temporal changes of the historical statement sequence, and generate an intelligent responsive output sequence according to the analysis result; If the deviation between the intelligent responsive output sequence and the semantic boundary identification set exceeds the preset threshold, adjust the dependency weight assignment table through backpropagation to generate an updated response sequence; Recalculate the topic coherence score according to the updated context representation vector, and generate a dialogue output text containing rare knowledge points for minor topic offsets.
2. The large model-based dialogue processing method according to claim 1, characterized in that: Obtain the length value of the dialogue text. According to the length value of the dialogue text, detect the topic transition frequency value using a pre-established semantic boundary identification set, and combine with the historical statement sequence sorted by time within the context window to generate an initial semantic segmentation vector, including: Obtain the number of characters in the dialogue text, and obtain the text length value through a counting method; According to the number of characters, detect the topic transition frequency using a pre-established semantic boundary identification set to obtain the transition frequency value; Through the transition frequency value, combine with the historical statement sequence sorted by time within the context window to generate sorted statement sequence data; For the sorted statement sequence data, extract semantic boundary identifications to obtain a boundary identification set; Through the boundary identification set, use a feature extraction method to generate an initial semantic segmentation vector to obtain segmented vector data; Obtain the segmented vector data, and combine with the historical statements in the context window to judge the semantic turning points in the vector to obtain the semantic transition distribution; According to the semantic transition distribution, use a clustering algorithm to group the segmented vectors to obtain the final semantic segmentation result.
3. The large model-based dialogue processing method according to claim 1, characterized in that: According to the initial semantic segmentation vector, calculate the topic coherence score using a dependency weight assignment table, separate sub-vectors with orthogonality degree higher than a preset threshold through the vector decomposition accuracy value, and generate a preliminary structured representation matrix, including: Obtain the initial semantic segmentation vector, calculate the topic coherence score using the dependency weight distribution table, and obtain the coherence distribution data; Based on the coherence distribution data, use the vector decomposition method to separate sub-vectors with orthogonality higher than the preset threshold, and obtain the decomposed sub-vector set; For the decomposed sub-vector set, generate a preliminary structured representation matrix to obtain matrix data; According to the matrix data, combined with the association between semantic segmentation and topic coherence, use the clustering algorithm to group the matrix to obtain the grouped matrix sequence; Based on the grouped matrix sequence, judge the matching degree between the orthogonality and the representation matrix to obtain the matching distribution result; Obtain the matching distribution result, combined with the relationship between weight assignment and decomposition accuracy, adjust the structured representation matrix to obtain the optimized representation matrix; For the optimized representation matrix, use the mapping rule between semantic segmentation and structured table to generate the final semantic structure data.
4. The method for dialogue processing based on a large model according to claim 1, characterized in that: Extract the emotional intensity fluctuation feature and knowledge density distribution feature from the preliminary structured representation matrix, and generate a refined structured representation matrix after adjusting the matrix rank, including: Obtain the distribution of emotional intensity and knowledge density from the preliminary data through the feature extraction method to obtain the fluctuation feature and density distribution data; According to the fluctuation feature and density distribution data, use the matrix generation technology to construct a structure matrix to obtain the preliminary structured data; For the preliminary structured data, obtain the correlation between the distribution feature and the emotional intensity to obtain the correlation distribution result; If the correlation distribution result shows a significant correspondence between the fluctuation feature and the knowledge density, optimize the structure matrix through the rank adjustment method to obtain the refined representation data; Based on the refined representation data, use the adjustment method to separate the independent components of the emotional intensity and density distribution to obtain the separated feature set; According to the separated feature set, judge the matching degree between the fluctuation feature and the distribution feature to obtain the matching distribution data; For the matching distribution data, use the clustering algorithm to group the refined representation data to obtain the final grouping result.
5. The method for dialogue processing based on a large model according to claim 1, wherein: Calculate the Euclidean distance between the topic coherence sub-vector and the logical reasoning sub-vector in the refined structured representation matrix, judge the dependence similarity according to the separation threshold of the feature extraction dimension number, and generate the topic logical dependence matrix, including: Obtain the spatial difference data by calculating the Euclidean distance between topic coherence and logical reasoning; If the spatial difference data exceeds the preset separation threshold, use the feature extraction technology to decompose the representation matrix to obtain the dependence distribution result; According to the dependence distribution result, construct the structured dependence data through the matrix generation technology to determine the topic logical dependence matrix; For the structured dependence data, obtain the matching degree between the dependence similarity and the distribution result to obtain the matching distribution set; Group the matching distribution set through the clustering algorithm to obtain the grouped feature subset; According to the grouped feature subset, judge the association strength between topic coherence and logical reasoning to obtain the association distribution data; Use the adjustment method to separate the independent components from the association distribution data to obtain the refined topic logical feature set.
6. The large model-based dialogue processing method according to claim 1, wherein: If there are elements in the topic logic dependency matrix whose values exceed a preset threshold, group the semantic segment sequence, identify the coherence pattern clusters dominated by the topic transition frequency, and generate a pattern cluster identification set, including: If the element values in the dependency matrix corresponding to the topic logic exceed the preset threshold, obtain the positions of the elements exceeding the threshold through matrix analysis to get a preliminary segmentation point set; Group the semantic segment sequence using the preliminary segmentation point set, and use the K-means algorithm to identify the transition frequency within each group to obtain the frequency distribution characteristics; Judge the coherence pattern based on the frequency distribution characteristics. If the fluctuation range of the transition frequency within the group is lower than the preset range, determine that the group forms a single coherence pattern to obtain a coherence pattern set; For each pattern in the coherence pattern set, obtain its frequency-dominant characteristic, identify the pattern clusters by comparing the frequency-dominant values to get the pattern cluster division result; Extract the boundary points of each pattern cluster from the pattern cluster division result to generate a boundary point sequence; Redivide the semantic segment sequence using the boundary point sequence, and generate a pattern cluster identification set by statistically analyzing the coherence pattern characteristics of the segments after division; Judge the matching degree with the topic logic according to the frequency-dominant characteristics of each cluster in the pattern cluster identification set to obtain the final coherence pattern cluster division.
7. The method for dialogue processing based on a large model according to claim 1, wherein: According to the pattern cluster identification set, calculate the distribution uniformity of the semantic boundary identification set using information entropy, and generate a dialogue complexity quantization value in combination with the emotional intensity fluctuation to obtain a complexity evaluation vector, including: Calculate the distribution uniformity of the identification set using information entropy through the pattern cluster division identification set to obtain a preliminary uniformity distribution result; Obtain the division range of the semantic boundary based on the preliminary uniformity distribution result to determine the semantic boundary distribution characteristics of the identification set; Analyze the generation situation of the emotional intensity fluctuation through the semantic boundary distribution characteristics to obtain a fluctuation characteristic sequence; Use the fluctuation characteristic sequence to calculate the quantization value of the dialogue complexity and judge the quantization value distribution range; Generate a complexity evaluation vector according to the quantization value distribution range in combination with the complexity evaluation criteria; Analyze the relationship between the pattern clusters and the semantic boundary through the complexity evaluation vector to determine the distribution characteristics of the final evaluation vector; Obtain the distribution characteristics of the final evaluation vector, judge the correlation trend between the dialogue complexity and the emotional intensity to obtain an optimized quantization distribution.
8. The large model-based dialogue processing method according to claim 1, characterized in that: Dynamically update the dependency weight allocation table based on the complexity evaluation vector to generate a context representation vector containing emotional characteristics, including: Determine the dynamic adjustment direction of the vector through complexity evaluation to update the dependency weights; Use a preset threshold to judge the change trend of the dependency weights to obtain a dynamically updated allocation table; For the updated result of the allocation table, adjust the weight values to obtain an optimized dependency relationship; Extract key information from the emotional characteristics and fuse it into the optimized dependency relationship to generate a preliminary representation vector; If there are significant patterns in the context table, enhance the preliminary representation vector through feature fusion to obtain a context-aware vector; Judge the emotional tendency using the support vector machine algorithm based on the context-aware vector to generate a final representation vector; Determine the association strength between the emotional characteristics and the context through the final representation vector and output the complete representation result; Using a long short-term memory network to analyze the temporal changes of historical statement sequences, and generating an intelligent responsive output sequence according to the analysis results, including: Using a long short-term memory network to obtain a statement sequence from historical statements, and determining the temporal change characteristics through network processing; Obtaining the sequence change trend from the temporal changes through temporal analysis to obtain the analysis result; Adopting a response generation technique for the analysis result to judge the output form of the intelligent response; If the sequence change exceeds the preset threshold, adjust the network processing parameters through the memory network to obtain the optimized temporal change characteristics; Generating a new output sequence through the long short-term memory network according to the optimized temporal change characteristics; After obtaining the new output sequence, verify the accuracy of the response generation through temporal analysis to obtain the final intelligent response sequence; Comparing the final intelligent response sequence with the historical statements to judge whether the sequence change meets the expectation to obtain the verification result; If the deviation between the intelligent responsive output sequence and the semantic boundary identification set exceeds the preset threshold, adjust the dependency weight distribution table through backpropagation to generate an updated response sequence, including: If the deviation between the intelligent response and the semantic boundary exceeds the deviation threshold, obtain the proportion of the exceeded part through deviation calculation to obtain the deviation evaluation result; According to the deviation evaluation result, judge whether to trigger the adjustment by using a preset rule to determine the adjustment requirement status; Perform parameter correction on the weight distribution table through the backpropagation algorithm to generate the adjusted dependency weight data; Obtain the adjusted dependency weight data and update the generation logic of the response sequence to obtain the preliminary updated sequence; Perform a consistency check on the preliminary updated sequence and the boundary identification to judge whether the sequence deviation meets the threshold requirement; If the verification result shows that the deviation still exceeds the threshold, adjust the preliminary updated sequence through the iterative optimization algorithm to generate the final updated sequence; Replace the original response sequence according to the final updated sequence to complete the sequence generation process.
9. The large model-based dialogue processing method according to claim 1, characterized in that: Recalculate the topic coherence score according to the updated context representation vector, and generate a dialogue output text containing rare knowledge points for a minor topic shift, including: Obtain the representation update data through the context vector, and determine the vector update result by using a recurrent neural network; Calculate the topic coherence score from the vector update result to obtain the coherence score value; If the coherence score is lower than the preset threshold, adjust the topic shift direction through the shift generation; Obtain rare knowledge according to the topic shift direction to determine the content included in the knowledge point; Generate a dialogue text through the content included in the knowledge point, and obtain the preliminary text by using a text generation model; Extract features from the preliminary text to judge whether the text generation meets the coherence requirement; Adjust the shift generation parameters according to the features to obtain the final dialogue text.
10. A system, characterized in that: The system is used to implement the large model-based dialogue processing method described in any one of claims 1-9.
Citation Information
Cited By
AI-based travel note automatic generation method and system
CN120832867A
An AI-based travel note automatic generation method and system
CN120832867B
AI-based sentiment analysis platform
CN120874851A
AI-based sentiment analysis platform
CN120874851B