Embedded AI intelligent dialogue method and system and storage medium

By training the optimal dialogue model in AI voice assistant and combining natural language processing technology, the limitations of existing systems in processing complex business data and providing personalized answers are solved, efficient and intelligent information interaction is achieved, and the system is improved response speed and answer quality.

CN119166867APending Publication Date: 2024-12-20SHANGHAI YISHUPAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411238557.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing query systems are difficult to balance ease of use and flexibility, and cannot meet the needs of enterprises for efficient information query and intelligent data processing, especially in processing complex business data and providing personalized answers.

Method used

By obtaining the application scenarios in the embedded environment of AI voice assistants, determining the AI ​​dialogue feature data library, training the optimal AI dialogue model, and combining natural language processing technology, extracting content features and intention features, generating target dialogue content information, and realizing Efficient and intelligent information interaction.

Benefits of technology

It realizes accurate identification and correlation extraction of complex business queries, improves system response speed and answer quality, and meets the enterprise's efficient, intelligent and flexible information interaction needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166867A_ABST
    Figure CN119166867A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded AI intelligent dialogue method and system and a storage medium, and relates to the technical field of AIs, and the method comprises the steps: obtaining a plurality of application scenes; determining a comprehensive dialogue feature data type library; determining a specific feature data type library in the application scene; dialogue data in each application scene is determined to serve as a scene verification database; determining a model training set and a model verification set; training at least one preliminary AI dialogue model; determining an optimal AI dialogue model; setting a trigger feature word in each application scene; obtaining content features and intention features; inputting the content features into the optimal AI dialogue model to obtain AI feedback content information; obtaining an intention application scene of the dialogue statement; and extracting AI feedback content information as target dialogue content information. The method has the advantages that through the advanced machine learning algorithm and the natural language processing technology, the information interaction efficiency can be remarkably improved, the AI dialogue process is optimized, and the user experience is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of AI technology, and in particular to an embedded AI intelligent dialogue method, system and storage medium. Background Art

[0002] With the rapid development and popularization of artificial intelligence technology, more and more companies are beginning to apply artificial intelligence technology to improve business efficiency and customer experience. In various business scenarios, companies often need to obtain key information from their internal databases and hope to interact with this information in the form of natural language. However, existing solutions often find it difficult to balance ease of use and flexibility, and cannot meet the needs of companies for efficient information query and intelligent data processing.

[0003] Traditional query systems usually rely on fixed query statements and predefined rules. Operators need to have a certain technical background to accurately construct query requests. This not only increases the learning cost of operators, but also limits the efficiency of obtaining and processing business data. Especially in the context of ever-changing and complex business data, traditional query systems are difficult to quickly respond to the dynamic needs of operators.

[0004] To overcome these challenges, some intelligent conversational robots have gradually emerged in the market, which can be embedded in web pages and allow users to query through natural language. However, these conversational robots still have certain limitations in processing complex business data and providing personalized answers, and cannot fully meet the needs of enterprises for efficient, intelligent and flexible information interaction. Summary of the invention

[0005] In order to solve the above technical problems, an embedded AI intelligent dialogue method, system and storage medium are provided. This technical solution solves the above-mentioned problem that there are still certain limitations in processing complex business data and providing personalized answers, and cannot fully meet the company's needs for efficient, intelligent and flexible information interaction.

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0007] An embedded AI intelligent dialogue method, comprising:

[0008] Obtain several application scenarios in the embedded environment of AI voice assistant;

[0009] Determine the AI ​​dialogue feature data type library for each application scenario;

[0010] The union of AI dialogue feature data type libraries in all application scenarios is used as the comprehensive dialogue feature data type library;

[0011] The intersection of the AI ​​dialogue feature data type library and the comprehensive dialogue feature data type library in each application scenario is used as the specific feature data type library in the application scenario;

[0012] All conversation data in all application scenarios are used as the total training database, and the conversation data in each application scenario is used as the scenario verification database;

[0013] Determine a model training set and a model verification set from the total training database and the scenario verification database respectively;

[0014] Based on the comprehensive dialogue feature data library, train at least one preliminary AI dialogue model;

[0015] Determine the optimal AI dialogue model from all preliminary AI dialogue models based on a database of specific feature data types in all application scenarios;

[0016] Set trigger feature words for each application scenario;

[0017] Obtain input dialogue sentences, perform feature extraction on the dialogue sentences, and obtain content features and intention features;

[0018] Input content features into the optimal AI dialogue model to obtain AI feedback content information;

[0019] Match the intention feature with the trigger feature words in each application scenario to obtain the intention application scenario of the dialogue sentence;

[0020] Based on the intended application scenario of the dialogue sentence, several pieces of AI feedback content information corresponding to the specific feature data type library are extracted from the AI ​​feedback content information as the target dialogue content information, and the target dialogue content information is fed back and output.

[0021] Preferably, determining the model training set and the model verification set from the total training database and the scenario verification database respectively specifically includes:

[0022] Randomly select N data from the total training database to form a model training set;

[0023] Based on the total number of data in each scenario verification database, the number of verification data selected from each scenario verification database is determined by a verification allocation algorithm;

[0024] Based on the number of verification data, a corresponding number of data are randomly selected from each scenario verification database to form a model verification set.

[0025] Preferably, the formula of the verification allocation algorithm is:

[0026]

[0027] Among them, N i ' is the number of verification data selected from the i-th scene verification database, N i is the total number of data in the verification database for the i-th scenario, and n is the total number of application scenarios in the embedded environment.

[0028] Preferably, the training of at least one preliminary AI dialogue model based on the comprehensive dialogue feature data type library specifically includes:

[0029] Based on the cross entropy loss function, as the loss value function in the AI ​​dialogue model training process, it is denoted as L(θ);

[0030] Introduce a regularization term into the loss function during the AI ​​dialogue model training process to obtain a regularized loss function, denoted as L'(θ);

[0031] Among them, the regularized loss value function is specifically:

[0032]

[0033] Among them, L is the coefficient of the regularization term, θ j is the jth parameter of the neural network;

[0034] Determine several values ​​of the coefficient of the regularization term and obtain several different regularization loss value functions;

[0035] Based on each regularized loss value function, a preliminary AI dialogue model is obtained by training the total training database. The preliminary AI dialogue model takes dialogue sentences as input and takes feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library as output.

[0036] Preferably, the several values ​​of the coefficient of the regularization term are specifically determined as follows:

[0037] Set the search range and search step of L, and select several values ​​from the search range of L based on the search step of L to form a set of candidate values ​​of L;

[0038] Divide the model training set into m mutually exclusive training subsets;

[0039] Select one of the m training subsets as the test set, and combine the remaining training subsets into the first training set;

[0040] Based on the regularized loss function generated by the candidate value of L, a first validation model is trained by a neural network using the first training set;

[0041] Use the loss function to evaluate the loss value of the first validation model on the test set, which is recorded as the loss performance of the candidate value of L on the test set;

[0042] Calculate the loss performance of the candidate value of L for each training subset as the test set, and find the average value to obtain the comprehensive loss performance of the candidate value of L;

[0043] At least one candidate value of L whose comprehensive loss performance is within a preset loss value range is screened out as the value of the coefficient of the regularization term.

[0044] Preferably, the determining of the optimal AI dialogue model from all preliminary AI dialogue models based on the specific feature data type library in all application scenarios specifically includes:

[0045] Classify the data in the model validation set according to the application scenario;

[0046] Input the dialogue sentences in the model verification set into the preliminary AI dialogue model respectively, and obtain the feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model;

[0047] According to the classification of the model verification data, the feature data values ​​of all the dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model are extracted, and the feature data values ​​of all the dialogue feature data types in the specific feature data type library under the application scenario are used as the model specific output data;

[0048] Based on the model-specific output data and the actual output data in the model validation set, the loss value of the preliminary AI dialogue model on the model validation set is calculated using the loss value function;

[0049] The preliminary AI dialogue model with the smallest loss value is selected as the optimal AI dialogue model.

[0050] Furthermore, an embedded AI intelligent dialogue system is proposed, which is used to implement the above-mentioned embedded AI intelligent dialogue method, including:

[0051] A scenario analysis module, which is used to obtain several application scenarios in the embedded environment of the AI ​​voice assistant;

[0052] A data feature analysis module, the data feature analysis module is electrically connected to the scenario analysis module, and the data feature analysis module is used to determine the AI ​​dialogue feature data type library under each application scenario, and use the union of the AI ​​dialogue feature data type libraries under all application scenarios as the comprehensive dialogue feature data type library, and use the intersection of the AI ​​dialogue feature data type library under each application scenario and the comprehensive dialogue feature data type library as the specific feature data type library under the application scenario;

[0053] A model training module, wherein the model training module is used to use all dialogue data in all application scenarios as a total training database, use the dialogue data in each application scenario as a scenario verification database, determine a model training set and a model verification set from the total training database and the scenario verification database respectively, train at least one preliminary AI dialogue model based on a comprehensive dialogue feature data type library, and determine an optimal AI dialogue model from all preliminary AI dialogue models based on a specific feature data type library in all application scenarios;

[0054] A dialogue analysis module, which is used to set trigger feature words in each application scenario, obtain input dialogue sentences, perform feature extraction on the dialogue sentences, and obtain content features and intention features;

[0055] The AI ​​dialogue module is electrically connected to the dialogue analysis module and the model training module, and the AI ​​dialogue unit is used to input content features into the optimal AI dialogue model, obtain AI feedback content information, match the intention features with the trigger feature words in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract a number of AI feedback content information corresponding to a specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback and output the target dialogue content information.

[0056] Optionally, the model training module includes:

[0057] A model training data determination unit, the model training data determination unit is used to determine a model training set and a model verification set from a total training database and a scenario verification database respectively;

[0058] A training unit, the training unit being used to train at least one preliminary AI dialogue model based on the comprehensive dialogue feature data type library;

[0059] A screening unit is used to determine the optimal AI dialogue model from all preliminary AI dialogue models based on a library of specific feature data types in all application scenarios.

[0060] Optionally, the AI ​​dialogue module includes:

[0061] An AI generation unit, the AI ​​generation unit being used to input content features into an optimal AI dialogue model to obtain AI feedback content information;

[0062] A scene matching unit, wherein the scene matching unit is used to match the intention feature with the trigger feature word in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract a number of AI feedback content information corresponding to a specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback output the target dialogue content information.

[0063] Compared with the prior art, the present invention has the following beneficial effects:

[0064] The present invention uses the AI ​​question-answering scenario embedded in the environment to specifically train the optimal AI dialogue model that is compatible with the embedded environment, which is used to retrieve all relevant content features in the database for the operator's question content, and through the large model's advanced natural language processing technology, it can accurately identify the operator's question intention and extract relevant content features from all relevant content features. This technology enables the dialogue robot to handle complex business query requirements and generate corresponding database query statements to ensure the accuracy and relevance of the query results. At the same time, the present invention integrates an efficient data processing algorithm, which can quickly extract relevant business data from the database, and perform intelligent processing and polishing to generate natural language answers. This technology realizes efficient data processing and natural language generation, improving the system's response speed and answer quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 This is a flow chart of the embedded AI intelligent dialogue method proposed by the present invention;

[0066] Figure 2 A flow chart of a method for determining a model training set and a model validation set in the present invention;

[0067] Figure 3 A flowchart of a method for training at least one preliminary AI dialogue model in the present invention;

[0068] Figure 4 A flow chart of a method for determining several values ​​of coefficients of regularization terms in the present invention;

[0069] Figure 5 This is a flow chart of the method for determining the optimal AI dialogue model in the present invention;

[0070] Figure 6 This is a structural block diagram of the embedded AI intelligent dialogue system proposed by the present invention;

[0071] Figure 7 It is a schematic diagram of the computer-readable storage medium structure of the present invention. DETAILED DESCRIPTION

[0072] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.

[0073] Reference Figure 1 As shown, an embedded AI intelligent dialogue method includes:

[0074] Obtain several application scenarios in the embedded environment of AI voice assistant;

[0075] Determine the AI ​​dialogue feature data type library for each application scenario;

[0076] The union of AI dialogue feature data type libraries in all application scenarios is used as the comprehensive dialogue feature data type library;

[0077] The intersection of the AI ​​dialogue feature data type library and the comprehensive dialogue feature data type library in each application scenario is used as the specific feature data type library in the application scenario;

[0078] All conversation data in all application scenarios are used as the total training database, and the conversation data in each application scenario is used as the scenario verification database;

[0079] Determine a model training set and a model verification set from the total training database and the scenario verification database respectively;

[0080] Based on the comprehensive dialogue feature data library, train at least one preliminary AI dialogue model;

[0081] Determine the optimal AI dialogue model from all preliminary AI dialogue models based on a database of specific feature data types in all application scenarios;

[0082] Set trigger feature words for each application scenario;

[0083] Obtain input dialogue sentences, perform feature extraction on the dialogue sentences, and obtain content features and intention features;

[0084] Input content features into the optimal AI dialogue model to obtain AI feedback content information;

[0085] Match the intention feature with the trigger feature words in each application scenario to obtain the intention application scenario of the dialogue sentence;

[0086] Based on the intended application scenario of the dialogue sentence, several pieces of AI feedback content information corresponding to the specific feature data type library are extracted from the AI ​​feedback content information as the target dialogue content information, and the target dialogue content information is fed back and output.

[0087] The present invention uses the AI ​​question-answering scenario embedded in the environment to specifically train the optimal AI dialogue model that is compatible with the embedded environment, which is used to retrieve all relevant content features in the database for the operator's question content, and through the large model's advanced natural language processing technology, it can accurately identify the operator's question intention and extract relevant content features from all relevant content features. This technology enables the dialogue robot to handle complex business query requirements and generate corresponding database query statements to ensure the accuracy and relevance of the query results.

[0088] Reference Figure 2 As shown, the model training set and the model verification set are determined from the total training database and the scenario verification database respectively, specifically including:

[0089] Randomly select N data from the total training database to form a model training set;

[0090] Based on the total number of data in each scenario verification database, the number of verification data selected from each scenario verification database is determined by a verification allocation algorithm;

[0091] Based on the number of verification data, a corresponding number of data are randomly selected from each scenario verification database to form a model verification set.

[0092] The formula for the verification allocation algorithm is:

[0093]

[0094] Among them, N i ' is the number of verification data selected from the i-th scene verification database, N i is the total number of data in the verification database for the i-th scenario, and n is the total number of application scenarios in the embedded environment.

[0095] Reference Figure 3 As shown, based on the comprehensive dialogue feature data library, training at least one preliminary AI dialogue model specifically includes:

[0096] Based on the cross entropy loss function, as the loss value function in the AI ​​dialogue model training process, it is denoted as L(θ);

[0097] Introduce a regularization term into the loss function during the AI ​​dialogue model training process to obtain a regularized loss function, denoted as L'(θ);

[0098] Among them, the regularization loss value function is specifically:

[0099]

[0100] Among them, L is the coefficient of the regularization term, θ j is the jth parameter of the neural network;

[0101] Determine several values ​​of the coefficient of the regularization term and obtain several different regularization loss value functions;

[0102] Based on each regularized loss value function, a preliminary AI dialogue model is obtained by training the total training database. The preliminary AI dialogue model takes dialogue sentences as input and takes feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library as output.

[0103] Reference Figure 4 As shown, several values ​​of the coefficients of the regularization term are specifically determined as follows:

[0104] Set the search range and search step of L, and select several values ​​from the search range of L based on the search step of L to form a set of candidate values ​​of L;

[0105] Divide the model training set into m mutually exclusive training subsets;

[0106] Select one of the m training subsets as the test set, and combine the remaining training subsets into the first training set;

[0107] Based on the regularized loss function generated by the candidate value of L, a first validation model is trained by a neural network using the first training set;

[0108] Use the loss function to evaluate the loss value of the first validation model on the test set, which is recorded as the loss performance of the candidate value of L on the test set;

[0109] Calculate the loss performance of the candidate value of L for each training subset as the test set, and find the average value to obtain the comprehensive loss performance of the candidate value of L;

[0110] At least one candidate value of L whose comprehensive loss performance is within a preset loss value range is screened out as the value of the coefficient of the regularization term.

[0111] In the regularized loss value function, the regularization coefficient is added to the loss function as a regularization term. This regularization term is a constraint or penalty on the model parameters, which aims to reduce the complexity of the model. Therefore, the size of the regularization coefficient will directly affect the value of the loss function. When the regularization coefficient is small, the model complexity is relatively high, and overfitting may be more likely to occur. At this time, the loss value may be very low on the training set, but may be high on the validation set or test set. In this solution, multiple regularization coefficients are pre-set to obtain multiple regularization loss functions. The loss performance of the candidate model trained by each regularization loss function on the validation set is used to determine the coefficients of multiple regularization terms that initially meet the needs, and perform preliminary training of the AI ​​dialogue model.

[0112] Reference Figure 5As shown in the figure, based on the specific feature data type library in all application scenarios, the optimal AI dialogue model is determined from all preliminary AI dialogue models, including:

[0113] Classify the data in the model validation set according to the application scenario;

[0114] Input the dialogue sentences in the model verification set into the preliminary AI dialogue model respectively, and obtain the feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model;

[0115] According to the classification of the model verification data, the feature data values ​​of all the dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model are extracted, and the feature data values ​​of all the dialogue feature data types in the specific feature data type library under the application scenario are used as the model specific output data;

[0116] Based on the model-specific output data and the actual output data in the model validation set, the loss value of the preliminary AI dialogue model on the model validation set is calculated using the loss value function;

[0117] The preliminary AI dialogue model with the smallest loss value is selected as the optimal AI dialogue model.

[0118] In this solution, the data in the model validation set is selected based on the number of applications in the actual application scenarios in the embedded environment. Therefore, the performance of the preliminary AI dialogue model in the model validation set can reflect the actual performance of the preliminary AI dialogue model in the embedded environment. By screening out the preliminary AI dialogue model with the smallest loss value, that is, the preliminary AI dialogue model with the best performance in the model validation set, as the optimal AI dialogue model, efficient, accurate and personalized information interaction can be achieved.

[0119] For further information, see Figure 6 As shown, based on the same inventive concept as the above-mentioned embedded AI intelligent dialogue method, this solution proposes an embedded AI intelligent dialogue system, including:

[0120] A scenario analysis module is used to obtain several application scenarios in the embedded environment of the AI ​​voice assistant;

[0121] A data feature analysis module, the data feature analysis module is electrically connected to the scenario analysis module, and the data feature analysis module is used to determine the AI ​​dialogue feature data type library under each application scenario, and to use the union of the AI ​​dialogue feature data type libraries under all application scenarios as the comprehensive dialogue feature data type library, and to use the intersection of the AI ​​dialogue feature data type library under each application scenario and the comprehensive dialogue feature data type library as the specific feature data type library under the application scenario;

[0122] A model training module is used to use all conversation data in all application scenarios as a total training database, and the conversation data in each application scenario as a scenario verification database, to determine a model training set and a model verification set from the total training database and the scenario verification database respectively, to train at least one preliminary AI conversation model based on a comprehensive conversation feature data type library, and to determine the optimal AI conversation model from all preliminary AI conversation models based on a specific feature data type library in all application scenarios;

[0123] The dialogue analysis module is used to set the trigger feature words in each application scenario, obtain the input dialogue sentences, extract the features of the dialogue sentences, and obtain the content features and intention features;

[0124] The AI ​​dialogue module is electrically connected to the dialogue analysis module and the model training module. The AI ​​dialogue unit is used to input content features into the optimal AI dialogue model, obtain AI feedback content information, match the intention features with the trigger feature words in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract several AI feedback content information corresponding to the specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback and output the target dialogue content information.

[0125] The model training module includes:

[0126] A model training data determination unit, the model training data determination unit is used to determine a model training set and a model verification set from a total training database and a scenario verification database respectively;

[0127] A training unit, the training unit is used to train at least one preliminary AI dialogue model based on the comprehensive dialogue feature data library;

[0128] The screening unit is used to determine the optimal AI dialogue model from all preliminary AI dialogue models based on a library of specific feature data types in all application scenarios.

[0129] AI dialogue modules include:

[0130] An AI generation unit, which is used to input content features into an optimal AI dialogue model to obtain AI feedback content information;

[0131] The scene matching unit is used to match the intention feature with the trigger feature word in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract a number of AI feedback content information corresponding to the specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback and output the target dialogue content information.

[0132] The process of using the above system is as follows:

[0133] Step 1: The scenario analysis module obtains several application scenarios in the embedded environment of the AI ​​voice assistant;

[0134] Step 2: The data feature analysis module determines the AI ​​dialogue feature data type library for each application scenario, takes the union of the AI ​​dialogue feature data type libraries for all application scenarios as the comprehensive dialogue feature data type library, and takes the intersection of the AI ​​dialogue feature data type library for each application scenario and the comprehensive dialogue feature data type library as the specific feature data type library for the application scenario;

[0135] Step 3: The model training data determination unit determines a model training set and a model verification set from the total training database and the scenario verification database respectively;

[0136] Step 4: The training unit trains at least one preliminary AI dialogue model based on the comprehensive dialogue feature data library;

[0137] Step 5: The screening unit determines the optimal AI dialogue model from all preliminary AI dialogue models based on the specific feature data type library in all application scenarios;

[0138] Step 6: The dialogue analysis module sets the trigger feature words for each application scenario, obtains the input dialogue sentences, extracts features of the dialogue sentences, and obtains content features and intention features;

[0139] Step 7: The AI ​​generation unit inputs the content features into the optimal AI dialogue model to obtain AI feedback content information;

[0140] Step 8: The scene matching unit matches the intention feature with the trigger feature word in each application scenario to obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extracts several AI feedback content information corresponding to the specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feeds back and outputs the target dialogue content information.

[0141] Figure 7 Schematic diagram of a computer-readable storage medium structure provided by an embodiment of the present application. Figure 7As shown, a computer-readable storage medium 600 according to an embodiment of the present application is shown. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by the processor, an embedded AI intelligent dialogue method according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.

[0142] To sum up, the advantages of the present invention are: through advanced machine learning algorithms and natural language processing technology, it can significantly improve the efficiency of information interaction, optimize the AI ​​dialogue process, and bring a significant improvement in user experience.

[0143] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. An embedded AI intelligent dialogue method, characterized in that: include: Obtain several application scenarios in the embedded environment of AI voice assistant; Determine the AI ​​dialogue feature data type library for each application scenario; The union of AI dialogue feature data type libraries in all application scenarios is used as the comprehensive dialogue feature data type library; The intersection of the AI ​​dialogue feature data type library and the comprehensive dialogue feature data type library in each application scenario is used as the specific feature data type library in the application scenario; All conversation data in all application scenarios are used as the total training database, and the conversation data in each application scenario is used as the scenario verification database; Determine a model training set and a model verification set from the total training database and the scenario verification database respectively; Based on the comprehensive dialogue feature data library, train at least one preliminary AI dialogue model; Determine the optimal AI dialogue model from all preliminary AI dialogue models based on a database of specific feature data types in all application scenarios; Set trigger feature words for each application scenario; Obtain input dialogue sentences, perform feature extraction on the dialogue sentences, and obtain content features and intention features; Input content features into the optimal AI dialogue model to obtain AI feedback content information; Match the intention feature with the trigger feature words in each application scenario to obtain the intention application scenario of the dialogue sentence; Based on the intended application scenario of the dialogue sentence, several pieces of AI feedback content information corresponding to the specific feature data type library are extracted from the AI ​​feedback content information as the target dialogue content information, and the target dialogue content information is fed back and output.

2. The embedded AI intelligent dialogue method according to claim 1, characterized in that: Determining the model training set and the model verification set from the total training database and the scenario verification database respectively specifically includes: Randomly select N data from the total training database to form a model training set; Based on the total number of data in each scenario verification database, the number of verification data selected from each scenario verification database is determined by a verification allocation algorithm; Based on the number of verification data, a corresponding number of data are randomly selected from each scenario verification database to form a model verification set.

3. The embedded AI intelligent dialogue method according to claim 2, characterized in that: The formula of the verification allocation algorithm is: Among them, N i ' is the number of verification data selected from the i-th scene verification database, N i is the total number of data in the verification database for the i-th scenario, and n is the total number of application scenarios in the embedded environment.

4. The embedded AI intelligent dialogue method according to claim 3, characterized in that: The step of training at least one preliminary AI dialogue model based on the comprehensive dialogue feature data library specifically includes: Based on the cross entropy loss function, as the loss value function in the AI ​​dialogue model training process, it is denoted as L(θ); Introduce a regularization term into the loss function during the AI ​​dialogue model training process to obtain a regularized loss function, denoted as L'(θ); Among them, the regularized loss value function is specifically: Among them, L is the coefficient of the regularization term, θ j is the jth parameter of the neural network; Determine several values ​​of the coefficient of the regularization term and obtain several different regularization loss value functions; Based on each regularized loss value function, a preliminary AI dialogue model is obtained by training the total training database. The preliminary AI dialogue model takes dialogue sentences as input and takes feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library as output.

5. The embedded AI intelligent dialogue method according to claim 4, characterized in that: The several values ​​of the coefficient of the regularization term are specifically determined as follows: Set the search range and search step of L, and select several values ​​from the search range of L based on the search step of L to form a set of candidate values ​​of L; Divide the model training set into m mutually exclusive training subsets; Select one of the m training subsets as the test set, and combine the remaining training subsets into the first training set; Based on the regularized loss function generated by the candidate value of L, a first validation model is trained by a neural network using the first training set; Use the loss function to evaluate the loss value of the first validation model on the test set, which is recorded as the loss performance of the candidate value of L on the test set; Calculate the loss performance of the candidate value of L for each training subset as the test set, and find the average value to obtain the comprehensive loss performance of the candidate value of L; At least one candidate value of L whose comprehensive loss performance is within a preset loss value range is screened out as the value of the coefficient of the regularization term.

6. The embedded AI intelligent dialogue method according to claim 5, characterized in that: The specific feature data type library in all application scenarios, from all preliminary AI dialogue models, determines the optimal AI dialogue model specifically includes: Classify the data in the model validation set according to the application scenario; Input the dialogue sentences in the model verification set into the preliminary AI dialogue model respectively, and obtain the feature data values ​​of all dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model; According to the classification of the model verification data, the feature data values ​​of all the dialogue feature data types in the comprehensive dialogue feature data type library output by the preliminary AI dialogue model are extracted, and the feature data values ​​of all the dialogue feature data types in the specific feature data type library under the application scenario are used as the model specific output data; Based on the model-specific output data and the actual output data in the model validation set, the loss value of the preliminary AI dialogue model on the model validation set is calculated using the loss value function; The preliminary AI dialogue model with the smallest loss value is selected as the optimal AI dialogue model.

7. An embedded AI intelligent dialogue system, characterized in that: The method for implementing the embedded AI intelligent dialogue method according to any one of claims 1 to 6 comprises: A scenario analysis module, which is used to obtain several application scenarios in the embedded environment of the AI ​​voice assistant; A data feature analysis module, the data feature analysis module is electrically connected to the scenario analysis module, and the data feature analysis module is used to determine the AI ​​dialogue feature data type library under each application scenario, and use the union of the AI ​​dialogue feature data type libraries under all application scenarios as the comprehensive dialogue feature data type library, and use the intersection of the AI ​​dialogue feature data type library under each application scenario and the comprehensive dialogue feature data type library as the specific feature data type library under the application scenario; A model training module, wherein the model training module is used to use all dialogue data in all application scenarios as a total training database, use the dialogue data in each application scenario as a scenario verification database, determine a model training set and a model verification set from the total training database and the scenario verification database respectively, train at least one preliminary AI dialogue model based on a comprehensive dialogue feature data type library, and determine an optimal AI dialogue model from all preliminary AI dialogue models based on a specific feature data type library in all application scenarios; A dialogue analysis module, which is used to set trigger feature words in each application scenario, obtain input dialogue sentences, perform feature extraction on the dialogue sentences, and obtain content features and intention features; The AI ​​dialogue module is electrically connected to the dialogue analysis module and the model training module, and the AI ​​dialogue unit is used to input content features into the optimal AI dialogue model, obtain AI feedback content information, match the intention features with the trigger feature words in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract a number of AI feedback content information corresponding to a specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback and output the target dialogue content information.

8. The embedded AI intelligent dialogue system according to claim 7, characterized in that: The model training module includes: A model training data determination unit, the model training data determination unit is used to determine a model training set and a model verification set from a total training database and a scenario verification database respectively; A training unit, the training unit being used to train at least one preliminary AI dialogue model based on the comprehensive dialogue feature data type library; A screening unit is used to determine the optimal AI dialogue model from all preliminary AI dialogue models based on a library of specific feature data types in all application scenarios.

9. The embedded AI intelligent dialogue system according to claim 8, characterized in that: The AI ​​dialogue module includes: An AI generation unit, the AI ​​generation unit being used to input content features into an optimal AI dialogue model to obtain AI feedback content information; A scene matching unit, wherein the scene matching unit is used to match the intention feature with the trigger feature word in each application scenario, obtain the intended application scenario of the dialogue sentence, and based on the intended application scenario of the dialogue sentence, extract a number of AI feedback content information corresponding to a specific feature data type library from the AI ​​feedback content information as the target dialogue content information, and feedback output the target dialogue content information.

10. A computer-readable storage medium, characterized in that: A computer-readable program is stored thereon, and when the computer-readable program is called, the embedded AI intelligent dialogue method as described in any one of claims 1-6 is executed.