WO2021051517A1 - 基于卷积神经网络的信息检索方法、及其相关设备 - Google Patents
基于卷积神经网络的信息检索方法、及其相关设备 Download PDFInfo
- Publication number
- WO2021051517A1 WO2021051517A1 PCT/CN2019/116928 CN2019116928W WO2021051517A1 WO 2021051517 A1 WO2021051517 A1 WO 2021051517A1 CN 2019116928 W CN2019116928 W CN 2019116928W WO 2021051517 A1 WO2021051517 A1 WO 2021051517A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- recognition result
- query
- word segmentation
- target
- identification information
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000013527 convolutional neural network Methods 0.000 title claims abstract description 48
- 230000011218 segmentation Effects 0.000 claims abstract description 147
- 238000012545 processing Methods 0.000 claims abstract description 74
- 239000013598 vector Substances 0.000 claims description 106
- 239000011159 matrix material Substances 0.000 claims description 33
- 238000012790 confirmation Methods 0.000 claims description 18
- 238000001914 filtration Methods 0.000 claims description 17
- 238000006243 chemical reaction Methods 0.000 claims description 15
- 238000011176 pooling Methods 0.000 claims description 14
- 230000009467 reduction Effects 0.000 claims description 13
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 7
- 241000590419 Polygonia interrogationis Species 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 241001465754 Metazoa Species 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007477 logistic regression Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of big data technology, and in particular to an information retrieval method based on a convolutional neural network and related equipment.
- the embodiment of the present application provides an information retrieval method based on a convolutional neural network and related equipment to solve the problem that the accuracy of the traditional information retrieval method is not high, which causes users to be unable to accurately query information, thereby affecting work efficiency.
- An information retrieval method based on convolutional neural network including:
- the semantic slot model corresponding to the identification information is selected from the preset model library to perform semantic slot type recognition on the target word segmentation to obtain a slot recognition result;
- the query result corresponding to the query object is obtained from the query database, and the query result is sent to the query user.
- An information retrieval device based on convolutional neural network including:
- the obtaining module is used to obtain the query sentence input by the query user from the preset database
- the word segmentation module is used to perform word segmentation processing on the query sentence to obtain the target word segmentation;
- the intention recognition module is used to apply a pre-trained intention model to perform intention recognition on the target word segmentation to obtain an intention recognition result;
- the matching module is configured to match the intent recognition result with the identification information in a preset model library, where the preset model library contains different identification information and semantic slot models corresponding to the identification information;
- the slot recognition module is configured to, if the identification information corresponding to the intent recognition result is matched, select the semantic slot model corresponding to the identification information from the preset model library to identify the semantic slot type of the target word segmentation, and obtain Slot recognition result;
- a determining module configured to determine a query object according to the intent recognition result and the slot recognition result
- the sending module is used to obtain the query result corresponding to the query object from the query database, and send the query result to the query user.
- a computer device includes a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and the processor implements the above-mentioned convolutional neural based instructions when the processor executes the computer readable instructions. The steps of the network information retrieval method.
- a non-volatile computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions implement any of the foregoing when executed by a processor Steps of information retrieval method based on convolutional neural network.
- FIG. 1 is a flowchart of an information retrieval method based on a convolutional neural network provided by an embodiment of the present application
- step S2 is a flowchart of step S2 in the information retrieval method based on convolutional neural network provided by an embodiment of the present application;
- step S3 is a flowchart of step S3 in the information retrieval method based on convolutional neural network provided by an embodiment of the present application;
- step S31 is a flowchart of step S31 in the information retrieval method based on convolutional neural network provided by an embodiment of the present application;
- FIG. 5 is a flow chart of processing in the case that the identification information corresponding to the intention recognition result is not matched in the information retrieval method based on the convolutional neural network provided by the embodiment of the present application;
- FIG. 6 is a flowchart of processing in the case that the slot recognition result is a recognition failure in the information retrieval method based on convolutional neural network provided by an embodiment of the present application;
- FIG. 7 is a flow chart of processing in the information retrieval method based on convolutional neural network provided by an embodiment of the present application when the query result cannot be queried from the query database according to the query object;
- FIG. 8 is a schematic diagram of an information retrieval device based on a convolutional neural network provided by an embodiment of the present application.
- Fig. 9 is a basic structural block diagram of a computer device provided by an embodiment of the present application.
- the information retrieval method based on the convolutional neural network provided in this application is applied to the server, and the server can be implemented by an independent server or a server cluster composed of multiple servers.
- the server can be implemented by an independent server or a server cluster composed of multiple servers.
- an information retrieval method based on a convolutional neural network is provided, which includes the following steps:
- the preset database refers to a database specially used for storing query statements input by query users.
- S2 Perform word segmentation processing on the query sentence to obtain the target word segmentation.
- the preset word segmentation port refers to a processing port specially used for word segmentation processing of query sentences.
- Word segmentation refers to the process of recombining continuous word sequences into word sequences according to certain specifications. For example, the continuous word sequence "ABCD” is processed through word segmentation to obtain “AB” and "CD” .
- S3 Use the pre-trained intent model to recognize the intent of the target segmentation, and obtain the intent recognition result.
- the intent model will directly identify the output result corresponding to the target word segmentation according to the input target word segmentation, and use the output result as the intent recognition result.
- the pre-trained intention model refers to a convolutional neural network model specially used for intent recognition of target word segmentation.
- the intent recognition result obtained in step S3 is matched with the identification information in the preset model library, where the preset model library is used to store different identification information and a database of semantic slot models corresponding to the identification information, and , The semantic slot model corresponding to different identification information is different.
- identification information refers to tag information specifically used for matching with the intent recognition result, and different semantic slot models corresponding to different identification information.
- the semantic slot model refers to the convolutional neural network model that is pre-trained according to user needs to identify the semantic slot type of the target word segmentation. Because the semantic slot model is trained from semantic training samples, the semantic slot model trained by different semantic training samples The recognition effect is also different. Therefore, selecting the semantic slot model corresponding to the intent recognition result, that is, selecting the semantic slot model corresponding to the identification information to identify the semantic slot type of the target word segmentation, which can ensure the accuracy of recognition.
- the semantic slot model corresponding to the identification information is selected from the preset model library to identify the semantic slot type of the target word segmentation, and obtain the slot recognition result.
- the schematic diagram of the identification result matches the identification information, and Import the target word segmentation into the semantic slot model corresponding to the identification information for semantic slot type recognition.
- the semantic slot model will directly identify the output result corresponding to the target word segmentation according to the input target word segmentation, and use the output result as the slot recognition result.
- the identification information in the preset model library is "product category”, “product cost”, and “product specification”, and the corresponding semantic slot models are model A, model B, and model C. If the intention recognition result is "Product category”, match the intent recognition result with the identification information in the preset model library, and get the intent identification result "product category” to match the identification information "product category”, so select the identification information "product category” to correspond
- the semantic slot model model A performs semantic slot type recognition on the target word segmentation.
- the description information that is the same as the result of the intention recognition is queried from the preset information database, and the file list corresponding to the description information is obtained, and the file identification information in the file list is compared with the slot position.
- the recognition result is matched, and the file object corresponding to the successfully matched file identification information is selected as the query object.
- the preset information library is used to store different description information and file lists corresponding to the description information, and the file lists include different file identification information and file objects corresponding to the file identification information.
- the corresponding file list is List A and List B respectively.
- List A contains 2 file identification information called “Product Name” and “Product ID”, and the corresponding file objects are Q1 and W1 respectively;
- List B contains 2 file identification information called " "Product specification” and “product manufacturer”, the corresponding file objects are Q2 and W2 respectively; by matching the description information with the intent recognition result "product cost”, get list A, and then the slot recognition result "product name” Match with the file identification information in the list A, and obtain the file object Q1 as the query object.
- S7 Obtain the query result corresponding to the query object from the query database, and send the query result to the query user.
- the query object is matched with the query identifier in the query database. If the matching is successful, the query result corresponding to the query identifier is obtained, and the query result is sent to Query users.
- the query database contains different query identifiers and query results corresponding to the query identifiers.
- the preset sending method can be in the form of mail, or can be set according to the actual needs of the user, and there is no restriction here.
- the target word segmentation is obtained by performing word segmentation processing on the query sentence, and the pre-trained intent model is used to perform intent recognition on the target word segmentation, and the intent recognition result obtained after the recognition is matched with the identification information in the preset model library.
- Select the semantic slot model corresponding to the successfully matched identification information to identify the semantic slot type of the target word segmentation obtain the slot recognition result, determine the query object according to the intent recognition result and the slot recognition result, and finally obtain the query result corresponding to the query object and send it to the query user.
- the query result is automatically fed back according to the query sentence, and the query object can be accurately obtained by combining the intent recognition and the slot recognition method, the accuracy of information query is improved, and the user's work efficiency is further improved.
- step S2 that is, performing word segmentation processing on the query sentence to obtain the target word segmentation includes the following steps:
- the non-text character filtering process refers to deleting the non-text characters in the query sentence, and finally only the text characters are retained. Since there may be non-text characters in the query sentence, in order to avoid non-text characters causing interference in the subsequent word segmentation process, the query sentence is filtered out of non-text characters to ensure the accuracy of subsequent word segmentation processing.
- the query sentence is imported into the preset filtering port to perform non-text character filtering processing, and the processed text containing only text characters is obtained, that is, the plain text.
- the preset filtering port refers to a processing port used for filtering non-text characters in a query sentence.
- the query sentence is: query "Type A” insurance
- there are non-text characters "" in the query sentence import the query sentence into the preset filtering port for non-text character filtering processing, and get the plain text, which is : Query Class A insurance.
- S22 Perform word segmentation processing on the plain text through the preset word segmentation thesaurus to obtain the target word segmentation.
- the legal vocabulary in the preset word segmentation lexicon is matched with the plain text respectively, and if there is a text character that is the same as the legal vocabulary in the matching plain text, the text character is determined as the target word segmentation, and if there is in the plain text For text characters that are different from the legal vocabulary, a single text character is determined as the target word segmentation.
- the preset word segmentation lexicon refers to a database dedicated to storing different legal vocabulary.
- the method of adding a new insurance name in advance as a legal vocabulary to the preset word segmentation database is that when an insurance company launches a new insurance product name, the user will send the new insurance product name as a legal vocabulary to the preset word segmentation in advance
- Thesaurus if the preset word segmentation dictionary receives the legal vocabulary sent by the user, the legal vocabulary will be added to the preset word segmentation dictionary, so as to continuously improve the legal vocabulary in the preset word segmentation dictionary and ensure the use of preset word segmentation words The accuracy of the word segmentation processing in the library.
- the pure text is obtained by filtering out non-text characters on the query sentence, and then using the preset word segmentation database to perform word segmentation processing on the pure text to obtain the target word segmentation.
- the word segmentation processing of the query sentence is realized, and the non-text character filtering process can effectively avoid the interference of the non-text characters on the word segmentation process, further guarantee the accuracy of word segmentation, and improve the accuracy of subsequent intention recognition using target word segmentation.
- the intent model includes an input layer, a convolutional layer, a pooling layer, and a fully connected layer.
- a pre-trained intent model is used to perform intent recognition on the target word segmentation to obtain The result of intent recognition includes the following steps:
- S31 Use the input layer to perform word vector conversion processing on the target word segmentation to obtain a word vector.
- the target word segmentation is imported into the input layer of the intent model.
- the input layer After receiving the target word segmentation, the input layer performs word vector conversion processing on the target word segmentation through the word2vec algorithm to obtain the processed word vector.
- the word2vec algorithm refers to a processing algorithm used to perform word vector conversion on the target word segmentation.
- S32 Perform a convolution operation on the word vector according to the convolution layer to obtain a feature matrix.
- the convolutional layer includes a convolution kernel preset by the user. According to the word vector obtained in step S31, the word vector is imported into the convolutional layer, and the convolutional layer checks the word vector according to the preset convolution. Perform the convolution operation, and obtain the corresponding feature matrix through the convolution operation.
- the preset convolution kernel refers to the kernel function set for convolution processing according to the actual needs of the user.
- the convolutional layer includes a first convolutional layer, a second convolutional layer, and a third convolutional layer.
- the first convolutional layer includes a one-dimensional convolution kernel with a length of 1, and the number of channels is 128.
- the second convolutional layer and the third convolutional layer both contain a one-dimensional convolution kernel with a length of 3, and the number of channels is 384.
- the pooling layer includes a preset dimensionality reduction function.
- the feature matrix is imported into the pooling layer, and the pooling layer uses the preset reduction function after receiving the feature matrix.
- the dimensional function performs dimensionality reduction processing on the feature matrix to obtain the processed target matrix.
- the preset dimensionality reduction function refers to a processing function used to perform dimensionality reduction processing on features.
- each classifier has an intent recognition result corresponding to the target matrix and a probability corresponding to the intent recognition result.
- the probability corresponding to the intent recognition result contained in each classifier is compared, and the intent recognition result corresponding to the classifier with the highest probability is selected for output, that is, the intent recognition result with the highest accuracy is output.
- the intent recognition result corresponding to the classifier and the probability corresponding to the intent recognition result can be trained according to actual needs, and the number n of classifiers can also be set as required, and there is no specific limitation here, for example, n is set to 14.
- Classifier implementation methods include but are not limited to: Logistic Regression (LR), Support Vector Machine (SVM), Cross Entropy (Corss Entropy), and softmax regression.
- LR Logistic Regression
- SVM Support Vector Machine
- Cross Entropy Corss Entropy
- softmax regression Softmax regression
- the embodiment of the present application adopts softmax regression to realize the classification and recognition of multiple classifiers.
- a series of processing is performed on the target word segmentation by using the output layer, convolutional layer, pooling layer, and fully connected layer in the pre-trained intent model to obtain the processed intent recognition result.
- the pre-trained intent model can quickly and accurately identify the intent recognition result corresponding to the target word segmentation, and ensure the accuracy of the subsequent use of the intent recognition result and slot recognition to determine the query object.
- step S31 using the input layer to perform word vector conversion processing on the target word segmentation, and obtaining the word vector includes the following steps:
- S311 Based on the preset corpus, construct a basic word vector for each target word segmentation.
- each target word segmentation is mapped to a vector according to a preset corpus, and these vectors are linked together to form a word vector space, and each vector is equivalent to a point in this space.
- the preset corpus refers to a database used to construct the basic word vector corresponding to the target word segmentation.
- the computer may learn:
- BMW ⁇ 0.5, 0.2, 0.2, 0.0, 0.1>;
- Mercedes-Benz ⁇ 0.7, 0.2, 0.0, 0.1, 0.0>.
- each dimension of the basic word vector represents a feature that has a certain semantic and grammatical interpretation, so each dimension of the basic word vector can be called a target word segmentation feature.
- a keyword word vector is constructed for each target word segmentation to obtain a basic word vector.
- each target word segment corresponds to a unique basic word vector
- each basic word vector corresponds to at least one target word segment
- the basic word vector of each target segmentation is constructed, so that the text that the machine cannot understand accurately is converted into a word vector that the machine can easily recognize and operate, which is conducive to the accurate recognition of the user's intention.
- S312 For each basic word vector, calculate the spatial distance between the basic word vector and other basic word vectors, and select the smallest value from the spatial distance as the minimum spatial distance of the basic word vector.
- the spatial distance calculation formula is used to calculate the spatial distance between the basic word vector and all other basic word vectors, and the minimum value of these spatial distances is found.
- L is the spatial distance
- n is a positive integer greater than or equal to 2
- both bi and a i are basic word vectors.
- the basic word vector contains G 1 (0.9,0.1), G 2 (0.5,0.5) and G 3 (0.8,0.2), pin G 1 and calculate the spatial distance from G 1 to G 2 according to formula (1) Is 0.5659, and the spatial distance from G 1 to G 3 is 0.1414, then the minimum spatial distance of G 1 is 0.1414.
- S313 Use the basic word vector that is less than or equal to the preset spatial distance threshold in the minimum spatial distance as the word vector.
- the preset spatial distance threshold may specifically be 0.5, or it may be set according to the actual needs of the user, and there is no limitation here.
- the preset spatial distance threshold is 0.8
- the basic word vector includes H 1 (0.9,0.1,0), H 2 (0.8,0.1,0.1), and H 3 (0,0.1,0.9 ), calculated by formula (1) in step S312, the minimum spatial distance of H 1 is 0.4243, the minimum spatial distance of H 2 is 0.4243, the minimum spatial distance of H 3 is 1.1314, and the minimum spatial distance of H 1 and H 2 is less than
- the preset spatial distance threshold is 0.8, therefore, H 1 and H 2 are used as word vectors.
- the spatial distance between each basic word vector and other basic word vectors is calculated, and the minimum spatial distance is selected, and the minimum spatial distance is less than Or the basic word vector equal to the preset spatial distance threshold is used as the word vector.
- the target word segmentation can be quickly converted into the corresponding word vector, which is conducive to the accurate recognition of the word vector by the subsequent intention model, thereby improving the accuracy of subsequent model recognition.
- the information retrieval method based on convolutional neural network further includes the following steps:
- the first target user refers to a processing user who analyzes and confirms the intention recognition result and the query sentence when the identification information corresponding to the intention recognition result is not matched.
- the identification information corresponding to the intent identification result is not matched, it means that there is no identification information in the preset model library that can
- the intention recognition result performs a semantic slot model of semantic slot type recognition, and the intent recognition result and the query sentence corresponding to the intent recognition result are sent to the first target user in a preset manner.
- the preset method may be in the form of mail or short message, which is not limited here.
- S82 Receive the initial recognition result fed back by the first target user, and use the initial recognition result as the slot recognition result.
- the first target user after receiving the intention recognition result and query sentence sent in step S81, the first target user obtains the initial recognition result after analyzing and processing the intention recognition result and query sentence, and feeds back the initial recognition result.
- the initial recognition result exists in the preset first feedback library, the initial recognition result is extracted, and the initial recognition result is used as the slot recognition result.
- the preset first feedback database refers to a database specifically used to store the initial recognition result fed back by the first target user.
- the extracted initial recognition result is deleted from the preset first feedback library.
- the intent recognition result and the query sentence are sent to the first target user for confirmation, and finally the initial recognition result fed back by the first target user is received, and Use this initial recognition result as the slot recognition result.
- the slot recognition result can be determined in combination with manual interaction, thereby ensuring the accuracy of the subsequent use of the slot recognition result to determine the query object.
- the information retrieval method based on convolutional neural network further includes the following steps:
- the slot recognition result includes a recognition failure. If the slot recognition result is a recognition failure, the intent recognition result corresponding to the slot recognition result is matched with the problem identifier in the preset problem database. When the recognition result is the same as the question mark, it indicates that the matching is successful, and the associated question corresponding to the question mark is sent to the inquiring user for confirmation in a preset manner.
- the preset question library refers to a database specifically used to store different question marks and related questions corresponding to the question marks, and the preset question library contains question marks that are the same as all intent identification results.
- the corresponding related questions are “how is the price of product C” and “how is the quality of product C”. If the result of the intent identification is "Product price”, by matching the intent identification result with the question mark, the intent identification result “product price” is the same as the question mark “product price”, so the question mark “product price” corresponds to the related question “How about the price of product C” "Send to the inquiring user for confirmation in a preset way.
- S92 Receive feedback information fed back by the query user, and re-identify the feedback information as a new query sentence.
- the inquiring user can directly feedback the associated question as feedback information, or re-enter the query sentence as the feedback information for feedback.
- the feedback information is detected in the preset user database, the feedback The information is extracted, and the feedback information is used as a new query sentence, and the steps of re-intent recognition and slot recognition based on the query sentence continue to be executed.
- the preset user database refers to a database specifically used to receive feedback information sent by query users.
- the extracted feedback information is deleted from the preset user library.
- the slot recognition result is a recognition failure
- the associated question matching the intent recognition result is selected and sent to the inquiring user for confirmation, and finally the feedback information fed back by the inquiring user is re-identified as a new query sentence .
- the related problem can be automatically selected and sent to the inquiring user for confirmation, avoiding the direct output of the result when the recognition error occurs, and further improving the accuracy of the information query.
- the information retrieval method based on convolutional neural network further includes the following steps:
- the second target user refers to a processing user who analyzes and confirms the query sentence when the query result cannot be found from the query database according to the query object. Since there may be empty information under a certain path in the query database, there may be cases where the query object does not have a corresponding query result in the query database.
- the query object and the query sentence corresponding to the query object are sent to the target user in a preset manner for analysis and confirmation.
- S102 Receive a feedback result fed back by the second target user, determine the feedback result as a query result, and send it to the inquiring user.
- the preset second feedback database refers to a database dedicated to receiving feedback results sent by the second target user.
- the query object and query sentence are sent to the second target user for confirmation, and finally the feedback result fed back by the second target user is used as the query result and combined Sent to the inquiring user.
- the query result can be determined in combination with manual interaction, thereby improving the accuracy of information query.
- an information retrieval device based on a convolutional neural network corresponds to the information retrieval method based on the convolutional neural network in the above-mentioned embodiment in a one-to-one correspondence.
- the information retrieval device based on convolutional neural network includes an acquisition module 81, a word segmentation module 82, an intent recognition module 83, a matching module 84, a slot recognition module 85, a determination module 86 and a sending module 87.
- each functional module is as follows:
- the obtaining module 81 is used to obtain the query sentence input by the query user from the preset database;
- the word segmentation module 82 is used to perform word segmentation processing on the query sentence to obtain the target word segmentation;
- the intention recognition module 83 is used for applying a pre-trained intention model to perform intention recognition on the target word segmentation, and obtain an intention recognition result;
- the matching module 84 is configured to match the intent recognition result with the identification information in the preset model library, where the preset model library contains different identification information and semantic slot models corresponding to the identification information;
- the slot recognition module 85 is configured to, if the identification information corresponding to the intent recognition result is matched, select the semantic slot model corresponding to the identification information from the preset model library to identify the semantic slot type of the target word segmentation, and obtain the slot recognition result ;
- the determining module 86 is used to determine the query object according to the intent recognition result and the slot recognition result;
- the sending module 87 is used to obtain the query result corresponding to the query object from the query database, and send the query result to the query user.
- the word segmentation module 82 includes:
- the filtering sub-module is used to filter out non-text characters in the query statement to obtain plain text
- the pure text word segmentation sub-module is used to perform word segmentation processing on the plain text through the preset word segmentation thesaurus to obtain the target word segmentation.
- the intention recognition module 83 includes:
- the word vector conversion sub-module is used to use the input layer to perform word vector conversion processing on the target word segmentation to obtain a word vector;
- the convolution sub-module is used to perform convolution operation on the word vector according to the convolution layer to obtain the feature matrix
- the dimensionality reduction sub-module is used to perform dimensionality reduction processing on the feature matrix using the pooling layer to obtain the target matrix;
- the operation sub-module is used to perform arithmetic processing on the target matrix through the fully connected layer to obtain the intent recognition result.
- word vector conversion sub-module includes:
- the construction unit is used to construct the basic word vector of each target word segmentation based on the preset corpus;
- the calculation unit is used to calculate the spatial distance between the basic word vector and other basic word vectors for each basic word vector, and select the smallest value from the spatial distance as the minimum spatial distance of the basic word vector;
- the word vector determining unit is used to use the basic word vector in the minimum space distance that is less than or equal to the preset space distance threshold as the word vector.
- the information retrieval device based on the convolutional neural network further includes:
- the first sending module is configured to send the intent recognition result and the query sentence to the first target user for confirmation if the identification information corresponding to the intent recognition result is not matched;
- the first receiving module is configured to receive the initial recognition result fed back by the first target user, and use the initial recognition result as the slot recognition result.
- the information retrieval device based on the convolutional neural network further includes:
- the second sending module is configured to, if the slot recognition result is a recognition failure, select the associated question matching the intention recognition result from the preset question library and send it to the inquiring user for confirmation;
- the second receiving module is used to receive feedback information fed back by the query user, and re-identify the feedback information as a new query sentence.
- the information retrieval device based on the convolutional neural network further includes:
- the third sending module is used to send the query object and query sentence to the second target user for confirmation if the query result cannot be found from the query database according to the query object;
- the third receiving module is configured to receive the feedback result fed back by the second target user, determine the feedback result as the query result, and send it to the inquiring user.
- FIG. 9 is a block diagram of the basic structure of a computer device 90 in an embodiment of this application.
- the computer device 90 includes a memory 91, a processor 92, and a network interface 93 that are communicatively connected to each other through a system bus. It should be pointed out that FIG. 9 only shows a computer device 90 with components 91-93, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
- Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
- ASIC Application Specific Integrated Circuit
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- DSP Digital Processor
- the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
- the memory 91 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
- the memory 91 may be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90.
- the memory 91 may also be an external storage device of the computer device 90, for example, a plug-in hard disk equipped on the computer device 90, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
- the memory 91 may also include both an internal storage unit of the computer device 90 and an external storage device thereof.
- the memory 91 is generally used to store an operating system and various application software installed in the computer device 90, such as computer-readable instructions of the information retrieval method based on the convolutional neural network.
- the memory 91 can also be used to temporarily store various types of data that have been output or will be output.
- the processor 92 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
- the processor 92 is generally used to control the overall operation of the computer device 90.
- the processor 92 is configured to execute computer-readable instructions or processed data stored in the memory 91, for example, to execute the computer-readable instructions of the information retrieval method based on the convolutional neural network.
- the network interface 93 may include a wireless network interface or a wired network interface, and the network interface 93 is generally used to establish a communication connection between the computer device 90 and other electronic devices.
- This application also provides another implementation manner, that is, to provide a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a query information entry process, and the query information entry
- the process may be executed by at least one processor, so that the at least one processor executes the steps of any one of the foregoing information retrieval methods based on convolutional neural networks.
- the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a computer device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.
- a computer device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Character Discrimination (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
一种基于卷积神经网络的信息检索方法、及其相关设备,所述方法包括:从预设数据库中获取查询用户输入的查询语句(S1);对查询语句进行分词处理,得到目标分词(S2);应用预先训练好的意图模型对目标分词进行意图识别,得到意图识别结果(S3);将意图识别结果与预设模型库中的标识信息进行匹配,其中,预设模型库包含不同的标识信息及标识信息对应的语义槽模型(S4);若匹配到与意图识别结果相应的标识信息,则从预设模型库中选取该标识信息对应的语义槽模型对目标分词进行语义槽类型识别,得到槽位识别结果(S5);根据意图识别结果与槽位识别结果,确定查询对象(S6);从查询数据库中获取查询对象对应的查询结果,并将查询结果发送给查询用户(S7)。
Description
本申请以2019年9月19日提交的申请号为201910884119.2,名称为“基于卷积神经网络的信息检索方法、及其相关设备”的中国发明专利申请为基础,并要求其优先权。
本申请涉及大数据技术领域,尤其涉及一种基于卷积神经网络的信息检索方法、及其相关设备。
传统的信息检索方法主要基于关键词对信息进行检索或者基于互联网表格,通过搜索引擎进行检索,发明人意识到,这两种方法都存在缺陷,其中,基于关键词对信息进行检索的方法命中率较低,其搜索引擎的关键词检索需要大量语料,在许多场景下,小规模或中等规模的语料难以达到理想的效果;而基于互联网表格,通过搜索引擎进行检索的方法存在精确度不高、性能欠佳的问题;从而导致用户无法根据传统的信息检索方法准确查询到对应的信息,进一步影响用户的工作效率。
发明内容
本申请实施例提供一种基于卷积神经网络的信息检索方法、及其相关设备,以解决传统的信息检索方法准确性不高,导致用户无法准确查询信息,进而影响工作效率的问题。
一种基于卷积神经网络的信息检索方法,包括:
从预设数据库中获取查询用户输入的查询语句;
对所述查询语句进行分词处理,得到目标分词;
应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;
将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;
若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;
根据所述意图识别结果与所述槽位识别结果,确定查询对象;
从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
一种基于卷积神经网络的信息检索装置,包括:
获取模块,用于从预设数据库中获取查询用户输入的查询语句;
分词模块,用于对所述查询语句进行分词处理,得到目标分词;
意图识别模块,用于应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;
匹配模块,用于将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;
槽位识别模块,用于若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;
确定模块,用于根据所述意图识别结果与所述槽位识别结果,确定查询对象;
发送模块,用于从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述基于卷积神经网络的信息检索方法的步骤。
一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一种处理器执行时实现上述任一种基于卷积神经网络的信息检索方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的基于卷积神经网络的信息检索方法的流程图;
图2是本申请实施例提供的基于卷积神经网络的信息检索方法中步骤S2的流程图;
图3是本申请实施例提供的基于卷积神经网络的信息检索方法中步骤S3的流程图;
图4是本申请实施例提供的基于卷积神经网络的信息检索方法中步骤S31的流程图;
图5是本申请实施例提供的基于卷积神经网络的信息检索方法中在未匹配到与意图识别结果相应的标识信息的情况下进行处理的流程图;
图6是本申请实施例提供的基于卷积神经网络的信息检索方法中在槽位识别结果为识别失败的情况下进行处理的流程图;
图7是本申请实施例提供的基于卷积神经网络的信息检索方法中在根据查询对象从查询库中查询不到查询结果的情况下进行处理的流程图;
图8是本申请实施例提供的基于卷积神经网络的信息检索装置的示意图;
图9是本申请实施例提供的计算机设备的基本机构框图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的基于卷积神经网络的信息检索方法应用于服务端,服务端具体可以用独立的服务器或者多个服务器组成的服务器集群实现。在一实施例中,如图1所示,提供一种基于卷积神经网络的信息检索方法,包括如下步骤:
S1:从预设数据库中获取查询用户输入的查询语句。
在本实施例中,通过对预设数据库进行检测,当检测到预设数据库中存在查询语句时,则对查询语句进行提取。其中,预设数据库是指专门用于存储查询用户输入的查询语句的数据库。
需要说明的是,当从预设数据库中获取到查询用户输入的查询语句时,将该查询语句从预设数据库中进行删除处理。
S2:对查询语句进行分词处理,得到目标分词。
在本申请实施例中,通过将查询语句导入到预设分词端口中进行分词处理,得到分词处理后的目标分词。其中,预设分词端口是指专门用于对查询语句进行分词处理的处理端口。
分词处理是指将连续的字序列按照一定的规范重新组合成词序列的过程,例如,将连续的字序列“ABCD”通过分词处理得到“AB”和“CD”
。
S3:应用预先训练好的意图模型对目标分词进行意图识别,得到意图识别结果。
具体地,通过将目标分词导入到预先训练好的意图模型中进行意图识别,意图模型将根据输入的目标分词直接识别出该目标分词对应的输出结果,并将该输出结果作为意图识别结果。
其中,预先训练好的意图模型是指专门用于对目标分词进行意图识别的卷积神经网络模型。
S4:将意图识别结果与预设模型库中的标识信息进行匹配,其中,预设模型库包含不同的标识信息及标识信息对应的语义槽模型。
具体地,将步骤S3中得到的意图识别结果与预设模型库中的标识信息进行匹配,其中,预设模型库用于存储不同的标识信息,以及标识信息对应的语义槽模型的数据库,并且,不同标识信息对应的语义槽模型也不相同。
需要说明的是,标识信息是指专门用于与意图识别结果进行匹配的标签信息,且不同标识信息对应的不同的语义槽模型。
语义槽模型是指根据用户需求预先训练好用于对目标分词进行语义槽类 型识别的卷积神经网络模型,由于语义槽模型是由语义训练样本训练得到,不同语义训练样本训练得到的语义槽模型的识别效果也不同,因此选取与意图识别结果对应的语义槽模型,即选取标识信息对应的语义槽模型对目标分词进行语义槽类型识别,能够保证识别的准确性。
S5:若匹配到与意图识别结果相应的标识信息,则从预设模型库中选取该标识信息对应的语义槽模型对目标分词进行语义槽类型识别,得到槽位识别结果。
在本申请实施例中,根据步骤S4中将意图识别结果与预设模型库中的标识信息进行匹配的方式,若意图识别结果与标识信息相同,则表示意图识别结果与标识信息相匹配,并将目标分词导入到该标识信息对应的语义槽模型中进行语义槽类型识别,语义槽模型将根据输入的目标分词直接识别出目标分词对应的输出结果,并将该输出结果作为槽位识别结果。
例如,预设模型库中存在标识信息分别为“产品种类”、“产品费用”和“产品规格”,其对应的语义槽模型分别为模型A、模型B和模型C,若存在意图识别结果为“产品种类”,将该意图识别结果分别与预设模型库中的标识信息进匹配,得到意图识别结果“产品种类”与标识信息“产品种类”相匹配,故选取标识信息“产品种类”对应的语义槽模型模型A对目标分词进行语义槽类型识别。
S6:根据意图识别结果与槽位识别结果,确定查询对象。
在本申请实施例中,根据意图识别结果,从预设信息库中查询与该意图识别结果相同的描述信息,并获取该描述信息对应的文件列表,将文件列表中的文件标识信息与槽位识别结果进行匹配,选取匹配成功的文件标识信息对应的文件对象作为查询对象。
其中,预设信息库用于存储不同的描述信息、描述信息对应的文件列表,且文件列表包含不同的文件标识信息、文件标识信息对应的文件对象。
例如,若意图识别结果为“产品费用”,槽位识别结果为“产品名称”,预设信息库中存在2个描述信息分别为“产品费用”、“产品质量”,其对应的文件列表为分别为列表A和列表B,列表A包含2个文件标识信息分别为“产品名称”、“产品ID”,其对应的文件对象分别为Q1和W1;列表B包含2个文件标识信息分别为“产品规格”、“产品产家”,其对应的文件对象分别为Q2和W2;通过利用意图识别结果“产品费用”与描述信息进行匹配,获取列表A,再将槽位识别结果“产品名称”与列表A中的文件标识信息进行匹配,获取文件对象Q1作为查询对象。
S7:从查询数据库中获取查询对象对应的查询结果,并将查询结果发送给查询用户。
具体地,根据步骤S6得到的查询对象,将查询对象与查询数据库中的查询标识进行匹配,若匹配成功,则获取该查询标识对应的查询结果,并按照预设发送方式将该查询结果发送给查询用户。
其中,查询数据库中包含不同的查询标识及查询标识对应的查询结果。
预设发送方式具体可以是以邮件的形式,也可以根据用户的实际需求进行设置,此处不做限制。
本实施例中,通过对查询语句进行分词处理得到目标分词,利用预先训练好的意图模型对目标分词进行意图识别,将识别后得到的意图识别结果与预设模型库中的标识信息进行匹配,选取匹配成功的标识信息对应的语义槽模型对目标分词进行语义槽类型识别,得到槽位识别结果,根据意图识别结果与槽位识别结果确定查询对象,最后获取查询对象对应的查询结果发送给查询用户。从而实现根据查询语句自动反馈查询结果,通过结合意图识别与槽位识别的方式,能够准确获取查询对象,提高信息查询的准确性,进一步提高用户的工作效率。
在一实施例中,如图2所示,步骤S2中,即对查询语句进行分词处理,得到目标分词包括如下步骤:
S21:对查询语句进行非文字字符滤除处理,得到纯文本。
在本申请实施例中,非文字字符滤除处理是指针对查询语句中的非文字字符进行删除处理,最终只保留文字字符。由于查询语句中可能存在非文字字符,为了避免非文字字符在后续进行分词处理过程中造成干扰,故对查询语句进行非文字字符滤除处理,确保后续分词处理的准确性。
具体地,将查询语句导入到预设滤除端口中进行非文字字符滤除处理,得到处理后的只包含文字字符的文本,即为纯文本。其中,预设滤除端口是指用于对查询语句中的非文字字符进行滤除处理的处理端口。
例如,查询语句为:查询“A类”保险,该查询语句中存在非文字字符“”,将该查询语句导入到预设滤除端口中进行非文字字符滤除处理,得到纯文本,即为:查询A类保险。
S22:通过预设分词词库对纯文本进行分词处理,得到目标分词。
具体地,将预设分词词库中的合法词汇分别与纯文本进行匹配,若匹配到纯文本中存在与合法词汇相同的文字字符,则将该文字字符确定为目标分词,若纯文本中存在与合法词汇不相同的文字字符,则将单个文字字符确定为目标分词。其中,预设分词词库是指专门用于存储不同合法词汇的数据库。
需要说明的是,若涉及到新的保险产品名称,需要预先将此类新的保险名称作为合法词汇加入到预设分词库中,以保证利用预设分词词库进行分词时能够准确分词。
其中,预先新的保险名称作为合法词汇加入到预设分词词库的方法为,当保险公司推出新的保险产品名称时,用户将预先将该新的保险产品名称作为合法词汇发送到预设分词词库,若预设分词词库接收到用户发送的合法词汇,则将该合法词汇添加到预设分词词库中,从而不断完善预设分词词库中的合法词汇,保证利用预设分词词库进分词处理的准确性。
本实施例中,通过对查询语句进行非文字字符滤除处理,得到纯文本,再利用预设分词库对纯文本进行分词处理,得到目标分词。从而实现对查询语句的分词处理,通过进行非文字字符滤除处理能够有效避免非文字字符对 分词处理过程造成的干扰,进一步保证分词的准确性,提高后续利用目标分词进行意图识别的准确性。
在一实施例中,如图3所示,意图模型包含输入层、卷积层、池化层和全连接层,步骤S3中,即应用预先训练好的意图模型对目标分词进行意图识别,得到意图识别结果包括如下步骤:
S31:利用输入层对目标分词进行词向量转换处理,得到词向量。
在本申请实施例中,将目标分词导入到意图模型的输入层,输入层在接收到目标分词后,通过word2vec算法对目标分词进行词向量转换处理,得到处理后的词向量。
其中,word2vec算法是指用于对目标分词进行词向量转换的处理算法。
S32:根据卷积层对词向量进行卷积操作,得到特征矩阵。
在本申请实施例中,卷积层包含用户预先设置好的卷积核,根据步骤S31得到的词向量,将词向量导入到卷积层中,卷积层根据预先设置好卷积核对词向量进行卷积操作,通过卷积操作得到对应的特征矩阵。
其中,预先设置好的卷积核是指根据用户实际需求设定用于卷积处理的核函数。
需要说明的是,卷积层中包含第一卷积层、第二卷积层和第三卷积层,其中,第一卷积层包含长度为1的一维卷积核,通道数量为128,第二卷积层和第三卷积层均包含长度为3的一维卷积核,通道数量为384。
S33:利用池化层对特征矩阵进行降维处理,得到目标矩阵。
在本申请实施例中,池化层中包含预设降维函数,根据步骤S32得到的特征矩阵,将该特征矩阵导入到池化层中,池化层在接收到特征矩阵后利用预设降维函数对该特征矩阵进行降维处理,得到处理后的目标矩阵。其中,预设降维函数是指用于对特征进行降维处理的处理函数。
S34:通过全连接层对目标矩阵进行运算处理,得到意图识别结果。
具体地,在全连接层有n个训练好的分类器,将每个分类器均与目标矩阵进行相似度计算,得到目标矩阵属于该分类器对应的行为类别的概率,共得到n个概率,在这n个分类器中,每个分类器都有目标矩阵对应的意图识别结果及意图识别结果对应的概率。并将每个分类器包含的意图识别结果对应的概率进行比较,选取概率最大的分类器对应的意图识别结果进行输出,即输出准确率最高的意图识别结果。
其中,分类器对应的意图识别结果及意图识别结果对应的概率可根据实际需要进行训练,分类器的数量n也可根据需要进行设置,此处不作具体限制,例如,n设置为14。
分类器实现方法包括但不限于:逻辑回归(Logistic Regression,LR)、支持向量机((Support Vector Machine,SVM)、交叉熵(Corss Entropy)和softmax回归等。
优选地,本申请实施例采用softmax回归来实现多个分类器的分类识别。
本实施例中,通过利用预先训练好的意图模型中的输出层、卷积层、池 化层和全连接层对目标分词进行一系列处理,得到处理后的意图识别结果。从而实现利用预先训练好的意图模型能够快速准确地识别出目标分词对应的意图识别结果,保证后续利用意图识别结果与槽位识别确定查询对象的准确性。
在一实施例中,如图4所示,步骤S31中,即利用输入层对目标分词进行词向量转换处理,得到词向量包括如下步骤:
S311:基于预设语料库,构建每个目标分词的基础词向量。
具体地,将每个目标分词按照预设语料库映射到一个向量中,将这些向量联系在一起,形成一个词向量空间,每个向量相当于是这个空间中的一个点。其中,预设语料库是指用于构建目标分词对应的基础词向量的数据库。
例如,存在目标分词为:宝马、奔驰,根据预设语料库,获取了这两个目标分词的所有可能分类:“汽车”、“奢侈品”、“动物”、“动作”和“美食”。因此,对这两个目标分词引入一种向量表示:
<汽车,奢侈品,动物,动作,美食>;
根据统计学习的方法计算这两个目标分词属于每个分类的概率,计算机学到的可能是:
宝马=<0.5,0.2,0.2,0.0,0.1>;
奔驰=<0.7,0.2,0.0,0.1,0.0>。
可以理解地,基础词向量的每一维的值代表一个具有一定的语义和语法上能够解释的特征,故可以将基础词向量的每一维称为一个目标分词特征。
进一步地,为每个目标分词均构建关键字词向量,得到基础词向量。
需要说明的是,每个目标分词对应唯一的基础词向量,每个基础词向量对应至少一个目标分词。
通过基于预设语料库,构建每个目标分词的基础词向量,使得将机器无法准确理解的文字转换成了机器容易识别并进行运算的词向量,有利于对用户意图的准确识别。
S312:针对每个基础词向量,计算该基础词向量与其他基础词向量之间的空间距离,并从空间距离中选取最小值作为该基础词向量的最小空间距离。
具体地,针对每个基础词向量,使用空间距离的计算公式,分别计算该基础词向量与其他所有基础词向量之间的空间距离,并找出这些空间距离的最小值。
按照公式(1)计算基础词向量A(a
1,a
2,...,a
n)和基础词向量B(b
1,b
2,...,b
n)之间的空间距离L:
其中,L为空间距离,n为大于或等于2的正整数,b
i和a
i均为基础词向量。
例如,若基础词向量包含G
1(0.9,0.1)、G
2(0.5,0.5)和G
3(0.8,0.2), 针G
1,按照公式(1)分别计算G
1到G
2的空间距离为0.5659,以及G
1到G
3的空间距离为0.1414,则G
1的最小空间距离为0.1414。
S313:将最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为词向量。
具体地,根据步骤S312计算出每个基础词向量的最小空间距离之后,对这些最小空间距离与预设的空间距离阈值进行比较,将最小空间距离小于或等于空间距离阈值的基础词向量作为词向量。其中,预设的空间距离阈值具体可以是0.5,也可以根据用户的实际需求进行设置,此处不做限制。
通过对不符合预设的空间距离阈值要求的基础词向量进行过滤,避免了将用户关注度低的内容也放入词向量,从而可以更准确的确定用户意图。
例如,在一具体实施方式中,预设的空间距离阈值为0.8,基础词向量包括H
1(0.9,0.1,0)、H
2(0.8,0.1,0.1)和H
3(0,0.1,0.9),通过步骤S312中的公式(1)计算得到H
1的最小空间距离为0.4243,H
2的最小空间距离为0.4243,H
3的最小空间距离为1.1314,H
1和H
2的最小空间距离小于预设的空间距离阈值0.8,因此,将H
1和H
2作为词向量。
本实施例中,通过根据预设语料库构建每个目标分词的基础词向量,在计算每个基础词向量与其他基础词向量之间的空间距离,并选取最小空间距离,将最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为词向量。
从而实现快速将目标分词转换为对应的词向量,有利于后续意图模型对词向量的准确识别,从而提高后续模型识别的准确性。
在一实施例中,如图5所示,步骤S4之后,该基于卷积神经网络的信息检索方法还包括如下步骤:
S81:若未匹配到与意图识别结果相应的标识信息,则将意图识别结果和查询语句发送给第一目标用户进行确认。
在本申请实施例中,第一目标用户是指针对未匹配到与意图识别结果相应的标识信息的情况,对意图识别结果和查询语句进行分析确认的处理用户。
具体地,根据步骤S4中将意图识别结果与预设模型库中的标识信息进行匹配的方式,若未匹配到与意图识别结果相应的标识信息,则表示预设模型库中没有存在能够对该意图识别结果进行语义槽类型识别的语义槽模型,并将该意图识别结果与该意图识别结果对应的查询语句按照预设的方式发送给第一目标用户。
其中,预设的方式具体可以是以邮件的形式,也可以是以短信的形式,此处不做限制。
S82:接收第一目标用户反馈的初始识别结果,并将初始识别结果作为槽位识别结果。
具体地,第一目标用户在接收到步骤S81中发送的意图识别结果和查询语句之后,通过根据意图识别结果和查询语句进行分析处理后得到初始识别结果,并将初始识别结果进行反馈,当检测到预设第一反馈库中存在初始识 别结果时,对初始识别结果进行提取,并将该初始识别结果作为槽位识别结果。
其中,预设第一反馈库是指专门用于存储第一目标用户反馈的初始识别结果的数据库。
需要说明的是,当从预设第一反馈库中对初始识别结果进行提取后,将提取到的初始识别结果从预设第一反馈库中进行删除处理。
本实施例中,在未匹配到与意图识别结果相应的标识信息的情况下,将意图识别结果和查询语句发送给第一目标用户进行确认,最后接收第一目标用户反馈的初始识别结果,并将该初始识别结果作为槽位识别结果。从而实现在未匹配到与意图识别结果相应的标识信息的情况下,能够结合人工交互的方式确定槽位识别结果,从而保证后续利用槽位识别结果确定查询对象的准确性。
在一实施例中,如图6所示,步骤S5之后,该基于卷积神经网络的信息检索方法还包括如下步骤:
S91:若槽位识别结果为识别失败,则从预设问题库中选取与意图识别结果匹配的关联问题发送给查询用户进行确认。
在本申请实施例中,槽位识别结果包含识别失败,若槽位识别结果为识别失败,则将该槽位识别结果对应的意图识别结果与预设问题库中的问题标识进行匹配,当意图识别结果与问题标识相同时,表示匹配成功,并将该问题标识对应的关联问题按照预设的方式发送给查询用户进行确认。
其中,预设问题库是指专门用于存储不同的问题标识及问题标识对应的关联问题的数据库,且预设问题库中包含与所有意图识别结果相同的问题标识。
例如,预设问题库中存在2个问题标识分别为“产品价格”、“产品质量”,其对应的关联问题分别为“产品C价格怎样”、“产品C质量如何”,若意图识别结果为“产品价格”,通过将意图识别结果与问题标识进行匹配,得到意图识别结果“产品价格”与问题标识“产品价格”相同,故将问题标识“产品价格”对应的关联问题“产品C价格怎样”按照预设的方式发送给查询用户进行确认。
S92:接收查询用户反馈的反馈信息,并将反馈信息作为新的查询语句重新进行识别。
具体地,查询用户在接收到关联问题后,可以直接将关联问题作为反馈信息进行反馈,也可以重新输入查询语句作为反馈信息进行反馈,当检测到预设用户库中存在反馈信息时,对反馈信息进行提取,并将该反馈信息作为新的查询语句,基于该查询语句重新进行意图识别和槽位识别的步骤继续执行。
其中,预设用户库是指专门用于接收查询用户发送的反馈信息的数据库。
需要说明的是,当从预设用户库中对反馈信息进行提取后,将提取到的反馈信息从预设用户库中进行删除处理。
本实施例中,在槽位识别结果为识别失败的情况下,选取与意图识别结果相匹配的关联问题发送给查询用户进行确认,最后将查询用户反馈的反馈信息作为新的查询语句重新进行识别。从而实现在槽位识别结果为识别失败的情况下,能够自动选取关联问题发给查询用户确认,避免在识别出现失误直接将结果进行输出,进一步提高信息查询的准确性。
在一实施例中,如图7所示,步骤S6之后,该基于卷积神经网络的信息检索方法还包括如下步骤:
S101:若根据查询对象从查询库中查询不到查询结果,则将查询对象与查询语句发送给第二目标用户进行确认。
在本申请实施例中,第二目标用户是指针对根据查询对象从查询库中查询不到查询结果的情况,对查询语句进行分析确认的处理用户。由于查询库中可能存在某个路径下的信息为空,故存在查询对象在查询库中没有对应的查询结果的情况。
具体地,当根据查询对象从查询库中查询不到查询结果时,将该查询对象及查询对象对应的查询语句按照预设的方式发送给目标用户进行分析确认。
S102:接收第二目标用户反馈的反馈结果,将该反馈结果确定为查询结果并发送给查询用户。
具体地,当检测到预设第二反馈库中存在反馈结果时,则对反馈结果进行提取,将该反馈结果确定为查询结果,并按照预设的方式发送给查询用户。其中,预设第二反馈库是指专门用于接收第二目标用户发送的反馈结果的数据库。
本实施例中,若根据查询对象从查询库中未能查询到查询结果,则将查询对象及查询语句发送给第二目标用户进行确认,最后将第二目标用户反馈的反馈结果作为查询结果并发送给查询用户。从而实现在根据查询对象无法查询到查询结果的情况下,能够结合人工交互的方式确定查询结果,进而提高信息查询的准确性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种基于卷积神经网络的信息检索装置,该基于卷积神经网络的信息检索装置与上述实施例中基于卷积神经网络的信息检索方法一一对应。如图8所示,该基于卷积神经网络的信息检索装置包括获取模块81、分词模块82、意图识别模块83、匹配模块84、槽位识别模块85、确定模块86和发送模块87。各功能模块详细说明如下:
获取模块81,用于从预设数据库中获取查询用户输入的查询语句;
分词模块82,用于对查询语句进行分词处理,得到目标分词;
意图识别模块83,用于应用预先训练好的意图模型对目标分词进行意图识别,得到意图识别结果;
匹配模块84,用于将意图识别结果与预设模型库中的标识信息进行匹配, 其中,预设模型库包含不同的标识信息及标识信息对应的语义槽模型;
槽位识别模块85,用于若匹配到与意图识别结果相应的标识信息,则从预设模型库中选取该标识信息对应的语义槽模型对目标分词进行语义槽类型识别,得到槽位识别结果;
确定模块86,用于根据意图识别结果与槽位识别结果,确定查询对象;
发送模块87,用于从查询数据库中获取查询对象对应的查询结果,并将查询结果发送给查询用户。
进一步地,分词模块82包括:
滤除子模块,用于对查询语句进行非文字字符滤除处理,得到纯文本;
纯文本分词子模块,用于通过预设分词词库对纯文本进行分词处理,得到目标分词。
进一步地,意图识别模块83包括:
词向量转换子模块,用于利用输入层对目标分词进行词向量转换处理,得到词向量;
卷积子模块,用于根据卷积层对词向量进行卷积操作,得到特征矩阵;
降维子模块,用于利用池化层对特征矩阵进行降维处理,得到目标矩阵;
运算子模块,用于通过全连接层对目标矩阵进行运算处理,得到意图识别结果。
进一步地,词向量转换子模块包括:
构建单元,用于基于预设语料库,构建每个目标分词的基础词向量;
计算单元,用于针对每个基础词向量,计算该基础词向量与其他基础词向量之间的空间距离,并从空间距离中选取最小值作为该基础词向量的最小空间距离;
词向量确定单元,用于将最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为词向量。
进一步地,基于卷积神经网络的信息检索装置还包括:
第一发送模块,用于若未匹配到与意图识别结果相应的标识信息,则将意图识别结果和查询语句发送给第一目标用户进行确认;
第一接收模块,用于接收第一目标用户反馈的初始识别结果,并将初始识别结果作为槽位识别结果。
进一步地,基于卷积神经网络的信息检索装置还包括:
第二发送模块,用于若槽位识别结果为识别失败,则从预设问题库中选取与意图识别结果匹配的关联问题发送给查询用户进行确认;
第二接收模块,用于接收查询用户反馈的反馈信息,并将反馈信息作为新的查询语句重新进行识别。
进一步地,基于卷积神经网络的信息检索装置还包括:
第三发送模块,用于若根据查询对象从查询库中查询不到查询结果,则将查询对象与查询语句发送给第二目标用户进行确认;
第三接收模块,用于接收第二目标用户反馈的反馈结果,将该反馈结果 确定为查询结果并发送给查询用户。
本申请的一些实施例公开了计算机设备。具体请参阅图9,为本申请的一实施例中计算机设备90基本结构框图。
如图9中所示意的,所述计算机设备90包括通过系统总线相互通信连接存储器91、处理器92、网络接口93。需要指出的是,图9中仅示出了具有组件91-93的计算机设备90,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器91至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器91可以是所述计算机设备90的内部存储单元,例如该计算机设备90的硬盘或内存。在另一些实施例中,所述存储器91也可以是所述计算机设备90的外部存储设备,例如该计算机设备90上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器91还可以既包括所述计算机设备90的内部存储单元也包括其外部存储设备。本实施例中,所述存储器91通常用于存储安装于所述计算机设备90的操作系统和各类应用软件,例如所述基于卷积神经网络的信息检索方法的计算机可读指令等。此外,所述存储器91还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器92在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器92通常用于控制所述计算机设备90的总体操作。本实施例中,所述处理器92用于运行所述存储器91中存储的计算机可读指令或者处理数据,例如运行所述基于卷积神经网络的信息检索方法的计算机可读指令。
所述网络接口93可包括无线网络接口或有线网络接口,该网络接口93通常用于在所述计算机设备90与其他电子设备之间建立通信连接。
本申请还提供了另一种实施方式,即提供一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有查询信息录入流程,所述查询信息录入流程可被至少一个处理器执行,以使所述至少一个处理器执 行上述任意一种基于卷积神经网络的信息检索方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台计算机设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
最后应说明的是,显然以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。
Claims (20)
- 一种基于卷积神经网络的信息检索方法,其特征在于,所述卷积神经网络的信息检索方法包括:从预设数据库中获取查询用户输入的查询语句;对所述查询语句进行分词处理,得到目标分词;应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;根据所述意图识别结果与所述槽位识别结果,确定查询对象;从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
- 如权利要求1所述的基于卷积神经网络的信息检索方法,其特征在于,所述对所述查询语句进行分词处理,得到目标分词的步骤包括:对所述查询语句进行非文字字符滤除处理,得到纯文本;通过预设分词词库对所述纯文本进行分词处理,得到所述目标分词。
- 如权利要求1所述的基于卷积神经网络的信息检索方法,其特征在于,所述意图模型包含输入层、卷积层、池化层和全连接层,所述应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果的步骤包括:利用所述输入层对所述目标分词进行词向量转换处理,得到词向量;根据所述卷积层对所述词向量进行卷积操作,得到特征矩阵;利用所述池化层对所述特征矩阵进行降维处理,得到目标矩阵;通过所述全连接层对所述目标矩阵进行运算处理,得到所述意图识别结果。
- 如权利要求3所述的基于卷积神经网络的信息检索方法,其特征在于,所述利用所述输入层对所述目标分词进行词向量转换处理,得到词向量的步骤包括:基于预设语料库,构建每个所述目标分词的基础词向量;针对每个所述基础词向量,计算该基础词向量与其他基础词向量之间的空间距离,并从所述空间距离中选取最小值作为该基础词向量的最小空间距离;将所述最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为所述词向量。
- 如权利要求1所述的基于卷积神经网络的信息检索方法,其特征在于,所述将所述意图识别结果与预设模型库中的标识信息进行匹配的步骤之后,所述基于卷积神经网络的信息检索方法还包括:若未匹配到与所述意图识别结果相应的标识信息,则将所述意图识别结果和所述查询语句发送给第一目标用户进行确认;接收所述第一目标用户反馈的初始识别结果,并将所述初始识别结果作为所述槽位识别结果。
- 如权利要求1所述的基于卷积神经网络的信息检索方法,其特征在于,所述若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果的步骤之后,所述基于卷积神经网络的信息检索方法还包括:若所述槽位识别结果为识别失败,则从预设问题库中选取与所述意图识别结果匹配的关联问题发送给查询用户进行确认;接收所述查询用户反馈的反馈信息,并将所述反馈信息作为新的所述查询语句重新进行识别。
- 如权利要求1所述的基于卷积神经网络的信息检索方法,其特征在于,所述根据所述意图识别结果与所述槽位识别结果,确定查询对象的步骤之后,所述基于卷积神经网络的信息检索方法还包括:若根据所述查询对象从所述查询库中查询不到所述查询结果,则将所述查询对象与所述查询语句发送给第二目标用户进行确认;接收所述第二目标用户反馈的反馈结果,将所述反馈结果确定为所述查询结果并发送给所述查询用户。
- 一种基于卷积神经网络的信息检索装置,其特征在于,所述基于卷积神经网络的信息检索装置包括:获取模块,用于从预设数据库中获取查询用户输入的查询语句;分词模块,用于对所述查询语句进行分词处理,得到目标分词;意图识别模块,用于应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;匹配模块,用于将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;槽位识别模块,用于若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;确定模块,用于根据所述意图识别结果与所述槽位识别结果,确定查询对象;发送模块,用于从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
- 如权利要求8所述的基于卷积神经网络的信息检索装置,其特征在于, 所述分词模块包括:滤除子模块,用于对所述查询语句进行非文字字符滤除处理,得到纯文本;纯文本分词子模块,用于通过预设分词词库对所述纯文本进行分词处理,得到所述目标分词。
- 如权利要求8所述的基于卷积神经网络的信息检索装置,其特征在于,所述意图识别模块包括:词向量转换子模块,用于利用所述输入层对所述目标分词进行词向量转换处理,得到词向量;卷积子模块,用于根据所述卷积层对所述词向量进行卷积操作,得到特征矩阵;降维子模块,用于利用所述池化层对所述特征矩阵进行降维处理,得到目标矩阵;运算子模块,用于通过所述全连接层对所述目标矩阵进行运算处理,得到所述意图识别结果。
- 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:从预设数据库中获取查询用户输入的查询语句;对所述查询语句进行分词处理,得到目标分词;应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;根据所述意图识别结果与所述槽位识别结果,确定查询对象;从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
- 如权利要求11所述的计算机设备,其特征在于,所述对所述查询语句进行分词处理,得到目标分词的步骤包括:对所述查询语句进行非文字字符滤除处理,得到纯文本;通过预设分词词库对所述纯文本进行分词处理,得到所述目标分词。
- 如权利要求11所述的计算机设备,其特征在于,所述意图模型包含输入层、卷积层、池化层和全连接层,所述应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果的步骤包括:利用所述输入层对所述目标分词进行词向量转换处理,得到词向量;根据所述卷积层对所述词向量进行卷积操作,得到特征矩阵;利用所述池化层对所述特征矩阵进行降维处理,得到目标矩阵;通过所述全连接层对所述目标矩阵进行运算处理,得到所述意图识别结果。
- 如权利要求13所述的计算机设备,其特征在于,所述利用所述输入层对所述目标分词进行词向量转换处理,得到词向量的步骤包括:基于预设语料库,构建每个所述目标分词的基础词向量;针对每个所述基础词向量,计算该基础词向量与其他基础词向量之间的空间距离,并从所述空间距离中选取最小值作为该基础词向量的最小空间距离;将所述最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为所述词向量。
- 如权利要求11所述的计算机设备,其特征在于,所述将所述意图识别结果与预设模型库中的标识信息进行匹配的步骤之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:若未匹配到与所述意图识别结果相应的标识信息,则将所述意图识别结果和所述查询语句发送给第一目标用户进行确认;接收所述第一目标用户反馈的初始识别结果,并将所述初始识别结果作为所述槽位识别结果。
- 一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一种处理器执行时,使得所述一种处理器执行如下步骤:从预设数据库中获取查询用户输入的查询语句;对所述查询语句进行分词处理,得到目标分词;应用预先训练好的意图模型对所述目标分词进行意图识别,得到意图识别结果;将所述意图识别结果与预设模型库中的标识信息进行匹配,其中,所述预设模型库包含不同的标识信息及标识信息对应的语义槽模型;若匹配到与所述意图识别结果相应的标识信息,则从预设模型库中选取所述标识信息对应的语义槽模型对所述目标分词进行语义槽类型识别,得到槽位识别结果;根据所述意图识别结果与所述槽位识别结果,确定查询对象;从查询数据库中获取所述查询对象对应的查询结果,并将所述查询结果发送给所述查询用户。
- 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述对所述查询语句进行分词处理,得到目标分词的步骤包括:对所述查询语句进行非文字字符滤除处理,得到纯文本;通过预设分词词库对所述纯文本进行分词处理,得到所述目标分词。
- 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述意图模型包含输入层、卷积层、池化层和全连接层,所述应用预先训练 好的意图模型对所述目标分词进行意图识别,得到意图识别结果的步骤包括:利用所述输入层对所述目标分词进行词向量转换处理,得到词向量;根据所述卷积层对所述词向量进行卷积操作,得到特征矩阵;利用所述池化层对所述特征矩阵进行降维处理,得到目标矩阵;通过所述全连接层对所述目标矩阵进行运算处理,得到所述意图识别结果。
- 如权利要求18所述的非易失性的计算机可读存储介质,其特征在于,所述利用所述输入层对所述目标分词进行词向量转换处理,得到词向量的步骤包括:基于预设语料库,构建每个所述目标分词的基础词向量;针对每个所述基础词向量,计算该基础词向量与其他基础词向量之间的空间距离,并从所述空间距离中选取最小值作为该基础词向量的最小空间距离;将所述最小空间距离中小于或等于预设空间距离阈值的基础词向量,作为所述词向量。
- 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述将所述意图识别结果与预设模型库中的标识信息进行匹配的步骤之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:若未匹配到与所述意图识别结果相应的标识信息,则将所述意图识别结果和所述查询语句发送给第一目标用户进行确认;接收所述第一目标用户反馈的初始识别结果,并将所述初始识别结果作为所述槽位识别结果。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910884119.2 | 2019-09-19 | ||
CN201910884119.2A CN110825949B (zh) | 2019-09-19 | 2019-09-19 | 基于卷积神经网络的信息检索方法、及其相关设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021051517A1 true WO2021051517A1 (zh) | 2021-03-25 |
Family
ID=69548051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/116928 WO2021051517A1 (zh) | 2019-09-19 | 2019-11-10 | 基于卷积神经网络的信息检索方法、及其相关设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110825949B (zh) |
WO (1) | WO2021051517A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113157892A (zh) * | 2021-05-24 | 2021-07-23 | 中国平安人寿保险股份有限公司 | 用户意图处理方法、装置、计算机设备及存储介质 |
CN113342965A (zh) * | 2021-06-24 | 2021-09-03 | 平安国际融资租赁有限公司 | 意图预测及反馈方法、装置、计算机设备及可读存储介质 |
CN116244344A (zh) * | 2022-11-25 | 2023-06-09 | 中国农业科学院农业信息研究所 | 基于用户需求的检索方法、装置以及电子设备 |
CN117668002A (zh) * | 2024-02-01 | 2024-03-08 | 江西合一云数据科技股份有限公司 | 应用于公共信息平台的大数据决策方法、装置及设备 |
CN118227740A (zh) * | 2024-05-22 | 2024-06-21 | 深圳迅策科技股份有限公司 | 一种金融数据的查询方法、查询装置和存储介质 |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111538818B (zh) * | 2020-03-26 | 2023-05-12 | 深圳云天励飞技术有限公司 | 数据查询方法、装置、电子设备及存储介质 |
CN113569128A (zh) * | 2020-04-29 | 2021-10-29 | 北京金山云网络技术有限公司 | 数据检索方法、装置及电子设备 |
CN114004234A (zh) * | 2020-07-28 | 2022-02-01 | 深圳Tcl数字技术有限公司 | 一种语义识别方法、存储介质及终端设备 |
CN112214588B (zh) * | 2020-10-16 | 2024-04-02 | 深圳赛安特技术服务有限公司 | 多意图识别方法、装置、电子设备及存储介质 |
CN112380238B (zh) * | 2020-11-16 | 2024-06-28 | 平安科技(深圳)有限公司 | 数据库数据查询方法、装置、电子设备及存储介质 |
CN112559687B (zh) * | 2020-12-15 | 2024-07-30 | 中国平安人寿保险股份有限公司 | 问题识别及查询方法、装置、电子设备及存储介质 |
CN113590747B (zh) * | 2021-07-05 | 2022-12-06 | 北京元年科技股份有限公司 | 用于意图识别的方法以及相应的系统、计算机设备和介质 |
CN114048226A (zh) * | 2021-11-12 | 2022-02-15 | 国家电网有限公司大数据中心 | 一种数据查询方法、装置、电子设备和存储介质 |
CN113886435B (zh) * | 2021-12-08 | 2022-03-18 | 国能大渡河大数据服务有限公司 | 一种基于循环神经网络的信息查询方法及系统 |
CN114610914B (zh) * | 2022-03-11 | 2024-08-13 | 北京百度网讯科技有限公司 | 一种信息处理方法、装置及电子设备 |
CN118467570B (zh) * | 2024-07-10 | 2024-09-27 | 浪潮通用软件有限公司 | 一种用于业务数据查询的数据后处理方法、系统及设备 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335398A (zh) * | 2014-07-18 | 2016-02-17 | 华为技术有限公司 | 一种服务推荐方法及终端 |
CN106557461A (zh) * | 2016-10-31 | 2017-04-05 | 百度在线网络技术(北京)有限公司 | 基于人工智能的语义解析处理方法和装置 |
CN107315737A (zh) * | 2017-07-04 | 2017-11-03 | 北京奇艺世纪科技有限公司 | 一种语义逻辑处理方法及系统 |
CN107369443A (zh) * | 2017-06-29 | 2017-11-21 | 北京百度网讯科技有限公司 | 基于人工智能的对话管理方法及装置 |
CN107862027A (zh) * | 2017-10-31 | 2018-03-30 | 北京小度信息科技有限公司 | 检索意图识别方法、装置、电子设备及可读存储介质 |
CN109871543A (zh) * | 2019-03-12 | 2019-06-11 | 广东小天才科技有限公司 | 一种意图获取方法及系统 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100483411C (zh) * | 2006-03-10 | 2009-04-29 | 华为技术有限公司 | 关系型数据库中信息检索方法及装置 |
CN107256267B (zh) * | 2017-06-19 | 2020-07-24 | 北京百度网讯科技有限公司 | 查询方法和装置 |
CN108170859B (zh) * | 2018-01-22 | 2020-07-28 | 北京百度网讯科技有限公司 | 语音查询的方法、装置、存储介质及终端设备 |
CN108334499B (zh) * | 2018-02-08 | 2022-03-18 | 海南云江科技有限公司 | 一种文本标签标注设备、方法和计算设备 |
CN108446271B (zh) * | 2018-03-07 | 2021-11-26 | 中山大学 | 基于汉字部件特征的卷积神经网络的文本情感分析方法 |
CN109101545A (zh) * | 2018-06-29 | 2018-12-28 | 北京百度网讯科技有限公司 | 基于人机交互的自然语言处理方法、装置、设备和介质 |
CN109063035B (zh) * | 2018-07-16 | 2021-11-09 | 哈尔滨工业大学 | 一种面向出行领域的人机多轮对话方法 |
CN109241524B (zh) * | 2018-08-13 | 2022-12-20 | 腾讯科技(深圳)有限公司 | 语义解析方法及装置、计算机可读存储介质、电子设备 |
CN109299269A (zh) * | 2018-10-23 | 2019-02-01 | 阿里巴巴集团控股有限公司 | 一种文本分类方法和装置 |
CN109063221B (zh) * | 2018-11-02 | 2021-04-09 | 北京百度网讯科技有限公司 | 基于混合策略的查询意图识别方法和装置 |
CN110175223A (zh) * | 2019-05-29 | 2019-08-27 | 北京搜狗科技发展有限公司 | 一种实现问题生成的方法及装置 |
-
2019
- 2019-09-19 CN CN201910884119.2A patent/CN110825949B/zh active Active
- 2019-11-10 WO PCT/CN2019/116928 patent/WO2021051517A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335398A (zh) * | 2014-07-18 | 2016-02-17 | 华为技术有限公司 | 一种服务推荐方法及终端 |
CN106557461A (zh) * | 2016-10-31 | 2017-04-05 | 百度在线网络技术(北京)有限公司 | 基于人工智能的语义解析处理方法和装置 |
CN107369443A (zh) * | 2017-06-29 | 2017-11-21 | 北京百度网讯科技有限公司 | 基于人工智能的对话管理方法及装置 |
CN107315737A (zh) * | 2017-07-04 | 2017-11-03 | 北京奇艺世纪科技有限公司 | 一种语义逻辑处理方法及系统 |
CN107862027A (zh) * | 2017-10-31 | 2018-03-30 | 北京小度信息科技有限公司 | 检索意图识别方法、装置、电子设备及可读存储介质 |
CN109871543A (zh) * | 2019-03-12 | 2019-06-11 | 广东小天才科技有限公司 | 一种意图获取方法及系统 |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113157892A (zh) * | 2021-05-24 | 2021-07-23 | 中国平安人寿保险股份有限公司 | 用户意图处理方法、装置、计算机设备及存储介质 |
CN113342965A (zh) * | 2021-06-24 | 2021-09-03 | 平安国际融资租赁有限公司 | 意图预测及反馈方法、装置、计算机设备及可读存储介质 |
CN113342965B (zh) * | 2021-06-24 | 2023-11-14 | 平安国际融资租赁有限公司 | 意图预测及反馈方法、装置、计算机设备及可读存储介质 |
CN116244344A (zh) * | 2022-11-25 | 2023-06-09 | 中国农业科学院农业信息研究所 | 基于用户需求的检索方法、装置以及电子设备 |
CN116244344B (zh) * | 2022-11-25 | 2023-09-05 | 中国农业科学院农业信息研究所 | 基于用户需求的检索方法、装置以及电子设备 |
CN117668002A (zh) * | 2024-02-01 | 2024-03-08 | 江西合一云数据科技股份有限公司 | 应用于公共信息平台的大数据决策方法、装置及设备 |
CN117668002B (zh) * | 2024-02-01 | 2024-05-17 | 江西合一云数据科技股份有限公司 | 应用于公共信息平台的大数据决策方法、装置及设备 |
CN118227740A (zh) * | 2024-05-22 | 2024-06-21 | 深圳迅策科技股份有限公司 | 一种金融数据的查询方法、查询装置和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110825949B (zh) | 2024-09-13 |
CN110825949A (zh) | 2020-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021051517A1 (zh) | 基于卷积神经网络的信息检索方法、及其相关设备 | |
US20200081899A1 (en) | Automated database schema matching | |
US8972408B1 (en) | Methods, systems, and articles of manufacture for addressing popular topics in a social sphere | |
WO2021056710A1 (zh) | 多轮问答识别方法、装置、计算机设备及存储介质 | |
CN111078837B (zh) | 智能问答信息处理方法、电子设备及计算机可读存储介质 | |
CN109376261B (zh) | 基于中级文本语义增强空间的模态独立检索方法和系统 | |
US11216618B2 (en) | Query processing method, apparatus, server and storage medium | |
WO2020114100A1 (zh) | 一种信息处理方法、装置和计算机存储介质 | |
CN112035599B (zh) | 基于垂直搜索的查询方法、装置、计算机设备及存储介质 | |
CN111813905A (zh) | 语料生成方法、装置、计算机设备及存储介质 | |
WO2017091985A1 (zh) | 停用词识别方法与装置 | |
CN112395421B (zh) | 课程标签的生成方法、装置、计算机设备及介质 | |
CN110362798B (zh) | 裁决信息检索分析方法、装置、计算机设备和存储介质 | |
CN109271624B (zh) | 一种目标词确定方法、装置及存储介质 | |
CN113326702B (zh) | 语义识别方法、装置、电子设备及存储介质 | |
CN111400584A (zh) | 联想词的推荐方法、装置、计算机设备和存储介质 | |
WO2019041528A1 (zh) | 新闻情感方向判断方法、电子设备及计算机可读存储介质 | |
CN111737543A (zh) | 一种问答对的提取方法、装置、设备和存储介质 | |
CN112988784A (zh) | 数据查询方法、查询语句生成方法及其装置 | |
Wang et al. | A novel calibrated label ranking based method for multiple emotions detection in Chinese microblogs | |
US20130238608A1 (en) | Search results by mapping associated with disparate taxonomies | |
US11620319B2 (en) | Search platform for unstructured interaction summaries | |
CN113076740A (zh) | 政务服务领域的同义词挖掘方法及装置 | |
CN115358817A (zh) | 基于社交数据的智能产品推荐方法、装置、设备及介质 | |
WO2021056740A1 (zh) | 语言模型构建方法、系统、计算机设备及可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19945882 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19945882 Country of ref document: EP Kind code of ref document: A1 |