[0082] Example one
[0083] See figure 1 , figure 1 A first flow diagram of an intelligent question and answer method based on an enterprise entity is applied to the server, such as figure 1 As shown, the method includes the following steps:
[0084] S110, identify the target enterprise entity in the user input question;
[0085] The process is to obtain target enterprise entities within the user input, and link to enterprise-enriched enterprise entities. The business entity in the question may be full name, referred to as a brand name, such as "Bank of China Co., Ltd.", "Baidu", "Hungry", "Bank of China Co., Ltd.", "Hungry", "Bank of China Co., Ltd.", "Hungry" Enterprise entity.
[0086] Alternatively, the present embodiment identifies the target enterprise entity in the user input question based on the BILSTM-CRF model.
[0087] The BILSTM_CRF model is a two-way LSTM (long-term memory network, long short-term memory) model and CRF (condition random, Condensional Random Fields) model. The LSTM model solves the defects of the original circulatory neural network, which has become the current most popular neural network model, successful application in many fields such as speech recognition, picture description, natural language processing, and the CRF model is a discriminant probability model, which is an airport. One, is often used in labeling or analyzing sequence information, such as natural language or biological sequence.
[0088] In the Bilstm_CRF model training stage, the training data set adopts the People's Daily 1998 annotation, and the data enhancement strategy is used to expand the corporate. It is to replace some companies in the people's daily in accordance with certain proportion of enterprise knowledge base. Entities, experiments show that the strategy can improve the identification accuracy of enterprise entities. The model training phase uses the Bies and O labeling system to mark the corners, namely Begin, Inner, End, Single and Other, the loss function is the cross entropy loss function, and the Momentum Optimization Algorithm is used for model parameters learning.
[0089] When data training, each word in each training statement is quantified by Embedding mode. After entering the two-way LSTM model, get the hidden layer output of each time T, and then give the two-way hidden layers of each time. Finally, use the full connection layer Mapped to n × k dimension R n×k The vectors P obtained in the space, where K is all the number of named entity tabs. After entering the vector P to the CRF layer, the final score function Where A is the label from Y i Y i+1 Transfer matrix, then use the SoftMax function to make globally normalized score functions.
[0090] Specifically, based on the BILSTM-CRF model, identify the target enterprise entity in the user input question, including:
[0091] When each single word in the user input question is quantified, entered into the BILSTM-CRF model, obtain the label of each single word;
[0092] The maximum probability of label sequence is calculated using the Viteri algorithm;
[0093] According to the label sequence, the target enterprise entity in the user input question is determined.
[0094] S120, based on the correspondence between enterprise entities and corporate knowledge base, the final enterprise entity corresponding to the target enterprise entity;
[0095] In order to further improve the accuracy of the enterprise entity in the corporate knowledge base, the company's abbreviated as a commonly known company's referreditter ornament is used to supplement the company's knowledge base, such as common Internet companies, financial technology companies, etc.
[0096] In question, the company may have a company, such as "Baidu", "Tencent" and company brand name "Hungry", "US Mission" and company have used names, "Baidu", "Baidu", "" Baidu "correspondence Baidu Online Network Technology (Beijing) Co., Ltd. "," Tencent "correspondence is" Shenzhen Tencent Computer System Co., Ltd. "," Hungry, "Correspondence Enterprise Entity is" Shanghai Razas Information Technology " Co., Ltd., "US Mission", the "US Mission" corresponds to the "Beijing Third Express Technology Co., Ltd." and so on. In order to solve the above-mentioned company, the brand name and the name of the name are identical to the same enterprise entity. This embodiment uses the PageRank diagram model, the BM25 algorithm, and the alias dictionary, and link to the same enterprise entity of the corporate knowledge base, and then The final enterprise entity corresponding to the target enterprise entity.
[0097] S130 determines the attribute set of the final enterprise entity, and collects the attribute set as a collection of candidate answers to the target enterprise entity;
[0098] After obtaining the final enterprise entity corresponding to the user entry, the target enterprise entity is obtained from the enterprise knowledge base, and all attributes of the corresponding target enterprise entity can be obtained, and the properties of the enterprise entity include, but are not limited to, one of the following properties. Several types:
[0099] The company type, corporate address, business scope, industry, registered capital, shareholder information, foreign investment and consistent actors.
[0100] S140, based on the MV-LSTM model, determine the matching value of the user input question and the attribute set, and the attribute corresponding to the maximum match value is the final answer of the user input question.
[0101]After searching for the attribute collection of the final enterprise entity, it needs to be determined which attribute is consistent with the user input. Here is the matching value of the user input question and attribute, and then the maximum match value is highest. The attribute is the final answer to the user input question.
[0102] Specifically, the MV-LSTM model is used during the matching calculation, and the MV-LSTM model is a multi-semant model based on the bidirectional LSTM network. The two-way LSTM is used to process two sentences, and then the LSTM hidden layer output is used to calculate matching value. To confirm the properties of the target enterprise entity in the user input question, you can think that this is a MULTI-View (MV) process, which can examine the meaning of each word in different contexts.
[0103] Specifically, the training processes of the MV-LSTM model include: training data, training data, and training data, industry classification, business scope, registered capital, executives, legal persons, and foreign investment. Each training sample includes a question and an attribute, while the negative sample of training data is obtained by random sampling. Hinge loss function (Hinge Loss):
[0104]
[0105] among them Match score for the right sample, Match score for negative samples.
[0106] After the model prediction phase, after the words and candidate properties are embedded, first get the hidden layer representation of each word, ask the hidden layer of the candidate attribute two times indicating the Cosine function, the double linear function, and the Tensor function calculation. After getting three similarity matrices, then enter K-Max Pooling (Pihua) and MLP (all connected neural networks, multilayer perceptron), and finally after a linear conversion got the final match score, the maximum candidate attribute with the score is used as a candidate property. The final answer of question.
[0107] After determining the question of the final enterprise entity and the most matching attribute of the corporate knowledge base, the most matching entity property is directly returned to the user as a question.
[0108] Specifically, based on the MV-LSTM model, it is determined that the user input is a matching value of each attribute in the attribute set, and the attribute corresponding to the maximum match is determined as the final answer of the user input question, including:
[0109] The user input question and the attribute set respectively perform EmbedDing to quantization;
[0110] When the quantized user input question and attribute set input into the two-way LSTM network structure, obtain the hidden layer output of each time T and the two-way hidden layer output of the time is given
[0111] The similarity value between the two time steps of the corresponding two time steps of the corresponding hidden layer output of the COSINE function, the double linear function, and the TENSOR function, respectively, the similar values calculated by the three similarity functions constitute three similar matrices. M m×n.
[0112] The similar matrix M extracts the similar matrix M using K-MAX POOLING for the three similar matrices. m×n Key matching feature;
[0113] The key matching feature of the extracted three similarity matrices uses a full connection layer connection and linear conversion calculation score, and the score of the calculation is determined as the user input question and the matching value of each attribute in the attribute set. ;
[0114] The attribute corresponding to the maximum match value is the final answer of the user input question.
[0115] In this embodiment, the intelligent question and answer method based on enterprise-based entity is adopted by enterprise knowledge base and deep learning technology. Enterprise Knowledge Library will provide a basis for the question of question, and deep learning technology is provided in question understanding and answering phase. Powerful technical guarantees, can play an important role in solving the question and answer scene around the enterprise entity. The present invention uses the physical recognition technology based on the BILSTM-CRF model in the problem, and the abbreviation and brand name of the enterprise entity can be accurately identified. The MV-LSTM model is used in the matching process. The model can ask the core issue and the corporate entity property in the enterprise knowledge base, which greatly enhances the accuracy of the problematic answer.