CN110019261B - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN110019261B
CN110019261B CN201710915097.2A CN201710915097A CN110019261B CN 110019261 B CN110019261 B CN 110019261B CN 201710915097 A CN201710915097 A CN 201710915097A CN 110019261 B CN110019261 B CN 110019261B
Authority
CN
China
Prior art keywords
condition
updated
query
data
filter
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
CN201710915097.2A
Other languages
Chinese (zh)
Other versions
CN110019261A (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710915097.2A priority Critical patent/CN110019261B/en
Publication of CN110019261A publication Critical patent/CN110019261A/en
Application granted granted Critical
Publication of CN110019261B publication Critical patent/CN110019261B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/235Update request formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Abstract

The application discloses a data query method and a data query device, wherein a filtering condition set in a data query page is monitored in an event monitoring mode, under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, the filtering condition with the changed content is determined as a filtering condition to be updated, and the changed content is determined, so that the corresponding filtering condition to be updated is updated by using the changed content, the updated query condition is obtained, the filtering condition with the changed content and other filtering conditions with unchanged content are not required to be used, the query condition is reconstructed, the time for reconstructing query and price adjustment is saved, and the data query effect is improved.

Description

Data query method and device
Technical Field
The present application relates to the field of data query technologies, and in particular, to a data query method and apparatus.
Background
In the big data era nowadays, data query has been widely applied to daily life and work of people, such as data query within a certain project preset time period, financial change data query within an enterprise in 12 months, weather change condition query within a place in 8 months, and the like, which brings great convenience to users.
In practical application, a user usually inputs corresponding query conditions according to the filtering conditions, so that the system performs data query according to the detected query conditions to obtain data required by the user, and the obtained data can be output in forms of a table, a line graph, a bar graph, a pie graph or the like, so that the user can know the data content more intuitively.
However, in actual data query applications, especially in applications for comparing data, a user is often required to determine a plurality of filtering conditions to construct a query condition, so as to search data required by the user, and when a certain filtering condition determined by the user changes, the query condition must be reconstructed, and then data query is performed again according to the newly constructed query condition, so as to meet new data query requirements of the user, which inevitably affects data query efficiency.
Therefore, how to improve the data query efficiency becomes one of the important research directions in the field.
Disclosure of Invention
In view of the above, the present application is proposed to provide a data query method and apparatus that overcomes or at least partially solves the above problems.
The embodiment of the application provides a data query method, which comprises the following steps:
monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
updating the corresponding filtering condition to be updated by using the changed content to obtain an updated query condition;
and performing data query on the queried data according to the updated query conditions, and outputting the obtained target data.
Preferably, the method further comprises:
configuring an identifier for each filter condition in the set of filter conditions;
and for each filter condition to be updated, after the filter condition to be updated is updated by using the changed content, the identifier corresponding to the filter condition to be updated is changed.
Preferably, when the number of the filter conditions to be updated is a first number, where the first number is greater than 1, before performing data query on queried data according to the updated query condition, the method further includes:
after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
Preferably, the configuring an identifier for each filtering condition in the filtering condition set includes:
adding a flag bit of 0 to each filter condition in the set of filter conditions;
accordingly, the changing the identifier corresponding to the filtering condition includes:
the flag position of the filter condition is set to 1.
Preferably, the target data obtained by outputting includes:
screening the obtained target data by using the current data variable in the data query page;
and drawing and displaying a corresponding data change trend graph by using the data obtained by screening.
An embodiment of the present application further provides a data query device, where the device includes:
the event monitoring module is used for monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
the change condition determining module is used for determining the filter condition with changed content as the filter condition to be updated according to the event under the condition of obtaining the event which indicates that the content of the filter condition in the filter condition set is changed, and determining the changed content;
the query condition updating module is used for updating the corresponding filter condition to be updated by using the changed content to obtain an updated query condition;
the data query module is used for carrying out data query on the queried data according to the updated query conditions;
and the data output module is used for outputting the obtained target data.
Preferably, the apparatus further comprises:
the identification configuration module is used for configuring an identification for each filtering condition in the filtering condition set;
and the identifier updating module is used for updating the identifier of the first filter condition to be updated after the filter condition to be updated is updated by using the changed content for each filter condition to be updated.
An embodiment of the present application further provides a data query device, where the device includes:
a display; a communication interface;
a memory for storing queried data and a program for implementing the data query method as described in any one of the above items;
a processor for loading and executing the program, comprising:
monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
updating the corresponding filtering condition to be updated by using the changed content to obtain an updated query condition;
and performing data query on the queried data according to the updated query conditions, and outputting the obtained target data.
An embodiment of the present application further provides a storage medium, where the storage medium includes a stored program, and when the program runs, the device where the storage medium is located is controlled to execute the data query method according to any one of the above.
The embodiment of the present application further provides a processor, where the processor is configured to execute a program, where the program executes the data query method according to any one of the above.
By means of the technical scheme, the data query method and the data query device provided by the application monitor the filtering condition set in the data query page in an event monitoring mode, determine the filtering condition with the changed content as the filtering condition to be updated and determine the changed content under the condition that the event indicating the content of the filtering condition in the filtering condition set is changed, accordingly update the corresponding filtering condition to be updated by using the changed content to obtain the updated query condition, do not need to use the filtering condition with the changed content and other filtering conditions with unchanged content to reconstruct the query condition, save the time for reconstructing the query price adjustment, and improve the data query effect.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a weather temperature change query interface provided by an embodiment of the present application;
FIG. 2 illustrates another weather temperature change query interface provided by an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a data query method provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a data query interface provided by an embodiment of the present application;
FIG. 5 is a flow chart of another data query method provided in the embodiments of the present application;
fig. 6 is a block diagram illustrating a data query apparatus according to an embodiment of the present application;
fig. 7 is a block diagram illustrating another data query device according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a further data query device according to an embodiment of the present application;
fig. 9 shows a hardware structure diagram of a data query device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
At present, in data query applications, especially in application scenarios where a user needs to view data comparison results, the obtained query results are often output through a visual page, and the query results can be specifically displayed by using various variation trend graphs such as tables, columns or pie charts, and curve graphs. Moreover, in order to obtain the required query result, a plurality of filtering conditions are required to be input to generate the corresponding query conditions.
For example, when the user needs to query the temperature change between 8 months 2 days to 8 months 16 days in hangzhou, the filtering condition may be selected in the query page shown in fig. 1, such as the query location hangzhou, the query start time 8 months 2 days, the query end time 8 months 16 days, and the data output form graph, and then, the user may click the "query" button, so that the system constructs a query condition according to the filtering condition determined by the user, and queries the weather database according to the query condition, thereby outputting the data meeting the query condition, such as the graph shown in fig. 1.
On the basis, the user can also change the filtering condition correspondingly according to the change of the requirement, for example, the query starting time is changed to 8 months and 8 days, and then the query can be continued according to the method to obtain a new query result, as shown in fig. 2.
Therefore, a plurality of filtering controls can be set in the data query system and respectively correspond to different filtering conditions, so that a user can directly select the corresponding filtering control to enable the system to know the filtering conditions required by the query. The application does not limit the number and types of the filtering controls presented by the data query system page, that is, the application is not limited to the control content shown in fig. 1 and fig. 2.
The applicant researches and discovers that the query method is much faster than manual query, but when a user needs to query new data and change the filter conditions in the new data, the prior art generally nulls the query conditions constructed by a plurality of filter conditions last time, and then reconstructs the query conditions to perform data query by using the obtained values of the controls corresponding to the current plurality of filter conditions. Obviously, each time the filtering condition is changed, a method for reconstructing the query condition is required, which necessarily reduces the data query performance.
In order to improve the above problem, the applicant proposes a new data query scheme, and specifically monitors a plurality of filtering conditions in a current data query page in an event monitoring manner, and once an event indicating that the content of any filtering condition changes is obtained, the filtering condition is directly updated by using the determined changed content in the embodiment of the present application, so as to obtain an updated query condition, without reconstructing a new query condition, thereby reducing the time for obtaining the new query condition, and improving the data query performance.
As shown in fig. 3, a flowchart of a data query method provided in an embodiment of the present application may include:
step S301, monitoring a filtering condition set in a data query page in a preset event monitoring mode;
in the embodiment of the present application, in combination with the above analysis, when a user needs to obtain certain query data and enters a corresponding data query page, filtering conditions can be set through corresponding filtering controls according to query requirements, so that the data query system constructs corresponding query conditions by using values of the filtering controls. It can be seen that the set of filter conditions in this embodiment may be used to construct a query condition query for performing a data query, and each filter condition may be considered as an attribute of the query condition.
For example, as shown in the schematic diagram of the data query page in fig. 4, the data query page may include a time control, a device type control, and a control for displaying a deleted entity, and the user may select the three filter conditions (which may be referred to as a filter condition set) according to actual needs. Therefore, in the application scenario, that is, when data query needs to be performed according to three filtering conditions, namely time, device type and whether to display a deleted entity, a user can set the contents of the three filtering conditions according to actual query requirements, so that the data query system can know and construct corresponding query conditions, for example, the display times and the variation trend of the click times of all devices in the period from 2017-8-2 to 2017-8-9 are queried without displaying the deleted entity.
In practical applications, when a user needs to change the content of a certain filtering condition in a current data query page due to viewing other data, for example, the user needs to query a certain type of device, and the trend of the change of the number of impressions and the number of clicks in the period from 2017-8-2 to 2017-8-9, the "all devices" in the page shown in fig. 4 can be modified into corresponding types of devices. In this case, in order to avoid reducing query performance by reconstructing the query condition after clearing the original query condition, the embodiment of the present application may detect the filtering condition set in the current data query page in real time, so as to know in time which filtering condition content in the original query condition has changed.
In this embodiment, the event may be an operation on any content of the filtering condition, that is, the content of any filtering condition changes, and the event monitoring is monitoring the operation on any content of the filtering condition.
The event monitoring method may include: directly loading events on the codes to generate effects; the preset event monitoring method is not limited in this embodiment, and may be implemented by acquiring an Object by using a DOM (Document Object Model), and loading an event.
Optionally, an event monitoring manner in which an event is directly loaded on a code is taken as an example for explanation, in this embodiment, a one-to-one corresponding event (that is, an event in which the content of the filter condition changes) may be loaded in the code of each determined filter condition, so that once the content of each filter condition is monitored or the content of an existing filter condition changes, the content may be sent to the system in an event manner.
Step S302, under the condition of obtaining an event indicating that the content of the filtering condition in the filtering condition set changes, determining the filtering condition with the changed content as the filtering condition to be updated according to the event, and determining the changed content;
in the embodiment of the present application, through the event monitoring manner, an event that the content of the preset filtering condition changes is monitored, and the content after the filtering condition changes can be obtained. Optionally, in the embodiment of the present application, the content of each filtering condition in the obtained filtering condition set may be stored, each filtering condition in the filtering condition set is detected in real time, the detected current content of each filtering condition is compared with the stored content, if the two contents are different, the content of the filtering condition is determined to have changed, and a corresponding event may be sent to the system, so that the data query system knows which filtering condition content has changed, and what content after the filtering condition has changed. It should be noted that the implementation method for monitoring the change of the filtering condition and the content of the change is not limited to the one described in the alternative embodiment.
Step S303, updating the corresponding filtering condition to be updated by using the changed content to obtain an updated query condition;
in order to solve the adverse effect of reconstructing the query condition and on the data query performance, after the content of the filter condition in the filter condition set in the data query page is known to change, that is, after the content of the filter condition to be updated is determined to be changed, the existing query condition is not cleared, but the content of the filter condition to be updated in the query condition is determined, so that the filter condition to be updated in the query condition is updated according to the obtained content of the filter condition to be updated after being changed, the updated query condition can be obtained quickly, the time spent on reconstructing the query condition is reduced, and the data query performance is improved.
And step S304, performing data query on the queried data according to the updated query conditions, and outputting the obtained target data.
The query method for the queried data according to the updated query condition is the same as the above-mentioned method for performing data query according to the original query condition, and the detailed description of the embodiment of the present application is omitted here. Further, the output form of the target data may be output in various forms of graphs, but is not limited thereto.
In summary, in the embodiment, the content of the first number of filtering conditions in the data query page is monitored in an event monitoring manner, and once an event indicating that the content of any one filtering condition changes is obtained, the filtering condition is determined as the filtering condition to be updated, and the changed content is determined, so that the content of the updated filtering condition in the existing query condition is directly updated accordingly, the query condition is reconstructed without using the filtering condition after the content changes and other filtering conditions whose content does not change, the time for reconstructing the query price is saved, and the data query effect is improved.
In order to more clearly illustrate the data query scheme provided by the embodiment of the present application, a data query scenario shown in fig. 4 is still taken as an example for description, and specifically, the query conditions currently constructed are as follows: and not displaying the deleted entities, and inquiring the change trend of the showing times and the clicking times of all the devices in the periods from 2017-8-2 to 2017-8-9. In practical application, the queried data can be queried once according to each filtering condition included in the querying condition to obtain the querying data corresponding to the filtering condition, and then the querying data simultaneously corresponding to the multiple filtering conditions is the required querying data. Therefore, the implementation can obtain all the display times and click times of all the devices, the display times and click times corresponding to the time between 2017-8-2 and 2017-8-9, hide all the deleted entities, and then obtain the display times and click times corresponding to all the devices between 2017-8-2 and 2017-8-9, namely the required query data.
Of course, in addition to the above query method, data query may be performed according to the next filtering condition on the basis of the query data obtained by using each filtering condition, so that the data obtained by the final query is the required query data. If all the display times and the click times of all the devices are obtained respectively, the display times and the click times collected in the periods from 2017-8-2 to 2017-8-9 are screened out, and the required query data is obtained. The present application does not limit how to query the queried data using the query condition including the plurality of filter conditions.
Optionally, the data obtained by query may be output in forms such as a table, a histogram, a pie chart, or a graph according to actual needs, and the output form of the data obtained by query is not limited in the present application. Moreover, the output form of the data can be set through a corresponding control set on the data query page; or, the setting may be performed in a setting page of the data query system, and at this time, the data query page may output in a preset manner without displaying a setting window of an output form.
Therefore, in the data query page shown in fig. 4, after the data of the corresponding display times and click times are obtained according to the query conditions, the display times and click times may be output according to a graph output mode default by a user or a system, such as the graph shown in fig. 4.
Optionally, for the query condition of this embodiment, a data variable, that is, how often data is obtained, may also be added, such as obtaining data hourly/daily/weekly/monthly in fig. 4, or obtaining data across days/weekly/monthly, and the like, and the content of this data variable is not limited in this application. Taking daily query as an example, when querying the number of times of display of each device in the period from 2017-8-2 to 2017-8-9, the implementation may query the number of times of display of the device once per day, so that 8 groups of display times obtained by the user for 8 days generate a display time graph as shown in fig. 4, and similarly, 8 groups of click times may be obtained, and a click time graph may be generated. Therefore, by adopting the mode, the user can intuitively know the query result by watching the display screen, and the method is very convenient.
In addition, when the user needs to see the display times and the click times of all the devices, and the user can click an hour-by-hour button in the data query page shown in fig. 4 in the period from 2017-8-2 to 2017-8-9, the system can monitor that the control value corresponding to the data span changes from day-by-day to hour-by-hour, then modify the day-by-day in the query condition into hour-by-hour, screen the data corresponding to the three filtering conditions according to hour-by-hour, and generate a new change curve by using the screened data for output.
Therefore, the obtained data variables are related to the output mode of the data obtained by query, namely, the data obtained by query are screened according to the current data variables in the data query page, so that the data obtained by screening are utilized to draw a corresponding data change trend graph, and the data change trend graph is output in the current data query page.
As another embodiment of the present application, when the determined number of the filter conditions to be updated is a first number, where the first number is greater than 1, that is, when the content of a plurality of filter conditions changes at the same time, all three filter conditions in the data query page shown in fig. 4 change, as can be known from the analysis process of the data query scheme, the present application needs to update the query conditions existing at present once after receiving an event indicating that the content of one filter condition in the filter condition set changes each time, and complete a data query by using the updated query conditions; after receiving an event indicating that the content of another filter condition in the set of filter conditions changes, the query condition still needs to be updated in this way, and data query is performed again.
Therefore, the scheme is that data is updated once when one event is monitored, and although the query condition is not required to be reconstructed, the data can still be updated for many times, so that the data query performance is low; moreover, such a way of updating data many times easily results in incorrect data obtained by querying, which further reduces data querying efficiency.
In view of the above problems, the applicant proposes to configure an identifier for each filtering condition in the data query page based on the scheme described in the embodiment corresponding to fig. 3, and determines all filtering conditions in which content changes are found and the changed content corresponding to the filtering conditions by using the identifier change condition of the filtering conditions to be updated, that is, after all filtering conditions to be updated in the original query conditions are updated, data query is performed, so that not only is the correctness of the obtained data ensured, but also the required data can be obtained by performing data query only once by updating once, and the data query efficiency is greatly improved.
Based on the above described improvement, referring to fig. 5, a flowchart of another data query method described in the embodiment of the present application is shown, where the method may include:
step S501, configuring an identifier for each filtering condition in a filtering condition set of a data query page;
in the embodiment of the present application, the content of the identifier configured for each filtering condition in the filtering condition set of the data query page is not limited, and optionally, a flag bit may be added to each filtering condition in this embodiment, for example, the flag bit to be added in the initial state is 0, and the flag bit may be set to 1 when the content of the filtering condition changes, or of course, after determining to detect the change of the content of the filtering condition, the flag bit may be directly set to 1, so that the change of the flag bit of the filtering condition indicates whether to complete the detection of the content change condition of the filtering condition.
Step S502, monitoring the filtering condition set by a preset event monitoring mode;
step S503, under the condition of obtaining the time indicating that the content of the filtering condition in the filtering condition set changes, determining the filtering condition with the changed content as the filtering condition to be updated according to the event, and determining the changed content;
in the embodiment of the present application, as to specific implementation of step S502 and step S503, reference may be made to the description of corresponding parts of step S301 and step S302, and the embodiment is not described in detail here.
Step S504, updating the corresponding filtering condition to be updated by using the changed content, and changing the identifier corresponding to the filtering condition to be updated;
in the embodiment of the present invention, the content of the change of several currently obtained filtering conditions may be counted by determining whether the identifier corresponding to the filtering condition changes with respect to the initial state, and the specific process may refer to the following description.
Step S505, under the condition that the data of the filter condition to be updated is a first quantity, counting the total number of the identifiers which are changed currently;
the first number is greater than 1, and in the embodiment of the present invention, under the condition that a plurality of filter conditions to be updated are determined, the number of filter conditions whose identifiers have changed is counted, that is, after the identifier of one filter condition to be updated is changed each time, the total number of currently changed identifiers is counted.
Step S506, judging whether the counting result is equal to the first number, if so, entering step S507; if not, returning to the step S504;
in the embodiment of the present application, in combination with the above description, the number of the filtering conditions, for which the currently obtained content of the counting result is changed, may be changed according to the obtaining of the monitoring result of the filtering conditions, but the counting result is not greater than the first number.
Step S507, according to the updated query condition, carrying out data query on the queried data;
step S508, using the current data variable in the data query page to screen the obtained target data;
and step S509, drawing and displaying a corresponding data change trend graph by using the data obtained by screening.
In summary, in the embodiment of the present application, especially when the content with multiple filtering conditions is determined to have changed, and after the changed content corresponding to the multiple filtering conditions is obtained, the updated query conditions finally obtained are used to perform one data query, data does not need to be refreshed for multiple times, so that the data query efficiency is greatly improved, and the data query performance is ensured.
Still taking the data query page shown in fig. 4 as an example, when the user needs to query the display times and the change trend of the click times of the a device in the day 2017-8-5, the user may modify the corresponding controls, and after the system obtains a new value of each control, the system updates the corresponding filter condition in the query condition according to the new value, and queries the queried data by using the obtained new query condition, that is, the display times and the change trend of the click times of the a device in the day 2017-8-5, to obtain the required target data, which is very convenient and fast in query speed.
As shown in fig. 6, a block diagram of a data query apparatus provided in an embodiment of the present application may include:
the event monitoring module 61 is configured to monitor a filtering condition set in a data query page in a preset event monitoring manner, where the filtering condition set is used to construct a query condition for performing data query;
a change condition determining module 62, configured to determine, according to an event indicating that content of a filter condition in the filter condition set changes, the filter condition with the changed content as a filter condition to be updated, and determine the changed content, when the event is obtained;
the query condition updating module 63 is configured to update the corresponding filter condition to be updated by using the changed content, so as to obtain an updated query condition;
a data query module 64, configured to perform data query on the queried data according to the updated query condition;
and a data output module 65 for outputting the obtained target data.
Therefore, in the embodiment of the application, the first number of filtering conditions in the data query page are monitored in an event monitoring mode, once an event indicating that the content of any one filtering condition changes is obtained, the content of the corresponding filtering condition in the existing query conditions is directly updated, the query conditions do not need to be reconstructed by using the filtering conditions after the content changes and other filtering conditions without changing the content, the query price adjustment reconstruction time is saved, and the data query effect is improved.
Optionally, as shown in fig. 7, the apparatus may further include:
an identifier configuration module 66 configured to configure an identifier for each filter condition in the set of filter conditions; an identifier updating module 67, configured to update, for each filter condition to be updated, an identifier of the first filter condition to be updated after the filter condition to be updated is updated with the changed content;
optionally, the identity configuration module 66 may include:
an identification determination unit, configured to add a flag bit 0 to each filter condition in the set of filter conditions;
accordingly, the identification update module 67 includes:
and the identification updating unit is used for setting the flag position of the filtering condition to be 1.
As another embodiment of the present application, in a case that the number of the filtering conditions to be updated is a first number, where the first number is greater than 1, as shown in fig. 7, the apparatus may further include:
a counting module 68, configured to count the total number of currently changed identifiers after changing one identifier of the filter condition to be updated each time;
a judging module 69, configured to judge whether the counting result is equal to the first number, and if not, trigger the query condition updating module to continue to update the filter condition to be updated that is not updated;
a determining module 610, configured to determine that the updating of the query condition is completed if the determination result is yes
As another embodiment of the present application, as shown in fig. 8, the data output module 65 includes:
the screening unit 651 is configured to screen the obtained target data by using the current data variable in the data query page;
the drawing unit 652 is configured to draw a corresponding data change trend graph by using the data obtained by the screening;
the display unit 653 is configured to display the data trend graph.
In summary, in the embodiment of the present application, especially when it is determined that the content of the multiple filtering conditions changes, after the changed content of the filtering condition to be updated, in which all the content in the current filtering condition set changes, is obtained, the finally obtained updated query condition is used to perform one data query, data does not need to be refreshed for multiple times, so that the data query efficiency is greatly improved, and the data query performance is ensured.
In practical applications, from a hardware structure, the data processing apparatus may include a processor and a memory, where the event monitoring module, the change condition determining module, the query condition updating module, the data querying module, the data outputting module, and the like are all stored in the memory as program modules, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, monitors the first quantity of filtering conditions in the data query page by adjusting kernel parameters, directly updates the corresponding filtering conditions in the query conditions after obtaining the event that the filtering conditions are changed, does not need to reconstruct the query conditions, and improves the data query performance. The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, and the program implements the data query method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the data query method is executed when the program runs.
An embodiment of the present invention provides a data query device, and as shown in fig. 9, a hardware structure diagram of the data query device may include:
the display 91, which may be a touch display screen or a non-touch display screen, in this embodiment, may be used to display a data query progress and query the obtained target data.
The communication interface 92 may be an interface of a wireless communication module such as a WIFI module, a GSM module, or a GPRS module, or may also be an interface of a wired communication module such as a USB port.
A memory 93 for storing queried data and a program for implementing the data query method according to any one of claims 1 to 5;
a processor 94 for loading and executing programs in the memory 93, comprising:
through the preset event monitoring mode, the method for monitoring the events,
monitoring a filtering condition set in a data query page, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
updating the corresponding filtering condition to be updated by using the changed content to obtain an updated query condition;
and performing data query on the queried data according to the updated query conditions, and sending the obtained target data to the display for output.
Optionally, the processor executing the program may further implement the following steps:
configuring an identifier for each filter condition in the set of filter conditions;
for each filter condition to be updated, after the filter condition to be updated is updated by using the changed content, changing the identifier corresponding to the filter condition to be updated;
under the condition that the number of the filter conditions to be updated is a first number, wherein the first number is greater than 1; after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
Optionally, the processor executes the program to implement the specific steps of the method:
adding a flag bit of 0 to each filter condition in the set of filter conditions;
accordingly, the changing the identifier corresponding to the filtering condition includes:
the flag position of the filter condition is set to 1.
Optionally, the processor executes the program to implement the specific steps of the method:
screening the obtained target data by using the current data variable in the data query page;
and drawing and displaying a corresponding data change trend graph by using the data obtained by screening.
In practical applications, the data query device may be a server, a PC, a PAD, a mobile phone, and the like, and the product type of the data query device is not limited in the present application.
Embodiments of the present application further provide a computer program product, which when executed on a data query device is adapted to perform a procedure for initializing the following method steps:
through the preset event monitoring mode, the method for monitoring the events,
monitoring a filtering condition set in a data query page, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
updating the corresponding filtering condition to be updated by using the changed content to obtain an updated query condition;
and performing data query on the queried data according to the updated query conditions, and sending the obtained target data to the display for output.
Optionally, the processor may be further adapted to execute the program with the steps of:
configuring an identifier for each filter condition in the set of filter conditions;
and for each filter condition to be updated, after the filter condition to be updated is updated by using the changed content, the identifier corresponding to the filter condition to be updated is changed.
Under the condition that the number of the filter conditions to be updated is a first number, wherein the first number is greater than 1; after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
Optionally, the processor may be further adapted to execute the program with the steps of:
adding a flag bit of 0 to each filter condition in the set of filter conditions;
accordingly, the changing the identifier corresponding to the filtering condition includes:
the flag position of the filter condition is set to 1.
Optionally, the processor may be further adapted to execute the program with the steps of:
screening the obtained target data by using the current data variable in the data query page;
and drawing and displaying a corresponding data change trend graph by using the data obtained by screening.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data querying device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (7)

1. A method for data query, the method comprising:
monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
determining the content of the filter condition to be updated in the current existing query condition, and updating the corresponding filter condition to be updated in the current existing query condition according to the obtained content of the filter condition to be updated after the filter condition to be updated is changed, so as to obtain the updated query condition;
performing data query on the queried data according to the updated query conditions, and outputting the obtained target data;
the method further comprises the following steps:
configuring an identifier for each filter condition in the set of filter conditions;
for each filter condition to be updated, after the filter condition to be updated is updated by using the changed content, changing the identifier corresponding to the filter condition to be updated;
under the condition that the number of the filter conditions to be updated is a first number, wherein the first number is greater than 1;
before performing data query on the queried data according to the updated query condition, the method further includes:
after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
2. The method of claim 1, wherein the configuring an identifier for each filter condition in the set of filter conditions comprises:
adding a flag bit of 0 to each filter condition in the set of filter conditions;
accordingly, the changing the identifier corresponding to the filtering condition includes:
the flag position of the filter condition is set to 1.
3. The method of claim 1, wherein outputting the resulting target data comprises:
screening the obtained target data by using the current data variable in the data query page;
and drawing and displaying a corresponding data change trend graph by using the data obtained by screening.
4. A data query apparatus, characterized in that the apparatus comprises:
the event monitoring module is used for monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
the change condition determining module is used for determining the filter condition with changed content as the filter condition to be updated according to the event under the condition of obtaining the event which indicates that the content of the filter condition in the filter condition set is changed, and determining the changed content;
the query condition updating module is used for determining the content of the filter condition to be updated in the current existing query condition, and updating the corresponding filter condition to be updated in the current existing query condition according to the obtained content of the filter condition to be updated after the filter condition to be updated is changed, so as to obtain the updated query condition;
the data query module is used for carrying out data query on the queried data according to the updated query conditions;
the data output module is used for outputting the obtained target data;
the device further comprises:
the identification configuration module is used for configuring an identification for each filtering condition in the filtering condition set;
the identification updating module is used for updating the identification of each filter condition to be updated after the filter condition to be updated is updated by using the changed content;
under the condition that the number of the filter conditions to be updated is a first number, wherein the first number is greater than 1;
the data query device is further configured to:
after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
5. A data query device, the device comprising:
a display; a communication interface;
a memory for storing queried data and a program for implementing the data query method according to any one of claims 1 to 3;
a processor for loading and executing the program, comprising:
monitoring a filtering condition set in a data query page in a preset event monitoring mode, wherein the filtering condition set is used for constructing query conditions for data query;
under the condition that an event indicating that the content of the filtering condition in the filtering condition set changes is obtained, determining the filtering condition with the changed content as a filtering condition to be updated according to the event, and determining the changed content;
determining the content of the filter condition to be updated in the current existing query condition, and updating the corresponding filter condition to be updated in the current existing query condition according to the obtained content of the filter condition to be updated after the filter condition to be updated is changed, so as to obtain the updated query condition;
performing data query on the queried data according to the updated query conditions, and outputting the obtained target data;
further comprising:
configuring an identifier for each filter condition in the set of filter conditions;
for each filter condition to be updated, after the filter condition to be updated is updated by using the changed content, changing the identifier corresponding to the filter condition to be updated;
under the condition that the number of the filter conditions to be updated is a first number, wherein the first number is greater than 1;
before performing data query on the queried data according to the updated query condition, the method further includes:
after changing an identifier of a filter condition to be updated each time, counting the total number of currently changed identifiers, and judging whether the counting result is equal to the first number;
determining that the updating of the query condition is completed under the condition that the judgment result is yes; otherwise, the filter condition to be updated which is not updated is continuously updated.
6. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device on which the storage medium is located is controlled to execute the data query method according to any one of claims 1-3.
7. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the data query method of any one of claims 1-3.
CN201710915097.2A 2017-09-30 2017-09-30 Data query method and device Active CN110019261B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710915097.2A CN110019261B (en) 2017-09-30 2017-09-30 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710915097.2A CN110019261B (en) 2017-09-30 2017-09-30 Data query method and device

Publications (2)

Publication Number Publication Date
CN110019261A CN110019261A (en) 2019-07-16
CN110019261B true CN110019261B (en) 2021-11-23

Family

ID=67186352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710915097.2A Active CN110019261B (en) 2017-09-30 2017-09-30 Data query method and device

Country Status (1)

Country Link
CN (1) CN110019261B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489444B (en) * 2019-08-22 2023-06-13 深圳前海环融联易信息科技服务有限公司 Asynchronous query method and device, computer equipment and storage medium
CN112559576A (en) * 2019-09-26 2021-03-26 北京国双科技有限公司 Data display method, system, device, storage medium and electronic equipment
CN112241464A (en) * 2020-05-27 2021-01-19 杭州智尔科技有限公司 Data query method and device
CN115841102A (en) * 2022-12-30 2023-03-24 深圳市金政软件技术有限公司 Method, device, equipment and storage medium for generating dynamic data report

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7634517B1 (en) * 2006-02-10 2009-12-15 Google Inc. System and method for dynamically updating a document repository without interrupting concurrent querying
EP2579167A1 (en) * 2010-09-30 2013-04-10 Huawei Device Co., Ltd. Method for active information push and server therefor
CN103136200A (en) * 2011-11-22 2013-06-05 中兴通讯股份有限公司 Data updating information obtaining method and device and data synchronization method and device
JP2014134901A (en) * 2013-01-08 2014-07-24 Fujitsu Ltd Updating method, update program and collation processing device
CN105677849A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Data updating method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8666972B2 (en) * 2009-02-12 2014-03-04 International Business Machines Corporation System and method for content management and determination of search conditions
JP4602458B2 (en) * 2009-05-25 2010-12-22 楽天株式会社 Information processing apparatus, information processing method, and information processing program
US8914364B2 (en) * 2009-08-07 2014-12-16 Sharp Kabushiki Kaisha Content notifying device, notifying method, and program
CN104620237A (en) * 2013-09-06 2015-05-13 Ips株式会社 Bill data management server and bill data management program
CN104239474B (en) * 2014-09-03 2018-05-04 百度在线网络技术(北京)有限公司 Search interface shows method and apparatus
CN106407337B (en) * 2016-09-05 2019-08-20 深圳震有科技股份有限公司 A kind of method and system of fast search

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7634517B1 (en) * 2006-02-10 2009-12-15 Google Inc. System and method for dynamically updating a document repository without interrupting concurrent querying
EP2579167A1 (en) * 2010-09-30 2013-04-10 Huawei Device Co., Ltd. Method for active information push and server therefor
CN103136200A (en) * 2011-11-22 2013-06-05 中兴通讯股份有限公司 Data updating information obtaining method and device and data synchronization method and device
JP2014134901A (en) * 2013-01-08 2014-07-24 Fujitsu Ltd Updating method, update program and collation processing device
CN105677849A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Data updating method and device

Also Published As

Publication number Publication date
CN110019261A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110019261B (en) Data query method and device
CN107391538B (en) Click data acquisition, processing and display method, device, equipment and storage medium
CN109582403B (en) Linkage display method and device for components in diagram
CN108874289B (en) Application history record viewing method and device and electronic equipment
US20140156683A1 (en) Integrating event processing with map-reduce
KR20210038454A (en) User grouping method, apparatus thereof, computer, computer-readable recording meduim and computer program
CN108255886B (en) Evaluation method and device of recommendation system
CN109582936B (en) Method and device for configuring report information
CN110806866A (en) Generation method and device of front-end management system
CN106874293B (en) Data processing method and device
CN106937173B (en) Video playing method and device
CN108920516B (en) Real-time analysis method, system, device and computer readable storage medium
CN110147183B (en) Data screening method and device
CN112559576A (en) Data display method, system, device, storage medium and electronic equipment
CN112579686A (en) Interaction method, interaction device, storage medium and electronic equipment
CN106649374B (en) Navigation tag sequencing method and device
CN107807993B (en) Method and device for realizing webpage history recording function
CN106776601B (en) Configuration method and device of search conditions
CN106600382B (en) Order information display method
CN111125157A (en) Query data processing method and device, storage medium and processor
CN108121733B (en) Data query method and device
CN115659045A (en) User operation identification method and device, storage medium and electronic equipment
CN110019198B (en) Data query method and device
CN111125504A (en) Webpage data display method and device
CN110955813A (en) Data crawling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant