A bank product problem retrieval method and device
By performing word segmentation and semantic block analysis on bank product problems, and extracting core semantic block vectors for similarity calculations, the problem of inaccurate understanding of user problems in the existing technology is solved, and the accuracy and user experience of bank product problem retrieval is improved.
Patent Information
- Application Number
- CN202111425867.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-11-26
AI Technical Summary
When banking business personnel deal with complex bank product problems, it is difficult for existing technology to accurately understand user problems, resulting in a decrease in user experience. The existing knowledge base search solution fails to effectively consider the deep meaning of the question, which reduces the accuracy of problem search. .
By receiving user input problems, perform word segmentation and stop words, obtain input problems with part-of-speech information, and input them into the semantic block output model and semantic block dependency model for training, extract core semantic block vectors, and perform similarity calculation Weighted average aggregation with pre-built knowledge base vectors to generate a list of answers.
It improves the accuracy of problem retrieval, saves the communication costs between bank staff and developers, responds to users in a timely manner, and improves the user experience.
Smart Images

Figure CN113987135B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing and artificial intelligence technology, and in particular to a method and device for retrieving bank product questions. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] In recent years, banking business has been continuously innovating and developing, covering more and more fields, with intricate business logic, and numerous transaction channels and transaction types. When banking staff cannot solve problems arising from complex business and concepts or user transactions with their existing knowledge, they often consult bank developers in the maintenance group or work order system. There is no knowledge base for some basic concepts and recurring banking product problems. It is time-consuming and laborious for banking staff to communicate with bank developers, and bank developers may not respond in time, resulting in the inability to respond to users in time, affecting the user experience; the existing solution for establishing knowledge base retrieval directly calculates similarity after word segmentation, which has the technical problem of not considering the deep meaning of the question, reducing the accuracy of question retrieval. Summary of the invention
[0004] The embodiment of the present invention provides a banking product question retrieval method, which is used to improve the accuracy of question retrieval and enhance user experience. The method includes:
[0005] Receive user input questions, segment the input questions and remove stop words, and obtain input questions with part-of-speech information;
[0006] Inputting the input question with part-of-speech information into the semantic block output model to obtain the input question semantic block; the semantic block output model is obtained by training the conditional random field model according to the historical input question and the corresponding input question semantic block;
[0007] Inputting the input question semantic block into the semantic block dependency output model to obtain the input question semantic block dependency; the semantic block dependency output model is obtained by training the conditional random field model according to the historical input question semantic blocks and the corresponding input question semantic block dependency;
[0008] Extracting the core semantic block of the input question from the semantic block of the input question according to the dependency relationship of the semantic block of the input question;
[0009] Determine the input question semantic block vector and the input question core semantic block vector;
[0010] Calculate the similarity between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a first similarity;
[0011] Calculate the similarity between the input question semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a second similarity;
[0012] Perform a weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question;
[0013] Push a list of answers matching the input question to the user.
[0014] The embodiment of the present invention further provides a bank product question retrieval device, which is used to improve the accuracy of question retrieval and enhance user experience. The device includes:
[0015] An acquisition module is used to receive user input questions, segment the input questions and remove stop words, and obtain the input questions with part-of-speech information;
[0016] An input module is used to input an input question with part-of-speech information into a semantic block output model to obtain an input question semantic block; the semantic block output model is obtained by training a conditional random field model based on historical input questions and corresponding input question semantic blocks; the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is obtained by training a conditional random field model based on historical input question semantic blocks and corresponding input question semantic block dependency;
[0017] An extraction module, used for extracting a core semantic block of an input question from the semantic blocks of the input question according to the dependency relationship of the semantic blocks of the input question;
[0018] A determination module, used to determine an input question semantic block vector and an input question core semantic block vector;
[0019] A calculation module is used to calculate the similarity between the core semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a first similarity; calculate the similarity between the semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a second similarity; perform weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question;
[0020] A push module is used to push a list of answers matching the input question to the user.
[0021] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned bank product problem retrieval method when executing the computer program.
[0022] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned bank product problem retrieval method is implemented.
[0023] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned bank product problem retrieval method is implemented.
[0024] In an embodiment of the present invention, a user input question is received, the input question is segmented and stop words are removed to obtain an input question with part-of-speech information; the input question with part-of-speech information is input into a semantic block output model to obtain an input question semantic block; the semantic block output model is trained on a conditional random field model according to historical input questions and corresponding input question semantic blocks; the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is trained on a conditional random field model according to historical input question semantic blocks and corresponding input question semantic block dependencies; according to the input question semantic block dependency, an input question core semantic block is extracted from the input question semantic block; an input question semantic block vector and an input question core semantic block vector are determined; similarity calculation is performed between the input question core semantic block vector and a semantic block vector of a pre-built knowledge base to obtain a first similarity; similarity calculation is performed between the input question semantic block vector and a semantic block vector of a pre-built knowledge base to obtain a second similarity; the first similarity and the second similarity are weighted averaged and aggregated to obtain a list of answers matching the input question; and the list of answers matching the input question is pushed to the user. Compared with the technical solutions in the existing technology, the pre-built knowledge base can save the communication costs between bank staff and bank developers, respond to users in a timely manner, and improve user experience; similarity calculation is performed through semantic block vectors, avoiding direct similarity calculation after word segmentation, which can improve the accuracy of question retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0026] Figure 1 A schematic diagram of a flow chart of a bank product question retrieval method provided in an embodiment of the present invention;
[0027] Figure 2 A specific example diagram of training and testing the semantic block output model provided in an embodiment of the present invention;
[0028] Figure 3 A specific example diagram of training and testing the semantic block dependency output model provided in an embodiment of the present invention;
[0029] Figure 4 A schematic diagram of the structure of a semantic block vector model provided in an embodiment of the present invention;
[0030] Figure 5 It is a schematic diagram of the structure of a bank product question retrieval device provided in an embodiment of the present invention;
[0031] Figure 6 A diagram showing a specific example of a bank product problem retrieval device provided in an embodiment of the present invention;
[0032] Figure 7 A diagram showing a specific example of a bank product problem retrieval device provided in an embodiment of the present invention;
[0033] Figure 8 It is a specific example diagram of the bank product problem retrieval device provided in the embodiment of the present invention. DETAILED DESCRIPTION
[0034] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0035] Before introducing the embodiments of the present invention, the terms involved in the embodiments of the present invention are first introduced.
[0036] 1. Participle:
[0037] A natural language processing technique that breaks a Chinese sentence into independent words.
[0038] 2. Semantic blocks:
[0039] After word segmentation, the sentence is divided into independent language blocks according to the implied meaning.
[0040] 3. Conditional Random Field Model CRF:
[0041] The Conditional Random Field (CRF) model is a discriminative probabilistic undirected graph learning model, which is a conditional probability model used to label and segment ordered data.
[0042] Research has found that the current popularization of banking business knowledge is mainly through testing and training, maintenance group Q&A, user manuals, and telephone inquiries to developers. These methods cannot guarantee that banking business personnel have a 100% grasp of banking product issues. When encountering urgent and unskilled banking product issues, timely responses cannot be made through the above methods alone, resulting in the inability to respond to users in a timely manner, reducing user experience; in addition, the existing solutions for establishing knowledge base retrieval mostly directly calculate the similarity after word segmentation, without considering the deep meaning of the problem, reducing the accuracy of problem retrieval.
[0043] In view of the above research, an embodiment of the present invention provides a method for retrieving bank product issues. Figure 1 FIG. 1 is a flow chart of a bank product question retrieval method provided in an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0044] Step 101: receiving a question input by a user, performing word segmentation and removing stop words on the input question, and obtaining the input question with part-of-speech information;
[0045] Step 102: Input the input question with part-of-speech information into the semantic block output model to obtain the input question semantic block; the semantic block output model is obtained by training the conditional random field model according to the historical input question and the corresponding input question semantic block;
[0046] Step 103: inputting the input question semantic block into the semantic block dependency output model to obtain the input question semantic block dependency; the semantic block dependency output model is obtained by training the conditional random field model according to the historical input question semantic blocks and the corresponding input question semantic block dependency;
[0047] Step 104: extracting the input question core semantic block from the input question semantic block according to the input question semantic block dependency;
[0048] Step 105: Determine the input question semantic block vector and the input question core semantic block vector;
[0049] Step 106: Calculate the similarity between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a first similarity;
[0050] Step 107: Calculate the similarity between the input question semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a second similarity;
[0051] Step 108: Perform weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question;
[0052] Step 109: Push a list of answers matching the input question to the user.
[0053] Depend on Figure 1 As can be seen from the process shown, in the embodiment of the present invention, a user input question is received, the input question is segmented and stop words are removed to obtain an input question with part-of-speech information; the input question with part-of-speech information is input into a semantic block output model to obtain an input question semantic block; the semantic block output model is trained on a conditional random field model based on historical input questions and corresponding input question semantic blocks; the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is trained on a conditional random field model based on historical input question semantic blocks and corresponding input question semantic block dependencies. The airport model is trained; according to the input question semantic block dependency, the input question core semantic block is extracted from the input question semantic block; the input question semantic block vector and the input question core semantic block vector are determined; the input question core semantic block vector is calculated to obtain a first similarity with the semantic block vector of the pre-built knowledge base; the input question semantic block vector is calculated to obtain a second similarity with the semantic block vector of the pre-built knowledge base; the first similarity and the second similarity are weighted averaged and aggregated to obtain a list of answers matching the input question; the list of answers matching the input question is pushed to the user. Compared with the technical solutions in the prior art, the pre-built knowledge base can save the communication cost between bank staff and bank developers, reply users in time, and improve the user experience; similarity calculation is performed through semantic block vectors to avoid directly calculating similarity after word segmentation, which can improve the accuracy of question retrieval.
[0054] In the specific implementation, firstly, the user input question is received, the input question is segmented and stop words are removed, and the input question with part-of-speech information is obtained. The part-of-speech information may be, for example, a noun, a verb, or an adjective.
[0055] In one embodiment, before receiving the user input question, it may also include: obtaining business knowledge related to banking products, storing it in the form of one question and one answer, and pre-building it into a knowledge base. Among them, the banking product questions in the pre-built knowledge base contain implicit semantic elements. The semantic elements are information generated in the process of analyzing the problem and play an important role in understanding the problem. The semantic elements can be entities, attributes, and events, among which entities are objectively existing and distinguishable things, the characteristics of entities are called attributes, and events refer to the operations performed on entities in the question or the behaviors of the entity itself.
[0056] After receiving the user input question, the input question is segmented and stop words are removed to obtain the input question with part-of-speech information, and the input question with part-of-speech information is input into the semantic block output model to obtain the input question semantic block; the semantic block output model is obtained by training the conditional random field model according to the historical input question and the corresponding input question semantic block. Among them, the semantic block can be divided into the categories shown in Table 1, for example:
[0057] Table 1
[0058] Ingredients labeling Description Entity entity Attribute Entity attributes AttributeValue Entity attribute value Event event EventAttribute Event attribute value
[0059] In addition, the BIO model (B represents the beginning of a certain type, I represents the middle of a certain type, and O represents not belonging to any type) is used to mark the semantic blocks, as shown in Table 2, where the mark of each semantic block consists of two parts. The first part is the semantic type of the semantic block, and the semantic type can be, for example, any of the following types: entity, attribute, attribute value, event, event attribute value; the second part is the position of the word in the semantic block.
[0060] Table 2
[0061]
[0062]
[0063] Figure 2 FIG. 1 is a specific example diagram of training and testing the semantic block output model provided in an embodiment of the present invention, such as Figure 2 As shown, in an embodiment of the present invention, the process of training and testing before inputting the input question with part-of-speech information into the semantic block output model may include:
[0064] Step 201: Obtain historical input questions and corresponding input question semantic blocks as sample data, and construct a training set and a test set;
[0065] Step 202: training the conditional random field model using the training set to obtain a semantic block output model;
[0066] Step 203: Testing the semantic block output model using the test set to obtain the semantic blocks of the historical input questions obtained in the test;
[0067] Step 204: Compare the semantic block of the historical input question obtained by the test with the semantic block of the corresponding historical input question in the sample data to determine the similarity;
[0068] Step 205: When the similarity reaches the threshold, a trained semantic block output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data, and the conditional random field model is continued to be trained.
[0069] In one embodiment, obtaining historical input questions and corresponding semantic blocks of input questions as sample data and constructing a training set and a test set may include: segmenting the historical input questions and removing stop words to obtain historical input questions composed of words with part-of-speech information; wherein the part-of-speech information includes any one of the following multiple parts of speech: noun, verb, adjective; annotating the semantic blocks of the historical input questions to obtain annotated semantic blocks of the historical input questions; wherein the annotation information includes semantic element information of the words in the semantic blocks and position information of the words in the semantic blocks; using the historical input questions composed of words with part-of-speech information and the semantic blocks of the annotated historical input questions as sample data to construct a training set and a test set.
[0070] Specifically, the process of labeling the semantic blocks of historical input questions may be, for example: performing word segmentation processing on the historical input questions to obtain historical input questions composed of words with part-of-speech information; representing the semantic blocks of the historical input questions as a sequence X=x1x2...x n The form of the optimal output sequence Y=y1y2...y n For example, in this example, the historical input question is “What is the upper limit of the limit value?” After word segmentation of the historical input question, “limit value / n’s / undel upper limit / n how big / m is / a? / ww” and the corresponding BIO tag information are obtained, as shown in Table 3.
[0071] Table 3
[0072]
[0073]
[0074] According to the historical input questions composed of words with part-of-speech information and marked with BIO, the marked historical input question semantic blocks are obtained according to the following semantic block recognition method: if a line ends with "B" or is a blank line, and the next line ends with "B" or the next line is a blank line, the words in this line will not be merged with the words in other lines, and the words in this line are independently a semantic block; if the Nth line ends with "I", and the next line ends with "B" or the next line is a blank line, then the lines before the Nth line are traversed, and when the Mth line ends with "B", the traversal is terminated, and all the words from the Mth line to the Nth line form a semantic block; other lines are not processed.
[0075] Specifically, when constructing a training set and a test set, a sample data template needs to be designed in advance. The pre-designed sample data template may be, for example, as shown in Table 4, wherein, in %X[row,col], %X represents the current word, row represents the row position relative to the current word, and col represents the column position relative to the current word.
[0076] Table 4
[0077] 00:%X[-1,1] 01:%X[1,1] 02:%X[-1,2] 03:%X[1,2] 04:%X[0,0] 05:%X[0,1] / %X[0,2] 06:%X[0,1] 07:%X[0,4] / %X[0,5] 08:%X[0,2] 09:%X[0,4] / %X[0,6] 10:%X[0,3] 11:%X[-1,2] / %X[0,1] 12:%X[0,2] / %X[1,1]
[0078] According to the sample data template shown in Table 4, when representing the sample data, the vector of the sample data in the table can be accurately represented. For example, in this example, the sample data can be as shown in Table 5, then for "Limit n value n upper limit n", the data corresponding to %Limit n value n upper limit n[-1,4] is the "first word"; among them, "-1" in "%Limit n value n upper limit n[-1,4]" represents the previous row relative to "Limit n value n upper limit n", and "4" in "%Limit n value n upper limit n[-1,4]" represents the last four columns relative to "Limit n value n upper limit n", then the corresponding data "first word" can be found. The data corresponding to %limit n value n upper limit n[0,4] is "limit"; among them, "0" in "%limit n value n upper limit n[0,4]" represents the same row relative to "limit n value n upper limit n", and "4" in "%limit n value n upper limit n[0,4]" represents the last four columns relative to "limit n value n upper limit n", then the corresponding data "limit" can be found.
[0079] Table 5
[0080]
[0081] An input question with part-of-speech information is input into a semantic block output model to obtain an input question semantic block; after the semantic block output model is trained on a conditional random field model based on historical input questions and corresponding input question semantic blocks, the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is trained on a conditional random field model based on historical input question semantic blocks and corresponding input question semantic block dependency.
[0082] Figure 3 FIG. 1 is a specific example diagram of training and testing the semantic block dependency output model provided in an embodiment of the present invention, such as Figure 3 As shown, in the embodiment of the present invention, the process of training and testing before inputting the input question semantic block into the semantic block dependency output model may include:
[0083] Step 301: Obtain historical input question semantic blocks and corresponding input question semantic block dependencies as sample data, and construct a training set and a test set;
[0084] Step 302: training the conditional random field model using the training set to obtain a semantic block dependency output model;
[0085] Step 303: testing the semantic block dependency output model using the test set to obtain the semantic block dependency obtained by the test;
[0086] Step 304: Compare the semantic block dependency relationship obtained by the test with the dependency relationship of the corresponding semantic block in the sample data to determine the similarity;
[0087] Step 305: When the similarity reaches the threshold, a trained semantic block dependency output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data, and the conditional random field model is continued to be trained.
[0088] In specific implementation, there are multiple types of dependency relationships, and the types of dependency relationships can be shown in Table 6, for example. When the conditional random field model is trained using the training set, the words whose semantic elements are entities in the historical input question semantic block are first identified, and the words are used as dependent words. According to all the dependent words and their positions in the historical input question semantic block, other words that have dependency relationships with the dependent word are found, and the dependency relationship between the dependent word and the other words is used as the dependency relationship of the historical input question semantic block where the dependent word is located.
[0089] Table 6
[0090]
[0091]
[0092] After inputting the input question semantic block into the semantic block dependency output model to obtain the input question semantic block dependency, the input question core semantic block is extracted from the input question semantic block according to the input question semantic block dependency. Specifically, according to the input question semantic block dependency, the dependency words in the input question semantic block are found, and the dependency words or the components of the dependency words are extracted as the input question core semantic block.
[0093] After extracting the input question core semantic block from the input question semantic block according to the input question semantic block dependency, the input question semantic block vector and the input question core semantic block vector are determined. Figure 4 Schematic diagram of the structure of the semantic block vector model provided in an embodiment of the present invention. Figure 4As shown, in this example, after the semantic block vector model is trained and tested, the input question semantic block vector and the input question core semantic block vector can be determined through the semantic block vector model. The semantic block vector model is trained and tested in the following manner. First, the semantic block is one-hot encoded (one bit is valid); the one-hot encoding of all semantic blocks is multiplied by the input weight matrix W (the input weight matrix W is initialized to an N×V matrix, where N represents the dimension of the vector space after dimensionality reduction, V represents the dimension of the dictionary vector space, and the dictionary is all the input problem semantic blocks in the sample data), and the obtained matrices are added and averaged as the hidden layer vector; the hidden layer vector is multiplied by the output weight matrix Q (initialized to a V×N matrix) to obtain the central word vector, and the Softmax function (normalized exponential function, given an initial parameter) is used to predict the probability of the central word vector; iterate continuously, and the position with the largest probability, that is, the predicted semantic block vector, is compared with the one-hot encoding of the semantic block. When the error is less than or equal to the set value, it means that the input weight matrix W and the output weight matrix Q tend to be stable, and the stable input weight matrix W and output weight matrix Q can be used as parameters of the Softmax function to further obtain the semantic block vector model. Among them, W(i-2)W(i-1)W(i)W(i+1)W(i+2) are multiple semantic blocks that make up an input question. The semantic block vector model determines the position of W(i) of the output layer in the dictionary space through the prediction layer according to W(i-2), W(i-1), W(i+1), and W(i+2) of the input layer, that is, determines the semantic block vector of W(i). Inputting the input question semantic block into the semantic block vector model can output the input question semantic block vector; inputting the input question core semantic block into the semantic block vector model can output the input question core semantic block vector.
[0094] After determining the input question semantic block vector and the input question core semantic block vector, perform similarity calculation between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a first similarity; perform similarity calculation between the input question semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a second similarity; perform weighted average aggregation on the first similarity and the second similarity to obtain a list of answers that match the input question. Specifically, perform similarity calculation between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base, for example, it can be that the cosine angle calculation is performed between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base; perform similarity calculation between the input question semantic block vector and the semantic block vector of the pre-built knowledge base, for example, it can be that the cosine angle calculation is performed between the input question semantic block vector and the semantic block vector of the pre-built knowledge base.
[0095] After performing weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question, the list of answers matching the input question is pushed to the user.
[0096] In one embodiment, after the answer list matching the input question is pushed to the user, it may also include: when the answer list pushed to the user matches the user input question, marking the input question as solved; when the answer list pushed to the user does not match the user input question, marking the input question as unsolved, and pushing the input question to maintenance personnel for maintenance.
[0097] The present invention also provides a bank product problem retrieval device, as described in the following embodiments. Since the principle of solving the problem of the device is similar to that of the bank product problem retrieval method, the implementation of the device can refer to the implementation of the bank product problem retrieval method, and the repeated parts will not be repeated.
[0098] The embodiment of the present invention provides a bank product problem retrieval device. Figure 5 FIG. 1 is a schematic diagram of the structure of a bank product problem retrieval device provided in an embodiment of the present invention. Figure 5 As shown, the device includes the following modules:
[0099] The acquisition module 51 is used to receive a question input by a user, segment the input question and remove stop words, and obtain the input question with part-of-speech information;
[0100] The input module 52 is used to input the input question with part-of-speech information into the semantic block output model to obtain the input question semantic block; the semantic block output model is obtained by training the conditional random field model according to the historical input question and the corresponding input question semantic block; the input question semantic block is input into the semantic block dependency output model to obtain the input question semantic block dependency; the semantic block dependency output model is obtained by training the conditional random field model according to the historical input question semantic block and the corresponding input question semantic block dependency;
[0101] An extraction module 53, used to extract the input question core semantic block from the input question semantic block according to the input question semantic block dependency;
[0102] A determination module 54, used to determine an input question semantic block vector and an input question core semantic block vector;
[0103] The calculation module 55 is used to calculate the similarity between the core semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a first similarity; calculate the similarity between the semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a second similarity; perform weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question;
[0104] The push module 56 is used to push a list of answers matching the input question to the user.
[0105] Figure 6 FIG. 1 is a specific example diagram of a bank product problem retrieval device provided in an embodiment of the present invention, as shown in FIG. Figure 6 As shown, in this example, Figure 5 The bank product question retrieval device shown also includes:
[0106] Construction module 61 is used to obtain the business knowledge related to banking products before module 51, store it in the form of questions and answers, and pre-construct it into a knowledge base.
[0107] Figure 7 FIG. 1 is a specific example diagram of a bank product problem retrieval device provided in an embodiment of the present invention, as shown in FIG. Figure 7 As shown, in this example, Figure 6 The bank product question retrieval device shown also includes:
[0108] The first training and testing module 71 is used before inputting the input question with part-of-speech information into the semantic chunk output model:
[0109] Obtain historical input questions and corresponding input question semantic blocks as sample data to construct training sets and test sets;
[0110] The conditional random field model is trained using the training set to obtain a semantic block output model;
[0111] The semantic block output model is tested using the test set to obtain the semantic blocks of the historical input questions obtained in the test;
[0112] Compare the semantic blocks of the historical input questions obtained by the test with the semantic blocks of the corresponding historical input questions in the sample data to determine the similarity;
[0113] When the similarity reaches the threshold, the trained semantic block output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data, and the conditional random field model is continued to be trained.
[0114] In one embodiment, the first training and testing module 71 is specifically used to: segment the historical input questions and remove stop words to obtain historical input questions composed of words with part-of-speech information; wherein the part-of-speech information includes any one of the following parts of speech: noun, verb, adjective; annotate the semantic blocks of the historical input questions to obtain the annotated semantic blocks of the historical input questions; wherein the annotated information includes the semantic element information of the words in the semantic blocks and the position information of the words in the semantic blocks; use the historical input questions composed of words with part-of-speech information and the annotated semantic blocks of the historical input questions as sample data to construct a training set and a test set.
[0115] Figure 8 FIG. 1 is a specific example diagram of a bank product problem retrieval device provided in an embodiment of the present invention, as shown in FIG. Figure 8 As shown, in this example, Figure 7 The bank product question retrieval device shown also includes:
[0116] The second training and testing module 81 is used for, before inputting the question semantic block into the semantic block dependency output model:
[0117] Obtain historical input question semantic blocks and corresponding input question semantic block dependencies as sample data, and construct training sets and test sets;
[0118] The conditional random field model is trained using the training set to obtain a semantic block dependency output model;
[0119] Using the test set to test the semantic block dependency output model, and obtaining the semantic block dependency obtained by the test;
[0120] Compare the semantic block dependency relationship obtained by the test with the dependency relationship of the corresponding semantic block in the sample data to determine the similarity;
[0121] When the similarity reaches the threshold, the trained semantic block dependency output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data to continue training the conditional random field model.
[0122] In one embodiment, it also includes: when the answer list pushed to the user meets the user input question, marking the input question as solved; when the answer list pushed to the user does not meet the user input question, marking the input question as unsolved, and pushing the input question to maintenance personnel for maintenance.
[0123] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned bank product problem retrieval method when executing the computer program.
[0124] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned bank product problem retrieval method is implemented.
[0125] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned bank product problem retrieval method is implemented.
[0126] In an embodiment of the present invention, a user input question is received, the input question is segmented and stop words are removed to obtain an input question with part-of-speech information; the input question with part-of-speech information is input into a semantic block output model to obtain an input question semantic block; the semantic block output model is trained on a conditional random field model according to historical input questions and corresponding input question semantic blocks; the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is trained on a conditional random field model according to historical input question semantic blocks and corresponding input question semantic block dependencies; according to the input question semantic block dependency, an input question core semantic block is extracted from the input question semantic block; an input question semantic block vector and an input question core semantic block vector are determined; similarity calculation is performed between the input question core semantic block vector and a semantic block vector of a pre-built knowledge base to obtain a first similarity; similarity calculation is performed between the input question semantic block vector and a semantic block vector of a pre-built knowledge base to obtain a second similarity; the first similarity and the second similarity are weighted averaged and aggregated to obtain a list of answers matching the input question; and the list of answers matching the input question is pushed to the user. Compared with the technical solutions in the existing technology, the pre-built knowledge base can save the communication costs between bank staff and bank developers, respond to users in a timely manner, and improve user experience; similarity calculation is performed through semantic block vectors, avoiding direct similarity calculation after word segmentation, which can improve the accuracy of question retrieval.
[0127] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] 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 executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing 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.
[0131] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A bank product problem retrieval method, characterized in that: include: Receive user input questions, segment the input questions and remove stop words, and obtain input questions with part-of-speech information; Inputting the input question with part-of-speech information into the semantic block output model to obtain the input question semantic block; the semantic block output model is obtained by training the conditional random field model according to the historical input question and the corresponding input question semantic block; Inputting the input question semantic block into the semantic block dependency output model to obtain the input question semantic block dependency; the semantic block dependency output model is obtained by training the conditional random field model according to the historical input question semantic blocks and the corresponding input question semantic block dependency; Extracting the core semantic block of the input question from the semantic block of the input question according to the dependency relationship of the semantic block of the input question; Determine the input question semantic block vector and the input question core semantic block vector; Calculate the similarity between the input question core semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a first similarity; Calculate the similarity between the input question semantic block vector and the semantic block vector of the pre-built knowledge base to obtain a second similarity; Perform a weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question; Push a list of answers matching the input question to the user; According to the dependency relationship of the input question semantic blocks, the core semantic blocks of the input question are extracted from the input question semantic blocks, including: According to the dependency relationship of the input question semantic block, the dependent words in the input question semantic block are found, and the dependent words or the components of the dependent words are extracted as the input question core semantic block.
2. The bank product problem retrieval method according to claim 1, characterized in that: Before receiving user input questions, also include: Acquire business knowledge related to banking products, store it in a question-and-answer format, and pre-build it into a knowledge base.
3. The bank product problem retrieval method according to claim 1, characterized in that: Before the input question with part-of-speech information is fed into the semantic chunk output model, it also includes: Obtain historical input questions and corresponding input question semantic blocks as sample data to construct training sets and test sets; The conditional random field model is trained using the training set to obtain a semantic block output model; The semantic block output model is tested using the test set to obtain the semantic blocks of the historical input questions obtained in the test; Compare the semantic blocks of the historical input questions obtained by the test with the semantic blocks of the corresponding historical input questions in the sample data to determine the similarity; When the similarity reaches the threshold, the trained semantic block output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data, and the conditional random field model is continued to be trained.
4. The bank product problem retrieval method according to claim 3, characterized in that: Get historical input questions and corresponding input question semantic blocks as sample data, and build training sets and test sets, including: Segment the historical input questions and remove stop words to obtain historical input questions consisting of words with part-of-speech information; wherein the part-of-speech information includes any one of the following parts of speech: noun, verb, adjective; Annotating the semantic blocks of the historical input questions to obtain annotated semantic blocks of the historical input questions; wherein the annotation information includes semantic element information of words in the semantic blocks and position information of the words in the semantic blocks; The historical input questions consisting of words with part-of-speech information and the semantic blocks of the annotated historical input questions are used as sample data to construct training sets and test sets.
5. The bank product problem retrieval method according to claim 1, characterized in that: Before inputting the input question semantic block into the semantic block dependency output model, it also includes: Obtain historical input question semantic blocks and corresponding input question semantic block dependencies as sample data, and construct training sets and test sets; The conditional random field model is trained using the training set to obtain a semantic block dependency output model; Using the test set to test the semantic block dependency output model, and obtaining the semantic block dependency obtained by the test; Compare the semantic block dependency relationship obtained by the test with the dependency relationship of the corresponding semantic block in the sample data to determine the similarity; When the similarity reaches the threshold, the trained semantic block dependency output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data to continue training the conditional random field model.
6. The bank product problem retrieval method according to claim 1, characterized in that: After the list of answers matching the input question is pushed to the user, also include: When the answer list pushed to the user meets the user's input question, mark the input question as solved; When the answer list pushed to the user does not meet the user input question, the input question is marked as unresolved and pushed to the maintenance personnel for maintenance.
7. A bank product problem retrieval device, characterized in that: include: An acquisition module is used to receive user input questions, segment the input questions and remove stop words, and obtain the input questions with part-of-speech information; An input module is used to input an input question with part-of-speech information into a semantic block output model to obtain an input question semantic block; the semantic block output model is obtained by training a conditional random field model based on historical input questions and corresponding input question semantic blocks; the input question semantic block is input into a semantic block dependency output model to obtain an input question semantic block dependency; the semantic block dependency output model is obtained by training a conditional random field model based on historical input question semantic blocks and corresponding input question semantic block dependency; An extraction module, used for extracting a core semantic block of an input question from the semantic blocks of the input question according to the dependency relationship of the semantic blocks of the input question; A determination module, used to determine an input question semantic block vector and an input question core semantic block vector; A calculation module is used to calculate the similarity between the core semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a first similarity; calculate the similarity between the semantic block vector of the input question and the semantic block vector of the pre-built knowledge base to obtain a second similarity; perform weighted average aggregation on the first similarity and the second similarity to obtain a list of answers matching the input question; A push module is used to push a list of answers matching the input question to the user; Extraction module, specifically used for: According to the dependency relationship of the input question semantic block, the dependent words in the input question semantic block are found, and the dependent words or the components of the dependent words are extracted as the input question core semantic block.
8. The bank product problem retrieval device according to claim 7, characterized in that: Also included are building blocks for: Acquire business knowledge related to banking products, store it in a question-and-answer format, and pre-build it into a knowledge base.
9. The bank product problem retrieval device according to claim 7, characterized in that: The first training and testing module is also included, which is used before inputting the input question with part-of-speech information into the semantic chunk output model: Obtain historical input questions and corresponding input question semantic blocks as sample data to construct training sets and test sets; The conditional random field model is trained using the training set to obtain a semantic block output model; The semantic block output model is tested using the test set to obtain the semantic blocks of the historical input questions obtained in the test; Compare the semantic blocks of the historical input questions obtained by the test with the semantic blocks of the corresponding historical input questions in the sample data to determine the similarity; When the similarity reaches the threshold, the trained semantic block output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data, and the conditional random field model is continued to be trained.
10. The bank product problem retrieval device according to claim 9, characterized in that: The first training and testing module is specifically used for: Segment the historical input questions and remove stop words to obtain historical input questions consisting of words with part-of-speech information; wherein the part-of-speech information includes any one of the following parts of speech: noun, verb, adjective; Annotating the semantic blocks of the historical input questions to obtain annotated semantic blocks of the historical input questions; wherein the annotation information includes semantic element information of words in the semantic blocks and position information of the words in the semantic blocks; The historical input questions consisting of words with part-of-speech information and the semantic blocks of the annotated historical input questions are used as sample data to construct training sets and test sets.
11. The bank product problem retrieval device according to claim 7, characterized in that: The second training and testing module is further included, which is used before inputting the input question semantic block into the semantic block dependency output model: Obtain historical input question semantic blocks and corresponding input question semantic block dependencies as sample data, and construct training sets and test sets; The conditional random field model is trained using the training set to obtain a semantic block dependency output model; Using the test set to test the semantic block dependency output model, and obtaining the semantic block dependency obtained by the test; Compare the semantic block dependency relationship obtained by the test with the dependency relationship of the corresponding semantic block in the sample data to determine the similarity; When the similarity reaches the threshold, the trained semantic block dependency output model is obtained; when the similarity does not reach the threshold, the sample data is updated, and the training set and the test set are updated according to the updated sample data to continue training the conditional random field model.
12. The bank product problem retrieval device according to claim 7, characterized in that: Also includes: When the answer list pushed to the user meets the user's input question, mark the input question as solved; When the answer list pushed to the user does not meet the user input question, the input question is marked as unresolved and pushed to the maintenance personnel for maintenance.
13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the banking product question retrieval method described in any one of claims 1 to 6 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the bank product problem retrieval method according to any one of claims 1 to 6 is implemented.
15. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the bank product question retrieval method according to any one of claims 1 to 6 is implemented.
