Artificial intelligence-based dialogue generation method and apparatus

WO2026166004A1PCT designated stage Publication Date: 2026-08-13BEIJING JIZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2026-08-13

Smart Images

  • Figure CN2025089523_13082026_PF_FP_ABST
    Figure CN2025089523_13082026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides an artificial intelligence-based dialogue generation method and apparatus. The artificial intelligence-based dialogue generation method comprises: collecting a dialogue of a user in real time, using a predefined basic reply template to generate an initial dialogue, replying to the dialogue of the user, and acquiring initial dialogue record information; performing context information fusion on the initial dialogue record information to obtain a fused context feature vector; performing semantic information fusion on the initial dialogue record information to obtain a fused semantic feature vector; performing secondary fusion on the fused context feature vector and the fused semantic feature vector to obtain a fused feature vector; and by means of the fused feature vector in combination with a trained intent model, generating dialogue content to make a reply. The apparatus comprises modules corresponding to the steps of the method.
Need to check novelty before this filing date? Find Prior Art

Description

Artificial Intelligence-Based Dialogue Generation Method and Apparatus Technical Field

[0001] This invention proposes a dialogue generation method and apparatus based on artificial intelligence, belonging to the field of dialogue intelligent generation technology. Background Technology

[0002] With the rapid development of artificial intelligence technology, dialogue generation systems have been widely applied in numerous fields, such as intelligent customer service, smart homes, and in-vehicle navigation systems. These systems provide users with convenient services such as information retrieval and task execution by simulating human dialogue. However, existing dialogue generation methods still face many challenges, particularly in real-time performance, contextual understanding, semantic parsing, and intent recognition. Regarding real-time performance, traditional dialogue generation systems often rely on complex preprocessing procedures, resulting in high response latency and failing to meet users' demands for immediate feedback. Furthermore, these systems often lack sufficient flexibility in processing user input, making it difficult to handle diverse dialogue scenarios and user needs. In terms of contextual understanding, existing dialogue generation systems typically only handle single-turn dialogues, lacking effective fusion of contextual information. This leads to information loss or misunderstanding when processing multi-turn dialogues, affecting the fluency and accuracy of the conversation. Regarding semantic parsing, although existing natural language processing technologies have made some progress, they still face challenges such as semantic ambiguity and lexical polysemy in practical applications. These problems limit the accurate understanding of user input by dialogue generation systems, thus affecting the quality and effectiveness of the dialogue. In terms of intent recognition, traditional dialogue generation systems often rely on fixed rules or templates for intent matching, lacking adaptability and generalization capabilities. With the continuous changes in user needs and the diversification of dialogue scenarios, this rule-based approach is no longer sufficient to meet the demands of practical applications.

[0003] To address the aforementioned problems, this invention proposes an artificial intelligence-based dialogue generation method. This method achieves rapid response to user input by real-time acquisition of user dialogue and initial dialogue generation using predefined basic response templates. Simultaneously, by fusing contextual and semantic information from the initial dialogue record, fused contextual and semantic feature vectors are obtained. This secondary fusion of the two feature vectors further enhances the dialogue generation system's understanding and expression of user input. Finally, by combining the fused feature vectors with a trained intent model, dialogue content matching the user's intent is generated for response, thus achieving more intelligent, flexible, and efficient dialogue generation. Summary of the Invention

[0004] This invention provides a dialogue generation method and apparatus based on artificial intelligence to solve the aforementioned technical problems in the prior art. The technical solution adopted is as follows:

[0005] An AI-based dialogue generation method, comprising:

[0006] The system collects user conversations in real time, generates initial conversations using predefined basic response templates, responds to user conversations, and obtains initial conversation record information.

[0007] The initial dialogue record information is fused with contextual information to obtain the fused contextual feature vector;

[0008] Semantic information fusion is performed on the initial dialogue record information to obtain the fused semantic feature vector;

[0009] The fused context feature vector and the fused semantic feature vector are fused a second time to obtain the fused feature vector;

[0010] The dialogue content is generated by combining the fused feature vectors with the trained intent model to produce responses.

[0011] Furthermore, contextual information is fused from the initial dialogue record information to obtain the fused contextual feature vector, including:

[0012] Extract key contextual information from the initial dialogue record information, wherein the key contextual information includes the topic, question, and request, etc.;

[0013] The context information is preprocessed to obtain preprocessed context information, wherein the preprocessing includes, but is not limited to, word segmentation and named entity recognition.

[0014] The preprocessed context information is vectorized to obtain the context vector corresponding to the preprocessed context information.

[0015] The context vector corresponding to the preprocessed context information is normalized to obtain a context vector of uniform scale, which is used as a reference context vector.

[0016] The reference context vector and the target context vector are fused to obtain the fused context feature vector.

[0017] Further, the reference context vector and the target context vector are fused to obtain a fused context feature vector, including:

[0018] After the initial dialogue record information, data on each of the user's dialogues is collected in real time;

[0019] The user's dialogue data after the initial dialogue record information is converted into a vector, and the converted vector is normalized to obtain a context vector with the same scale as the reference context vector as the target context vector.

[0020] The target context vector is compared with each reference context vector in terms of similarity, and a weight value is set for each target context vector based on the similarity value.

[0021] The fused context feature vector is obtained by combining the weight values ​​corresponding to the target context vector with the reference context vector;

[0022] The fused context feature vector is obtained using the following formula:

[0023] Where U represents the fused context feature vector; n represents the number of reference context vectors; m represents the number of target context vectors; R i T represents the i-th reference context vector; j w represents the context vector of the j-th target; ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weight of ; b represents the bias term.

[0024] Further, the target context vector is compared with each reference context vector in terms of similarity, and a weight value is assigned to each target context vector based on the similarity value, including:

[0025] The similarity between the target context vector and each reference context vector is compared to obtain the similarity value between the target context vector and each reference context vector;

[0026] The similarity value is obtained using the following formula:

[0027] Where Sij represents the similarity score between the j-th target context vector and the ith reference context vector; R i T represents the i-th reference context vector; j represents the j-th target context vector; a represents the base of the preset logarithmic function; ε represents the preset minimum constant to prevent the denominator from being 0;

[0028] The weight value of each target context vector relative to each reference context vector is obtained using the similarity values;

[0029] The weight value of each target context vector relative to each reference context vector is obtained by the following formula:

[0030] Among them, w ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weights; Sij represents the similarity value between the j-th target context vector and the i-th reference context vector; S jmax std(S) represents the maximum similarity among the n reference context vectors corresponding to the j-th target context vector; j Let represent the standard deviation of similarity among the n reference context vectors corresponding to the j-th target context vector; m represents the number of target context vectors; x and y are positive real-valued parameters used to adjust the sensitivity of exponentiation, and the magnitude of x affects the sensitivity of p to std(Sj). When x is small, the power order affects the sensitivity of std(Sj). j) The value of is not very sensitive to changes in ; when x is large, p becomes more sensitive to changes in std(Sj). Therefore, the value of x needs to be selected based on the dispersion of the data and the requirements of the task. The magnitude of y further adjusts the sensitivity of x to changes in std(Sj). j The sensitivity of y to x is as follows: when y is small, the moderating effect of x is weakened; when y is large, the moderating effect of x is strengthened. Similarly, the value of y needs to be selected based on the characteristics of the data and the requirements of the task.

[0031] Furthermore, semantic information fusion is performed on the initial dialogue record information to obtain the fused semantic feature vector, including:

[0032] The initial dialogue record information is segmented into words to obtain the segmentation results corresponding to the initial dialogue record information, and each word in the segmentation results is tagged with part of speech.

[0033] Each word after word segmentation is converted into a vector to generate a semantic vector;

[0034] The semantic vector is normalized to obtain a scale-uniform semantic vector corresponding to the initial dialogue record information, which is used as a reference semantic vector.

[0035] The reference semantic vector and the target semantic vector are fused to obtain the fused semantic feature vector.

[0036] Further, the reference semantic vector and the target semantic vector are fused to obtain a fused semantic feature vector, including:

[0037] After the initial dialogue record information, data on each of the user's dialogues is collected in real time;

[0038] Semantic analysis is performed on the user's dialogue data after the initial dialogue record information to obtain a semantic vector with the same scale as the reference semantic vector, which is then used as the target semantic vector.

[0039] The target semantic vector is compared with each reference semantic vector in terms of similarity, and a weight value is set for each target semantic vector based on the similarity value.

[0040] The fused semantic feature vector is obtained by combining the weight values ​​corresponding to the target semantic vector with the reference semantic vector.

[0041] The fused semantic feature vector is obtained using the following formula:

[0042] Where K represents the fused semantic feature vector; z represents the number of reference semantic vectors; t represents the number of target semantic vectors; B i A represents the i-th reference semantic vector; j λ represents the j-th target semantic vector; ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights are denoted by r; r represents the adjustment factor, used to adjust the influence of the average value of the reference semantic vector on the fusion result. r can be a positive real number, and its value range can be adjusted according to the specific task and data.

[0043] Further, the target semantic vector is compared with each reference semantic vector in terms of similarity, and a weight value is assigned to each target semantic vector based on the similarity value, including:

[0044] The similarity between the target semantic vector and each reference semantic vector is compared to obtain the similarity value between the target semantic vector and each reference semantic vector;

[0045] The similarity value is obtained using the following formula:

[0046] Among them, Y ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; d represents the dimension of the target semantic vector and the reference semantic vector; (A j ) k and (B) i ) k Represents the target semantic vector A j and reference semantic vector B iThe k-th dimension component; b represents the base of the logarithm in the semantic vector fusion process;

[0047] The similarity values ​​are used to obtain the weight values ​​between each target semantic vector and each reference semantic vector.

[0048] The weight values ​​between each target semantic vector and each reference semantic vector are obtained using the following formula:

[0049] Where, λ ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights; t represents the number of target semantic vectors; std(Y) j Y represents the standard deviation of the similarity between the j-th target semantic vector and the i-th reference semantic vector; ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; Var(Y) j ) represents the variance of the j-th target semantic vector relative to the i-th reference semantic vector.

[0050] Further, the fused context feature vector and the fused semantic feature vector are fused a second time to obtain the fused feature vector, including:

[0051] Extract the fused context feature vector and the fused semantic feature vector;

[0052] The fused context feature vector and the fused semantic feature vector are standardized to generate standardized context feature vector and semantic feature vector; wherein the standardized context feature vector and semantic feature vector have the same dimension.

[0053] The standardized context feature vector and semantic feature vector are fused a second time to generate a fused feature vector.

[0054] Furthermore, the fused feature vectors are combined with the trained intent model to generate dialogue content for responses, including:

[0055] Retrieve the already trained intent model;

[0056] The fused feature vector is input into the trained intent model for intent recognition to obtain the intent recognition result;

[0057] Retrieve the already trained dialogue generation model;

[0058] The intent recognition result is input into the dialogue generation model to generate dialogue content corresponding to the intent recognition result;

[0059] The dialogue content corresponding to the intent recognition result is returned to the user's dialogue interface.

[0060] An AI-based dialogue generation device, comprising:

[0061] The initial dialogue record information acquisition module is used to collect user dialogues in real time, generate initial dialogues using predefined basic reply templates, reply to user dialogues, and acquire initial dialogue record information.

[0062] The context feature vector acquisition module is used to fuse context information from the initial dialogue record information and obtain the fused context feature vector.

[0063] The semantic feature vector acquisition module is used to perform semantic information fusion on the initial dialogue record information and obtain the fused semantic feature vector.

[0064] The feature vector fusion module is used to perform a secondary fusion of the fused context feature vector and the fused semantic feature vector to obtain the fused feature vector.

[0065] The intent recognition result acquisition module is used to input the fused feature vector into the trained intent model for intent recognition and to obtain the intent recognition result.

[0066] The dialogue response module is used to generate dialogue content and respond by combining the fused feature vectors with the trained intent model.

[0067] Beneficial effects of this invention:

[0068] The AI-based dialogue generation method and apparatus proposed in this invention, through contextual and semantic information fusion, enables the system to more accurately understand user intent and dialogue coherence. This helps generate more accurate, fluent, and user-expected dialogue content. Compared to traditional rule- or template-based dialogue generation methods, this invention does not rely on fixed rules or templates. Instead, it trains an intent model that adapts to different dialogue scenarios and user needs by learning from a large amount of dialogue data. This allows the system to exhibit stronger generalization ability and adaptability when facing diverse dialogue scenarios and user needs. By collecting user dialogues in real time and quickly generating responses, the system can provide users with a more immediate and convenient service experience. Simultaneously, by accurately understanding user intent and generating expected dialogue content, the system can improve user satisfaction and loyalty. The method of this invention has certain innovations and practical applications in the fields of natural language processing and machine learning. Attached Figure Description

[0069] Figure 1 is a flowchart of the method described in this invention;

[0070] Figure 2 is a block diagram of the device described in this invention. Detailed Implementation

[0071] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0072] This invention proposes an artificial intelligence-based dialogue generation method, as shown in Figure 1. The artificial intelligence-based dialogue generation method includes:

[0073] S1. Collect user dialogues in real time, generate initial dialogues using predefined basic reply templates, reply to user dialogues, and obtain initial dialogue record information;

[0074] S2. Perform contextual information fusion on the initial dialogue record information to obtain the fused contextual feature vector;

[0075] S3. Perform semantic information fusion on the initial dialogue record information to obtain the fused semantic feature vector;

[0076] S4. Perform a secondary fusion of the fused context feature vector and the fused semantic feature vector to obtain the fused feature vector;

[0077] S5. The fused feature vectors are combined with the trained intent model to generate dialogue content for response.

[0078] The working principle of the above technical solution is as follows: The system first collects the user's dialogue input in real time. Using predefined basic response templates, the system quickly generates initial dialogue content and responds to the user's dialogue. During this process, the system obtains initial dialogue record information, providing a basis for subsequent processing.

[0079] The system performs in-depth analysis of the initial dialogue record information to extract contextual information. Using specific algorithms or models, this contextual information is fused into a contextual feature vector. This step helps the system understand the coherence of the dialogue and the continuity of the user's intent.

[0080] The system further performs semantic analysis on the initial dialogue record information, extracting key semantic information such as entities, relationships, and sentiment. This semantic information is then fused into a semantic feature vector to more accurately understand the user's intent.

[0081] The system performs a secondary fusion of contextual and semantic feature vectors. Through a fusion algorithm, a combined feature vector integrating contextual and semantic information is generated. This step improves the system's overall understanding of user input and the accuracy of dialogue generation.

[0082] The system utilizes a pre-trained intent model to match and analyze the fused feature vectors. Based on the matching results, the system generates dialogue content that matches the user's intent. Finally, the system replies to the user with the generated dialogue content, completing the dialogue process.

[0083] The effects of the above technical solution are as follows: through contextual information fusion and semantic information fusion, the system can more accurately understand user intent and the coherence of dialogue. This helps generate more accurate, fluent, and user-expected dialogue content. Compared with traditional rule-based or template-based dialogue generation methods, the method of this invention does not rely on fixed rules or templates. Instead, it trains an intent model that can adapt to different dialogue scenarios and user needs by learning from a large amount of dialogue data. This enables the system to exhibit stronger generalization ability and adaptability when facing diverse dialogue scenarios and user needs. By collecting user dialogues in real time and generating responses quickly, the system can provide users with a more immediate and convenient service experience. At the same time, by accurately understanding user intent and generating dialogue content that meets expectations, the system can improve user satisfaction and loyalty. The method of this invention has certain innovation and practicality in the fields of natural language processing and machine learning. In summary, the artificial intelligence-based dialogue generation method has significant technical effects and broad application prospects.

[0084] One embodiment of the present invention involves fusing contextual information from initial dialogue record information to obtain a fused contextual feature vector, including:

[0085] S201. Extract key context information from the initial dialogue record information, wherein the key context information includes the topic, question, and request, etc.

[0086] S202. Preprocess the context information to obtain preprocessed context information, wherein the preprocessing includes, but is not limited to, word segmentation and named entity recognition.

[0087] S203. The preprocessed context information is vectorized to obtain the context vector corresponding to the preprocessed context information.

[0088] S204. Normalize the context vector corresponding to the preprocessed context information to obtain a context vector of uniform scale, which is used as a reference context vector.

[0089] S205. The reference context vector and the target context vector are fused to obtain the fused context feature vector.

[0090] The working principle of the above technical solution is as follows: Information crucial for understanding user intent is extracted from the initial dialogue record, such as the topic of the dialogue, the user's questions, and specific requests. This information forms the basis for subsequent processing. Necessary preprocessing operations are performed on the extracted contextual information to improve the effectiveness and accuracy of subsequent vectorization. Preprocessing steps may include word segmentation (dividing the text into independent lexical units) and named entity recognition (identifying and labeling entities in the text, such as names of people, places, and organizations). These processes help to better understand the text content and lay the foundation for vectorization. The preprocessed contextual information is then converted into vector form. This step is typically achieved through word embedding techniques, such as Word2Vec and GloVe. These techniques can map words or phrases to a high-dimensional vector space, making semantically similar words closer together in the vector space. In this way, the contextual information is converted into a numerical form that the computer can process. The vectorized contextual vectors are then normalized to ensure that all vectors have a uniform scale. Normalization is a commonly used data preprocessing technique that can convert data of different scales into the same scale range, thereby eliminating dimensional differences between data. In this approach, normalization helps improve the effectiveness and accuracy of subsequent vector fusion. The normalized context vector (reference context vector) is then fused with the target context vector. This fusion process may involve various algorithms and techniques, such as vector addition, weighted averaging, and vector concatenation. Through this fusion process, a feature vector that incorporates multiple contextual information elements can be obtained, providing a more comprehensive reflection of the user's intent and needs.

[0091] The above technical solution achieves the following effects: By extracting key contextual information and performing preprocessing and vectorization, this solution can more accurately understand the user's intent and needs. This helps improve the response quality and user experience of the dialogue system. Normalization eliminates the dimensional differences between different contextual information, making vector fusion processing more stable and reliable. This helps improve the robustness and adaptability of the dialogue system when facing diverse dialogue scenarios. By converting contextual information into vector form and fusing it, this solution can generate dialogue content that matches the user's intent more quickly. This helps improve the response speed and efficiency of the dialogue system. This solution can handle complex dialogue scenarios containing multiple types of contextual information. By fusing multiple types of contextual information, the dialogue system can more comprehensively understand the user's intent and needs and generate more accurate and natural dialogue content.

[0092] In summary, this technical solution achieves contextual information fusion from initial dialogue records through multiple steps, including extracting key contextual information, preprocessing, vectorization, normalization, and vector fusion. This solution helps improve the accuracy of dialogue understanding, enhances the robustness of dialogue systems, increases the efficiency of dialogue generation, and supports the handling of complex dialogue scenarios.

[0093] In one embodiment of the present invention, the reference context vector and the target context vector are fused to obtain a fused context feature vector, including:

[0094] S2051. After the initial dialogue record information, collect the user's dialogue data information in real time for each dialogue.

[0095] S2052. Convert the user's dialogue data information after the initial dialogue record information into a vector, and normalize the converted vector to obtain a context vector with the same scale as the reference context vector as the target context vector.

[0096] S2053. Compare the similarity between the target context vector and each reference context vector, and set a weight value for each target context vector according to the similarity value;

[0097] S2054. Use the weight values ​​corresponding to the target context vector to combine the target context vector and the reference context vector to obtain the fused context feature vector;

[0098] The fused context feature vector is obtained using the following formula:

[0099] Where U represents the fused context feature vector; n represents the number of reference context vectors; m represents the number of target context vectors; R iT represents the i-th reference context vector; j w represents the context vector of the j-th target; ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weight of ; b represents the bias term.

[0100] The working principle of the above technical solution is as follows: After the initial dialogue record information, the system collects the user's dialogue data in real time for each subsequent interaction. This ensures that the system can obtain the latest user input for subsequent processing and analysis. The system converts the collected user dialogue data into vector form. This step is usually achieved through word embedding technology or other vector representation methods, converting text data into a numerical form that computers can process. Next, the converted vectors are normalized to ensure that all vectors have a uniform scale. This helps eliminate the difference in dimensions between different vectors, facilitating subsequent processing. The system compares the similarity of the target context vector (i.e., the vector collected and converted in real time) with each reference context vector. Similarity comparison can be achieved through metrics such as cosine similarity and Euclidean distance. Based on the similarity values, the system assigns weight values ​​to each target context vector. The magnitude of the weight values ​​reflects the degree of similarity or correlation between the target context vector and the reference context vector. Finally, the system uses the weight values ​​corresponding to the target context vectors, combined with the target context vector and the reference context vectors, to obtain the fused context feature vector through a specific fusion formula.

[0101] The effects of the above technical solution are as follows: By collecting user dialogue data in real time and performing vectorization processing, the system can more accurately understand the user's intent and needs. This helps improve the response quality and user experience of the dialogue system. The solution can dynamically adjust the weights of the reference context vector and the target context vector based on the user's real-time input, thus responding more flexibly to diverse dialogue scenarios. This enhances the dynamic adaptability and robustness of the dialogue system. By fusing multiple context vectors, the system can generate more coherent dialogue content that meets user expectations. This helps improve the naturalness and fluency of the dialogue system. The solution can handle dialogue scenarios containing multiple contextual information and complex user intents. By comprehensively considering the information and weights of multiple context vectors, the system can more comprehensively understand the user's intent and needs and generate more accurate and natural dialogue content.

[0102] On the other hand, by collecting user dialogue data in real time and converting it into vectors, this scheme can instantly capture user intent and contextual changes, improving the response speed and accuracy of the dialogue system. Normalization ensures that the target context vector and reference context vectors are scale-consistent, providing a foundation for subsequent similarity comparison and fusion processing. By comparing the similarity between the target context vector and each reference context vector, this scheme can identify the reference context vector most relevant to the target context, and then assign reasonable weight values ​​to each target context vector based on the similarity scores. This weight allocation mechanism makes the fused context feature vector more focused on reference context information highly relevant to the target context, improving the accuracy and representativeness of the feature vector. Through explicit weight allocation and fusion formulas, the generation process of the fused context feature vector is highly interpretable. This helps developers understand how the model makes decisions based on contextual information, facilitating model debugging and optimization. Because this scheme considers multiple reference context vectors and performs fusion processing through similarity comparison and weight allocation mechanisms, even if a reference context vector has errors or noise, it will not have a significant impact on the final feature vector. This design and fault-tolerance mechanism enhance the model's robustness, enabling it to maintain stable and accurate performance in complex dialogue environments. By fusing multiple context vectors, this approach allows the dialogue system to better understand and perceive the user's intent and the surrounding context. This helps improve the dialogue system's natural language understanding capabilities and interactive experience, allowing users to converse more fluently and naturally with the system. The approach exhibits good adaptability and scalability, and can be applied to different types of dialogue systems and task scenarios. With the continuous accumulation of dialogue data and continuous model optimization, this approach is expected to further improve the overall performance and user experience of the dialogue system.

[0103] In summary, this technical solution achieves effective integration and utilization of contextual information through steps such as real-time acquisition and processing of dialogue data, similarity comparison and weight allocation, and fusion processing of multiple context vectors. This not only improves the flexibility and accuracy of the dialogue system but also enhances the interpretability and robustness of the model, laying a solid foundation for improving the overall performance of the dialogue system. Furthermore, this technical solution achieves effective fusion and processing of contextual information through multiple steps including real-time acquisition of user dialogue data, vectorization processing, similarity comparison, weight setting, and vector fusion. This solution helps improve the accuracy of dialogue understanding, enhance the dynamic adaptability of the dialogue system, improve the coherence of dialogue generation, and support the handling of complex dialogue scenarios.

[0104] In one embodiment of the present invention, the similarity between the target context vector and each reference context vector is compared, and a weight value is set for each target context vector based on the similarity value, including:

[0105] Step 1: Compare the similarity between the target context vector and each reference context vector to obtain the similarity value between the target context vector and each reference context vector;

[0106] The similarity value is obtained using the following formula:

[0107] Where Sij represents the similarity score between the j-th target context vector and the ith reference context vector; R i T represents the i-th reference context vector; j represents the j-th target context vector; a represents the base of the preset logarithmic function; ε represents the preset minimum constant to prevent the denominator from being 0;

[0108] Step 2: Use the similarity values ​​to obtain the weight values ​​of each target context vector relative to each reference context vector;

[0109] The weight value of each target context vector relative to each reference context vector is obtained by the following formula:

[0110] Among them, w ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weights; Sij represents the similarity value between the j-th target context vector and the i-th reference context vector; S jmax std(S) represents the maximum similarity among the n reference context vectors corresponding to the j-th target context vector; j Let represent the standard deviation of similarity among the n reference context vectors corresponding to the j-th target context vector; m represents the number of target context vectors; x and y are positive real-valued parameters used to adjust the sensitivity of exponentiation, and the magnitude of x affects the sensitivity of p to std(Sj). When x is small, the power order affects the sensitivity of std(Sj). j) The value of is not very sensitive to changes in ; when x is large, p becomes more sensitive to changes in std(Sj). Therefore, the value of x needs to be selected based on the dispersion of the data and the requirements of the task. The magnitude of y further adjusts the sensitivity of x to changes in std(Sj). j The sensitivity of y to x is as follows: when y is small, the moderating effect of x is weakened; when y is large, the moderating effect of x is strengthened. Similarly, the value of y needs to be selected based on the characteristics of the data and the requirements of the task.

[0111] The working principle of the above technical solution is as follows: First, the solution compares the similarity between the target context vector and each reference context vector. The similarity calculation is achieved through a specific formula that considers the cosine of the angle between the vectors and adjusts it using a logarithmic function and a preset minimum constant to obtain a more stable and accurate similarity value. The similarity value (Sij) reflects the degree of similarity between the j-th target context vector and the i-th reference context vector. The larger this value, the higher the similarity between the two vectors. After obtaining the similarity values, the solution further uses these values ​​to assign weights to each target context vector relative to each reference context vector. Weight assignment is achieved through a complex formula that considers the similarity value, the maximum similarity value, the standard deviation of the similarity, and two positive real-valued parameters x and y. These parameters collectively determine the weight allocation method and sensitivity. The magnitude of the weight (wij) reflects the importance or correlation of the j-th target context vector relative to the i-th reference context vector. This weight will play a crucial role in subsequent vector fusion or other processing steps.

[0112] The above technical solution achieves the following results: through precise similarity calculation and reasonable weight allocation, it can more accurately reflect the correlation between the target context vector and the reference context vector. This helps to obtain more accurate and reliable fusion results in subsequent vector fusion steps. By introducing preset minimum constants and logarithmic functions, the solution effectively avoids anomalies such as denominators being zero. Furthermore, by considering the adjustment effects of similarity standard deviation and positive real parameters x and y, the solution can more flexibly respond to changes in different data characteristics and task requirements. This enhances the robustness and adaptability of the system. This technical solution is not only applicable to scenarios requiring contextual information processing, such as dialogue systems and recommendation systems, but can also be extended to other fields requiring similarity calculation and weight allocation. For example, it can play an important role in tasks such as text classification, clustering, and information retrieval. Although the solution involves complex formulas and calculation processes, through reasonable algorithm design and optimization techniques (such as parallel computing and caching techniques), computational efficiency and performance can be improved while ensuring computational accuracy. This helps to achieve faster response times and a better user experience in practical applications.

[0113] On the other hand, when calculating weight values, the scheme not only considers the similarity between the target context vector and a single reference context vector, but also introduces the maximum similarity value and the standard deviation of similarity as adjustment factors. The maximum similarity value reflects the closeness between the target context vector and the most similar reference context vector, while the standard deviation of similarity reflects the dispersion of the similarity between the target context vector and each reference context vector. By introducing positive real-valued parameters x and y, the scheme further adjusts the sensitivity of weight allocation to the standard deviation of similarity. This adjustment mechanism makes weight allocation more flexible and can be dynamically adjusted according to the dispersion of data and task requirements. Since the standard deviation of similarity is considered when calculating weights, the scheme can reduce the impact of outliers on the final fusion result to a certain extent. When the similarity between a target context vector and a reference context vector is abnormally high or low, the impact of this abnormal similarity on weight allocation is adjusted by the standard deviation, thereby avoiding excessive deviation of the fusion result. By dynamically adjusting the weight allocation, the scheme can adapt to different data characteristics and task requirements. Whether the data dispersion is high or low, the scheme can ensure the rationality and effectiveness of weight allocation by adjusting the parameters x and y. These aforementioned technical solutions are based on vector and matrix operations and can be implemented rapidly using efficient numerical computing libraries or parallel computing techniques. Therefore, in practical applications, this approach can achieve high computational efficiency while ensuring computational accuracy.

[0114] In summary, this technical solution provides strong support for the effective integration and utilization of contextual information through precise similarity measurement, dynamic weight allocation adjustment, enhanced robustness of context fusion, and optimized computational efficiency. These effects work together in dialogue systems or natural language processing tasks to significantly improve system performance and user experience. Furthermore, this solution achieves effective association and fusion between the target context vector and the reference context vector through accurate similarity calculation and reasonable weight allocation. This solution not only improves the accuracy of vector fusion but also enhances the system's robustness and supports diverse application scenarios. Moreover, by optimizing computational efficiency and performance, this solution can also achieve faster response times and a better user experience in practical applications.

[0115] One embodiment of the present invention involves semantic information fusion of initial dialogue record information to obtain a fused semantic feature vector, including:

[0116] S301. Perform word segmentation on the initial dialogue record information, obtain the word segmentation result corresponding to the initial dialogue record information, and perform part-of-speech tagging on each word in the word segmentation result;

[0117] S302. Convert each word after word segmentation into a vector to generate a semantic vector;

[0118] S303. Normalize the semantic vector to obtain a scale-uniform semantic vector corresponding to the initial dialogue record information, which is used as a reference semantic vector.

[0119] S304. The reference semantic vector and the target semantic vector are fused to obtain the fused semantic feature vector.

[0120] The working principle of the above technical solution is as follows: The initial dialogue record information (such as text dialogue) is broken down into individual words or phrases. This is a fundamental step in natural language processing, facilitating subsequent word-level processing. Each segmented word is labeled with its part-of-speech tagging (e.g., noun, verb, adjective, etc.). Part-of-speech tagging helps understand the function and role of words in a sentence, playing a crucial role in subsequent semantic analysis. Each segmented word is converted into a vector form, i.e., a semantic vector is generated. This is typically achieved using pre-trained word embedding models (such as Word2Vec, BERT, etc.), which map words to a high-dimensional vector space, making semantically similar words closer together in the vector space. The generated semantic vectors are normalized to ensure uniform scale across all vectors. Normalization helps reduce scale differences between different vectors, making subsequent processing more stable and reliable. The normalized reference semantic vector (i.e., the semantic vector of the initial dialogue record information) is fused with the target semantic vector (which may be the semantic vector of another dialogue record, background knowledge, or a task-specific semantic vector). Fusion methods may include weighted averaging, concatenation, attention mechanisms, etc., aiming to combine the semantic information of both to generate a more comprehensive and accurate fused semantic feature vector.

[0121] The above technical solution achieves the following results: through word segmentation, part-of-speech tagging, and vectorization, it can more accurately capture semantic information in dialogue records. Normalization and fusion processing further enhance the completeness and accuracy of semantic information. The fused semantic feature vector contains richer semantic information, helping the dialogue system better understand and respond to various complex dialogue scenarios, improving the system's robustness and adaptability. The fused semantic feature vector generated by this technical solution can be applied to various natural language processing tasks, such as sentiment analysis, intent recognition, and dialogue generation, providing strong semantic support for these tasks. Through vectorization and normalization processing, textual information is converted into an efficient numerical representation, which helps improve the computational efficiency and performance of subsequent processing steps.

[0122] In summary, this technical solution achieves semantic information fusion of initial dialogue record information through a series of processing steps, generating a fused semantic feature vector with rich semantic information, thus providing strong support for natural language processing tasks.

[0123] In one embodiment of the present invention, the reference semantic vector and the target semantic vector are fused to obtain a fused semantic feature vector, including:

[0124] S3041. After the initial dialogue record information, collect the user's dialogue data information in real time for each dialogue.

[0125] S3042. Perform semantic analysis on the user's dialogue data after the initial dialogue record information, and obtain a semantic vector with the same scale as the reference semantic vector as the target semantic vector.

[0126] S3043. Compare the similarity between the target semantic vector and each reference semantic vector, and set a weight value for each target semantic vector according to the similarity value;

[0127] S3044. Use the weight values ​​corresponding to the target semantic vector to combine the target semantic vector and the reference semantic vector to obtain the fused semantic feature vector;

[0128] The fused semantic feature vector is obtained using the following formula:

[0129] Where K represents the fused semantic feature vector; z represents the number of reference semantic vectors; t represents the number of target semantic vectors; B i A represents the i-th reference semantic vector; j λ represents the j-th target semantic vector; ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights are denoted by r; r represents the adjustment factor, used to adjust the influence of the average value of the reference semantic vector on the fusion result. r can be a positive real number, and its value range can be adjusted according to the specific task and data.

[0130] The working principle of the above technical solution is as follows: After the initial dialogue recording information, the system collects the user's dialogue data in real time for each conversation. This is to capture the dynamic changes in the user's dialogue and provide real-time data for subsequent semantic analysis and fusion. Semantic analysis is performed on the collected user dialogue data, converting it into a semantic vector with a scale consistent with the reference semantic vector, i.e., the target semantic vector. This ensures the accuracy of subsequent similarity comparison and weight setting. Each target semantic vector is compared with each reference semantic vector. The similarity value reflects the semantic closeness between the target and reference semantic vectors. Based on the similarity value, a weight value is assigned to each target semantic vector. The magnitude of the weight value reflects the importance of the target semantic vector in the fusion process. Using the weight values ​​corresponding to the target semantic vectors, combined with the target and reference semantic vectors, a fused semantic feature vector is obtained through weighted averaging or other fusion strategies. The fused semantic feature vector K is calculated using a formula, where z represents the number of reference semantic vectors, t represents the number of target semantic vectors, Bi represents the i-th reference semantic vector, Aj represents the j-th target semantic vector, and λij represents the weight of the j-th target semantic vector Aj relative to the i-th reference semantic vector Bi.

[0131] The effects of the above technical solution are as follows: By collecting user dialogue data in real time, the system can capture the dynamic changes in user dialogue and generate semantic feature vectors that are more consistent with the current dialogue context. Through similarity comparison and weight setting, the system can accurately evaluate the importance of each target semantic vector in the fusion process, ensuring that the fused semantic feature vector is more accurate and comprehensive. This technical solution can handle different numbers and types of reference and target semantic vectors, exhibiting strong adaptability and flexibility. The fused semantic feature vector contains richer semantic information, helping the dialogue system better understand user intent and improving the performance and user experience of the dialogue system. This technical solution can handle complex dialogue scenarios, such as multi-turn dialogues and context-dependent dialogues, providing powerful semantic support for the dialogue system.

[0132] On the other hand, by collecting and semantically analyzing user dialogue data in real time, this solution can instantly capture the user's semantic intent, improving the response speed and accuracy of the dialogue system. This helps the dialogue system to understand the user's expression more deeply, thus providing more accurate and personalized responses. By scaling the semantic vectors of the dialogue data with the reference semantic vectors, consistency and comparability are ensured when comparing and fusing semantic vectors from different sources and at different times. This helps improve the accuracy and reliability of the fused semantic feature vector. By comparing the similarity between the target semantic vector and each reference semantic vector and assigning weights based on the similarity values, this solution can identify the reference semantic vector most relevant to the target semantic vector and assign it higher weights. This weighting mechanism makes the fused semantic feature vector more focused on reference semantic information highly related to the target semantic vector, thereby improving the accuracy and robustness of the fusion result. Introducing an adjustment factor r to adjust the influence of the average value of the reference semantic vectors on the fusion result allows for flexible adjustment based on different tasks and data to adapt to different application scenarios and needs. This helps further improve the applicability and accuracy of the fused semantic feature vector. By fusing multiple semantic vectors, this approach enables dialogue systems to better understand and perceive the user's context, thus providing a more coherent and natural dialogue experience. This helps improve the context awareness and intelligence level of dialogue systems. The approach exhibits good scalability and adaptability, and can be applied to different types of dialogue systems and task scenarios. With the continuous accumulation of dialogue data and the ongoing optimization of the model, this approach is expected to further improve the overall performance and user experience of dialogue systems.

[0133] In summary, this technical solution effectively integrates and utilizes semantic information through real-time semantic analysis, unified scale processing, similarity comparison and weight allocation, and adjustment factor optimization. This not only improves the depth and breadth of the dialogue system's semantic understanding but also enhances the robustness and accuracy of the fusion results, laying a solid foundation for improving the intelligence level of the dialogue system. Simultaneously, by collecting user dialogue data in real time, performing semantic analysis and vector transformation, similarity comparison and weight setting, and fusion processing, this solution achieves semantic fusion of initial dialogue record information and subsequent user dialogue data, generating a more accurate and comprehensive fused semantic feature vector, providing strong support for improving the performance of the dialogue system.

[0134] In one embodiment of the present invention, the similarity between the target semantic vector and each reference semantic vector is compared, and a weight value is assigned to each target semantic vector based on the similarity value, including:

[0135] Step 1: Compare the similarity between the target semantic vector and each reference semantic vector to obtain the similarity value between the target semantic vector and each reference semantic vector;

[0136] The similarity value is obtained using the following formula:

[0137] Among them, Y ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; d represents the dimension of the target semantic vector and the reference semantic vector; (A j ) k and (B) i ) k Represents the target semantic vector A j and reference semantic vector B i The k-th dimension component; b represents the base of the logarithm in the semantic vector fusion process;

[0138] Step 2: Use the similarity values ​​to obtain the corresponding weight values ​​between each target semantic vector and each reference semantic vector;

[0139] The weight values ​​between each target semantic vector and each reference semantic vector are obtained using the following formula:

[0140] Where, λ ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights; t represents the number of target semantic vectors; std(Y) j Y represents the standard deviation of the similarity between the j-th target semantic vector and the i-th reference semantic vector; ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; Var(Y) j ) represents the variance of the j-th target semantic vector relative to the i-th reference semantic vector.

[0141] The working principle of the above technical solution is as follows: Similarity is calculated using a given formula. This formula is based on the Euclidean distance (or some variation) between vectors, and obtains the similarity value through logarithmic transformation and standardization. Specifically, 'd' in the formula represents the dimension of the vector, specifically the component of the vector in a certain dimension, and 'b' is the base of the logarithmic transformation (usually the natural logarithm e or 2 as the base). The Euclidean distance between the two vectors is obtained by calculating the sum of the squares of the differences between their components in each dimension, taking the square root, and then obtaining the similarity value through the formula transformation. Then, the weights are calculated using a given formula. This formula considers the variance (or standard deviation) of the similarity values ​​between the target semantic vector and all reference semantic vectors, and obtains the weight value by normalizing the reciprocal of the variance (or standard deviation). Specifically, std(Yj) in the formula represents the standard deviation of the similarity of the j-th target semantic vector relative to all reference semantic vectors, and Var(Yj) represents the variance (although the formula directly gives the weight calculation formula, it mentions the variance; here we assume that the variance is an intermediate step used to calculate the standard deviation). By calculating the similarity standard deviation of each target semantic vector and taking its reciprocal for normalization, the weight value of each target semantic vector relative to each reference semantic vector is obtained.

[0142] The above technical solution achieves the following results: by calculating the similarity values ​​between vectors, it can accurately measure the semantic closeness between the target semantic vector and the reference semantic vector. The weighting method considers the variance (or standard deviation) of the similarity values, making weight allocation more flexible and allowing for adjustments to weights based on different situations. Because the weighting method considers fluctuations in similarity values ​​(measured by variance or standard deviation), it exhibits a certain degree of robustness to minor changes in similarity values. The calculation process for the weight values ​​is relatively clear, and the reasons and results of the weight allocation can be understood by analyzing the similarity values ​​and variance (or standard deviation). This technical solution can be applied to various scenarios requiring the calculation of similarity and weights between vectors, such as text classification, information retrieval, and recommendation systems.

[0143] On the other hand, the technical solution calculates the similarity between the target semantic vector and the reference semantic vector using a specific formula. This formula considers the various dimensional components of the semantic vector and employs a logarithmic function for calculation, thus more accurately reflecting the degree of similarity between the two semantic vectors. This precise similarity measurement provides strong support for the rationality of subsequent weight allocation. When calculating the weight values, the solution not only considers the similarity between the target semantic vector and a single reference semantic vector but also introduces the similarity standard deviation and variance as adjustment factors. The similarity standard deviation reflects the dispersion of the similarity between the target semantic vector and each reference semantic vector, while the variance further describes the overall characteristics of this dispersion. By considering both factors simultaneously, the solution can more comprehensively evaluate the similarity relationship between the target semantic vector and the reference semantic vector. Since the similarity standard deviation and variance are introduced as the basis for weight allocation, the solution can dynamically adjust the weight values ​​according to the specific similarity distribution. When the target semantic vector has a high similarity to a certain reference semantic vector and a low dispersion, the reference semantic vector will be assigned a higher weight; conversely, it will be assigned a lower weight. This flexible weight allocation mechanism makes the fused semantic feature vector more accurate and reliable. By considering the standard deviation and variance of similarity, this scheme can reduce the impact of outliers on weight allocation and the final fusion result to a certain extent. When the similarity between a target semantic vector and a reference semantic vector is abnormally high or low, the impact of this abnormal similarity on weight allocation is adjusted by the standard deviation and variance, thus avoiding excessive deviation in the fusion result. This scheme can be dynamically adjusted according to different semantic vector distributions to adapt to different application scenarios and task requirements. Whether the semantic vector distribution is relatively concentrated or relatively dispersed, this scheme can ensure the accuracy and robustness of the fused semantic feature vector through a reasonable weight allocation mechanism. The above technical solution is based on vector and matrix operations and can be computed quickly through efficient numerical computing libraries or parallel computing techniques. Therefore, in practical applications, this scheme can achieve high computational efficiency while ensuring computational accuracy.

[0144] In summary, this technical solution provides strong support for the effective integration and utilization of semantic information through precise similarity measurement, dynamic weight allocation mechanism, enhanced robustness of semantic fusion, and optimized computational efficiency. These technical effects work together in fields such as natural language processing, dialogue systems, and intelligent question answering, significantly improving system performance and user experience.

[0145] In one embodiment of the present invention, a secondary fusion is performed on the fused context feature vector and the fused semantic feature vector to obtain a fused feature vector, including:

[0146] S401. Extract the fused context feature vector and the fused semantic feature vector;

[0147] S402. The fused context feature vector and the fused semantic feature vector are standardized to generate standardized context feature vector and semantic feature vector; wherein the standardized context feature vector and semantic feature vector have the same dimension.

[0148] S403. Perform a secondary fusion of the standardized context feature vector and semantic feature vector to generate a fused feature vector.

[0149] The fused feature vector is obtained using the following formula:

[0150] Where F represents the fused feature vector; s represents the number of components contained in the fused feature vector; F i F represents the i-th component in the fused feature vector; 01 F 02 , ..., F s This represents the component corresponding to the fused feature vector; and each component is obtained using the following formula:

[0151] Among them, F i U represents the i-th component in the fused feature vector; i K represents the i-th component in the standardized context feature vector; i ξ represents the i-th component in the standardized semantic feature vector; ξ represents the hyperparameter.

[0152] The working principle of the above technical solution is as follows: First, the fused context feature vector and semantic feature vector are extracted from the previous processing steps. These two vectors contain the contextual and semantic information of the dialogue, respectively. The extracted context and semantic feature vectors are then standardized. The purpose of standardization is to ensure that the two vectors are numerically comparable, meaning that their components are at the same scale or range. This typically involves scaling or shifting the value of each component to satisfy specific statistical properties (e.g., a mean of 0 and a standard deviation of 1). Standardization ensures that the context and semantic feature vectors have the same dimension, which is a prerequisite for subsequent fusion processing. The standardized context and semantic feature vectors are then fused a second time. Fusion methods may include weighted averaging, concatenation, or fusion using a deep learning model. The goal of fusion is to combine the information from both to generate a feature vector that contains both contextual and semantic information. The generated fused feature vector will be used for subsequent tasks, such as dialogue generation, intent recognition, and sentiment analysis.

[0153] The above technical solution achieves the following results: Through secondary fusion, contextual and semantic features are integrated into a single feature vector, enabling this vector to more comprehensively reflect the information of the dialogue. This helps improve the performance of subsequent tasks because more information is used for decision-making or prediction. Standardization ensures that the contextual and semantic feature vectors are numerically comparable, which helps reduce noise and bias during the fusion process. Therefore, the generated fused feature vector is more stable and reliable, improving the robustness of subsequent tasks. This technical solution offers a degree of flexibility because the standardization and fusion methods can be adjusted according to specific tasks and datasets. This means it can adapt to different dialogue scenarios and task requirements. As dialogue systems evolve and new features emerge, this technical solution can be easily extended to include more feature vectors.

[0154] By fusing the fused contextual feature vector and the fused semantic feature vector in a secondary manner, this technical solution can generate a fused feature vector containing richer information. This new feature vector not only includes contextual information but also incorporates semantic information, thereby improving the comprehensive expressive power of the feature vector. This allows subsequent processing or analysis to be based on more comprehensive and accurate information, contributing to improved system performance and accuracy.

[0155] Simultaneously, before the secondary fusion, this scheme standardizes the fused context feature vector and the fused semantic feature vector. Standardization eliminates differences in dimensions and numerical ranges between different feature vectors, ensuring they have the same dimensionality and comparability. This helps ensure the fairness and accuracy of the secondary fusion, avoiding deviations in the fusion results caused by numerical differences between feature vectors. This technical scheme employs a flexible fusion strategy during the secondary fusion process, where each component is a weighted sum of the standardized context feature vector component and the semantic feature vector component. The hyperparameter ξ is used to adjust the weights of the context feature vector component and the semantic feature vector component in the F... i The contribution level of the data is considered. This flexible fusion strategy allows the solution to be dynamically adjusted according to specific application scenarios and task requirements to adapt to different feature distributions and data characteristics. Simultaneously, by adjusting the hyperparameter ξ, the fusion results can be further optimized, improving the system's performance and accuracy. This technical solution ensures computational stability and efficiency through standardized processing and a flexible fusion strategy. Standardized processing simplifies subsequent computational processes and reduces computational complexity. The flexible fusion strategy allows the solution to be dynamically adjusted according to specific data characteristics, avoiding computational instability caused by data differences. Furthermore, the solution employs explicit formulas and algorithms to describe the fusion process, making the computation process clearer and more controllable.

[0156] In summary, this technical solution enhances the comprehensive expressive power of feature vectors by merging the fused contextual feature vectors and the fused semantic feature vectors in a secondary manner; it strengthens the standardization and comparability of features through standardization processing; it employs flexible fusion strategies and hyperparameter tuning to adapt to different application scenarios and task requirements; and it improves computational efficiency and stability. These technical effects collectively contribute to improved system performance and accuracy, providing strong support for applications in natural language processing, dialogue systems, and intelligent question answering. Furthermore, by merging the contextual and semantic feature vectors in a secondary manner, this technical solution generates a more comprehensive and accurate feature vector, providing strong support for subsequent tasks in dialogue systems. Additionally, this solution possesses a degree of flexibility, robustness, and scalability, enabling it to adapt to different dialogue scenarios and task requirements.

[0157] One embodiment of the present invention generates dialogue content for response by combining the fused feature vectors with a trained intent model, including:

[0158] S501, Retrieve the trained intent model;

[0159] S502. Input the fused feature vector into the trained intent model to perform intent recognition and obtain the intent recognition result;

[0160] S503, retrieve the already trained dialogue generation model;

[0161] S504. Input the intent recognition result into the dialogue generation model to generate dialogue content corresponding to the intent recognition result;

[0162] S505. Reply the dialogue content corresponding to the intent recognition result to the user dialogue interface.

[0163] The working principle of the above technical solution is as follows: The system loads or retrieves a trained and validated intent recognition model from storage. This model can receive input feature vectors and output corresponding intent recognition results. The system inputs the fused feature vectors into the retrieved intent model for intent recognition. This feature vector integrates contextual information, semantic information, etc., and can more comprehensively reflect the user's dialogue intent. Through the processing of the intent model, the system can identify the user's current dialogue intent, such as inquiry, request, confirmation, etc. After identifying the user's intent, the system then retrieves a trained and validated dialogue generation model. This model can generate corresponding dialogue content based on the input intent recognition results. The system inputs the intent recognition results into the dialogue generation model, and the model generates dialogue content that matches the intent based on this input. This process may involve various technologies such as natural language generation, template matching, and knowledge base querying. The generated dialogue content should both conform to the user's intent and maintain natural fluency. Finally, the system sends the generated dialogue content to the user's dialogue interface as a response to the user's current dialogue. In this way, the user can see the corresponding response generated by the system based on their dialogue content.

[0164] The effects of the above technical solution are as follows: By using the fused feature vectors for intent recognition, the system can more comprehensively capture the user's dialogue intent, thereby improving the accuracy of intent recognition. This helps the system to more accurately understand the user's true needs, thus generating dialogue content that better meets the user's expectations. The dialogue generation model can generate multiple possible dialogue contents based on the intent recognition results, which enhances the flexibility of dialogue generation. The system can select the most appropriate dialogue content as a response based on the specific scenario and user needs. Because the system can more accurately understand the user's intent and generate dialogue content that meets the user's expectations, it can significantly improve the user experience. Users can experience a more natural, smooth, and intelligent interactive experience when conversing with the system. The above technical solution achieves intelligent responses based on feature vectors and trained models. The system can automatically generate responses based on the user's dialogue content without manual intervention. This greatly improves the system's automation level and response speed.

[0165] In summary, this technical solution achieves intelligent and accurate dialogue content generation and response by combining fused feature vectors with a trained intent model and dialogue generation model. This helps improve user experience and system performance, providing strong support for the further development of dialogue systems.

[0166] This invention proposes an artificial intelligence-based dialogue generation device, as shown in Figure 2. The artificial intelligence-based dialogue generation device includes:

[0167] The initial dialogue record information acquisition module is used to collect user dialogues in real time, generate initial dialogues using predefined basic reply templates, reply to user dialogues, and acquire initial dialogue record information.

[0168] The context feature vector acquisition module is used to fuse context information from the initial dialogue record information and obtain the fused context feature vector.

[0169] The semantic feature vector acquisition module is used to perform semantic information fusion on the initial dialogue record information and obtain the fused semantic feature vector.

[0170] The feature vector fusion module is used to perform a secondary fusion of the fused context feature vector and the fused semantic feature vector to obtain the fused feature vector.

[0171] The intent recognition result acquisition module is used to input the fused feature vector into the trained intent model for intent recognition and to obtain the intent recognition result.

[0172] The dialogue response module is used to generate dialogue content and respond using a pre-trained dialogue generation model based on intent recognition results.

[0173] The working principle of the above technical solution is as follows: The system first collects the user's dialogue input in real time. Using predefined basic response templates, the system quickly generates initial dialogue content and responds to the user's dialogue. During this process, the system obtains initial dialogue record information, providing a basis for subsequent processing.

[0174] The system performs in-depth analysis of the initial dialogue record information to extract contextual information. Using specific algorithms or models, this contextual information is fused into a contextual feature vector. This step helps the system understand the coherence of the dialogue and the continuity of the user's intent.

[0175] The system further performs semantic analysis on the initial dialogue record information, extracting key semantic information such as entities, relationships, and sentiment. This semantic information is then fused into a semantic feature vector to more accurately understand the user's intent.

[0176] The system performs a secondary fusion of contextual and semantic feature vectors. Through a fusion algorithm, a combined feature vector integrating contextual and semantic information is generated. This step improves the system's overall understanding of user input and the accuracy of dialogue generation.

[0177] The system utilizes a pre-trained intent model to match and analyze the fused feature vectors. Based on the matching results, the system generates dialogue content that matches the user's intent. Finally, the system replies to the user with the generated dialogue content, completing the dialogue process.

[0178] The effects of the above technical solution are as follows: through contextual information fusion and semantic information fusion, the system can more accurately understand user intent and the coherence of dialogue. This helps generate more accurate, fluent, and user-expected dialogue content. Compared with traditional rule-based or template-based dialogue generation methods, the method of this invention does not rely on fixed rules or templates. Instead, it trains an intent model that can adapt to different dialogue scenarios and user needs by learning from a large amount of dialogue data. This enables the system to exhibit stronger generalization ability and adaptability when facing diverse dialogue scenarios and user needs. By collecting user dialogues in real time and generating responses quickly, the system can provide users with a more immediate and convenient service experience. At the same time, by accurately understanding user intent and generating dialogue content that meets expectations, the system can improve user satisfaction and loyalty. The method of this invention has certain innovation and practicality in the fields of natural language processing and machine learning. In summary, the artificial intelligence-based dialogue generation method has significant technical effects and broad application prospects.

[0179] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A dialogue generation method based on artificial intelligence, characterized in that, The AI-based dialogue generation method includes: The system collects user conversations in real time, generates initial conversations using predefined basic response templates, responds to user conversations, and obtains initial conversation record information. The initial dialogue record information is fused with contextual information to obtain the fused contextual feature vector; Semantic information fusion is performed on the initial dialogue record information to obtain the fused semantic feature vector; The fused context feature vector and the fused semantic feature vector are fused a second time to obtain the fused feature vector; The dialogue content is generated by combining the fused feature vectors with the trained intent model to produce responses.

2. The dialogue generation method based on artificial intelligence according to claim 1, characterized in that, The initial dialogue record information is fused with contextual information to obtain the fused contextual feature vector, including: Extract key contextual information from the initial dialogue record information, wherein the key contextual information includes the topic, question, and request; The context information is preprocessed to obtain preprocessed context information, wherein the preprocessing includes word segmentation and named entity recognition. The preprocessed context information is vectorized to obtain the context vector corresponding to the preprocessed context information. The context vector corresponding to the preprocessed context information is normalized to obtain a context vector of uniform scale, which is used as a reference context vector. The reference context vector and the target context vector are fused to obtain the fused context feature vector.

3. The dialogue generation method based on artificial intelligence according to claim 2, characterized in that, The reference context vector and the target context vector are fused to obtain the fused context feature vector, including: After the initial dialogue record information, data on each of the user's dialogues is collected in real time; The user's dialogue data after the initial dialogue record information is converted into a vector, and the converted vector is normalized to obtain a context vector with the same scale as the reference context vector as the target context vector. The target context vector is compared with each reference context vector in terms of similarity, and a weight value is set for each target context vector based on the similarity value. The fused context feature vector is obtained by combining the weight values ​​corresponding to the target context vector with the reference context vector; The fused context feature vector is obtained using the following formula: Where U represents the fused context feature vector; n represents the number of reference context vectors; m represents the number of target context vectors; R i T represents the i-th reference context vector; j w represents the context vector of the j-th target; ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weight of ; b represents the bias term.

4. The dialogue generation method based on artificial intelligence according to claim 3, characterized in that, The target context vector is compared with each reference context vector in terms of similarity, and a weight value is assigned to each target context vector based on the similarity value, including: The similarity between the target context vector and each reference context vector is compared to obtain the similarity value between the target context vector and each reference context vector; The similarity value is obtained using the following formula: Among them, S ij R represents the numerical similarity between the j-th target context vector and the i-th reference context vector; i T represents the i-th reference context vector; j represents the j-th target context vector; a represents the base of the preset logarithmic function; ε represents the preset minimum constant to prevent the denominator from being 0; The weight value of each target context vector relative to each reference context vector is obtained using the similarity values; The weight value of each target context vector relative to each reference context vector is obtained by the following formula: Among them, w ij T represents the context vector of the j-th target. j Relative to the i-th reference context vector R i The weights of S; ij S represents the numerical similarity between the j-th target context vector and the i-th reference context vector; jmax std(S) represents the maximum similarity among the n reference context vectors corresponding to the j-th target context vector; j ) represents the standard deviation of similarity among the n reference context vectors corresponding to the j-th target context vector; m represents the number of target context vectors; x and y represent positive real number parameters.

5. The dialogue generation method based on artificial intelligence according to claim 1, characterized in that, Semantic information fusion is performed on the initial dialogue record information to obtain the fused semantic feature vector, including: The initial dialogue record information is segmented into words to obtain the segmentation results corresponding to the initial dialogue record information, and each word in the segmentation results is tagged with part of speech. Each word after word segmentation is converted into a vector to generate a semantic vector; The semantic vector is normalized to obtain a scale-uniform semantic vector corresponding to the initial dialogue record information, which is used as a reference semantic vector. The reference semantic vector and the target semantic vector are fused to obtain the fused semantic feature vector.

6. The dialogue generation method based on artificial intelligence according to claim 5, characterized in that, The reference semantic vector and the target semantic vector are fused to obtain a fused semantic feature vector, including: After the initial dialogue record information, data on each of the user's dialogues is collected in real time; Semantic analysis is performed on the user's dialogue data after the initial dialogue record information to obtain a semantic vector with the same scale as the reference semantic vector, which is then used as the target semantic vector. The target semantic vector is compared with each reference semantic vector in terms of similarity, and a weight value is set for each target semantic vector based on the similarity value. The fused semantic feature vector is obtained by combining the weight values ​​corresponding to the target semantic vector with the reference semantic vector. The fused semantic feature vector is obtained using the following formula: Where K represents the fused semantic feature vector; z represents the number of reference semantic vectors; t represents the number of target semantic vectors; B i A represents the i-th reference semantic vector; j λ represents the j-th target semantic vector; ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights; r represents the adjustment factor used to control the sensitivity of the reference semantic vector; r represents the adjustment factor used to control the sensitivity of the reference semantic vector.

7. The dialogue generation method based on artificial intelligence according to claim 6, characterized in that, The target semantic vector is compared with each reference semantic vector in terms of similarity, and a weight value is assigned to each target semantic vector based on the similarity value, including: The similarity between the target semantic vector and each reference semantic vector is compared to obtain the similarity value between the target semantic vector and each reference semantic vector; The similarity value is obtained using the following formula: Among them, Y ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; d represents the dimension of the target semantic vector and the reference semantic vector; (A j ) k and (B) i ) k Represents the target semantic vector A j and reference semantic vector B i The k-th dimension component; b represents the base of the logarithm in the semantic vector fusion process; The similarity values ​​are used to obtain the weight values ​​between each target semantic vector and each reference semantic vector. The weight values ​​between each target semantic vector and each reference semantic vector are obtained using the following formula: Where, λ ij Let A represent the j-th target semantic vector. j Relative to the i-th reference semantic vector B i The weights; t represents the number of target semantic vectors; std(Y) j Y represents the standard deviation of the similarity between the j-th target semantic vector and the i-th reference semantic vector; ij B represents the numerical similarity between the j-th target semantic vector and the ith reference semantic vector; i A represents the i-th reference semantic vector; j Represents the j-th target semantic vector; Var(Y) j ) represents the variance of the j-th target semantic vector relative to the i-th reference semantic vector.

8. The dialogue generation method based on artificial intelligence according to claim 1, characterized in that, The fused context feature vector and the fused semantic feature vector are fused a second time to obtain the fused feature vector, including: Extract the fused context feature vector and the fused semantic feature vector; The fused context feature vector and the fused semantic feature vector are standardized to generate standardized context feature vector and semantic feature vector; The standardized context feature vector and semantic feature vector are fused a second time to generate a fused feature vector.

9. The dialogue generation method based on artificial intelligence according to claim 1, characterized in that, The response is generated by combining the fused feature vectors with a pre-trained intent model to produce dialogue content, including: Retrieve the already trained intent model; The fused feature vector is input into the trained intent model for intent recognition to obtain the intent recognition result; Retrieve the already trained dialogue generation model; The intent recognition result is input into the dialogue generation model to generate dialogue content corresponding to the intent recognition result; The dialogue content corresponding to the intent recognition result is returned to the user's dialogue interface.

10. A dialogue generation device based on artificial intelligence, characterized in that, The AI-based dialogue generation device includes: The initial dialogue record information acquisition module is used to collect user dialogues in real time, generate initial dialogues using predefined basic reply templates, reply to user dialogues, and acquire initial dialogue record information. The context feature vector acquisition module is used to fuse context information from the initial dialogue record information and obtain the fused context feature vector. The semantic feature vector acquisition module is used to perform semantic information fusion on the initial dialogue record information and obtain the fused semantic feature vector. The feature vector fusion module is used to perform a secondary fusion of the fused context feature vector and the fused semantic feature vector to obtain the fused feature vector. The dialogue response module is used to generate dialogue content and respond by combining the fused feature vectors with the trained intent model.