CN109766354A - Optimization method, device and the equipment of business datum inquiry - Google Patents

Optimization method, device and the equipment of business datum inquiry Download PDF

Info

Publication number
CN109766354A
CN109766354A CN201811474122.9A CN201811474122A CN109766354A CN 109766354 A CN109766354 A CN 109766354A CN 201811474122 A CN201811474122 A CN 201811474122A CN 109766354 A CN109766354 A CN 109766354A
Authority
CN
China
Prior art keywords
business datum
inquiry
information
query
predetermined keyword
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
Application number
CN201811474122.9A
Other languages
Chinese (zh)
Inventor
肖纪伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chen Sen Century Polytron Technologies Inc
Original Assignee
Beijing Chen Sen Century Polytron Technologies Inc
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 Beijing Chen Sen Century Polytron Technologies Inc filed Critical Beijing Chen Sen Century Polytron Technologies Inc
Priority to CN201811474122.9A priority Critical patent/CN109766354A/en
Publication of CN109766354A publication Critical patent/CN109766354A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

This application discloses optimization method, device and the equipment of a kind of inquiry of business datum, are related to technical field of data processing, can solve improvement cost height existing in the prior art, period uncontrollable problem.Wherein method includes: and parses to inquiry request instruction when the inquiry request for receiving business datum is instructed, obtain the corresponding query statement information of the business datum;Syntactic analysis is carried out to the query statement information, obtains the key message for meeting preset condition;The corresponding query path of the business datum is determined according to the key message;The inquiry operation of the business datum is executed according to the query path.The application is suitable for the optimization of business datum inquiry.

Description

Optimization method, device and the equipment of business datum inquiry
Technical field
This application involves technical field of data processing, optimization method, dress particularly with regard to a kind of inquiry of business datum It sets and equipment.
Background technique
With the development of information technology, the demand that people inquire business datum is more and more.It specifically can be by accurately examining The modes such as rope, fuzzy search inquire the business datum of user itself needs in the database of operation system, and then meet and use The corresponding business demand in family.There are when a large amount of table data in the database of operation system, the efficiency of business datum can be made At influence, and with the increase of data volume, it will the performance in great consumption data library.
Currently, in order to solve the problems, such as it is above-mentioned this, can include according to each single item in concordance list by way of inverted index Attribute value and the address of respectively recording with the attribute value carry out business datum inquiry, i.e., business datum is determined by attribute value The position of record, then according to the corresponding business datum of the position acquisition.
It is just able to achieve however, the mode of this inverted index needs business development personnel to carry out code revision, especially goes through History Legacy System or the very big system of size of code, since its function point is more, size of code is big, therefore can have improvement cost height, week Phase uncontrollable problem.It requires to be also higher simultaneously for the technical level of business development personnel.
Summary of the invention
In view of this, this application provides optimization method, device and the equipment of a kind of inquiry of business datum, main purpose exists It needs business development personnel to carry out code revision currently with the mode of inverted index in solution to be just able to achieve, therefore can exist and change Make at high cost, period uncontrollable problem.
According to the one aspect of the application, a kind of optimization method of business datum inquiry is provided, this method comprises:
When the inquiry request for receiving business datum instructs, inquiry request instruction is parsed, is obtained described The corresponding query statement information of business datum;
Syntactic analysis is carried out to the query statement information, obtains the key message for meeting preset condition;
The corresponding query path of the business datum is determined according to the key message;
The inquiry operation of the business datum is executed according to the query path.
Preferably, inquiry request instruction is parsed, obtains the corresponding query statement information of the business datum, It specifically includes:
Using Database Access Protocol, the data segment carried in the inquiry request instruction is identified;
According to the data segment identified, corresponding SQL query statement is restored.
Preferably, syntactic analysis is carried out to the query statement information, obtains the key message for meeting preset condition, specifically Include:
Abstract syntax tree analysis is carried out to the SQL query statement, obtains the data source information in the SQL query statement With predicate information;
It is determined as the data source information and the predicate information to meet the key message of the preset condition.
Preferably, the corresponding query path of the business datum is determined according to the key message, specifically included:
The predicate information is segmented;
Word segmentation result is matched with predetermined keyword;
Matched predetermined keyword if it exists, then according to default routing rule corresponding with the matched predetermined keyword Then, the corresponding query path of the business datum is determined, wherein each default routing rule has corresponding inquiry Path;
The position of database is then determined as the corresponding inquiry of the business datum by matched predetermined keyword if it does not exist Path.
Preferably, the basis default routing rule corresponding with the matched predetermined keyword, determines the business The corresponding query path of data, specifically includes:
If determining the inquiry request instruction character molding paste search condition according to the matched predetermined keyword, will search It indexes the position held up and is determined as the corresponding query path of the business datum.
Preferably, the method also includes:
Receive the more new information of the predetermined keyword and the default routing rule;
According to the more new information, to the predetermined keyword and the default routing corresponding with the predetermined keyword Rule is updated.
Preferably, the corresponding query path of the business datum is determined according to the key message, specifically included:
If determining that the business datum has backup in the buffer according to the data source information, then by the caching pair The position answered is determined as the corresponding query path of the business datum.
Preferably, after the inquiry operation for executing the business datum according to the query path, the method is also wrapped It includes:
If each business subdata needs that the business datum includes are inquired according to the different query path, Then by the query result of each business subdata, unified data are carried out according to Database Access Protocol and are encapsulated, institute is obtained State the query result of business datum.
According to the another aspect of the application, a kind of optimization device of business datum inquiry is provided, which includes:
Resolution unit, for instructing and carrying out to the inquiry request when the inquiry request for receiving business datum instructs Parsing, obtains the corresponding query statement information of the business datum;
Analytical unit obtains the crucial letter for meeting preset condition for carrying out syntactic analysis to the query statement information Breath;
Determination unit, for determining the corresponding query path of the business datum according to the key message;
Execution unit, for executing the inquiry operation of the business datum according to the query path.
Preferably, the resolution unit is specifically used for utilizing Database Access Protocol, identifies in the inquiry request instruction The data segment of carrying;
According to the data segment identified, corresponding SQL query statement is restored.
Preferably, the analytical unit is specifically used for carrying out abstract syntax tree analysis to the SQL query statement, obtain Data source information and predicate information in the SQL query statement;
It is determined as the data source information and the predicate information to meet the key message of the preset condition.
Preferably, the determination unit, specifically for segment to the predicate information;
Word segmentation result is matched with predetermined keyword;
Matched predetermined keyword if it exists, then according to default routing rule corresponding with the matched predetermined keyword Then, the corresponding query path of the business datum is determined, wherein each default routing rule has corresponding inquiry Path;
The position of database is then determined as the corresponding inquiry of the business datum by matched predetermined keyword if it does not exist Path.
Preferably, the determination unit, if being specifically also used to determine the inquiry according to the matched predetermined keyword Request instruction meets the condition of searching for generally, then the position of search engine is determined as the corresponding query path of the business datum.
Preferably, described device further include:
Receiving unit, for receiving the more new information of the predetermined keyword and the default routing rule;
Updating unit, for according to the more new information, to the predetermined keyword and corresponding with the predetermined keyword The default routing rule be updated.
Preferably, the determination unit, if being specifically also used to determine that the business datum exists according to the data source information There is backup in caching, then the corresponding position of the caching is determined as the corresponding query path of the business datum.
Preferably, described device further include:
Encapsulation unit, if each business subdata for the business datum to include is needed according to the different inquiries Path is inquired, then by the query result of each business subdata, unified number is carried out according to Database Access Protocol According to encapsulation, the query result of the business datum is obtained.
According to the application another aspect, a kind of storage medium is provided, computer program, described program are stored thereon with The optimization method of above-mentioned business datum inquiry is realized when being executed by processor.
According to the application another aspect, a kind of entity device of business datum query optimization is provided, including storage is situated between Matter, processor and storage on a storage medium and the computer program that can run on a processor, described in the processor execution The optimization method of above-mentioned business datum inquiry is realized when program.
By above-mentioned technical proposal, a kind of optimization method, device and the equipment of business datum inquiry provided by the present application, with The mode of current existing inverted index is compared, and the application can instruct the inquiry request of the business datum received and parse Corresponding query statement information is obtained, carries out the key message that syntactic analysis obtains further according to the query statement information, determining should The corresponding query path of business datum, to execute business datum inquiry operation according to the query path.Entire scheme is without repairing Change the code logic of original system, that is, the search efficiency of business datum can be improved, there is no improvement cost height, and the period can not Control, the problem of there may be risks.The technical level requirement for business development personnel is also reduced, can accomplish user's unaware Lower raising business datum search efficiency, ensure that the transparent unaware of business.
Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the application can It is clearer and more comprehensible, below the special specific embodiment for lifting the application.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of the optimization method of business datum inquiry provided by the embodiments of the present application;
Fig. 2 shows the flow diagrams of the optimization method of another business datum inquiry provided by the embodiments of the present application;
Fig. 3 shows a kind of application scenarios example schematic provided by the embodiments of the present application;
Fig. 4 shows the method flow schematic diagram provided by the embodiments of the present application for solving application scenarios example problem;
Fig. 5 shows a kind of structural schematic diagram of the optimization device of business datum inquiry provided by the embodiments of the present application;
Fig. 6 shows the structural schematic diagram of the optimization device of another business datum inquiry provided by the embodiments of the present application.
Specific embodiment
The application is described in detail below with reference to attached drawing and in conjunction with the embodiments.It should be noted that not conflicting In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
Can have that improvement cost is high, the period is uncontrollable, there may be risks for the mode of current existing inverted index The problem of, a kind of optimization method of business datum inquiry is present embodiments provided, as shown in Figure 1, this method comprises:
101, when the inquiry request for receiving business datum instructs, inquiry request instruction is parsed, business is obtained The corresponding query statement information of data.
Wherein, query statement information may include the query statement content to database inquiry services data.User needs to look into The business datum of inquiry can depending on actual user's demand, such as the business datum that needs to inquire be businessman turnover data, The kinds of goods storage data in warehouse etc..
It can be the device or equipment of processing business data inquiry request for the executing subject of the present embodiment, be configurable on Client-side or server side, depending on practical business demand.
102, syntactic analysis is carried out to query statement information, obtains the key message for meeting preset condition.
Wherein, preset condition can be preset according to actual needs.For example, meeting the key message of preset condition can be used for Judge the query type that this inquiry request includes, such as fuzzy query, correlation inquiry, accurate inquiry, here fuzzy query and Correlation inquiry may increase the influence to database performance.To determine the corresponding inquiry of business datum according to the query type Path.For another example the key message for meeting preset condition can be used for judging this inquiry request whether with the nearest neighbor moment Inquiry request content is identical, to determine the corresponding query path of business datum according to the judgment result.
In the present embodiment, the different syntactic informations that preparatory service data statistics query statement may include generate corresponding Syntactic lexicon carries out syntactic analysis to this query statement information, from the query statement information then according to the syntactic lexicon In acquire the key message for meeting preset condition.
103, the corresponding query path of business datum is determined according to the key message that analysis acquires.
Wherein, query path is equivalent to instruction business datum and inquires in which path.For example, query path may include searching Index holds up, caches, the paths such as database, the search engine refer to according to certain strategy, with specific computer program from Information is collected on internet, after carrying out tissue and processing to information, provides retrieval service for user, user search is relevant The system that information shows user scans for arranging and classify, and is stored in network data base to internet information resource The middle system for user query, including information search, information classification, user query three parts.
For the present embodiment, the key message for meeting preset condition that can be acquired according to analysis can be automatically found industry The corresponding more suitable query path of data of being engaged in.Without the code logic to original system modification original system, that is, industry can be improved The search efficiency for data of being engaged in.
104, the inquiry operation of business datum is executed according to query path.
For example, if this inquiry request is the inquiry request of fuzzy query and/or correlation inquiry type, it is corresponding to inquire Path can be the path of search engine, the inquiry operation of the business datum can be executed by search engine in this way, and then avoid pair The performance of database causes excessively to influence.It returns to called side after inquiry obtains result to be shown, so that user watches Query result.
By applying above-mentioned implementation process, compared with the mode of current existing inverted index, the present embodiment method is not necessarily to The code logic for modifying original system, that is, can be improved the search efficiency of business datum, and there is no improvement cost height, and the period can not Control, the problem of there may be risks.The technical level requirement for business development personnel is also reduced, can accomplish user's unaware Lower raising business datum search efficiency, ensure that the transparent unaware of business.
Further, as the refinement and extension of above-described embodiment specific embodiment, in order to completely illustrate the present embodiment The implementation process of method, with structured query language (Structured Query Language, SQL) sentence inquiry business number For, the optimization method of another business datum inquiry is provided, as shown in Fig. 2, this method comprises:
201, when the inquiry request for receiving business datum instructs, using Database Access Protocol, inquiry request is identified The data segment carried in instruction.
Wherein, Database Access Protocol can acquire in advance, can quick response when to parse query statement information.It is right In the present embodiment, using based on transmission control protocol (Transmission Control Protocol, TCP)/internet protocol View (Internet Protocol, IP) is communicated, and Java jdbc connection database is utilized.TCP/IP is a set of to be used to connect Connect the communication protocol of each host on internet.
202, according to the data segment identified, corresponding SQL query statement is restored.
Specifically, further being parsed according to the data segment identified, in conjunction with the building standard of SQL query statement, also Former corresponding SQL query statement, the SQL query statement can be inquired and the SQL query statement of input for user for business datum.
203, abstract syntax tree analysis is carried out to SQL query statement, obtains the data source information and meaning in SQL query statement Word information.
Wherein, abstract syntax tree (abstract syntax tree, AST) or syntax tree (syntax tree) are The tree-shaped form of expression of the abstract syntax structure of source code, in particular to the source code of programming language.It is opposite with abstract syntax tree Be concrete syntax tree (concrete syntaxtree), commonly referred to as parsing tree (parse tree).In general, in source generation In the translation and compilation process of code, syntax analyzer is created that parsing tree.It may include data source situation in data source information, number The specific collection of information and the data source location needed for being data, access the data according to source, data source location therein are available Data source name description.Predicate information may include the querying condition content of business datum.
204, it is determined as data source information and predicate information that analysis obtains to meet the key message of preset condition.
For example, carrying out the analysis of AST syntax tree to the SQL query statement extracted, key message such as data source, meaning are extracted Word (such as table, querying condition).
205, the corresponding query path of business datum is determined according to key message.
Alternatively, step 205 is specific can include: divides first the predicate information in key message Word;Then word segmentation result is matched with predetermined keyword, wherein predetermined keyword can be preset according to actual needs, mesh Be in order to extract the keyword in query statement, to find the more suitable query path of business datum;If next depositing In matched predetermined keyword, then according to default routing rule corresponding with matched predetermined keyword, business datum pair is determined The query path answered, wherein each default routing rule has corresponding query path, presets the corresponding instruction of routing rule Business datum should be inquired from which query path;Matched predetermined keyword if it does not exist then determines the position of database For the corresponding query path of business datum.
For example, being pre-configured with some keywords, the keyword in query statement is identified, if the keyword is fuzzy searches Rope and/or the relevant keyword of association search illustrate that this inquiry belongs to and search for generally and/or association search scope, if sharp With data base querying can due to inquiry data volume it is larger and cause influence database performance, the present embodiment can according to the key The corresponding default routing rule of word using the position of search engine as the corresponding query path of the business datum, and then is utilized and is searched Index, which is held up, carries out business datum inquiry, and the performance for reducing data base querying influences.
For another example if determining that this inquiry inquired (distance with last time according to the keyword in the query statement identified The duration at current queries moment is less than certain threshold value) business datum it is unchanged, being equivalent to the nearest moment just inquired, due to being System can retain the business datum in the buffer and (be equivalent to caching dsc data for a period of time, then utilize the caching query hot number According to), therefore the present embodiment can be according to default routing rule corresponding with the keyword, using the position of caching as the business datum Corresponding query path, and then business datum inquiry is carried out using caching, the performance for reducing data base querying influences.
It should be noted that word segmentation result and predetermined keyword are carried out matched process, in addition to essence for the present embodiment Other than true matched mode, if the not predetermined keyword of successful match, fuzzy matching can be also carried out, is found and word segmentation result The predetermined keyword of semantic similarity, and then accomplish more fully predetermined keyword matching.If it is determined that without matched default pass Keyword illustrates that the inquiry of this business datum is not fuzzy query and/or correlation inquiry, the business number is also not present in the buffer According to the position of database directly being determined as the corresponding query path of the business datum, and then carry out the industry using database The inquiry for data of being engaged in influences the performance of database smaller due to not being fuzzy query and/or correlation inquiry, and can be improved The search efficiency of business datum.
In order to illustrate above-mentioned basis default routing rule corresponding with matched predetermined keyword, determine that business datum is corresponding Query path the step of, alternatively, the process is specific can include: if according to matched predetermined keyword determine This inquiry request instruction character molding paste search condition, then be determined as the corresponding inquiry road of business datum for the position of search engine Diameter.
Wherein, searching for condition generally can be pre-configured with according to actual needs.For example, matched predetermined keyword is " like ", which belongs in query statement searches for scope generally, therefore the conjunction of this inquiry request instruction character is searched for generally The position of search engine can be determined as the business datum of needs inquiry to reduce on the influence of the performance of database by condition Corresponding query path, to carry out the inquiry of the business datum using search engine.
Further, in order to meet upgrading demand for predetermined keyword and default routing rule, the present embodiment may also include that Receive the more new information of predetermined keyword and default routing rule;Then according to more new information, to predetermined keyword and with it is default The corresponding default routing rule of keyword is updated.So that the present embodiment method can based on newest predetermined keyword and Corresponding newest default routing rule is realized to obtain.
In addition to those mentioned earlier, for the more quickly query path of determining business datum, as a kind of optional side Formula determines that business datum has backup in the buffer if step 205 specifically may also include that according to data source information, then will caching Corresponding position is determined as the corresponding query path of business datum.Since the data in data source information including business datum are come Source, if determining that the business datum for needing to inquire has backup in the buffer, then will can directly delay according to the data source information It deposits corresponding position and is determined as the corresponding query path of the business datum, to carry out the inquiry of the business datum using caching. For example, determine that the business datum for needing to inquire is the dsc data of Integrated query in the nearest period according to the data source information, and System influences to save dsc data in the buffer to reduce on the performance of database, then using caching replace database into The inquiry of row dsc data, therefore directly can set the query path of the business datum to the position of caching, and then look into the buffer The business datum is ask, the performance for influencing database is avoided.
206, the inquiry operation of business datum is executed according to query path.
For example, the business datum can be inquired in the buffer if query path is the position of caching;If inquiring road Diameter is the position of search engine, then the business datum can be inquired in a search engine;If query path is the position of database It sets, then the business datum can be inquired in the database.
If each business subdata needs that 207, business datum includes are inquired according to different query path, will The query result of each business subdata carries out unified data according to Database Access Protocol and encapsulates, obtains business datum Query result.
For example, the business subdata A that business datum includes is needed to inquire in the buffer, business subdata B needs are being searched Index holds up middle inquiry, and business subdata C needs to inquire in the database, then the inquiry that these three query paths are inquired It is encapsulated as a result, carrying out unified data according to Database Access Protocol, obtains the final query result of the business datum and opened up Show.Accomplish the accurate of business datum in the case where device side, which may be implemented in reduction, influences database performance in this way Inquiry, can realize user's unaware in user side, the business datum for needing to inquire can accurately export displaying, meet the inquiry of user Demand.
In order to facilitate content described in above-mentioned the present embodiment is understood, (Java DataBase is connected with Java database Connectivity, JDBC) for driving method, following application scenarios are provided, but not limited to this, it can also be mutual for open database Even (Open Database Connectivity, ODBC) driving method etc..
Currently, traditional business system accesses database (Database, DB) by JDBC, database provides data service, When receiving the business datum inquiry request of JDBC client transmission, query traffic data and JDBC is returned in the database Client, it is specific as shown in Figure 3.It usually requires to write a large amount of SQL query statement in operation system, wherein having inevitably It needs through title (title) fuzzy search, while also needing to carry out a large amount of correlation inquiry.And with the increase of data volume, nothing By being that correlation inquiry or fuzzy search will great consumption data library performances.In order to solve the technical problem, the present embodiment A kind of SQL code logic for modifying original system without business development personnel is provided, that is, business datum search efficiency can be improved Technical solution.
Specific implementation process is as shown in Figure 4.1, after JDBC client sends business datum inquiry request, to database The business datum that JDBC driving links and accesses Agent layer (Data Access Layer, DAL) of offer is responsible for receiving client is looked into Ask request.2, it according to Database Access Protocol, parses data segment and restores SQL query statement.3, to the SQL query extracted Sentence carries out the analysis of AST syntax tree, extracts key message such as data source, predicate (table, querying condition).Predicate is segmented simultaneously It is matched with predetermined keyword, according to the characteristic that can act on full-text search, extracts corresponding keyword.4, according to the key of extraction The routing rule matched is analyzed and checked whether to word, continues to request DB if unmatching, to meeting matching item The keyword of part carries out SQL rewriting or the other services of routing.5, routing rule is matched, searches for generally directly utilizing search engine Inquiry, data are unconverted to utilize caching query, and no adaptation rule directly utilizes data base querying, such as keyword " like " With routing rule " search " (corresponding to search engine), keyword "=" matching routing rule " caching " (i.e. corresponding caching).Road It needs to be mapped according to keyword and corresponding service in advance by rule, function is carried out when matching and is routed to corresponding clothes It is engaged in (such as search engine, caching, database).6, the data query that different services (such as search engine, caching) is returned As a result according to Database Access Protocol, unified data encapsulation is carried out, and returns to JDBC client.
For the scheme of embodiment, it is not necessary to modify system business codes, that is, can reach the effect of Optimizing Queries SQL, guarantee To the transparent unaware of business.Because it is not necessary to modify business ends, so risk is small.Business development personnel can unaware access search draw It holds up, the process of caching process ability.
Further, the specific implementation as method shown in Fig. 1 present embodiments provides a kind of the excellent of business datum inquiry Makeup is set, as shown in figure 5, the device includes: resolution unit 31, analytical unit 32, determination unit 33, execution unit 34.
Resolution unit 31 can be used for instructing inquiry request when the inquiry request for receiving business datum instructs and carrying out Parsing, obtains the corresponding query statement information of business datum;
Analytical unit 32 can be used for carrying out syntactic analysis to query statement information, obtain the crucial letter for meeting preset condition Breath;
Determination unit 33 can be used for determining the corresponding query path of business datum according to key message;
Execution unit 34 can be used for executing the inquiry operation of business datum according to query path.
In specific application scenarios, resolution unit 31 is particularly used in using Database Access Protocol, and identification inquiry is asked Seek the data segment carried in instruction;According to the data segment identified, corresponding SQL query statement is restored.
In specific application scenarios, analytical unit 32 is particularly used in and carries out abstract syntax tree point to SQL query statement Analysis, obtains the data source information and predicate information in SQL query statement;Data source information and predicate information are determined as meeting pre- If the key message of condition.
In specific application scenarios, determination unit 33 is particularly used in and segment to predicate information;It will participle As a result it is matched with predetermined keyword;Matched predetermined keyword if it exists, then according to corresponding with matched predetermined keyword Default routing rule, determine the corresponding query path of business datum, wherein each default routing rule has corresponding Query path;The position of database is then determined as the corresponding inquiry road of business datum by matched predetermined keyword if it does not exist Diameter.
In specific application scenarios, determination unit 33, if specifically can also be used to be determined according to matched predetermined keyword Inquiry request instruction character molding paste search condition, then be determined as the corresponding query path of business datum for the position of search engine.
In specific application scenarios, as shown in fig. 6, the present apparatus may also include that receiving unit 35 and updating unit 36;
Receiving unit 35 can be used for receiving the more new information of predetermined keyword and default routing rule;
Updating unit 36 can be used for according to more new information, to predetermined keyword and default road corresponding with predetermined keyword It is updated by rule.
In specific application scenarios, determination unit 33, if specifically can also be used to determine business number according to data source information According to there is backup in the buffer, then it will cache corresponding position and be determined as the corresponding query path of business datum.
In specific application scenarios, as shown in fig. 6, the present apparatus further include: encapsulation unit 37;
Encapsulation unit 37 needs if can be used for each business subdata that business datum includes according to different query path It is inquired, then by the query result of each business subdata, carries out unified data according to Database Access Protocol and encapsulate, obtain To the query result of business datum.
It should be noted that each functional unit involved by a kind of optimization device of business datum inquiry provided in this embodiment Other corresponding descriptions, can be described referring to figs. 1 to corresponding in Fig. 2, details are not described herein.
It is deposited thereon based on above-mentioned method as depicted in figs. 1 and 2 correspondingly, the present embodiment additionally provides a kind of storage medium Computer program is contained, which realizes the optimization method of above-mentioned business datum inquiry as shown in Figure 1 when being executed by processor. Specifically can based on Java language tool and Java 2 Platform Enterprise Edition (Java 2Platform Enterprise Edition, J2EE) technical system is realized.
Based on this understanding, the technical solution of the application can be embodied in the form of software products, which produces Product can store in a non-volatile memory medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions With so that computer equipment (can be personal computer, server or the network equipment an etc.) execution the application is each Method described in implement scene.
Based on above-mentioned method and Fig. 5 as depicted in figs. 1 and 2, virtual bench embodiment shown in fig. 6, in order to realize Above-mentioned purpose, the present embodiment additionally provide a kind of entity device of business datum query optimization, are specifically as follows personal computer, Smart phone, tablet computer, smartwatch, server or other network equipments etc., the entity device include storage medium and Processor;Storage medium, for storing computer program;Processor, realized for executing computer program it is above-mentioned such as Fig. 1 and The optimization method of business datum inquiry shown in Fig. 2.
Optionally, which can also include user interface, network interface, camera, radio frequency (Radio Frequency, RF) circuit, sensor, voicefrequency circuit, WI-FI module etc..User interface may include display screen (Display), input unit such as keyboard (Keyboard) etc., optional user interface can also connect including USB interface, card reader Mouthful etc..Network interface optionally may include standard wireline interface and wireless interface (such as WI-FI interface).
It will be understood by those skilled in the art that a kind of structure of the optimization equipment of business datum inquiry provided in this embodiment The restriction to the entity device is not constituted, may include more or fewer components, perhaps combines certain components or difference Component layout.
It can also include operating system, network communication module in storage medium.Operating system is the above-mentioned business datum of management The program of the entity device hardware and software resource of query optimization supports message handling program and other softwares and/or program Operation.Network communication module sets for realizing the communication between each component in storage medium inside, and with information processing entities It is communicated between other hardware and softwares in standby.
Through the above description of the embodiments, those skilled in the art can be understood that the application can borrow It helps software that the mode of necessary general hardware platform is added to realize, hardware realization can also be passed through.Pass through the skill of application the application Art scheme, it is not necessary to modify the code logics of original system, that is, the search efficiency of business datum can be improved, there is no improvement costs The problem of height, the period is uncontrollable, there may be risks.The technical level requirement for business development personnel is also reduced, can be done Business datum search efficiency is improved under to user's unaware, ensure that the transparent unaware of business.
It will be appreciated by those skilled in the art that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, module in attached drawing or Process is not necessarily implemented necessary to the application.It will be appreciated by those skilled in the art that the mould in device in implement scene Block can according to implement scene describe be distributed in the device of implement scene, can also carry out corresponding change be located at be different from In one or more devices of this implement scene.The module of above-mentioned implement scene can be merged into a module, can also be into one Step splits into multiple submodule.
Above-mentioned the application serial number is for illustration only, does not represent the superiority and inferiority of implement scene.Disclosed above is only the application Several specific implementation scenes, still, the application is not limited to this, and the changes that any person skilled in the art can think of is all The protection scope of the application should be fallen into.

Claims (10)

1. a kind of optimization method of business datum inquiry characterized by comprising
When the inquiry request for receiving business datum instructs, inquiry request instruction is parsed, the business is obtained The corresponding query statement information of data;
Syntactic analysis is carried out to the query statement information, obtains the key message for meeting preset condition;
The corresponding query path of the business datum is determined according to the key message;
The inquiry operation of the business datum is executed according to the query path.
2. being obtained described the method according to claim 1, wherein being parsed to inquiry request instruction The corresponding query statement information of business datum, specifically includes:
Using Database Access Protocol, the data segment carried in the inquiry request instruction is identified;
According to the data segment identified, corresponding SQL query statement is restored.
3. according to the method described in claim 2, it is characterized in that, carrying out syntactic analysis, acquisition to the query statement information The key message for meeting preset condition, specifically includes:
Abstract syntax tree analysis is carried out to the SQL query statement, obtains the data source information and meaning in the SQL query statement Word information;
It is determined as the data source information and the predicate information to meet the key message of the preset condition.
4. according to the method described in claim 3, it is characterized in that, determining that the business datum is corresponding according to the key message Query path, specifically include:
The predicate information is segmented;
Word segmentation result is matched with predetermined keyword;
Matched predetermined keyword if it exists, then according to default routing rule corresponding with the matched predetermined keyword, really Determine the corresponding query path of the business datum, wherein each default routing rule has corresponding query path;
The position of database is then determined as the corresponding inquiry road of the business datum by matched predetermined keyword if it does not exist Diameter.
5. according to the method described in claim 4, it is characterized in that, the basis is corresponding with the matched predetermined keyword Default routing rule, determines the corresponding query path of the business datum, specifically includes:
If determining the inquiry request instruction character molding paste search condition according to the matched predetermined keyword, search is drawn The position held up is determined as the corresponding query path of the business datum.
6. according to the method described in claim 4, it is characterized in that, the method also includes:
Receive the more new information of the predetermined keyword and the default routing rule;
According to the more new information, to the predetermined keyword and the default routing rule corresponding with the predetermined keyword It is updated.
7. according to the method described in claim 3, it is characterized in that, determining that the business datum is corresponding according to the key message Query path, specifically include:
It is if determining that the business datum has backup in the buffer according to the data source information, then the caching is corresponding Position is determined as the corresponding query path of the business datum.
8. a kind of optimization device of business datum inquiry characterized by comprising
Resolution unit, for being parsed to inquiry request instruction when the inquiry request for receiving business datum instructs, Obtain the corresponding query statement information of the business datum;
Analytical unit obtains the key message for meeting preset condition for carrying out syntactic analysis to the query statement information;
Determination unit, for determining the corresponding query path of the business datum according to the key message;
Execution unit, for executing the inquiry operation of the business datum according to the query path.
9. a kind of storage medium, is stored thereon with computer program, which is characterized in that realization when described program is executed by processor The optimization method of the inquiry of business datum described in any one of claims 1 to 7.
10. a kind of optimization equipment of business datum inquiry, including storage medium, processor and storage are on a storage medium and can be The computer program run on processor, which is characterized in that the processor realizes claim 1 to 7 when executing described program Any one of described in business datum inquiry optimization method.
CN201811474122.9A 2018-12-04 2018-12-04 Optimization method, device and the equipment of business datum inquiry Pending CN109766354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811474122.9A CN109766354A (en) 2018-12-04 2018-12-04 Optimization method, device and the equipment of business datum inquiry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811474122.9A CN109766354A (en) 2018-12-04 2018-12-04 Optimization method, device and the equipment of business datum inquiry

Publications (1)

Publication Number Publication Date
CN109766354A true CN109766354A (en) 2019-05-17

Family

ID=66451121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811474122.9A Pending CN109766354A (en) 2018-12-04 2018-12-04 Optimization method, device and the equipment of business datum inquiry

Country Status (1)

Country Link
CN (1) CN109766354A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765484A (en) * 2019-10-17 2020-02-07 中信银行股份有限公司 Credit investigation data processing method and electronic equipment
CN111046310A (en) * 2019-12-12 2020-04-21 北京奇艺世纪科技有限公司 Page processing method, device, server and computer readable storage medium
CN111078773A (en) * 2019-12-04 2020-04-28 北京奇艺世纪科技有限公司 Data processing method and device
CN111400338A (en) * 2020-03-04 2020-07-10 平安医疗健康管理股份有限公司 SQ L optimization method, device, storage medium and computer equipment
CN111598755A (en) * 2020-04-25 2020-08-28 济南市公安局 Public security organization convenient service system and application platform thereof
CN111639095A (en) * 2020-05-27 2020-09-08 中信银行股份有限公司 Data table query method, device and storage medium
CN111914155A (en) * 2020-08-06 2020-11-10 南京力通达电气技术有限公司 Query conversion system and method based on keyword matching
CN112287092A (en) * 2020-11-30 2021-01-29 珠海采筑电子商务有限公司 Intelligent elevator service query method and related products
CN112860713A (en) * 2021-04-23 2021-05-28 脉策(上海)智能科技有限公司 Method for acquiring layer data, electronic device and storage medium
CN113420051A (en) * 2021-06-30 2021-09-21 网易(杭州)网络有限公司 Data query method and device, electronic equipment and storage medium
CN113505303A (en) * 2021-07-28 2021-10-15 云账户技术(天津)有限公司 Contract information query method and device
CN116737522A (en) * 2023-06-21 2023-09-12 山东日照发电有限公司 System performance optimization method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6801904B2 (en) * 2001-10-19 2004-10-05 Microsoft Corporation System for keyword based searching over relational databases
CN103403707A (en) * 2010-12-28 2013-11-20 思杰系统有限公司 Systems and methods for database proxy request switching
CN104572638A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Data reading and writing method and device
CN106202451A (en) * 2016-07-11 2016-12-07 浙江大华技术股份有限公司 A kind of data query method and device
CN106294468A (en) * 2015-06-02 2017-01-04 阿里巴巴集团控股有限公司 The method and apparatus processing business datum
CN106649630A (en) * 2016-12-07 2017-05-10 乐视控股(北京)有限公司 Data query method and device
CN108009236A (en) * 2017-11-29 2018-05-08 北京锐安科技有限公司 A kind of big data querying method, system, computer and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6801904B2 (en) * 2001-10-19 2004-10-05 Microsoft Corporation System for keyword based searching over relational databases
CN103403707A (en) * 2010-12-28 2013-11-20 思杰系统有限公司 Systems and methods for database proxy request switching
CN104572638A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Data reading and writing method and device
CN106294468A (en) * 2015-06-02 2017-01-04 阿里巴巴集团控股有限公司 The method and apparatus processing business datum
CN106202451A (en) * 2016-07-11 2016-12-07 浙江大华技术股份有限公司 A kind of data query method and device
CN106649630A (en) * 2016-12-07 2017-05-10 乐视控股(北京)有限公司 Data query method and device
CN108009236A (en) * 2017-11-29 2018-05-08 北京锐安科技有限公司 A kind of big data querying method, system, computer and storage medium

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765484B (en) * 2019-10-17 2024-02-02 中信银行股份有限公司 Credit data processing method and electronic equipment
CN110765484A (en) * 2019-10-17 2020-02-07 中信银行股份有限公司 Credit investigation data processing method and electronic equipment
CN111078773A (en) * 2019-12-04 2020-04-28 北京奇艺世纪科技有限公司 Data processing method and device
CN111078773B (en) * 2019-12-04 2023-09-05 北京奇艺世纪科技有限公司 Data processing method and device
CN111046310A (en) * 2019-12-12 2020-04-21 北京奇艺世纪科技有限公司 Page processing method, device, server and computer readable storage medium
CN111046310B (en) * 2019-12-12 2024-03-19 北京奇艺世纪科技有限公司 Page processing method, device, server and computer readable storage medium
CN111400338B (en) * 2020-03-04 2022-11-22 深圳平安医疗健康科技服务有限公司 SQL optimization method, device, storage medium and computer equipment
CN111400338A (en) * 2020-03-04 2020-07-10 平安医疗健康管理股份有限公司 SQ L optimization method, device, storage medium and computer equipment
CN111598755A (en) * 2020-04-25 2020-08-28 济南市公安局 Public security organization convenient service system and application platform thereof
CN111639095B (en) * 2020-05-27 2023-03-31 中信银行股份有限公司 Data table query method, device and storage medium
CN111639095A (en) * 2020-05-27 2020-09-08 中信银行股份有限公司 Data table query method, device and storage medium
CN111914155A (en) * 2020-08-06 2020-11-10 南京力通达电气技术有限公司 Query conversion system and method based on keyword matching
CN112287092A (en) * 2020-11-30 2021-01-29 珠海采筑电子商务有限公司 Intelligent elevator service query method and related products
CN112860713A (en) * 2021-04-23 2021-05-28 脉策(上海)智能科技有限公司 Method for acquiring layer data, electronic device and storage medium
CN113420051A (en) * 2021-06-30 2021-09-21 网易(杭州)网络有限公司 Data query method and device, electronic equipment and storage medium
CN113420051B (en) * 2021-06-30 2023-08-29 网易(杭州)网络有限公司 Data query method and device, electronic equipment and storage medium
CN113505303A (en) * 2021-07-28 2021-10-15 云账户技术(天津)有限公司 Contract information query method and device
CN116737522A (en) * 2023-06-21 2023-09-12 山东日照发电有限公司 System performance optimization method

Similar Documents

Publication Publication Date Title
CN109766354A (en) Optimization method, device and the equipment of business datum inquiry
US11068439B2 (en) Unsupervised method for enriching RDF data sources from denormalized data
CN102253936B (en) Method for recording access of user to merchandise information, search method and server
US8316007B2 (en) Automatically finding acronyms and synonyms in a corpus
CN100550019C (en) OODB Object Oriented Data Base access method and system
US8335779B2 (en) Method and apparatus for gathering, categorizing and parameterizing data
US20030236780A1 (en) Method and system for implementing dynamic cache of database cursors
CN105988996B (en) Index file generation method and device
US11068512B2 (en) Data virtualization using leveraged semantic knowledge in a knowledge graph
KR101083563B1 (en) Method and System for Managing Database
CN102819592B (en) Lucene-based desktop searching system and method
CN105224554A (en) Search word is recommended to carry out method, system, server and the intelligent terminal searched for
US11449477B2 (en) Systems and methods for context-independent database search paths
CN109947770A (en) A kind of data base query method, terminal device and storage medium
CN109840254A (en) A kind of data virtualization and querying method, device
CN114356971A (en) Data processing method, device and system
CN111259067A (en) Method, device and equipment for realizing DAO interface based on Spring
CN106202254A (en) A kind of querying method and data query system
CN107315833A (en) Method and apparatus of the retrieval with downloading based on application program
CN112970011A (en) Recording pedigrees in query optimization
CN105354189A (en) Method and system for searching for software applicationst
CN108959294B (en) Method and device for accessing search engine
US8200673B2 (en) System and method for on-demand indexing
US20160179857A1 (en) Database joins using uncertain criteria
US20080082516A1 (en) System for and method of searching distributed data base, and information management device

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