A Multi-Turn Automatic Dialogue Method for AI-Powered Smart Toys Based on Large Models

By analyzing the historical dialogue records of AI-powered smart toys, a message queue of key contextual information is identified and constructed, solving the problems of context window limitations and topic coherence in multi-turn dialogues, and achieving higher dialogue accuracy and coherence.

CN121071091BActive Publication Date: 2026-04-03CHENZHOU WEALTHWISE ENTERPRISE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies in multi-turn dialogues with AI smart toys have limited context window size, which cannot effectively accommodate historical dialogue records. This results in poor reliability of extracting key context information, affecting the accuracy of the dialogue, and does not fully consider the coherence of the dialogue topic.

Method used

By acquiring word vectors from the current round of dialogue and historical dialogues, analyzing semantic relationships, performing clustering and semantic similarity calculations, identifying the contextual criticality of candidate historical dialogues, and constructing a message queue to improve the accuracy of dialogues.

Benefits of technology

It improves the accuracy and coherence of multi-turn dialogues in AI smart toys, ensures that the large model understands the background knowledge of the current round of dialogue, reduces redundant information interference, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071091B_ABST
    Figure CN121071091B_ABST
Patent Text Reader

Abstract

This application relates to the field of large-model semantic analysis technology, specifically to a multi-turn automatic dialogue method for AI smart toys based on a large-model approach. The method includes: obtaining the question word vector corresponding to the current round of dialogue in the AI ​​smart toy, as well as the question word vectors and answer word vectors of each round of historical dialogue; calculating the topic coherence of each round of historical dialogue; identifying candidate historical dialogues for the current round of dialogue; analyzing the semantic similarity between the question word sets of the current round of dialogue and each candidate historical dialogue; obtaining the topic expression ambiguity of each candidate historical dialogue; and further obtaining the contextual criticality of each candidate historical dialogue to extract the key historical dialogues for the current round of dialogue. These key historical dialogues are then used to construct the message queue for the current round of dialogue, enabling multi-turn dialogue between the AI ​​smart toy and the user using a large-model approach. This application can improve the accuracy of multi-turn dialogue in AI smart toys.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of large model semantic analysis technology, specifically to a multi-turn automatic dialogue method for AI smart toys based on large models. Background Technology

[0002] AI-powered smart toys with multi-turn dialogue capabilities can provide users with high-quality interactions that are context-sensitive, enhancing the user experience. However, to improve the accuracy of multi-turn dialogues, when using a large model for multi-turn dialogues, the model needs to correctly understand the contextual information in the AI ​​smart toy's historical dialogue records to ensure the continuity of multi-turn dialogues within the AI ​​smart toy and prevent the loss of user dialogue information.

[0003] In multi-turn dialogues with AI-powered smart toys, the limited context window size of the large model cannot accommodate the entire historical dialogue record. Existing technologies use semantic matching to extract key contextual information from the historical dialogue record, preventing the contextual information from exceeding the context window size limit. This also reduces the adverse interference of redundant information in the historical dialogue record on the semantic understanding of the large model, thereby improving the accuracy of multi-turn dialogues with AI-powered smart toys. However, because the continuity of the dialogue topics changes continuously during the historical dialogue, existing technologies using semantic matching to extract key contextual information do not fully consider the continuity characteristics of the dialogue topics in the historical dialogue record. This leads to poor reliability of key contextual information extraction, affecting the accuracy of multi-turn dialogues with AI-powered smart toys. Summary of the Invention

[0004] To address the aforementioned technical issues, this application provides a multi-turn automatic dialogue method for AI smart toys based on a large model, thereby resolving existing problems.

[0005] The multi-turn automatic dialogue method for AI smart toys based on large models in this application adopts the following technical solution:

[0006] One embodiment of this application provides a multi-turn automatic dialogue method for AI smart toys based on a large model, including the following steps:

[0007] Obtain the question word vector corresponding to the current round of dialogue with the AI ​​smart toy, as well as the question word vector and answer word vector of each round of historical dialogue;

[0008] Based on the semantic correlation between the question word vectors of each round of historical dialogue of the AI ​​smart toy and the question word vectors and answer word vectors of other historical dialogues, the relevant topic coherence of each round of historical dialogue is obtained;

[0009] Cluster analysis is performed on the relevant topic coherence of historical dialogues to identify candidate historical dialogues for the current round of dialogue. Then, the semantic similarity between the question word sets of the current round of dialogue and each candidate historical dialogue is extracted and analyzed to obtain the topic expression ambiguity of each candidate historical dialogue. Finally, the contextual criticality of each candidate historical dialogue is obtained by combining the relevant topic coherence.

[0010] The key historical dialogues of the current round are extracted by the contextual criticality of all candidate historical dialogues. These key historical dialogues are then used to construct the message queue of the current round of dialogue, so as to leverage a large model to realize multi-round dialogues between AI smart toys and users.

[0011] Preferably, the method for obtaining the coherence of relevant topics in each round of historical dialogue further comprises:

[0012] G t =R t / (H t +∈); where G t To assess the coherence of the relevant themes in the t-th round of historical dialogue, R t Let H be the mean cosine similarity between the question word vectors and answer word vectors of the t-th round of historical dialogue and the question word vectors of the current round of dialogue, where ∈ is a constant to avoid a denominator of 0. t Let be the mean of the absolute differences between the first mean of the historical dialogue in the t-th round of the semantic change sequence and all the first means within its sliding window, wherein the sliding window for each round of historical dialogue is constructed with the first mean of each round of historical dialogue in the semantic change sequence as the center.

[0013] Preferably, the adjacent historical dialogues of each round of historical dialogue are statistically analyzed, the sum of the cosine similarity between the question word vector of each round of historical dialogue and the question word vector and answer word vector of each adjacent historical dialogue is calculated, and the mean of all the sums calculated between each round of historical dialogue and all its adjacent historical dialogues is taken as the first mean of each round of historical dialogue. The first mean of all historical dialogues is arranged according to the dialogue time to form a semantic change sequence.

[0014] Preferably, the method for identifying candidate historical dialogues in the current round of dialogue further includes:

[0015] The mean of the coherence of all related topics within each cluster is calculated separately. The historical dialogues corresponding to the coherence of related topics in the cluster with the larger mean are used as candidate historical dialogues for the current round of dialogue.

[0016] Preferably, the extraction of the question vocabulary set of the current round of dialogue and each candidate historical dialogue further includes:

[0017] Punctuation marks and meaningless characters are removed from the question text of the current round of dialogue and each candidate historical dialogue to obtain the plain text of the questions in the current round of dialogue and each candidate historical dialogue. The plain text of the questions is then segmented to obtain the question vocabulary set of the current round of dialogue and the question vocabulary set of each candidate historical dialogue in the current round of dialogue.

[0018] Preferably, the method for obtaining the ambiguity of the topic expression in each candidate historical dialogue further comprises:

[0019] F j =Pu j / (Ru j +∈); where F j For the ambiguity of the topic expression of the j-th candidate historical dialogue, Pu j Let Ru be the information entropy of the semantic similarity of all words in the question vocabulary set of the j-th candidate historical dialogue. j This is the sum of the semantic similarities of all words in the question vocabulary set of the j-th candidate historical dialogue.

[0020] Preferably, the average of the inverses of the normalized Google distances between each word in the question vocabulary set of each candidate historical dialogue and all words in the question vocabulary set of the current round of dialogue is calculated as the semantic similarity of each word in the question vocabulary set of each candidate historical dialogue.

[0021] Preferably, the method for obtaining the contextual criticality of each candidate historical dialogue further comprises:

[0022] V j =(1+exp(-F j ))×G j In the formula, V j Let F be the contextual criticality of the j-th candidate historical dialogue, and let exp() be an exponential function with base to the natural constant. j Let G be the ambiguity of the topic expression of the j-th candidate historical dialogue. j Let be the topic coherence of the j-th candidate historical dialogue.

[0023] Preferably, the process of extracting key historical dialogues in the current round of dialogue further comprises:

[0024] The contextual criticality of all candidate historical dialogues in the current round of dialogue is thresholded, and the candidate historical dialogues corresponding to contextual criticality above the threshold are taken as the key historical dialogues in the current round of dialogue.

[0025] Preferably, the process of constructing the message queue for the current round of dialogue includes:

[0026] The question text of the current round of dialogue, the question text of all key historical dialogues and their answer texts are standardized, and the standardized question texts of the current round of dialogue and the question texts of all key historical dialogues and their answer texts are arranged in chronological order to obtain the message queue of the current round of dialogue.

[0027] This application has at least the following beneficial effects:

[0028] This application analyzes the coherence of historical dialogue topics and combines the semantic similarity between historical dialogue information and the question information of the current round of dialogue to accurately measure the coherence features of relevant dialogue topics in the current round of dialogue. This is beneficial for accurately extracting key contextual information related to the current round of dialogue topics, thereby enabling the large model to fully understand the background knowledge information of the current round of dialogue topics when engaging in dialogue in response to the current round of questions.

[0029] Meanwhile, this application analyzes the semantic similarity of words between question vocabulary sets, accurately measures the ambiguity of expressing the topic of the current round of dialogue in candidate historical dialogues, avoids the selection of historical dialogues interfering with the semantic understanding of the current dialogue topic by the large model, and improves the accuracy of subsequent large model in conducting multi-round dialogues.

[0030] This application fully considers the continuity of dialogue topics in historical dialogue records, and combines the coherence of related topics and the ambiguity of topic expression in candidate historical dialogues to accurately measure the criticality of each candidate historical dialogue as contextual information for the current round of dialogue. This improves the reliability of extracting key contextual information from historical dialogue records and avoids affecting the accuracy of AI smart toys in conducting multi-round dialogues. Attached Figure Description

[0031] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A flowchart illustrating the steps of the multi-turn automatic dialogue method for AI smart toys based on a large model provided in this application. Detailed Implementation

[0033] To further illustrate the technical means and effects adopted by this application to achieve the intended inventive purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the AI ​​intelligent toy multi-turn automatic dialogue method based on a large model proposed in this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0034] Unless otherwise defined, terms such as “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a circuit structure, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the article or device that includes said element. Furthermore, the term “and / or” as used herein includes any and all combinations of one or more of the associated listed items. All technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0035] The following section, in conjunction with the accompanying drawings, details the specific scheme of the multi-turn automatic dialogue method for AI intelligent toys based on a large model provided in this application.

[0036] This application provides an embodiment of a multi-turn automatic dialogue method for AI smart toys based on a large model. For details, please refer to [link to specific documentation]. Figure 1 This includes the following steps:

[0037] Step 1: Obtain the question word vector corresponding to the current round of dialogue of the AI ​​smart toy, as well as the question word vector and answer word vector of each round of historical dialogue.

[0038] In multi-turn dialogues of AI smart toys, in order to avoid the context information in historical dialogue records from exceeding the limit of the context window size and to reduce the adverse interference of redundant information in historical dialogue records on the semantic understanding of large models, it is necessary to measure the continuity features of dialogue topics in historical dialogue records through semantic analysis, and extract key context information of the current round of dialogue from historical dialogue records to improve the accuracy of AI smart toys in multi-turn dialogues.

[0039] First, the AI ​​smart toy dialogue server obtains the question text of the current round of dialogue and the question text and answer text of each round of historical dialogue in the historical dialogue record, and extracts the timestamp of each round of historical dialogue in the historical dialogue record.

[0040] Secondly, the collected text data undergoes semantic analysis preprocessing to remove punctuation marks and meaningless characters from the question and answer texts. Preferably, in this embodiment, a regular expression matching algorithm is used to remove punctuation marks and meaningless characters from all question and answer texts, resulting in the plain text of the question in the current round of dialogue and the plain text of the question and answer for each round of historical dialogue in the historical dialogue record.

[0041] Furthermore, the plain text of the question in the current round of dialogue and the plain text of the questions and answers in each round of historical dialogue in the historical dialogue record are used as input to the Word2Vec word vector algorithm. The word vectors of the question in the current round of dialogue and the word vectors of the questions and answers in each round of historical dialogue in the historical dialogue record are obtained by using the Word2Vec word vector algorithm. The regular expression matching algorithm and the Word2Vec word vector algorithm are well-known technologies, and the specific process will not be described in detail.

[0042] Step 2: Based on the semantic correlation between the question word vectors of each round of historical dialogues of the AI ​​smart toy and the question word vectors and answer word vectors of other historical dialogues, obtain the relevant topic coherence of each round of historical dialogues.

[0043] In general, the continuity of dialogue topics changes continuously during historical dialogues, generating a large amount of redundant or invalid information. Current technologies do not fully consider the continuity of dialogue topics in historical dialogue records, resulting in poor reliability of the extracted key contextual information and affecting the accuracy of multi-turn dialogues in AI smart toys. Therefore, to improve the accuracy of multi-turn dialogues in AI smart toys, semantic analysis is needed to measure the continuity of dialogue topics in historical dialogue records.

[0044] Therefore, in order to perform semantic analysis on the continuity features of dialogue topics in historical dialogue records, the adjacent historical dialogues of each round of historical dialogue will be counted, so as to analyze the semantic coherence of each round of historical dialogue based on the adjacent historical dialogues. In this embodiment, preferably, the M rounds of historical dialogues with the closest time interval between each round of historical dialogue are recorded as the M adjacent historical dialogues of each round of historical dialogue. In this example, M is taken as 2.

[0045] Furthermore, semantic analysis is performed using cosine similarity as a metric. The sum of the cosine similarities between the question word vector of each round of historical dialogue and the question word vectors and answer word vectors of each adjacent historical dialogue is calculated. For ease of understanding and description, this embodiment preferably records this as the first sum between each round of historical dialogue and each adjacent historical dialogue. The mean of the first sum between each round of historical dialogue and all its adjacent historical dialogues is recorded as the first mean of each round of historical dialogue. The larger the first mean, the higher the semantic similarity between the historical question and its preceding and following historical dialogues, indicating that the continuity of the topic of the historical dialogue is better at this time.

[0046] To perform semantic analysis on the changes in the continuity features of historical dialogue topics, a sequence composed of the first mean of all historical dialogues arranged in chronological order is denoted as the semantic change sequence of historical dialogue records. The semantic change sequence reflects the changing characteristics of semantic similarity between all adjacent historical dialogues. If the change in semantic similarity between adjacent historical dialogues is small within a local time period of a certain dialogue moment, it indicates that the continuity of the historical dialogue topics at this time is good. Furthermore, if the historical dialogue information at this dialogue moment has a high similarity to the question information of the current round of dialogue, it indicates that the correlation between the historical dialogue topic at this dialogue moment and the current round of dialogue topic is stronger. Therefore, the historical dialogue at this dialogue moment is more likely to contain key contextual information related to the current round of dialogue topic, and the historical dialogue information at this dialogue moment should be retained so that the large model can fully understand the key contextual information in the historical dialogue records when engaging in dialogue for the current round of questions.

[0047] Therefore, a sliding window of size 1×K is set around the first mean of each round of historical dialogue in the semantic change sequence to obtain the sliding window of each round of historical dialogue, where K is 11. The implementer can adaptively select the value, and if there are missing values ​​in the sliding window, the missing values ​​are filled by the mean.

[0048] Based on the semantic analysis above, the topic coherence of each previous round of historical dialogue is calculated:

[0049] G t =R t / (H t +∈); where G t To assess the coherence of the relevant themes in the t-th round of historical dialogue, R t Let H be the mean cosine similarity between the question word vectors and answer word vectors of the t-th round of historical dialogue and the question word vectors of the current round of dialogue. tis the mean of the absolute differences between the elements of the t-th round of historical dialogue and all elements within its sliding window. ∈ is a constant to avoid a denominator of 0, and is taken within a small data range (0.001, 0.01). Its impact on the calculation result is small and can be ignored. In this embodiment, the value is taken as 0.005.

[0050] Among them, the coherence of related topics reflects the coherence of related topics in the current round of dialogue. The greater the coherence of related topics, the more the historical dialogue can reflect the coherence of related topics in the current round of dialogue. Therefore, the historical dialogue is more likely to contain key contextual information related to the topic of the current round of dialogue. When the large model engages in dialogue on the question of the current round, it needs to fully understand the information of the historical dialogue.

[0051] Step 3: Perform cluster analysis on the relevant topic coherence of historical dialogues to identify candidate historical dialogues for the current round of dialogue. Then, extract and analyze the semantic similarity between the question word sets of the current round of dialogue and each candidate historical dialogue to obtain the topic expression ambiguity of each candidate historical dialogue. Finally, combine the relevant topic coherence to obtain the contextual criticality of each candidate historical dialogue.

[0052] To accurately filter historical dialogues from the historical dialogue record, the topic coherence of all historical dialogues before the current round of dialogue is used as the input to the clustering algorithm. The clustering algorithm can be K-means clustering or CURE hierarchical clustering (Clustering Using Representatives). In this embodiment, K-means clustering is used for clustering. The preset number of clusters in the algorithm is 2. K-means clustering outputs two clusters. K-means clustering is a well-known technology, and the specific process will not be described in detail.

[0053] Furthermore, in this embodiment, the mean of the coherence of all related topics within two clusters is calculated respectively. The historical dialogue corresponding to each data point in the cluster with the larger mean is taken as each candidate historical dialogue for the current round of dialogue. The candidate historical dialogue is likely to contain key contextual information of the current round's question. However, if there is interference from highly redundant information in the candidate historical dialogue, it will lead to ambiguity in the expression of the dialogue topic, causing adverse interference to the semantic understanding of the dialogue topic by the large model and affecting the accuracy of the AI ​​smart toy in multi-round dialogue. Therefore, it is necessary to perform semantic analysis on the ambiguity of the dialogue topic expression in the candidate historical dialogue.

[0054] Therefore, in order to perform semantic analysis on the ambiguity in expressing the topic of the current round of dialogue in the candidate historical dialogues, the Jieba word segmentation technology is used to segment the question plain text of the current round of dialogue and the question plain text of each candidate historical dialogue of the current round of dialogue to extract each word in the question plain text, thereby obtaining the question vocabulary set of the current round of dialogue and the question vocabulary set of each candidate historical dialogue of the current round of dialogue. The Jieba word segmentation technology is a well-known technology, and the specific process will not be described in detail.

[0055] Furthermore, the average of the inverse of the normalized Google distance between each word in the question vocabulary set of each candidate historical dialogue and all words in the question vocabulary set of the current round of dialogue is calculated and denoted as the semantic similarity of each word in the question vocabulary set of each candidate historical dialogue. The higher the semantic similarity, the higher the degree of semantic similarity between the words in the candidate historical dialogue and all words in the question of the current round of dialogue. If the semantic similarity of all words in the question vocabulary set is more chaotic and the sum of the semantic similarities of all words in the question vocabulary set is smaller, it indicates that the candidate historical dialogue is less likely to fully reflect the key theme of the current round of dialogue.

[0056] In this embodiment, based on the semantic analysis process described above, the topic ambiguity of each candidate historical dialogue in the current round of dialogue is calculated:

[0057] F j =Pu j / (Ru j +∈); where F j For the ambiguity of the topic expression of the j-th candidate historical dialogue, Pu j Let Ru be the information entropy of the semantic similarity of all words in the question vocabulary set of the j-th candidate historical dialogue. j This is the sum of the semantic similarities of all words in the question vocabulary set of the j-th candidate historical dialogue. The calculation of information entropy is a well-known technique, and the specific process will not be elaborated further.

[0058] It is understandable that topic expression ambiguity reflects the ambiguity in expressing the topic of the current round of dialogue in the candidate historical dialogue. The greater the topic expression ambiguity, the less likely the candidate historical dialogue is to fully reflect the key topic of the current round of dialogue. Furthermore, if there is a lot of redundant information in the candidate historical dialogue, then selecting the candidate historical dialogue is more likely to interfere with the semantic understanding of the current dialogue topic by the large model. Therefore, the historical dialogue information at the current dialogue moment should not be retained.

[0059] In this embodiment, by combining the metric features of the above semantic analysis, the contextual criticality of each candidate historical dialogue in the current round of dialogue is calculated based on the topic coherence and topic ambiguity of each candidate historical dialogue:

[0060] V j =(1+exp(-F j ))×G j In the formula, V j Let F be the contextual criticality of the j-th candidate historical dialogue, and let exp() be an exponential function with base to the natural constant. j Let G be the ambiguity of the topic expression of the j-th candidate historical dialogue. j Let be the topic coherence of the j-th candidate historical dialogue.

[0061] Among them, context criticality reflects the degree of importance of each candidate historical dialogue as context information for the current round of dialogue. The greater the context criticality, the more likely the candidate historical dialogue is to contain key context information related to the topic of the current round of dialogue, and the less affected by redundant information, making it more suitable as context information for the current round of dialogue.

[0062] Step 4: Extract the key historical dialogues of the current round of dialogue by using the contextual criticality of all candidate historical dialogues. This key historical dialogue is used to build the message queue of the current round of dialogue, so as to realize multi-round dialogue between AI smart toys and users by leveraging a large model.

[0063] To extract key contextual information from historical dialogue records more reliably, in this embodiment, the contextual criticality of all candidate historical dialogues corresponding to the current round of dialogue is used as the input of the Otsu's inter-class variance algorithm. The Otsu's inter-class variance algorithm is used to obtain a segmentation threshold, and the candidate historical dialogues with contextual criticality higher than the segmentation threshold are taken as the key historical dialogues of the current round of dialogue. The Otsu's inter-class variance algorithm is a well-known technology, and the specific process will not be described in detail.

[0064] Furthermore, the question text of the current round of dialogue and the question texts and their answers of all key historical dialogues are standardized to ensure the uniformity of the data format of all key historical dialogues. The standardized question texts and their answers of the current round of dialogue and all key historical dialogues are then used to construct a message queue for the current round of dialogue in chronological order. This allows the large model to refer to previous key historical dialogues when generating responses, ensuring the continuity of multi-round automatic dialogues. The standardization process and the construction of the message queue are well-known technologies, and the specific process will not be elaborated here.

[0065] Meanwhile, in the AI ​​smart toy dialogue server, an API interface is set up on the server to connect with a large model, enabling the AI ​​smart toy to communicate with the large language model through the server's API interface. In this embodiment, the large model connected is the DeepSeek large model, and the implementer can choose to connect to other large models according to actual needs.

[0066] Specifically, during the multi-turn dialogue process of the AI ​​smart toy, the standardized question text of the user in the current round of dialogue and the message queue of the current round of dialogue are sent to the DeepSeek big model. The DeepSeek big model performs semantic reasoning on the standardized question text of the current round of dialogue to obtain the answer text of the current round of dialogue, and sends the answer text of the current round of dialogue to the AI ​​smart toy through the server. The AI ​​smart toy realizes multi-turn dialogue with the user through its voice function.

[0067] It is understood that references to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the appearance of phrases such as "in one embodiment," "in some embodiments," "in other embodiments," or "in still other embodiments" in different parts of this specification does not necessarily refer to the same embodiment, but rather means "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0068] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous. Moreover, the sequence numbers of the steps in the embodiments do not imply a specific order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments in this specification.

[0069] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A multi-turn automatic dialogue method for AI intelligent toys based on a large model, characterized in that, Includes the following steps: Obtain the question word vector corresponding to the current round of dialogue with the AI ​​smart toy, as well as the question word vector and answer word vector of each round of historical dialogue; Based on the semantic correlation between the question word vectors of each round of historical dialogue of the AI ​​smart toy and the question word vectors and answer word vectors of other historical dialogues, the relevant topic coherence of each round of historical dialogue is obtained; Cluster analysis is performed on the relevant topic coherence of historical dialogues to identify candidate historical dialogues for the current round of dialogue. Then, the semantic similarity between the question word sets of the current round of dialogue and each candidate historical dialogue is extracted and analyzed to obtain the topic expression ambiguity of each candidate historical dialogue. Finally, the contextual criticality of each candidate historical dialogue is obtained by combining the relevant topic coherence. Extract key historical dialogues for the current round of dialogue by considering the contextual criticality of all candidate historical dialogues. Use this information to build a message queue for the current round of dialogue, thereby enabling multi-round dialogues between AI smart toys and users using a large model. The method for obtaining the coherence of relevant topics in each round of historical dialogue is further as follows: In the formula, To ensure the coherence of the relevant themes in the t-th round of historical dialogue, Let be the mean cosine similarity between the question word vectors and answer word vectors of the t-th round of historical dialogue and the question word vectors of the current round of dialogue. To avoid constants with a denominator of 0, Let be the mean of the absolute differences between the first mean of the historical dialogue in the t-th round of the semantic change sequence and all the first means within its sliding window, wherein the sliding window for each round of historical dialogue is constructed with the first mean of each round of historical dialogue in the semantic change sequence as the center. Statistically analyze the adjacent historical dialogues of each round of historical dialogue, calculate the sum of the cosine similarity between the question word vector of each round of historical dialogue and the question word vector and answer word vector of each adjacent historical dialogue, and take the average of all the sums calculated between each round of historical dialogue and all its adjacent historical dialogues as the first average of each round of historical dialogue. Arrange the first averages of all historical dialogues according to the dialogue time to form a semantic change sequence. The method for obtaining the ambiguity of the topic expression in each candidate historical dialogue is further as follows: In the formula, Let the ambiguity of the topic expression for the j-th candidate historical dialogue be denoted as . Let the information entropy be the semantic similarity of all words in the question lexicon of the j-th candidate historical dialogue. The sum of semantic similarities of all words in the question vocabulary set of the j-th candidate historical dialogue; The method for obtaining the contextual criticality of each candidate historical dialogue is further as follows: In the formula, Let the contextual criticality of the j-th candidate historical dialogue be denoted as . It is an exponential function with the natural constant as its base. Let the ambiguity of the topic expression for the j-th candidate historical dialogue be denoted as . Let be the topic coherence of the j-th candidate historical dialogue.

2. The multi-turn automatic dialogue method for AI intelligent toys based on a large model as described in claim 1, characterized in that, The method for identifying candidate historical dialogues in the current round of dialogue further includes: The mean of the coherence of all related topics within each cluster is calculated separately. The historical dialogues corresponding to the coherence of related topics in the cluster with the larger mean are used as candidate historical dialogues for the current round of dialogue.

3. The multi-turn automatic dialogue method for AI intelligent toys based on a large model as described in claim 1, characterized in that, The extraction of the vocabulary set of the current round of dialogue and its candidate historical dialogues further includes: Punctuation marks and meaningless characters are removed from the question text of the current round of dialogue and each candidate historical dialogue to obtain the plain text of the questions in the current round of dialogue and each candidate historical dialogue. The plain text of the questions is then segmented to obtain the question vocabulary set of the current round of dialogue and the question vocabulary set of each candidate historical dialogue in the current round of dialogue.

4. The multi-turn automatic dialogue method for AI intelligent toys based on a large model as described in claim 1, characterized in that, Calculate the average of the inverses of the normalized Google distances between each word in the question vocabulary set of each candidate historical dialogue and all words in the question vocabulary set of the current round of dialogue, and use this as the semantic similarity of each word in the question vocabulary set of each candidate historical dialogue.

5. The multi-turn automatic dialogue method for AI intelligent toys based on a large model as described in claim 1, characterized in that, The process of extracting key historical dialogues in the current round of dialogue is further as follows: The contextual criticality of all candidate historical dialogues in the current round of dialogue is thresholded, and the candidate historical dialogues corresponding to contextual criticality above the threshold are taken as the key historical dialogues in the current round of dialogue.

6. The multi-turn automatic dialogue method for AI intelligent toys based on a large model as described in claim 1, characterized in that, The process of constructing the message queue for the current round of dialogue includes: The question text of the current round of dialogue, the question text of all key historical dialogues and their answer texts are standardized, and the standardized question texts of the current round of dialogue and the question texts of all key historical dialogues and their answer texts are arranged in chronological order to obtain the message queue of the current round of dialogue.

Citation Information

Patent Citations

  • Method and system for keeping conversation continuity of conversation system

    CN106776828A

  • Method and device for constructing multi-round dialogue large model system

    CN118797010A