CN109460418B - Query service execution method based on database - Google Patents

Query service execution method based on database Download PDF

Info

Publication number
CN109460418B
CN109460418B CN201811228353.1A CN201811228353A CN109460418B CN 109460418 B CN109460418 B CN 109460418B CN 201811228353 A CN201811228353 A CN 201811228353A CN 109460418 B CN109460418 B CN 109460418B
Authority
CN
China
Prior art keywords
query
node
database
service
query service
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.)
Active
Application number
CN201811228353.1A
Other languages
Chinese (zh)
Other versions
CN109460418A (en
Inventor
陶天林
张永强
黄洪冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan dream database Co., Ltd
Original Assignee
Wuhan Dameng Database 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 Wuhan Dameng Database Co Ltd filed Critical Wuhan Dameng Database Co Ltd
Priority to CN201811228353.1A priority Critical patent/CN109460418B/en
Publication of CN109460418A publication Critical patent/CN109460418A/en
Application granted granted Critical
Publication of CN109460418B publication Critical patent/CN109460418B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a query service execution method based on a database, which comprises the following steps: step S1, dividing the inquiry service into a plurality of sub-steps; step S2, configuring node components for each substep, and constructing a query flow chart of the query service according to a plurality of node components; step S3, the plurality of node components execute synchronously according to the sequence of the query flowchart, each node component determines whether asynchronous execution is possible according to its own component type, if so, the asynchronous execution mode is selected, and if not, the synchronous execution mode is selected. The query service execution method based on the database has the technical effects of simple and flexible query process and visualized flow.

Description

Query service execution method based on database
Technical Field
The invention relates to the technical field of database query, in particular to a query service execution method based on a database.
Background
In actual database services, some complex query services cannot be realized by one SQL statement. For example, in the data comparison requirement, data needs to be queried from several tables according to conditions, and then the data is compared, and the output result also needs to be queried and compared in another table, and even other comparison operations exist. To implement services like these responsible services, the services can only be implemented by means of programming, which cannot be implemented by general service personnel.
Disclosure of Invention
The invention aims to overcome the technical defects and provide a query service execution method based on a database, so as to solve the problem that service personnel cannot realize complex service query.
In order to achieve the technical purpose, the technical scheme of the invention provides a query service execution method based on a database, which comprises the following steps:
step S1, dividing the inquiry service into a plurality of sub-steps;
step S2, configuring node components for each substep, and constructing a query flow chart of the query service according to a plurality of node components;
step S3, the plurality of node components execute synchronously according to the sequence of the query flowchart, each node component determines whether asynchronous execution is possible according to its own component type, if so, the asynchronous execution mode is selected, and if not, the synchronous execution mode is selected.
Compared with the prior art, the invention has the beneficial effects that: by adopting the method for constructing the query flow chart, each node component can execute a sub-step, the output of each step is the input of the next step, and the steps are synchronously executed according to the sequence of the query flow chart until the execution of the last sub-step is completed. Each node component selects a corresponding execution mode according to the node type of the node component, and an asynchronous execution mode is prioritized, so that the execution speed of the query service is increased.
Drawings
Fig. 1 is a flowchart of a database-based query service execution method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1:
as shown in fig. 1, embodiment 1 of the present invention provides a database-based query service execution method, including the following steps:
step S1, dividing the inquiry service into a plurality of sub-steps;
step S2, configuring node components for each substep, and constructing a query flow chart of the query service according to a plurality of node components;
step S3, the plurality of node components execute synchronously according to the sequence of the query flowchart, each node component determines whether asynchronous execution is possible according to its own component type, if so, the asynchronous execution mode is selected, and if not, the synchronous execution mode is selected.
The query service execution method based on the database provided by the invention constructs a query flow chart, each sub-step corresponds to a node component, and each node component is connected to construct a complete query flow. And each node assembly can be flexibly configured according to requirements during query execution, each node assembly is executed according to the query flow chart until the last node assembly is executed, and the output of each node assembly is the input of the next node assembly. When the specific node component is executed, the asynchronous mode is preferentially adopted for execution, online waiting is not needed, and if the asynchronous mode cannot be adopted for execution, the synchronous mode is adopted for execution. The method for judging whether the node assembly can be executed in an asynchronous mode specifically comprises the steps of judging whether a precedence order exists among sub-steps in the node assembly, namely whether the output of a previous sub-step is the input of a next sub-step, if so, only adopting a synchronous execution mode, and if not, adopting an asynchronous execution mode to save query time.
The invention provides a universal and flexible user-defined flow query method, general service personnel can customize a query flow by themselves, and nodes of each flow use different query components to be combined to realize complex query service. The query components comprise database table query, query result combination, query result distribution and query ratio peer-to-peer, and flexible and complex service query can be realized by using different types of components. And the plurality of node components are synchronously executed according to the sequence of the query flow chart, each node component judges whether asynchronous execution can be carried out or not according to the type of the node component, if so, the asynchronous execution mode is selected for execution, and if not, the synchronous execution mode is selected for execution. The operations do not need to be reprogrammed, the flow is customized just like drawing a flow chart, and complex query services can be realized by selecting different components according to needs.
The execution of the node components in the invention preferentially adopts asynchronous execution, the result does not need to be waited on line, the whole query service is synchronously executed according to the structure of the query flow chart, the smooth operation of the whole query service can be ensured, the excessive useless waiting can be avoided, and the query service has short time consumption and high speed.
Preferably, the types of the node components include table query, SQL query, result set merge, result set distribution, and result set output.
Different types of node assemblies are used for realizing different functions, and a table query user realizes the data query function in the data table; SQL queries are used to execute SQL statements, such as alignment statements; the result set is used for input combination processing of a node assembly comprising a plurality of inputs, and output results of a plurality of upper-level node assemblies are combined and input to the node assembly; distributing and outputting the output result of the node component to a plurality of next-level node components; the result set outputs an output for the execution results of each node component while facilitating caching of the execution results of each node component.
Preferably, the step S2 of constructing the query flow chart of the query service according to the plurality of node components specifically includes: and creating a plurality of template controls corresponding to the types of the node components, and constructing an inquiry flow chart of the inquiry service by dragging and dropping the template controls.
And the template control is created to facilitate the rapid construction of the query flow chart, and the complete query flow chart is constructed by dragging and dropping the template control and connecting the template controls through connecting lines. The template control corresponding to each sub-step can be flexibly configured according to the requirement, so that different query requirements can be realized.
Preferably, the step S3 further includes: and caching the node output result of each node assembly.
The node output result of each node component is cached, so that a user can conveniently check or call at any time, the intermediate process of the query service is transparent, the user can conveniently and independently monitor each sub-step, and the query progress of the query service can be mastered at any time.
Preferably, the database-based query service execution method further includes step S4 of caching the query result of the query service.
And the result of the query service is cached, so that the user can conveniently check or call the result at any time.
Example 2:
embodiment 2 of the present invention provides a computer storage medium on which a computer program is stored, and when being executed by a processor, the computer storage medium implements the database-based query service execution method according to any one of the above embodiments.
The computer storage medium provided by the invention is used for realizing the query service execution method based on the database, so that the technical effect of the query service execution method based on the database is also achieved by the computer storage medium, and the description is omitted.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention. Any other corresponding changes and modifications made according to the technical idea of the present invention should be included in the protection scope of the claims of the present invention.

Claims (4)

1. A query service execution method based on a database is characterized by comprising the following steps:
step S1, dividing the inquiry service into a plurality of sub-steps;
step S2, configuring node components for each substep, and constructing a query flow chart of the query service according to a plurality of node components;
step S3, the plurality of node components execute synchronously according to the sequence of the query flowchart, each node component determines whether asynchronous execution is possible according to its own component type, if so, the asynchronous execution mode is selected, otherwise, the synchronous execution mode is selected;
the types of the node components comprise table query, SQL query, result set combination, result set distribution and result set output;
the step S2 of constructing the query flow chart of the query service according to the plurality of node components specifically includes: and creating a plurality of template controls corresponding to the types of the node components, and constructing an inquiry flow chart of the inquiry service by dragging and dropping the template controls.
2. The database-based query service execution method according to claim 1, wherein the step S3 further comprises: and caching the node output result of each node assembly.
3. The database-based query service execution method of claim 1, further comprising step S4 of caching the query result of the query service.
4. A computer storage medium having a computer program stored thereon, wherein the computer storage medium, when executed by a processor, implements the database-based query service execution method according to any one of claims 1-3.
CN201811228353.1A 2018-10-22 2018-10-22 Query service execution method based on database Active CN109460418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811228353.1A CN109460418B (en) 2018-10-22 2018-10-22 Query service execution method based on database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811228353.1A CN109460418B (en) 2018-10-22 2018-10-22 Query service execution method based on database

Publications (2)

Publication Number Publication Date
CN109460418A CN109460418A (en) 2019-03-12
CN109460418B true CN109460418B (en) 2021-04-13

Family

ID=65607992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811228353.1A Active CN109460418B (en) 2018-10-22 2018-10-22 Query service execution method based on database

Country Status (1)

Country Link
CN (1) CN109460418B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339140A (en) * 2020-02-21 2020-06-26 北京三快在线科技有限公司 Data query method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1755721A (en) * 2004-10-01 2006-04-05 微软公司 Componentized and extensible workflow model
CN108153886A (en) * 2017-12-28 2018-06-12 北京恒泰实达科技股份有限公司 User-defined visual methods of exhibiting of the real time data in web applications
CN108628608A (en) * 2018-04-16 2018-10-09 朗新科技股份有限公司 A kind of method and device of data visualization

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8423569B2 (en) * 2006-08-09 2013-04-16 International Business Machines Corporation Decomposed query conditions
CN102486730A (en) * 2010-12-06 2012-06-06 上海协讯软件有限公司 Workflow realization method and workflow system capable of customizing flow in user-defined manner
CN102254246B (en) * 2011-06-17 2014-09-17 中国建设银行股份有限公司 Workflow managing method and system
CN106909610B (en) * 2017-01-10 2020-11-24 中电科华云信息技术有限公司 Method and system for visually dragging and querying data based on browser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1755721A (en) * 2004-10-01 2006-04-05 微软公司 Componentized and extensible workflow model
CN108153886A (en) * 2017-12-28 2018-06-12 北京恒泰实达科技股份有限公司 User-defined visual methods of exhibiting of the real time data in web applications
CN108628608A (en) * 2018-04-16 2018-10-09 朗新科技股份有限公司 A kind of method and device of data visualization

Also Published As

Publication number Publication date
CN109460418A (en) 2019-03-12

Similar Documents

Publication Publication Date Title
CN107451109B (en) Report generation method and system
CN105549982B (en) A kind of development of automation platform based on model configuration
US9043750B2 (en) Automated generation of two-tier mobile applications
AU2015223287B2 (en) Compound controls
US20160034598A1 (en) Graph-based system and method of information storage and retrieval
US20150095365A1 (en) Query building using schema
US10878006B2 (en) Systems to interleave search results and related methods therefor
WO2019076050A1 (en) Business report query method and apparatus, computer device and storage medium
US8914352B2 (en) Non-equijoin metadata
CN115039385B (en) Computer-implemented communication system and method for Internet of things
CN106407172B (en) A kind of report form generation method based on XML
US20120078877A1 (en) Multi-source searching in a data driven application
CN109460418B (en) Query service execution method based on database
CN107102995B (en) Method and device for determining SQL execution plan
CN103139311A (en) System, device and method of file sharing
CN111061743B (en) Data processing method and device and electronic equipment
CN110597851B (en) Big data based data processing and report display method
US10521854B1 (en) Selection and display of custom user interface controls
CN106815271A (en) Querying condition generation method and device
CN110795494A (en) Automatic testing method and device for synchronous and asynchronous cache data
US10713064B2 (en) User interface configuration using activator fields
CN105634822A (en) Method and device for rapidly querying warning information based on warning grouping
US9239669B2 (en) Common user interface view grouping and sharing framework in online applications
CN105207799A (en) Batch command executing method and device
EP2830289A1 (en) Adaptable reporting in a multi-client telecommunication network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 430000 16-19 / F, building C3, future technology building, 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee after: Wuhan dream database Co., Ltd

Address before: 430000 16-19 / F, building C3, future technology building, 999 Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee before: WUHAN DAMENG DATABASE Co.,Ltd.