CN109213775A - Searching method, device, computer equipment and storage medium - Google Patents

Searching method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109213775A
CN109213775A CN201811089558.6A CN201811089558A CN109213775A CN 109213775 A CN109213775 A CN 109213775A CN 201811089558 A CN201811089558 A CN 201811089558A CN 109213775 A CN109213775 A CN 109213775A
Authority
CN
China
Prior art keywords
data
node
search
structure diagram
tables
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
CN201811089558.6A
Other languages
Chinese (zh)
Other versions
CN109213775B (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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811089558.6A priority Critical patent/CN109213775B/en
Publication of CN109213775A publication Critical patent/CN109213775A/en
Application granted granted Critical
Publication of CN109213775B publication Critical patent/CN109213775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application involves a kind of searching method based on big data, device, computer equipment and storage mediums.Method includes: acquisition data inquiry request;Search field is determined according to data inquiry request;Node corresponding with each search field is searched from the data structure diagram pre-established;Data search instruction corresponding with data inquiry request is generated according to the relationship between the node inquired;Corresponding data are searched for from database according to data search instruction.This searching method significantly improves search efficiency, and, this searching method supports across table Boolean query, immediately the different corresponding data of search field are stored in different tables, the problem of can also directly disposably inquiring, single table inquiry is only supported in effective solution traditional technology.

Description

Searching method, device, computer equipment and storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of searching method, device, computer equipment and storage Medium.
Background technique
With the development of computer technology, data also increasingly redundancy carries out quick query search to data and becomes to need The technical issues of studying.In the conventional technology, when being scanned for data, take be to the keyword in search statement into Row matching search.However this searching method is the key that according to word pair database in search statement when carrying out data search Traversed, search whether database whether be stored with the successful data of the Keywords matching, and this searching method can not Realize across table search, search efficiency is lower.
Summary of the invention
Based on this, it is necessary to which in view of the above technical problems, providing one kind can be realized across table search and can be improved search Searching method, device, computer equipment and the storage medium of efficiency.
A kind of searching method, which comprises
Obtain data inquiry request;
Search field is determined according to the data inquiry request;
Node corresponding with each search field is searched from the data structure diagram pre-established;
Data search instruction corresponding with the data inquiry request is generated according to the relationship between the node inquired;
Corresponding data are searched for from database according to data search instruction.
Relationship generation between the node that the basis inquires in one of the embodiments, is asked with the data query Corresponding data search is asked to instruct, comprising: when having pass in the data structure diagram between node corresponding with search field When being, has the node connection path of relationship described in determination;Using the shortest node connection path in path as searching route;According to The parameter of the node and the node that include in described search path generates data corresponding with the data inquiry request and searches Suo Zhiling.
In one of the embodiments, according to data search instruction search for from database corresponding data it Afterwards, further includes: graphically show the data searched in terminal.
The establishment step of the data structure diagram in one of the embodiments, comprising: obtain data extraction module;It will The data extraction module and source database establish connection;It is obtained by the data extraction module each in the source database The data parameters of tables of data;Data structure diagram corresponding with the source database is established according to the data parameters.
Each tables of data in the source database is obtained by the data extraction module in one of the embodiments, Data parameters, comprising: when the tables of data in the source database is there are when corresponding annotation text, obtain the tables of data Annotate text;Data structure diagram corresponding with the source database is established according to the data parameters, comprising: by the tables of data Alias of the annotation text as the corresponding node of the tables of data.
Each number in the source database is obtained by the data extraction module described in one of the embodiments, After the data parameters of table, further includes: obtain data reconstruction template, the data reconstruction template definition data format and level Relationship;The data parameters of each tables of data are inserted into the data reconstruction template according to the data format;According to Described hierarchical relationship determines node hierarchical relationship of the data parameters in the data structure diagram;It is described to join the data Number is stored to obtain corresponding data structure diagram in a manner of scheming, comprising: according to the data parameters in the data structure Node hierarchical relationship in figure determines that the level between each node and each node for including in the data structure diagram is closed System;It is obtained and the source number according to the hierarchical relationship between each node and each node for including in the data structure diagram According to the corresponding data structure diagram in library.
In one of the embodiments, the method also includes: obtain Chinese Query request;By participle model to described Chinese Query request carries out word segmentation processing, obtains multiple Chinese search fields;It is looked into from the data structure diagram pre-established Look for node corresponding with each Chinese search field;It is generated according to the relationship between the node inquired and is asked with the Chinese Query Corresponding data search is asked to instruct;The search pair from database according to data search corresponding with Chinese Query request instruction The data answered.
A kind of searcher, described device include:
Inquiry request obtains module, for obtaining data inquiry request;
Search instruction generation module, for determining search field according to the data inquiry request;From the number pre-established According to lookup node corresponding with each search field in structure chart;It is generated and the number according to the relationship between the node inquired According to the corresponding data search instruction of inquiry request;
Second search module, for searching for corresponding data from database according to data search instruction.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device performs the steps of acquisition data inquiry request when executing the computer program;It is determined according to the data inquiry request Search field;Node corresponding with each search field is searched from the data structure diagram pre-established;According to the section inquired Relationship between point generates data search instruction corresponding with the data inquiry request;It is instructed according to the data search from number According to searching for corresponding data in library.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Acquisition data inquiry request is performed the steps of when row;Search field is determined according to the data inquiry request;From pre-establishing Data structure diagram in search corresponding with each search field node;According between the node inquired relationship generate and institute State the corresponding data search instruction of data inquiry request;Corresponding number is searched for from database according to data search instruction According to.
Above-mentioned searching method, device, computer equipment and storage medium, by getting data inquiry request, according to number According to node of the search field for including in inquiry request where finding each search field in the data structure diagram pre-established, The corresponding data of the node can be directly searched further according to the path of node in the database, significantly improve search effect Rate, also, this searching method supports across table Boolean query, the immediately different corresponding data of search field are stored in difference Table, the problem of can also directly disposably inquiring, single table inquiry is only supported in effective solution traditional technology.
Detailed description of the invention
Fig. 1 is the application scenario diagram of searching method in one embodiment;
Fig. 2 is the flow diagram of searching method in one embodiment;
Fig. 3 is to generate number corresponding with data inquiry request according to the relationship between the node inquired in one embodiment According to the flow diagram of search instruction step;
Fig. 4 is the flow diagram of the establishment step of data structure diagram in one embodiment;
Fig. 5 is the schematic diagram of the data parameters of data structure diagram in one embodiment;
Fig. 6 is in one embodiment in the data parameters for obtaining each tables of data in source database by data extraction module The flow diagram of step later;
Fig. 7 is the flow diagram of the also included step of searching method in one embodiment;
Fig. 8 is the structural block diagram of searcher in one embodiment;
Fig. 9 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Searching method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 110 passes through Network is communicated with server 120 by network.It is logical that search engine in server 120 can get user by network The data inquiry request of terminal triggering is crossed, is referred to so as to generate corresponding search according to the search field in data inquiry request It enables, and corresponding data is searched from the database of server according to search instruction.Server 120 can also be incited somebody to action by network The data searched are sent to terminal 110 and are shown.Wherein, terminal 110 can be, but not limited to be various personal computers, pen Remember this computer, smart phone, tablet computer and portable wearable device, server 120 can with independent server or It is the server cluster of multiple server compositions to realize.
In one embodiment, as shown in Fig. 2, providing a kind of searching method, in this way applied to the service in Fig. 1 It is illustrated for device, comprising the following steps:
Step 202, data inquiry request is obtained.
Step 204, search field is determined according to data inquiry request.
Step 206, node corresponding with each search field is searched from the data structure diagram pre-established.
Data inquiry request refers to the inquiry request of the data known to needs inputted by terminal.Data inquiry request It can be Chinese query sentence.For example data inquiry request can be " male's job in Shanghai ".Data inquiry request can To be that user is triggered by terminal, further, data inquiry request can be used default is answered by what is installed in terminal With triggering.When user is by presetting using input data inquiry request, search engine is available to arrive data query sentence In include one or more search fields.For example data inquiry request is " male's job in Shanghai ", then search engine The available search field for including into this data inquiry request has: " Shanghai ", " male ", " job ", to search for Engine can search node corresponding with each search field from the data structure diagram that the data in database are established.Data Structure chart is the structure chart established according to the data in source database, and including in source database in data structure diagram includes The corresponding node of each tables of data, and the relationship between node corresponding with each tables of data and node.
Step 208, data search corresponding with data inquiry request is generated according to the relationship between the node inquired to refer to It enables.
Step 210, corresponding data are searched for from database according to data search instruction.
When search engine is looked into from the data structure diagram pre-established according to the search field for including in data inquiry request When finding node corresponding with each search field, at the same can also get node corresponding with each search field and node it Between close Suo Zhiling.Data search instruction refers to that a kind of computer language, search engine, can roots after generating data search instruction Corresponding data are found from database according to data search instruction.
That is, having carried out inquiry operation twice after the data inquiry request for getting user's input, having looked into for the first time Inquiry is to find corresponding node from data structure diagram according to data inquiry request, so as to raw according to the node inquired Instructed at real data search, second inquiry be then found from data according to the data search of generation instruction it is actual Data.It is for the first time the catalogue inquired where data, second can quickly find reality according to catalogue from database The data content on border.For example, data inquiry request is " job of Shanghai male ", then determined according to this data inquiry request Search field have " Shanghai ", " male ", " job ".When carrying out data query, can be inquired from data structure diagram " Shanghai ", " male ", the corresponding node of " job " these three search fields, and determine the relationship between these three nodes, So as to generate real data search instruction, can wrap containing each node in the data search instruction of generation in database In path, therefore can be directly according to node path searching in the database to the corresponding data of the node, it can fast Speed searches corresponding data according to data search instruction from database.
In one embodiment, as shown in figure 3, according between the node inquired relationship generate and data inquiry request Corresponding data search instruction, comprising:
Step 302, when having relationship in data structure diagram between node corresponding with search field, determination has pass The node connection path of system.
Step 304, using the shortest node connection path in path as searching route.
Step 306, it is generated according to the parameter for the node and node for including in searching route corresponding with data inquiry request Data search instruction.
Include multiple nodes corresponding with tables of data in source database in data structure diagram, leads between each node It crosses node relationships to be attached, has a node that can be attached by other nodes.For example it is deposited between node A and node B In node relationships 1, i.e. node A is connect with node B.There are node relationships 2 between node B and node C, but node A and node C it Between not there are node relationships, i.e. node A and node C is not directly connected to, but is believed that node A and node C are in ABC On this paths.That is, after finding node A node B can be found by node relationships 1, then close by node It is 2 to find node C.Thus, it is believed that node A → node B → node C is a searching route.In this way, it is possible to according to Data structure diagram gets the whole node connection paths for the search field for including in data inquiry request.Assuming that search field For " Shanghai ", " male ", " job " can then search node corresponding with search field " Shanghai " in data structure diagram " area " is searched node " gender " corresponding with search field " male ", and is searched corresponding with search field " job " Node " post ", between these three nodes, it is understood that there may be node connection path have: area-gender-post, area-node A- gender-the post node B-, area-node A- gender-post ... Node B-Node C-, etc., more kinds of possibility.In basis After data structure diagram gets multiple node connection paths, the length of each node connection path can be determined, it can be by road For the shortest node connection path of diameter as searching route, this mode can effectively improve search efficiency.
In one embodiment, it is instructed after searching for corresponding data in database according to data search, further includes: The data searched out are graphically shown in terminal.
After generating data search instruction corresponding with data inquiry request, it can be instructed according to data search from data Corresponding data are searched in library, and the data searched are shown in terminal, it is possible to further show the data searched Show that the search result for the default application installed at the terminal is shown on the page.In order to by relatively sharp aobvious of the data searched Show, the data of search can graphically be shown in the search result of default application and be shown on the page.Such as it can In the form of being table, the form of dendrogram or the form of statistical graph.
Above-mentioned searching method be not in direct ergodic data library it is all include each search field data storage Table, but by getting data inquiry request, according to the search field for including in data inquiry request from the number pre-established According to the node found where each search field in structure chart, this can be directly searched further according to the path of node in the database The corresponding data of node significantly improve search efficiency, also, this searching method supports across table Boolean query, immediately The corresponding data of different search fields are stored in different tables, directly can also disposably inquire, effective solution The problem of single table inquiry is only supported in traditional technology.
In one embodiment, as shown in figure 4, the establishment step of data structure diagram, comprising:
Step 402, data extraction module is obtained.
Step 404, data extraction module and source database are established into connection.
Step 406, the data parameters of each tables of data in source database are obtained by data extraction module.
Step 408, data parameters are stored to obtain data corresponding with source database in a manner of data structure diagram Structure chart.
Data extraction module is the module for pre-defining data structure and extracting parameter, and it is specified that data structure, which extracts parameter, The data parameters that the justice good tables of data to source database needs to extract when extracting.Data parameters, i.e. data structure extract Parameter can be following at least one, library name, table name, field name or enumerated value.It, can be by number after getting data extraction module Connection is established according to abstraction module and source database, thus the available number to each tables of data of source database of data extraction module According to parameter.Tables of data refers to that the data in source database are stored in table form, therefore referred to as tables of data.
As shown in fig. 5, it is assumed that source database is database S, it include tables of data A and tables of data B in database S.? Include the table name and creation time of each tables of data in source database, is associated between each tables of data by connection relationship.With For tables of data A, can wrap in tables of data A has corresponding containing multiple fields, such as field 1, field 2, each field Field name and corresponding type.Alias can also be set for field, alias can be the Chinese annotation of field, such as field The alias of comment can be " comment ".Alias is another title of field, also may search for this not by searching for alias The corresponding field of name.When field is there are situation is enumerated, the available enumerated value for including into the field.Therefore passing through When data extraction module obtains the data parameters of each tables of data in source database, the available library for including into source database Name, table name, field name or enumerated value etc., so as to be stored data parameters in a manner of data structure diagram to obtain and source The corresponding data structure diagram of database.
In one embodiment, the data parameters of each tables of data in source database, packet are obtained by data extraction module It includes: when the tables of data in source database is there are when corresponding annotation text, obtaining the annotation text of tables of data.Joined according to data Number establishes data structure diagram corresponding with source database, comprising: using the annotation text of tables of data as the corresponding node of tables of data Alias.
When there is tables of data there are text is annotated in source database, the available annotation text to the tables of data, then It, can be using annotation text as the nickname of the tables of data when establishing data structure diagram.Further, when the field in tables of data There are when corresponding annotation text, the also available annotation text to field, and when establishing data structure diagram, by field Alias of the annotation text as the field.
When establishing data structure diagram, a node in each tables of data corresponding data structure chart, node and node it Between be attached by node connection relationship.It can also include multiple child nodes under each node.For example tables of data A exists Corresponding node is node A in data structure diagram, then can also include multiple child node A1, A2, A3 etc. at node A, Wherein, child node refers to the corresponding node of each field in the tables of data.It, can if in tables of data A including 10 fields The quantity for thinking the child node that node A includes is 10.It, also will be in node A if the enumerated value that the field in tables of data A includes In the child node for including down.In this way, data structure diagram corresponding with the data for including in source database can be established. Wherein, include in data structure diagram is the data structure in source database, is not all specific number in source database According to, that is to say, that it include is in source database between the corresponding node of each tables of data and node in data structure diagram Relationship includes path of the node in source database in the attribute of node.It, can be according to the category of node after finding node The data path for including in property, finds the corresponding specific data content of the node from source database.For example, node " area " In include enumerated value have " Beijing ", " Shanghai ", " Shenzhen ", then when finding node " area " in data structure diagram, It can not be directly obtained " Beijing ", " Shanghai ", " Shenzhen " corresponding specific data, such as the population distribution in " Beijing ", Population ages etc., it is available to arrive the data road of enumerated value " Beijing " in source database when needing to know specific data Diameter can then search and node " area ", and specific data that when enumerated value is " Beijing " is corresponding from source database.Cause This, it is believed that the data structure diagram of foundation is actually a catalogue directory, can be quick by the data structure diagram of foundation Node corresponding with search field is found, so as to quickly according to node checks to corresponding data, without traversal All data.Such as in above-mentioned example, traditional technology then need to be traversed for it is all include the data in " Beijing ", then counted According to screening.And search efficiency can effectively be promoted by the data structure diagram established in the present embodiment.
In one embodiment, as shown in fig. 6, obtaining each tables of data in source database by data extraction module After data parameters, further includes:
Step 602, data reconstruction template, data reconstruction template definition data format and hierarchical relationship are obtained.
Step 604, the data parameters of each tables of data are inserted into data reconstruction template according to data format.
Step 606, node hierarchical relationship of the data parameters in data structure diagram is determined according to hierarchical relationship.
Data parameters are stored to obtain corresponding data structure diagram in a manner of scheming, comprising: existed according to data parameters Node hierarchical relationship in data structure diagram determines the layer between each node and each node for including in data structure diagram Grade relationship;It is obtained according to the hierarchical relationship between each node and each node for including in data structure diagram and source database Corresponding data structure diagram.
Data reconstruction template refers to the template of the data structure pre-defined, defines data in data reconstruction template Hierarchical relationship between format and data.The data format for including in data reconstruction template is according to fixed in data extraction module What the data parameters of justice defined, it is however generally that, the data format in data reconstruction template, which is in data extraction module, includes Data parameters.It therefore, can be by the number for each tables of data being drawn into after data extraction module and source database establish connection It inserts according to parameter into data reconstruction template, and is filled according to data format defined in data reconstruction template.It is defining When data format in data reconstruction template, while it can also define the hierarchical relationship of data.The hierarchical relationship of data is data The hierarchical relationship between data for including in table, for example include multiple fields in tables of data A, then field is then tables of data A Sub- grade, then tables of data A is host node, and the field is then the son of the corresponding node of tables of data A when establishing data structure diagram Node.
After the data structure that will be drawn into is inserted into data reconstruction template, it can be defined according in data reconstruction template Data hierarchical relationship determine the byte point of the corresponding corresponding node of data parameters and the corresponding node of the data parameters, And the node relationships between node node corresponding with other data parameters, can according to determining node and node it Between relationship establish corresponding data structure diagram.Node hierarchical relationship refers to determining host node and child node.
In one embodiment, as shown in fig. 7, the above method further include:
Step 702, Chinese Query request is obtained.
Step 704, Chinese Query is requested by participle model to carry out word segmentation processing, obtains multiple Chinese search fields.
Step 706, node corresponding with each Chinese search field is searched from the data structure diagram pre-established.
Step 708, data search corresponding with Chinese Query request is generated according to the relationship between the node inquired to refer to It enables.
Step 710, corresponding data are searched for from database according to data search corresponding with Chinese Query request instruction.
Data inquiry request can be Chinese Query request, i.e., the query text that data inquiry request includes is Chinese.When When data inquiry request is that Chinese Query is requested, progress word segmentation processing can be requested available Chinese Query by participle model Multiple Chinese search fields.Such as it can be right by NLP (Natural Language Processing, natural language processing) Chinese Query request carries out participle operation, and multiple Chinese search fields can be obtained.Chinese search field is in data inquiry request One of search field for including form of expression can search and each Chinese search from the data structure diagram pre-established The corresponding node of field, and determine that data search corresponding with Chinese Query request refers to according to the relationship between the node inquired It enables.No matter the query statement for including in data inquiry request is Chinese or English, it is right in query statement first to get The search field answered can search node corresponding with each search field from the data structure diagram pre-established, so as to To determine data search instruction corresponding with Chinese Query request according to the relationship between the node inquired, according to generation Corresponding data are searched in data search instruction from database, can also be installed at the terminal the data searched displaying pre- If on the interface of application.Search efficiency is greatly improved in this way of search.
It should be understood that although each step in the flow chart of Fig. 2-7 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-7 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as Fig. 8 shows, a kind of searcher is provided, comprising: inquiry request obtains module, search Directive generation module and the second search module, in which:
Inquiry request obtains module 802, for obtaining data inquiry request.
Search instruction generation module 804, for determining search field according to data inquiry request;From the data pre-established Node corresponding with each search field is searched in structure chart;According between the node inquired relationship generate and data query Corresponding data search is requested to instruct.
Second search module 806, for searching for corresponding data from database according to data search instruction.
In one embodiment, above-mentioned search instruction generation module 804 be also used to when node corresponding with search field it Between when having relationship in data structure diagram, determine have the node connection path of relationship;By the shortest node link road in path Diameter is as searching route;It is generated according to the parameter for the node and node for including in searching route corresponding with data inquiry request Data search instruction.
In one embodiment, above-mentioned apparatus further includes display module (not shown), the data for will search It is graphically shown in terminal.
In one embodiment, above-mentioned apparatus further includes that structure establishes module (not shown), is taken out for obtaining data Modulus block;Data extraction module and source database are established into connection;Each number in source database is obtained by data extraction module According to the data parameters of table;Data structure diagram corresponding with source database is established according to data parameters.
In one embodiment, above structure is established module and is also used to when there are corresponding for the tables of data in source database When annotating text, the annotation text of tables of data is obtained.Data structure diagram corresponding with source database, packet are established according to data parameters It includes: using the annotation text of tables of data as the alias of the corresponding node of tables of data.
In one embodiment, above structure establishes module and is also used to obtain data reconstruction template, and data reconstruction template is fixed Adopted data format and hierarchical relationship;The data parameters of each tables of data are inserted into data reconstruction template according to data format; Node hierarchical relationship of the data parameters in data structure diagram is determined according to hierarchical relationship.Data parameters are carried out in a manner of scheming Storage obtains corresponding data structure diagram, comprising: determines number according to node hierarchical relationship of the data parameters in data structure diagram According to the hierarchical relationship between each node and each node for including in structure chart;It is each according to include in data structure diagram Hierarchical relationship between node and each node obtains data structure diagram corresponding with source database.
In one embodiment, above-mentioned apparatus further includes Chinese Query module (not shown), is looked into for obtaining Chinese Ask request;Chinese Query is requested by participle model to carry out word segmentation processing, obtains multiple Chinese search fields;From pre-establishing Data structure diagram in search corresponding with each Chinese search field node;It is generated according to the relationship between the node inquired Data search instruction corresponding with Chinese Query request;It is instructed according to data search corresponding with Chinese Query request from database It is middle to search for corresponding data.
Specific about searcher limits the restriction that may refer to above for searching method, and details are not described herein. Modules in above-mentioned searcher can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can It is embedded in the form of hardware or independently of in the processor in computer equipment, computer can also be stored in a software form and set In memory in standby, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 9.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment data such as the data of structure chart and data reconstruction template for storing data.The net of the computer equipment Network interface is used to communicate with external terminal by network connection.To realize that one kind is searched when the computer program is executed by processor Suo Fangfa.
It will be understood by those skilled in the art that structure shown in Fig. 9, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with Computer program, the processor perform the steps of acquisition data inquiry request when executing computer program;According to data query It requests to determine search field;Node corresponding with each search field is searched from the data structure diagram pre-established;According to looking into Relationship between the node ask generates data search instruction corresponding with data inquiry request;It is instructed according to data search from number According to searching for corresponding data in library.
In one embodiment, data corresponding with data inquiry request are generated according to the relationship between the node inquired Search instruction, comprising: when having relationship in data structure diagram between node corresponding with search field, determination has relationship Node connection path;Using the shortest node connection path in path as searching route;According to the node for including in searching route And the parameter of node generates data search instruction corresponding with data inquiry request.
In one embodiment, the processor after searching for corresponding data in database is being instructed according to data search The data that will be searched also are performed the steps of when executing computer program graphically to show in terminal.
In one embodiment, the establishment step of data structure diagram is also realized when processor executes computer program, comprising: Obtain data extraction module;Data extraction module and source database are established into connection;Source data is obtained by data extraction module The data parameters of each tables of data in library;Data structure diagram corresponding with source database is established according to data parameters.
In one embodiment, the data parameters of each tables of data in source database, packet are obtained by data extraction module It includes: when the tables of data in source database is there are when corresponding annotation text, obtaining the annotation text of tables of data.Joined according to data Number establishes data structure diagram corresponding with source database, comprising: using the annotation text of tables of data as the corresponding node of tables of data Alias.
In one embodiment, by data extraction module obtain source database in each tables of data data parameters it Afterwards, it is also performed the steps of when processor executes computer program and obtains data reconstruction template, data reconstruction template definition data Format and hierarchical relationship;The data parameters of each tables of data are inserted into data reconstruction template according to data format;According to layer Grade relationship determines node hierarchical relationship of the data parameters in data structure diagram.Data parameters are carried out storing in a manner of scheming To corresponding data structure diagram, comprising: determine data structure according to node hierarchical relationship of the data parameters in data structure diagram The hierarchical relationship between each node and each node for including in figure;According to each node for including in data structure diagram with And the hierarchical relationship between each node obtains data structure diagram corresponding with source database.
In one embodiment, it is also performed the steps of when processor executes computer program and obtains Chinese Query request; Chinese Query is requested by participle model to carry out word segmentation processing, obtains multiple Chinese search fields;From the data pre-established Node corresponding with each Chinese search field is searched in structure chart;It is generated and Chinese according to the relationship between the node inquired The corresponding data search instruction of inquiry request;It is searched for from database according to data search corresponding with Chinese Query request instruction Corresponding data.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of acquisition data inquiry request when being executed by processor;Search word is determined according to data inquiry request Section;Node corresponding with each search field is searched from the data structure diagram pre-established;According between the node inquired Relationship generate corresponding with data inquiry request data search and instruct;It is searched for and is corresponded to from database according to data search instruction Data.
In one embodiment, data corresponding with data inquiry request are generated according to the relationship between the node inquired Search instruction, comprising: when having relationship in data structure diagram between node corresponding with search field, determination has relationship Node connection path;Using the shortest node connection path in path as searching route;According to the node for including in searching route And the parameter of node generates data search instruction corresponding with data inquiry request.
In one embodiment, the computer after searching for corresponding data in database is being instructed according to data search The data that will be searched also are performed the steps of when program is executed by processor graphically to show in terminal.
In one embodiment, the establishment step of data structure diagram, packet are also realized when computer program is executed by processor It includes: obtaining data extraction module;Data extraction module and source database are established into connection;Source number is obtained by data extraction module According to the data parameters of tables of data each in library;Data structure diagram corresponding with source database is established according to data parameters.
In one embodiment, the data parameters of each tables of data in source database, packet are obtained by data extraction module It includes: when the tables of data in source database is there are when corresponding annotation text, obtaining the annotation text of tables of data.Joined according to data Number establishes data structure diagram corresponding with source database, comprising: using the annotation text of tables of data as the corresponding node of tables of data Alias.
In one embodiment, by data extraction module obtain source database in each tables of data data parameters it Afterwards, it is also performed the steps of when computer program is executed by processor and obtains data reconstruction template, data reconstruction template definition number According to format and hierarchical relationship;The data parameters of each tables of data are inserted into data reconstruction template according to data format;According to Hierarchical relationship determines node hierarchical relationship of the data parameters in data structure diagram.Data parameters are stored in a manner of scheming Obtain corresponding data structure diagram, comprising: data knot is determined according to node hierarchical relationship of the data parameters in data structure diagram The hierarchical relationship between each node and each node for including in composition;According to each node for including in data structure diagram And the hierarchical relationship between each node obtains data structure diagram corresponding with source database.
In one embodiment, acquisition Chinese Query is also performed the steps of when computer program is executed by processor to ask It asks;Chinese Query is requested by participle model to carry out word segmentation processing, obtains multiple Chinese search fields;From the number pre-established According to lookup node corresponding with each Chinese search field in structure chart;It is generated with according to the relationship between the node inquired Query text requests corresponding data search instruction;It is searched from database according to data search corresponding with Chinese Query request instruction The corresponding data of rope.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of searching method, which comprises
Obtain data inquiry request;
Search field is determined according to the data inquiry request;
Node corresponding with each search field is searched from the data structure diagram pre-established;
Data search instruction corresponding with the data inquiry request is generated according to the relationship between the node inquired;
Corresponding data are searched for from database according to data search instruction.
2. the method according to claim 1, wherein relationship between the node that the basis inquires generate with The corresponding data search instruction of the data inquiry request, comprising:
When having relationship in the data structure diagram between node corresponding with search field, has relationship described in determination Node connection path;
Using the shortest node connection path in path as searching route;
It is generated according to the parameter for the node and the node for including in described search path corresponding with the data inquiry request Data search instruction.
3. the method according to claim 1, wherein being searched for from database according to data search instruction After corresponding data, further includes: graphically show the data searched in terminal.
4. the method according to claim 1, wherein the establishment step of the data structure diagram, comprising:
Obtain data extraction module;
The data extraction module and source database are established into connection;
The data parameters of each tables of data in the source database are obtained by the data extraction module;
Data structure diagram corresponding with the source database is established according to the data parameters.
5. according to the method described in claim 4, it is characterized in that, obtaining the source database by the data extraction module In each tables of data data parameters, comprising:
When the tables of data in the source database is there are when corresponding annotation text, the annotation text of the tables of data is obtained;
Data structure diagram corresponding with the source database is established according to the data parameters, comprising: by the note of the tables of data This alias as the corresponding node of the tables of data of annotations.
6. according to the method described in claim 4, it is characterized in that, obtaining the source by the data extraction module described In database after the data parameters of each tables of data, further includes:
Obtain data reconstruction template, the data reconstruction template definition data format and hierarchical relationship;
The data parameters of each tables of data are inserted into the data reconstruction template according to the data format;
Node hierarchical relationship of the data parameters in the data structure diagram is determined according to described hierarchical relationship;
It is described to be stored the data parameters in a manner of scheming to obtain corresponding data structure diagram, comprising:
It is determined in the data structure diagram according to the data parameters in the node hierarchical relationship in the data structure diagram and includes Each node and each node between hierarchical relationship;
It is obtained and the source according to the hierarchical relationship between each node and each node for including in the data structure diagram The corresponding data structure diagram of database.
7. the method according to claim 1, wherein the method also includes:
Obtain Chinese Query request;
The Chinese Query is requested by participle model to carry out word segmentation processing, obtains multiple Chinese search fields;
Node corresponding with each Chinese search field is searched from the data structure diagram pre-established;
Data search instruction corresponding with Chinese Query request is generated according to the relationship between the node inquired;
Corresponding data are searched for from database according to data search corresponding with Chinese Query request instruction.
8. a kind of searcher, which is characterized in that described device includes:
Inquiry request obtains module, for obtaining data inquiry request;
Search instruction generation module, for determining search field according to the data inquiry request;From the data knot pre-established Node corresponding with each search field is searched in composition;It is generated according to the relationship between the node inquired and is looked into the data It askes and requests corresponding data search instruction;
Second search module, for searching for corresponding data from database according to data search instruction.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811089558.6A 2018-09-18 2018-09-18 Search method, search device, computer equipment and storage medium Active CN109213775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811089558.6A CN109213775B (en) 2018-09-18 2018-09-18 Search method, search device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811089558.6A CN109213775B (en) 2018-09-18 2018-09-18 Search method, search device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109213775A true CN109213775A (en) 2019-01-15
CN109213775B CN109213775B (en) 2022-11-01

Family

ID=64984332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811089558.6A Active CN109213775B (en) 2018-09-18 2018-09-18 Search method, search device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109213775B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580333A (en) * 2019-08-26 2019-12-17 杭州城市大数据运营有限公司 data table processing method, searching method, device, equipment and storage medium
CN113821533A (en) * 2021-09-30 2021-12-21 北京鲸鹳科技有限公司 Data query method, device, equipment and storage medium
CN114925118A (en) * 2022-06-09 2022-08-19 北京百度网讯科技有限公司 Cross-table search method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009095981A1 (en) * 2008-01-28 2009-08-06 Turbo Data Laboratories Inc. Method and device for building tree-structured data from table
CN102135972A (en) * 2010-07-30 2011-07-27 华为软件技术有限公司 Service tree data processing method, system, client and server
CN105550241A (en) * 2015-12-07 2016-05-04 珠海多玩信息技术有限公司 Multidimensional database query method and apparatus
CN107908657A (en) * 2017-10-17 2018-04-13 平安科技(深圳)有限公司 Querying method, device, computer equipment and the storage medium of bordereau

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009095981A1 (en) * 2008-01-28 2009-08-06 Turbo Data Laboratories Inc. Method and device for building tree-structured data from table
CN102135972A (en) * 2010-07-30 2011-07-27 华为软件技术有限公司 Service tree data processing method, system, client and server
CN105550241A (en) * 2015-12-07 2016-05-04 珠海多玩信息技术有限公司 Multidimensional database query method and apparatus
CN107908657A (en) * 2017-10-17 2018-04-13 平安科技(深圳)有限公司 Querying method, device, computer equipment and the storage medium of bordereau

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580333A (en) * 2019-08-26 2019-12-17 杭州城市大数据运营有限公司 data table processing method, searching method, device, equipment and storage medium
CN113821533A (en) * 2021-09-30 2021-12-21 北京鲸鹳科技有限公司 Data query method, device, equipment and storage medium
CN113821533B (en) * 2021-09-30 2023-09-08 北京鲸鹳科技有限公司 Method, device, equipment and storage medium for data query
CN114925118A (en) * 2022-06-09 2022-08-19 北京百度网讯科技有限公司 Cross-table search method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109213775B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN110276002B (en) Search application data processing method and device, computer equipment and storage medium
CN103597469B (en) Live browser instrument in IDE
CN108829727A (en) Date storage method, device, computer equipment and storage medium
US8065484B2 (en) Enhanced access to data available in a cache
CN108874926A (en) Mass data inquiry method, device, computer equipment and storage medium
CN109213775A (en) Searching method, device, computer equipment and storage medium
CN110442553A (en) File management method, device, computer equipment and storage medium
CN109032662A (en) Code file generation method, device, computer equipment and storage medium
CN110020278A (en) Displaying, providing method, client and the server of page data
CN108986910A (en) Answering method, device, computer equipment and storage medium on line
CN109165266A (en) List generation method, device, computer equipment and storage medium
CN105677904B (en) Small documents storage method and device based on distributed file system
CN112685091A (en) Service request processing method, device, equipment and medium based on big data
CN109902126B (en) Loading system supporting HIVE automatic partition and implementation method thereof
CN112115328B (en) Page flow map construction method and device and computer readable storage medium
CN104423982A (en) Request processing method and device
CN115885275A (en) System and method for retrieving images using natural language descriptions
US10235455B2 (en) Semantic search system interface and method
CN103914487A (en) Document collection, identification and association system
CN116034401A (en) System and method for retrieving video using natural language descriptions
JP6723976B2 (en) Test execution device and program
CN106484755A (en) The method of asynchronous quick loading video thumbnails
CN113157904A (en) Sensitive word filtering method and system based on DFA algorithm
CN109325119A (en) Method, apparatus, computer equipment and the storage medium of the emotion of news analysis
CN110286894A (en) Scenario generation method, device, computer equipment and storage medium

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