CN108984623A - Data query conditions generation method, device, storage medium and electronic equipment - Google Patents

Data query conditions generation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108984623A
CN108984623A CN201810616153.7A CN201810616153A CN108984623A CN 108984623 A CN108984623 A CN 108984623A CN 201810616153 A CN201810616153 A CN 201810616153A CN 108984623 A CN108984623 A CN 108984623A
Authority
CN
China
Prior art keywords
data
query
query condition
target
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810616153.7A
Other languages
Chinese (zh)
Other versions
CN108984623B (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201810616153.7A priority Critical patent/CN108984623B/en
Publication of CN108984623A publication Critical patent/CN108984623A/en
Application granted granted Critical
Publication of CN108984623B publication Critical patent/CN108984623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

This disclosure relates to a kind of data query conditions generation method, device, storage medium and electronic equipment, this method comprises: obtaining the corresponding target data set of the data query page when the data query page is opened;It determines in the data query page with the presence or absence of the first querying condition model stored;When determining there is no when the first querying condition model, the quantity and data type of different data in all data under each field are concentrated according to the target data, the corresponding target query condition model of the target data set is generated on the data query page;Wherein, condition query model includes one or more querying condition input interfaces.The quantity and data type of data currently stored in database that the data query page connects can be passed through, it is dynamically generated querying condition model, avoiding can not be by the case where changed data, improving the accuracy and convenience of data query in data query page interrogation database.

Description

Data query condition generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of user interface interaction, and in particular, to a method and an apparatus for generating a query condition based on data, a storage medium, and an electronic device.
Background
In database applications, a database is connected to a data query page, and displaying data in the database on the data query page is a common means in a database user interaction technology. In the related art, interfaces for inputting data query conditions are generally added on a data query page, and the input interfaces are generally fixed-mode input boxes or options which are set in advance according to common data under each field in a database. When the data type and the number of the data in the database change, or the whole field is added or deleted, the input interface in the fixed mode cannot be dynamically adjusted in real time according to the change, so that the problem that some data cannot be inquired is caused, and the user experience is influenced.
Disclosure of Invention
The invention aims to provide a data query condition generation method, a data query condition generation device, a storage medium and electronic equipment, which are used for solving the problem that data which are changed in a database cannot be queried through a fixed-mode input interface.
In order to achieve the above object, according to a first aspect of embodiments of the present disclosure, there is provided a data query condition generating method, including:
when a data query page is opened, acquiring a target data set corresponding to the data query page;
determining whether a stored first query condition model exists in the data query page;
when it is determined that the first query condition model does not exist in the data query page, generating a target query condition model corresponding to the target data set on the data query page according to the number and data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces.
Optionally, the generating a target query condition model corresponding to the target data set on the data query page according to the number and the data type of different data in all data in each field of the target data set includes:
aiming at a first field in the target data set, acquiring the quantity of first data in all data in the first field, wherein the first field is any field in the target data set, and the first data is data which appears at least once in all data in the first field;
when the quantity of the first data is smaller than a preset quantity, generating a query condition option corresponding to each first data on the data query page as a query condition input interface of the target query condition model; and/or the presence of a gas in the gas,
when the number of the first data is larger than or equal to the preset number, acquiring one or more data types corresponding to all data in the first field;
and generating a query condition input box used for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
Optionally, when it is determined that the first query condition input model exists in the data query page, the method further includes:
and determining whether to generate the target query condition model on the data query page by modifying the first query condition model according to the update condition of the target data set relative to a first data set, wherein the first query condition model is generated according to the number and data types of different data in all data of each field in the first data set, and the first data set is a data set before the target data set.
Optionally, the determining whether to generate the target query condition model on the data query page by updating the first query condition model according to the update condition of the target data set relative to the first data set includes:
determining whether the target data set has been updated relative to the first data set;
when it is determined that the target data set is not updated relative to the first data set, taking the first query condition model as the target query condition model; or,
upon determining that the target data set has been updated relative to the first data set, obtaining an updated portion of the target data set relative to the first data set;
and modifying the first query condition model according to the updating part to generate the target query condition model.
Optionally, the updating part includes: at least one of a newly added field, a deleted field, newly added data, and deleted data, wherein the modifying the first query condition model according to the updating portion to generate the target query condition model includes:
when the updating part comprises the newly added field, adding a query condition input interface generated according to the number of different data in all data under the newly added field and the data type into the first query condition model to generate the target query condition model;
when the updated part comprises the deleted field, deleting a query condition input interface corresponding to the deleted field from the first query condition model to generate the target query condition model; and/or the presence of a gas in the gas,
when the updated part comprises the added data and/or the deleted data, replacing a query condition input interface corresponding to a second field in the first query condition model by a query condition input interface generated by updating according to the number of different data in all data under the second field where the added data and/or the deleted data are located and the data type to generate the target query condition model.
Optionally, after generating the target query condition model, the method further includes:
recording historical query conditions input by a user through a first query condition input box in the target query condition model, wherein the first query condition input box is any query condition input box in the target query condition model;
and displaying the historical query conditions when a user inputs the query conditions through the first query condition input box.
According to a second aspect of the embodiments of the present disclosure, there is provided a data query condition generating apparatus including:
the data set acquisition module is used for acquiring a target data set corresponding to a data query page when the data query page is opened;
the model determining module is used for determining whether a stored first query condition model exists in the data query page;
the model generation module is used for generating a target query condition model corresponding to the target data set on the data query page according to the number and the data type of different data in all data under each field in the target data set when the first query condition model is determined not to exist in the data query page; wherein the condition query model comprises one or more query condition input interfaces.
Optionally, the model generation module includes:
the quantity counting submodule is used for acquiring the quantity of first data in all data in a first field aiming at the first field in the target data set, wherein the first field is any one field in the target data set, and the first data is data which appears at least once in all data in the first field;
the option generation sub-module is used for generating a query condition option corresponding to each first data on the data query page as a query condition input interface of the target query condition model when the number of the first data is smaller than a preset number; and/or the presence of a gas in the gas,
the input box generation submodule is used for acquiring one or more data types corresponding to all the data in the first field when the number of the first data is greater than or equal to the preset number;
and generating a query condition input box used for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
Optionally, the apparatus further comprises:
and the model updating module is used for determining whether the target query condition model is generated on the data query page by modifying the first query condition model according to the updating condition of the target data set relative to the first data set, wherein the first query condition model is a query condition model generated according to the number and the data type of different data in all data under each field in the first data set, and the first data set is a data set before the target data set.
Optionally, the model updating module includes:
an update determination sub-module to determine whether the target data set has been updated relative to the first data set;
a model generation sub-module for using the first query condition model as the target query condition model when it is determined that the target data set is not updated with respect to the first data set; or,
an update acquisition sub-module for acquiring an updated portion of the target data set relative to the first data set when it is determined that the target data set has been updated relative to the first data set;
and the model modification submodule is used for modifying the first query condition model according to the updating part so as to generate the target query condition model.
Optionally, the updating part includes: at least one of a newly added field, a deleted field, newly added data and deleted data, the model modification submodule is configured to:
when the updating part comprises the newly added field, adding a query condition input interface generated according to the number of different data in all data under the newly added field and the data type into the first query condition model to generate the target query condition model;
when the updated part comprises the deleted field, deleting a query condition input interface corresponding to the deleted field from the first query condition model to generate the target query condition model; and/or the presence of a gas in the gas,
and when the updated part comprises the added data and/or the deleted data, replacing the query condition input interface corresponding to the second field in the first query condition input interface by a query condition input interface regenerated according to the number of different data in all data under the second field where the added data and/or the deleted data are located and the data type to generate the target query condition model.
Optionally, the apparatus further comprises:
the query condition recording module is used for recording historical query conditions input by a user through a first query condition input box in the target query condition model, wherein the first query condition input box is any query condition input box in the target query condition model;
and the query condition display module is used for displaying the historical query conditions when a user inputs the query conditions through the first query condition input box.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of the data query condition generating method provided by the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the data query condition generating method provided by the first aspect.
By the technical scheme, the target data set corresponding to the data query page can be acquired when the data query page is opened; determining whether a stored first query condition model exists in the data query page; when the first query condition model is determined not to exist, generating a target query condition model corresponding to the target data set on the data query page according to the number and the data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces. The query condition model corresponding to the data can be dynamically generated according to the number and the data type of the data currently stored in the database connected with the data query page, the condition that the changed data in the database cannot be queried through the data query page is avoided, and the accuracy and the convenience of data query are improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow diagram illustrating a data query condition generation method in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for generating a query condition model according to the embodiment shown in FIG. 1;
FIG. 3 is a flow chart illustrating another method for generating data query conditions according to the embodiment shown in FIG. 1;
FIG. 4 is a flow diagram illustrating a query condition model update method according to the embodiment shown in FIG. 3;
FIG. 5 is a flow chart illustrating yet another method for generating data query conditions according to the embodiment shown in FIG. 3;
FIG. 6 is a schematic diagram illustrating a data query page in accordance with an illustrative embodiment;
FIG. 7 is a block diagram illustrating a data query condition generation apparatus in accordance with an illustrative embodiment;
FIG. 8 is a block diagram of a model generation module according to the embodiment shown in FIG. 7;
FIG. 9 is a block diagram of another data query condition generating apparatus according to the embodiment shown in FIG. 7;
FIG. 10 is a block diagram of a model update module according to the embodiment shown in FIG. 9;
FIG. 11 is a block diagram of still another data query condition generating apparatus according to the embodiment shown in FIG. 9;
FIG. 12 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a data query condition generation method according to an exemplary embodiment, as shown in fig. 1, the method including:
step 101, when a data query page is opened, a target data set corresponding to the data query page is obtained.
The data query page is a graphical interactive interface of the database facing a user, and is used for displaying data stored in the database (namely the target data set) and a query condition model for querying the data in the target data set.
Step 102, determining whether the stored first query condition model exists in the data query page.
For example, after the data query page is opened, it is first determined whether the generated first query condition model exists in the data query page, and when it is determined that the generated first query condition model exists in the data query page, the first query condition model may be modified and then output on the data query page, and even when data in the database is not changed, the first query condition model is directly output, so as to save time and calculation amount for generating the query condition model; when it is determined that there is no query condition model in the data query page, the step 103 continues to generate a target query condition model corresponding to the target data set on the data query page.
Step 103, when it is determined that the first query condition model does not exist in the data query page, generating a target query condition model corresponding to the target data set on the data query page according to the number and data types of different data in all data under each field in the target data set.
Wherein the condition query model comprises one or more query condition input interfaces. The query condition interface can be displayed on the data query page in various forms of input boxes or options. The target data set may be displayed on the data page in the form of a table, wherein each row of the table contains a set of data representing various characteristics associated with an event, and each column is a field corresponding to data in each row describing one of the various characteristics.
For example, when generating the query condition model, for any field of the target data set, the number of different data under the field needs to be determined first, for example, one field contains: A. c, B, D, A and D, determining that the field contains A, B, C and D four different data; secondly, for a field with a small number of different data, a query condition input interface in the form of an option can be generated for the field, wherein one option corresponds to one of the different data in the field, for example, data a corresponds to a data a option, and the option can be in the form of an option box or a pull-down menu; for fields with more different data, a query condition input interface in the form of an input box can be generated for the fields, and further, an input box with data type input limitation can be generated according to the data types of all data in the fields.
For example, a corresponding option or input box may be generated for each field in the target data set through the above-described process. In the case of many fields, the option or input box for outputting all the fields simultaneously may occupy too much space of the data query page, making it difficult for the user to quickly locate the field to be queried. In view of the above, it is preferable that option boxes are generated for each field, so that the user can display the query condition input interface corresponding to one or several fields on the data query page by selecting or canceling the option boxes.
To sum up, the present disclosure can obtain a target data set corresponding to a data query page when the data query page is opened; determining whether a stored first query condition model exists in the data query page; when the first query condition model is determined not to exist, generating a target query condition model corresponding to the target data set on the data query page according to the number and the data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces. The query condition model can be dynamically generated according to the number and the data type of the currently stored data in the database connected with the data query page, the condition that the changed data in the database cannot be queried through the data query page is avoided, and the accuracy and the convenience of data query are improved.
Fig. 2 is a flowchart of a query condition model generation method according to the embodiment shown in fig. 1, and as shown in fig. 2, the step 103 may include: steps 1031 and 1032, and/or steps 1031, 1033 and 1034.
Step 1031, aiming at the first field in the target data set, obtaining the number of the first data in all the data in the first field.
The first field is any field in the target data set, and the first data is data which appears at least once in all data of the first field. It should be noted that the statistical manner for the amount of the first data may be that, in one field, when one data appears for the first time, the above amount is increased by one, and when the same data appears again, the above amount is ignored. It will be appreciated that the same data may appear in a field multiple times, no matter how many times the data appears, the statistics on that amount are not affected.
Step 1032, when the number of the first data is smaller than the preset number, generating a query condition option corresponding to each first data on the data query page, as a query condition input interface of the target query condition model.
Step 1033, when the quantity of the first data is greater than or equal to the preset quantity, acquiring one or more data types corresponding to all data in the first field.
For example, when the number of the first data is greater than or equal to the preset number and cannot be listed by options one by one, a query condition input interface in the form of an input box may be generated. The input interface allows the input of data of all data types that have occurred under the first field. For example, when the data type of all the data in the first field is a numeric type, a query condition input box for inputting only a number is generated, and so on. Further, it is preferable that when the user inputs data of a data type that does not match, a prompt field for prompting an input of an error in the data type is input.
Step 1034, generating a query condition input box for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
FIG. 3 is a flow chart illustrating another data query condition generation method according to the embodiment shown in FIG. 1, and as shown in FIG. 3, when it is determined that the first query condition input model exists in the data query page, the method may further include:
and 104, determining whether to generate the target query condition model on the data query page by modifying the first query condition model according to the updating condition of the target data set relative to the first data set.
The first query condition model is generated according to the number and data types of different data in all data of each field in the first data set, and the first data set is a data set before the target data set.
Illustratively, when determining that the first query condition input model exists in the data query page for generation, the method for saving more time and computation amount compared with the step 103 is to modify the first query condition input model based on the first query condition input model according to the change condition of the target data set relative to the first data set, and then take the modified query condition model as the target query condition model; alternatively, the first query condition model is directly used as the target query condition model when it is determined that the target data set is identical to the first data set.
Fig. 4 is a flowchart illustrating a query condition model updating method according to the embodiment shown in fig. 3, where, as shown in fig. 4, the step 104 may include: steps 1041 and 1042, or steps 1041, 1043 and 1044.
At step 1041, it is determined whether the target data set has been updated with respect to the first data set.
In step 1042, when it is determined that the target data set is not updated relative to the first data set, the first query condition model is used as the target query condition model.
When it is determined that the target data set has been updated with respect to the first data set, an updated portion of the target data set with respect to the first data set is obtained, step 1043.
Step 1044, modifying the first query condition model according to the updated portion to generate the target query condition model.
Illustratively, the update portion may include: at least one of a newly added field, a deleted field, newly added data and deleted data, where the step 1044 may include: when the updated part comprises the newly added field, a query condition input interface corresponding to the newly added field needs to be generated again, and then the query condition input interface generated according to the number of different data in all data under the newly added field and the data type is added into the first query condition model to generate the target query condition model; when the updated part comprises the deleted field, deleting the query condition input interface corresponding to the deleted field from the first query condition model to generate the target query condition model; and/or when the updated part comprises the new data and/or the deleted data, namely the data in a certain field changes, replacing the query condition input interface corresponding to the second field in the first query condition model by the query condition input interface generated by updating according to the number of different data in all data in the second field where the new data and/or the deleted data are located and the data type, so as to generate the target query condition model.
Fig. 5 is a flowchart illustrating a further method for generating a data query condition according to the embodiment shown in fig. 3, where as shown in fig. 5, the method may further include:
step 105, recording the historical query condition input by the user through the first query condition input box in the target query condition model.
Wherein the first query condition input box is any query condition input box in the target query condition model.
And 106, displaying the historical query conditions when the user inputs the query conditions through the first query condition input box.
For example, if the user inputs a query condition through the query condition input box in a previous conditional query operation (which may be a multiple conditional query operation performed by opening the data query page multiple times previously), when the user inputs data to the same query condition input box again, the historical query condition may be displayed near the query condition input box in the form of a selectable pull-down menu for direct selection by the user.
Illustratively, fig. 6 is a schematic diagram of a data query page shown according to an exemplary embodiment, as shown in fig. 6, below the data query page is all data of a database displayed in a table form, above is a query condition model generated according to the database data, wherein, on the left side above is a field setting box for selecting fields needing to be queried, and on the left side above comprises: and a plurality of query condition input interfaces corresponding to the selected fields. Taking the content in the data query page shown in fig. 6 as an example, when the user opens the output query page, the query condition input interface corresponding to each field is generated according to all the data in the database, and the query condition options in the field 2 and the query condition input boxes in the fields 3 and 5 are generated according to the selected fields in the field setting box. The generation process of the query condition input interfaces comprises the following steps: when the above preset number is set to 3, the data appearing at least once in this field 2 includes: the number of the data A and the data B is 2, and at this time, the field 2 generates a query condition option containing the data A and the data B options. Meanwhile, the data appearing at least once in the field 3 and the field 5 are data F, data C, data B and data G, and the data I, data H, data J and data Z, respectively, and the number of the data I, data H, data J and data Z is 4, then the query condition input interface in the form of an input box is generated for the field 3 and the field 5. It is to be understood that if, for example, data I, data H, data J, and data Z under field 5 are all numeric class data for representing time, the field 5 query condition input box is an input box that allows only numeric class data to be input.
Illustratively, when the data query page is opened again after being closed, and it is detected that the field 6 is added to the database, the query condition input interface corresponding to the field 6 is generated according to all the data in the field 6, and meanwhile, the option boxes consistent with the fields 1 to 5 are added to the field setting box. Or, when the data query page is opened again after being closed, and the field 5 in the database is detected to be deleted, deleting the field 5 query condition input box, and deleting the option box corresponding to the field 5 in the field setting box. Or, when the data query page is opened again after being closed, and it is detected that the data in the field 5 in the database is deleted or added, the field 5 query condition input interface is regenerated according to all the current data in the field 5, and the field 5 query condition input interface is used to replace the original field 5 query condition input box.
To sum up, the present disclosure can obtain a target data set corresponding to a data query page when the data query page is opened; determining whether a stored first query condition model exists in the data query page; when the first query condition model is determined not to exist in the data query page, generating a target query condition model corresponding to the target data set on the data query page according to the number and the data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces. The query condition model can be dynamically generated according to the quantity and the data type of the data currently stored in the database connected with the data query page, and the query condition model is dynamically updated according to the change condition of the database, so that the condition that no appropriate query condition input interface exists on the data query page for the changed data in the database is avoided, and the accuracy and the convenience of data query are improved.
Fig. 7 is a block diagram illustrating a data query condition generating apparatus according to an exemplary embodiment, and as shown in fig. 7, the apparatus 700 includes:
a data set obtaining module 710, configured to obtain a target data set corresponding to a data query page when the data query page is opened;
a model determining module 720, configured to determine whether a stored first query condition model exists in the data query page;
a model generating module 730, configured to, when it is determined that the first query condition model does not exist in the data query page, generate a target query condition model corresponding to the target data set on the data query page according to the number and data types of different data in all data in each field of the target data set; wherein the condition query model comprises one or more query condition input interfaces.
FIG. 8 is a block diagram illustrating a model generation module according to the embodiment shown in FIG. 7, such as the model generation module 730 shown in FIG. 8, including:
a quantity counting submodule 731, configured to obtain, for a first field in the target data set, a quantity of first data in all data in the first field, where the first field is any field in the target data set, and the first data is data that appears at least once in all data in the first field;
an option generating sub-module 732, configured to generate, when the number of the first data is smaller than a preset number, a query condition option corresponding to each first data on the data query page, where the query condition option is used as a query condition input interface of the target query condition model; and/or the presence of a gas in the gas,
the input box generation sub-module 733, configured to, when the number of the first data is greater than or equal to the preset number, obtain one or more data types corresponding to all data in the first field;
and generating a query condition input box for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
Fig. 9 is a block diagram of another data query condition generating apparatus according to the embodiment shown in fig. 7, and as shown in fig. 9, the apparatus 700 further includes:
the model updating module 740 is configured to determine whether to generate the target query condition model on the data query page by modifying the first query condition model according to an update condition of the target data set relative to a first data set, where the first query condition model is a query condition model generated according to the number and data types of different data in all data in each field in the first data set, and the first data set is a data set before the target data set.
FIG. 10 is a block diagram illustrating a model update module according to the embodiment shown in FIG. 9, such as the model update module 740 shown in FIG. 10, including:
an update determination sub-module 741 for determining whether the target data set has been updated relative to the first data set;
a model generation sub-module 742 for using the first query condition model as the target query condition model when it is determined that the target data set is not updated with respect to the first data set; or,
an update obtaining submodule 743, configured to obtain an updated portion of the target data set with respect to the first data set when it is determined that the target data set has been updated with respect to the first data set;
a model modification sub-module 744 for modifying the first query condition model according to the updated portion to generate the target query condition model.
Optionally, the updating part includes: at least one of added fields, deleted fields, added data, and deleted data, the model modification sub-module 744 configured to:
when the updating part comprises the newly added field, adding a query condition input interface generated according to the number of different data in all data under the newly added field and the data type into the first query condition model to generate the target query condition model;
when the updated part comprises the deleted field, deleting the query condition input interface corresponding to the deleted field from the first query condition model to generate the target query condition model; and/or the presence of a gas in the gas,
when the updated part comprises the new data and/or the deleted data, replacing the query condition input interface corresponding to the second field in the first query condition input interface by the query condition input interface regenerated according to the number of different data in all data under the second field where the new data and/or the deleted data are located and the data type to generate the target query condition model.
Fig. 11 is a block diagram of another data query condition generating apparatus according to the embodiment shown in fig. 9, and as shown in fig. 11, the apparatus 700 further includes:
a query condition recording module 750, configured to record a historical query condition input by a user through a first query condition input box in the target query condition model, where the first query condition input box is any query condition input box in the target query condition model;
the query condition display module 760 is configured to display the historical query conditions when the user inputs a query condition through the first query condition input box.
To sum up, the present disclosure can obtain a target data set corresponding to a data query page when the data query page is opened; determining whether a stored first query condition model exists in the data query page; when the first query condition model is determined not to exist in the data query page, generating a target query condition model corresponding to the target data set on the data query page according to the number and the data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces. The query condition model can be dynamically generated according to the quantity and the data type of the data currently stored in the database connected with the data query page, and the query condition model is dynamically updated according to the change condition of the database, so that the condition that no appropriate query condition input interface exists on the data query page for the changed data in the database is avoided, and the accuracy and the convenience of data query are improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 12 is a block diagram illustrating an electronic device 1200 in accordance with an example embodiment. As shown in fig. 12, the electronic device 1200 may include: a processor 1201, a memory 1202, a multimedia component 1203, an input/output (I/O) interface 1204, and a communications component 1205.
The processor 1201 is configured to control the overall operation of the electronic device 1200, so as to complete all or part of the steps in the data query condition generating method. The memory 1202 is used to store various types of data to support operation of the electronic device 1200, such as instructions for any application or method operating on the electronic device 1200 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 1202 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 1203 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in the memory 1202 or transmitted via the communication component 1205. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 1204 provides an interface between the processor 1201 and other interface modules, such as a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. A communication component 1205 is used for wired or wireless communication between the electronic device 1200 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 1205 can include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, for performing the data query condition generating method described above.
In another exemplary embodiment, a computer readable storage medium comprising program instructions, such as the memory 1202 comprising program instructions, executable by the processor 1201 of the electronic device 1200 to perform the data query condition generation method described above is also provided.
Preferred embodiments of the present disclosure are described in detail above with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and other embodiments of the present disclosure may be easily conceived by those skilled in the art within the technical spirit of the present disclosure after considering the description and practicing the present disclosure, and all fall within the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. Meanwhile, any combination can be made between various different embodiments of the disclosure, and the disclosure should be regarded as the disclosure of the disclosure as long as the combination does not depart from the idea of the disclosure. The present disclosure is not limited to the precise structures that have been described above, and the scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A data query condition generation method, characterized in that the method comprises:
when a data query page is opened, acquiring a target data set corresponding to the data query page;
determining whether a stored first query condition model exists in the data query page;
when it is determined that the first query condition model does not exist in the data query page, generating a target query condition model corresponding to the target data set on the data query page according to the number and data types of different data in all data under each field in the target data set; wherein the condition query model comprises one or more query condition input interfaces.
2. The method according to claim 1, wherein the generating a target query condition model corresponding to the target data set on the data query page according to the number and data types of different data in all data under each field in the target data set comprises:
aiming at a first field in the target data set, acquiring the quantity of first data in all data in the first field, wherein the first field is any field in the target data set, and the first data is data which appears at least once in all data in the first field;
when the quantity of the first data is smaller than a preset quantity, generating a query condition option corresponding to each first data on the data query page as a query condition input interface of the target query condition model; and/or the presence of a gas in the gas,
when the number of the first data is larger than or equal to the preset number, acquiring one or more data types corresponding to all data in the first field;
and generating a query condition input box used for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
3. The method of claim 1, wherein when it is determined that the first query condition input model is present in the data query page, the method further comprises:
and determining whether to generate the target query condition model on the data query page by modifying the first query condition model according to the update condition of the target data set relative to a first data set, wherein the first query condition model is generated according to the number and data types of different data in all data of each field in the first data set, and the first data set is a data set before the target data set.
4. The method of claim 3, wherein the determining whether to generate the target query condition model on the data query page by updating the first query condition model according to the update condition of the target data set relative to the first data set comprises:
determining whether the target data set has been updated relative to the first data set;
when it is determined that the target data set is not updated relative to the first data set, taking the first query condition model as the target query condition model; or,
upon determining that the target data set has been updated relative to the first data set, obtaining an updated portion of the target data set relative to the first data set;
and modifying the first query condition model according to the updating part to generate the target query condition model.
5. The method of claim 4, wherein the updating portion comprises: at least one of a newly added field, a deleted field, newly added data, and deleted data, wherein the modifying the first query condition model according to the updating portion to generate the target query condition model includes:
when the updating part comprises the newly added field, adding a query condition input interface generated according to the number of different data in all data under the newly added field and the data type into the first query condition model to generate the target query condition model;
when the updated part comprises the deleted field, deleting a query condition input interface corresponding to the deleted field from the first query condition model to generate the target query condition model; and/or the presence of a gas in the gas,
when the updated part comprises the added data and/or the deleted data, replacing a query condition input interface corresponding to a second field in the first query condition model by a query condition input interface generated by updating according to the number of different data in all data under the second field where the added data and/or the deleted data are located and the data type to generate the target query condition model.
6. The method of claim 2, wherein after generating the target query condition model, the method further comprises:
recording historical query conditions input by a user through a first query condition input box in the target query condition model, wherein the first query condition input box is any query condition input box in the target query condition model;
and displaying the historical query conditions when a user inputs the query conditions through the first query condition input box.
7. A data query condition generation apparatus, characterized in that the apparatus comprises:
the data set acquisition module is used for acquiring a target data set corresponding to a data query page when the data query page is opened;
the model determining module is used for determining whether a stored first query condition model exists in the data query page;
the model generation module is used for generating a target query condition model corresponding to the target data set on the data query page according to the number and the data type of different data in all data under each field in the target data set when the first query condition model is determined not to exist in the data query page; wherein the condition query model comprises one or more query condition input interfaces.
8. The apparatus of claim 7, wherein the model generation module comprises:
the quantity counting submodule is used for acquiring the quantity of first data in all data in a first field aiming at the first field in the target data set, wherein the first field is any one field in the target data set, and the first data is data which appears at least once in all data in the first field;
the option generation sub-module is used for generating a query condition option corresponding to each first data on the data query page as a query condition input interface of the target query condition model when the number of the first data is smaller than a preset number; and/or the presence of a gas in the gas,
the input box generation submodule is used for acquiring one or more data types corresponding to all the data in the first field when the number of the first data is greater than or equal to the preset number;
and generating a query condition input box used for inputting the data of the one or more data types on the data query page as a query condition input interface of the target query condition model.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 6.
CN201810616153.7A 2018-06-14 2018-06-14 Data query condition generation method and device, storage medium and electronic equipment Active CN108984623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810616153.7A CN108984623B (en) 2018-06-14 2018-06-14 Data query condition generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810616153.7A CN108984623B (en) 2018-06-14 2018-06-14 Data query condition generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108984623A true CN108984623A (en) 2018-12-11
CN108984623B CN108984623B (en) 2020-11-03

Family

ID=64540510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810616153.7A Active CN108984623B (en) 2018-06-14 2018-06-14 Data query condition generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108984623B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614197A (en) * 2018-12-14 2019-04-12 中通服公众信息产业股份有限公司 To the organization and management method of querying condition in a kind of management information system
CN111488370A (en) * 2020-04-02 2020-08-04 杭州迪普科技股份有限公司 List paging quick response system and method
CN112631921A (en) * 2020-12-28 2021-04-09 广州品唯软件有限公司 Method, system and storage medium for improving flow playback coverage
CN114547107A (en) * 2022-02-24 2022-05-27 新奥数能科技有限公司 Internet of things data query method, device, equipment and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5625813A (en) * 1994-08-27 1997-04-29 International Computers Limited Method for performing joins between different record types in a database system
US6014661A (en) * 1996-05-06 2000-01-11 Ivee Development Ab System and method for automatic analysis of data bases and for user-controlled dynamic querying
US6606622B1 (en) * 1998-07-13 2003-08-12 James M. Sorace Software method for the conversion, storage and querying of the data of cellular biological assays on the basis of experimental design
CN1549163A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Across-platform data base researching method
CN1556482A (en) * 2003-12-31 2004-12-22 中兴通讯股份有限公司 Data processing method for realizing data base multitable inguiry
CN1786955A (en) * 2004-12-06 2006-06-14 国际商业机器公司 Method and system for managing interdependent data objects
CN1987861A (en) * 2005-12-22 2007-06-27 国际商业机器公司 System and method for processing database query
US20100185658A1 (en) * 2009-01-14 2010-07-22 Bmc Software, Inc. MDR FEDERATION FACILITY FOR CMDBf
CN102708142A (en) * 2012-03-14 2012-10-03 北京神州数码思特奇信息技术股份有限公司 Method and system for acquiring background data through structured query language (SQL) custom-made template
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN103530332A (en) * 2013-09-29 2014-01-22 方正国际软件有限公司 System and method for querying data of patient
CN104281684A (en) * 2014-09-30 2015-01-14 东软集团股份有限公司 Method and system for storing and querying mass logs
CN104615602A (en) * 2013-11-05 2015-05-13 深圳中兴力维技术有限公司 Automatic generation device and method thereof for query interface
CN105160023A (en) * 2015-09-30 2015-12-16 深圳市巧捷万端云计算有限公司 Graphical data query processing method based on cloud server
CN107608669A (en) * 2017-08-15 2018-01-19 山西云度知识产权服务有限公司 A kind of method based on database table structure automatic generation function and the page
CN107656926A (en) * 2016-07-24 2018-02-02 平安科技(深圳)有限公司 Data query method and device based on sql

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5625813A (en) * 1994-08-27 1997-04-29 International Computers Limited Method for performing joins between different record types in a database system
US6014661A (en) * 1996-05-06 2000-01-11 Ivee Development Ab System and method for automatic analysis of data bases and for user-controlled dynamic querying
US6606622B1 (en) * 1998-07-13 2003-08-12 James M. Sorace Software method for the conversion, storage and querying of the data of cellular biological assays on the basis of experimental design
CN1549163A (en) * 2003-05-15 2004-11-24 深圳市中兴通讯股份有限公司南京分公 Across-platform data base researching method
CN1556482A (en) * 2003-12-31 2004-12-22 中兴通讯股份有限公司 Data processing method for realizing data base multitable inguiry
CN1786955A (en) * 2004-12-06 2006-06-14 国际商业机器公司 Method and system for managing interdependent data objects
CN1987861A (en) * 2005-12-22 2007-06-27 国际商业机器公司 System and method for processing database query
US20100185658A1 (en) * 2009-01-14 2010-07-22 Bmc Software, Inc. MDR FEDERATION FACILITY FOR CMDBf
CN102708142A (en) * 2012-03-14 2012-10-03 北京神州数码思特奇信息技术股份有限公司 Method and system for acquiring background data through structured query language (SQL) custom-made template
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN103530332A (en) * 2013-09-29 2014-01-22 方正国际软件有限公司 System and method for querying data of patient
CN104615602A (en) * 2013-11-05 2015-05-13 深圳中兴力维技术有限公司 Automatic generation device and method thereof for query interface
CN104281684A (en) * 2014-09-30 2015-01-14 东软集团股份有限公司 Method and system for storing and querying mass logs
CN105160023A (en) * 2015-09-30 2015-12-16 深圳市巧捷万端云计算有限公司 Graphical data query processing method based on cloud server
CN107656926A (en) * 2016-07-24 2018-02-02 平安科技(深圳)有限公司 Data query method and device based on sql
CN107608669A (en) * 2017-08-15 2018-01-19 山西云度知识产权服务有限公司 A kind of method based on database table structure automatic generation function and the page

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱扬勇: "《生物数据整合与挖掘》", 31 May 2009 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614197A (en) * 2018-12-14 2019-04-12 中通服公众信息产业股份有限公司 To the organization and management method of querying condition in a kind of management information system
CN111488370A (en) * 2020-04-02 2020-08-04 杭州迪普科技股份有限公司 List paging quick response system and method
CN111488370B (en) * 2020-04-02 2023-09-12 杭州迪普科技股份有限公司 List paging quick response system and method
CN112631921A (en) * 2020-12-28 2021-04-09 广州品唯软件有限公司 Method, system and storage medium for improving flow playback coverage
CN114547107A (en) * 2022-02-24 2022-05-27 新奥数能科技有限公司 Internet of things data query method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN108984623B (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN108984623B (en) Data query condition generation method and device, storage medium and electronic equipment
US20210034990A1 (en) Rule Assignments and Templating
CN103093000A (en) Database query modeling system and database query modeling method
US9692384B2 (en) System and method for audio volume control
CN112463797A (en) Report generation method, system, storage medium and electronic equipment
CN106412282B (en) A kind of real-time messages phonetic prompt method and mobile terminal
CN109739735B (en) Log generation method and device
CN107451112B (en) Form tool data checking method, device, terminal equipment and storage medium
CN109710631A (en) Auxiliary generates method, apparatus, equipment and the computer storage medium of SQL code
US20170185422A1 (en) Method and system for generating and controlling composite user interface control
US9934292B2 (en) Dynamic presentation of a results set by a form-based software application
US20090157703A1 (en) Display definitions interface for avionics communications systems
CN102622233A (en) System and method for automatically generating user interface applicable to certain interactive terminal equipment
CN113010157B (en) Code generation method and device
CN108153885B (en) Chart linkage method and device, storage medium and electronic equipment
CN108255486B (en) View conversion method and device for form design and electronic equipment
CN102662682B (en) Method and device for generating display interfaces of medical instrument
CN111124393A (en) Editing method and platform of algorithm logic, electronic equipment and storage medium
CN115658063A (en) Page information generation method, device, equipment and storage medium
CN109255104A (en) Certification template configuration method, apparatus, computer equipment and storage medium
CN111177279A (en) Form saving method and device, storage medium and electronic equipment
CN112685678A (en) Page configuration method and device, computer equipment and storage medium
CN107333183B (en) Channel sorting method and device and electronic equipment
US10614104B2 (en) Processing of data relating to entities
CN112434229B (en) Data query method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant