A method and system for predicting multi-round dialogue strategies of a reporting robot
By collecting and processing real-time user input information and using the K-Bert neural network pre-trained model for multiple rounds of dialogue context analysis, the problem of inability to adapt to complex contexts in the prior art is solved, and the stability and accuracy of dialogue strategy prediction are improved.
Patent Information
- Application Number
- CN202111493640.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-12-08
AI Technical Summary
In the prior art, since most robots only search for reply content based on historical data, they cannot adapt to complex contexts, resulting in weak prediction stability of dialogue strategy.
By collecting real-time input information of users with the report robot, format standardization and vectorization are performed, and multiple rounds of dialogue context analysis and prediction are performed using the K-Bert neural network pre-training model to obtain vector information that characterizes the user's request information, and evaluate its accuracy through vector operations. Finally, the vector information is input into the database for retrieval to obtain the dialogue prediction results.
The vector information obtained by the K-Bert neural network pre-training model based on multiple rounds of context is more accurate, which can more adapt to complex contextual situations, and improve the accuracy of the prediction results of multiple rounds of dialogue strategies.
Smart Images

Figure CN114239941B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence related technologies, and in particular to a method and system for predicting multi-round dialogue strategies of a reporting robot. Background Art
[0002] The human-computer dialogue system enables machines to interact with humans through human language, which is an important task in the field of artificial intelligence. The report robot is a robot that can replace or assist humans in completing repetitive work and tasks in digital devices such as computers and mobile phones. Through advanced artificial intelligence technology, it converts the natural language of human communication into structured query statements in real time and returns the reports required by users. The multi-round dialogue strategy prediction part is the core scheduling module to realize this function.
[0003] At present, the multi-round dialogue strategy prediction part mainly uses semantic recognition technology to analyze the semantic information of the input information, and then combines the database to match the reply information in the same semantic environment. However, the user's needs may be different in different contexts for the same semantic input. The current technology is difficult to stably adapt to the multi-round dialogue strategy prediction in complex contexts.
[0004] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:
[0005] In the existing technology, since most robots only reply by semantic retrieval based on historical data, they are unable to adapt to complex contexts, resulting in the technical problem of weak stability in dialogue strategy prediction. Summary of the invention
[0006] The embodiment of the present application provides a method and system for predicting multi-round dialogue strategies of a report robot, which solves the technical problem in the prior art that most robots only reply content by semantic retrieval based on historical data and cannot adapt to complex contexts, resulting in weak stability of dialogue strategy prediction. By collecting the real-time input information of users interacting with the report robot, standardizing the input information through a preset format, and then vectorizing the standardized text information to obtain the current user input information that can be recognized by the robot, and then analyzing and predicting the current user input information based on the multi-round dialogue context through the K-Bert neural network pre-training model, the vector information representing the user request information is obtained, and then the vector is calculated to evaluate the accuracy of the vector information, and the vector that meets the requirements is input into the database for retrieval to obtain the dialogue prediction result for reply. The vector information obtained by the K-Bert neural network pre-training model based on the multi-round context is more accurate and more adaptable to complex context situations, achieving the technical effect of improving the accuracy of the multi-round dialogue strategy prediction results.
[0007] In view of the above problems, an embodiment of the present application provides a method and system for predicting multi-round dialogue strategies of a reporting robot.
[0008] In a first aspect, an embodiment of the present application provides a method for predicting multi-round dialogue strategies of a report robot, wherein the method includes: obtaining first input information of a first user; obtaining a first format standardization instruction, and performing format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data; vectorizing the first text input data through a bag of words model to obtain a first processing result; inputting the first processing result into a K-Bert neural network pre-training model, performing feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and outputting a first vector and a second vector; obtaining a first vector operation rule, and performing vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result; and obtaining a first dialogue prediction result based on the first operation result and a first retrieval database.
[0009] On the other hand, an embodiment of the present application provides a multi-round dialogue strategy prediction system for a report robot, wherein the system includes: a first acquisition unit, the first acquisition unit is used to obtain first input information of a first user; a first processing unit, the first processing unit is used to obtain a first format standardization instruction, and the first input information is format-standardized according to the first format standardization instruction to obtain first text input data; a second processing unit, the second processing unit is used to vectorize the first text input data through a bag of words model to obtain a first processing result; a third processing unit, the third processing unit is used to input the first processing result into a K-Bert neural network pre-training model, and perform feature extraction and feature conversion of the first processing result through the K-Bert neural network pre-training model to output a first vector and a second vector; a fourth processing unit, the fourth processing unit is used to obtain a first vector operation rule, and perform vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result; a second acquisition unit, the second acquisition unit is used to obtain a first dialogue prediction result based on the first operation result and a first retrieval database.
[0010] In the third aspect, an embodiment of the present application provides a multi-round dialogue strategy prediction system for a reporting robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.
[0011] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0012] The invention adopts the following technical schemes: obtaining the first input information of the first user; obtaining the first format standardization instruction, performing format standardization processing on the first input information according to the first format standardization instruction to obtain the first text input data; vectorizing the first text input data through the bag of words model to obtain the first processing result; inputting the first processing result into the K-Bert neural network pre-training model, performing feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and outputting the first vector and the second vector; obtaining the first vector operation rule, performing vector operation on the first vector and the second vector based on the first vector operation rule to obtain the first operation result; and obtaining the first dialogue prediction result based on the first operation result and the first retrieval database. The invention collects and reports the real-time input information of the user interacting with the robot, standardizes the input information through a preset format, obtains the current user input information recognizable by the robot, and then vectorizes the standardized text information to obtain the current user input information recognizable by the robot, and then analyzes and predicts the current user input information based on the multi-round dialogue context through the K-Bert neural network pre-training model to obtain the vector information representing the user request information, and then operates the obtained vector to evaluate the accuracy of the vector information, and inputs the vector that meets the requirements into the database for retrieval to obtain the dialogue prediction result for reply. The vector information obtained based on multi-round contexts through the K-Bert neural network pre-training model is more accurate and more adaptable to complex contexts, achieving the technical effect of improving the accuracy of multi-round dialogue strategy prediction results.
[0013] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of a method for predicting a multi-round dialogue strategy of a reporting robot is provided for an embodiment of the present application;
[0015] Figure 2 A flowchart of a method for processing information input from multiple rounds of dialogue with a reporting robot is provided for an embodiment of the present application;
[0016] Figure 3 A flowchart of a method for calculating vector output from a multi-round dialogue of a reporting robot is provided for an embodiment of the present application;
[0017] Figure 4 A schematic diagram of the structure of a multi-round dialogue strategy prediction system for a reporting robot is provided for an embodiment of the present application;
[0018] Figure 5 It is a schematic diagram of the structure of an exemplary electronic device according to an embodiment of the present application.
[0019] Explanation of the reference numerals: first obtaining unit 11 , first processing unit 12 , second processing unit 13 , third processing unit 14 , fourth processing unit 15 , second obtaining unit 16 , electronic device 300 , memory 301 , processor 302 , communication interface 303 , bus architecture 304 . DETAILED DESCRIPTION
[0020] The embodiment of the present application provides a method and system for predicting multi-round dialogue strategies of a report robot, which solves the technical problem in the prior art that most robots only reply content by semantic retrieval based on historical data and cannot adapt to complex contexts, resulting in weak stability of dialogue strategy prediction. By collecting the real-time input information of users interacting with the report robot, standardizing the input information through a preset format, and then vectorizing the standardized text information to obtain the current user input information that can be recognized by the robot, and then analyzing and predicting the current user input information based on the multi-round dialogue context through the K-Bert neural network pre-training model, the vector information representing the user request information is obtained, and then the vector is calculated to evaluate the accuracy of the vector information, and the vector that meets the requirements is input into the database for retrieval to obtain the dialogue prediction result for reply. The vector information obtained by the K-Bert neural network pre-training model based on the multi-round context is more accurate and more adaptable to complex context situations, achieving the technical effect of improving the accuracy of the multi-round dialogue strategy prediction results.
[0021] Application Overview
[0022] The human-computer dialogue system enables machines to interact with people through human language, which is an important task in the field of artificial intelligence. The report robot is a robot that can replace or assist humans in completing repetitive work and tasks in digital devices such as computers and mobile phones. Through advanced artificial intelligence technology, it converts the natural language of human communication into structured query statements in real time and returns the reports required by users. The multi-round dialogue strategy prediction part is the core scheduling module to realize this function. At present, the multi-round dialogue strategy prediction part mainly analyzes the semantic information of the input information through semantic recognition technology, and then combines the database to match the reply information of the same semantic environment. However, the user's needs may be different for the same semantic input in different contexts. The current technology is difficult to stably adapt to the multi-round dialogue strategy prediction in complex contexts. However, in the existing technology, most robots only retrieve the reply content based on historical data semantically, and cannot adapt to complex contexts, resulting in the technical problem of weak stability of dialogue strategy prediction.
[0023] In response to the above technical problems, the overall idea of the technical solution provided by this application is as follows:
[0024] An embodiment of the present application provides a method for predicting multi-round dialogue strategies of a report robot, wherein the method includes: obtaining first input information of a first user; obtaining a first format standardization instruction, and performing format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data; vectorizing the first text input data through a bag of words model to obtain a first processing result; inputting the first processing result into a K-Bert neural network pre-training model, performing feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and outputting a first vector and a second vector; obtaining a first vector operation rule, and performing vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result; and obtaining a first dialogue prediction result based on the first operation result and a first retrieval database.
[0025] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.
[0026] Embodiment 1
[0027] like Figure 1 As shown, an embodiment of the present application provides a method for predicting a multi-round dialogue strategy of a report robot, wherein the method includes:
[0028] S100: Obtaining first input information of a first user;
[0029] Specifically, the first user is a user who interacts with the report robot, and the forms of interaction include but are not limited to: voice input, text input, Chinese input, foreign language input, etc.; the first input information is the multi-round input information of the first user collected by the report robot. Preferably, a dialogue between the first user and the report robot is set as a round. Further, the information that is initially received from the first user and the reply is recorded as the first round of interaction content, the request information sent by the first user in the first round is recorded as the first round of input information of the first user, and the reply made by the report robot is recorded as the first round of reply information. Further, the feedback request information made by the first user based on the first round of reply information is recorded as the second round of input information of the first user, and the second reply made by the report robot is recorded as the second round of reply information. Until the first user obtains the required report information, the collection of multi-round interaction information stops and is stored as a set of historical data of human-computer interaction. Among them, the first input information is the input information input by the first user to the report robot during real-time interaction. By collecting the first input information of the first user, the intention of the first user can be analyzed and identified in real time, providing an information basis for further matching more accurate dialogue strategy prediction results.
[0030] S200: Obtain a first format standardization instruction, and perform format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data;
[0031] Specifically, the first format standardization instruction is an information processing instruction issued after the first input information is collected in order to facilitate the report robot to identify and process the input information; the first text input data is the result obtained after the first input information is standardized according to the preset format after receiving the first format standardization instruction. The preset format standardization is exemplified as: {"attribute 1":"information 1","attribute 2":"information 2",...."attribute n":[{"attribute n1":"information n1",..."attribute n k ":" Information k "},"attribute n+1":"information n+1"],"attribute n+2":"information n+2"}, wherein the punctuation, capitalization, and number processing of the first input information need to be unified, so that the report robot can process the input information based on a unified standardized format. Among them, attributes 1 to n+2 are preset different attribute information extracted from different dimensions in order to characterize the accurate intention of the first input information of the first user, including but not limited to the current user input text, keyword information, intent information, the first user's historical information, the previous round of interaction information and other dimensions. By standardizing the first input information, on the one hand, it is convenient for the report robot to quickly identify and process it, and on the other hand, it can be jointly analyzed with attribute information of multiple dimensions to ensure the accuracy of the prediction results.
[0032] S300: performing vectorization processing on the first text input data through a bag-of-words model to obtain a first processing result;
[0033] Specifically, the bag-of-words model refers to a document representation method commonly used in the field of information retrieval. In information retrieval, it is assumed that for a document, its word order, grammar, syntax and other elements are ignored, and it is only regarded as a collection of several words. The appearance of each word in the document is independent and does not depend on whether other words appear. In other words, any word that appears at any position in the document is independently selected without being affected by the semantics of the document. For example, the input information is two sentences: Zhang San checked the number of card issuance in Guangzhou and Li Si checked the number of card issuance in Shenzhen. These two sentences have 1: check, 2: Guangzhou, 3: Shenzhen, 4: of, 5: number of card issuance, 6: Zhang San, 7: Li Si, a total of seven words, different numbers identify different word positions, then two sets of vectors can be constructed to represent the two sentences [6,1,2,4,5] and [7,1,3,4,5] respectively; the first processing result is the result obtained after vectorizing the first text input data through the bag of words model. Furthermore, the information after vectorization processing can be efficiently processed as the input data for model training to obtain feature information of different vectors, and then it is judged to improve the prediction accuracy of the first input information.
[0034] S400: Inputting the first processing result into a K-Bert neural network pre-training model, performing feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and outputting a first vector and a second vector;
[0035] Specifically, the K-Bert neural network pre-trained model is a pre-trained language model. The construction process is to download the Bert neural network pre-trained model that has learned a general language representation from a large-scale corpus, extract the model parameters, and then use the first processing result combined with the triple information related to the entity in the sentence in the knowledge graph as training data, train the model, and converge to obtain the K-Bert neural network pre-trained model. The first processing result can be feature extracted to obtain the actual contextualized word embedding result. There are multiple word embedding results, so as to obtain different response prediction results for the first input information in different contexts, save the feature extraction result as the first vector, and save the intention prediction result corresponding to the first vector as the second vector. The first vector and the second vector extracted by the K-Bert neural network pre-trained model can calculate the matching degree between the first vector and the second vector in the corresponding context, and the one with the highest matching degree can be used as the prediction result. Since different prediction results in different contexts with the same semantics are analyzed, the stability of the system in complex contexts is improved.
[0036] S500: Obtain a first vector operation rule, and perform a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result;
[0037] Further, based on obtaining the first vector operation rule, performing a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result, step S500 further includes:
[0038] S510: Mapping the first vector and the second vector to the same vector semantic space to obtain a first mapping result;
[0039] S520: Perform a dot multiplication operation on the first vector and the second vector using the first mapping result to obtain the first operation result.
[0040] Specifically, the first vector operation rule refers to an operation rule preset for calculating the matching degree between the first vector and the second vector. An example of the operation rule without limitation is as follows:
[0041] The first vector is recorded as A, the second vector is recorded as B, and A and B are mapped to the same vector semantic space E. The first vector is recorded as A=E(A), and the second vector is recorded as B=E(B), which is the first mapping result. Further, the vector dot product S is used. + =A T A + Indicates and B + The maximum similarity of + and B + Respectively represent the corresponding positive sample vectors; use S - =A T A - Indicates and B - The minimum similarity of - and B - Respectively represent the corresponding negative sample vectors; further use L = -{S + -log(e S+ +Σ Ω- e S- )} The loss function between A and B, where e is the base of the natural logarithm and Ω is the Cai Ting constant. When the L value is smaller, the loss function is smaller, which means that the matching degree between A and B is higher. When the L value is larger, the loss function is larger, which means that the matching degree between A and B is smaller. The obtained L values are sorted from small to large, and the prediction problem is converted into a retrieval sorting problem, which reduces the complexity of the prediction processing.
[0042] S600: Obtaining a first dialogue prediction result based on the first operation result and a first search database.
[0043] Specifically, the historical conversation information of the report robot is stored to obtain the first retrieval database, in which user intentions and reply contents are stored one by one; based on the sorting results in the first calculation results, the intention prediction results of the corresponding user with the highest sorting are input into the first retrieval database to match the corresponding reply content. The prediction results obtained in this way are more suitable for the input context of the current first user, thereby improving the stability and reliability of the prediction results.
[0044] Further, such as Figure 2 As shown, based on obtaining the first input information of the first user, step S100 further includes:
[0045] S110: Obtain a first input text of the first user, and use the first input text as first dimension data;
[0046] S120: Obtain Slot word slot information, and use the Slot word slot information as second dimension data;
[0047] S130: Obtain the first input information based on the first dimensional data and the second dimensional data.
[0048] Specifically, the first input text of the first user is the real-time information currently input by the first user; the Slot word slot information is the context information associated with the first input text extracted in combination with the knowledge graph, and each group of the Slot word slot information can form a corresponding human-computer interaction content with the first input text, and different semantic environments correspond to different groups of Slot word slot information; further, the first input text is used as the first dimension data, and the Slot word slot information is used as the second dimension data, which are combined into the first input information. By combining the first dimension data and the second dimension data, different situations of the same semantics in different contexts can be analyzed, which improves the comprehensiveness of the input information and lays an information foundation for the accuracy of the prediction results.
[0049] Furthermore, the method further includes step S700, and step S700 further includes:
[0050] S710: Obtain historical conversation information of the first user, and use the historical conversation information as third dimension data;
[0051] S720: performing intent analysis of the first user on the historical conversation information to obtain a first intent analysis result, and using the first intent analysis result as fourth dimension data;
[0052] S730: Obtain the first input information based on the first dimensional data, the second dimensional data, the third dimensional data, and the fourth dimensional data.
[0053] Specifically, the historical dialogue information is the historical storage data of the interaction between the first user and the report robot, that is, multiple groups of multi-round interaction data. The source of historical data collection is not limited to the currently used report robot, but the historical interaction information related to the first user stored in all report robots within the enterprise or user range that uses the report robot; the first intention analysis result is to analyze the historical dialogue information to obtain data representing the first user's intention information. The analysis principle is: match the corresponding input information with the reply content that satisfies the first user, extract keywords with a high correlation with the reply content, store the keywords and the reply content accordingly, and obtain the intention analysis result; further, the historical dialogue information is used as the third dimension data, and the first intention analysis result is used as the fourth dimension data; further, the first dimension data, the second dimension data, the third dimension data and the fourth dimension data are set as the first input information. When the format is standardized, the first dimension data, the second dimension data, the third dimension data and the fourth dimension data correspond to four different attributes respectively, and the first input text, the slot word slot information, the historical dialogue information, and the first intention analysis result are used as the information of the four attributes respectively. By characterizing the first input information from multiple dimensions, the comprehensiveness and completeness of the first input information is ensured, thereby achieving the technical effect of ensuring the accuracy of the prediction results.
[0054] Furthermore, the method step S400 also includes:
[0055] S410: Obtain a BERT pre-training parameter set;
[0056] S420: Construct a K-Bert neural network pre-training model, load parameters of the BERT pre-training parameter set through the K-Bert neural network pre-training model, and perform feature extraction and feature conversion of the first processing result through the K-Bert neural network pre-training model after the BERT pre-training parameter set parameters are loaded.
[0057] Specifically, the BERT pre-trained parameter set is the model parameters of the Bert neural network pre-trained model for universal language representation constructed by learning from large-scale corpus, which can be downloaded from an open source information website or trained by itself; the K-Bert neural network pre-trained model is a model obtained by combining the knowledge graph to process the first input information and then training it based on the Bert neural network pre-trained model, wherein the processing result is the information of the second dimension, and the K-Bert neural network pre-trained model is trained using multiple groups of first input information consisting of multiple dimensions as training data. When the K-Bert neural network pre-trained model converges, the training is stopped, and the first input information is input into the K-Bert neural network pre-trained model, so that different intent analysis results of the first input text in different contexts can be obtained, and the corresponding reply report can be matched according to the different intent analysis results, thereby improving the recognition ability of the same input text in different contexts, and achieving the technical effect of improving prediction stability.
[0058] Further, such as Figure 3 As shown, based on performing a dot multiplication operation on the first vector and the second vector using the first mapping result to obtain the first operation result, step S520 further includes:
[0059] S521: performing a dot multiplication operation on the first vector and the second vector according to the first mapping result to obtain maximum value data of the first positive sample similarity and minimum value data of the first negative sample similarity;
[0060] S522: constructing a loss function using the maximum value data and the minimum value data to obtain a first construction result;
[0061] S523: Obtain the first operation result through the first construction result.
[0062] Specifically, the operation rules are constructed as follows: the first vector is recorded as A, the second vector is recorded as B, A and B are mapped to the same vector semantic space E, the first vector is recorded as A=E(A), the second vector is recorded as B=E(B), which is the first mapping result; further, use the vector dot multiplication S + =A T A + Indicates and B + The maximum similarity is the maximum value data of the similarity of the first positive sample, where A + and B + Respectively represent the corresponding positive sample vectors; use S - =A T A - Indicates and B -The minimized similarity is the minimum value data of the similarity of the first negative sample, where A - and B - Respectively represent the corresponding negative sample vectors; further use L = -{S + -log(e S+ +Σ Ω- e S- )}The loss function between A and B is the first construction result, wherein e is the base of the natural logarithm, and Ω is the Cai Ting constant. Furthermore, the first vector and the second vector are processed using the above operation rules to obtain the first operation result.
[0063] Furthermore, the method step S600 also includes:
[0064] S610: constructing the first search database through the historical conversation database;
[0065] S620: sorting the first search database in order according to the first operation result to obtain a first order search database;
[0066] S630: Obtain the first dialogue prediction result by searching the database through the first sequence.
[0067] Specifically, the historical dialogue database is a database that collects the historical information of interactions between multiple service report robots of the same type that are connected to each other, and after performing intent analysis, binds the user intent analysis results and the reply content to obtain multiple groups of user intent-report reply information; the historical dialogue database is used as the first search database, and the ranking results in the first operation result are input into the first search database, so that the reply content under different ranking results can be obtained, and the reply content with a higher ranking has a higher degree of matching with the context of the first user, thereby obtaining the ranking results of the reply content for the same input text in different contexts, and giving priority to the reply content with a higher ranking as the first dialogue prediction result. By matching multiple different contexts for the input information through the knowledge graph, and then analyzing the matching degree between the context and the user intent based on the operation rules, and further based on the analysis results, the prediction problem is converted into a ranking problem, which reduces the complexity of the prediction and adapts to the dialogue prediction in complex contexts, and improves the robustness of the system.
[0068] In summary, the method and system for predicting multi-round dialogue strategies of a report robot provided by the embodiments of the present application have the following technical effects:
[0069] 1. The embodiment of the present application provides a method and system for predicting multi-round dialogue strategies of a report robot, which solves the technical problem in the prior art that most robots only reply content by semantic retrieval based on historical data and cannot adapt to complex contexts, resulting in weak stability of dialogue strategy prediction. By collecting the real-time input information of users interacting with the report robot, standardizing the input information through a preset format, and then vectorizing the standardized text information to obtain the current user input information that can be recognized by the robot, and then analyzing and predicting the current user input information based on the multi-round dialogue context through the K-Bert neural network pre-training model, the vector information representing the user request information is obtained, and then the vector is calculated to evaluate the accuracy of the vector information, and the vector that meets the requirements is input into the database for retrieval to obtain the dialogue prediction result for reply. The vector information obtained by the K-Bert neural network pre-training model based on the multi-round context is more accurate and more adaptable to complex context situations, achieving the technical effect of improving the accuracy of the multi-round dialogue strategy prediction results.
[0070] 2. The knowledge graph is used to match multiple different contexts for the input information, and then the matching degree between the context and the user intention is analyzed based on the operation rules. Based on the analysis results, the prediction problem is converted into a sorting problem, which reduces the complexity of the prediction and adapts to the dialogue prediction in complex contexts, thereby improving the robustness of the system.
[0071] Embodiment 2
[0072] Based on the same inventive concept as the method for predicting multi-round dialogue strategies of a report robot in the aforementioned embodiment, Figure 4 As shown, an embodiment of the present application provides a report robot multi-round dialogue strategy prediction system, wherein the system includes:
[0073] A first obtaining unit 11, wherein the first obtaining unit 11 is used to obtain first input information of a first user;
[0074] A first processing unit 12, the first processing unit 12 is used to obtain a first format standardization instruction, and perform format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data;
[0075] A second processing unit 13, the second processing unit 13 is used to vectorize the first text input data through a bag-of-words model to obtain a first processing result;
[0076] A third processing unit 14, the third processing unit 14 is used to input the first processing result into a K-Bert neural network pre-training model, perform feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and output a first vector and a second vector;
[0077] A fourth processing unit 15, the fourth processing unit 15 is used to obtain a first vector operation rule, and perform a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result;
[0078] The second obtaining unit 16 is used to obtain a first dialogue prediction result based on the first operation result and a first search database.
[0079] Furthermore, the system also includes:
[0080] a third obtaining unit, the third obtaining unit being used to obtain a first input text of the first user, and use the first input text as first dimension data;
[0081] A fourth obtaining unit, the fourth obtaining unit is used to obtain Slot word slot information, and use the Slot word slot information as the second dimension data;
[0082] A fifth obtaining unit, wherein the fifth obtaining unit is used to obtain the first input information based on the first dimensional data and the second dimensional data.
[0083] Furthermore, the system also includes:
[0084] a sixth obtaining unit, the sixth obtaining unit being configured to obtain historical conversation information of the first user, and use the historical conversation information as third dimension data;
[0085] a seventh obtaining unit, the seventh obtaining unit being configured to perform an intention analysis of the first user on the historical conversation information, obtain a first intention analysis result, and use the first intention analysis result as fourth dimension data;
[0086] An eighth obtaining unit, the eighth obtaining unit is used to obtain the first input information based on the first dimensional data, the second dimensional data, the third dimensional data and the fourth dimensional data.
[0087] Furthermore, the system also includes:
[0088] A ninth obtaining unit, wherein the ninth obtaining unit is used to obtain a BERT pre-training parameter set;
[0089] A first construction unit, wherein the first construction unit is used to construct a K-Bert neural network pre-training model, load the parameters of the BERT pre-training parameter set through the K-Bert neural network pre-training model, and extract and convert the features of the first processing result through the K-Bert neural network pre-training model after the BERT pre-training parameter set parameters are loaded.
[0090] Furthermore, the system also includes:
[0091] a tenth obtaining unit, configured to map the first vector and the second vector to the same vector semantic space to obtain a first mapping result;
[0092] An eleventh obtaining unit is used to perform a dot product operation on the first vector and the second vector through the first mapping result to obtain the first operation result.
[0093] Furthermore, the system also includes:
[0094] a twelfth obtaining unit, configured to perform a dot multiplication operation on the first vector and the second vector according to the first mapping result, so as to obtain maximum value data of the first positive sample similarity and minimum value data of the first negative sample similarity;
[0095] a thirteenth obtaining unit, the thirteenth obtaining unit being used to construct a loss function through the maximum value data and the minimum value data to obtain a first construction result;
[0096] A fourteenth obtaining unit, the fourteenth obtaining unit is used to obtain the first operation result through the first construction result.
[0097] Furthermore, the system also includes:
[0098] a second construction unit, the second construction unit being used to construct the first search database through a historical conversation database;
[0099] a fifteenth obtaining unit, configured to perform a sequence sorting of the first search database according to the first operation result to obtain a first sequence search database;
[0100] A sixteenth obtaining unit is configured to obtain the first dialogue prediction result by searching the database in the first order.
[0101] Exemplary Electronic Devices
[0102] Reference below Figure 5 To describe the electronic device of the embodiment of the present application,
[0103] Based on the same inventive concept as the method for predicting a multi-round dialogue strategy of a report robot in the aforementioned embodiment, the embodiment of the present application also provides a multi-round dialogue strategy prediction system for a report robot, including: a processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system executes the method described in any one of the first aspects
[0104] The electronic device 300 includes: a processor 302, a communication interface 303, and a memory 301. Optionally, the electronic device 300 may also include a bus architecture 304. The communication interface 303, the processor 302, and the memory 301 may be interconnected via the bus architecture 304; the bus architecture 304 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus architecture 304 may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0105] The processor 302 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
[0106] The communication interface 303 uses any transceiver-like system for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), wired access networks, etc.
[0107] The memory 301 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via the bus architecture 304. The memory may also be integrated with the processor.
[0108] The memory 301 is used to store computer execution instructions for executing the solution of the present application, and the execution is controlled by the processor 302. The processor 302 is used to execute the computer execution instructions stored in the memory 301, thereby realizing a method for predicting multi-round dialogue strategies of a report robot provided in the above embodiment of the present application.
[0109] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0110] The embodiment of the present application provides a method and system for predicting multi-round dialogue strategies of a report robot, which solves the technical problem in the prior art that most robots only reply content by semantic retrieval based on historical data and cannot adapt to complex contexts, resulting in weak stability of dialogue strategy prediction. By collecting the real-time input information of users interacting with the report robot, standardizing the input information through a preset format, and then vectorizing the standardized text information to obtain the current user input information that can be recognized by the robot, and then analyzing and predicting the current user input information based on the multi-round dialogue context through the K-Bert neural network pre-training model, the vector information representing the user request information is obtained, and then the vector is calculated to evaluate the accuracy of the vector information, and the vector that meets the requirements is input into the database for retrieval to obtain the dialogue prediction result for reply. The vector information obtained by the K-Bert neural network pre-training model based on the multi-round context is more accurate and more adaptable to complex context situations, achieving the technical effect of improving the accuracy of the multi-round dialogue strategy prediction results.
[0111] Those of ordinary skill in the art will appreciate that the various digital numbers such as the first and second involved in the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application, nor do they represent the order of precedence. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one" refers to one or more. At least two refers to two or more. "At least one", "any one" or similar expressions refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one item (individual, kind) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0112] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable systems. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0113] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic system, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of a computing system, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration to implement.
[0114] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a terminal. Optionally, the processor and the storage medium can also be arranged in different components in the terminal. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0115] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for predicting multi-round dialogue strategies of a reporting robot, wherein: The method comprises: Obtaining first input information of a first user; Obtaining a first format standardization instruction, and performing format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data; Vectorize the first text input data using a bag-of-words model to obtain a first processing result; Inputting the first processing result into a K-Bert neural network pre-training model, performing feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and outputting a first vector and a second vector; Obtaining a first vector operation rule, and performing a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result; Obtaining a first dialogue prediction result based on the first operation result and a first search database; Wherein, obtaining the first input information of the first user further includes: Obtaining a first input text of the first user, and using the first input text as first dimension data; Obtaining Slot word slot information, and using the Slot word slot information as second dimension data; Obtaining the first input information based on the first dimensional data and the second dimensional data; The method further comprises: Obtaining historical conversation information of the first user, and using the historical conversation information as third dimension data; Performing intent analysis of the first user on the historical conversation information to obtain a first intent analysis result, and using the first intent analysis result as fourth dimension data; Obtaining the first input information based on the first dimensional data, the second dimensional data, the third dimensional data, and the fourth dimensional data; The method further comprises: Get the BERT pre-training parameter set; Constructing a K-Bert neural network pre-training model, loading parameters of the BERT pre-training parameter set through the K-Bert neural network pre-training model, and performing feature extraction and feature conversion of the first processing result through the K-Bert neural network pre-training model after the BERT pre-training parameter set parameters are loaded; The obtaining of the first vector operation rule, and performing a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result, further includes: Mapping the first vector and the second vector to the same vector semantic space to obtain a first mapping result; A dot multiplication operation is performed on the first vector and the second vector using the first mapping result to obtain the first operation result.
2. The method of claim 1, wherein: The performing a dot multiplication operation of the first vector and the second vector by using the first mapping result to obtain the first operation result further includes: Performing a dot multiplication operation on the first vector and the second vector based on the first mapping result to obtain maximum value data of the first positive sample similarity and minimum value data of the first negative sample similarity; Constructing a loss function using the maximum value data and the minimum value data to obtain a first construction result; The first operation result is obtained through the first construction result.
3. The method of claim 2, wherein: The method further comprises: Constructing the first search database through the historical conversation database; Sort the first search database in order according to the first operation result to obtain a first order search database; The first dialogue prediction result is obtained by searching a database in the first order.
4. A multi-round dialogue strategy prediction system for a reporting robot, wherein: The system comprises: A first obtaining unit, wherein the first obtaining unit is used to obtain first input information of a first user; A first processing unit, the first processing unit is used to obtain a first format standardization instruction, and perform format standardization processing on the first input information according to the first format standardization instruction to obtain first text input data; a second processing unit, the second processing unit being configured to perform vectorization processing on the first text input data through a bag-of-words model to obtain a first processing result; a third processing unit, the third processing unit being used to input the first processing result into a K-Bert neural network pre-training model, perform feature extraction and feature conversion on the first processing result through the K-Bert neural network pre-training model, and output a first vector and a second vector; a fourth processing unit, the fourth processing unit being configured to obtain a first vector operation rule, and perform a vector operation on the first vector and the second vector based on the first vector operation rule to obtain a first operation result; a second obtaining unit, the second obtaining unit being configured to obtain a first dialogue prediction result based on the first operation result and a first search database; The system further comprises: a third obtaining unit, the third obtaining unit being used to obtain a first input text of the first user, and use the first input text as first dimension data; A fourth obtaining unit, the fourth obtaining unit is used to obtain Slot word slot information, and use the Slot word slot information as the second dimension data; a fifth obtaining unit, configured to obtain the first input information based on the first dimensional data and the second dimensional data; The system further comprises: a sixth obtaining unit, the sixth obtaining unit being configured to obtain historical conversation information of the first user, and use the historical conversation information as third dimension data; a seventh obtaining unit, the seventh obtaining unit being configured to perform an intention analysis of the first user on the historical conversation information, obtain a first intention analysis result, and use the first intention analysis result as fourth dimension data; an eighth obtaining unit, the eighth obtaining unit being configured to obtain the first input information based on the first dimensional data, the second dimensional data, the third dimensional data, and the fourth dimensional data; The system further comprises: A ninth obtaining unit, wherein the ninth obtaining unit is used to obtain a BERT pre-training parameter set; A first construction unit, wherein the first construction unit is used to construct a K-Bert neural network pre-training model, load the parameters of the BERT pre-training parameter set through the K-Bert neural network pre-training model, and extract and convert the features of the first processing result through the K-Bert neural network pre-training model after the parameters of the BERT pre-training parameter set are loaded; The system further comprises: a tenth obtaining unit, configured to map the first vector and the second vector to the same vector semantic space to obtain a first mapping result; An eleventh obtaining unit is used to perform a dot product operation on the first vector and the second vector through the first mapping result to obtain the first operation result.
5. A multi-round dialogue strategy prediction system for a report robot, comprising: A processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system is enabled to perform the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Man-machine conversation method and system based on distributed representation model confusion
CN110825861A
Dialogue method and system
CN111160514A