CN110309281A - Answering method, device, computer equipment and the storage medium of knowledge based map - Google Patents

Answering method, device, computer equipment and the storage medium of knowledge based map Download PDF

Info

Publication number
CN110309281A
CN110309281A CN201910452305.9A CN201910452305A CN110309281A CN 110309281 A CN110309281 A CN 110309281A CN 201910452305 A CN201910452305 A CN 201910452305A CN 110309281 A CN110309281 A CN 110309281A
Authority
CN
China
Prior art keywords
input
prediction
feature value
input feature
prediction output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910452305.9A
Other languages
Chinese (zh)
Inventor
朱威
梁欣
周晓峰
李春宇
倪渊
谢国彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910452305.9A priority Critical patent/CN110309281A/en
Publication of CN110309281A publication Critical patent/CN110309281A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features

Abstract

The invention discloses answering method, device, computer equipment and the storage mediums of a kind of knowledge based map.This method comprises: obtaining input information, and according to the input acquisition of information input feature value;Based on deep learning model, first prediction output of the input feature value in the knowledge mapping being pre-created is calculated;Based on width learning model, second prediction output of the input feature value in the knowledge mapping being pre-created is calculated;According to the first prediction output and the second prediction output, the prediction output of the input feature value is obtained;And exported according to the prediction, obtain the corresponding answer of the input information.This method can also drop effectively using external resources such as the synonym of the relationship fact or upper and lower clictions and obtain the higher answer of matching degree when data volume is less.

Description

Answering method, device, computer equipment and the storage medium of knowledge based map
Technical field
The present invention relates to field of computer technology more particularly to a kind of answering method of knowledge based map, question and answer system, Computer equipment and storage medium.
Background technique
Traditional question and answer system is divided into question sentence processing and two large divisions is retrieved in answer.Wherein, the basis of question sentence processing is point Word.Answer retrieval mostly uses scoring, i.e., a series of candidate answers are chosen from mass text data, then building selection letter Number chooses immediate answer from candidate answers.The basis of these question and answer systems and answering method is text information, to reality It is in some issue handlings centered on body and improper.For example, " Jingzhou City, Hubei Province population is how many ".If question and answer system " Jingzhou City's population be ... ten thousand people " is write out in data set there is no direct answer, then this problem can not just be answered.But The answer of this problem is but present in knowledge base, as long as we can establish the mapping of natural language to knowledge base, that We can be obtained by answer.
Currently, there are two main classes for the question and answer system of knowledge based map.The first kind: the end-to-end side based on deep learning Method.This kind of methods rely on data volume, carry out semantic understanding to problem using deep neural network, then find in knowledge base It is true with the most similar relationship of question semanteme.This kind of methods can reach very big essence in data volume situation sufficient enough Degree, but be limited in that, the field new for one, training set required for building knowledge base question and answer system training is time-consuming It is very long.Second class: belong to conventional machines study, rely on the feature of Manual definition.This kind of methods first can be in external resource Then the synonym of the middle collection relationship fact, the information such as upper and lower cliction parse question sentence, extract some similarity features, Then constitutive characteristic vector sorts scheduling algorithm to candidate answers sequence by machine learning.Question and answer number needed for this kind of methods According to few, but defect is can not to do semantic understanding, especially cannot be distinguished which word in a question sentence is important, which is not Important.For example, " aspirin is which patient eats " this question sentence is the indication (adaptation population) for asking aspirin, but It is that the words may be divided into " usage and dosage " this relationship because of " eating " this keyword by conventional learning algorithms.
Summary of the invention
In view of this, the present invention proposes the answering method of knowledge based map a kind of, question and answer system, computer equipment and deposits Storage media, required data volume is few, can train required training set in a relatively short period of time, while can distinguish key Word finds most matched answer.
Firstly, to achieve the above object, the present invention proposes a kind of answering method of knowledge based map, this method includes step It is rapid:
Input information is obtained, and according to the input acquisition of information input feature value;
Based on deep learning model, first prediction of the input feature value in the knowledge mapping being pre-created is calculated Output;
Based on width learning model, second prediction of the input feature value in the knowledge mapping being pre-created is calculated Output;
According to the first prediction output and the second prediction output, the prediction for obtaining the input feature value is defeated Out;And
It is exported according to the prediction, obtains the corresponding answer of the input information.
Further, the acquisition inputs information, and is wrapped according to the step of input acquisition of information input feature value It includes:
Obtain input information;And
Extract the characteristic information in the input information, and according to the characteristic information generate corresponding input feature vector to Amount.
Further, the input feature value include according to the question sentence information of user's input and the first input for obtaining is special Sign vector, the second input feature value obtained based on the knowledge mapping being pre-created and the third input based on Manual definition Feature vector.
Further, described to be based on deep learning model, the input feature value is calculated in the knowledge graph being pre-created First in spectrum includes: the step of predicting output
The dimension of first input feature value is converted, the first low-dimensional feature vector is obtained;
Using the first low-dimensional feature vector as the input of convolutional network, the first characteristic of division vector is obtained;
The dimension of second input feature value is converted, the second low-dimensional feature vector is obtained;And
According to the first characteristic of division vector, the second low-dimensional feature vector and the knowledge mapping, first is obtained Prediction output.
Further, described to be based on width learning model, the input feature value is calculated in the knowledge graph being pre-created Second in spectrum includes: the step of predicting output
Using the third low-dimensional feature vector as the input of disaggregated model, the second characteristic of division vector is obtained;And
According to knowledge mapping described in the second characteristic of division vector sum, the second prediction output is obtained.
Further, described to be exported according to the first prediction output and second prediction, obtain the input feature vector Vector prediction output the step of include:
First prediction output and the second prediction output described in weighted sum, obtain medium range forecast output;And
The medium range forecast is exported into the input as logistic regression function, obtains the prediction output.
Further, described to be exported according to the first prediction output and second prediction, obtain the input feature vector After the step of prediction output of vector, the method also includes:
According to the known output of the prediction output and the input information, error gradient is determined;And
According to the error gradient, backpropagation simultaneously updates the deep learning model and width learning model.
To achieve the above object, the present invention proposes that a kind of question and answer system of knowledge based map, the question and answer system include:
First obtains module, for obtaining input information, and according to the input acquisition of information input feature value;
First computing module calculates the input feature value and knows what is be pre-created for being based on deep learning model Know the first prediction output in map;
Second computing module calculates the input feature value and knows what is be pre-created for being based on width learning model Know the second prediction output in map;
Second obtains module, for exporting according to the first prediction output and second prediction, obtains the input The prediction of feature vector exports;And
Answer obtains module, for exporting according to the prediction, obtains the corresponding answer of the input information.
To achieve the above object, it the present invention also provides a kind of computer equipment, including memory, processor and is stored in On memory and the computer program that can run on the processor, the processor are realized when executing the computer program The step of above method.
To achieve the above object, the present invention also provides computer readable storage mediums, are stored thereon with computer program, institute State the step of above method is realized when computer program is executed by processor.
Compared to traditional technology, answering method, computer equipment and the storage of knowledge based map proposed by the invention Medium can effectively utilize external resource, and the synonym or online text of the relationship fact are efficiently used by width learning model The external resources such as word, this portion of external resource quick by text mining or directly in the way of Chinese word body etc. can obtain It arrives.Also by the combination of width learning model and deep learning model, data volume needed for can reduce model, in training data It also can be preferably exported when less as a result, this has when the knowledge mapping question and answer in exploitation new vertical field Very important meaning.
Detailed description of the invention
Fig. 1 is the flow diagram of the answering method of the knowledge based map of first embodiment of the invention;
Fig. 2 is the flow diagram of the answering method of the knowledge based map of second embodiment of the invention;
Fig. 3 is the flow diagram of the answering method of the knowledge based map of third embodiment of the invention;
Fig. 4 is the flow diagram of the answering method of the knowledge based map of fourth embodiment of the invention;
Fig. 5 is the flow diagram of the answering method of the knowledge based map of fifth embodiment of the invention;
Fig. 6 is the flow diagram of the answering method of the knowledge based map of sixth embodiment of the invention;And
Fig. 7 is the block diagram of the question and answer system of knowledge based map provided by the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
Referring to FIG. 1, providing a kind of answering method of knowledge based map in first embodiment.The answering method packet It includes:
Step S110: input information is obtained, and according to the input acquisition of information input feature value
Specifically, get user input input information, the question sentence which is inputted by user, as why It can cough, and corresponding input feature value is extracted according to the question sentence that user inputs.Wherein, input feature value includes root The first input feature value for being obtained according to the question sentence information of user's input, the obtained based on the knowledge mapping being pre-created Two input feature values and third input feature value based on Manual definition.First input feature value is input by user Question sentence information forms the sequence as unit of word or word through over-segmentation.Second input feature value is in knowledge based map Relationship is true, i.e., entity and entity relationship and construct.Third input feature value is based on Manual definition, around the relationship fact Synset and context word set calculate the question sentence information of user's input and the similarity of the relationship fact, thus the feature formed Vector.
Step 120: being based on deep learning model, calculate the input feature value in the knowledge mapping being pre-created First prediction output.
Specifically, using deep learning model, the question sentence information of user's input is calculated in the knowledge mapping being pre-created In matching degree semantically, to obtain the first prediction output.In one embodiment, in user's input, " getting angry, what this eats Medicine? ", using deep learning model, the question sentence and known drug knowledge mapping are calculated in similarity semantically, i.e. the words The semantic similarity organized with some (entity, the relationship) implemented in map, to obtain a prediction output.Wherein this is first pre- Surveying output can be a probability value, can also be other, it is not limited here.
Step S130 is based on width learning model, calculates the input feature value in the knowledge mapping being pre-created Second prediction output.
Specifically, using deep learning model, the question sentence information of user's input is calculated in the knowledge mapping being pre-created The relationship fact matching degree, to obtain the second prediction probability.In one embodiment, user input " get angry this eat it is assorted Medicine? ", find out the entity mentioned in the question sentence first, such as " excessives internal heat ", calculating the entity " excessive internal heat " in knowledge mapping certain The alias match degree of a symptom entity, this Entities Matching feature then the available Entities Matching degree is given a mark, if phase Matching, then the Entities Matching feature is equal to 1, for the remainder " what medicine<sympton>eats " and knowledge mapping in question sentence In existing relationship do feature extraction, along with Entities Matching feature before, to obtain feature vector.By this feature to The input as deep learning model is measured, to obtain a prediction output, i.e. prediction marking.Wherein, width learning model can To be generalized linear model, it is also possible to xgboost model.In the present embodiment, width learning model is xgboost model.
Step S140 exports according to the first prediction output and second prediction, obtains the input feature value Prediction output.
Specifically, summation is weighted to the first prediction output and the second prediction output, is inputted to get user Question sentence information corresponded in knowledge mapping answer final prediction output.That is, question sentence has been merged in final prediction output Semantically with the similarity of entity and in the actual matching degree of relationship in knowledge mapping, so as to more accurately obtain Taking the question sentence, there are the accuracy of answer in knowledge mapping.Wherein, the expression formula of output is predicted are as follows:
Wherein, Y is the class label of a two-value, is sigmoid label, indicates cross feature, and b is one bias, WwideIt is the weight of width learning model, WdeepIt is the weight of deep learning model, i.e. the weight of hidden layer to output layer.
Step S150 is exported according to the prediction, obtains the corresponding answer of the input information.
Specifically, the probability value of the question sentence information and the answer inquired in knowledge mapping that are inputted about user, On the one hand user is known that the accuracy of the answer, on the other hand also available to arrive answer corresponding to the probability value, with For reference.For example, user inputs " getting angry, what medicine this eats? ", prediction probability obtained by calculation has 97%, there is 78%, have 40% etc., according to the prediction probability value, user is known that 97% corresponding answer more meets the requirement of oneself.
In short, the answering method can effectively utilize external resource, relationship thing is efficiently used by width learning model The external resources such as real synonym or online cliction, this portion of external resource can be by text minings or directly in utilization The modes such as cliction body quickly obtain.Also by the combination of width learning model and deep learning model, can reduce needed for model Data volume, also can be preferably exported when training data is less as a result, this knowing in the new vertical field of exploitation There is very important meaning when knowing map question and answer.
It in the second embodiment, in the present embodiment, should referring to FIG. 2, compared to first embodiment described in Fig. 1 Method includes step S210-S260, wherein step S230-S260 and step S120-S150 in first embodiment in the present embodiment Identical, this is no longer going to repeat them.
Step S210 obtains input information.
In the present embodiment, which can be text information, be also possible to voice messaging or pictorial information, herein It is not construed as limiting.The acquisition modes of the information can be obtained by communication software, such as wechat, short message or voice chat software, also It can be obtained by input method software, such as the text information that user is inputted by input method software, it is not limited here.
Step S220 extracts the characteristic information in the input information, and corresponding defeated according to characteristic information generation Enter feature vector.
Specifically, it extracts from the input information of user, why can such as cough, it will extract " why ", " cough " characteristic information, and corresponding input spy is converted into using the method for some steering volumes according to the two characteristic informations Levy vector.Wherein, the method that this feature information is converted to the input feature value indicated with vector can be had: from presetting Information with the corresponding table of vector, search and obtain corresponding with input information input vector, thus by the input information It is converted into the input vector indicated with vector, the input information can also be converted to by vector space model and use vector table The input vector shown, it is not limited here.
Step S230 is based on deep learning model, calculates the input feature value in the knowledge mapping being pre-created First prediction output.
Step S240 is based on width learning model, calculates the input feature value in the knowledge mapping being pre-created Second prediction output.
Step S250 exports according to the first prediction output and second prediction, obtains the input feature value Prediction output.
Step S260 is exported according to the prediction, obtains the corresponding answer of the input information.
In third embodiment, referring to FIG. 3, compared to first embodiment described in Fig. 1, it in the present embodiment, should Method includes step S310-S380, wherein is walked in step S310 and step S360-S380 and first embodiment in the present embodiment Rapid S110 is identical as step S130-S150, and this is no longer going to repeat them.
Step S310 obtains input information, and according to the input acquisition of information input feature value.
Step S320 converts the dimension of first input feature value, obtains the first low-dimensional feature vector.
Specifically, since the dimension of the first input feature value is the determination according to the knowledge mapping being pre-created, it is Guarantee that the corresponding input feature value of each word does not repeat in knowledge mapping, to determine dimension according to the number of words in knowledge mapping Degree, dimensions typically thousands of or up to ten thousand, dimension is higher, is unfavorable for later period calculating, to make these high-dimensional first defeated Enter feature vector and pass through the transformation of embeding layer, to obtain the feature vector of corresponding low latitudes, is calculated convenient for the later period.
Wherein, deep learning model includes multiple neurons " layer ", i.e. input layer, hidden layer and output layer.Input layer is negative Duty receives input information and is respectively sent to hidden layer, and hidden layer is mainly responsible for calculating and output result to output layer.It is general hidden Hide layer parameter size it is related with the dimension size of hidden layer, when hidden layer input vector dimension after embeding layer, dimension Degree can become smaller, and the parameter setting of hidden layer can become smaller.Such as without embeding layer, the dimension of the first input feature value May be 4000, hidden layer take around setting 500 number of nodes, could obtain it is relatively good as a result, and after increasing embeding layer, The dimension of first input feature value is become 100 by 4000, hidden layer only about needs 50 nodes to can be obtained by not It is wrong to can be reduced number of nodes needed for hidden layer as a result, reduce dimension by setting embeding layer, so that deep learning model The speed of service greatly promotes, and reduces the resource consumption of deep learning model.
For example, having in knowledge mapping: for, it is sick, assorted, cough, 4000 Chinese characters such as cough, in order to distinguish in knowledge mapping Information needs to guarantee that the corresponding vector of each Chinese character does not duplicate in knowledge mapping, therefore it is corresponding to need to preset each Chinese character Vector is at least 4000 dimensions, and such as corresponding vector of " for " word is that (1,0,0,0,0,0,0 ... 0), and the corresponding vector of " disease " word is (etc. 0,1,0,0,0,0,0 ... 0), when input information is " why coughing ", then " for " word vector be (1,0,0,0,0,0, 0 ... 0), and " assorted " word vector is that (0,0,1,0,0,0,0 ... 0), and " " word vector is that (0,0,0,1,0,0,0 ... 0), " cough " word Vector is that (0,0,0,0,1,0,0 ... 0), and " coughing " word vector is that (0,0,0,0,0,1,0 ... 0)." why coughing " is corresponding It is exactly the combination of this five vectors, but the dimension of this five vectors is too high, each vector is 4000 dimensions, leads to vector form Input that information is larger, and the resource that need to be consumed when calculating the input information is more, and calculating speed is slow, therefore in order to improve calculating and prediction Efficiency carries out dimension transformation using embeding layer, and above-mentioned five vectors are become the lower vector of dimension, such as 100 dimensions, to subtract Consumed resource when the input information is calculated less, and then improves the computational efficiency of hidden layer.
Step S330, using the first low-dimensional feature vector as the input of convolutional network, obtain the first characteristic of division to Amount.
Specifically, input of the first low-dimensional feature vector as convolutional network passes through convolutional layer, Chi Hua in convolutional network The effect of layer, full articulamentum, so as to form the first characteristic of division vector.Wherein, convolutional network, by convolutional layer, pond layer, complete Articulamentum composition.Wherein convolutional layer and pond layer cooperate, and form multiple convolution groups, feature are successively extracted, eventually by several Full articulamentum is completed to classify.By convolution come simulation feature differentiation, and the weight for passing through convolution is shared and pond, to reduce The order of magnitude of network parameter completes the tasks such as classification finally by traditional neural network.
Step S340 converts the dimension of second input feature value, obtains the second low-dimensional feature vector.
Specifically, since the dimension of the second input feature value is the determination according to the knowledge mapping being pre-created, it is Guarantee that the corresponding input feature value of each word does not repeat in knowledge mapping, to determine dimension according to the number of words in knowledge mapping Degree, dimensions typically thousands of or up to ten thousand, dimension is higher, is unfavorable for later period calculating, to make these high-dimensional second defeated Enter feature vector and pass through the transformation of embeding layer, to obtain the feature vector of corresponding low latitudes, is calculated convenient for the later period.
Step S350, according to the first characteristic of division vector, the second low-dimensional feature vector and the knowledge mapping, Obtain the first prediction output.
Specifically, first characteristic of division vector sum the second low-dimensional feature vector is interacted in fused layer, and as likelihood The input of function likelihood, knowledge mapping is as reference, so that it is general to export a prediction after likelihood function calculating Rate, the prediction probability illustrate question sentence that user is inputted in knowledge mapping in matching degree semantically.Wherein fused layer Usually softmax is returned.
Step S360 is based on width learning model, calculates the input feature value in the knowledge mapping being pre-created Second prediction output.
Step S370 exports according to the first prediction output and second prediction, obtains the input feature value Prediction output.
Step S380 is exported according to the prediction, obtains the corresponding answer of the input information.
In the fourth embodiment, referring to FIG. 4, the step S130 in first embodiment includes:
Step S410, using the third low-dimensional feature vector as the input of disaggregated model, obtain the second characteristic of division to Amount.
Specifically, the third low-dimensional feature vector that will acquire must be inputted as disaggregated model, by one system of disaggregated model The calculating of column obtains the second characteristic of division vector.Wherein, disaggregated model mainly has xgboost classification and logistic classification etc.. In the present embodiment, logistic classification is mainly introduced.The step of logistic classifies mainly linear summation, sigmoid letter Number activation, calculates error, this 4 steps of corrected parameter.First two are used to judge, rear two step is for correcting.
In the present embodiment, only by taking two classification as an example, third input feature value is divided into 0 and 1 liang of class.For example, the Three input feature values are the X vector of n dimension, and the parameter vector W and bias (biasing) item for also having a n to tie up are linear to sum Obtain Z=WTX+b is substituted into sigmoid function, i.e. σ (Z)=σ (W again after summationTX+b), when σ (Z) is greater than 0.5, X Vector belongs to 1 class, and when σ (Z) is less than 0.5, X vector belongs to 0 class.It recycles loss function C (a, y), passes through amendment W's and b Value is come so that C is minimized, this is an optimization problem, to get the second characteristic of division vector.More classification are similar, this hair It is bright just no longer to elaborate.
Step S420 obtains the second prediction output according to knowledge mapping described in the second characteristic of division vector sum.
Specifically, using the true relationship in knowledge mapping as standard, the second characteristic of division vector and the knowledge graph are determined The matching degree of spectrum, to obtain the second prediction output.
In the 5th embodiment, referring to FIG. 5, compared to first embodiment described in Fig. 1, it in the present embodiment, should Method includes step S510-S560, wherein is walked in step S510-S530 and step S560 and first embodiment in the present embodiment Rapid S110-S130 is identical as step S150, and this is no longer going to repeat them.
Step S510 obtains input information, and according to the input acquisition of information input feature value.
Step S520 is based on deep learning model, calculates the input feature value in the knowledge mapping being pre-created First prediction output.
Step S530 is based on width learning model, calculates the input feature value in the knowledge mapping being pre-created Second prediction output.
Step S540, the first prediction output and the second prediction output described in weighted sum, obtains medium range forecast output.
Specifically, the first prediction output summation is added with the second prediction output to export to get to medium range forecast.Among this Predict that the expression formula exported isWherein,Indicate width The second prediction output of model is practised,First prediction output of expression deep learning model, being added summation is in obtaining Between predict output.
The medium range forecast is exported the input as logistic regression function by step S550, obtains the prediction output.
Specifically, which is exported into the input as logistic regression function, by the one of the logistic regression function Series can be calculated prediction output.Wherein logistic regression function is logistic recurrence.Logistic recurrence is a kind of point Class method is used for two classification problems.Its basic thought are as follows: first is that suitable hypothesis function, i.e. classification function are found, to predict The judging result of input data;Second is that construction cost function, i.e. loss function, to indicate the output result and training number of prediction According to concrete class between deviation;Third is that cost function is minimized, to obtain optimal model parameter.By logical function (sigmoid function) assumes the functions such as function (classification function), cost function to calculate prediction output.
Step S560 is exported according to the prediction, obtains the corresponding answer of the input information
In the 6th embodiment, referring to FIG. 6, compared to first embodiment described in Fig. 1, it in the present embodiment, should Method includes step S610-S660, wherein step S610-S640 and step S110-S140 in first embodiment in the present embodiment Identical, this is no longer going to repeat them.
Step S610 obtains input information, and according to the input acquisition of information input feature value.
Step S620 is based on deep learning model, calculates the input feature value in the knowledge mapping being pre-created First prediction output.
Step S630 is based on width learning model, calculates the input feature value in the knowledge mapping being pre-created Second prediction output.
Step S640 exports according to the first prediction output and second prediction, obtains the input feature value Prediction output.
Step S650 determines error gradient according to the known output of the prediction output and the input information.
Specifically, after getting prediction output, according to the known output of the input information, to calculate prediction output Gap between the known output of the input information a, so that it is determined that error gradient.
Step S660, according to the error gradient, backpropagation simultaneously updates the deep learning model and width study mould Type.
Specifically, according to the error gradient, deep learning model is propagated back to by most small quantities of stochastic gradient again, so that Deep learning model adjusts its inner parameter, reversed again by most small quantities of stochastic gradient such as the function of the embeding layer of convolutional network Width learning model is propagated to, so that width learning model also adjusts its internal parameter.Since then, it can be ensured that depth Inner parameter can constantly be adjusted according to customer problem by practising model and width learning model, and user is obtained and is more accurately answered Case.Wherein, we use optimizer of the FTRL algorithm as width learning model with L1, update deep learning mould using Adam Type.The mode that the width learning model is adjusted using minimum lot size random optimization is to follow regularization with L1 regularization (FTRL) algorithm is guided to adjust the current value of the parameter of width learning model.It is adjusted using minimum lot size random optimization described The mode of deep learning model is to carry out percentage regulation machine learning mould using the stochastic gradient optimization with adjusting learning rate The current value of the parameter of type.
Referring to FIG. 7, the question and answer system 700 wraps the present invention also provides a kind of question and answer system 700 of knowledge based map It includes:
First obtains module 710, for obtaining input information, and according to the input acquisition of information input feature value. Specifically, first acquisition module 710 get user input input information, the question sentence which is inputted by user, Why can such as cough, and corresponding input feature value is extracted according to the question sentence that user inputs.
First computing module 720 calculates the input feature value and is being pre-created for being based on deep learning model The first prediction output in knowledge mapping.Specifically, using deep learning model, the first computing module 720 calculates user's input Question sentence information in the knowledge mapping being pre-created in matching degree semantically, thus obtain the first prediction output.
Second computing module 730 calculates the input feature value and is being pre-created for being based on width learning model The second prediction output in knowledge mapping.Specifically, using deep learning model, the second computing module 730 calculates user's input The relationship fact of the question sentence information in the knowledge mapping being pre-created matching degree, to obtain the second prediction probability.
Second obtains module 740, for being exported according to the first prediction output and second prediction, obtains described defeated Enter the prediction output of feature vector.Specifically, the second acquisition module 740 adds the first prediction output and the second prediction output Power summation, to get the final prediction output that the question sentence information that user is inputted corresponds to answer in knowledge mapping.
Answer obtains module 750, for exporting according to the prediction, obtains the corresponding answer of the input information.Specifically Ground, the probability value of the question sentence information and the answer inquired in knowledge mapping that are inputted about user, user on the one hand can It is on the other hand also available to answer corresponding to the probability value to know the accuracy of the answer, it is for reference.
The present invention also provides a kind of computer equipments, can such as execute smart phone, tablet computer, the notebook electricity of program Brain, desktop computer, rack-mount server, blade server, tower server or Cabinet-type server (including independent clothes Server cluster composed by business device or multiple servers) etc..The computer equipment of the present embodiment includes at least but unlimited In: memory, the processor etc. of connection can be in communication with each other by system bus.
The present embodiment also provides a kind of computer readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic Disk, CD, server, App are stored thereon with computer program, phase are realized when program is executed by processor using store etc. Answer function.The computer readable storage medium of the present embodiment is used for storage electronics 20, this hair is realized when being executed by processor The answering method of bright knowledge based map.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of answering method of knowledge based map, which is characterized in that the method includes the steps:
Input information is obtained, and according to the input acquisition of information input feature value;
Based on deep learning model, it is defeated to calculate first prediction of the input feature value in the knowledge mapping being pre-created Out;
Based on width learning model, it is defeated to calculate second prediction of the input feature value in the knowledge mapping being pre-created Out;
According to the first prediction output and the second prediction output, the prediction output of the input feature value is obtained;And
It is exported according to the prediction, obtains the corresponding answer of the input information.
2. answering method as described in claim 1, which is characterized in that the acquisition inputs information, and is believed according to the input Ceasing the step of obtaining input feature value includes:
Obtain input information;And
The characteristic information in the input information is extracted, and corresponding input feature value is generated according to the characteristic information.
3. answering method as described in claim 1, which is characterized in that the input feature value includes being inputted according to user Question sentence information and the first input feature value obtained, the second input feature vector for being obtained based on the knowledge mapping being pre-created to Amount and the third input feature value based on Manual definition.
4. answering method as claimed in claim 3, which is characterized in that it is described to be based on deep learning model, calculate the input Feature vector in the knowledge mapping being pre-created first prediction output the step of include:
The dimension of first input feature value is converted, the first low-dimensional feature vector is obtained;
Using the first low-dimensional feature vector as the input of convolutional network, the first characteristic of division vector is obtained;
The dimension of second input feature value is converted, the second low-dimensional feature vector is obtained;And
According to the first characteristic of division vector, the second low-dimensional feature vector and the knowledge mapping, the first prediction is obtained Output.
5. answering method as described in claim 1, which is characterized in that it is described to be based on width learning model, calculate the input Feature vector in the knowledge mapping being pre-created second prediction output the step of include:
Using the third low-dimensional feature vector as the input of disaggregated model, the second characteristic of division vector is obtained;And
According to knowledge mapping described in the second characteristic of division vector sum, the second prediction output is obtained.
6. answering method as described in claim 1, which is characterized in that described according to first prediction probability and described second Prediction output, obtain the input feature value prediction output the step of include:
First prediction output and the second prediction output described in weighted sum, obtain medium range forecast output;And
The medium range forecast is exported into the input as logistic regression function, obtains the prediction output.
7. answering method as described in claim 1, which is characterized in that described according to the first prediction output and described second After the step of prediction exports, and obtains the prediction output of the input feature value, the method also includes:
According to the known output of the prediction output and the input information, error gradient is determined;And
According to the error gradient, backpropagation simultaneously updates the deep learning model and width learning model.
8. a kind of question and answer system of knowledge based map, which is characterized in that the question and answer system includes:
First obtains module, for obtaining input information, and according to the input acquisition of information input feature value;
First computing module calculates the input feature value in the knowledge graph being pre-created for being based on deep learning model The first prediction output in spectrum;
Second computing module calculates the input feature value in the knowledge graph being pre-created for being based on width learning model The second prediction output in spectrum;
Second obtains module, for exporting according to the first prediction output and second prediction, obtains the input feature vector The prediction of vector exports;And
Answer obtains module, for exporting according to the prediction, obtains the corresponding answer of the input information.
9. a kind of computer equipment, can run on a memory and on a processor including memory, processor and storage Computer program, which is characterized in that the processor realizes any one of claim 1 to 8 institute when executing the computer program The step of stating the answering method of knowledge based map.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program The step of answering method of any one of claim 1 to 8 knowledge based map is realized when being executed by processor.
CN201910452305.9A 2019-05-28 2019-05-28 Answering method, device, computer equipment and the storage medium of knowledge based map Pending CN110309281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910452305.9A CN110309281A (en) 2019-05-28 2019-05-28 Answering method, device, computer equipment and the storage medium of knowledge based map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910452305.9A CN110309281A (en) 2019-05-28 2019-05-28 Answering method, device, computer equipment and the storage medium of knowledge based map

Publications (1)

Publication Number Publication Date
CN110309281A true CN110309281A (en) 2019-10-08

Family

ID=68075194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910452305.9A Pending CN110309281A (en) 2019-05-28 2019-05-28 Answering method, device, computer equipment and the storage medium of knowledge based map

Country Status (1)

Country Link
CN (1) CN110309281A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231454A (en) * 2020-10-14 2021-01-15 中国平安人寿保险股份有限公司 Question prediction and answer feedback method, device, computer equipment and storage medium
CN113254550A (en) * 2021-06-29 2021-08-13 浙江大华技术股份有限公司 Knowledge graph-based recommendation method, electronic device and computer storage medium
CN114428848A (en) * 2021-12-29 2022-05-03 航天科工网络信息发展有限公司 Intelligent class case pushing method and system based on incidence relation
CN116975206A (en) * 2023-09-25 2023-10-31 华云天下(南京)科技有限公司 Vertical field training method and device based on AIGC large model and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596645A (en) * 2018-03-13 2018-09-28 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of information recommendation
CN108647251A (en) * 2018-04-20 2018-10-12 昆明理工大学 The recommendation sort method of conjunctive model is recycled based on wide depth door
CN109196527A (en) * 2016-04-13 2019-01-11 谷歌有限责任公司 Breadth and depth machine learning model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109196527A (en) * 2016-04-13 2019-01-11 谷歌有限责任公司 Breadth and depth machine learning model
CN108596645A (en) * 2018-03-13 2018-09-28 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of information recommendation
CN108647251A (en) * 2018-04-20 2018-10-12 昆明理工大学 The recommendation sort method of conjunctive model is recycled based on wide depth door

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231454A (en) * 2020-10-14 2021-01-15 中国平安人寿保险股份有限公司 Question prediction and answer feedback method, device, computer equipment and storage medium
CN112231454B (en) * 2020-10-14 2024-02-09 中国平安人寿保险股份有限公司 Question prediction and answer feedback method, device, computer equipment and storage medium
CN113254550A (en) * 2021-06-29 2021-08-13 浙江大华技术股份有限公司 Knowledge graph-based recommendation method, electronic device and computer storage medium
CN114428848A (en) * 2021-12-29 2022-05-03 航天科工网络信息发展有限公司 Intelligent class case pushing method and system based on incidence relation
CN116975206A (en) * 2023-09-25 2023-10-31 华云天下(南京)科技有限公司 Vertical field training method and device based on AIGC large model and electronic equipment
CN116975206B (en) * 2023-09-25 2023-12-08 华云天下(南京)科技有限公司 Vertical field training method and device based on AIGC large model and electronic equipment

Similar Documents

Publication Publication Date Title
WO2023065545A1 (en) Risk prediction method and apparatus, and device and storage medium
CN110162593B (en) Search result processing and similarity model training method and device
US20230016365A1 (en) Method and apparatus for training text classification model
CN110555112B (en) Interest point recommendation method based on user positive and negative preference learning
CN110309281A (en) Answering method, device, computer equipment and the storage medium of knowledge based map
US11514063B2 (en) Method and apparatus of recommending information based on fused relationship network, and device and medium
CN111460221B (en) Comment information processing method and device and electronic equipment
CN112819023B (en) Sample set acquisition method, device, computer equipment and storage medium
CN108446271A (en) The text emotion analysis method of convolutional neural networks based on Hanzi component feature
CN112164391A (en) Statement processing method and device, electronic equipment and storage medium
EP3940582A1 (en) Method for disambiguating between authors with same name on basis of network representation and semantic representation
Bai et al. Explain me the painting: Multi-topic knowledgeable art description generation
CN115392237B (en) Emotion analysis model training method, device, equipment and storage medium
CN110674312A (en) Method, device and medium for constructing knowledge graph and electronic equipment
CN115002200A (en) User portrait based message pushing method, device, equipment and storage medium
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN113918704A (en) Question-answering method and device based on machine learning, electronic equipment and medium
CN117195046A (en) Abnormal text recognition method and related equipment
EP4116884A2 (en) Method and apparatus for training tag recommendation model, and method and apparatus for obtaining tag
CN116821373A (en) Map-based prompt recommendation method, device, equipment and medium
CN116340516A (en) Entity relation cluster extraction method, device, equipment and storage medium
CN112364258B (en) Recommendation method and system based on map, storage medium and electronic equipment
CN111507098B (en) Ambiguous word recognition method and device, electronic equipment and computer-readable storage medium
Liu et al. Dynamic updating of the knowledge base for a large-scale question answering system
Zeng Application of conditional random field model based on machine learning in online and offline integrated educational resource recommendation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination