CN109933645A - Information query method, device, computer equipment and storage medium - Google Patents

Information query method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109933645A
CN109933645A CN201910081994.7A CN201910081994A CN109933645A CN 109933645 A CN109933645 A CN 109933645A CN 201910081994 A CN201910081994 A CN 201910081994A CN 109933645 A CN109933645 A CN 109933645A
Authority
CN
China
Prior art keywords
information
query
target
inquiry
matched
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.)
Granted
Application number
CN201910081994.7A
Other languages
Chinese (zh)
Other versions
CN109933645B (en
Inventor
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910081994.7A priority Critical patent/CN109933645B/en
Publication of CN109933645A publication Critical patent/CN109933645A/en
Priority to PCT/CN2019/116926 priority patent/WO2020155740A1/en
Application granted granted Critical
Publication of CN109933645B publication Critical patent/CN109933645B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to field of artificial intelligence, providing a kind of information query method, device, computer equipment and storage medium, the information query method includes: the query information to be feedback for obtaining inquiry user's input;Whether inquiry has and the matched historical query information of query information;The corresponding feedback information of historical query information is obtained if having is sent to inquiry user;If carrying out word segmentation processing to query information without if, target participle is obtained;Each target is segmented respectively and is matched with the field information in presetting database, each target is obtained and segments corresponding target data information;Synthesis processing is carried out to all target data informations, obtains synthesis feedback information, and synthesis feedback information is sent to inquiry user.Technical solution of the present invention is realized when server-side inquiry is less than corresponding feedback information, can be carried out intellectual analysis to query information automatically and be generated corresponding feedback information, manual intervention be avoided, to improve search efficiency.

Description

Information query method, device, computer equipment and storage medium
Technical field
The present invention relates to field of artificial intelligence more particularly to a kind of information query method, device, computer equipment and Storage medium
Background technique
Either in daily life still works, people are carried out using natural language with computer more and more Interaction.User uses natural language input inquiry content in a search engine, obtains accurately answer;Employee using natural language with The enterprise database interaction of structuring, completes inquiry operation.In above-mentioned application scenarios, input be user natural language Speech, and what is exported is that machine is understood that and the formal semantics executed indicate, which can be performed simultaneously in some environment It returns the result.In natural language processing field, above-mentioned input-output task is referred to as semantic parsing (semantic Parsing), i.e., natural language is automatically converted to a kind of expression-form that machine is understood that and executes.
As the information age arrives, the continuous application of the rapid development of computer technology, especially Internet technology, information Inquiry presents very fast growth trend, and data type also becomes increasingly complex, but traditional data platform is inquired for information The query result that there is corresponding feedback information in database can only be presented, when not there is no corresponding feedback information in database, then Intellectual analysis can not be carried out for query information, analysis feedback is carried out to query information to require manual intervention, causes to inquire Progress is slow, further influences the working efficiency of user.
Summary of the invention
The embodiment of the present invention provides a kind of information query method, device, computer equipment and storage medium, to solve when number When according to there is no the corresponding feedback information of query information in library, requiring manual intervention and analysis feedback is carried out to query information asking Topic.
A kind of information query method, comprising:
Obtain the query information to be feedback of inquiry user's input;
According to the query information, whether there is matched historical query information in inquiry log library;
If there is matched historical query information, obtains the corresponding feedback information of matched historical query information and be sent to and look into Ask user;
If carrying out word segmentation processing to the query information without matched historical query information, target participle is obtained;
Each target participle is matched with the field information in presetting database respectively, obtains each mesh Mark segments corresponding target data information;
Synthesis processing is carried out to all target data informations, obtains synthesis feedback information, and the synthesis is fed back Information is sent to inquiry user.
A kind of information query device, comprising:
Module is obtained, for obtaining the query information to be feedback of inquiry user's input;
Enquiry module, for whether having matched historical query information in inquiry log library according to the query information;
Successful inquiring module, if it is corresponding to obtain matched historical query information for there is matched historical query information Feedback information be sent to inquiry user;
Inquiry failure module, if carrying out word segmentation processing to the query information for without matched historical query information, Obtain target participle;
First matching module, for respectively by each target participle and the field information progress in presetting database Match, obtains each target and segment corresponding target data information;
Synthesis module obtains synthesis feedback information, and will for carrying out synthesis processing to all target data informations The synthesis feedback information is sent to inquiry user.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the step of above- mentioned information querying method when executing the computer program Suddenly.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter The step of above- mentioned information querying method is realized when calculation machine program is executed by processor.
Above- mentioned information querying method, device, computer equipment and storage medium are believed by inquiring in log library with inquiry Matched historical query information is ceased, by the corresponding feedback of the historical query information inquired if having matched historical query information Information is sent to inquiry user, carries out word segmentation processing to query information if without matched historical query information and obtains target point Word, and matched to obtain target data information with field information using target participle, finally target data information is closed Synthesis feedback information is obtained at processing, and synthesis feedback information is sent to inquiry user, is inquired not to realize in server-side , can be to the intellectual analysis of query information when to corresponding feedback information, and corresponding feedback information is synthesized based on the analysis results, from And the case where manual intervention carries out analysis feedback to query information is avoided the need for, inquiry progress is improved, further increases user's Working efficiency.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is the flow chart of information query method provided in an embodiment of the present invention;
Fig. 2 is the stream for determining feedback information in information query method provided in an embodiment of the present invention according to correlation inquiry information Cheng Tu;
Fig. 3 is the flow chart of step S4 in information query method provided in an embodiment of the present invention;
Fig. 4 is the flow chart that fuzzy matching processing is carried out in information query method provided in an embodiment of the present invention;
Fig. 5 is the flow chart of step S5 in information query method provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of information query device provided in an embodiment of the present invention;
Fig. 7 is the basic system block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Information query method provided by the present application is applied to server-side, server-side specifically can with independent server or The server cluster of multiple server compositions is realized.In one embodiment, as shown in Figure 1, providing a kind of information query method, packet Include following steps:
S1: the query information to be feedback of inquiry user's input is obtained.
Specifically, query information to be feedback refers to the query information that inquiry user inputs in client, as inquiry user In client input inquiry information, query information will be automatically saved in preset recording table.By being carried out to preset recording table Real-time detection will directly obtain query information when detecting in preset recording table there are when query information to be feedback. Wherein, preset recording table refers to dedicated for saving the query information of inquiry user's input.
It should be noted that the query information is carried out delete processing from preset recording table after obtaining query information.
S2: according to query information, whether there is matched historical query information in inquiry log library.
In the present embodiment, according to query information, historical query letter identical with the query information is inquired from log library Breath.Wherein, different historical query information has been stored in advance in log library and there are the anti-of mapping relations with historical query information Feedforward information.
S3: it if there is matched historical query information, obtains the corresponding feedback information of matched historical query information and sends To inquiry user.
Specifically, the query information got according to step S1, if being inquired from log library identical as the query information Historical query information, then it represents that have matched historical query information, and the corresponding feedback information of the historical query information pressed Inquiry user is sent to according to preset mode.
Wherein, preset mode can be in the form of mail, be also possible to be directly displayed at currently looking into for inquiry user The page is ask, can be specifically configured according to the actual demand of user.
For example, in log library there are between historical query information " abc ", with feedback information " 123 " there are mapping relations, If query information is " abc ", since query information and historical query information are all " abc ", matched historical query letter is indicated Breath, and feedback information " 123 " is sent to inquiry user according to preset mode.
S4: if without matched historical query information, word segmentation processing is carried out to query information, obtains target participle.
It is that word segmentation processing, which refers to, is reassembled into continuous word sequence according to certain specification in embodiment in the present invention The process of word sequence, for example, continuous word sequence " ABCD " is obtained " AB " and " CD " by word segmentation processing.
Specifically, the query information got according to step S1, if not inquired from log library and the query information phase Same historical query information, then it represents that query information is divided without matched historical query information, and using mechanical segmentation method Word processing.
Mechanical segmentation method mainly has Forward Maximum Method, positive smallest match, reverse maximum matching, reverse smallest match Four kinds of methods.Preferably, this motion uses Forward Maximum Method algorithm.
For example, in log library there are between historical query information " bac ", with feedback information " 213 " there are mapping relations, If query information is that " bca " is indicated since query information " bca " and historical query information " bac " be not identical without matched history Query information, and word segmentation processing is done to query information using mechanical segmentation method.
S5: segmenting each target match with the field information in presetting database respectively, obtains each target point The corresponding target data information of word.
Presetting database includes field information and the corresponding target data information of field information.
Specifically, it is segmented according to the target that step S4 is obtained, respectively by each target participle and the word in presetting database Segment information is matched, and according in presetting database, there are the corresponding target data informations of field information, is divided when being matched to target When word is identical as field information, the corresponding target data information of the field information is obtained.Wherein, presetting database refers to special use In the structured database for storing the different corresponding target data informations of field information and field information.
For example, presetting database is " aaa " there are field information, corresponding target data information is " 001 ", if target Participle is " aaa ", target participle " aaa " is matched with the field information " aaa " in presetting database, since target segments It is identical as field information, then obtain target data information " 001 ".
S6: carrying out synthesis processing to all target data informations, obtains synthesis feedback information, and will synthesis feedback information hair Give inquiry user.
It specifically, will according to the integration factor of structured query language (Structured Query Language, SQL) The target data information that step S5 is obtained imported into default synthesis library and carries out synthesis processing, obtains synthesis treated that synthesis is anti- Feedforward information, and synthesis feedback information is sent to inquiry user, while the transmission that will synthesize feedback information according to preset mode State is saved in default send in record sheet.
Wherein, synthesis library is preset to refer to dedicated for synthesize newly according to the integration factor of SQL target data information Figure database.
The default record sheet that sends refers to the transmission state that inquiry user is sent to dedicated for record synthesis feedback information, In, transmission state include sent with it is not sent, if synthesis feedback information be successfully sent to inquiry user, send state be It sends, if synthesis feedback information is also not issued to inquiry user, the state that sends is not sent.
SQL is a kind of data base querying and programming language, for accessing data and querying, updating, and managing relationship Database Systems, while being also the extension name of database script file.
In the present embodiment, by the inquiry in log library and the matched historical query information of query information, if having matched The corresponding feedback information of the historical query information inquired is then sent to inquiry user by historical query information, if going through without matched History query information then carries out word segmentation processing to query information and obtains target participle, and utilizes target participle and field information progress With target data information is obtained, target data information is finally subjected to synthesis and handles to obtain synthesis feedback information, and will be synthesized anti- Feedforward information is sent to inquiry user, thus realize when server-side inquiry is less than corresponding feedback information, it can be to query information Intellectual analysis, and corresponding feedback information is synthesized based on the analysis results, query information is carried out to avoid the need for manual intervention The case where analysis feedback, inquiry progress is improved, the working efficiency of user is further increased.
In one embodiment, as shown in Fig. 2, after step S3, which further includes following steps:
S71: confirming in default correlation database whether there is correlation inquiry information corresponding with query information, wherein default correlation database In include correlation inquiry information and the corresponding feedback information of correlation inquiry information.
In embodiments of the present invention, default correlation database pre-saved it is all inquiry users historical query informations, with go through There are the correlation inquiry information of coupling index and the corresponding feedback informations of correlation inquiry information for history query information.By from pre- If inquiring historical query information identical with query information in correlation database, and looked into according to the corresponding association of historical query information inquiry Ask information.
It should be noted that default correlation database can also carry out classification analysis to query information.For example, inquiry user can be sorted out Which query information of input is relatively more, which query information current queries user pays close attention to, if inquiry user believes in input inquiry Cease after C can also further input inquiry information P, then query information C and query information P are associated, then C P be associated with refer to each other Mark.
S72: if relevant query information, correlation inquiry information and the corresponding feedback information of correlation inquiry information are sent To inquiry user.
Specifically, it when inquiring historical query information identical with query information from default correlation database, indicates related Join query information, and by that there are the correlation inquiry information of coupling index and correlation inquiry information is corresponding anti-with historical query information Feedforward information is sent to inquiry user according to preset mode.
It should be noted that when not inquiring historical query information identical with query information from default correlation database, It indicates that query result is inquiry failure, is then not processed.
For example, there are historical query information being " AA " in default correlation database, there are the correlation inquiry of coupling index letters with it Breath is " AB ", and the corresponding feedback information of correlation inquiry information " AB " is " 101 ", if query information is " AA ", from default correlation database In when being inquired, it is identical as historical query information " AA " to obtain query information " AA ", indicates relevant query information, and will close Connection query information " AB " and feedback information, which are sent to for " 101 " according to preset mode, inquires user;If query information is " A1A1 " when being inquired from default correlation database, obtains query information " A1A1 " and historical query information " AA " is not identical, table Showing does not have correlation inquiry information, then is not processed.
In the present embodiment, by confirming in default correlation database whether there is correlation inquiry information corresponding with query information, if Correlation inquiry information and the corresponding feedback information of correlation inquiry information are then sent to inquiry user by relevant query information, from And realize after inquire user query to the corresponding feedback information of query information, it can be according to inquiring the query information of user into one The corresponding feedback information of step feedback correlation inquiry information, improves the rich of information feedback, and then it is more to help user to obtain It is associated with feedback information, improves the search efficiency of user.
In one embodiment, as shown in figure 3, in step S4, even inquiry failure then carries out at participle query information Reason obtains target participle and includes the following steps:
S41: it is setuped string the maximum length value of index value and participle according to preset requirement.
In embodiments of the present invention, community string index community value refers to dedicated for positioning the position for starting to scan character, if should Community string index community value is 0, then it represents that first character is the position for starting to scan character.Maximum length value is used exclusively for scanning The maximum magnitude of character, if maximum length value is 2, then it represents that most 2 characters of scanning, if maximum length value is 3, then it represents that sweep Retouch most 3 characters.
Specifically, it is configured according to maximum length value of the preset requirement to community string index community value and participle, wherein default It is required that specifically can be and set 0 for community string index community value, 2 are set by maximum length value, and specific setting requirements can be with It is configured according to the actual demand of user, herein with no restrictions.
S42: according to community string index community value and maximum length value, target character is extracted from query information.
Specifically, according to the obtained community string index community value of step S41 and maximum length value, according to scanning side from left to right Formula scan for inquiries information will be from the character of beginning scan position to the maximum length when the character of maximum length value is arrived in scanning The character mark of value is target character, and is extracted to the target character.
For example, query information is " the Nanjing Yangtze Bridge ", maximum length value 3, the initial value of community string index community is 0, The scan for inquiries information in the way of from left to right, the i.e. character of scanning to maximum length value are " the Nanjing mayor ", by the maximum The character " Nanjing " of length value is identified as target character, and extracts to the target character.
S43: target character is matched with the legitimate characters in pre-set dictionary library.
Specifically, target character obtained in step S42 is matched with the legitimate characters in pre-set dictionary library.Its In, pre-set dictionary library refers to store the database of legitimate characters set by user.
S44: if successful match, which is determined as target participle, and community string index community value is updated to work as Preceding community string index community value adds current maximum length value, updated community string index community value and maximum length value is based on, from inquiry It extracts target character in information to be matched, until operation until completing the participle to query information.
Specifically, target character obtained in step S42 is matched with the legitimate characters in pre-set dictionary library, when Be fitted on target character it is identical as the legitimate characters in pre-set dictionary library when, indicate successful match, and the target character be determined as Target participle, while community string index community value is updated to the community string index community value in current procedures S42 plus in current procedures S42 Maximum length value, be based on updated community string index community value and maximum length value, from query information extract target character into Row matching, until operation until completing the participle to query information.
For example, as described in the example in step S42, if target character " Nanjing " is matched to and the word in pre-set dictionary library When according with identical, then target character " Nanjing " is confirmed as target participle, and community string index community value is updated to current string The current maximum length value 3 of index value 0+, i.e. community string index community value will be updated to 3, and based on updated community string index community value and Maximum length value extracts target character from query information and is matched, that is, is directed to query information " the Nanjing Yangtze Bridge ", from " length " character starts to scan.Until operation until completing the participle to query information.
S45: if it fails to match, maximum length value being successively decreased, and is based on updated maximum length value and character String indexing value is extracted target character from query information and is matched, until operation until completing the participle to query information.
Specifically, target character obtained in step S42 is matched with the legitimate characters in pre-set dictionary library, when not Be matched to target character it is identical as the legitimate characters in pre-set dictionary library when, indicate it fails to match, then maximum length value is updated Subtract 1 for the maximum length value in current procedures S42, and is believed based on updated maximum length value and community string index community value from inquiry It extracts target character in breath to be matched, until operation until completing the participle to query information.
It should be noted that all maximum length values greater than 1 target character be not all matched to in pre-set dictionary library When character is identical, then single character is confirmed as target participle.
Such as: as described in the example in step S42, if target character " Nanjing " be not matched to in pre-set dictionary library When character is identical, then maximum length value is updated to current maximum length value 3 and subtracts 1, i.e., maximum length value is updated to 2, and is based on Updated maximum length value and community string index community value are extracted target character from query information and are matched, until completing to looking into Until the participle operation for asking information.
In the present embodiment, pass through the maximum length value pair of setup string index value and participle in the case where inquiring failure Query information carries out word segmentation processing, and is matched to obtain target with legitimate characters according to community string index community value and maximum length value Participle, so that realizing intelligently can carry out word segmentation processing to query information in the case where inquiring failure, convenient for later use point Word treated target participle carries out further matching feedback information, avoid requiring manual intervention in the case where inquiring failure into Row problem feedback, and then improve search efficiency.
In one embodiment, as shown in figure 4, after step S4, which further includes following steps:
S81: target participle is subjected to fuzzy matching with historical query information.
Specifically, target participle is subjected to fuzzy matching with the historical query information in log library.
S82: if fuzzy matching has historical query information, the corresponding feedback letter of historical query information of fuzzy matching is obtained Breath is sent to inquiry user.
If being matched to historical query information includes target participle, then it represents that fuzzy matching success and by the fuzzy matching result It is saved in preset recording table, and the corresponding feedback information of historical query information segmented comprising most targets is sent to inquiry User, meanwhile, choose the corresponding feedback information conduct of historical query information comprising other secondary multiple target participles of preset quantity Second selection is sent to inquiry user.
Wherein, preset recording table refers to that, dedicated for recording the record sheet of fuzzy matching result, fuzzy matching result can be with Including fuzzy matching success and fuzzy matching failure.Preset quantity specifically can be 5, be also possible to 6, specific value range It can be configured according to the actual demand of user, herein with no restrictions.
It should be noted that multiple historical query informations may be matched in fuzzy matching procedure, and such as: exist Target participle is " upper half annual return ", if historical query information present in log library be respectively as follows: " upper half annual return total ", " upper half annual net profit " and " upper half annual return to be allocated ", since this 3 historical query informations all include same number of mesh Mark participle, then at random by the corresponding feedback information of one of historical query information be sent to inquiry user, meanwhile, by other two The corresponding feedback information of a historical query information is sent to inquiry user as the second selection.
If historical query information present in log library be respectively as follows: " upper half annual return ", " upper half annual net profit " and " to point The upper half annual return matched ", since historical query information " upper half annual return " is identical with target participle " upper half annual return ", then By the corresponding feedback information of historical query information " upper half annual return " be sent to inquiry user, meanwhile, by historical query information " on Half annual net profit " and " upper half annual return to be allocated " corresponding feedback information are sent to inquiry as the second selection and use Family.
In the present embodiment, obtaining in such a way that target participle carries out fuzzy matching with historical query information The feedback information matched can effectively improve the chance of success for being matched to related feedback information, further increase search efficiency.
In one embodiment, after step S8, which further includes following steps:
S9: it when detecting fuzzy matching success, establishes between the feedback information and query information that fuzzy matching obtains Mapping relations are added in log library as new historical query information and by mapping relations.
Specifically, by being detected to the fuzzy matching result in the preset recording table in step S82, when detecting mould When paste matching result is fuzzy matching success, the feedback information of inquiry user is sent to after establishing fuzzy matching success and inquiry is believed Mapping relations between breath, and be added to mapping relations as new historical query information in log library.
For example, query information is " 456 ", the fuzzy matching result in preset recording table is fuzzy matching success, and fuzzy The feedback information that inquiry user is sent to after successful match is " 0101 ", when detecting the fuzzy matching result in preset recording table When successful for fuzzy matching, query information " 456 " and feedback information " 0101 " are established into unique corresponding mapping relations, and should Mapping relations are added in log library, if query information is " 456 ", can inquire feedback information from log library “0101”。
In the present embodiment, by the mapping relations established between the successful feedback information of fuzzy matching and query information, And be added in log library, in the successful situation of fuzzy matching, guarantee that feedback information can accurately correspond to query information, it is ensured that The accuracy rate of information inquiry, then plus mapping relations be added in log library, can expand log library carried out for query information it is anti- The range of feedback further increases information search efficiency.
It in one embodiment, i.e., respectively will be in each target participle and presetting database as shown in figure 5, in step S5 Field information is matched, and is obtained the corresponding target data information of each target participle and is included the following steps:
S51: each target is segmented matched with the field information in presetting database respectively, wherein target participle Include identification information.
Specifically, each target is segmented respectively and is matched with the field information in presetting database, and according to matching Situation exports corresponding matching result.
S52: if being matched with field information, the corresponding target data information of field information is obtained.
Specifically, when being matched to from presetting database with the target identical field information of participle, successful match is indicated, And obtain the corresponding target data information of the field information.
S53: if matching is less than field information, inquiry has same identification information with target participle from presupposition analysis library Target vocabulary, and by the target vocabulary inquired be determined as current goal participle.
Specifically, when not being matched in presetting database with the target identical field information of participle, indicate that it fails to match, The identification information for including is segmented according to target in step S51, and mark identical with the identification information is inquired from presupposition analysis library Information, and the corresponding target vocabulary of identification information inquired is obtained, which is determined as current goal participle.
Wherein, presupposition analysis library refers to for storing identification information and the corresponding target vocabulary of identification information, wherein mark Information is the same identification information being identified previously according to vocabulary of the user demand near synonym.
It should be noted that there is same identification information with target participle there are multiple when inquiring in presupposition analysis library It when target vocabulary, is recorded according to the inquiry of current queries user in log library, if existing in the inquiry record of current queries user There is the target vocabulary of same identification information with target participle, then segmented the target vocabulary as current goal;If current use It is there are multiple target vocabularies with target participle with same identification information in the inquiry record at family, then preferential according to default vocabulary Grade is segmented the target vocabulary of highest priority as current goal.Wherein, vocabulary priority is preset to refer to according to user's reality Target vocabulary setting inquiry priority level of the demand to same identification information.
For example, the field information in presetting database is " profit ", target participle is that the identification information of " income " is " benefit Benefit ", it is " interests " that target vocabulary, which be the identification information of " profit ", in presupposition analysis library, and target is segmented " income " and preset data Field information " profit " in library is matched, and since " income " is different from " profit ", indicates that it fails to match, then from presupposition analysis The identical target vocabulary of identification information " interests " with target participle " income " is inquired in library, due to target word in presupposition analysis library Remittance is identical for identification information and target the participle identification information of " income " of " profit ", then by " profit " as current goal point Word.
S54: inquiry segments identical field information with current goal from presetting database, and obtains the field information pair The target data information answered.
Specifically, it is segmented according to the current goal that step S53 is obtained, it will be in current goal participle and presetting database Field information is matched, when be matched to current goal participle it is identical as field information when, obtain the corresponding mesh of the field information Mark data information.Wherein, exist in presetting database and segment identical field information with current goal.
It should be noted that the field information in presetting database all includes the mesh in presupposition analysis library in step S53 Mark vocabulary.For example, there are the identification information of target vocabulary " profit " and " income " being all " interests ", present count in presupposition analysis library According in library, there are field information " profits ".
It in the present embodiment, is matched by segmenting target with field information, the acquisition pair if being matched with field information The target data information answered, if matching, less than field information, inquiry has the target word of same identification information with target information It converges, and is determined as current goal participle, recycle current goal participle to be matched with field information, obtain corresponding number of targets It is believed that breath, to realize the intellectual analysis that segment to target, guarantee to match in target participle with field information less than in the case where, It can choose and be matched with the vocabulary of target participle similar import as current goal participle again, improve later use mesh Mark data information carries out the accuracy of synthesis processing and the level of intelligence of information inquiry.
In one embodiment, after step S6, which further includes following steps:
S10: when detecting that synthesis feedback information is sent to inquiry user, the synthesis feedback information and query information are established Between mapping relations, and mapping relations are added in log library.
Specifically, it by being detected to the transmission state in the default transmission record sheet in step S6, is sent out when detecting Sending state is to establish the mapping relations between the synthesis feedback information of transmission and query information when having sent, and by mapping relations It is added in log library.
In the present embodiment, by the mapping relations established between synthesis feedback information and query information, and it is added to day In will library, log library can be expanded and be directed to the range that query information is fed back, information search efficiency is further increased, to mention The working efficiency of high user.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of information query device is provided, which looks into information in above-described embodiment Inquiry method corresponds.As shown in fig. 6, the information query device includes obtaining module 61, enquiry module 62, successful inquiring module 63, inquiry failure module 64, the first matching module 65 and synthesis module 66.Detailed description are as follows for each functional module:
Module 61 is obtained, for obtaining the query information to be feedback of inquiry user's input;
Enquiry module 62, for whether having matched historical query information in inquiry log library according to query information;
Successful inquiring module 63, if obtaining matched historical query information pair for there is matched historical query information The feedback information answered is sent to inquiry user;
Inquiry failure module 64, if carrying out word segmentation processing for without matched historical query information to query information, obtaining It is segmented to target;
First matching module 65, for respectively by each target participle and the field information progress in presetting database Match, obtains each target and segment corresponding target data information;
Synthesis module 66 obtains synthesis feedback information, and will close for carrying out synthesis processing to all target data informations Inquiry user is sent at feedback information.
Further, successful inquiring module 63 includes:
Confirm submodule, for confirming in default correlation database whether there is correlation inquiry information corresponding with query information, In preset correlation database in include correlation inquiry information and the corresponding feedback information of correlation inquiry information;
Successfully submodule is confirmed, if relevant query information is used for, by correlation inquiry information and correlation inquiry information pair The feedback information answered is sent to inquiry user.
Further, inquiry failure module 64 includes:
Submodule is set, for being setuped string the maximum length value of index value and participle according to preset requirement;
Extracting sub-module, for extracting target character from query information according to community string index community value and maximum length value;
Second matched sub-block, for matching target character with the legitimate characters in pre-set dictionary library;
Target character is determined as target participle, and by character if being used for successful match by the second successful match submodule String indexing value is updated to current string index value plus current maximum length value, based on updated community string index community value and most Angle value is greatly enhanced, target character is extracted from query information and is matched, until operation until completing the participle to query information;
Second it fails to match submodule, if maximum length value is successively decreased for it fails to match, and based on updating after Maximum length value and community string index community value extract target character from query information and matched, until complete to query information Participle operation until.
Further, information query device further include:
Fuzzy matching module, for target participle to be carried out fuzzy matching with historical query information;
Fuzzy matching success module, if having historical query information for fuzzy matching, the history for obtaining fuzzy matching is looked into It askes the corresponding feedback information of information and is sent to inquiry user.
Further, information query device further include:
First establishes module, for when detecting fuzzy matching success, establish feedback information that fuzzy matching obtains with Mapping relations between query information are added in log library as new historical query information.
Further, the first matching module 65 includes:
Third matched sub-block, for respectively by each target participle and the field information progress in presetting database Match, wherein target participle includes identification information;
Third successful match submodule, if obtaining the corresponding target data of field information for being matched with field information Information;
Third it fails to match submodule, if for matching less than field information, inquiry and target from presupposition analysis library The target vocabulary with same identification information is segmented, and the target vocabulary inquired is determined as current goal participle;
Field Inquiry submodule segments identical field information for the inquiry from presetting database and current goal, and Obtain the corresponding target data information of field information.
Further, information query device further include:
Second establishes module, for establishing synthesis feedback letter when detecting that synthesis feedback information is sent to inquiry user Mapping relations between breath and query information, are added in log library as new historical query information.
Some embodiments of the present application disclose computer equipment.It is in the embodiment of the application referring specifically to Fig. 7 70 basic structure block diagram of computer equipment.
Anticipate as shown in Figure 7, the computer equipment 70 include by system bus be in communication with each other connect memory 71, Processor 72, network interface 73.It should be pointed out that the computer equipment 70 with component 71-73 is illustrated only in Fig. 7, but Be it should be understood that, it is not required that implement all components shown, the implementation that can be substituted is more or less component.Its In, those skilled in the art of the present technique be appreciated that computer equipment here be it is a kind of can be according to being previously set or store Instruction, the automatic equipment for carrying out numerical value calculating and/or information processing, hardware includes but is not limited to microprocessor, dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field- Programmable Gate Array, FPGA), it is digital processing unit (Digital Signal Processor, DSP), embedded Equipment etc..
The computer equipment can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The computer equipment can carry out people by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user Machine interaction.
The memory 71 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random are visited It asks memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed read-only deposit Reservoir (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 71 can be the computer The internal storage unit of equipment 70, such as the hard disk or memory of the computer equipment 70.In further embodiments, the storage It is hard that device 71 is also possible to the plug-in type being equipped on the External memory equipment of the computer equipment 70, such as the computer equipment 70 Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, the memory 71 can also both including the computer equipment 70 internal storage unit or Including its External memory equipment.In the present embodiment, the memory 71 is installed on the computer equipment 70 commonly used in storage Operating system and types of applications software, such as the program code of the information query method etc..In addition, the memory 71 is also It can be used for temporarily storing the Various types of data that has exported or will export.
The processor 72 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 72 is commonly used in the control meter Calculate the overall operation of machine equipment 70.In the present embodiment, the processor 72 is for running the program stored in the memory 71 Code or processing data, such as run the program code of the information query method.
The network interface 73 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the computer equipment 70 and other electronic equipments.
Present invention also provides another embodiments, that is, provide a kind of computer readable storage medium, the computer Readable storage medium storing program for executing is stored with query information recording program, and the query information recording program can be held by least one processor Row, so that the step of at least one described processor executes any one of the above information query method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that computer equipment (it can be mobile phone, computer, Server, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
Finally it should be noted that, it is clear that embodiments described above is only some embodiments of the present application, rather than Whole embodiments gives the preferred embodiment of the application in attached drawing, but is not intended to limit the scope of the patents of the application.The application It can realize in many different forms, on the contrary, purpose of providing these embodiments is makes to disclosure of this application Understanding it is more thorough and comprehensive.Although the application is described in detail with reference to the foregoing embodiments, for the skill of this field For art personnel come, it can still modify to technical solution documented by aforementioned each specific embodiment, or to it Middle some technical characteristics carry out equivalence replacement.All equivalent structures done using present specification and accompanying drawing content, directly Or it is used in other related technical areas indirectly, similarly within the application scope of patent protection.

Claims (10)

1. a kind of information query method, which is characterized in that the information query method includes:
Obtain the query information to be feedback of inquiry user's input;
According to the query information, whether there is matched historical query information in inquiry log library;
If there is matched historical query information, obtains the corresponding feedback information of matched historical query information and be sent to inquiry use Family;
If carrying out word segmentation processing to the query information without matched historical query information, target participle is obtained;
Each target participle is matched with the field information in presetting database respectively, obtains each target point The corresponding target data information of word;
Synthesis processing is carried out to all target data informations, obtains synthesis feedback information, and by the synthesis feedback information It is sent to inquiry user.
2. information query method as described in claim 1, which is characterized in that if described have matched historical query information, After obtaining the step of corresponding feedback information of matched historical query information is sent to inquiry user, the information query method Further include:
Confirm in default correlation database whether there is correlation inquiry information corresponding with the query information, wherein the default correlation database In include the correlation inquiry information and the corresponding feedback information of the correlation inquiry information;
If there is the correlation inquiry information, by the correlation inquiry information and the corresponding feedback of the correlation inquiry information Information is sent to the inquiry user.
3. information query method as described in claim 1, which is characterized in that described to be carried out at participle to the query information Reason, obtaining the step of target segments includes:
It is setuped string the maximum length value of index value and participle according to preset requirement;
According to the community string index community value and the maximum length value, target character is extracted from the query information;
The target character is matched with the legitimate characters in pre-set dictionary library;
If successful match, the target character is determined as the target and is segmented, and the community string index community value is updated to Presently described community string index community value adds presently described maximum length value, based on the updated community string index community value and described Maximum length value extracts target character from the query information and is matched, until completing the participle to the query information Until operation;
If it fails to match, the maximum length value is successively decreased, and based on the updated maximum length value and described Community string index community value is extracted target character from the query information and is matched, until completing the participle to the query information Until operation.
4. information query method as described in claim 1, which is characterized in that if described without matched historical query information, After the step of carrying out word segmentation processing to the query information, obtaining target participle, the information query method further include:
Target participle is subjected to fuzzy matching with the historical query information;
If fuzzy matching has historical query information, the corresponding feedback information of historical query information for obtaining fuzzy matching is sent to The inquiry user.
5. information query method as claimed in claim 4, which is characterized in that if the fuzzy matching has historical query information, After then obtaining the step of the corresponding feedback information of historical query information of fuzzy matching is sent to the inquiry user, the letter Cease querying method further include:
When detecting fuzzy matching success, the feedback information and inquiry letter that the fuzzy matching obtains are established Mapping relations between breath are added in the log library as new historical query information.
6. information query method as described in claim 1, which is characterized in that it is described respectively by each target participle with it is pre- If the field information in database is matched, the step of each target segments corresponding target data information packet is obtained It includes:
Each target participle is matched with the field information in presetting database respectively, wherein the target Participle includes identification information;
If being matched with field information, the corresponding target data information of the field information is obtained;
If matching is less than field information, inquiry has the identical identification information with target participle from presupposition analysis library Target vocabulary, and by the target vocabulary inquired be determined as current goal participle;
Inquiry segments the identical field information with the current goal from presetting database, and obtains the field information Corresponding target data information.
7. information query method as described in claim 1, which is characterized in that described pair of all target data informations carry out Synthesis processing obtains synthesis feedback information, and after the step of synthesis feedback information is sent to inquiry user, the letter Cease querying method further include:
When detecting that the synthesis feedback information is sent to inquiry user, establishes the synthesis feedback information and the inquiry is believed Mapping relations between breath are added in the log library as new historical query information.
8. a kind of information query device, which is characterized in that the information query device includes:
Module is obtained, for obtaining the query information to be feedback of inquiry user's input;
Enquiry module, for whether having matched historical query information in inquiry log library according to the query information;
Successful inquiring module, if it is corresponding anti-to obtain matched historical query information for there is matched historical query information Feedforward information is sent to inquiry user;
Inquiry failure module, if carrying out word segmentation processing for without matched historical query information to the query information, obtaining Target participle;
First matching module, for each target participle to be matched with the field information in presetting database respectively, It obtains each target and segments corresponding target data information;
Synthesis module obtains synthesis feedback information, and will be described for carrying out synthesis processing to all target data informations Synthesis feedback information is sent to inquiry user.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The step of any one of 7 information query method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization information query method as described in any one of claim 1 to 7 when the computer program is executed by processor Suddenly.
CN201910081994.7A 2019-01-28 2019-01-28 Information query method, device, computer equipment and storage medium Active CN109933645B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910081994.7A CN109933645B (en) 2019-01-28 2019-01-28 Information query method, device, computer equipment and storage medium
PCT/CN2019/116926 WO2020155740A1 (en) 2019-01-28 2019-11-10 Information query method and apparatus, and computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910081994.7A CN109933645B (en) 2019-01-28 2019-01-28 Information query method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109933645A true CN109933645A (en) 2019-06-25
CN109933645B CN109933645B (en) 2024-01-23

Family

ID=66985255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910081994.7A Active CN109933645B (en) 2019-01-28 2019-01-28 Information query method, device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109933645B (en)
WO (1) WO2020155740A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580312A (en) * 2019-08-30 2019-12-17 腾讯科技(深圳)有限公司 Data query method and device and computer readable storage medium
CN110674145A (en) * 2019-08-15 2020-01-10 平安普惠企业管理有限公司 Data consistency detection method and device, computer equipment and storage medium
WO2020155740A1 (en) * 2019-01-28 2020-08-06 平安科技(深圳)有限公司 Information query method and apparatus, and computer device and storage medium
CN111797217A (en) * 2020-06-29 2020-10-20 中国平安财产保险股份有限公司 Information query method based on FAQ matching model and related equipment thereof
CN112100138A (en) * 2020-09-16 2020-12-18 北京天融信网络安全技术有限公司 Log query method and device, storage medium and electronic equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113761141B (en) * 2020-09-03 2024-09-20 北京沃东天骏信息技术有限公司 Entry display method and device, electronic equipment and readable storage medium
CN114328572A (en) * 2020-09-28 2022-04-12 北京鸿享技术服务有限公司 Data query method, device, system and medium based on SQL parser
CN114550157A (en) * 2022-02-21 2022-05-27 上海哔哩哔哩科技有限公司 Bullet screen gathering identification method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1920366A1 (en) * 2006-01-20 2008-05-14 Glenbrook Associates, Inc. System and method for context-rich database optimized for processing of concepts
CN101464897A (en) * 2009-01-12 2009-06-24 阿里巴巴集团控股有限公司 Word matching and information query method and device
CN107092590A (en) * 2017-03-17 2017-08-25 贵州恒昊软件科技有限公司 A kind of sentence segmenting method and system
CN107451208A (en) * 2017-07-12 2017-12-08 北京潘达互娱科技有限公司 A kind of data search method and device
CN107766511A (en) * 2017-10-23 2018-03-06 深圳市前海众兴电子商务有限公司 Intelligent answer method, terminal and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202254A (en) * 2016-06-30 2016-12-07 上海斐讯数据通信技术有限公司 A kind of querying method and data query system
CN109933645B (en) * 2019-01-28 2024-01-23 平安科技(深圳)有限公司 Information query method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1920366A1 (en) * 2006-01-20 2008-05-14 Glenbrook Associates, Inc. System and method for context-rich database optimized for processing of concepts
CN101464897A (en) * 2009-01-12 2009-06-24 阿里巴巴集团控股有限公司 Word matching and information query method and device
CN107092590A (en) * 2017-03-17 2017-08-25 贵州恒昊软件科技有限公司 A kind of sentence segmenting method and system
CN107451208A (en) * 2017-07-12 2017-12-08 北京潘达互娱科技有限公司 A kind of data search method and device
CN107766511A (en) * 2017-10-23 2018-03-06 深圳市前海众兴电子商务有限公司 Intelligent answer method, terminal and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020155740A1 (en) * 2019-01-28 2020-08-06 平安科技(深圳)有限公司 Information query method and apparatus, and computer device and storage medium
CN110674145A (en) * 2019-08-15 2020-01-10 平安普惠企业管理有限公司 Data consistency detection method and device, computer equipment and storage medium
CN110674145B (en) * 2019-08-15 2024-04-19 西藏松岩科技有限公司 Data consistency detection method, device, computer equipment and storage medium
CN110580312A (en) * 2019-08-30 2019-12-17 腾讯科技(深圳)有限公司 Data query method and device and computer readable storage medium
CN110580312B (en) * 2019-08-30 2024-04-30 腾讯科技(深圳)有限公司 Data query method, device and computer readable storage medium
CN111797217A (en) * 2020-06-29 2020-10-20 中国平安财产保险股份有限公司 Information query method based on FAQ matching model and related equipment thereof
CN111797217B (en) * 2020-06-29 2023-09-26 中国平安财产保险股份有限公司 Information query method based on FAQ matching model and related equipment thereof
CN112100138A (en) * 2020-09-16 2020-12-18 北京天融信网络安全技术有限公司 Log query method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2020155740A1 (en) 2020-08-06
CN109933645B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN109933645A (en) Information query method, device, computer equipment and storage medium
CN110502608B (en) Man-machine conversation method and man-machine conversation device based on knowledge graph
CN110147437A (en) A kind of searching method and device of knowledge based map
CN106776544A (en) Character relation recognition methods and device and segmenting method
CN105630827B (en) A kind of information processing method, system and auxiliary system
CN109933973A (en) Cryptographic check method, apparatus, computer equipment and storage medium
CN112115232A (en) Data error correction method and device and server
CN107145481A (en) Electronic equipment, storage medium, web form fill method and device
CN101082936A (en) Data enquiring system and method
CN109344387A (en) The generation method of nearly word form dictionary, device and nearly word form error correction method, device
CN107992210A (en) Input method vocabulary recommends method, intelligent terminal and the device with store function
CN110955806A (en) Character string matching method for Chinese text
CN110362596A (en) A kind of control method and device of text Extracting Information structural data processing
CN114860913B (en) Intelligent question-answering system construction method, question-answering processing method and device
CN110968245A (en) Operation method for controlling office software through voice
JPH11161670A (en) Method, device, and system for information filtering
CN111047434B (en) Operation record generation method and device, computer equipment and storage medium
CN117093686A (en) Intelligent question-answer matching method, device, terminal and storage medium
CN110019714A (en) More intent query method, apparatus, equipment and storage medium based on historical results
CN103076894A (en) Method and equipment for building input entries for object identity information according to object identity information
CN113326363B (en) Searching method and device, prediction model training method and device and electronic equipment
CN110232108A (en) Interactive method and conversational system
CN117874166A (en) Text processing method, device, computer equipment and storage medium
KR20220108190A (en) Subscription data push method and apparatus in Internet of Things, device and storage medium
CN116108141A (en) Similar question searching mechanism under interview scene

Legal Events

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