CN109753517A - A kind of method, apparatus, computer storage medium and the terminal of information inquiry - Google Patents
A kind of method, apparatus, computer storage medium and the terminal of information inquiry Download PDFInfo
- Publication number
- CN109753517A CN109753517A CN201811487640.4A CN201811487640A CN109753517A CN 109753517 A CN109753517 A CN 109753517A CN 201811487640 A CN201811487640 A CN 201811487640A CN 109753517 A CN109753517 A CN 109753517A
- Authority
- CN
- China
- Prior art keywords
- query word
- entity type
- structural data
- character string
- name
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
A kind of method, apparatus, computer storage medium and the terminal of information inquiry, comprising: determine structural data identical with the affiliated entity type of query word;According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.The embodiment of the present invention reduces search range of the query word in structural data according to entity type;Further, it is retrieved according to character string, improves search efficiency.
Description
Technical field
Present document relates to but be not limited to data processing technique, espespecially a kind of method, apparatus of information inquiry, computer storage are situated between
Matter and terminal.
Background technique
In enterprise search, data to be processed include structural data and unstructured data.In general, user
Structural data exists in the form of a table, the type of table may include well known to a person skilled in the art Excel, Mysql,
Oracle, Access, Hbase etc..When indexing construction, corresponding 1,1 table is indexed, the phase in the field name manipulative indexing of table
The field name answered.In the search of structural data, typical usage scenario of searching for is: user's input inquiry in input frame
Word, system all regard the identical field of all data types as matching field, and matching result is returned to user.Due to data
The identical field quantity of type often up to hundreds and thousands of, causes the efficiency of match query very low, affect search speed.
Summary of the invention
It is the general introduction to the theme being described in detail herein below.This general introduction is not the protection model in order to limit claim
It encloses.
The embodiment of the present invention provides method, apparatus, computer storage medium and the terminal of a kind of information inquiry, is able to ascend
Information search efficiency.
The embodiment of the invention provides a kind of methods of information inquiry, comprising:
Determine structural data identical with the affiliated entity type of query word;
According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.
Optionally, determination structural data identical with the affiliated entity type of query word includes:
By preset analysis model, determines the field name for each table for including in the structural data and described look into
Ask the affiliated entity type of word;
Wherein, the entity type includes following one or more kinds of types: when name, place name, mechanism name, date
Between, identification card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number.
Optionally, the analysis model includes following one or more kinds of models:
Expert Rules model, statistical model.
It is optionally, described before carrying out information search in structural data identical with the affiliated entity type of query word,
The method also includes:
It extracts in structural data, all field values of every record of every table, and in the head and the tail of each field value point
Preset head and the tail mark is not added;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following
Part or all of content: field name, table name.
Optionally, it is described from structural data identical with the affiliated entity type of query word carry out information search include:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, to obtain and the query word
The data information matched.
Optionally, the character string includes N metacharacter string;
Wherein, N is the integer more than or equal to 2.
On the other hand, the embodiment of the present invention also provides a kind of device of information inquiry, comprising: determination unit and search are single
Member;Wherein,
Determination unit is used for: determining structural data identical with the affiliated entity type of query word;
Search unit is used for: according to query word, being carried out from structural data identical with the affiliated entity type of query word
Information search.
Optionally, the determination unit is used for:
By preset analysis model, determines the field name for each table for including in the structural data and described look into
Ask the affiliated entity type of word;
Wherein, the entity type includes following one or more kinds of types: when name, place name, mechanism name, date
Between, identification card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number;The analysis
Model includes following one or more kinds of models: Expert Rules model, statistical model.
Optionally, described device further includes pretreatment unit, is used for:
It extracts in structural data, all field values of every record of every table, and in the head and the tail of each field value point
Preset head and the tail mark is not added;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following
Part or all of content: field name, table name.
Optionally, described search unit is specifically used for:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, to obtain and the query word
The data information matched.
In another aspect, the embodiment of the present invention also provides a kind of computer storage medium, deposited in the computer storage medium
Contain computer executable instructions, the method that above- mentioned information inquiry can be performed in the computer.
Also on the one hand, the embodiment of the present invention also provides a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
Determine structural data identical with the affiliated entity type of query word;
According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.
Compared with the relevant technologies, technical scheme comprises determining that structure identical with the affiliated entity type of query word
Change data;According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.The present invention
Embodiment reduces search range of the query word in structural data according to entity type;Further, according to character string into
Row retrieval, improves search efficiency.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right
Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this
The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the flow chart of the method for information of embodiment of the present invention inquiry;
Fig. 2 is the structural block diagram of the device of information of embodiment of the present invention inquiry.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions
It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable
Sequence executes shown or described step.
Fig. 1 is the flow chart of the method for information of embodiment of the present invention inquiry, as shown in Figure 1, comprising:
Step 101 determines structural data identical with the affiliated entity type of query word;
Optionally, the embodiment of the present invention determines that structural data identical with the affiliated entity type of query word includes:
By preset analysis model, determines the field name for each table for including in the structural data and described look into
Ask the affiliated entity type of word;
Wherein, the entity type includes following one or more kinds of types: when name, place name, mechanism name, date
Between, identification card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number.
Optionally, analysis model of the embodiment of the present invention includes following one or more kinds of models:
Expert Rules model, statistical model.
It should be noted that Expert Rules model of the embodiment of the present invention may include: based on Expert Rules (Expert
Rules) the model established, be determined for: whether the field name and query word for each table for including in structural data
Belong to following entity type: date-time, identification card number, license plate number, bank's card number, passport No., mailbox number, cell-phone number;Statistics
Model may include being trained to obtain to the sample data including name, place name, mechanism name using existing statistical method
The model obtained;Statistical model is determined for: whether the field name and query word for each table for including in structural data
Belong to following entity type: name, place name, mechanism name.
Step 102, according to query word, carry out information from structural data identical with the affiliated entity type of query word and search
Rope.
Optionally, before carrying out information search in structural data identical with the affiliated entity type of query word, this hair
Bright embodiment method further include:
It extracts in structural data, all field values of every record of every table, and in the head and the tail of each field value point
Preset head and the tail mark is not added;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following
Part or all of content: field name, table name.
It should be noted that head and the tail mark of the embodiment of the present invention can be preset letter mark;Such as with B and E
It is identified respectively as head and the tail;
Optionally, the embodiment of the present invention carries out information from structural data identical with the affiliated entity type of query word and searches
Rope includes:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, to obtain and the query word
The data information matched.
Optionally, character string of the embodiment of the present invention includes N metacharacter string;Wherein, N is the integer more than or equal to 2.That is this hair
Bright embodiment N metacharacter string can be binary character string.
The query word that user inputs when user query, is converted to N metacharacter string, and search for N member word by the embodiment of the present invention
String indexing is accorded with, the field name and table name being matched to are returned.
Compared with the relevant technologies, technical scheme comprises determining that structure identical with the affiliated entity type of query word
Change data;According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.The present invention
Embodiment reduces search range of the query word in structural data according to entity type;Further, according to character string into
Row retrieval, improves search efficiency.
Fig. 2 is the structural block diagram of the device of information of embodiment of the present invention inquiry, as shown in Fig. 2, comprising determining that unit and searching
Cable elements;Wherein,
Determination unit is used for: determining structural data identical with the affiliated entity type of query word;
Search unit is used for: according to query word, being carried out from structural data identical with the affiliated entity type of query word
Information search.
Optionally, determination unit of the embodiment of the present invention is specifically used for:
By preset analysis model, determines the field name for each table for including in the structural data and described look into
Ask the affiliated entity type of word;
Wherein, the entity type includes following one or more kinds of types: when name, place name, mechanism name, date
Between, identification card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number;The analysis
Model includes following one or more kinds of models: Expert Rules model, statistical model.
It should be noted that Expert Rules model of the embodiment of the present invention may include: based on Expert Rules (Expert
Rules) the model established, be determined for: whether the field name and query word for each table for including in structural data
Belong to following entity type: date-time, identification card number, license plate number, bank's card number, passport No., mailbox number, cell-phone number;Statistics
Model may include being trained to obtain to the sample data including name, place name, mechanism name using existing statistical method
The model obtained;Statistical model is determined for: whether the field name and query word for each table for including in structural data
Belong to following entity type: name, place name, mechanism name.Optionally, the device of that embodiment of the invention further includes pretreatment unit, is used
In:
It extracts in structural data, all field values of every record of every table, and in the head and the tail of each field value point
Preset head and the tail mark is not added;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following
Part or all of content: field name, table name.
Optionally, search unit of the embodiment of the present invention is specifically used for:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, to obtain and the query word
The data information matched.
Optionally, character string of the embodiment of the present invention includes N metacharacter string;Wherein, N is the integer more than or equal to 2.
Compared with the relevant technologies, technical scheme comprises determining that structure identical with the affiliated entity type of query word
Change data;According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.The present invention
Embodiment reduces search range of the query word in structural data according to entity type;Further, according to character string into
Row retrieval, improves search efficiency.
The embodiment of the present invention also provides a kind of computer storage medium, is stored with computer in the computer storage medium
Executable instruction, the method that above- mentioned information inquiry can be performed in the computer.
The embodiment of the present invention also provides a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
Determine structural data identical with the affiliated entity type of query word;
According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.
Those of ordinary skill in the art will appreciate that all or part of the steps in the above method can be instructed by program
Related hardware (such as processor) is completed, and described program can store in computer readable storage medium, as read-only memory,
Disk or CD etc..Optionally, one or more integrated circuits also can be used in all or part of the steps of above-described embodiment
It realizes.Correspondingly, each module/unit in above-described embodiment can take the form of hardware realization, such as pass through integrated electricity
Its corresponding function is realized on road, can also be realized in the form of software function module, such as is stored in by processor execution
Program/instruction in memory realizes its corresponding function.The present invention is not limited to the hardware and softwares of any particular form
In conjunction with.
Although disclosed herein embodiment it is as above, the content only for ease of understanding the present invention and use
Embodiment is not intended to limit the invention.Technical staff in any fields of the present invention is taken off not departing from the present invention
Under the premise of the spirit and scope of dew, any modification and variation, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (12)
1. a kind of method of information inquiry characterized by comprising
Determine structural data identical with the affiliated entity type of query word;
According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.
2. the method according to claim 1, wherein determination knot identical with the affiliated entity type of query word
Structure data include:
By preset analysis model, the field name and the query word of each table for including in the structural data are determined
Affiliated entity type;
Wherein, the entity type includes following one or more kinds of types: name, place name, mechanism name, date-time, body
Part card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number.
3. according to the method described in claim 2, it is characterized in that, the analysis model includes following one or more kinds of moulds
Type:
Expert Rules model, statistical model.
4. described in any item methods according to claim 1~3, which is characterized in that it is described from the affiliated entity type of query word
Before carrying out information search in identical structural data, the method also includes:
It extracts in structural data, all field values of every record of every table, and adds respectively in the head and the tail of each field value
Preset head and the tail are added to identify;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following part
Or full content: field name, table name.
5. according to the method described in claim 4, it is characterized in that, described from structure identical with the affiliated entity type of query word
Changing progress information search in data includes:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, it is matched with the query word to obtain
Data information.
6. according to the method described in claim 4, it is characterized in that, the character string includes N metacharacter string;
Wherein, N is the integer more than or equal to 2.
7. a kind of device of information inquiry characterized by comprising determination unit and search unit;Wherein,
Determination unit is used for: determining structural data identical with the affiliated entity type of query word;
Search unit is used for: according to query word, carrying out information from structural data identical with the affiliated entity type of query word
Search.
8. device according to claim 7, which is characterized in that the determination unit is used for:
By preset analysis model, the field name and the query word of each table for including in the structural data are determined
Affiliated entity type;
Wherein, the entity type includes following one or more kinds of types: name, place name, mechanism name, date-time, body
Part card number, license plate number, instant communication client account, bank's card number, passport No., mailbox number, cell-phone number;The analysis model packet
Include following one or more kinds of models: Expert Rules model, statistical model.
9. device according to claim 7 or 8, which is characterized in that described device further includes pretreatment unit, is used for:
It extracts in structural data, all field values of every record of every table, and adds respectively in the head and the tail of each field value
Preset head and the tail are added to identify;
Field value after addition head and the tail are identified is converted to the character string of preset format;
Index is established according to the character string that conversion obtains;
Wherein, the keyword of the index is the corresponding character string of each field value;The index value of the index includes following part
Or full content: field name, table name.
10. device according to claim 9, which is characterized in that described search unit is specifically used for:
The query word is converted to the character string of the preset format;
According to the character string that query word conversion obtains, the index of foundation is scanned for, it is matched with the query word to obtain
Data information.
11. a kind of computer storage medium, computer executable instructions, the calculating are stored in the computer storage medium
Method of the machine executable instruction for information inquiry described in any one of perform claim requirement 1~6.
12. a kind of terminal, comprising: memory and processor;Wherein,
Processor is configured as executing the program instruction in memory;
Program instruction reads in processor and executes following operation:
Determine structural data identical with the affiliated entity type of query word;
According to query word, information search is carried out from structural data identical with the affiliated entity type of query word.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811487640.4A CN109753517A (en) | 2018-12-06 | 2018-12-06 | A kind of method, apparatus, computer storage medium and the terminal of information inquiry |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811487640.4A CN109753517A (en) | 2018-12-06 | 2018-12-06 | A kind of method, apparatus, computer storage medium and the terminal of information inquiry |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109753517A true CN109753517A (en) | 2019-05-14 |
Family
ID=66403555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811487640.4A Pending CN109753517A (en) | 2018-12-06 | 2018-12-06 | A kind of method, apparatus, computer storage medium and the terminal of information inquiry |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109753517A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347699A (en) * | 2019-06-26 | 2019-10-18 | 北京明略软件系统有限公司 | Determine the method and device of identity card related entities liveness |
CN110866091A (en) * | 2019-11-19 | 2020-03-06 | 杭州数梦工场科技有限公司 | Data retrieval method and device |
CN111008320A (en) * | 2019-12-17 | 2020-04-14 | 北京明略软件系统有限公司 | Data processing method and device and electronic equipment |
CN111125118A (en) * | 2019-12-27 | 2020-05-08 | 同盾(广州)科技有限公司 | Associated data query method, device, equipment and medium |
CN111986771A (en) * | 2020-09-03 | 2020-11-24 | 平安国际智慧城市科技股份有限公司 | Medical prescription query method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484339A (en) * | 2014-11-21 | 2015-04-01 | 百度在线网络技术(北京)有限公司 | Method and system for recommending relevant entities |
CN106164889A (en) * | 2013-12-02 | 2016-11-23 | 丘贝斯有限责任公司 | System and method for internal storage data library searching |
US20180253469A1 (en) * | 2013-12-06 | 2018-09-06 | Samsung Electronics Co., Ltd. | Techniques for reformulating search queries |
-
2018
- 2018-12-06 CN CN201811487640.4A patent/CN109753517A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106164889A (en) * | 2013-12-02 | 2016-11-23 | 丘贝斯有限责任公司 | System and method for internal storage data library searching |
US20180253469A1 (en) * | 2013-12-06 | 2018-09-06 | Samsung Electronics Co., Ltd. | Techniques for reformulating search queries |
CN104484339A (en) * | 2014-11-21 | 2015-04-01 | 百度在线网络技术(北京)有限公司 | Method and system for recommending relevant entities |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347699A (en) * | 2019-06-26 | 2019-10-18 | 北京明略软件系统有限公司 | Determine the method and device of identity card related entities liveness |
CN110347699B (en) * | 2019-06-26 | 2022-01-28 | 北京明略软件系统有限公司 | Method and device for determining activity of entity related to identity card |
CN110866091A (en) * | 2019-11-19 | 2020-03-06 | 杭州数梦工场科技有限公司 | Data retrieval method and device |
CN110866091B (en) * | 2019-11-19 | 2023-07-11 | 杭州数梦工场科技有限公司 | Data retrieval method and device |
CN111008320A (en) * | 2019-12-17 | 2020-04-14 | 北京明略软件系统有限公司 | Data processing method and device and electronic equipment |
CN111125118A (en) * | 2019-12-27 | 2020-05-08 | 同盾(广州)科技有限公司 | Associated data query method, device, equipment and medium |
CN111125118B (en) * | 2019-12-27 | 2021-05-07 | 同盾(广州)科技有限公司 | Associated data query method, device, equipment and medium |
CN111986771A (en) * | 2020-09-03 | 2020-11-24 | 平安国际智慧城市科技股份有限公司 | Medical prescription query method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109753517A (en) | A kind of method, apparatus, computer storage medium and the terminal of information inquiry | |
CN110569353B (en) | Attention mechanism-based Bi-LSTM label recommendation method | |
CN107346336A (en) | Information processing method and device based on artificial intelligence | |
CN108564339A (en) | A kind of account management method, device, terminal device and storage medium | |
CN102867049B (en) | Chinese PINYIN quick word segmentation method based on word search tree | |
CN107679208A (en) | A kind of searching method of picture, terminal device and storage medium | |
WO2020111424A1 (en) | Automated system for generating and recommending smart contract tag using tag recommendation model | |
CN107741972A (en) | A kind of searching method of picture, terminal device and storage medium | |
US20230161947A1 (en) | Mathematical models of graphical user interfaces | |
CN110956271B (en) | Multi-stage classification method and device for mass data | |
CN107704520A (en) | Multifile search method and apparatus based on recognition of face | |
CN111310224B (en) | Log desensitization method, device, computer equipment and computer readable storage medium | |
CN112949778A (en) | Intelligent contract classification method and system based on locality sensitive hashing and electronic equipment | |
CN116860583A (en) | Database performance optimization method and device, storage medium and electronic equipment | |
CN108830302B (en) | Image classification method, training method, classification prediction method and related device | |
CN114842982B (en) | Knowledge expression method, device and system for medical information system | |
CN116226108A (en) | Data management method and system capable of realizing different management degrees | |
CN109492117A (en) | Patent data analysis system | |
CN108292307A (en) | With the quick operating prefix Burrow-Wheeler transformation to compressed data | |
CN115130455A (en) | Article processing method and device, electronic equipment and storage medium | |
CN111291208B (en) | Front-end page element naming method and device and electronic equipment | |
CN114881131A (en) | Biological sequence processing and model training method | |
CN110069489A (en) | A kind of information processing method, device, equipment and computer readable storage medium | |
CN114528944A (en) | Medical text encoding method, device and equipment and readable storage medium | |
CN108170733A (en) | A kind of method and system classified to short message text |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190514 |