Interaction system and method based on artificial intelligence
By designing an artificial intelligence interactive system that integrates user intention recognition, historical data storage, feature extraction, intelligent decision-making, content generation and feedback optimization modules, the existing system has solved the user intention recognition, feature extraction, intelligent decision-making algorithm, and content in user intention recognition, feature extraction, and intelligent decision-making algorithms. Generative personalization and feedback optimization are deficient, enabling more efficient and accurate human-computer interaction.
Patent Information
- Application Number
- CN202510026757.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-08
AI Technical Summary
The existing human-computer interaction system is insufficient in dealing with complex and varied user intentions, lacks sufficient feature extraction and utilization, limited intelligence of decision algorithms, lacks personalization and creativity in content generation, and lacks effective feedback mechanisms for optimization. System performance.
An interactive system based on artificial intelligence is designed, including user intention identification module, historical data storage module, feature extraction module, intelligent decision-making module, content generation module and feedback optimization module. The system uses pre-trained word vector model and intent classification neural network model to identify user intentions, combines historical data extraction features, uses improved decision tree algorithms to make intelligent decisions, and generates personalized content through content generation modules, and finally optimizes through feedback Module optimizes system performance.
It improves the accuracy and efficiency of human-computer interaction, can more accurately identify user intentions, generate interactive content that meets user needs, and continuously improve system performance through feedback optimization mechanisms, improving user satisfaction and interactive experience.
Smart Images

Figure CN119441833A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically, to an interactive system and method based on artificial intelligence. Background Art
[0002] In the field of artificial intelligence, with the development of technology, human-computer interaction has become more frequent and important. Most existing interactive systems rely on preset rules or simple pattern matching techniques, which are often unable to handle complex and changeable user intentions. In addition, these systems often fail to accurately understand the real needs of users when processing natural language input, resulting in inefficient interactions. In the decision-making process, traditional algorithms may not be able to fully utilize contextual information and historical interaction data, thus affecting the accuracy and personalization of decisions. In terms of content generation, existing systems often lack flexibility and creativity, making it difficult to generate interactive content that meets user expectations. Finally, most systems lack an effective feedback mechanism and cannot self-optimize and learn based on user feedback to improve the quality of interaction.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: insufficient accuracy in user intent recognition, insufficient feature extraction and utilization, limited intelligence of the decision algorithm, insufficient personalization and creativity in content generation, and lack of system feedback optimization mechanism. Summary of the invention
[0004] The present invention provides an interactive system and method based on artificial intelligence.
[0005] In a first aspect of the present invention, there is provided an artificial intelligence-based interactive system, comprising: User intent recognition module: used to parse user input and identify user intent.
[0006] Historical data storage module: stores historical data of past human-computer interactions to provide a data basis for subsequent analysis.
[0007] Feature extraction module: extracts key features from user input and related data for algorithm analysis.
[0008] Intelligent decision-making module: uses an improved decision tree algorithm to make interactive decisions based on the extracted features.
[0009] Content generation module: Generates corresponding interactive content based on the decision results of the intelligent decision-making module.
[0010] Feedback optimization module: collects user feedback on interactive content and optimizes system performance.
[0011] Furthermore, the user intention recognition module includes the following steps: Step 1: Text input by the user Perform word segmentation to obtain word sequence ,in is the number of words, Representing word sequence The word.
[0012] Step 2: Use the pre-trained word vector model to transform the word sequence Each word in Mapping to word vectors , get the word vector sequence .
[0013] Step 3: Sequence word vectors Input into the intent classification neural network model, through the formula
[0014] Calculate the intent categories The probability of Indicates that in a given word vector sequence In the case of The probability of is the corresponding intent category output by the intent classification neural network model The score, is the total number of intent categories, and the intent category with the highest probability is finally determined as the identified user intent.
[0015] Furthermore, the historical data storage module stores the records of each interaction.
[0016] in, Indicates the number of interactions. For the User input for each interaction, For the The user intent identified by the interaction, For the The output of the interactive system.
[0017] Furthermore, the feature extraction module comprises the following steps: Step 1: Input text from the user Extract word frequency features, and the word frequency calculation formula is:
[0018] in, Expressive words When the user enters text The word frequency in Yes word In text The number of times it appears in is text The total number of times all words appear in .
[0019] Step 2: Combine the data in the historical data storage module to calculate the user input With history input The similarity feature of
[0020] in, Represents user input With history input The similarity of and Separate words On user input and history input The frequency of words in .
[0021] Furthermore, the improved decision tree algorithm of the intelligent decision module includes the following steps: Step 1: Initialize the decision tree and use all features as candidate split features.
[0022] Step 2: For each candidate split feature, select the optimal split point according to the information gain rate. The information gain rate calculation formula is:
[0023] in, It is a feature For the dataset Information gain rate
[0024] Information gain
[0025] It is a dataset Information entropy is the number of categories in the dataset, It is the first A subset of the data of the class, It is a dataset The number of samples, It is a dataset Medium Features The value is A subset of samples
[0026] It is a feature The intrinsic value of It is a feature All possible values of .
[0027] Step 3: Dataset based on optimal split point Split and generate child nodes.
[0028] Step 4: Recursively repeat steps 2 and 3 for each child node until the stopping condition is met, which includes that the node data belongs to the same category or the maximum depth is reached.
[0029] Step 5: Based on the generated decision tree, make decisions on the extracted features and obtain interactive decision results.
[0030] Furthermore, the content generation module includes the following steps: Step 1: According to the decision result of the intelligent decision module, determine the type of interactive content to be generated, and the interactive content types include text and image.
[0031] Step 2: If it is a text type, select a suitable template from the predefined text template library , combined with key information from user input , generate specific text content through text filling algorithm , the text filling formula is ,in Represents a text filling function, which is used to fill in key information Fill in template Generate specific text content in .
[0032] Furthermore, the feedback optimization module includes the following steps: Step 1: Collect user feedback on interactive content , feedback information includes user satisfaction ratings , user satisfaction rating The value range is , and text feedback content .
[0033] Step 2: Based on feedback information , if the user satisfaction score Below the set threshold, the set threshold is , adjust the relevant decision tree model parameters, and the adjustment formula is:
[0034] in, is the adjusted parameter, is the parameter before adjustment, is the learning rate, Based on feedback information The calculated loss function is the parameter gradient.
[0035] Furthermore, in the training process of the intent classification neural network model, the cross entropy loss function is used, and the loss function formula is:
[0036] in, is the cross entropy loss value, is the number of training samples, is the total number of intent categories, It is a sample Belongs to the intent category The true label of the sample Belongs to the intent category but for , otherwise , is the model prediction sample Belongs to the intent category The probability of It is a sample The corresponding word vector sequence.
[0037] Furthermore, in the decision tree generation process, a pre-pruning strategy is adopted. When the information gain rate of the node Less than the set threshold When , stop splitting the node.
[0038] In a second aspect of the present invention, there is provided an artificial intelligence-based interaction method, comprising: Parse user input and identify user intent; Extract key features from user input and related data; An improved decision tree algorithm is used to make interactive decisions based on the extracted features; Generate corresponding interactive content based on the decision results of the intelligent decision-making module; Collect user feedback on interactive content and optimize system performance.
[0039] According to the above-mentioned embodiments of the present invention, at least the following beneficial effects are achieved: the artificial intelligence interaction system of the present invention can improve the accuracy and efficiency of human-computer interaction by integrating a user intention recognition module, a historical data storage module, a feature extraction module, an intelligent decision-making module, a content generation module, and a feedback optimization module. The system uses a pre-trained word vector model and an intention classification neural network model to conduct an in-depth analysis of user input, accurately identify user intentions, and make intelligent decisions through an improved decision tree algorithm to generate interactive content that meets user needs. At the same time, the system can collect user feedback, dynamically optimize decision tree model parameters, and further improve system performance.
[0040] In addition, the feature extraction module of the system can extract key features from user input and calculate input similarity in combination with historical interaction data, providing rich contextual information for intelligent decision-making. The content generation module can select appropriate templates from the predefined template library based on the decision results, and generate specific text content in combination with key information in user input to enhance the personalization and relevance of interactive content. The feedback optimization mechanism of the system can adjust model parameters based on user satisfaction scores and text feedback content, realize self-learning and continuous optimization of the system, and thus improve user satisfaction and interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which: Figure 1 A schematic diagram of the structure of an interactive system based on artificial intelligence provided by an embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of an artificial intelligence-based interaction method provided by an embodiment of the present invention; Figure 3 The schematic diagram schematically shows the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0043] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0044] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0045] Reference below Figure 1 , Figure 1 The structure diagram of the interactive system based on artificial intelligence provided by one embodiment of the present invention is as follows. Figure 1 As shown, an artificial intelligence-based interactive system 100 includes: User intention recognition module 101: used to parse user input content and recognize user intention.
[0046] Historical data storage module 102: stores historical data of past human-computer interactions to provide a data basis for subsequent analysis.
[0047] Feature extraction module 103: extracts key features from user input and related data for algorithm analysis.
[0048] Intelligent decision module 104: uses an improved decision tree algorithm to make interactive decisions based on the extracted features.
[0049] Content generation module 105: Generates corresponding interactive content according to the decision result of the intelligent decision module.
[0050] Feedback optimization module 106: collects user feedback on interactive content and optimizes system performance.
[0051] It should be noted that the system includes a user intention recognition module, which is responsible for parsing the user's input content and identifying the user's intention. The user intention recognition module is one of the core components of the system. It determines the operation the user wants to perform or the information the user asks for by analyzing the user's input text. In this process, user intention refers to the specific needs or goals expressed by the user through input.
[0052] Specifically, the user intention recognition module includes word segmentation of the text input by the user to obtain a word sequence, where the word sequence is a set of words, each of which represents a word or phrase in the text. Word segmentation is the process of dividing continuous text into discrete vocabulary units. Then, using the pre-trained word vector model, each word is mapped to a word vector. Word vector is the process of converting words in the text into numerical vectors, which enables computers to process and analyze text data.
[0053] Preferably, when the user intent recognition module inputs the word vector sequence into the intent classification neural network model, it determines the user intent by calculating the probability of belonging to each intent category. This probability calculation formula takes into account the score of each intent category output by the neural network model, and finally selects the intent category with the highest probability as the recognition result.
[0054] Furthermore, in this process, different neural network architectures and optimization algorithms can be used to improve the accuracy of recognition. In addition, the system can also adapt to specific application scenarios by adjusting the parameters of the word vector model or selecting different pre-trained models.
[0055] In some embodiments, the user intent recognition module includes the following steps: Step 1: Text input by the user Perform word segmentation to obtain word sequence ,in is the number of words, Representing word sequence The word.
[0056] Step 2: Use the pre-trained word vector model to transform the word sequence Each word in Mapping to word vectors , get the word vector sequence .
[0057] Step 3: Sequence word vectors Input into the intent classification neural network model, through the formula
[0058] Calculate the intent categories The probability of Indicates that in a given word vector sequence In the case of The probability of is the corresponding intent category output by the intent classification neural network model The score, is the total number of intent categories, and the intent category with the highest probability is finally determined as the identified user intent.
[0059] It should be noted that this module includes three steps: first, the text input by the user is segmented, then each word is mapped to a word vector using a pre-trained word vector model, and finally the word vector sequence is input into the intent classification neural network model to calculate the probability of belonging to each intent category. Here, word segmentation refers to the process of dividing continuous natural language text into independent vocabulary units, and the pre-trained word vector model refers to a model that is pre-trained using a large amount of text data and can convert vocabulary into numerical vectors of fixed dimensions.
[0060] Specifically, in the word segmentation processing step, you can use the word segmentation algorithm in the natural language processing library, such as jieba word segmentation (for Chinese) or NLTK word segmentation (for English), to segment the text entered by the user into word sequences. The pre-trained word vector model can be Word2Vec, GloVe, or BERT, etc. These models can convert each word into a vector in a high-dimensional space, preserving the semantic relationship between words. In the intent classification neural network model, you can use structures such as multi-layer perceptron (MLP) or convolutional neural network (CNN), the input is a word vector sequence, and the output is the probability of belonging to each intent category.
[0061] Preferably, for word segmentation processing, different word segmentation tools and parameter settings can be selected according to the characteristics of different languages and fields. For example, for Chinese text, the word segmentation algorithm can be set to identify the most appropriate vocabulary boundaries. For pre-trained word vector models, the pre-trained model most relevant to the application field can be selected, or the model can be fine-tuned as needed to better adapt to a specific data set.
[0062] Furthermore, in the training process of the intent classification neural network model, cross-validation and hyperparameter optimization techniques can be used to determine the optimal network structure and parameters to improve the generalization ability of the model. In addition, ensemble learning methods such as random forests or gradient boosting machines can also be considered to further improve the accuracy of intent recognition.
[0063] In some embodiments, the historical data storage module stores a record of each interaction
[0064] in, Indicates the number of interactions. For the User input for each interaction, For the The user intent identified by the interaction, For the The output of the interactive system.
[0065] It should be noted that this module is responsible for storing records of each human-computer interaction, including user input, recognized user intent, and system output. Here, interaction records refer to all data generated by the system during communication with users, which are used to analyze user behavior and optimize system performance. The historical data storage module is an important part of the system. It saves all past interaction data and provides a basis for subsequent data analysis and feature extraction.
[0066] Specifically, the historical data storage module can be implemented using a database system, in which the record of each interaction consists of a triple (user input, user intent, system output). User input refers to the information provided by the user when interacting with the system, user intent is the user's intent identified by the system, and system output is the response generated by the system based on the user's intent. The database can be a relational database such as MySQL, or a non-relational database such as MongoDB. The specific choice depends on the data structure and query requirements. In the database, a unique identifier can be set for each interaction record to facilitate retrieval and management.
[0067] Preferably, the historical data storage module can be further refined to include data encryption and backup mechanisms to ensure data security and reliability. For data encryption, algorithms such as AES or RSA can be used to protect the stored data from unauthorized access. The backup mechanism can back up the database regularly to prevent data loss or damage.
[0068] Furthermore, the automatic cleaning and archiving of data can be realized to optimize the use of storage space. When storing data, you can also consider using data compression technology to reduce the storage space occupied while ensuring fast data reading. For the selection of databases, in addition to traditional relational and non-relational databases, you can also consider using time series databases or graph databases, especially when the interactive data has time series characteristics or complex associations.
[0069] In some embodiments, the feature extraction module comprises the following steps: Step 1: Input text from the user Extract word frequency features, and the word frequency calculation formula is:
[0070] in, Expressive words When the user enters text The word frequency in Yes word In text The number of times it appears in is text The total number of times all words appear in .
[0071] Step 2: Combine the data in the historical data storage module to calculate the user input With history input The similarity feature of
[0072] in, Represents user input With history input The similarity of and Separate words On user input and history input The frequency of words in .
[0073] It should be noted that this module involves extracting word frequency features from user input text and calculating the similarity features between user input and historical input in combination with the data in the historical data storage module. Here, word frequency features refer to the number of times each word appears in the text, while similarity features refer to the similarity measure between the new user input and the historical input in terms of vocabulary usage. These features are crucial for understanding the user's input content and identifying their intentions.
[0074] Specifically, the feature extraction module first extracts word frequency features from the user input text. Word frequency refers to the number of times a specific word appears in the text, which can be calculated by counting the frequency of each word. The calculation formula is: word frequency (word, text) = the number of times the word appears in the text / the total number of times all words appear in the text. Then, combined with the data in the historical data storage module, the similarity features between the user input and the historical input are calculated. This can be achieved by comparing the difference between the word frequency in the new user input and the corresponding word frequency in the historical data. The similarity calculation formula involves comparing the word frequency of each word and calculating the similarity between the two.
[0075] Preferably, the operation steps of the feature extraction module can be further refined. For example, when extracting word frequency features, a threshold can be set to ignore words with very few occurrences to reduce the impact of noise. When calculating similarity features, more complex similarity calculation methods such as cosine similarity can be used, which can better capture the similarity between word frequency vectors.
[0076] Furthermore, machine learning methods, such as random forests or support vector machines, can be introduced to learn from these features and predict user intent. For similarity calculation, a machine learning model can be considered to identify and weight the importance of different words, thereby more accurately reflecting the similarity between user input and historical input.
[0077] In some embodiments, the improved decision tree algorithm of the intelligent decision module includes the following steps: Step 1: Initialize the decision tree and use all features as candidate split features.
[0078] Step 2: For each candidate split feature, select the optimal split point according to the information gain rate. The information gain rate calculation formula is:
[0079] in, It is a feature For the dataset Information gain rate
[0080] Information gain
[0081] It is a dataset Information entropy is the number of categories in the dataset, It is the first A subset of the data of the class, It is a dataset The number of samples, It is a dataset Medium Features The value is A subset of samples
[0082] It is a feature The intrinsic value of It is a feature All possible values of .
[0083] Step 3: Dataset based on optimal split point Split and generate child nodes.
[0084] Step 4: Recursively repeat steps 2 and 3 for each child node until the stopping condition is met, which includes that the node data belongs to the same category or the maximum depth is reached.
[0085] Step 5: Based on the generated decision tree, make decisions on the extracted features and obtain interactive decision results.
[0086] It should be noted that this module uses an improved decision tree algorithm to make interactive decisions based on the extracted features. The decision tree algorithm mentioned here is a commonly used classification algorithm that predicts the category of unknown data by learning data features and decision rules. In this system, the decision tree is used to make the most appropriate interactive decision based on the features input by the user.
[0087] Specifically, the improved decision tree algorithm includes initializing the decision tree, taking all features as candidate split features, and selecting the optimal split point based on the information gain rate. The information gain rate is an important indicator to measure the classification ability of a feature for a data set, which is calculated by comparing the information entropy before and after the feature split. The calculation formula of the information gain rate involves the information entropy of the data set and the intrinsic value of the feature. These parameters can be set according to the specific characteristics and category distribution of the data set. In actual operation, the algorithm recursively repeats the steps of selecting the optimal split point and splitting the data set for each child node until the stopping condition is met, such as the node data belongs to the same category or the maximum depth is reached.
[0088] Preferably, the operation steps of the intelligent decision module can be further refined or alternatives can be provided. For example, when initializing the decision tree, different strategies can be used to select the initial feature set, such as the random forest method or the ranking based on feature importance. When selecting the optimal split point, in addition to the information gain rate, other indicators such as Gini impurity or mean square error can also be considered to evaluate the split effect.
[0089] Furthermore, during the recursive splitting process, different stopping conditions can be set, such as the minimum number of samples or the maximum depth limit, to prevent overfitting. In addition, regularization techniques can be introduced to control model complexity, or ensemble learning methods such as gradient boosting trees can be used to improve the stability and accuracy of decision trees.
[0090] In some embodiments, the content generation module includes the following steps: Step 1: According to the decision result of the intelligent decision module, determine the type of interactive content to be generated, and the interactive content types include text and image.
[0091] Step 2: If it is a text type, select a suitable template from the predefined text template library , combined with key information from user input , generate specific text content through text filling algorithm , the text filling formula is ,in Represents a text filling function, which is used to fill in key information Fill in template Generate specific text content in .
[0092] It should be noted that this module is responsible for determining the type of interactive content to be generated based on the decision results of the intelligent decision module, and selecting a suitable template from the predefined template library to generate specific content. Here, the content generation module refers to the part of the system that creates user-understandable output based on the decision results, while the interactive content type refers to the form of the output, such as text or image.
[0093] Specifically, the content generation module first determines the type of interactive content based on the output of the intelligent decision module. If the decision result indicates that text-type interactive content needs to be generated, the module will select a suitable template from the predefined text template library. The text template library is a set of pre-designed text frameworks that can be customized according to different interactive scenarios and needs. Then, combined with the key information in the user input, the specific text content is generated through the text filling algorithm. The text filling algorithm is a method of inserting specific information into the template to form a complete sentence or paragraph.
[0094] Preferably, the operation steps of the content generation module can be further refined. For example, when determining the interactive content type, a series of rules can be set or a machine learning model can be used to automatically determine the most appropriate content type. When selecting a template, the template selection process can be optimized based on the user's historical interaction data and current context information. In the text filling algorithm, natural language processing techniques such as conditional random fields (CRF) or sequence-to-sequence models (Seq2Seq) can be used to more naturally integrate key information into the template.
[0095] Furthermore, we can also consider using machine learning technology to continuously optimize the template library to make it closer to the actual needs and preferences of users. For the generation of image content, we can integrate image processing and computer vision technologies, such as generative adversarial networks (GANs) or variational autoencoders (VAEs), to create or modify image content.
[0096] In some embodiments, the feedback optimization module includes the following steps: Step 1: Collect user feedback on interactive content , feedback information includes user satisfaction ratings , user satisfaction rating The value range is , and text feedback content .
[0097] Step 2: Based on feedback information , if the user satisfaction score Below the set threshold, the set threshold is , adjust the relevant decision tree model parameters, and the adjustment formula is:
[0098] in, is the adjusted parameter, is the parameter before adjustment, is the learning rate, Based on feedback information The calculated loss function is the parameter gradient.
[0099] It should be noted that this module involves collecting user feedback on interactive content and optimizing system performance based on this feedback. Here, feedback information refers to the user's direct response to the interactive content generated by the system, including satisfaction ratings and text feedback content. User satisfaction rating is a quantitative indicator used to measure the user's satisfaction with the interactive content.
[0100] Specifically, the feedback optimization module first collects user feedback on the interactive content, which includes user satisfaction ratings and text feedback content. The user satisfaction rating is a rating system from 1 to 5, where 1 means very dissatisfied and 5 means very satisfied. The text feedback content can be the user's specific comments or suggestions on the interactive content. Based on this feedback information, if the user satisfaction rating is lower than the set threshold, such as 3, the system will adjust the relevant decision tree model parameters. The set threshold here is a preset standard used to determine when the system needs to be adjusted based on user feedback.
[0101] Preferably, the operation steps of the feedback optimization module can be further refined. For example, when collecting feedback information, an online survey or an automatically popped-up rating window can be used to obtain user satisfaction ratings and text feedback. In the parameter adjustment process, a gradient descent algorithm can be used to update the parameters of the decision tree model, where the learning rate is a key hyperparameter that controls the step size of the parameter update.
[0102] Furthermore, advanced machine learning techniques, such as reinforcement learning, can be introduced to automatically adjust system parameters to better adapt to user feedback. A feedback analysis engine can also be set up to automatically identify keywords and sentiment in user feedback, thereby more accurately guiding system optimization. For text feedback content, natural language processing techniques, such as sentiment analysis, can be applied to evaluate users' emotional reactions and adjust system response strategies accordingly.
[0103] In some embodiments, during the training of the intent classification neural network model, a cross entropy loss function is used, and the loss function formula is:
[0104] in, is the cross entropy loss value, is the number of training samples, is the total number of intent categories, It is a sample Belongs to the intent category The true label of the sample Belongs to the intent category but for , otherwise , is the model prediction sample Belongs to the intent category The probability of It is a sample The corresponding word vector sequence.
[0105] It should be noted that this module involves the use of the cross entropy loss function in the training process of the intent classification neural network model. Here, the cross entropy loss function is an indicator that measures the difference between the model's predicted probability distribution and the true label probability distribution. It is often used in classification problems, especially in the training process of neural networks. It guides the learning of the model by calculating the difference between the predicted probability and the actual label.
[0106] Specifically, the calculation of the cross entropy loss function involves the number of training samples, the total number of intent categories, the true label of the sample belonging to the intent category, and the probability that the model predicts that the sample belongs to the intent category. In this process, the true label can be represented by one-hot encoding, that is, if the sample belongs to intent category i, the i-th element in its label vector is 1, and the rest are 0. The probability predicted by the model is the activation value of the output layer of the neural network, which is usually converted by the softmax function. The specific calculation formula of the loss function involves the sum of all samples and all categories, as well as logarithmic operations.
[0107] Preferably, the operation steps of the intent classification neural network model training can be further refined. For example, when setting the training parameters, you can choose a suitable learning rate and batch size, which will affect the convergence speed and stability of the model. The learning rate determines the magnitude of the parameter update in each iteration, while the batch size determines the number of samples used each time the parameters are updated.
[0108] Furthermore, regularization techniques such as L1 or L2 regularization can be used to prevent model overfitting. In terms of model structure selection, different types of neural network structures such as convolutional neural network (CNN) or recurrent neural network (RNN) can be considered to adapt to different input data characteristics. For optimization algorithms, in addition to the commonly used stochastic gradient descent (SGD), more advanced optimizers such as Adam or RMSprop can also be considered to speed up the model training process and improve performance.
[0109] In some embodiments, during the decision tree generation process, a pre-pruning strategy is adopted. When the information gain rate of a node is Less than the set threshold When , stop splitting the node.
[0110] It should be noted that this module involves the use of a pre-pruning strategy in the decision tree generation process. Here, the pre-pruning strategy is a technique used to prevent overfitting when building a decision tree, which is achieved by stopping splitting before the tree is fully grown. This method helps improve the generalization ability of the model and avoids reducing the performance of the model on new data due to overfitting the training data.
[0111] Specifically, the application of the pre-pruning strategy in the decision tree generation process includes stopping the splitting of the node when the information gain rate of the node is less than the set threshold. The information gain rate is an important indicator to measure the classification ability of a feature for a data set. It is calculated by comparing the information entropy before and after the feature split. The set threshold is a predetermined value used to control the growth of the decision tree and prevent the tree from becoming too complex. In actual operation, when the calculated information gain rate is lower than this threshold, the algorithm will no longer split the current node further.
[0112] Preferably, the operation steps of the pre-pruning strategy can be further refined. For example, when setting the threshold of the information gain rate, the optimal threshold can be determined based on the performance on the validation set to balance the complexity and accuracy of the model. In addition, cross-validation can be introduced to more robustly evaluate the model performance under different threshold settings. In the process of building a decision tree, different splitting criteria, such as Gini impurity or mean square error, can be considered to increase the robustness of the model.
[0113] Furthermore, as an alternative to pre-pruning, we can consider a post-pruning strategy, which is to let the decision tree grow completely first, and then prune from the bottom according to the performance index. We can also consider using cost complexity pruning, which is a method that combines the advantages of pre-pruning and post-pruning by introducing a penalty term to balance the complexity of the tree and the fit of the training data.
[0114] The above-mentioned embodiments of the present invention have the following beneficial effects: the artificial intelligence-based interactive system described in the present invention can provide a highly integrated solution to enhance the intelligent level of human-computer interaction. The system accurately analyzes user input through the user intention recognition module, uses the historical data storage module to provide a data basis for algorithm analysis, the feature extraction module extracts key features from user input, the intelligent decision module uses an improved decision tree algorithm to make interactive decisions, the content generation module generates corresponding interactive content based on the decision results, and the feedback optimization module collects user feedback to optimize system performance. This comprehensive approach can ensure that the system is more efficient and accurate in understanding user needs and providing appropriate responses.
[0115] In addition, the design of the system allows the use of cross entropy loss function when training the user intention recognition module, and the intelligent decision module adopts a pre-pruning strategy in the decision tree generation process. The application of these technologies can improve the training efficiency of the model and the generalization ability of the decision tree. Through the application of these technologies, the system can not only reduce the risk of overfitting, but also maintain high adaptability and accuracy when processing new user input, thereby providing a more stable and reliable interactive experience in practical applications.
[0116] like Figure 2 As shown, an artificial intelligence-based interaction method 200 of some embodiments includes: Step 201, parsing user input content and identifying user intent; Step 202, extracting key features from user input and related data; Step 203, using an improved decision tree algorithm to make interactive decisions based on the extracted features; Step 204, generating corresponding interactive content according to the decision result of the intelligent decision module; Step 205: Collect user feedback on the interactive content to optimize system performance.
[0117] It is understandable that the steps described in the artificial intelligence-based interaction method 200 are similar to those described in the reference Figure 1 Therefore, the modules, features and beneficial effects described above for the interactive system based on artificial intelligence are also applicable to the interactive method 200 based on artificial intelligence and the operations contained therein, and will not be repeated here.
[0118] Reference below Figure 3, which shows a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present invention. The electronic devices in some embodiments of the present invention may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0119] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0120] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0121] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0122] The above descriptions are only some preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. An interactive system based on artificial intelligence, characterized in that: include: User intention recognition module, used to parse user input content and identify user intention; Historical data storage module, storing historical data of past human-computer interactions; Feature extraction module, which extracts key features from user input and related data for algorithm analysis; Intelligent decision-making module, which uses an improved decision tree algorithm to make interactive decisions based on the extracted features; The content generation module generates corresponding interactive content according to the decision results of the intelligent decision module; The feedback optimization module collects user feedback on the interactive content and optimizes system performance; wherein the user intention recognition module includes the following steps: Step 1: Text input by the user Perform word segmentation to obtain word sequence ,in, is the number of words, Representing word sequence The words; Step 2: Use the pre-trained word vector model to transform the word sequence Each word in Mapping to word vectors , get the word vector sequence ; Step 3: Sequence word vectors Input into the intent classification neural network model to calculate the intent categories The probability is: in, Indicates that in a given word vector sequence In the case of The probability of is the corresponding intent category output by the intent classification neural network model The score, is the total number of intent categories, and the intent category with the highest probability is finally determined as the identified user intent.
2. The artificial intelligence-based interactive system according to claim 1, characterized in that: The historical data storage module stores the record of each interaction as: in, Indicates the number of interactions. For the User input for each interaction, For the The user intent identified by the interaction, For the The output of the interactive system.
3. The artificial intelligence-based interactive system according to claim 2, characterized in that: The feature extraction module comprises the following steps: Step 1: Input text from the user Extract word frequency features, and the word frequency calculation formula is: in, Expressive words When the user enters text The word frequency in Yes word In text The number of times it appears in is text The total number of times all words appear in ; Step 2: Combine the data in the historical data storage module to calculate the user input With history input The similarity feature of , the similarity calculation formula is: in, Represents user input With history input The similarity of and Separate words On user input and history input The frequency of words in .
4. The artificial intelligence-based interactive system according to claim 3, characterized in that: The improved decision tree algorithm of the intelligent decision module comprises the following steps: Step 1: Initialize the decision tree and use all features as candidate split features; Step 2: For each candidate split feature, select the optimal split point according to the information gain rate. The information gain rate calculation formula is: in, It is a feature For the dataset The information gain rate of ; in, It is a dataset The information entropy of is the number of categories in the dataset, It is the first A subset of the data of the class, It is a dataset The number of samples, It is a dataset Medium Features The value is A subset of samples; in, It is a feature The intrinsic value of It is a feature All possible values of ; Step 3: Split the data set according to the optimal split point Split and generate child nodes; Step 4: Recursively repeat steps 2 and 3 for each child node until the stopping condition is met. The stopping condition includes that the node data belongs to the same category or reaches the maximum depth; Step 5: Based on the generated decision tree, make decisions on the extracted features and obtain interactive decision results.
5. The artificial intelligence-based interactive system according to claim 4, characterized in that: The content generation module comprises the following steps: Step 1: According to the decision result of the intelligent decision module, determine the type of interactive content to be generated, and the interactive content type includes text and image; Step 2: If it is a text type, select a suitable template from the predefined text template library , combined with key information from user input , generate specific text content through text filling algorithm , the text filling formula is ,in Represents a text filling function, which is used to fill in key information Fill in template Generate specific text content in .
6. The artificial intelligence-based interactive system according to claim 5, characterized in that: The feedback optimization module includes the following steps: Step 1: Collect user feedback on interactive content , feedback information includes user satisfaction ratings , user satisfaction rating The value range is , and text feedback content ; Step 2: Based on feedback information , if the user satisfaction score Below the set threshold, the set threshold is , adjust the relevant decision tree model parameters, and the adjustment formula is: in, is the adjusted parameter, is the parameter before adjustment, is the learning rate, Based on feedback information The calculated loss function is the parameter gradient.
7. The artificial intelligence-based interactive system according to claim 6, characterized in that: In the training process of the intent classification neural network model, the cross entropy loss function is used, and the loss function formula is: in, is the cross entropy loss value, is the number of training samples, is the total number of intent categories, It is a sample Belongs to the intent category The true label of the sample Belongs to the intent category but for , otherwise , is the model prediction sample Belongs to the intent category The probability of It is a sample The corresponding word vector sequence.
8. The artificial intelligence-based interactive system according to claim 7, characterized in that: In the decision tree generation process, the pre-pruning strategy is adopted. When the information gain rate of the node Less than the set threshold When , stop splitting the node.
9. An interactive method based on artificial intelligence, characterized in that: include: Parse user input and identify user intent; Extract key features from user input and related data; An improved decision tree algorithm is used to make interactive decisions based on the extracted features; Generate corresponding interactive content based on the decision results of the intelligent decision-making module; Collect user feedback on interactive content and optimize system performance.
Citation Information
Patent Citations
Man-machine multi-round dialogue method oriented to travel field
CN109063035A
Natural language understanding method and device fusing dialogue context information
CN116542256A
Construction method of multi-modal user mental perception question and answer model
CN117033602A
Natural language processing method and system based on machine learning
CN117493491A
Intelligent finance and tax question answering method based on artificial intelligence question answering system
CN119106122A