CN109344300A - The data query of natural language is intended to determine method, apparatus and computer equipment - Google Patents

The data query of natural language is intended to determine method, apparatus and computer equipment Download PDF

Info

Publication number
CN109344300A
CN109344300A CN201811021831.1A CN201811021831A CN109344300A CN 109344300 A CN109344300 A CN 109344300A CN 201811021831 A CN201811021831 A CN 201811021831A CN 109344300 A CN109344300 A CN 109344300A
Authority
CN
China
Prior art keywords
data
presented
word
query
dimension
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.)
Withdrawn
Application number
CN201811021831.1A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811021831.1A priority Critical patent/CN109344300A/en
Priority to PCT/CN2019/071606 priority patent/WO2020042530A1/en
Priority to SG11201914037QA priority patent/SG11201914037QA/en
Publication of CN109344300A publication Critical patent/CN109344300A/en
Withdrawn 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/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation

Abstract

The data query that the present invention provides a kind of natural language is intended to determine method, apparatus, computer equipment and storage medium, is related to natural language processing (NLP, Natural Language Processing) technical field.This method includes presetting multiple keyword filters;Obtain the data inquiry request based on natural language;The request is segmented to obtain the first word set;First word set is filtered using each keyword filter;Query context is obtained according to the word being filled into;The word being consistent in first word set with range word is removed to obtain the second word set;Semantic tagger generative semantics are carried out to the word in the second word set and analyze result;The dimension that data are presented and the method that data are presented are determined according to semantic analysis result;The method of query context, the dimension that data are presented and data presentation is exported as standardized data query intention.By means of the invention it is possible to promote the efficiency data query based on natural language.

Description

The data query of natural language is intended to determine method, apparatus and computer equipment
Technical field
The present invention relates to the data queries of data query technique field more particularly to a kind of natural language to be intended to determination side Method, device, computer equipment and storage medium.
Background technique
Currently, when user carries out the inquiry of data, it usually needs user first selectes inquiry circle according to oneself query intention The options being arranged on face, the query term that then server side selects user forms the inquiry content of user, based on inquiry Content obtains query result.
However, this can result in, and user can only be according to options because being scanned for by way of selecting query term Provided in options selected, when options is very little, the range of choice of user will receive limitation, in options When excessive, for user when selecting options, the operation of selection is more complicated.In order to make the search of user and inquire more Add conveniently, the inquiry based on natural language becomes following important inquiry mode, wherein identifies the data query of natural language It is intended that the basis of the inquiry based on natural language.
Thus, the data query for providing a kind of natural language is intended to determine that method, apparatus, computer equipment and storage are situated between Matter is intended to accurately capturing user data query from natural language, is explicitly extracted and is putd question to range and analysis dimension, is This field technical issues that need to address.
Summary of the invention
It is intended to determine method, apparatus, computer equipment the object of the present invention is to provide a kind of data query of natural language And storage medium, for solving the above problem of the existing technology.
To achieve the above object, the data query that the present invention provides a kind of natural language is intended to determine method.
This method comprises: presetting the keyword filter of multiple characterization query contexts, wherein each keyword filtering Device corresponds to a range set of words, and the range set of words includes multiple range words;It obtains to be analyzed based on natural language Data inquiry request;The data inquiry request is segmented, the first word set is obtained;Using each keyword filter Filter the word being consistent in first word set with the range word;The data inquiry request is obtained according to all words being filled into Query context;The word being consistent in first word set with the range word is removed, the second word set is obtained;To second word The root of concentration carries out semantic tagger according to semantic knowledge-base, and generative semantics analyze result;It is determined according to the semantic analysis result The method that the dimension and data that the corresponding data of the data inquiry request are presented are presented;And the output query context, institute Three kinds of parameters of method that the dimension and the data for stating data presentation are presented, as the corresponding standardized data of data inquiry request Query intention.
Further, this method further include: filter when using each keyword filter less than first word When concentrating the word being consistent with the range word, obtains the inquiry of historical data and be intended to;The determining dimension presented with the data and institute The highest the inquiry of historical data of method matching degree for stating data presentation is intended to;Obtain the highest historical data of the matching degree Query context of the historical query range as the data inquiry request in query intention;Wherein, the inquiry model is being exported It encloses, three kinds of parameters of method that the dimension that the data are presented and the data are presented, as the corresponding standard of data inquiry request When changing the step that data query is intended to, grey is set by the character script color for characterizing the query context.
Further, this method further include: when can not determine that the data query is asked according to the semantic analysis result When the dimension for asking corresponding data to present, obtains the inquiry of historical data and be intended to;It determines with the query context and the data and is in The highest the inquiry of historical data of existing method matching degree is intended to;The highest the inquiry of historical data of the matching degree is obtained to be intended to In historical data present dimension as the data inquiry request data present dimension;Wherein, it looks into described in the output Ask range, three kinds of parameters of method that the dimension that the data are presented and the data are presented, it is corresponding as data inquiry request When the step of standardized data query intention, grey is set by the character script color for characterizing the dimension that the data are presented.
Further, this method further include: when can not determine that the data query is asked according to the semantic analysis result When the method for asking corresponding data to present, obtains the inquiry of historical data and be intended to;It determines with the query context and the data and is in The highest the inquiry of historical data of existing dimension matching degree is intended to;The highest the inquiry of historical data of the matching degree is obtained to be intended to In historical data present method as the data inquiry request data present method;Wherein, it looks into described in the output Ask range, three kinds of parameters of method that the dimension that the data are presented and the data are presented, it is corresponding as data inquiry request When the step of standardized data query intention, grey is set by the character script color for characterizing the method that the data are presented.
Further, the semantic analysis result includes that multiple word-justice are right, and institute's predicate-justice is to including second word set In a word and institute's predicate semanteme.
Further, this method further include: semanteme corresponding to the dimension that each data are presented in preset data content;Root Determine that the dimension that the corresponding data of the data inquiry request are presented includes: matching institute's predicate-justice according to the semantic analysis result Semanteme corresponding to the dimension that each data are presented in the semanteme of centering and the data content;When institute's predicate-justice centering language When semanteme corresponding to the dimension that adopted the first data with the data content are presented is identical, first data are presented The dimension that dimension is presented as the corresponding data of the data inquiry request.
Further, this method further include: semanteme corresponding to the method that each data are presented in preset data content;Root Determine that the method that the corresponding data of the data inquiry request are presented includes: matching institute's predicate-justice according to the semantic analysis result Semanteme corresponding to the method that each data are presented in the semanteme of centering and the data content;When institute's predicate-justice centering language When semanteme corresponding to the method that adopted the first data with the data content are presented is identical, first data are presented The dimension that method is presented as the corresponding method of the data inquiry request.
To achieve the above object, the data query that the present invention provides a kind of natural language is intended to determining device.
The device includes: multiple keyword filters, wherein the keyword filter is for characterizing query context, often A corresponding range set of words of the keyword filter, the range set of words includes multiple range words;Module is obtained, is used In the acquisition data inquiry request to be analyzed based on natural language;Word segmentation module, for being carried out to the data inquiry request Participle, obtains the first word set;Calling module, for call each keyword filter filter in first word set with institute State the word that range word is consistent;First determining module, for obtaining looking into for the data inquiry request according to all words being filled into Ask range;Module is screened out, the word removal for will be consistent in first word set with the range word obtains the second word set;Mark Injection molding block, for carrying out semantic tagger according to semantic knowledge-base to the root in second word set, generative semantics analyze result;The Two determining modules, for according to the semantic analysis result determine dimension that the corresponding data of the data inquiry request are presented and The method that data are presented;And output module, dimension and the data for exporting the query context, the data are presented Three kinds of parameters of method of presentation, as the corresponding standardized data query intention of data inquiry request.
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 a processor, the processor realize the above method when executing described program Step.
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 program is executed by processor.
The data query of natural language provided by the invention is intended to determine method, apparatus, computer equipment and storage medium, Predetermined keyword filter, can be by the range in the corresponding range set of words of keyword filter by the keyword filter Word filters out, thus, the combination of range word is set as needed, so that it may be filtered scheduled range word.Getting base After the data inquiry request of natural language, data inquiry request is segmented first, a word set is obtained, then passes through Preset keyword filter is filtered the word set, the word being consistent in the word set with range word is filtered out, according to mistake It filters out the word come and is capable of forming query context.After obtaining query context, the word filtered out in word set is got rid of, to remaining Word carries out semantic tagger, determines the dimension that data are presented and the method that data are presented according to the result of semantic tagger.Finally, with Three kinds of parameters of method that the dimension and data that query context, data are presented are presented, as the corresponding standardization of data inquiry request Data query is intended to, thus when carrying out data query, it can be using unified query logic according to standardized query intention It is inquired, improves search efficiency.
Detailed description of the invention
Fig. 1 is that the data query for the natural language that the embodiment of the present invention one provides is intended to determine the flow chart of method;
Fig. 2 is that the data query of natural language provided by Embodiment 2 of the present invention is intended to the block diagram of determining device.
Fig. 3 is the hardware structure diagram for the computer equipment that the embodiment of the present invention three provides.
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.
Embodiment one
In order to allow users to inquire content based on natural language expressing, search efficiency is improved, for server directly The spatial term query result according to user is connect, the data query which provides a kind of natural language is intended to determine The data inquiry request based on natural language is converted standardized data query intention by method, this method, wherein data query Intention includes three kinds of parameters of method of query context, the dimension that data are presented and data presentation, and specifically, Fig. 1 is of the invention real The data query for applying the natural language of the offer of example one is intended to determine the flow chart of method, as shown in Figure 1, the data of the natural language Query intention determines that method includes the following steps, namely S101 to step S109:
Step S101: the keyword filter of multiple characterization query contexts is preset.
Wherein, the corresponding range set of words of each keyword filter, range set of words includes multiple range words, example Such as, the range word that the corresponding range set of words of a keyword filter includes, which is arranged, Shanghai, Tianjin, Beijing, Nanchang and Shen Sun etc., for another example, the range word that the corresponding range set of words of another keyword filter includes, which is arranged, old age, infant, blueness In juvenile and middle age etc., how the corresponding range set of words of a keyword filter is specifically set, can be carried out according to data content Setting.
Step S102: the data inquiry request to be analyzed based on natural language is obtained.
The interface for receiving user query request is provided, is asked with receiving the data query based on natural language of user's input It asks, the specific mode that receives can input for text, or voice input inputs voice, can be identified as from the background text Word, no matter with which kind of input mode, the data inquiry request based on natural language is embodied by natural language, example Such as, the data inquiry request based on natural language is " entirety of District of Shanghai client is overdue, and what's the matter ", for another example based on certainly The data inquiry request of right language can be " gross sales amount that the March first sells group is how many " etc..
Step S103: segmenting data inquiry request, obtains the first word set.
For example, data inquiry request " how the educational background of the male user of District of Shanghai is distributed " is segmented, The first obtained word set be " Shanghai ", " area ", " ", " male ", " user ", " ", " educational background ", "Yes", " how ", " divide Cloth ", " ", it is preferable that obtained the first word set of participle can be filtered, filter out useless word, such as " ", "Yes" Deng.
Step S104: the word being consistent in the first word set with range word is filtered using each keyword filter.
In this step, by pre-set each keyword filter, the word in the first word set is filtered, with Obtain the word being consistent in the first word set with range word.
Step S105: the query context of data inquiry request is obtained according to all words being filled into.
In above-mentioned steps S104, the word being consistent with range word can be obtained by a filter, can also led to It crosses multiple filters and obtains multiple words being consistent with range word, when obtaining multiple words being consistent with range word by multiple filters When, each word combination being consistent with range word obtains the query context of data inquiry request.For example, using keyword filter pair When first word set corresponding to " how the educational background of the male user of District of Shanghai is distributed " is filtered, obtain and range The word that word is consistent includes " Shanghai " and " male ", thus, the query context of obtained data inquiry request is " Shanghai male ".
Step S106: the word being consistent in the first word set with range word is removed, the second word set is obtained.
When the word being consistent with range word obtained by step S104 includes " Shanghai " and " male ", the two words are removed The second word set obtained later include " area ", " user ", " educational background ", " how " and " distribution ".
Step S107: semantic tagger is carried out according to semantic knowledge-base to the root in the second word set, generative semantics analyze result.
For example, semantic analysis result includes that multiple word-justice are right, word-justice is to including a word and word in the second word set It is semantic.
Wherein, the semanteme of word includes part of speech and the meaning of a word, each to determine according to semantic knowledge-base when carrying out semantic tagger Parameter corresponding to a word, for example, word in the second word set include " area ", " user ", " educational background ", " how " and " distribution ", According to semantic knowledge-base, it may be determined that " area is a noun, Administration partition unit ", " user is a noun, the classification of people ", " educational background is a noun, a method of description education level ", " how being an interrogative " and " distribution be one move Word ", then semantic analysis result can be shown in the following way:
<area, noun, Administration partition unit>;
<user, noun, the classification of people>;
<educational background, noun, describe the mode of education level>;
<how, pronoun, expression query>;
<distribution, verb, indicate certain object a certain range spread>.
Step S108: the dimension of the corresponding data presentation of data inquiry request is determined according to semantic analysis result and data are in Existing method.
Determination for the dimension that data are presented, language corresponding to the dimension that each data are presented in preset data content Justice, for example, data content is for young census data between the whole nation 25 to 30 years old, the dimension that data are presented includes " learning Go through ", " annual income ", " year consumption " and " fertility condition " etc., preset " educational background ", " annual income ", " year consumption " respectively and " give birth to feelings Semanteme corresponding to condition ".
In this step, it is specifically wrapped according to the dimension that semantic analysis result determines that the corresponding data of data inquiry request are presented It includes:
Semanteme corresponding to the semantic dimension presented with data each in data content of matching word-justice centering;
When word-justice centering is semantic identical as semanteme corresponding to the dimension of the first data presentation in data content, The dimension that the dimension that first data are presented is presented as the corresponding data of data inquiry request.
Wherein, the method that data are presented refers to a kind of mode expressed data, such as certain school student Age data, the method that data are presented includes data being presented by the average value of institute's has age, by shared by each age group Ratio is presented data, data etc. is presented by the distribution situation of each age value.
Determination for the method that data are presented, language corresponding to the method that each data are presented in preset data content Justice, for example, data content be for young census data between the whole nation 25 to 30 years old, the method that data are presented include " point Cloth ", " average " etc. preset semanteme corresponding to " distribution ", " average " respectively.In this step, true according to semantic analysis result Determine the method that the corresponding data of data inquiry request are presented to specifically include:
Semanteme corresponding to the semantic method presented with data each in data content of matching word-justice centering;
When word-justice centering is semantic identical as semanteme corresponding to the method for the first data presentation in data content, The dimension that the method that first data are presented is presented as the corresponding method of data inquiry request.
Step S109: three kinds of parameters of method that the dimension and data that output query context, data are presented are presented, as data The corresponding standardized data query intention of inquiry request.
The method three that the dimension and data that each data query of output is intended to present including query context, data are presented Kind parameter, the data query for becoming standardized, unified are intended to.
The data query of the natural language provided using the embodiment is intended to determine method, and predetermined keyword filter leads to The range word in the corresponding range set of words of keyword filter can be filtered out by crossing the keyword filter, thus, root It is combined according to needing to be arranged range word, so that it may be filtered scheduled range word.It is looked into getting the data based on natural language After asking request, data inquiry request is segmented first, obtains a word set, then passes through preset keyword filter The word set is filtered, the word being consistent in the word set with range word is filtered out, is capable of forming according to the word filtered out Query context.After obtaining query context, the word filtered out in word set is got rid of, semantic tagger is carried out to remaining word, is pressed The dimension that data are presented and the method that data are presented are determined according to the result of semantic tagger.Finally, being presented with query context, data Dimension and data present three kinds of parameters of method, as the corresponding standardized data query intention of data inquiry request, thus It when carrying out data query, can be inquired using unified query logic according to standardized query intention, improve inquiry Efficiency.
Under normal conditions, for a filter, a word being consistent with range word at most can be obtained, a kind of specific It is available by the data inquiry request if obtain two or more words being consistent with range word in embodiment The data query of corresponding number is intended to, wherein the query context that each data query is intended to is different, the dimension sum number that data are presented It is identical according to the method for presentation, for example, data inquiry request is that " how the educational background of the male user of District of Shanghai and Beijing area is Distribution ", obtained query context includes " male of District of Shanghai " and " male of Beijing area ".
Optionally, the present invention can be determined incomplete data inquiry request when determining that data query is intended to, That is, can be to the data inquiry request of the full content for the method for not including query context, the dimension that data are presented and data presentation Carry out the determination of data query intention.For incomplete data inquiry request, embodiment provided by the invention is mended first Fill, then carry out the determination of data query intention again so that incomplete data inquiry request also can outputting standard, uniformly Data query be intended to.
Specifically, in one embodiment, when using each keyword filter filter less than in the first word set with model When enclosing the word that word is consistent, obtains the inquiry of historical data and be intended to;The method that the determining dimension presented with data and data are presented matches It spends highest the inquiry of historical data to be intended to, specifically, searches the dimension presented including data in a plurality of the inquiry of historical data intention The inquiry of historical data for the method that degree and data are presented is intended to, if inquiring one, this inquiry of historical data intention is It is intended to for the highest the inquiry of historical data of method matching degree that the dimension and data that present with data are presented, if inquired a plurality of And be intended in a plurality of the inquiry of historical data intention including the identical the inquiry of historical data of content, then by the identical historical data of content The inquiry of historical data that item number is most in query intention is intended to match as the method that the dimension and data presented with data is presented Highest the inquiry of historical data is spent to be intended to;Obtain the historical query range conduct in the highest the inquiry of historical data intention of matching degree Data presentation can be obtained for example, data inquiry request to be analyzed is " average annual income " in the query context of data inquiry request Dimension be " annual income ", data present method be " average ", at this point, a plurality of the inquiry of historical data be intended in find including " annual income " and " average " most the inquiry of historical data is intended to be intended to as the highest the inquiry of historical data of matching degree, the matching The historical query range spent in highest the inquiry of historical data intention is " Beijing is young ", then looks into " Beijing is young " as data Ask query context corresponding to request " average annual income ".Wherein, it is in output query context, the dimension of data presentation and data Existing three kinds of parameters of method will characterization inquiry when step as the corresponding standardized data query intention of data inquiry request The character script color of range is set as grey, above-mentioned data inquiry request " average annual income " is for, in outputting standard When changing data query intention, grey is set by the character script color of " Beijing is young ", especially to remind to user, to use Family is determined query context.
In another embodiment, when can not determine that the corresponding data of data inquiry request are according to semantic analysis result When existing dimension, obtains the inquiry of historical data and be intended to;The determining method matching degree presented with query context and data is highest to be gone through History data query is intended to, and specifically, searching in a plurality of the inquiry of historical data intention includes query context and the side that data are presented The inquiry of historical data of method is intended to, if inquiring one, this inquiry of historical data be intended to be and query context sum number It is intended to according to the highest the inquiry of historical data of the method matching degree of presentation, is intended to if inquiring a plurality of and a plurality of the inquiry of historical data In include that the identical the inquiry of historical data of content is intended to, then by the identical the inquiry of historical data of content be intended in item number is most goes through History data query is intended to be intended to as with query context and the highest the inquiry of historical data of method matching degree of data presentation;It obtains The dimension that historical data in the highest the inquiry of historical data intention of matching degree is presented is presented as the data of data inquiry request Dimension, for example, data inquiry request to be analyzed be " Shanghai male's average case ", can be obtained query context be " Shanghai male Property ", the method that data are presented is " average ", at this point, find in a plurality of the inquiry of historical data is intended to including " Shanghai male " and " average " most the inquiry of historical data is intended to be intended to as the highest the inquiry of historical data of matching degree, and the matching degree is highest to be gone through The dimension that data in history data query intention are presented is " annual income ", then " annual income " is used as data inquiry request " Shanghai The dimension that data corresponding to male's average case " are presented.Wherein, the dimension and data presented in output query context, data Three kinds of parameters of method of presentation when step as the corresponding standardized data query intention of data inquiry request, will characterize number It is set as grey according to the character script color of the dimension of presentation, being for above-mentioned data inquiry request, " Shanghai male is averaged feelings Condition " sets grey for the character script color of " annual income " when outputting standard data query is intended to, with special to user It indescribably wakes up, so that the dimension that data are presented in user is determined.
In another embodiment, when can not determine that the corresponding data of data inquiry request are according to semantic analysis result When existing method, obtains the inquiry of historical data and be intended to;The determining dimension matching degree presented with query context and data is highest to be gone through History data query is intended to, specifically, searching in a plurality of the inquiry of historical data intention includes query context and the dimension that data are presented The inquiry of historical data of degree is intended to, if inquiring one, this inquiry of historical data be intended to be and query context sum number It is intended to according to the highest the inquiry of historical data of the method matching degree of presentation, is intended to if inquiring a plurality of and a plurality of the inquiry of historical data In include that the identical the inquiry of historical data of content is intended to, then by the identical the inquiry of historical data of content be intended in item number is most goes through History data query is intended to be intended to as with query context and the highest the inquiry of historical data of dimension matching degree of data presentation;It obtains The method that historical data in the highest the inquiry of historical data intention of matching degree is presented is presented as the data of data inquiry request Method, for example, data inquiry request to be analyzed be " Shanghai male's annual income ", can be obtained query context be " Shanghai male Property ", the dimension that data are presented is " annual income ", at this point, finding in a plurality of the inquiry of historical data intention including " Shanghai male " " annual income " most the inquiry of historical data is intended to be intended to as the highest the inquiry of historical data of matching degree, the matching degree highest The inquiry of historical data be intended in the method that presents of data be " average ", then will be " average " as data inquiry request " Shanghai The method that data corresponding to male's annual income " are presented.Wherein, it is in output query context, the dimension of data presentation and data Existing three kinds of parameters of method, when step as the corresponding standardized data query intention of data inquiry request, by characterize data The character script color of the method for presentation is set as grey, is for above-mentioned data inquiry request " Shanghai male's annual income ", When outputting standard data query is intended to, grey is set by the character script color of " average ", especially to be reminded to user, So that the method that data are presented in user is determined.
Embodiment two
Corresponding to above-described embodiment one, second embodiment of the present invention provides a kind of data query device of natural language, phases Closing part can mutually refer to above-described embodiment one.Fig. 2 is that the data query of natural language provided by Embodiment 2 of the present invention is anticipated The block diagram of figure determining device, as shown in Fig. 2, the device includes multiple keyword filters 201, obtains module 202, word segmentation module 203, calling module 204, the first determining module 205, screen out module 206, labeling module 207, the second determining module 208 and output Module 209.
Wherein, keyword filter 201 is for characterizing query context, the corresponding range word set of each keyword filter It closes, range set of words includes multiple range words;Module 202 is obtained for obtaining the data query to be analyzed based on natural language Request;Word segmentation module 203 obtains the first word set for segmenting to data inquiry request;Calling module 204 is each for calling A keyword filter filters the word being consistent in the first word set with range word;First determining module 205 is used for according to all filterings To word obtain the query context of data inquiry request;Screen out word of the module 206 for will be consistent in the first word set with range word Removal, obtains the second word set;Labeling module 207 is used to carry out semantic tagger according to semantic knowledge-base to the root in the second word set, Generative semantics analyze result;Second determining module 208 is used to determine the corresponding number of data inquiry request according to semantic analysis result The method presented according to the dimension and data of presentation;The dimension and data that output module 209 is used to export query context, data are presented Three kinds of parameters of method of presentation, as the corresponding standardized data query intention of data inquiry request.
The data query of the natural language provided using the embodiment is intended to determining device, and predetermined keyword filter leads to The range word in the corresponding range set of words of keyword filter can be filtered out by crossing the keyword filter, thus, root It is combined according to needing to be arranged range word, so that it may be filtered scheduled range word.It gets obtaining module based on natural language Data inquiry request after, word segmentation module segments data inquiry request, obtains a word set, and calling module calls pre- If keyword filter the word set is filtered, the word being consistent in the word set with range word is filtered out, first determine Module is capable of forming query context according to the word filtered out.After obtaining query context, screening out module will filter out in word set Word get rid of, labeling module to remaining word carry out semantic tagger, the second determining module according to semantic tagger result determine The method that the dimension and data that data are presented out are presented.Finally, dimension and data that output module is presented with query context, data Three kinds of parameters of method of presentation, as the corresponding standardized data query intention of data inquiry request, to be looked into carrying out data It when inquiry, can be inquired using unified query logic according to standardized query intention, improve search efficiency.
Preferably, which further includes the first complementary module, is filtered less than first when using each keyword filter When the word being consistent in word set with range word, first complementary module is for executing following steps: obtaining the inquiry of historical data and is intended to; The highest the inquiry of historical data of method matching degree that the determining dimension presented with data and data are presented is intended to;Obtain matching degree most Query context of the historical query range as data inquiry request in high the inquiry of historical data intention.Wherein, output module It is corresponding as data inquiry request in three kinds of parameters of method of dimension and data presentation that output query context, data are presented When the step of standardized data query intention, grey is set by the character script color for characterizing query context.
Preferably, which further includes the second complementary module, when the second determining module can not be true according to semantic analysis result When making the dimension that the corresponding data of data inquiry request are presented, second complementary module is for executing following steps: acquisition is gone through History data query is intended to;The determining highest the inquiry of historical data of method matching degree presented with query context and data is intended to;It obtains Take the highest the inquiry of historical data of matching degree be intended in the dimension that presents of historical data be in as the data of data inquiry request Existing dimension.Wherein, three kinds of parameters of method of output module is presented in output query context, data dimension and data presentation, When step as the corresponding standardized data query intention of data inquiry request, the text word for the dimension that characterize data is presented Body color is set as grey.
Preferably, which further includes third complementary module, when the second determining module can not be true according to semantic analysis result When making the method that the corresponding data of data inquiry request are presented, the third complementary module is for executing following steps: acquisition is gone through History data query is intended to;The determining highest the inquiry of historical data of dimension matching degree presented with query context and data is intended to;It obtains Take the highest the inquiry of historical data of matching degree be intended in the method that presents of historical data be in as the data of data inquiry request Existing method, wherein three kinds of parameters of method of dimension and data presentation that output module is presented in output query context, data, When step as the corresponding standardized data query intention of data inquiry request, the text word for the method that characterize data is presented Body color is set as grey.
Preferably, the semantic analysis result that labeling module generates includes that multiple word-justice are right, and word-justice is to including the second word set In a word and word semanteme.
The device further includes the first presetting module, corresponding to the dimension presented for data each in preset data content Semanteme, the second determining module is when determining the dimension that the corresponding data of data inquiry request are presented according to semantic analysis result, tool Body executes following steps: semanteme corresponding to the semantic dimension presented with data each in data content of matching word-justice centering; When word-justice centering is semantic identical as semanteme corresponding to the dimension of the first data presentation in data content, by the first number The dimension presented according to the dimension of presentation as the corresponding data of data inquiry request.
The device further includes the second presetting module, corresponding to the method presented for data each in preset data content Semanteme, the second determining module is when determining the method that the corresponding data of data inquiry request are presented according to semantic analysis result, tool Body executes following steps: semanteme corresponding to the semantic method presented with data each in data content of matching word-justice centering; When word-justice centering is semantic identical as semanteme corresponding to the method for the first data presentation in data content, by the first number The method presented according to the method for presentation as the corresponding data of data inquiry request.
Embodiment three
The present embodiment also provides a kind of computer equipment, can such as execute the smart phone, tablet computer, notebook of program Computer, desktop computer, rack-mount server, blade server, tower server or Cabinet-type server are (including independent Server cluster composed by server or multiple servers) etc..As shown in figure 3, the computer equipment 20 of the present embodiment to It is few to include but is not limited to: memory 21, the processor 22 of connection can be in communication with each other by system bus, as shown in Figure 3.It needs to refer to Out, Fig. 3 illustrates only the computer equipment 20 with component 21-22, it should be understood that being not required for implementing all The component shown, the implementation that can be substituted is more or less component.
In the present embodiment, memory 21 (i.e. readable storage medium storing program for executing) includes 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 etc..In some embodiments, memory 21 can be the internal storage unit of computer equipment 20, such as the calculating The hard disk or memory of machine equipment 20.In further embodiments, memory 21 is also possible to the external storage of computer equipment 20 The plug-in type hard disk being equipped in equipment, such as the computer equipment 20, intelligent memory card (Smart Media Card, SMC), peace Digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, memory 21 can also both include meter The internal storage unit for calculating machine equipment 20 also includes its External memory equipment.In the present embodiment, memory 21 is commonly used in storage Be installed on the operating system and types of applications software of computer equipment 20, for example, embodiment 2 natural language data query dress The program code etc. set.In addition, memory 21 can be also used for temporarily storing all kinds of numbers that has exported or will export According to.
Processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU), Controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in control computer equipment 20 overall operation.In the present embodiment, program code or processing data of the processor 22 for being stored in run memory 21, Such as data query device of natural language etc..
Embodiment 4
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 the data query device of natural language, when being executed by processor Realize the data query method of the natural language of embodiment one.
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.
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 data query of natural language is intended to determine method characterized by comprising
Preset the keyword filter of multiple characterization query contexts, wherein each corresponding range of the keyword filter Set of words, the range set of words include multiple range words;
Obtain the data inquiry request to be analyzed based on natural language;
The data inquiry request is segmented, the first word set is obtained;
The word being consistent in first word set with the range word is filtered using each keyword filter;
The query context of the data inquiry request is obtained according to all words being filled into;
The word being consistent in first word set with the range word is removed, the second word set is obtained;
Semantic tagger is carried out according to semantic knowledge-base to the root in second word set, generative semantics analyze result;
Determine what the dimension of the corresponding data presentation of the data inquiry request and data were presented according to the semantic analysis result Method;And
The query context is exported, three kinds of parameters of method that the dimension that the data are presented and the data are presented, as data The corresponding standardized data query intention of inquiry request.
2. the data query of natural language according to claim 1 is intended to determine method, which is characterized in that the method is also Include:
When being filtered using each keyword filter less than the word being consistent in first word set with the range word, The inquiry of historical data is obtained to be intended to;
The highest the inquiry of historical data of method matching degree that the determining dimension presented with the data and the data are presented It is intended to;
The historical query range in the highest the inquiry of historical data intention of the matching degree is obtained as the data inquiry request Query context;
Wherein, in the three kinds of parameters of method for exporting the query context, the dimension that the data are presented and the data are presented, make For the corresponding standardized data query intention of data inquiry request step when, the character script face of the query context will be characterized Color is set as grey.
3. the data query of natural language according to claim 1 is intended to determine method, which is characterized in that the method is also Include:
When that can not determine the dimension that the corresponding data of the data inquiry request are presented according to the semantic analysis result, obtain The inquiry of historical data is taken to be intended to;
The determining highest the inquiry of historical data of method matching degree presented with the query context and the data is intended to;
The dimension that the historical data in the highest the inquiry of historical data intention of the matching degree is presented is obtained to look into as the data Ask the dimension that the data of request are presented;
Wherein, in the three kinds of parameters of method for exporting the query context, the dimension that the data are presented and the data are presented, make For the corresponding standardized data query intention of data inquiry request step when, the text for the dimension that the data are presented will be characterized Font color is set as grey.
4. the data query of natural language according to claim 1 is intended to determine method, which is characterized in that the method is also Include:
When that can not determine the method that the corresponding data of the data inquiry request are presented according to the semantic analysis result, obtain The inquiry of historical data is taken to be intended to;
The determining highest the inquiry of historical data of dimension matching degree presented with the query context and the data is intended to;
The method that the historical data in the highest the inquiry of historical data intention of the matching degree is presented is obtained to look into as the data Ask the method that the data of request are presented;
Wherein, in the three kinds of parameters of method for exporting the query context, the dimension that the data are presented and the data are presented, make For the corresponding standardized data query intention of data inquiry request step when, the text for the method that the data are presented will be characterized Font color is set as grey.
5. the data query of natural language according to claim 1 is intended to determine method, which is characterized in that described semantic point Analysing result includes that multiple word-justice are right, and institute's predicate-justice is to the semanteme including a word and institute's predicate in second word set.
6. the data query of natural language according to claim 5 is intended to determine method, which is characterized in that
The method also includes: semanteme corresponding to the dimension that each data are presented in preset data content;
Include: according to the dimension that the semantic analysis result determines that the corresponding data of the data inquiry request are presented
Match semanteme corresponding to the semantic dimension presented with data each in the data content of institute's predicate-justice centering;
When institute's predicate-justice centering is semantic identical as semanteme corresponding to the dimension of the first data presentation in the data content When, the dimension that first data are presented is as the dimension of the corresponding data presentation of the data inquiry request.
7. the data query of natural language according to claim 5 is intended to determine method, which is characterized in that
The method also includes: semanteme corresponding to the method that each data are presented in preset data content;
Include: according to the method that the semantic analysis result determines that the corresponding data of the data inquiry request are presented
Match semanteme corresponding to the semantic method presented with data each in the data content of institute's predicate-justice centering;
When institute's predicate-justice centering is semantic identical as semanteme corresponding to the method for the first data presentation in the data content When, the method that first data are presented is as the dimension of the corresponding method presentation of the data inquiry request.
8. a kind of data query device of natural language characterized by comprising
Multiple keyword filters, wherein the keyword filter is for characterizing query context, each keyword filtering Device corresponds to a range set of words, and the range set of words includes multiple range words;
Module is obtained, for obtaining the data inquiry request to be analyzed based on natural language;
Word segmentation module obtains the first word set for segmenting to the data inquiry request;
Calling module is consistent with the range word in first word set for calling each keyword filter to filter Word;
First determining module, for obtaining the query context of the data inquiry request according to all words being filled into;
Module is screened out, the word removal for will be consistent in first word set with the range word obtains the second word set;
Labeling module, for carrying out semantic tagger, generative semantics analysis according to semantic knowledge-base to the root in second word set As a result;
Second determining module, for determining what the corresponding data of the data inquiry request were presented according to the semantic analysis result The method that dimension and data are presented;And
Output module, for exporting the query context, three kinds of method that the dimension that the data are presented and the data are presented Parameter, as the corresponding standardized data query intention of data inquiry request.
9. a kind of computer equipment, the computer equipment include memory, processor and storage on a memory and can be The computer program run on processor, which is characterized in that the processor realizes claim 1 to 7 when executing described program The step of any one the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: described program is processed The step of any one of claim 1 to 7 the method is realized when device executes.
CN201811021831.1A 2018-08-31 2018-08-31 The data query of natural language is intended to determine method, apparatus and computer equipment Withdrawn CN109344300A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201811021831.1A CN109344300A (en) 2018-08-31 2018-08-31 The data query of natural language is intended to determine method, apparatus and computer equipment
PCT/CN2019/071606 WO2020042530A1 (en) 2018-08-31 2019-01-14 Natural language-based data query intent determination method and apparatus, and computer device
SG11201914037QA SG11201914037QA (en) 2018-08-31 2019-01-14 Natural-language data query intention determining method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811021831.1A CN109344300A (en) 2018-08-31 2018-08-31 The data query of natural language is intended to determine method, apparatus and computer equipment

Publications (1)

Publication Number Publication Date
CN109344300A true CN109344300A (en) 2019-02-15

Family

ID=65292417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811021831.1A Withdrawn CN109344300A (en) 2018-08-31 2018-08-31 The data query of natural language is intended to determine method, apparatus and computer equipment

Country Status (3)

Country Link
CN (1) CN109344300A (en)
SG (1) SG11201914037QA (en)
WO (1) WO2020042530A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523062A (en) * 2020-04-24 2020-08-11 浙江口碑网络技术有限公司 Multi-dimensional information display method and device
CN112015921A (en) * 2020-09-15 2020-12-01 重庆广播电视大学重庆工商职业学院 Natural language processing method based on learning-assisted knowledge graph

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138018A1 (en) * 2003-12-17 2005-06-23 International Business Machines Corporation Information retrieval system, search result processing system, information retrieval method, and computer program product therefor
CN102737049A (en) * 2011-04-11 2012-10-17 腾讯科技(深圳)有限公司 Method and system for database query
CN103092979A (en) * 2013-01-31 2013-05-08 中国科学院对地观测与数字地球科学中心 Processing method and device for searching of natural language by remote sensing data
CN104933100A (en) * 2015-05-28 2015-09-23 北京奇艺世纪科技有限公司 Keyword recommendation method and device
CN106980689A (en) * 2017-03-31 2017-07-25 邢加和 A kind of method that data visualization is realized by interactive voice
CN107729336A (en) * 2016-08-11 2018-02-23 阿里巴巴集团控股有限公司 Data processing method, equipment and system
CN107748784A (en) * 2017-10-26 2018-03-02 邢加和 A kind of method that structured data searching is realized by natural language
CN107798032A (en) * 2017-02-17 2018-03-13 平安科技(深圳)有限公司 Response message treating method and apparatus in self-assisted voice session

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090307194A1 (en) * 2005-06-03 2009-12-10 Delefevre Patrick Y Neutral sales consultant

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138018A1 (en) * 2003-12-17 2005-06-23 International Business Machines Corporation Information retrieval system, search result processing system, information retrieval method, and computer program product therefor
CN102737049A (en) * 2011-04-11 2012-10-17 腾讯科技(深圳)有限公司 Method and system for database query
CN103092979A (en) * 2013-01-31 2013-05-08 中国科学院对地观测与数字地球科学中心 Processing method and device for searching of natural language by remote sensing data
CN104933100A (en) * 2015-05-28 2015-09-23 北京奇艺世纪科技有限公司 Keyword recommendation method and device
CN107729336A (en) * 2016-08-11 2018-02-23 阿里巴巴集团控股有限公司 Data processing method, equipment and system
CN107798032A (en) * 2017-02-17 2018-03-13 平安科技(深圳)有限公司 Response message treating method and apparatus in self-assisted voice session
CN106980689A (en) * 2017-03-31 2017-07-25 邢加和 A kind of method that data visualization is realized by interactive voice
CN107748784A (en) * 2017-10-26 2018-03-02 邢加和 A kind of method that structured data searching is realized by natural language

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523062A (en) * 2020-04-24 2020-08-11 浙江口碑网络技术有限公司 Multi-dimensional information display method and device
CN111523062B (en) * 2020-04-24 2024-02-27 浙江口碑网络技术有限公司 Multidimensional information display method and device
CN112015921A (en) * 2020-09-15 2020-12-01 重庆广播电视大学重庆工商职业学院 Natural language processing method based on learning-assisted knowledge graph
CN112015921B (en) * 2020-09-15 2024-04-16 重庆广播电视大学重庆工商职业学院 Natural language processing method based on learning auxiliary knowledge graph

Also Published As

Publication number Publication date
SG11201914037QA (en) 2020-04-29
WO2020042530A1 (en) 2020-03-05

Similar Documents

Publication Publication Date Title
CN109299129A (en) Data query method, apparatus, computer equipment and the storage medium of natural language
CN109408811B (en) Data processing method and server
EP3540612A1 (en) Cluster processing method and device for questions in automatic question and answering system
CN108509477A (en) Method for recognizing semantics, electronic device and computer readable storage medium
EP2562659A1 (en) Data mapping acceleration
CN106951430A (en) Account table querying method and device
CN113051362B (en) Data query method, device and server
CN110737689B (en) Data standard compliance detection method, device, system and storage medium
CN112328489B (en) Test case generation method and device, terminal equipment and storage medium
CN111078776A (en) Data table standardization method, device, equipment and storage medium
CN112256684B (en) Report generation method, terminal equipment and storage medium
CN109344300A (en) The data query of natural language is intended to determine method, apparatus and computer equipment
CN108829668A (en) Generation method, device, computer equipment and the storage medium of text information
CN105335466A (en) Audio data retrieval method and apparatus
CN109992665A (en) A kind of classification method based on the extension of problem target signature
CN111078564B (en) UI test case management method, device, computer equipment and computer readable storage medium
CN107368500A (en) Data pick-up method and system
CN112417846A (en) Text automatic generation method and device, electronic equipment and storage medium
CN111639161A (en) System information processing method, apparatus, computer system and medium
CN106651540B (en) Product standard cooperation method and system based on online transaction and online purchasing platform
CN115033436A (en) Page testing method and device, electronic equipment and storage medium
CN114328577A (en) Data query method and device
CN110083624B (en) Stream data processing method, stream data processing apparatus, and computer medium
CN113901075A (en) Method and device for generating SQL (structured query language) statement, computer equipment and storage medium
CN113886419A (en) SQL statement processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40000586

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190215