Data analysis methods, devices, media and electronic equipment
By binding annotation information to the data screening conditions of the chart, the problem of annotation information not being displayed in other charts is solved, and the synchronous display and sharing of annotation information in multiple charts is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING VOLCANO ENGINE TECH CO LTD
- Filing Date
- 2022-09-29
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, annotations on charts cannot be displayed in other charts after being bound to the chart, resulting in the inability to share and utilize the annotation information.
By binding annotation information to data screening conditions on the chart, rather than binding it to the chart itself, it can determine whether the query conditions of the first chart include the condition range of the second query conditions corresponding to the annotation information, thereby enabling the annotation information to be displayed in other charts that meet the conditions.
It maximizes the use of annotation information, enabling simultaneous display in multiple charts, thus improving the efficiency of data analysis and information sharing.
Smart Images

Figure CN115510084B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of chart technology, and more specifically, to a data analysis method, apparatus, medium, and electronic device. Background Technology
[0002] like Figure 1 As shown, when performing chart data analysis, if anomalies are found in the data points on the chart, such as sudden increases or decreases in data, users need to analyze and locate the specific reasons for the anomalies. Then, they should annotate the anomaly data points on the chart, noting the specific reasons. Subsequent browsing of the chart will easily allow users to view the annotations and understand the causes of the anomalies.
[0003] In related technologies, added annotation information is bound to the chart itself. For example, the annotation information is bound to the chart ID and the chart's X-axis subscript. Then, the corresponding annotation information can be retrieved and displayed based on the chart ID and the chart's X-axis subscript. Because the annotation information is bound to the chart itself, the annotation information can only be displayed on that specific chart and cannot be applied to other charts. Summary of the Invention
[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] Firstly, this disclosure provides a data analysis method, including:
[0006] Parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart;
[0007] The annotation information of the chart and the second query condition corresponding to the annotation information are obtained from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition is the data screening condition used to screen the corresponding data points on the chart.
[0008] Determine whether the scope of the first query condition includes the scope of the second query condition corresponding to the annotation information;
[0009] If the range of the first query condition includes the range of the second query condition corresponding to the annotation information, then the annotation information is determined as the target annotation information and displayed on the first chart.
[0010] Secondly, this disclosure provides a data analysis apparatus, comprising:
[0011] The first condition parsing module is used to parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart;
[0012] The annotation information acquisition module is used to obtain the annotation information of the chart and the second query condition corresponding to the annotation information from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition represents the data screening condition used to screen the corresponding data points on the chart.
[0013] The query condition judgment module is used to determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0014] The annotation information display module is used to determine the annotation information as the target annotation information and display the target annotation information on the first chart if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0015] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0016] Fourthly, this disclosure provides an electronic device, comprising:
[0017] A storage device on which computer programs are stored;
[0018] A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0019] The above technical solution binds annotation information to the data screening conditions (i.e., query conditions) of the annotated data points on the chart, rather than binding it to the chart itself. This decouples the annotation information from the chart. By determining whether the range of the first query condition corresponding to the first chart includes the second query condition corresponding to the annotation information, when a user adds annotation information to a data point in any chart, the same annotation information can appear not only in the original chart but also in other charts that meet the conditions. Therefore, it maximizes the utilization of user annotation information and achieves data-level shared annotation information.
[0020] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0021] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0022] Figure 1 It is a diagram illustrating the annotation of data points on a chart;
[0023] Figure 2 This is a schematic diagram of an exemplary embodiment of this disclosure;
[0024] Figure 3 This is a schematic diagram of an exemplary embodiment of this disclosure;
[0025] Figure 4 This is a flowchart of a data analysis method in an exemplary embodiment of this disclosure;
[0026] Figure 5 This is yet another flowchart of a data analysis method in an exemplary embodiment of this disclosure;
[0027] Figure 6 This is a flowchart illustrating a specific implementation of step S101 in an exemplary embodiment of this disclosure;
[0028] Figure 7 This is a block diagram of a data analysis apparatus in an exemplary embodiment of the present disclosure;
[0029] Figure 8 This is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0030] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0031] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0032] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0035] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0036] Research has revealed that in related technologies, when annotation information is added to a data point on a chart, the added annotation information is bound to the chart itself. This means that the annotation information can only be displayed on that specific chart and cannot be applied to other charts. However, in some application scenarios, it is desirable to display the annotation information in other charts that contain the annotated data. But due to the limitation of the annotation information being bound to the chart, it is impossible to display the annotation information on other charts.
[0037] For example, data is screened in the database according to different data screening criteria and generated accordingly. Figure 2 and Figure 3 The chart. Among them, Figure 2 This indicates the total number of accidents with an accident level of P0 for each day whose start time falls within the range of [2020-03-01 00:00:00, 2020-03-29 23:59:59]. Figure 3 This indicates the total number of accidents of all accident levels for each day whose accident start time falls within the range of [2020-03-01 00:00:00, 2020-03-29 23:59:59].
[0038] Taking the data point where the accident started on March 3, 2020 as an example, in Figure 2In the data point where the incident started on March 3, 2020, the vertical axis corresponds to the total number of incidents at level P0. If a user discovers an anomaly at this data point, they can add a comment to the data point for March 3, 2020, to annotate the total number of incidents at level P0 on that day. Figure 3 Similarly, for the data point where the accident started on March 3, 2020, the vertical axis corresponds to the total number of accidents across all accident levels, including the total number of accidents at all levels such as P0, P1, and P2. It can be seen that... Figure 3 The data points from March 3, 2020 contain information including Figure 2 Information on data points from March 3, 2020.
[0039] So, for Figure 2 The annotations added above should be displayed synchronously on [the screen / platform]. Figure 3 At the corresponding data point, for example Figure 3 The same annotation information should also be displayed at the data point where the accident started on March 3, 2020.
[0040] In response, this disclosure provides a data analysis method that binds annotation information to query conditions, enabling the annotation information to be applied to other charts. Figure 4 A flowchart of a data analysis method in an exemplary embodiment is shown, such as Figure 4 As shown, the method includes:
[0041] S101, parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart.
[0042] For example, data is screened in the database based on SQL (Structured Query Language) query statements and a first chart is generated. After the first chart is generated, the first query condition corresponding to the first chart is parsed. The first query condition is determined based on the SQL query condition and represents the data screening condition used to screen the data and generate the first chart.
[0043] The first query condition includes source condition, selection condition, filter condition, and grouping condition, which correspond to the conditions represented by the from clause, select clause, where clause, and group clause in the SQL query statement, respectively.
[0044] S102, retrieve the chart annotation information and the corresponding second query conditions from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query conditions represent the data screening conditions used to screen the corresponding data points on the chart.
[0045] For example, before generating the first chart, data is screened in the database based on an SQL query to generate the second chart. After generating the second chart, business annotations added by the user for data points on the second chart are received to obtain the annotation information. The data screening conditions corresponding to the annotated data points on the second chart are parsed to obtain the second query conditions. The annotation information and the second query conditions are then bound and stored in the database. Thus, multiple annotation information and their corresponding second query conditions are stored in the database.
[0046] The second query condition includes source conditions, selection conditions, filtering conditions, and grouping conditions.
[0047] S103, determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information; if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information, proceed to step S104.
[0048] S104, the annotation information is identified as the target annotation information, and the target annotation information is displayed on the first chart.
[0049] In the above steps, if the condition range of the first query condition of the first chart includes the condition range of the second query condition of the annotation information, it is considered that the data point information of the first chart contains the information of the annotated data point corresponding to the annotation information. Therefore, the annotation information is synchronously displayed on the first chart.
[0050] Based on the above technical solution, annotation information is bound to the data screening conditions (i.e., query conditions) of the annotated data points on the chart, rather than to the chart itself. This decouples the annotation information from the chart. By determining whether the range of the first query condition corresponding to the first chart includes the second query condition corresponding to the annotation information, when a user adds annotation information to a data point in any chart, the same annotation information can appear not only in the original chart but also in other charts that meet the conditions. Therefore, the utilization of user annotation information is maximized, achieving annotation information sharing at the data level.
[0051] To facilitate understanding of this technical solution, a detailed description of the technical solution is provided below.
[0052] Figure 5 Another flowchart of a data analysis method in an exemplary embodiment is shown, which can be understood to mean that... Figure 5 This illustrates the process of determining the second query condition corresponding to a comment added to the second chart. (Refer to...) Figure 5 The method also includes:
[0053] S201, parse the chart configuration of the second chart to obtain the source conditions and filter conditions corresponding to the second chart.
[0054] For example, with Figure 2 As the second chart, after receiving the business annotations added by the user to the data point on the second chart for the incident start time of 2020-03-03, the chart configuration of the second chart is parsed to obtain the corresponding source conditions and filter conditions for the second chart, resulting in:
[0055] Source criteria: Accident report;
[0056] Screening criteria: Accident start time between [2020-03-01 00:00:00, 2020-03-29 23:59:59], Accident level = P0.
[0057] S202, parse the x-coordinate of the annotated data points to obtain the corresponding filtering and grouping conditions for the data points.
[0058] For example, by parsing the x-coordinate of the annotated data point, the corresponding filter and grouping conditions can be obtained, resulting in:
[0059] Screening criteria: Accident start time (days) = 2020-03-03;
[0060] Grouping criteria: Accident start time (day) = 2020-03-03.
[0061] S203, parse the ordinate of the annotated data points to obtain the selection criteria corresponding to the data points.
[0062] For example, by parsing the ordinate of the annotated data point, the selection criteria corresponding to that data point can be obtained, resulting in:
[0063] Selection criterion: Total number of accidents.
[0064] It should be noted that the execution order of the above steps S201 to S203 is not limited.
[0065] S204, merge the filter conditions corresponding to the second chart with the filter conditions corresponding to the data points into the final filter conditions.
[0066] In the steps described above, after obtaining the filter conditions corresponding to the second chart and the filter conditions corresponding to the annotated data points, the two filter conditions need to be merged. The merging rule is: the filter conditions corresponding to the second chart are used as a supplement to the filter conditions corresponding to the annotated data points. For example, from the filter conditions corresponding to the second chart, target filter conditions that do not exist in the filter conditions corresponding to the data points are determined, and the target filter conditions are merged with the filter conditions corresponding to the data points to obtain the final filter conditions.
[0067] Combining the two filtering criteria above, we get:
[0068] Final screening criteria: Accident start time (day) = 2020-03-03, Accident level = P0.
[0069] S205 uses the source condition, grouping condition, selection condition, and final filtering condition as the second query condition.
[0070] It is worth noting that in the second query condition, the source condition represents the data table being queried, the filter condition corresponding to the second chart represents the condition for filtering data from the queried data table, the filter condition corresponding to the data point is the same as its grouping condition, the grouping condition corresponding to the data point represents the condition for grouping the filtered data and corresponding to the group to which the data point belongs, and the selection condition represents the statistical output indicator after performing statistics on the group corresponding to the data point.
[0071] Based on the above example, the second query condition corresponding to this annotation information is:
[0072] Source criteria: Accident report;
[0073] Screening criteria: Accident start time (days) = 2020-03-03, Accident level = P0;
[0074] Grouping criteria: Accident start time (day) = 2020-03-03;
[0075] Selection criterion: Total number of accidents.
[0076] Therefore, the annotation information and the second query condition are bound and stored in the database.
[0077] Furthermore, Figure 6 A flowchart illustrating a specific implementation of parsing the first query condition of the first graph in step S101 is shown, as follows: Figure 6 As shown, step S101 includes:
[0078] S301, parse the chart configuration of the first chart to obtain the source conditions and filter conditions corresponding to the first chart.
[0079] For example, with Figure 3As the first chart, after generating the first chart, its chart configuration is parsed to obtain the corresponding source conditions and filter conditions, resulting in:
[0080] Source criteria: Accident report;
[0081] Filtering criteria: Accident start time between [2020-03-01 00:00:00, 2020-03-29 23:59:59].
[0082] S302, parse the x-coordinate of each data point on the first chart to obtain the grouping conditions corresponding to each data point, and merge the grouping conditions corresponding to each data point into the total grouping conditions.
[0083] First, analyze the x-coordinate of each data point on the first chart to obtain the grouping conditions corresponding to each data point. Then:
[0084] Grouping criteria for data point 1: Accident start time (days) = 2020-03-01;
[0085] Grouping criteria for data point 2: Accident start time (days) = 2020-03-02;
[0086] ...
[0087] Grouping condition for data point n: Day of the accident start event = 2020-03-29.
[0088] Then, the grouping conditions corresponding to each data point are combined into a total grouping condition, which yields:
[0089] The overall grouping criteria are: the day the accident started (in [2020-03-01, 2020-03-02, 2020-03-03, ..., 2020-03-29]).
[0090] S303, parse the vertical axis of the first chart to obtain the selection criteria corresponding to the first chart.
[0091] By analyzing the vertical axis of the first chart, we can obtain the selection criteria corresponding to the first chart, which yields:
[0092] Selection criterion: Total number of accidents.
[0093] It should be noted that the execution order of the above steps S301 to S303 is not limited.
[0094] S304, take the source condition, selection condition, filter condition and overall grouping condition as the first query condition corresponding to the first chart.
[0095] It is worth noting that in the first query condition, the source condition represents the data table being queried, the filter condition represents the conditions for filtering data from the queried data table, the grouping condition represents the conditions for grouping the filtered data, each group corresponds to a data point on the first chart, and the selection condition represents the statistical output indicators after statistical analysis of each group.
[0096] Based on the above example, the first query condition corresponding to the first chart is:
[0097] Source criteria: Accident report;
[0098] Screening criteria: Accident start time between [2020-03-01 00:00:00, 2020-03-29 23:59:59];
[0099] Grouping criteria: Accident start time in [2020-03-01, 2020-03-02, 2020-03-03, ..., 2020-03-29];
[0100] Selection criterion: Total number of accidents.
[0101] Further, in step S103, it is necessary to determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0102] In an optional embodiment, firstly, based on the second query conditions corresponding to each acquired annotation information, annotation information that is identical to the source conditions and selection conditions in the first query conditions is determined from each annotation information as candidate annotation information. Then, for each candidate annotation information, the filtering conditions and grouping conditions in the first query conditions are compared with the filtering conditions and grouping conditions in the second query conditions corresponding to that candidate annotation information. When the comparison result simultaneously satisfies the following conditions, it is determined that the condition range of the first query conditions includes the condition range of the second query conditions corresponding to that candidate annotation information:
[0103] Condition 1: The number of filter conditions in the first query condition is less than or equal to the number of filter conditions in the second query condition;
[0104] Condition 2: The number of grouping conditions in the first query condition is less than or equal to the number of grouping conditions in the second query condition;
[0105] Condition 3: The range of each filter condition in the first query condition includes the range of the corresponding filter condition in the second query condition;
[0106] Condition 4: The range of each grouping condition in the first query condition includes the range of the corresponding grouping condition in the second query condition.
[0107] The above method can be used to determine whether the condition range of the first query condition of the first chart includes the condition range of the second query condition of the annotation information.
[0108] Based on the above example, Table 1 shows a comparison diagram of the first query condition corresponding to the first chart and the second query condition corresponding to a certain batch of annotation information.
[0109]
[0110] Table 1
[0111] First, based on the second query conditions corresponding to each obtained annotation information, the annotation information that is the same as the source conditions and selection conditions in the first query conditions is determined from each annotation information. Since the annotation information in Table 1 has the same source conditions and selection conditions as the source conditions and selection conditions in the first query conditions, it is used as candidate annotation information.
[0112] For the candidate annotation information, the filtering and grouping conditions in the first query condition are compared with the filtering and grouping conditions in the second query condition corresponding to the candidate annotation information.
[0113] According to Table 1, the number of filter conditions in the first query condition is 1, and the number of filter conditions in the second query condition is 2, so condition 1 is satisfied.
[0114] According to Table 1, the number of grouping conditions in the first query condition is 1, and the number of grouping conditions in the second query condition is 1, so condition 2 is satisfied.
[0115] According to Table 1, for the filtering conditions, the range of the filtering conditions in the first query condition is "accident start time between [2020-03-01 00:00:00, 2020-03-29 23:59:59]", and the range of the corresponding filtering conditions in the second query condition is "accident start time day = 2020-03-03". The range of the former includes the range of the latter, so condition 3 is satisfied.
[0116] According to Table 1, regarding the grouping conditions, the range of the grouping condition in the first query condition is "accident start time day in [2020-03-01, 2020-03-02, 2020-03-03, ..., 2020-03-29]", and the range of the corresponding grouping condition in the second query condition is "accident start time day = 2020-03-03". The range of the former includes the range of the latter, so condition 4 is satisfied.
[0117] Therefore, the condition range of the first query condition of the first chart is determined to include the condition range of the second query condition of the candidate annotation information. Thus, the candidate annotation information is determined as the target annotation information, and the target annotation information is then displayed in the first chart.
[0118] In an exemplary embodiment, step S104, displaying the target annotation information on the first chart specifically includes: determining the target data point on the first chart corresponding to the grouping condition according to the grouping condition in the second query condition corresponding to the target annotation information, wherein the grouping condition can be used to indicate the horizontal coordinate of the target data point, and displaying the target annotation information on the first chart for the target data point.
[0119] Therefore, users Figure 2 After adding business annotations to the data points on the second chart showing the incident start time of March 3, 2020, in the generated... Figure 3 After displaying the first chart, the corresponding business annotations can be synchronously displayed on the first chart for the data points with the incident start time of 2020-03-03, making it convenient for users to view the annotations about the total number of incidents with the incident start time of 2020-03-03 when browsing the first chart.
[0120] Understandable. Figure 2 and Figure 3 As merely an example of one possible scenario in this embodiment, in actual circumstances, the first and second charts may be line charts, with the data points on the charts being the curve points on the curves; the first and second charts may also be bar charts, with the data points on the charts being the bar data points on the bar charts.
[0121] Figure 7 A block diagram of a data analysis apparatus in an exemplary embodiment is shown. Please refer to... Figure 7 The data analysis device 400 includes:
[0122] The first condition parsing module 401 is used to parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart.
[0123] The annotation information acquisition module 402 is used to obtain the annotation information of the chart and the second query condition corresponding to the annotation information from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition represents the data screening condition used to screen the corresponding data points on the chart.
[0124] The query condition judgment module 403 is used to determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0125] The annotation information display module 404 is used to determine the annotation information as the target annotation information and display the target annotation information on the first chart if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0126] Optionally, the first condition parsing module 401 includes:
[0127] The first chart parsing module is used to parse the chart configuration of the first chart to obtain the source conditions and filtering conditions corresponding to the first chart.
[0128] The first coordinate parsing module is used to parse the x-coordinate of each data point on the first chart, obtain the grouping conditions corresponding to each data point, and merge the grouping conditions corresponding to each data point into the total grouping conditions.
[0129] The second coordinate parsing module is used to parse the vertical coordinate of the first chart to obtain the selection conditions corresponding to the first chart;
[0130] The first condition acquisition module is used to take the source condition, the selection condition, the filtering condition and the total grouping condition as the first query condition corresponding to the first chart;
[0131] Wherein, the source condition represents the data table being queried, the filtering condition represents the condition for filtering data from the queried data table, the grouping condition represents the condition for grouping the filtered data, each group corresponds to a data point on the first chart, and the selection condition represents the statistical output index after statistical analysis of each group.
[0132] Optionally, the query condition judgment module 403 includes:
[0133] The candidate annotation determination module is used to determine, based on the second query conditions corresponding to each of the acquired annotation information, the annotation information that is the same as the source conditions and selection conditions in the first query conditions, and to use it as candidate annotation information.
[0134] The query condition comparison module is used to compare the filtering and grouping conditions in the first query condition with the filtering and grouping conditions in the second query condition corresponding to the candidate annotation information, respectively, for the candidate annotation information; and when the comparison result simultaneously satisfies the following conditions, it is determined that the condition range of the first query condition includes the condition range of the second query condition corresponding to the candidate annotation information:
[0135] The number of filter conditions in the first query condition is less than or equal to the number of filter conditions in the second query condition;
[0136] The number of grouping conditions in the first query condition is less than or equal to the number of grouping conditions in the second query condition;
[0137] The range of each filter condition in the first query condition includes the range of the corresponding filter condition in the second query condition;
[0138] The range of each grouping condition in the first query condition includes the range of the corresponding grouping condition in the second query condition.
[0139] Optionally, the data analysis device 400 further includes:
[0140] The annotation information receiving module is used to receive the business annotations added by users for the data points on the second chart and obtain the annotation information.
[0141] The second condition parsing module is used to parse the data screening conditions corresponding to the annotated data points on the second chart to obtain the second query conditions.
[0142] The binding storage module is used to bind and store the annotation information with the second query condition in the database.
[0143] Optionally, the second condition parsing module includes:
[0144] The second chart parsing module is used to parse the chart configuration of the second chart to obtain the source conditions and filtering conditions corresponding to the second chart;
[0145] The third coordinate parsing module is used to parse the x-coordinate of the annotated data points to obtain the filtering and grouping conditions corresponding to the data points.
[0146] The fourth coordinate parsing module is used to parse the ordinate of the annotated data points to obtain the selection conditions corresponding to the data points;
[0147] The filter condition merging module is used to merge the filter conditions corresponding to the second chart with the filter conditions corresponding to the data points into the final filter conditions.
[0148] The second condition acquisition module is used to take the source condition, the grouping condition, the selection condition, and the final filtering condition as the second query condition;
[0149] Wherein, the source condition represents the data table being queried, the filtering condition corresponding to the second chart represents the condition for filtering data from the queried data table, the filtering condition corresponding to the data point is the same as its grouping condition, the grouping condition corresponding to the data point represents the condition for grouping the filtered data and corresponding to the group to which the data point belongs, and the selection condition represents the statistical output indicator after statistical analysis of the group corresponding to the data point.
[0150] Optionally, the filter condition merging module is used to: determine, from the filter conditions corresponding to the second chart, a target filter condition that does not exist in the filter conditions corresponding to the data point; merge the target filter condition with the filter conditions corresponding to the data point to obtain the final filter condition.
[0151] Optionally, the annotation information display module 404 is used to: determine the target data point on the first chart corresponding to the grouping condition according to the grouping condition in the second query condition corresponding to the target annotation information; and display the target annotation information on the first chart for the target data point.
[0152] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0153] In one exemplary embodiment, a computer-readable medium is also provided, on which a computer program is stored, which, when executed by a processing device, implements the steps of the data analysis method in the foregoing method embodiments.
[0154] In one exemplary embodiment, an electronic device is also provided, comprising:
[0155] A storage device on which computer programs are stored;
[0156] A processing device is configured to execute the computer program in the storage device to implement the steps of the data analysis method in the foregoing method embodiments.
[0157] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0158] like Figure 8 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0159] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0160] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0161] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0162] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0163] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: parse a first query condition corresponding to a first chart, wherein the first query condition represents a data screening condition used to screen data and generate the first chart; obtain annotation information of the chart and a second query condition corresponding to the annotation information from a database, wherein the annotation information is business annotation content added for data points on the chart, and the second query condition represents a data screening condition used to screen data and generate corresponding data points on the chart; determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information; if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information, then determine the annotation information as target annotation information and display the target annotation information on the first chart.
[0164] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0166] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules are not necessarily limiting in certain circumstances; for example, the first condition parsing module can also be described as "a module that parses the first query condition corresponding to the first chart".
[0167] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0168] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0169] According to one or more embodiments of this disclosure, Example 1 provides a data analysis method, including:
[0170] Parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart;
[0171] The annotation information of the chart and the second query condition corresponding to the annotation information are obtained from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition is the data screening condition used to screen the corresponding data points on the chart.
[0172] Determine whether the scope of the first query condition includes the scope of the second query condition corresponding to the annotation information;
[0173] If the range of the first query condition includes the range of the second query condition corresponding to the annotation information, then the annotation information is determined as the target annotation information and displayed on the first chart.
[0174] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein parsing the first query condition corresponding to the first chart includes:
[0175] Parse the chart configuration of the first chart to obtain the source conditions and filter conditions corresponding to the first chart;
[0176] Analyze the x-coordinate of each data point on the first chart to obtain the grouping conditions corresponding to each data point, and merge the grouping conditions corresponding to each data point into the total grouping conditions;
[0177] Analyze the vertical axis of the first chart to obtain the selection criteria corresponding to the first chart;
[0178] The source conditions, selection conditions, filtering conditions, and overall grouping conditions are used as the first query conditions corresponding to the first chart.
[0179] Wherein, the source condition represents the data table being queried, the filtering condition represents the condition for filtering data from the queried data table, the grouping condition represents the condition for grouping the filtered data, each group corresponds to a data point on the first chart, and the selection condition represents the statistical output index after statistical analysis of each group.
[0180] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, wherein determining whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information includes:
[0181] Based on the second query conditions corresponding to each obtained annotation information, the annotation information that is the same as the source conditions and selection conditions in the first query conditions is determined from each annotation information and used as candidate annotation information;
[0182] For the candidate annotation information, the filtering conditions and grouping conditions in the first query condition are compared with the filtering conditions and grouping conditions in the second query condition corresponding to the candidate annotation information, respectively;
[0183] When the comparison result simultaneously meets the following conditions, it is determined that the condition range of the first query condition includes the condition range of the second query condition corresponding to the candidate annotation information:
[0184] The number of filter conditions in the first query condition is less than or equal to the number of filter conditions in the second query condition;
[0185] The number of grouping conditions in the first query condition is less than or equal to the number of grouping conditions in the second query condition;
[0186] The range of each filter condition in the first query condition includes the range of the corresponding filter condition in the second query condition;
[0187] The range of each grouping condition in the first query condition includes the range of the corresponding grouping condition in the second query condition.
[0188] According to one or more embodiments of this disclosure, Example 4 provides a method of any of Examples 1 to 3, the method further comprising:
[0189] Receive the business annotations added by the user for the data points on the second chart, and obtain the annotation information;
[0190] The data screening conditions corresponding to the annotated data points on the second chart are analyzed to obtain the second query conditions;
[0191] The annotation information is bound and stored in the database along with the second query condition.
[0192] According to one or more embodiments of this disclosure, Example 5 provides the method of Example 4, wherein parsing the data screening conditions corresponding to the annotated data points on the second chart to obtain the second query conditions includes:
[0193] Parse the chart configuration of the second chart to obtain the source conditions and filter conditions corresponding to the second chart;
[0194] Analyze the x-coordinate of the annotated data points to obtain the corresponding filtering and grouping conditions for the data points;
[0195] Analyze the ordinate of the annotated data points to obtain the selection criteria corresponding to the data points;
[0196] The filter criteria corresponding to the second chart and the filter criteria corresponding to the data points are combined into the final filter criteria.
[0197] The source condition, the grouping condition, the selection condition, and the final filtering condition are used as the second query condition;
[0198] Wherein, the source condition represents the data table being queried, the filtering condition corresponding to the second chart represents the condition for filtering data from the queried data table, the filtering condition corresponding to the data point is the same as its grouping condition, the grouping condition corresponding to the data point represents the condition for grouping the filtered data and corresponding to the group to which the data point belongs, and the selection condition represents the statistical output indicator after statistical analysis of the group corresponding to the data point.
[0199] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 5, wherein merging the filter conditions corresponding to the second chart and the filter conditions corresponding to the data points into the final filter conditions includes:
[0200] From the filter conditions corresponding to the second chart, determine the target filter conditions that do not exist in the filter conditions corresponding to the data points;
[0201] The target filtering criteria are combined with the filtering criteria corresponding to the data points to obtain the final filtering criteria.
[0202] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 5, wherein displaying the target annotation information on the first chart includes:
[0203] Based on the grouping conditions in the second query conditions corresponding to the target annotation information, determine the target data points on the first chart that correspond to the grouping conditions;
[0204] The target annotation information is displayed on the first chart for the target data point.
[0205] According to one or more embodiments of this disclosure, Example 8 provides a data analysis apparatus, including:
[0206] The first condition parsing module is used to parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart;
[0207] The annotation information acquisition module is used to obtain the annotation information of the chart and the second query condition corresponding to the annotation information from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition represents the data screening condition used to screen the corresponding data points on the chart.
[0208] The query condition judgment module is used to determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0209] The annotation information display module is used to determine the annotation information as the target annotation information and display the target annotation information on the first chart if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information.
[0210] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the method of any of Examples 1 to 7.
[0211] According to one or more embodiments of this disclosure, Example 10 provides an electronic device, including:
[0212] A storage device on which computer programs are stored;
[0213] A processing device for executing the computer program in the storage device to implement the method of any of the examples 1 to 7.
[0214] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0215] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0216] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A data analysis method, characterized in that, include: Parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart; The annotation information of the chart and the second query condition corresponding to the annotation information are obtained from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition is the data screening condition used to screen the corresponding data points on the chart. Determine whether the scope of the first query condition includes the scope of the second query condition corresponding to the annotation information; If the range of the first query condition includes the range of the second query condition corresponding to the annotation information, then the annotation information is determined as the target annotation information and the target annotation information is displayed on the first chart. The first query condition corresponding to the first chart is parsed, including: Parse the chart configuration of the first chart to obtain the source conditions and filter conditions corresponding to the first chart; Analyze the x-coordinate of each data point on the first chart to obtain the grouping conditions corresponding to each data point, and merge the grouping conditions corresponding to each data point into the total grouping conditions; Analyze the vertical axis of the first chart to obtain the selection criteria corresponding to the first chart; The source conditions, selection conditions, filtering conditions, and overall grouping conditions are used as the first query conditions corresponding to the first chart. Wherein, the source condition represents the data table being queried, the filtering condition represents the condition for filtering data from the queried data table, the grouping condition represents the condition for grouping the filtered data, each group corresponds to a data point on the first chart, and the selection condition represents the statistical output index after statistical analysis of each group.
2. The method according to claim 1, characterized in that, The step of determining whether the range of the first query condition includes the range of the second query condition corresponding to the annotation information includes: Based on the second query conditions corresponding to each obtained annotation information, the annotation information that is the same as the source conditions and selection conditions in the first query conditions is determined from each annotation information and used as candidate annotation information; For the candidate annotation information, the filtering conditions and grouping conditions in the first query condition are compared with the filtering conditions and grouping conditions in the second query condition corresponding to the candidate annotation information, respectively; When the comparison result simultaneously meets the following conditions, it is determined that the condition range of the first query condition includes the condition range of the second query condition corresponding to the candidate annotation information: The number of filter conditions in the first query condition is less than or equal to the number of filter conditions in the second query condition; The number of grouping conditions in the first query condition is less than or equal to the number of grouping conditions in the second query condition; The range of each filter condition in the first query condition includes the range of the corresponding filter condition in the second query condition; The range of each grouping condition in the first query condition includes the range of the corresponding grouping condition in the second query condition.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Receive the business annotations added by the user for the data points on the second chart, and obtain the annotation information; The data screening conditions corresponding to the annotated data points on the second chart are analyzed to obtain the second query conditions; The annotation information is bound and stored in the database along with the second query condition.
4. The method according to claim 3, characterized in that, The process of parsing the data screening conditions corresponding to the annotated data points on the second chart to obtain the second query conditions includes: Parse the chart configuration of the second chart to obtain the source conditions and filter conditions corresponding to the second chart; Analyze the x-coordinate of the annotated data points to obtain the corresponding filtering and grouping conditions for the data points; Analyze the ordinate of the annotated data points to obtain the selection criteria corresponding to the data points; The filter criteria corresponding to the second chart and the filter criteria corresponding to the data points are combined into the final filter criteria. The source condition, the grouping condition, the selection condition, and the final filtering condition are used as the second query condition; Wherein, the source condition represents the data table being queried, the filtering condition corresponding to the second chart represents the condition for filtering data from the queried data table, the filtering condition corresponding to the data point is the same as its grouping condition, the grouping condition corresponding to the data point represents the condition for grouping the filtered data and corresponding to the group to which the data point belongs, and the selection condition represents the statistical output indicator after statistical analysis of the group corresponding to the data point.
5. The method according to claim 4, characterized in that, The step of merging the filter conditions corresponding to the second chart and the filter conditions corresponding to the data points into the final filter conditions includes: From the filter conditions corresponding to the second chart, determine the target filter conditions that do not exist in the filter conditions corresponding to the data points; The target filtering criteria are combined with the filtering criteria corresponding to the data points to obtain the final filtering criteria.
6. The method according to claim 4, characterized in that, The step of displaying the target annotation information on the first chart includes: Based on the grouping conditions in the second query conditions corresponding to the target annotation information, determine the target data points on the first chart that correspond to the grouping conditions; The target annotation information is displayed on the first chart for the target data point.
7. A data analysis device, characterized in that, include: The first condition parsing module is used to parse the first query condition corresponding to the first chart, wherein the first query condition represents the data screening condition used to screen data to generate the first chart; The annotation information acquisition module is used to obtain the annotation information of the chart and the second query condition corresponding to the annotation information from the database. The annotation information is the business annotation content added to the data points on the chart, and the second query condition represents the data screening condition used to screen the corresponding data points on the chart. The query condition judgment module is used to determine whether the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information. The annotation information display module is used to determine the annotation information as the target annotation information and display the target annotation information on the first chart if the condition range of the first query condition includes the condition range of the second query condition corresponding to the annotation information. The first condition parsing module includes: The first chart parsing module is used to parse the chart configuration of the first chart to obtain the source conditions and filtering conditions corresponding to the first chart. The first coordinate parsing module is used to parse the x-coordinate of each data point on the first chart, obtain the grouping conditions corresponding to each data point, and merge the grouping conditions corresponding to each data point into the total grouping conditions. The second coordinate parsing module is used to parse the vertical coordinate of the first chart to obtain the selection conditions corresponding to the first chart; The first condition acquisition module is used to take the source condition, the selection condition, the filtering condition and the total grouping condition as the first query condition corresponding to the first chart; Wherein, the source condition represents the data table being queried, the filtering condition represents the condition for filtering data from the queried data table, the grouping condition represents the condition for grouping the filtered data, each group corresponds to a data point on the first chart, and the selection condition represents the statistical output index after statistical analysis of each group.
8. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processing device, it implements the steps of the method described in any one of claims 1 to 6.
9. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.