An AI intelligent robot interaction method and system based on large language model

By analyzing the relevance and amount of new information in interaction rounds, combined with potential Dirichlet allocation and uniqueness assessment, training samples are screened, which solves the problem of large language model training sample screening and improves the interaction accuracy and learning efficiency of AI intelligent robots.

CN118444789BActive Publication Date: 2024-09-27CHENGDU CHENMU DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410902680.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-09-27
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

In the screening of training samples for large language models, existing technology is difficult to accurately screen suitable samples, resulting in reduced model performance and insufficient generalization capabilities, which affects the interaction accuracy of AI intelligent robots.

Method used

By analyzing the correlation and the amount of new information between the statements in the interaction round and the dialogue history, using potential Dirichlet allocation to evaluate the correlation and the amount of new information in the interaction round, adjusting the judgment threshold based on the degree of uniqueness and frequency, and filtering out trainable Interactive rounds and pending training interactive rounds optimize the quality and efficiency of training data.

Benefits of technology

It improves the model's ability to understand user needs and behavior patterns, enhances the response depth of the dialogue system, improves interaction quality and learning efficiency, and ensures that AI intelligent robots can better respond to users' personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118444789B
    Figure CN118444789B
Patent Text Reader

Abstract

The present invention relates to the field of human-computer interaction technology, and specifically discloses an AI intelligent robot interaction method and system based on a large language model, which are used to solve the existing problem that suitable samples cannot be accurately screened and added to the large language model for training; by comprehensively analyzing the correlation and the amount of new information, and classifying the interaction rounds accordingly, it is effectively distinguished which interaction rounds have the potential to be used as training samples, thereby improving the quality of training data and the efficiency of model training; by deeply analyzing the uniqueness of the pending training interaction rounds, and adjusting the judgment threshold according to the frequency of these uniqueness, the method not only improves the model's recognition ability for novel and unique interactions, but also enables the system to dynamically adjust the training strategy according to the characteristics of the actual interaction; so that the AI ​​intelligent robot can better understand and respond to the personalized needs of users, thereby improving user satisfaction and the practicality of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of human-computer interaction technology, and more specifically, to an AI intelligent robot interaction method and system based on a large language model. Background Art

[0002] Big language models are natural language processing models based on deep learning technology, especially neural network architecture. These models are able to understand and generate natural language text by training on large-scale text data sets. AI intelligent robot interaction refers to the use of artificial intelligence technology to enable robots to communicate with humans naturally and effectively. This interaction can be carried out in multiple forms such as voice and text. AI intelligent robots complete the interaction by understanding user input, processing information, and generating appropriate responses.

[0003] In AI intelligent robot application scenarios that require personalization and dynamic interaction, such as robot question-answering interaction systems in public libraries, the training of large language models can help AI intelligent robots give accurate and timely answers to users' questions.

[0004] In the sample collection for training the large language model, if the appropriate samples cannot be accurately screened and added to the large language model for training, it will cause problems such as decreased model performance, insufficient generalization ability, and waste of resources, affecting the accuracy of the interaction of the AI ​​intelligent robot.

[0005] In order to solve the above problems, a technical solution is now provided. Summary of the invention

[0006] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides an AI intelligent robot interaction method and system based on a large language model to solve the problems raised in the above-mentioned background technology.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] An AI intelligent robot interaction method based on a large language model comprises the following steps:

[0009] S1: For registered users, defines the interaction rounds in the interaction process;

[0010] S2: By analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds, the relevance of the content of the interaction round and the conversation history is evaluated; the text content of the interaction round is analyzed through latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round;

[0011] S3: Comprehensively analyze the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and mark the interaction round as a trainable interaction round or a pending training interaction round according to the judgment threshold;

[0012] S4: for the pending training interaction round, evaluate the uniqueness of the user's questions in the pending training interaction round compared with the historical questions, where the uniqueness includes a large uniqueness and a small uniqueness;

[0013] S5: According to the frequency of occurrence of the undetermined training interaction rounds with high uniqueness within the preset interval, the judgment thresholds of the trainable interaction rounds and the undetermined training interaction rounds are adjusted.

[0014] In a preferred embodiment, in S1, an interaction round is defined, and an interaction round is a group of dialogues consisting of questions asked by the user and corresponding answers given by the AI ​​intelligent robot.

[0015] In a preferred embodiment, in S2, the relevance of the content of the interaction round and the dialogue history is evaluated by analyzing the correlation between the sentence in the interaction round and its upper and lower interaction rounds, specifically:

[0016] Defining Nodes , each node In the graph, a node represents an interaction round. Includes user questions and robot answers;

[0017] Defining Edges ,side Representation Node and nodes The relationship between each node in the graph and nodes Each represents a unique round of interaction;

[0018] Calculate edge weights , whose expression is: ;in, is the semantic similarity, is the time decay function, are the adjustment coefficients of semantic similarity and time decay function respectively, and Represent the indexes of different interaction rounds respectively;

[0019] Get Node and nodes The shortest path length;

[0020] Calculate the interaction round correlation evaluation index, and its expression is: ;in, is the interaction round relevance evaluation index; It is a slave node To Node The shortest path length; is the correlation decay function; represents the natural exponential function, with the base being the base of the natural logarithm .

[0021] In a preferred embodiment, the text content of the interaction round is analyzed by latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round, specifically:

[0022] Preset number of topics , the number of topics is the total number of topics in the topic model;

[0023] Get Document Set , document set is the set of all interaction rounds;

[0024] Preprocess the text of the interaction rounds;

[0025] Use the document set to train the latent Dirichlet allocation, representing each document as a term frequency vector;

[0026] Extracting the text before the interaction round and the text after the interaction round;

[0027] Use Latent Dirichlet Allocation to analyze the text and output the topic distribution of each document;

[0028] By extracting the topic distribution before the user's question, we can obtain the topic distribution before the interaction round. ;

[0029] By extracting the topic distribution after the user's question, we can obtain the topic distribution after the interaction round. ;

[0030] Calculate the new information evaluation index, the expression is: ;in, is the new information evaluation index, and are the probabilities of topic k before and after the interaction, respectively.

[0031] In a preferred embodiment, in S3, a comprehensive analysis is performed on the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and the interaction round is marked as a trainable interaction round or a pending training interaction round according to a judgment threshold, specifically:

[0032] Normalizing the interaction round relevance evaluation index and the new information amount evaluation index, assigning the normalized interaction round relevance evaluation index and the new information amount evaluation index to preset proportional coefficients, and then calculating the training judgment coefficient;

[0033] Set the training judgment threshold; compare the training judgment coefficient with the training judgment threshold:

[0034] When the training judgment coefficient is greater than the training judgment threshold, the interaction round is marked as a trainable interaction round;

[0035] When the training judgment coefficient is less than or equal to the training judgment threshold, the interaction round is marked as a pending training interaction round.

[0036] In a preferred embodiment, in S4, for the pending training interaction round, the uniqueness of the user's question in the pending training interaction round compared with the historical questions is evaluated, specifically:

[0037] Convert the text of each interaction round into a set, where the elements in the set are independent words of the text;

[0038] Calculate the unique index, which is the Jaccard similarity between the text content of the pending training interaction round and the text content of other user interaction rounds. Its expression is: ;in, is the unique index, A is the set formed by the preprocessing of the pending training interaction rounds, and B is the set formed by the preprocessing of the user's other interaction rounds;

[0039] Compare the unique index to the unique index threshold:

[0040] When the unique index is greater than the unique index threshold, the degree of uniqueness is judged to be small;

[0041] When the unique index is less than or equal to the unique index threshold, it is determined that the degree of uniqueness is large.

[0042] In a preferred embodiment, in S5, the judgment thresholds of the trainable interaction rounds and the pending training interaction rounds are adjusted according to the frequency of occurrence of the pending training interaction rounds with large uniqueness within the preset interval, specifically:

[0043] Obtaining the number of pending training interaction rounds whose uniqueness is determined to be large within a preset interval, and marking the ratio of the number of pending training interaction rounds whose uniqueness is determined to be large within the preset interval to the total number of user interaction rounds within the preset interval as a unique frequent value;

[0044] Adjust the training judgment threshold according to the unique frequent value, specifically:

[0045] By formula: ;in, is the initial training judgment threshold, is the training judgment threshold adjusted according to the unique frequent value, is the threshold adjustment coefficient, is a unique frequent value.

[0046] On the other hand, the present invention provides an AI intelligent robot interaction system based on a large language model, including an interaction round acquisition module, a required training analysis module, a training judgment module, a round unique judgment module and a sample screening and adjustment module;

[0047] Interaction round acquisition module: for registered users, defines the interaction rounds in the interaction process;

[0048] Needed training analysis module: By analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds, the relevance of the content of the interaction round and the dialogue history is evaluated; the text content of the interaction round is analyzed through latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round;

[0049] Training judgment module: It comprehensively analyzes the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and marks the interaction round as a trainable interaction round or a pending training interaction round according to the judgment threshold;

[0050] Round uniqueness judgment module: for pending training interaction rounds, evaluate the uniqueness of user questions in the pending training interaction rounds compared with historical questions, and the uniqueness degree includes large uniqueness degree and small uniqueness degree;

[0051] Sample screening and adjustment module: adjusts the judgment thresholds of trainable interaction rounds and pending training interaction rounds according to the frequency of occurrence of pending training interaction rounds with high uniqueness within a preset interval.

[0052] The technical effects and advantages of the AI ​​intelligent robot interaction method and system based on a large language model of the present invention are as follows:

[0053] 1. By comprehensively using correlation analysis and latent Dirichlet allocation to evaluate the relevance of the content of the interaction round to the dialogue history and the amount of new information, this not only deepens the understanding of user needs and behavior patterns, but also enhances the depth of the dialogue system in dealing with practical problems. A comprehensive analysis of the relevance and the amount of new information is performed, and the interaction rounds are classified accordingly, which effectively distinguishes which interaction rounds have the potential to be used as training samples, thereby improving the quality of training data and the efficiency of model training. This method maximizes the use of useful interaction instances, reduces the interference that irrelevant data may cause to model training, and optimizes the efficiency of resource use.

[0054] 2. By deeply analyzing the uniqueness of the pending training interaction rounds and adjusting the judgment threshold according to the frequency of these uniqueness, this method not only improves the model's ability to identify novel and unique interactions, but also enables the system to dynamically adjust the training strategy according to the characteristics of the actual interaction. By accurately screening and utilizing interaction data, the learning efficiency and interaction quality of AI intelligent robots are greatly improved, allowing AI intelligent robots to better understand and respond to users' personalized needs, thereby improving user satisfaction and system practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A schematic diagram of an AI intelligent robot interaction method based on a large language model of the present invention;

[0056] Figure 2 This is a structural schematic diagram of an AI intelligent robot interaction system based on a large language model of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] Example 1

[0059] Figure 1 The present invention provides an AI intelligent robot interaction method based on a large language model, which comprises the following steps:

[0060] S1: For registered users, define the interaction rounds in the interaction process.

[0061] S2: Evaluate the relevance of the content of the interaction round to the conversation history by analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds; analyze the text content of the interaction round through latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round.

[0062] S3: Comprehensively analyze the relevance of the content of the interaction round to the dialogue history and the degree of new information provided by the interaction round, and mark the interaction round as a trainable interaction round or a pending training interaction round based on the judgment threshold.

[0063] S4: For the pending training interaction round, evaluate the uniqueness of the user questions in the pending training interaction round compared to the historical questions, where the uniqueness includes a large uniqueness and a small uniqueness.

[0064] S5: According to the frequency of occurrence of the undetermined training interaction rounds with high uniqueness within the preset interval, the judgment thresholds of the trainable interaction rounds and the undetermined training interaction rounds are adjusted.

[0065] In S1, for registered users, the interaction rounds in the interaction process are defined as follows:

[0066] Define an interaction round, which is a set of dialogues consisting of a user's question and the AI ​​robot's corresponding answer, namely:

[0067] User question: A specific question or request raised by a user to an AI robot, which can be through text, voice or other interactive forms.

[0068] AI intelligent robot answers: The AI ​​intelligent robot based on the large language model directly responds to user questions. The answers can be optimized based on the large language model, the user's historical data, personal preferences, and the context of the current conversation.

[0069] In S2, the correlation between the sentences in the interaction round and the upper and lower interaction rounds is analyzed to evaluate the relevance of the content of the interaction round and the dialogue history. Specifically:

[0070] As a kind of sequential data, conversations are naturally suitable for being represented by a graph structure, where each node represents an interaction round and the edge represents the connection between the interaction rounds. The weight of the edge represents the strength of the connection between nodes, which can be based on a variety of factors, such as semantic similarity, temporal proximity, or keyword overlap in the interaction round.

[0071] Defining Nodes , each node In the graph, a node represents an interaction round, which includes the user's question and the robot's answer. The node can contain various attributes, such as the text content of the interaction round, timestamp, user characteristics, etc.

[0072] Defining Edges ,side Representation Node and nodes The relationship between them is based on the similarity of the content of the interaction rounds, the proximity of the time series, and other factors. and nodes Each represents a unique round of interaction.

[0073] Calculate edge weights , whose expression is: ;in, is the semantic similarity, is the time decay function, are the adjustment coefficients of semantic similarity and time decay function respectively, and They represent the indexes of different interaction rounds.

[0074] Among them, semantic similarity measures the content similarity between two texts. This can be achieved by:

[0075] TF-IDF + Cosine Similarity: First, use the TF-IDF method to generate a feature vector for the text of each interaction round, and then calculate the cosine similarity between the two vectors. The cosine similarity value ranges from 0 to 1, and the higher the value, the more similar the text.

[0076] Word embedding method: Use a pre-trained word embedding model (such as Word2Vec, GloVe or BERT) to convert the text into a dense vector representation, and then calculate the cosine similarity between these vectors.

[0077] The time decay function considers the time difference between two interaction rounds. The closer the time is, the greater the weight is. Its purpose is to give greater weight to the interaction round that is closer to the current interaction round.

[0078] A common time decay function is exponential decay. The value of the time decay function can be ;in, Interaction Rounds and interactive rounds timestamp, is the decay rate, which controls how fast time affects it. The larger the value, the faster the time effect decays, i.e., older interaction rounds have less influence on the current interaction round.

[0079] These two adjustment coefficients adjust the influence of semantic similarity and time decay in the total weight calculation. Usually, the setting of these coefficients needs to be determined based on experiments and tuning. The optimal value can be found on the training data through cross-validation or other machine learning tuning techniques to maximize the model performance.

[0080] Get Node and nodes The shortest path length of a node and nodes The calculation of the shortest path length is usually done using a graph search algorithm. For weighted graphs, commonly used algorithms include:

[0081] Dijkstra algorithm: Applicable to graphs with positive weights. The algorithm starts from a node and gradually expands to the nearest unvisited node until it reaches the target node or covers all nodes.

[0082] Floyd-Warshall algorithm: Applicable to computing the shortest paths between all pairs of nodes in a graph. This is a dynamic programming algorithm that can handle both positive and negative weights (but not negative weight cycles).

[0083] Calculate the interaction round correlation evaluation index, and its expression is: ;in, is the interaction round relevance evaluation index; It is a slave node To Node The shortest path length; is the correlation decay function; represents the natural exponential function, with the base being the base of the natural logarithm .

[0084] Among them, the association decay function is used to reduce the impact of the association between node pairs with longer path lengths to emphasize the importance of more closely connected node pairs, and to adjust the decrease in association caused by the increase in path length. The main purpose of this decay factor is to emphasize the influence of node pairs with shorter distances, that is, those closely related interaction rounds. The longer the path, the smaller the association decay function, and the lower the correlation reflected. The association decay function converts the influence of path length into a decay coefficient between 0 and 1, so that even distant node pairs have a certain influence, but this influence decreases rapidly with increasing distance.

[0085] The construction process of the correlation decay function includes:

[0086] Build a graph: Build a graph based on the interaction data, determine the nodes and edges, and assign weights to the edges.

[0087] Calculate the shortest path: Use Dijkstra or Floyd-Warshall algorithm to calculate the shortest path for all node pairs.

[0088] Apply a decay function: For each pair of nodes, use their shortest path length The value calculated in the decay function is used to evaluate the correlation between the pair of nodes.

[0089] The larger the interaction round relevance evaluation index is, the more relevant the content of the interaction round is to the conversation history, indicating that:

[0090] This means that the interaction is very close to one or more interaction in the historical conversation in terms of semantics, indicating that there is a direct connection in terms of topic, content, or intent. This indicates that the interaction is able to effectively maintain or enhance the coherence of the conversation. This may be achieved by directly citing the previous conversation or further developing a topic based on the previous conversation.

[0091] It usually means that the information contained in this interaction round occupies a core or important position in the entire conversation and is crucial to understanding the context of the entire conversation.

[0092] In addition, interaction rounds with a larger interaction round relevance evaluation index can be used as machine learning training data to help the model better learn how to deal with similar situations, thereby improving the overall interaction quality and user satisfaction.

[0093] The text content of the interaction rounds is analyzed by latent Dirichlet allocation to evaluate the amount of new information provided in the interaction rounds, specifically:

[0094] Latent Dirichlet Allocation (LDA) is a topic model that automatically discovers topics from text data and assigns a topic distribution to each document (in this case, an interaction round). By comparing the changes in topic distributions between interaction rounds, the amount of new information introduced in each interaction can be quantified.

[0095] Preset number of topics , the number of topics is the total number of topics in the topic model.

[0096] Get vocabulary ,vocabulary is the set of all unique words in the interaction text.

[0097] Get Document Set , document set is the set of all interaction rounds.

[0098] The basic mathematical model for Latent Dirichlet Allocation involves the following distribution:

[0099] Topic-word distribution : The probability distribution of words under each topic, generated by Dirichlet distribution.

[0100] Document-topic distribution : The probability distribution of each topic in each document (interaction round), also generated by Dirichlet distribution.

[0101] Among them, Dirichlet distribution is a continuous multivariate probability distribution used in statistics to express the probability of multinomial random variables. It is a generalization of Beta distribution in the case of multivariate. In natural language processing and machine learning, especially when dealing with topic models such as Latent Dirichlet Allocation (LDA), Dirichlet distribution is often used as a prior probability distribution for randomly selected topics and words.

[0102] Obtain the prior distribution parameters of the document-topic and the prior distribution parameters of the topic-word.

[0103] Before applying Latent Dirichlet Allocation, the following preprocessing steps need to be performed on the text of the interaction rounds:

[0104] Tokenization: Decompose the text of each interaction round into words or phrases.

[0105] Stop word removal: Delete common but low-information words such as "and", "is", etc.

[0106] Stemming: Restore the vocabulary to its basic form to reduce the interference caused by inflectional variations.

[0107] Use the document set to train Latent Dirichlet Allocation, representing each document as a word frequency vector. The training process mainly involves using variational Bayesian and Gibbs sampling methods to estimate and .

[0108] Extract the text paragraphs related to specific interactions:

[0109] Text before the interaction round: This may include a segment of the conversation before the user's question or the entire session history. It depends on the application scenario.

[0110] Text after the interaction round: This usually includes the part from the user's question to the end of the answer. In some cases, it may also include the user's feedback on the answer.

[0111] Use Latent Dirichlet Allocation to analyze the text, and the model will output the topic distribution of each document.

[0112] Obtain the topic distribution before the interaction round by extracting the topic distribution before the user's question , and the topic distribution before the interaction round is represented as the probability of the presence of topic k in this text.

[0113] Obtain the topic distribution after the interaction round by extracting the topic distribution after the user's question , and the topic distribution after the interaction round is represented as the probability of the presence of topic k in this text.

[0114] Calculate the new information quantity evaluation index, and its expression is: ; where is the new information quantity evaluation index, and are the probabilities of topic k before and after the interaction respectively.

[0115] The larger the new information evaluation index is, the lower the similarity between the topic distributions before and after the interaction is, that is, the difference between the two distributions is large. In this case, it can be considered that the interaction round introduced more new topics or information, resulting in a significant change in the topic distribution. Therefore, a larger new information evaluation index indicates that a higher degree of new information is provided in the interaction round. Such interaction rounds are particularly valuable for model training because they introduce new content and help the model better understand and adapt to diverse dialogue scenarios.

[0116] When the new information evaluation index is small, it indicates that the topic distribution similarity before and after the interaction is high, that is, the two distributions are very similar and have not changed much. This usually means that not many new topics or information are introduced in the interaction round, and the user's questions and the system's answers may still focus on the same or similar topics. In this case, a smaller new information evaluation index indicates that the amount of new information provided in this interaction round is low. Such interaction rounds may not provide the same learning value for the model as those with high information gain, because they are not enough to guide the model to learn new knowledge or data patterns.

[0117] In S3, a comprehensive analysis is performed on the relevance of the content of the interaction round to the dialogue history and the degree of new information provided by the interaction round. The interaction round is marked as a trainable interaction round or a pending training interaction round according to the judgment threshold. Specifically:

[0118] The interaction round relevance evaluation index and the new information amount evaluation index are normalized, and after assigning the normalized interaction round relevance evaluation index and the new information amount evaluation index to preset proportional coefficients respectively, the training judgment coefficient is calculated.

[0119] The specific implementation method of calculating the training judgment coefficient is not specifically limited here. Any method that can calculate the training judgment coefficient by assigning the normalized interaction round correlation evaluation index and the new information evaluation index to preset proportional coefficients respectively is acceptable. In order to implement the technical solution of the present invention, the present invention provides a specific method for calculating the training judgment coefficient, and its expression is: ;in, is the training judgment coefficient, are the preset proportional coefficients of the interaction round relevance evaluation index and the new information evaluation index, respectively, and Both are greater than 0.

[0120] From the expression of the training judgment coefficient, it can be seen that the larger the training judgment coefficient, the more the interaction round should be used as a training sample of the large language model to improve the large language model's ability to understand user personalization.

[0121] The training judgment coefficient is calculated by comprehensively considering the interaction round relevance evaluation index and the new information evaluation index. These two indexes are normalized and assigned their own preset proportional coefficients, ensuring that each index contributes to the final judgment coefficient according to its importance. The core purpose of this method is to identify and select those interaction rounds that are both highly relevant to the dialogue history and rich in new information. The interaction round relevance evaluation index reflects the correlation between the content of the interaction round and the existing dialogue content. High correlation means that the interaction round can effectively maintain the coherence and contextual understanding of the dialogue. The new information evaluation index reflects the amount of new content introduced in the interaction round. High new information indicates that the interaction round can provide new knowledge or data points for the model. Therefore, when the training judgment coefficient formed by the combination of these two indices is large, it indicates that the interaction round is not only closely related, but also rich in information, which can significantly enhance the model's understanding and ability to adapt to new situations. Selecting such interaction rounds as training samples helps to improve the accuracy and efficiency of large language models in processing personalized user needs, thereby better meeting users' personalized service needs. That is, interaction rounds with high training judgment coefficients are regarded as high-quality training materials and are more suitable for improving the personalized understanding ability of the model.

[0122] The training judgment threshold is set. The training judgment threshold is set by professional and technical personnel in this field according to the size of the training judgment coefficient and other actual conditions such as the requirements for selecting training samples for a large language model in practice, and will not be repeated here.

[0123] Compare the training judgment coefficient to the training judgment threshold:

[0124] When the training judgment coefficient is greater than the training judgment threshold, the interaction round is marked as a trainable interaction round.

[0125] When the training judgment coefficient is less than or equal to the training judgment threshold, the interaction round is marked as a pending training interaction round.

[0126] Among them, the trainable interaction round refers to the interaction round that can be used to enhance the large language model's ability to understand user personalization. That is, the trainable interaction round can be used as a training sample of the large language model to improve the large language model's ability to understand user personalization.

[0127] In S4, for the pending training interaction round, the uniqueness of the user's question in the pending training interaction round compared with the historical questions is evaluated, specifically:

[0128] Jaccard similarity measures the proportion of common elements in two sets and is used to assess the similarity of sets. In the context of text analysis, it can help determine the proportion of shared vocabulary between two texts, thereby inferring their content similarity.

[0129] Calculate the Jaccard similarity between the text content of the pending training interaction round and the text content of other user interaction rounds, specifically:

[0130] The text is preprocessed to ensure the accuracy and effectiveness of the comparison. The preprocessing steps include:

[0131] Tokenization: Break down the text content of each interaction turn into individual words or phrases.

[0132] Stop word removal: Remove common stop words (such as "and", "is", etc.) because these words usually do not carry specific topic information.

[0133] Lemmatization or stemming: restore words to their basic form to reduce the interference of word form changes on similarity calculation.

[0134] After preprocessing, the text of each interaction round is converted into a set, and the elements in the set are independent words of the text.

[0135] Calculate the unique index, which is the Jaccard similarity between the text content of the pending training interaction round and the text content of other user interaction rounds. Its expression is: ;in, is the unique index, A is the set formed by preprocessing the pending training interaction round, B is the set formed by preprocessing the user's other interaction rounds, |A∩B| is the number of elements in the intersection of set A and set B, indicating the number of common words in the two texts. |A∪B| is the number of elements in the union of set A and set B, indicating the total number of unique words in the two texts.

[0136] The lower the uniqueness index is, the lower the content similarity between the two texts is, that is, the user questions in the pending training interaction round are more unique compared to the historical questions.

[0137] Compare the unique index to the unique index threshold:

[0138] When the unique index is greater than the unique index threshold, it is determined that the degree of uniqueness is small.

[0139] When the unique index is less than or equal to the unique index threshold, the uniqueness is determined to be large. At this time, the pending training interaction rounds with a large uniqueness can also be added as samples to the training optimization of the large language model.

[0140] The unique index threshold is set by professionals in the field based on the size of the unique index and other actual conditions such as the required standard for the uniqueness of user questions in the pending training interaction round compared with historical questions.

[0141] In S5, according to the frequency of occurrence of the undetermined training interaction rounds with large uniqueness within the preset interval, the judgment thresholds of the trainable interaction rounds and the undetermined training interaction rounds are adjusted, specifically:

[0142] The preset interval refers to a period of time. The preset interval is determined based on other actual conditions such as the actual selection requirements for training samples, and will not be elaborated here.

[0143] The number of pending training interaction rounds whose uniqueness is judged to be large within a preset interval is obtained, and the ratio of the number of pending training interaction rounds whose uniqueness is judged to be large within the preset interval to the total number of user interaction rounds within the preset interval is marked as a unique frequent value.

[0144] The larger the unique frequency value is, the larger the proportion of pending training interaction rounds in which the degree of uniqueness is judged to be large. More training samples are needed to train and optimize the large language model to improve the large language model's ability to understand user personalization.

[0145] The larger the unique frequency value, the higher the proportion of pending training interaction rounds in which the degree of uniqueness is judged to be large in the user interaction rounds within the preset interval. In this case, more training samples are needed to train and optimize the large language model to improve its ability to understand user personalization. In order for the large language model to better handle these diverse inputs, more diverse training samples need to be introduced. This can improve the generalization ability of the model, enable it to perform better when facing different users and scenarios, and provide more personalized and accurate responses. High unique frequency values ​​reflect the diversity and variability of user needs. By increasing the training of these unique samples, the model can better understand and adapt to the changes in individual user needs and provide more accurate and personalized services.

[0146] Adjusting the judgment thresholds of the trainable interaction rounds and the pending training interaction rounds is to adjust the training judgment thresholds.

[0147] Adjust the training judgment threshold according to the unique frequent value, specifically:

[0148] The larger the unique frequency value, the smaller the training judgment threshold should be adjusted compared to before. This can be specifically achieved through the following formula: ;in, is the initial training judgment threshold, is the training judgment threshold adjusted according to the unique frequent value, is the threshold adjustment coefficient, is a unique frequent value.

[0149] The threshold adjustment coefficient is set according to the actual situation and is used to determine the sensitivity of the unique frequent value to the threshold adjustment;

[0150] when When it is large, the uniqueness is judged to be large, and the proportion of interaction rounds is large, indicating that more training samples are needed to train and optimize the large language model. will be smaller, so that the training judgment threshold adjusted according to the unique frequent value is reduced, which means that the standard for becoming a trainable interaction round is lowered, and more interaction rounds can become training samples.

[0151] Example 2

[0152] The difference between Example 2 of the present invention and Example 1 is that this example introduces an AI intelligent robot interaction system based on a large language model.

[0153] Figure 2 A structural schematic diagram of an AI intelligent robot interaction system based on a large language model is given in the present invention. An AI intelligent robot interaction system based on a large language model includes an interaction round acquisition module, a required training analysis module, a training judgment module, a round unique judgment module and a sample screening and adjustment module.

[0154] Interaction round acquisition module: For registered users, defines the interaction rounds in the interaction process.

[0155] Needed training analysis module: By analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds, the relevance of the content of the interaction round and the dialogue history is evaluated; the text content of the interaction round is analyzed through latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round.

[0156] Training judgment module: Comprehensively analyzes the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and marks the interaction round as a trainable interaction round or a pending training interaction round based on the judgment threshold.

[0157] Round uniqueness judgment module: for pending training interaction rounds, evaluate the uniqueness of user questions in the pending training interaction rounds compared with historical questions, where the uniqueness includes a large uniqueness and a small uniqueness.

[0158] Sample screening and adjustment module: adjusts the judgment thresholds of trainable interaction rounds and pending training interaction rounds according to the frequency of occurrence of pending training interaction rounds with high uniqueness within a preset interval.

[0159] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0160] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0161] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0163] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0164] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0166] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0167] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0168] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An AI intelligent robot interaction method based on a large language model, characterized in that: The steps include: S1: For registered users, defines the interaction rounds in the interaction process; S2: By analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds, the relevance of the content of the interaction round and the conversation history is evaluated; the text content of the interaction round is analyzed through latent Dirichlet allocation to evaluate the amount of new information provided in the interaction round; S3: Comprehensively analyze the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and mark the interaction round as a trainable interaction round or a pending training interaction round according to the judgment threshold; S4: for the pending training interaction round, evaluate the uniqueness of the user's questions in the pending training interaction round compared with the historical questions, where the uniqueness includes a large uniqueness and a small uniqueness; S5: adjusting the judgment thresholds of the trainable interaction rounds and the pending training interaction rounds according to the frequency of occurrence of the pending training interaction rounds with large uniqueness within the preset interval; In S2, the correlation between the sentences in the interaction round and the upper and lower interaction rounds is analyzed to evaluate the relevance of the content of the interaction round and the dialogue history. Specifically: Define node v i , each node v i In the graph, a node v represents an interaction round. i Includes user questions and robot answers; Define edge e ij , edge ij Represents node v i and node v j The relationship between each node v in the graph i and node v j Each represents a unique round of interaction; Calculate the edge weight w ij , its expression is: ij =α*sim(v i ,v j )+β*timedecay(v i ,v j ); where sim(v i ,v j ) is the semantic similarity, timedecay(v i ,v j ) is the time decay function, α and β are the adjustment coefficients of semantic similarity and time decay function, respectively, and i and j represent the indexes of different interaction rounds; Get node v i and node v j The shortest path length; Calculate the interaction round correlation evaluation index, which is expressed as: R(v i )=∑ j≠i w ij *exp(-d(v i ,v j )); where R(v i ) is the interaction round correlation evaluation index; d(v i ,v j ) is from node v i To node v j The shortest path length; exp(-d(v i ,v j )) is the associated decay function; exp represents the natural exponential function, and the base is the base e of the natural logarithm; The text content of the interaction rounds is analyzed by latent Dirichlet allocation to evaluate the amount of new information provided in the interaction rounds, specifically: The number of topics K is pre-set, and the number of topics K is the total number of topics in the topic model; Obtain document set D, which is a set of all interaction rounds; Preprocess the text of the interaction rounds; Use the document set to train the latent Dirichlet allocation, representing each document as a term frequency vector; Extracting the text before the interaction round and the text after the interaction round; Use Latent Dirichlet Allocation to analyze the text and output the topic distribution of each document; By extracting the topic distribution before the user's question, we can obtain the topic distribution θ before the interaction round. before ; By extracting the topic distribution after the user's question, we can obtain the topic distribution θ after the interaction round. after ; Calculate the new information evaluation index, the expression is: Among them, IG is the new information evaluation index, θ before,k and θ after,k are the probabilities of topic k before and after the interaction, respectively.

2. The AI ​​intelligent robot interaction method based on a large language model according to claim 1, characterized in that: In S1, an interaction round is defined, which is a set of dialogues consisting of questions asked by users and corresponding answers given by the AI ​​intelligent robot.

3. The AI ​​intelligent robot interaction method based on a large language model according to claim 2, characterized in that: In S3, a comprehensive analysis is performed on the relevance of the content of the interaction round to the dialogue history and the degree of new information provided by the interaction round. The interaction round is marked as a trainable interaction round or a pending training interaction round according to the judgment threshold. Specifically: Normalizing the interaction round relevance evaluation index and the new information amount evaluation index, assigning the normalized interaction round relevance evaluation index and the new information amount evaluation index to preset proportional coefficients, and then calculating the training judgment coefficient; Set the training judgment threshold; compare the training judgment coefficient with the training judgment threshold: When the training judgment coefficient is greater than the training judgment threshold, the interaction round is marked as a trainable interaction round; When the training judgment coefficient is less than or equal to the training judgment threshold, the interaction round is marked as a pending training interaction round.

4. The AI ​​intelligent robot interaction method based on a large language model according to claim 3, characterized in that: In S4, for the pending training interaction round, the uniqueness of the user's question in the pending training interaction round compared with the historical questions is evaluated, specifically: Convert the text of each interaction round into a set, where the elements in the set are independent words of the text; Calculate the unique index, which is the Jaccard similarity between the text content of the pending training interaction round and the text content of other user interaction rounds. Its expression is: Where J(A, B) is a unique index, A is a set formed by preprocessing the interaction rounds of the pending training, and B is a set formed by preprocessing the other interaction rounds of the user; Compare the unique index to the unique index threshold: When the unique index is greater than the unique index threshold, the degree of uniqueness is judged to be small; When the unique index is less than or equal to the unique index threshold, it is determined that the degree of uniqueness is large.

5. The AI ​​intelligent robot interaction method based on a large language model according to claim 4, characterized in that: In S5, according to the frequency of occurrence of the undetermined training interaction rounds with large uniqueness within the preset interval, the judgment thresholds of the trainable interaction rounds and the undetermined training interaction rounds are adjusted, specifically: Obtaining the number of pending training interaction rounds whose uniqueness is determined to be large within a preset interval, and marking the ratio of the number of pending training interaction rounds whose uniqueness is determined to be large within the preset interval to the total number of user interaction rounds within the preset interval as a unique frequent value; Adjust the training judgment threshold according to the unique frequent value, specifically: Through the formula: γ = γ0*(1-ω*f); where γ0 is the initial training judgment threshold, γ is the training judgment threshold adjusted according to the unique frequent value, ω is the threshold adjustment coefficient, and f is the unique frequent value.

6. An AI intelligent robot interaction system based on a large language model, used to implement an AI intelligent robot interaction method based on a large language model as described in any one of claims 1 to 5, characterized in that: It includes an interactive round acquisition module, a required training analysis module, a training judgment module, a round unique judgment module and a sample screening and adjustment module; Interaction round acquisition module: for registered users, defines the interaction rounds in the interaction process; Needed training analysis module: By analyzing the correlation between the sentences in the interaction round and its upper and lower interaction rounds, the relevance of the content of the interaction round and the dialogue history is evaluated; The text content of the interaction rounds was analyzed by latent Dirichlet allocation to assess the extent of new information provided in the interaction rounds; Training judgment module: It comprehensively analyzes the relevance of the content of the interaction round to the dialogue history and the amount of new information provided by the interaction round, and marks the interaction round as a trainable interaction round or a pending training interaction round according to the judgment threshold; Round uniqueness judgment module: for pending training interaction rounds, evaluate the uniqueness of user questions in the pending training interaction rounds compared with historical questions, and the uniqueness degree includes large uniqueness degree and small uniqueness degree; Sample screening and adjustment module: adjusts the judgment thresholds of trainable interaction rounds and pending training interaction rounds according to the frequency of occurrence of pending training interaction rounds with high uniqueness within a preset interval.