CN108108439A - A kind of data query method, apparatus and electronic equipment - Google Patents

A kind of data query method, apparatus and electronic equipment Download PDF

Info

Publication number
CN108108439A
CN108108439A CN201711394753.5A CN201711394753A CN108108439A CN 108108439 A CN108108439 A CN 108108439A CN 201711394753 A CN201711394753 A CN 201711394753A CN 108108439 A CN108108439 A CN 108108439A
Authority
CN
China
Prior art keywords
data
query
data source
sent
result
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
CN201711394753.5A
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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201711394753.5A priority Critical patent/CN108108439A/en
Publication of CN108108439A publication Critical patent/CN108108439A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation

Abstract

An embodiment of the present invention provides a kind of data query method, apparatus and electronic equipment, wherein, this method includes:The data inquiry request that user terminal is sent is obtained, wherein, data query parameter, data query type and data source information are carried in data inquiry request, data query type is corresponding with data source information;According to the first default transformation rule, it is query execution parameter corresponding with data query type by data query Parameter Switch, and query execution parameter is sent to data source corresponding with data source information;The query result corresponding with query execution parameter of data source feedback is obtained, and query result is sent to the user terminal.By a kind of data query method, apparatus provided in an embodiment of the present invention and electronic equipment, it can realize and avoid writing different data resource interfaces for different data sources, reduce the workload of business personnel.

Description

A kind of data query method, apparatus and electronic equipment
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of data query method, apparatus and electronic equipment.
Background technology
With cloud computing, the development of big data technology, being stored in cloud computing, big data technology for data occupies important position It puts.When being stored to data, various data storage methods also emerge in an endless stream, for example, RDBMS (Relational Database Management System, relational database management system), Hive (Tool for Data Warehouse), all kinds of OLAP (Online Analytical Processing, on-line analytical processing) solution and all kinds of NOSQL (Not Only SQL, non-relational database).Since in cloud computing system or big data system, complicated data can not pass through single number It is stored according to storage mode, generally requires multiple and different databases and stored.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:
When storing data in multiple and different databases, generally require to write for multiple and different databases different Then database interface can just be stored data in different databases or inquired about from different databases to be checked The data of inquiry.And different database interfaces is write for multiple and different databases, the work of business personnel will certainly be increased Amount.
The content of the invention
The embodiment of the present invention is designed to provide a kind of data query method, apparatus and electronic equipment, is avoided with realizing Different data resource interfaces is write for different data sources, reduces the workload of business personnel.Specific technical solution is as follows:
In the one side that the present invention is implemented, an embodiment of the present invention provides a kind of data query method, this method includes:
Obtain user terminal send data inquiry request, wherein, carried in data inquiry request data query parameter, Data query type and data source information, data query type are corresponding with data source information;
It is query execution corresponding with data query type by data query Parameter Switch according to the first default transformation rule Parameter, and query execution parameter is sent to data source corresponding with data source information;
The query result corresponding with query execution parameter of data source feedback is obtained, and query result is sent to user's end End.
Optionally, authentication information is also carried in data inquiry request, wherein, authentication information includes username and password; Before query execution parameter is sent to data source corresponding with data source information, a kind of data query of the embodiment of the present invention Method further includes:
Authentication information is sent to data source corresponding with data source information, and the certification for receiving data source feedback passes through letter Breath.
Optionally, authentication information is also carried in data inquiry request, wherein, authentication information includes username and password;
Query execution parameter is sent to data source corresponding with data source information, including:
The query execution parameter for carrying authentication information is sent, until data source corresponding with data source information.
Optionally, the query result corresponding with query execution parameter of data source feedback is obtained, and query result is sent To user terminal, including:
Obtain the query result corresponding with query execution parameter of data source feedback;
According to the second default transformation rule, query result is converted to and is tied with the second corresponding feed back of default transformation rule Fruit, and feedback result is sent to the user terminal.
Optionally, polymerizing condition is also carried in data inquiry request, according to the second default transformation rule, inquiry is tied After fruit is converted to feedback result corresponding with the second default transformation rule, a kind of data query method of the embodiment of the present invention, It further includes:
Feedback result is polymerize according to polymerizing condition, the feedback result after being polymerize;
Correspondingly, feedback result is sent to the user terminal, including:
Feedback result after polymerization is sent to the user terminal.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of data query arrangement, the device bag It includes:
Acquisition module, for obtaining the data inquiry request of user terminal transmission, wherein, it is carried in data inquiry request Data query parameter, data query type and data source information, data query type are corresponding with data source information;
Modular converter, for according to the first default transformation rule, being and data query type by data query Parameter Switch Corresponding query execution parameter, and query execution parameter is sent to data source corresponding with data source information;
Sending module for obtaining the query result corresponding with query execution parameter of data source feedback, and inquiry is tied Fruit is sent to the user terminal.
Optionally, authentication information is also carried in data inquiry request, wherein, authentication information includes username and password;
A kind of data query arrangement of the embodiment of the present invention, further includes:
Authentication module for sending authentication information to data source corresponding with data source information, and receives data source feedback Certification pass through information.
Optionally, authentication information is also carried in data inquiry request, wherein, authentication information includes username and password;
Modular converter is specifically used for:
The query execution parameter for carrying authentication information is sent, until data source corresponding with data source information.
Optionally, sending module, including:
Acquisition submodule, for obtaining the query result corresponding with query execution parameter of data source feedback;
Transform subblock, for according to the second default transformation rule, query result to be converted to and the second default conversion rule Then corresponding feedback result, and feedback result is sent to the user terminal.
Optionally, polymerizing condition is also carried in data inquiry request, sending module further includes:
It polymerize submodule, for polymerizeing according to polymerizing condition to feedback result, the feedback result after being polymerize;
Correspondingly, transform subblock, is specifically used for:Feedback result after polymerization is sent to the user terminal.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of electronic equipment, including processor, leads to Believe interface, memory and communication bus, wherein, processor, communication interface, memory is completed mutual logical by communication bus Letter;
Memory, for storing computer program;
Processor during for performing the program stored on memory, realizes a kind of any of the above-described data query Method.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable Instruction is stored in storage medium, when run on a computer so that computer performs a kind of any of the above-described number According to querying method.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction Product, when run on a computer so that computer performs a kind of any of the above-described data query method.
A kind of data query method, apparatus provided in an embodiment of the present invention and electronic equipment can get user's end After holding the data inquiry request sent, according to the first default transformation rule, data query parameter is converted, is converted to and number According to the corresponding query execution parameter of query type, query execution parameter is then sent to data corresponding with data source information The query result after the query result of data source feedback is got, can be sent to the user terminal by source, and realization avoids being directed to Different data sources writes different data resource interfaces, reduces the workload of business personnel.Certainly, any production of the present invention is implemented Product or method must be not necessarily required to reach all the above advantage simultaneously.
Description of the drawings
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described.
Fig. 1 is that a kind of data query method of the embodiment of the present invention is applied to the structure diagram in data query system;
Fig. 2 is a kind of flow chart of the first realization method of data query method of the embodiment of the present invention;
Fig. 3 is a kind of flow chart of second of realization method of data query method of the embodiment of the present invention;
Fig. 4 is a kind of structure diagram of data query arrangement of the embodiment of the present invention;
Fig. 5 is the structure diagram of a kind of electronic equipment of the embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is described.
It is existing in the prior art in order to solve the problems, such as, an embodiment of the present invention provides a kind of data query method, apparatus and Electronic equipment avoids writing different data resource interfaces for different data sources, reduces the workload of business personnel to realize.
First, a kind of application scenarios of data query method of the embodiment of the present invention are introduced, as shown in Figure 1, being A kind of data query method of the embodiment of the present invention is applied to the structure diagram in data query system, which can wrap It includes:User terminal 101, data query arrangement 102, the first data source 103, the second data source 104, the 3rd data source the 105, the 4th Data source 106, the 5th data source 107, above-mentioned data query arrangement 102 can be a kind of data using the embodiment of the present invention The device of querying method.
In above-mentioned data query system, user can send data inquiry request in user terminal 101, until application is originally A kind of data query arrangement 102 of data query method of inventive embodiments, the data query arrangement 102 are getting the data After inquiry request, can inquiry corresponding with the inquiry request be obtained by a kind of data query method of the embodiment of the present invention Parameter is performed, the query execution parameter is then sent to data source corresponding with data source information again, it is assumed that this and data source The corresponding data source of information is the 3rd data source 105, then above-mentioned data query arrangement 102 can send query execution parameter extremely 3rd data source 105.
When the 3rd data source 105 is after local search is to query result corresponding with query execution parameter, this can be looked into It askes result and is sent to above-mentioned data query arrangement 102, therefore, above-mentioned data query arrangement 102 can be received and inquired about The corresponding query result of parameter is performed, then the data query result can be sent to the user terminal 101, so that user looks into It sees.By applying a kind of data query method provided in an embodiment of the present invention, it can realize and avoid compiling for different data sources Different data resource interfaces is write, reduces the workload of business personnel.
In the following, a kind of data query method of the embodiment of the present invention is introduced, as shown in Fig. 2, implementing for the present invention A kind of flow chart of the first realization method of data query method of example, this method can include:
S201 obtains the data inquiry request that user terminal is sent.
Wherein, data query parameter, data query type and data source information, data are carried in data inquiry request Query type is corresponding with data source information.
It, can be by user terminal to using the one of the embodiment of the present invention when user wishes to inquire about data in data source The data query arrangement of kind data query method sends inquiry request, therefore, using a kind of data query of the embodiment of the present invention The data query arrangement of method can receive the data inquiry request of user terminal transmission.
The data query parameter is used to inquire about data in data source.For example, the data query parameter can include:Inquiry Field, filter condition and polymerizing condition etc..
In some instances, when only having a tables of data in database, above-mentioned data source can be the database, when When having multiple tables of data in the database, above-mentioned data source can be at least tables of data in the database.
In some instances, when the data of user's inquiry are in multiple databases, which can also be multiple numbers According to storehouse.
In some instances, each database can have different types, for example, MySQL is relevant database, and Redis is non-relational database.Therefore, when storing data, above-mentioned two databases can store different types of number According to.Correspondingly, in inquiry, each database can have corresponding query type.
In some instances, above-mentioned data inquiry request can be that the inquiry write according to preset data query specification please It asks.For example, the data inquiry request can use JSON (JavaScript Object Notation, JS object tag) language The inquiry request that speech form is write.In this way, above-mentioned data query arrangement can be allowd to reduce identification different data inquiry The time of request so as to reduce the time overhead of data query, improves search efficiency.
According to the first default transformation rule, data query Parameter Switch is looked into be corresponding with data query type by S202 It askes and performs parameter, and query execution parameter is sent to data source corresponding with data source information.
Wherein, which can be pre-set transformation rule, can be by different data queries Parameter Switch is different query execution parameter, can also join a kind of data query Parameter Switch for different query executions Number.
Specifically, in above-mentioned data query arrangement when being converted, can first obtain in the data inquiry request Data source information, may thereby determine that the tables of data in the database or database of inquiry.It is then possible to it is looked into according to data Type and the correspondence of data source information and the type of database are ask, determines data query type.
Can be that data query type is corresponding looks into this by data query Parameter Switch after definite data query type It askes and performs parameter.
For example, the data query type in the data inquiry request that user terminal is sent is MySQL, data query parameter For:{select:[" type ", " count (*) "], filter:" date=' 2017-10-3 ' ", groupBy:" type " }, i.e. In database MySQL, on October 23rd, 2017 is counted, the number that the data of " type " type occur, wherein, " type " is looks into Ask field or polymerizing condition, i.e. instruction MySQL database after poll-final, to the query result of itself according to " type " is polymerize." date=' 2017-10-3 ' " is filter condition.
The data query Parameter Switch can be and MySQL by the first default transformation rule by the embodiment of the present invention Database is corresponding, the query execution parameter that can be identified by MySQL database, and transformed query execution parameter is: Select type, count (*) from table where date=" 2017-10-23 ", group by type.
In some instances, it is being query execution parameter corresponding with data query type by data query Parameter Switch Afterwards, which can be sent to data source corresponding with data source information.
It for example, can be by above-mentioned query execution parameter:" Select type, count (*) from table Wheredate=" 2017-10-23 ", group by type ", are sent in MySQL database.
For example, it is assumed that the 3rd data source 105 is MySQL database, then above-mentioned data query arrangement can send this and look into It askes and performs parameter into the 3rd data source 105.
By being query execution parameter by data query Parameter Switch, can be compiled to avoid user for different data sources Different data-query interfaces are write, and it is possible to avoid calling the process of the different data query interface of different data sources, so as to The time overhead during data query can be reduced, improves efficiency data query.
S203, obtains the query result corresponding with query execution parameter of data source feedback, and query result is sent to User terminal.
In some instances, when data source corresponding with data source information, one kind using the embodiment of the present invention is received It, can be according to each parameter in query execution parameter after the query execution parameter that the data query arrangement of data query method is sent It is inquired about, for example, inquired about according to " type " inquiry field in query execution parameter, it can also be according to filter condition " date=' 2017-10-23 ' " is filtered inquiry, can only inquiry meet filter condition " type " inquiry field it is corresponding Data after poll-final, can also polymerize query result according to polymerizing condition " type ".
After the data source query, query result can be fed back to above-mentioned data query arrangement, therefore, the number The query result of data source transmission can be received according to inquiry unit, above-mentioned inquiry unit is receiving the query result Afterwards, can the query result be directly sent to user terminal, is checked for the user of user terminal.
A kind of data query method provided in an embodiment of the present invention can get the data query of user terminal transmission After request, according to the first default transformation rule, data query parameter is converted, is converted to corresponding with data query type Then query execution parameter is sent to data source corresponding with data source information, is getting data source by query execution parameter After the query result of feedback, which can be sent to the user terminal, realization avoids writing for different data sources Different data resource interfaces reduces the workload of business personnel.
It is each in order to ensure the safety of data in data source in a kind of possible realization method of the embodiment of the present invention Data source can verify query execution parameter.For this purpose, in a kind of data query method of the application embodiment of the present invention, on Authentication information can also be carried in the data inquiry request stated, which can include username and password.
In some instances, java database link addresses etc. can also be included in the authentication information.
When carrying authentication information in above-mentioned data inquiry request, a kind of data query side of the embodiment of the present invention Method before query execution parameter is sent to data source corresponding with data source information, can also carry out following steps:
Authentication information is sent to data source corresponding with data source information, and the certification for receiving data source feedback passes through letter Breath.
Specifically, when a kind of data query arrangement of data query method using the embodiment of the present invention, this is being got After authentication information, transformation rule can be being preset according to first, be corresponding with data query type by data query Parameter Switch Query execution parameter after, which is sent to data source corresponding with data source information.
In some instances, above-mentioned data query arrangement can send this immediately and recognize after the authentication information is got Information is demonstrate,proved to data source corresponding with data source information, then according still further to the first default transformation rule, data query parameter is turned It is changed to query execution parameter corresponding with data query type.
PP173420
In some instances, when above-mentioned data query arrangement sends the authentication information to data source corresponding with data source Afterwards, which can verify the username and password in the authentication information.When also carrying java data in the authentication information Storehouse link address, above-mentioned data source can also verify the java database link addresses.When above-mentioned data source pair After the authentication information is verified, certification can be fed back by information to above-mentioned data query arrangement, therefore, above-mentioned data The certification that inquiry unit can receive above-mentioned data source feedback passes through information.
In some instances, when the certification that above-mentioned data query arrangement receives above-mentioned data source feedback passes through information Afterwards, query execution parameter can be sent to data source corresponding with data source information, so that the data source is according to query execution Parameter carries out data query.
By this step, when can to carry authentication information in data inquiry request, can just inquire and data The corresponding query result of query argument, so as to ensure the safety of data in data source.
In a kind of possible realization method of the embodiment of the present invention, when carrying authentication information in the data inquiry request When, a kind of data query method of the embodiment of the present invention, can query execution parameter is sent to it is corresponding with data source information Data source when, send and carry the query execution parameter of authentication information, until data source corresponding with data source information.
Specifically, when carrying authentication information in the data inquiry request, using a kind of data of the embodiment of the present invention The data query arrangement of querying method can obtain the authentication information carried in the data inquiry request, then default according to first Transformation rule joins the data query Parameter Switch in the data inquiry request for query execution corresponding with data query type Number, then the authentication information is added in query execution parameter, finally, the query execution parameter for carrying the authentication information is sent out It send to data source corresponding with data source information, wherein, which can include username and password.
In some instances, when above-mentioned data query arrangement get data source feedback with query execution parameter pair After the query result answered, in order to enable the query result is being sent to user terminal, when being checked for user, meet checking for user It is accustomed to or in order to reduce complexity during a kind of data query method for applying the embodiment of the present invention, the embodiment of the present invention is also A kind of possible realization method is provided, as shown in figure 3, second for a kind of data query method of the embodiment of the present invention is real The flow chart of mode is applied, this method can include:
S2031 obtains the query result corresponding with query execution parameter of data source feedback.
S2032 according to the second default transformation rule, query result is converted to corresponding anti-with the second default transformation rule Feedback result as a result, and be sent to the user terminal by feedback.
Specifically, when above-mentioned data query arrangement is getting the looking into corresponding with query execution parameter of data source feedback After asking result, the query result can be converted first, in accordance with the second default transformation rule.
In some instances, which can be that the conversion opposite with the first default transformation rule is advised Then, for example, the second default transformation rule, the query result that multiple and different data sources are fed back can be converted to, sent out with user The corresponding feedback result of programming language of the data inquiry request sent.It can be so sent to the user terminal by the feedback result When, more meet the user experience checked custom, user can be promoted of user.
The query result that multiple and different data sources are fed back can also be converted to same feedback result, which can To be the feedback result using JSON language formats, it can so be conducive to manage, reduce one kind using the embodiment of the present invention Complexity during data query method.
After query result to be converted to feedback result corresponding with the second default transformation rule, above-mentioned data query dress The feedback result can be sent to the user terminal by putting, so that user checks.
In some instances, above-mentioned data inquiry request can also carry polymerizing condition, which can use Query result is polymerize in instruction data source corresponding with data source information, also can indicate that using the embodiment of the present invention A kind of data query arrangement of data query method, to different data sources feedback query result or to transformed feedback As a result it is polymerize.
In a kind of possible realization method of the embodiment of the present invention, inquiry knot that above-mentioned data query arrangement receives Fruit may be from multiple and different data sources, when above-mentioned data query arrangement is directly looked into what the how different data source was fed back It asking result to be sent to the user terminal, when checking for user, may and not meet user checks custom, it has not been convenient to user checks, For this purpose, when also carrying polymerizing condition in data inquiry request, a kind of data query method of the embodiment of the present invention, according to Second default transformation rule, can be with after query result is converted to feedback result corresponding with the second default transformation rule Including:
Feedback result is polymerize according to polymerizing condition, the feedback result after being polymerize.
Specifically, when above-mentioned data query arrangement is converting query result according to the second default transformation rule, After obtaining feedback result, transformed feedback result can be gathered according to the polymerizing condition carried in data inquiry request It closes, after being polymerize, the feedback result after being polymerize.
It, can will be by above-mentioned when feedback result is sent to the user terminal correspondingly, above-mentioned data query arrangement Feedback result after the polymerization obtained after step polymerization is sent to the user terminal.
By this step, the query result that different data sources are fed back can be polymerize, then by the feedback after polymerization As a result be sent to the user terminal so that the feedback result more meet user check custom, facilitate user check or The query result that different data sources are fed back polymerize by person, and return to user terminal is the feedback result of same form, So as to reduce a kind of complexity for the data query method for applying the embodiment of the present invention.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of data query arrangement, as shown in figure 4, For a kind of structure diagram of data query arrangement of the embodiment of the present invention, which can include:
Acquisition module 401, for obtaining the data inquiry request of user terminal transmission, wherein, it is taken in data inquiry request With data query parameter, data query type and data source information, data query type is corresponding with data source information;
Modular converter 402, for according to the first default transformation rule, being and data query class by data query Parameter Switch The corresponding query execution parameter of type, and query execution parameter is sent to data source corresponding with data source information;
Sending module 403, for obtaining the query result corresponding with query execution parameter of data source feedback, and will inquiry As a result it is sent to the user terminal.
A kind of data query arrangement provided in an embodiment of the present invention can get the data query of user terminal transmission After request, according to the first default transformation rule, data query parameter is converted, is converted to corresponding with data query type Then query execution parameter is sent to data source corresponding with data source information, is getting data source by query execution parameter After the query result of feedback, which can be sent to the user terminal, realization avoids writing for different data sources Different data resource interfaces reduces the workload of business personnel.
Specifically, authentication information is also carried in data inquiry request, wherein, authentication information includes username and password;
A kind of data query arrangement of the embodiment of the present invention, can also include:
Authentication module for sending authentication information to data source corresponding with data source information, and receives data source feedback Certification pass through information.
Specifically, modular converter 402, is specifically used for:
The query execution parameter for carrying authentication information is sent, until data source corresponding with data source information.
Specifically, sending module 403, including:
Acquisition submodule, for obtaining the query result corresponding with query execution parameter of data source feedback;
Transform subblock, for according to the second default transformation rule, query result to be converted to and the second default conversion rule Then corresponding feedback result, and feedback result is sent to the user terminal.
Specifically, also carrying polymerizing condition in data inquiry request, sending module 403 further includes:
It polymerize submodule, for polymerizeing according to polymerizing condition to feedback result, the feedback result after being polymerize;
Correspondingly, transform subblock, is specifically used for:Feedback result after polymerization is sent to the user terminal.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in figure 5, being set for a kind of electronics of the embodiment of the present invention Standby structure diagram, the electronic equipment can include processor 501, communication interface 502, memory 503 and communication bus 504, wherein, processor 501, communication interface 502, memory 503 completes mutual communication by communication bus 504,
Memory 503, for storing computer program;
Processor 501 during for performing the program stored on memory 503, realizes following steps:
The data inquiry request that user terminal is sent is obtained, data query parameter, data are carried in data inquiry request Query type and data source information, wherein, data query type is corresponding with data source information;
It is query execution corresponding with data query type by data query Parameter Switch according to the first default transformation rule Parameter, and query execution parameter is sent to data source corresponding with data source information;
The query result corresponding with query execution parameter of data source feedback is obtained, and query result is sent to user's end End.
A kind of electronic equipment of data query provided in an embodiment of the present invention can get the number of user terminal transmission After inquiry request, according to the first default transformation rule, data query parameter is converted, is converted to and data query type Then query execution parameter is sent to data source corresponding with data source information, got by corresponding query execution parameter After the query result of data source feedback, which can be sent to the user terminal, realization is avoided for different data Different data resource interfaces is write in source, reduces the workload of business personnel.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (PeripheralComponent Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended IndustryStandard Architecture, abbreviation EISA) bus etc..The communication bus can be divided into address bus, data/address bus, controlling bus etc.. For ease of representing, only represented in figure with a thick line, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory can include random access memory (Random Access Memory, abbreviation RAM), can also include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory may be used also To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), application-specific integrated circuit (ApplicationSpecific Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array, Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer so that computer performs any institute in above-described embodiment A kind of data query method stated.
A kind of computer readable storage medium provided in an embodiment of the present invention can get the number of user terminal transmission After inquiry request, according to the first default transformation rule, data query parameter is converted, is converted to and data query type Then query execution parameter is sent to data source corresponding with data source information, got by corresponding query execution parameter After the query result of data source feedback, which can be sent to the user terminal, realization is avoided for different data Different data resource interfaces is write in source, reduces the workload of business personnel.
In another embodiment provided by the invention, a kind of computer program product for including instruction is additionally provided, when it When running on computers so that computer performs any a kind of data query method in above-described embodiment.
A kind of computer program product for including instruction provided in an embodiment of the present invention can get user terminal hair After the data inquiry request sent, according to the first default transformation rule, data query parameter is converted, is converted to and is looked into data The corresponding query execution parameter of type is ask, query execution parameter is then sent to data source corresponding with data source information, After the query result for getting data source feedback, which can be sent to the user terminal, realization is avoided for difference Data source write different data resource interfaces, reduce the workload of business personnel.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its any combination real It is existing.When implemented in software, can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and performing the computer program instructions, all or It partly generates according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium In or from a computer readable storage medium to another computer readable storage medium transmit, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is the data storage devices such as server, the data center integrated comprising one or more usable mediums.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk Solid State Disk (SSD)) etc..
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodiment Point just to refer each other, and the highlights of each of the examples are difference from other examples.It is real especially for system For applying example, since it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modifications, equivalent replacements and improvements are made within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (11)

  1. A kind of 1. data query method, which is characterized in that the described method includes:
    Obtain user terminal send data inquiry request, wherein, carried in the data inquiry request data query parameter, Data query type and data source information, the data query type are corresponding with the data source information;
    It is inquiry corresponding with the data query type by the data query Parameter Switch according to the first default transformation rule Parameter is performed, and the query execution parameter is sent to data source corresponding with the data source information;
    The query result corresponding with the query execution parameter of the data source feedback is obtained, and the query result is sent To the user terminal.
  2. 2. according to the method described in claim 1, it is characterized in that, also carry authentication information in the data inquiry request, Wherein, the authentication information includes username and password;
    It is described the query execution parameter is sent to data source corresponding with the data source information before, the method is also Including:
    The authentication information is sent to data source corresponding with the data source information, and receives the certification of the data source feedback Pass through information.
  3. 3. according to the method described in claim 1, it is characterized in that, also carry authentication information in the data inquiry request, Wherein, the authentication information includes username and password;
    It is described that the query execution parameter is sent to data source corresponding with the data source information, including:
    The query execution parameter for carrying the authentication information is sent, until data source corresponding with the data source information.
  4. 4. according to the method described in claim 1, it is characterized in that, described obtain being held with the inquiry for the data source feedback The corresponding query result of row parameter, and the query result is sent to the user terminal, including:
    Obtain the query result corresponding with the query execution parameter of the data source feedback;
    According to the second default transformation rule, the query result is converted into feedback corresponding with the described second default transformation rule As a result, and the feedback result is sent to the user terminal.
  5. 5. according to the method described in claim 4, it is characterized in that, also carry polymerizing condition in the data inquiry request, Described according to the second default transformation rule, the query result is converted to corresponding anti-with the described second default transformation rule After presenting result, the method further includes:
    The feedback result is polymerize according to the polymerizing condition, the feedback result after being polymerize;
    Correspondingly, the feedback result is sent to the user terminal, including:
    Feedback result after the polymerization is sent to the user terminal.
  6. 6. a kind of data query arrangement, which is characterized in that described device includes:
    Acquisition module, for obtaining the data inquiry request of user terminal transmission, wherein, it is carried in the data inquiry request Data query parameter, data query type and data source information, the data query type are corresponding with the data source information;
    Modular converter, for according to the first default transformation rule, being and the data query by the data query Parameter Switch The corresponding query execution parameter of type, and the query execution parameter is sent to data corresponding with the data source information Source;
    Sending module, for obtaining the query result corresponding with the query execution parameter of data source feedback, and by institute It states query result and is sent to the user terminal.
  7. 7. device according to claim 6, which is characterized in that authentication information is also carried in the data inquiry request, Wherein, the authentication information includes username and password;
    Described device further includes:
    Authentication module for sending the authentication information to data source corresponding with the data source information, and receives the number The certification fed back according to source passes through information.
  8. 8. device according to claim 6, which is characterized in that authentication information is also carried in the data inquiry request, Wherein, the authentication information includes username and password;
    The modular converter, is specifically used for:
    The query execution parameter for carrying the authentication information is sent, until data source corresponding with the data source information.
  9. 9. device according to claim 6, which is characterized in that the sending module, including:
    Acquisition submodule, for obtaining the query result corresponding with the query execution parameter of the data source feedback;
    Transform subblock, for according to the second default transformation rule, the query result to be converted to and described second default turn The corresponding feedback result of rule is changed, and the feedback result is sent to the user terminal.
  10. 10. device according to claim 9, which is characterized in that polymerizing condition is also carried in the data inquiry request, The sending module further includes:
    It polymerize submodule, for polymerizeing according to the polymerizing condition to the feedback result, the feedback knot after being polymerize Fruit;
    Correspondingly, the transform subblock, is specifically used for:
    Feedback result after the polymerization is sent to the user terminal.
  11. 11. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein, processing Device, communication interface, memory complete mutual communication by communication bus;
    Memory, for storing computer program;
    Processor during for performing the program stored on memory, realizes any method and steps of claim 1-5.
CN201711394753.5A 2017-12-21 2017-12-21 A kind of data query method, apparatus and electronic equipment Pending CN108108439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711394753.5A CN108108439A (en) 2017-12-21 2017-12-21 A kind of data query method, apparatus and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711394753.5A CN108108439A (en) 2017-12-21 2017-12-21 A kind of data query method, apparatus and electronic equipment

Publications (1)

Publication Number Publication Date
CN108108439A true CN108108439A (en) 2018-06-01

Family

ID=62210751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711394753.5A Pending CN108108439A (en) 2017-12-21 2017-12-21 A kind of data query method, apparatus and electronic equipment

Country Status (1)

Country Link
CN (1) CN108108439A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101346A (en) * 2018-07-12 2018-12-28 北京猫眼文化传媒有限公司 A kind of data service providing method and device
CN109522521A (en) * 2018-11-16 2019-03-26 北京中创碳投科技有限公司 A kind of data processing method, device and computer equipment
CN109656989A (en) * 2018-10-29 2019-04-19 平安科技(深圳)有限公司 Multi-data source integration method, device, computer equipment and storage medium
CN109992596A (en) * 2019-02-25 2019-07-09 新智云数据服务有限公司 Data processing method and device
CN110297955A (en) * 2019-06-20 2019-10-01 阿里巴巴集团控股有限公司 A kind of information query method, device, equipment and medium
CN110417857A (en) * 2019-06-19 2019-11-05 北京百度网讯科技有限公司 Block chain protocol processes device, processing method and block chain
CN110489440A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 Data query method and apparatus
CN110825729A (en) * 2018-08-14 2020-02-21 珠海格力电器股份有限公司 Data query method and device, storage medium and electronic device
CN111090803A (en) * 2019-11-22 2020-05-01 贝壳技术有限公司 Data processing method and device, electronic equipment and storage medium
CN111125156A (en) * 2019-12-17 2020-05-08 网银在线(北京)科技有限公司 Data query method and device and electronic equipment
CN111459991A (en) * 2020-04-15 2020-07-28 中国银行股份有限公司 Information query method and device
CN112487275A (en) * 2020-12-11 2021-03-12 杭州安恒信息技术股份有限公司 Data retrieval method, system, equipment and readable storage medium
CN112835573A (en) * 2021-01-27 2021-05-25 北京奇艺世纪科技有限公司 Data query method and device, electronic equipment and storage medium
CN112966031A (en) * 2019-12-12 2021-06-15 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN113064914A (en) * 2021-04-22 2021-07-02 中国工商银行股份有限公司 Data extraction method and device
CN115185999A (en) * 2022-09-13 2022-10-14 北京达佳互联信息技术有限公司 Data processing method and device
CN110489440B (en) * 2019-07-29 2024-04-12 腾讯科技(深圳)有限公司 Data query method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010021929A1 (en) * 2000-02-21 2001-09-13 International Business Machines Corporation User-oriented method and system for database query
CN1567301A (en) * 2003-06-23 2005-01-19 华为技术有限公司 Method and apparatus for accessing database
US20050066155A1 (en) * 2003-09-04 2005-03-24 Sun Microsystems, Inc. Utility for configuring and verifying data sources
CN106649630A (en) * 2016-12-07 2017-05-10 乐视控股(北京)有限公司 Data query method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010021929A1 (en) * 2000-02-21 2001-09-13 International Business Machines Corporation User-oriented method and system for database query
CN1567301A (en) * 2003-06-23 2005-01-19 华为技术有限公司 Method and apparatus for accessing database
US20050066155A1 (en) * 2003-09-04 2005-03-24 Sun Microsystems, Inc. Utility for configuring and verifying data sources
CN106649630A (en) * 2016-12-07 2017-05-10 乐视控股(北京)有限公司 Data query method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
唐友等: "《Java语言程序设计》", 31 July 2016, 哈尔滨工业大学出版社 *
章剑林等: "《电子商务网站建设与维护》", 28 February 2009, 中国经济出版社 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101346A (en) * 2018-07-12 2018-12-28 北京猫眼文化传媒有限公司 A kind of data service providing method and device
CN110825729A (en) * 2018-08-14 2020-02-21 珠海格力电器股份有限公司 Data query method and device, storage medium and electronic device
CN109656989A (en) * 2018-10-29 2019-04-19 平安科技(深圳)有限公司 Multi-data source integration method, device, computer equipment and storage medium
CN109522521A (en) * 2018-11-16 2019-03-26 北京中创碳投科技有限公司 A kind of data processing method, device and computer equipment
CN109992596A (en) * 2019-02-25 2019-07-09 新智云数据服务有限公司 Data processing method and device
CN110417857B (en) * 2019-06-19 2021-08-10 北京百度网讯科技有限公司 Block chain protocol processing device, processing method and block chain
CN110417857A (en) * 2019-06-19 2019-11-05 北京百度网讯科技有限公司 Block chain protocol processes device, processing method and block chain
CN110297955A (en) * 2019-06-20 2019-10-01 阿里巴巴集团控股有限公司 A kind of information query method, device, equipment and medium
CN110297955B (en) * 2019-06-20 2023-03-24 创新先进技术有限公司 Information query method, device, equipment and medium
CN110489440B (en) * 2019-07-29 2024-04-12 腾讯科技(深圳)有限公司 Data query method and device
CN110489440A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 Data query method and apparatus
CN111090803A (en) * 2019-11-22 2020-05-01 贝壳技术有限公司 Data processing method and device, electronic equipment and storage medium
CN112966031A (en) * 2019-12-12 2021-06-15 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111125156A (en) * 2019-12-17 2020-05-08 网银在线(北京)科技有限公司 Data query method and device and electronic equipment
CN111125156B (en) * 2019-12-17 2023-09-26 网银在线(北京)科技有限公司 Data query method and device and electronic equipment
CN111459991B (en) * 2020-04-15 2023-04-07 中国银行股份有限公司 Information query method and device
CN111459991A (en) * 2020-04-15 2020-07-28 中国银行股份有限公司 Information query method and device
CN112487275A (en) * 2020-12-11 2021-03-12 杭州安恒信息技术股份有限公司 Data retrieval method, system, equipment and readable storage medium
CN112835573A (en) * 2021-01-27 2021-05-25 北京奇艺世纪科技有限公司 Data query method and device, electronic equipment and storage medium
CN112835573B (en) * 2021-01-27 2023-08-04 北京奇艺世纪科技有限公司 Data query method and device, electronic equipment and storage medium
CN113064914A (en) * 2021-04-22 2021-07-02 中国工商银行股份有限公司 Data extraction method and device
CN115185999A (en) * 2022-09-13 2022-10-14 北京达佳互联信息技术有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN108108439A (en) A kind of data query method, apparatus and electronic equipment
TWI686708B (en) Database query optimization method, device, and computer equipment
US9507874B2 (en) Validation of schema and schema conformance verification
CN107239479A (en) A kind of method and device of data storage and inquiry based on block chain
US20150356140A1 (en) Adapting a relational query to accommodate hierarchical data
CN110601880A (en) Cloud platform, service processing method, command interface and computer equipment
CN108021450A (en) Job analysis method and apparatus based on YARN
CN108255602A (en) Task combined method and terminal device
CN110245029A (en) A kind of data processing method, device, storage medium and server
CN109145014A (en) The method and apparatus for generating elastic searching request
CN108388623A (en) ER relationships generation method, device, computer equipment and storage medium
CN109726217A (en) A kind of database operation method, device, equipment and storage medium
CN112364052A (en) Heterogeneous data management method, device, equipment and computer readable storage medium
CN109240802A (en) request processing method and device
CN105867928A (en) Method and device for connecting designated calculation model to designated distributed system
US20180357100A1 (en) System and method in a database system for creating a field service work order
CN110008173A (en) A kind of method and device of data storage
CN112035542B (en) Information query method, device, electronic equipment and readable storage medium
CN109299173A (en) Data transmission method, device and storage medium
US9159052B2 (en) Generalizing formats of business data queries and results
US10719424B1 (en) Compositional string analysis
CN110297843A (en) Data query method and system, terminal for B/S system
US10042954B2 (en) Defining pairing rules for connections
US20220027370A1 (en) Direct data loading of middleware-generated records
CN114416776A (en) Data self-defined query statistical method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180601

RJ01 Rejection of invention patent application after publication