Movatterモバイル変換


[0]ホーム

URL:


CN111708926B - Method and system for realizing configuration of data query - Google Patents

Method and system for realizing configuration of data query
Download PDF

Info

Publication number
CN111708926B
CN111708926BCN202010538094.3ACN202010538094ACN111708926BCN 111708926 BCN111708926 BCN 111708926BCN 202010538094 ACN202010538094 ACN 202010538094ACN 111708926 BCN111708926 BCN 111708926B
Authority
CN
China
Prior art keywords
query
condition
configuration
control
input
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
CN202010538094.3A
Other languages
Chinese (zh)
Other versions
CN111708926A (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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information 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 Si Tech Information Technology Co LtdfiledCriticalBeijing Si Tech Information Technology Co Ltd
Priority to CN202010538094.3ApriorityCriticalpatent/CN111708926B/en
Publication of CN111708926ApublicationCriticalpatent/CN111708926A/en
Application grantedgrantedCritical
Publication of CN111708926BpublicationCriticalpatent/CN111708926B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a method and a system for realizing configuration of data query, and relates to the field of software system development. The method comprises the following steps: determining query functions, configuring query conditions of each query function in a database, and generating associated conditional query services; acquiring target query conditions selected by a user through a conditional query service; and reading the configuration of the target query condition from the database and loading the configuration to enable the user to perform data query. According to the invention, the content of the query condition block is realized through configuration, and codes of different query functions in the query condition block can be multiplexed, so that the workload of development functions aiming at query condition display functions is greatly reduced, when the subsequent query functions relate to new query conditions or deletion query conditions, only the configuration of a database is required to be modified, the code development and the code deployment are not required, and the usability of the system is higher.

Description

Method and system for realizing configuration of data query
Technical Field
The present invention relates to the field of software system development, and in particular, to a method and a system for implementing data query configuration.
Background
In conventional application software systems, in order to facilitate users viewing data, many data query functions are often required to be provided, and for each data query function, many conditions for searching or querying are also required to be provided for users to select. To support such multi-query functions and multi-dimensional data queries, conventional approaches are implemented by hard-coding. The query of which dimension the data has is analyzed first, and when the query condition has a value range limitation, the query condition needs to be independently developed. The traditional mode is simple to realize, but when the query function and the query condition are more, the consumed workload is larger, and the expansibility is also poor.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a system for realizing configuration of data query aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
a method for realizing the configuration of data query comprises the following steps:
determining query functions, configuring query conditions of each query function in a database, and generating associated conditional query services;
acquiring target query conditions selected by a user through the condition query service;
and reading the configuration of the target query condition from the database and loading the configuration to enable a user to perform data query.
The other technical scheme for solving the technical problems is as follows:
a configurable implementation system of data queries, comprising:
the configuration unit is used for determining query functions, configuring query conditions of each query function in a database and generating associated conditional query services;
the acquisition unit is used for acquiring target query conditions selected by the user through the condition query service;
and the loading unit is used for reading the configuration of the target query condition from the database and loading the configuration of the target query condition so as to enable a user to query data.
The beneficial effects of the invention are as follows: each inquiry function generally relates to three contents of an inquiry interface, inquiry conditions and data inquiry service, the contents of the inquiry conditions are realized through configuration and are stored in a database in advance, codes of the inquiry conditions of different inquiry functions can be multiplexed, so that the differentiation of the inquiry conditions with different functions is realized through data configuration, when a user inquires through the condition inquiry service, the corresponding inquiry conditions can be directly called from the database to load, the workload of development functions aiming at inquiry condition display functions is greatly reduced, when the subsequent inquiry functions relate to newly added or deleted inquiry conditions, only the configuration of the database is required to be modified, code development and code deployment are not required, and the usability of the system is higher.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of a method for implementing configuration of data query according to the present invention;
FIG. 2 is a schematic flow chart of another embodiment of a method for implementing data query configuration according to the present invention;
FIG. 3 is a block diagram of a system for implementing the data query configuration of the present invention.
Detailed Description
The principles and features of the present invention are described below with reference to the drawings, the illustrated embodiments are provided for illustration only and are not intended to limit the scope of the present invention.
As shown in fig. 1, a flow chart provided for an embodiment of a method for implementing configuration of data query according to the present invention includes:
s1, determining query functions, configuring query conditions of each query function in a database, and generating associated conditional query services.
It should be understood that, for different application service fields, the query functions are different, for example, taking a telecom service field as an example, the query functions may include a call charge payment record query, a call record query, a package change condition query, and the like, taking a call charge payment record query as an example, the query conditions may be multiple, and taking a payment time and a payment amount as query conditions, which are specifically described below.
It should be understood that the two records should be configured in the database in advance, and the payment time query condition is configured as follows, wherein the query condition codes can be BEGIN_DATE and END_DATE, namely the start DATE and the END DATE of the payment time, the name of the query condition is the payment DATE, and the input box is a DATE control. After the user selects the DATE through the DATE control, the selected start DATE and END DATE are respectively assigned to the BEGIN_DATE and the END_DATE, and the two values are transmitted to the background SQL sentence through the service.
When the payment amount is queried similarly, the payment amount query conditions are configured as follows: the configuration query condition codes can be BEGIN_AMOUT and END_AMOUNT, the query condition name is payment AMOUNT, but the input box type is a text box, and when the user inputs BEGIN_AMOUT and END_AMOUNT, SQL sentences with the two values in the background can be used, so that the configuration of the query condition is realized.
S2, acquiring target query conditions selected by a user through a conditional query service.
It should be understood that the condition query service only needs to input one input parameter, namely one interface code agreed by the front end and the back end, and in order to reduce the interaction frequency of the front end and the back end and improve the system performance, the service can return the following query information:
1) Query condition codes and Chinese meanings. What the user sees on the interface is a chinese meaning, while the final foreground code is to invoke the conditional query service using the condition code as a service entry.
2) The input control type of the query condition. For example, it may be a text box, a drop down list, a multiple choice box, a date control, or a tab definition options list (datalist).
3) Width information of the text box is input. For the query condition that the user needs to input text, the input box is wider, and the input box is narrower when inputting numerical values.
4) The input data type of the text box is entered. For example, it may be text or numerical. For the case that a numerical value needs to be input, the foreground can prompt according to the information.
5) Date control type. For example, the year, month, day, month, or just the year of choice may be selected, and this information needs to be returned together.
6) Whether the input control is an interval or not. For example, querying for data for a period of time, the foreground may present two date entry boxes based on the information colleague.
7) The type of conditional value. Support enumeration values, execute SQL, and background call service values.
8) The enumeration value of the conditional access value encodes and enumerates the value meaning.
9) The foreground with dependent condition value is added with parameters.
S3, reading the configuration of the target query condition from the database and loading the configuration to enable the user to query the data.
For example, assuming that the target query condition selected by the user is a payment time, according to the above example, an input box of a date control may be loaded on an interface of a terminal used by the user, such as a mobile phone, a computer, and the like, and the name of the query condition is displayed as a payment date through text.
It should be understood that, each query function generally relates to three contents of a query interface, query conditions and data query service, in this embodiment, the contents of the query conditions are realized through configuration, and are pre-stored in a database, so that codes of the query conditions of different query functions can be multiplexed, and therefore, the differentiation of the query conditions requiring different functions needs to be realized through data configuration.
Optionally, in some possible embodiments, the configuration of the query condition includes: encoding of query conditions.
It should be understood that, a person skilled in the art may select the encoding mode according to actual requirements, for example, may select a direct english translation mode, and as the above example, the encoding of the payment time inquiry condition is begin_date and end_date.
Optionally, in some possible embodiments, the configuration and loading of the target query condition is read from the database, specifically including:
analyzing the target query condition to obtain the code of the target query condition;
and reading the configuration of the target query condition from the database according to the code of the target query condition and loading the configuration.
By using the code of the target query condition as an index, the configuration of the target query condition can be quickly and accurately found from the database.
Optionally, in some possible embodiments, the configuring of the query condition further includes: the control type, the width of the input text box, the input data type of the input text box and the condition value type; the control types include: an input control and a selection control; the input controls include: a text box and a date box; the selection controls include a list, a multi-box, and a datalist.
Optionally, in some possible embodiments, as shown in fig. 2, according to the encoding of the target query condition, the configuration and loading of the target query condition are read from the database, and specifically include:
the user selects a target query condition through the mobile phone, and the mobile phone acquires control width information;
reading the configuration of the target query condition from the database according to the code of the target query condition, and judging the control type of the target query condition;
if the control type is the input control, judging whether the control is a date control, and if so, displaying the date control type; judging whether the target query condition is an interval or not, if so, displaying two corresponding input controls, otherwise, displaying only one input control;
if the control type is a selection control, judging a condition value type, and if the condition value type is an enumeration value, directly displaying; if the condition value type is SQL input or a third party service is called, judging whether front-end parameter transmission is needed, if so, calling a preset condition value service after parameter assignment, otherwise, directly calling the preset condition value service;
and determining the width of the input text box and the input data type of the input text box according to the determined control type, and displaying.
It should be appreciated that some query condition values are dynamic, such as requiring different values to be presented according to different login numbers, or that the condition values depend on a third party service. For the case of dynamic changes in conditional values, SQL or service addresses may be configured to address this problem.
It will be appreciated that in some embodiments, some or all of the above embodiments may be included.
As shown in fig. 3, a structural framework diagram provided for an embodiment of a system for implementing the configuration of data queries of the present invention includes:
a configuration unit 1, configured to determine query functions, configure query conditions of each query function in a database, and generate associated conditional query services;
an acquisition unit 2 for acquiring a target query condition selected by a user through a conditional query service;
and the loading unit 3 is used for reading the configuration of the target query condition from the database and loading the configuration of the target query condition for the user to query the data.
It should be understood that each query function generally relates to three contents of a query interface, query conditions and data query service, the content of the query condition block is realized through configuration and is stored in a database in advance, codes of different query functions in the query condition block can be multiplexed, so that the differentiation of the query conditions requiring different functions is realized through data configuration, when a user queries through the condition query service, the corresponding query conditions can be directly called from the database to load, the workload of the development function aiming at the query condition display function is greatly reduced, when the subsequent query function relates to the new or deleted query conditions, only the configuration of the database is required to be modified, the code development and the code deployment are not required, and the usability of the system is higher.
Optionally, in some possible embodiments, the configuration of the query condition includes: encoding of query conditions.
Optionally, in some possible embodiments, the loading unit 3 is specifically configured to parse the target query condition to obtain a code of the target query condition; and reading the configuration of the target query condition from the database according to the code of the target query condition and loading the configuration.
Optionally, in some possible embodiments, the configuring of the query condition further includes: the control type, the width of the input text box, the input data type of the input text box and the condition value type; the control types include: an input control and a selection control; the input controls include: a text box and a date box; the selection controls include a list, a multi-box, and a datalist.
Optionally, in some possible embodiments, the loading unit 3 is specifically configured to read the configuration of the target query condition from the database according to the code of the target query condition, and determine the control type of the target query condition; if the control type is the input control, judging whether the control is a date control, and if so, displaying the date control type; judging whether the target query condition is an interval or not, if so, displaying two corresponding input controls, otherwise, displaying only one input control; if the control type is a selection control, judging a condition value type, and if the condition value type is an enumeration value, directly displaying; if the condition value type is SQL input or a third party service is called, judging whether front-end parameter transmission is needed, if so, calling a preset condition value service after parameter assignment, otherwise, directly calling the preset condition value service; and determining the width of the input text box and the input data type of the input text box according to the determined control type, and displaying.
It will be appreciated that in some embodiments, some or all of the above embodiments may be included.
It should be noted that, each of the foregoing embodiments is a product example corresponding to the previous method example, and for the description of the product embodiment, reference may be made to the corresponding description in each of the foregoing method embodiments, which is not repeated herein.
The reader will appreciate that in the description of this specification, a description of terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the method embodiments described above are merely illustrative, e.g., the division of steps is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple steps may be combined or integrated into another step, or some features may be omitted or not performed.
The present invention is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and these modifications and substitutions are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (8)

8. The system for implementing the configuration of the data query according to claim 7, wherein the loading unit is specifically configured to read the configuration of the target query condition from the database according to the code of the target query condition, and determine a control type of the target query condition; if the control type is the input control, judging whether the control is a date control, and if so, displaying the date control type; judging whether the target query condition is an interval or not, if so, displaying two corresponding input controls, otherwise, displaying only one input control; if the control type is a selection control, judging a condition value type, and if the condition value type is an enumeration value, directly displaying; if the condition value type is SQL input or a third party service is called, judging whether front-end parameter transmission is needed, if so, calling a preset condition value service after parameter assignment, otherwise, directly calling the preset condition value service; and determining the width of the input text box and the input data type of the input text box according to the determined control type, and displaying.
CN202010538094.3A2020-06-122020-06-12Method and system for realizing configuration of data queryActiveCN111708926B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010538094.3ACN111708926B (en)2020-06-122020-06-12Method and system for realizing configuration of data query

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010538094.3ACN111708926B (en)2020-06-122020-06-12Method and system for realizing configuration of data query

Publications (2)

Publication NumberPublication Date
CN111708926A CN111708926A (en)2020-09-25
CN111708926Btrue CN111708926B (en)2023-06-13

Family

ID=72539950

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010538094.3AActiveCN111708926B (en)2020-06-122020-06-12Method and system for realizing configuration of data query

Country Status (1)

CountryLink
CN (1)CN111708926B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112732243B (en)*2021-01-112024-06-18京东科技控股股份有限公司Data processing method and device for generating functional components

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101272222A (en)*2008-05-062008-09-24中兴通讯股份有限公司Restriction calibration method and device
CN101339559A (en)*2008-07-182009-01-07北京航空航天大学 A method for implementing data persistence
CN101706716A (en)*2009-09-082010-05-12南京师范大学VO-based form customization, configuration and parsing operation method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
EP1912135B1 (en)*2005-04-062010-09-15Mallinckrodt, Inc.System and methods for managing information relating to medical fluids and containers therefor
CN102541529B (en)*2010-12-302015-12-16北京亿阳信通科技有限公司A kind of query page generating device and method
US9886263B2 (en)*2015-03-242018-02-06Oracle International CorporationTechniques for efficient application configuration patching
US10248691B2 (en)*2015-07-132019-04-02Paypal, Inc.Read/write split database query routing
CN105138326B (en)*2015-08-112019-03-22北京思特奇信息技术股份有限公司A kind of method and system for realizing sql dynamic configuration based on ibatis
CN106484734A (en)*2015-09-012017-03-08天脉聚源(北京)科技有限公司A kind of data query caching method and system
KR101762283B1 (en)*2016-05-192017-07-31주식회사 티맥스 소프트Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment
US9983855B1 (en)*2016-12-292018-05-29Walmart Apollo, LlcSystems, method, and non-transitory computer-readable storage media for displaying software components
US10216621B1 (en)*2017-11-162019-02-26Servicenow, Inc.Automated diagnostic testing of databases and configurations for performance analytics visualization software
CN109063098A (en)*2018-07-272018-12-21四川长虹电器股份有限公司Configurable data base query method
CN109344165A (en)*2018-11-232019-02-15福建榕基软件股份有限公司A kind of querying method and storage equipment
CN114153866B (en)*2021-10-292024-12-06多点生活(成都)科技有限公司 A real-time data center configuration system based on ES and its processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101272222A (en)*2008-05-062008-09-24中兴通讯股份有限公司Restriction calibration method and device
CN101339559A (en)*2008-07-182009-01-07北京航空航天大学 A method for implementing data persistence
CN101706716A (en)*2009-09-082010-05-12南京师范大学VO-based form customization, configuration and parsing operation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于CXF框架的可配置化企业内容管理平台Web服务构建;侯斌;2015电力行业信息化年会论文集;全文*

Also Published As

Publication numberPublication date
CN111708926A (en)2020-09-25

Similar Documents

PublicationPublication DateTitle
US6134549A (en)Client/server computer system having personalizable and securable views of database data
CN110489409B (en)Method and device for dynamically expanding data field
US7853557B2 (en)Method and computer for responding to a query according to the language used
US20020156902A1 (en)Language and culture interface protocol
CN110109981B (en)Information display method and device for work queue, computer equipment and storage medium
CN112084199B (en)General parameter maintenance method and device based on scene
CN111914008A (en)Method and device for batch export of work order data, electronic equipment and medium
CN107515875A (en)Data query method and device
CN111708926B (en)Method and system for realizing configuration of data query
US7680823B2 (en)Custom report generation
US20050137845A1 (en)Method and structures to enable national language support for dynamic data
US20090193035A1 (en)Collaborative document management
CN109255082B (en)Page label display method and device
US6907434B2 (en)Message analysis tool
JPH10283365A (en) Document display device and program storage medium
CN111459907B (en)Method, system and storage medium for configuring main data through model
CN115936017B (en)Main data management method supporting interface multilingual and data multilingual
CN116738451A (en)Method, platform, equipment and storage medium for controlling authority of low-code platform
CN113867727A (en) A page generation method, page generation system, storage medium and terminal
US20220292077A1 (en)Scalable interactive data collection system
CN113051477A (en)Content recommendation method and device, electronic equipment and medium
CN112988661A (en)Balance table updating method and related equipment thereof
CN117112654B (en)City data display method, device, computer equipment and storage medium
CN115659406B (en)Data access method
CN115495718B (en)Front-end statement-based back-end capability authorization method, device and equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp