Database monitoring general chart interface implementation method based on Java

Through the Java-based database monitoring general chart interface, the chart request information is received and the process is filtered, and the target chart data is called to call the built-in process to generate target chart data, which solves the problem of low chart development efficiency and realizes efficient chart generation.

CN120448447APending Publication Date: 2025-08-08TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510942083.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, chart development is inefficient, and it is necessary to implement a set of data query, assembly and matching data export functions for each chart.

Method used

Provides a Java-based database monitoring universal chart interface, which generates target chart data by receiving chart request information, filtering and processing chart parameters, calling the built-in chart processing flow of the general chart interface.

Benefits of technology

Improves chart generation efficiency, reduces duplicate development of code, and simplifies the process of chart data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448447A_ABST
    Figure CN120448447A_ABST
Patent Text Reader

Abstract

The invention provides a Java-based database monitoring general chart interface implementation method, which comprises the following steps of: receiving chart request information which comprises a chart identifier and a chart parameter; the chart parameters are filtered, target chart parameters are generated, the target chart parameters are parameters conforming to general chart rules, and the general chart rules are rules for processing charts through a general chart interface; calling a chart processing flow built in the general chart interface, and processing the target chart parameters to generate chart data; and generating a target chart according to the chart data. The chart processing flow is built in the general chart interface, and the chart parameters are processed by calling the chart processing flow built in the general chart interface, so that the target chart is generated, and the chart generation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of application development, and in particular to a method for implementing a general chart interface for database monitoring based on Java. Background Art

[0002] Data visualization is an important component in software development, which can help users understand complex data and information more intuitively.

[0003] Currently, chart development requires implementing a set of data query, assembly, and matching data export functions for each chart, resulting in low chart development efficiency. Summary of the Invention

[0004] To achieve the above object, the technical solution of the present invention is achieved as follows: The present invention provides a Java-based database monitoring universal chart interface implementation method, which can solve the problem of low chart development efficiency.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows: The present invention provides a Java-based database monitoring universal chart interface implementation method, comprising: receiving a chart request message, wherein the request message includes a chart identifier and chart parameters; Filtering the chart parameters to generate target chart parameters, where the target chart parameters are parameters that comply with general chart rules, and the general chart rules are rules for processing charts through a general chart interface; Calling the chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; A target chart is generated according to the chart data.

[0006] Furthermore, the calling of the built-in chart processing flow of the universal chart interface to process the target chart parameters and generate chart data includes: Calling a chart processing flow built into the universal chart interface to filter the target chart parameters and generate first target chart data; The first target chart data are assembled to generate second target chart data.

[0007] Furthermore, assembling the first target chart data to generate second target chart data includes: When the first target chart data average value is greater than a first preset unit conversion value, the first target chart data is converted to generate second target chart data, wherein the data unit of the second target chart data is a second preset unit having a unit level higher than the first preset unit.

[0008] Furthermore, the request information includes a chart type, and the assembling of the first target chart data to generate the second target chart data further includes: The first target chart data is converted to generate second target chart data, where the second target chart data is chart data in a data format that complies with the chart type.

[0009] Furthermore, the target chart is in CSV or Excel format.

[0010] Furthermore, the chart of the chart interface implementation method is implemented by a chart generating device, which includes: A receiving module, configured to receive chart request information, wherein the request information includes a chart identifier and chart parameters; A first processing module is configured to filter the chart parameters to generate target chart parameters, wherein the target chart parameters are parameters that comply with general chart rules, and the general chart rules are rules for processing charts in a general chart interface; a second processing module, configured to call a chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; A generating module is used to generate a target chart based on the chart data.

[0011] Furthermore, the second processing module includes: A first processing submodule is configured to call a chart processing flow built into the universal chart interface, filter the chart data, and generate first target chart data; The second processing submodule is used to assemble the first target chart data to generate second target chart data.

[0012] Furthermore, the second processing submodule includes: A processing unit is configured to convert the first target chart data to generate second target chart data when the average value of the first target chart data is greater than a first preset unit conversion value, wherein the data unit of the second target chart data is a second preset unit with a unit level higher than the first preset unit.

[0013] Compared with the existing technology, the Java-based database monitoring universal chart interface implementation method described in the present invention has the following advantages: The present invention discloses a Java-based method for implementing a universal chart interface for database monitoring. The method comprises receiving chart request information, the request information including a chart identifier and chart parameters; filtering the chart parameters to generate target chart parameters, wherein the target chart parameters are parameters that comply with universal chart rules, which are rules for processing charts through a universal chart interface; invoking a chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; and generating a target chart based on the chart data. Because the universal chart interface has a built-in chart processing flow, invoking the built-in chart processing flow to process chart parameters and thereby generate a target chart can improve chart generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings, which constitute part of the present invention, are provided to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are provided to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a method for generating a chart according to an embodiment of the present invention; Figure 2 Schematic diagram of the chart processing flow of the universal chart interface provided by the embodiment of the present invention Figure 1 ; Figure 3 Schematic diagram of the chart processing flow of the universal chart interface provided by the embodiment of the present invention Figure 2 ; Figure 4 Schematic diagram of the chart processing flow of the universal chart interface provided by the embodiment of the present invention Figure 3 ; Figure 5 A schematic diagram of the structure of a chart generating device provided by an embodiment of the present invention; Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0016] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meanings understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the existence of at least one. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.

[0017] The following further describes the chart generation method, device, equipment and storage medium proposed in the application embodiments in conjunction with the accompanying drawings.

[0018] See also Figure 1 , Figure 1 The following is a flowchart of a method for implementing a Java-based database monitoring universal chart interface according to an embodiment of the present invention. It should be understood that this method is a chart generation method implemented based on a Java-based universal chart interface. As shown in the figure, the method includes: Step 101: Receive chart request information, where the request information includes a chart identifier and chart parameters.

[0019] The above-mentioned chart identifier is a symbol indicating the characteristics of the chart to be generated, and the above-mentioned chart parameters can be characteristic parameters, type parameters, etc. of the chart to be generated.

[0020] In an optional embodiment, the chart request information may be received by a general chart interface, which receives the chart request information, wherein the chart request information received by the general chart interface must include a chart identifier. After the general chart interface receives the chart request information including the chart identifier, the relevant chart processing flow of the chart to be generated can be obtained according to the chart identifier.

[0021] In another optional embodiment, the chart request information may also be received by a chart processing interface connected to the general chart interface. Similarly, after the chart processing interface receives the chart request information containing a chart identifier, the relevant chart processing flow of the chart to be generated can be obtained based on the chart identifier.

[0022] It should be understood that each chart should have a corresponding chart processing flow, where the chart processing flow is an enumeration class that implements the IChart interface and is automatically loaded when the Java program starts. The chart processing flow may include properties such as chart name, chart English name, chart description, horizontal axis unit, vertical axis unit, conversion process, chart type, and chart filtering process.

[0023] In an optional embodiment, the conversion process includes conversion of units such as numerical values, time, storage, and network rate.

[0024] In this embodiment, by obtaining a chart conversion process, the chart to be generated can be converted into a chart of a target unit, so as to improve the quality of chart generation.

[0025] In an optional embodiment, the chart types include line charts, column charts, pie charts, scatter plots, relationship charts, bar charts, etc.

[0026] In this embodiment, by obtaining the chart type, the chart to be generated can be converted into a chart in a data format that conforms to the target chart type, thereby improving the quality of chart generation.

[0027] In an optional implementation, the chart filtering process includes a parameter filtering process, a return data filtering process, an assembly chart data process, and the like.

[0028] In this embodiment, by obtaining a chart filtering process, chart parameters can be processed, which can improve the accuracy of obtaining target parameters and further improve the efficiency of chart generation.

[0029] In the embodiment of the present invention, after receiving the chart request information, it can be known through the chart identifier included in the request information that the chart processing flow built into the universal chart interface and adapted to the chart to be generated needs to be called.

[0030] It should be understood that the aforementioned universal chart interface not only includes a complete chart processing process, from parameter processing to database request and data collation, but also includes a built-in function for generating chart data files. Thus, the universal chart interface can obtain chart parameters, process them, search the database for chart parameters, extract target parameters from the database that match the chart parameters, then call the appropriate chart data from the database based on the target parameters, and generate the chart after data collation.

[0031] In an optional embodiment, the universal chart interface may include two application programming interfaces (APIs), such as a universal chart query interface and a universal chart generation interface. If the universal chart interfaces are interoperable, the universal chart query interface can retrieve the chart processing flow object by obtaining the chart processing flow.

[0032] In another optional embodiment, under the premise that the chart processing interface can be connected to the general chart interface, the chart processing interface obtains the chart processing flow, thereby obtaining a chart processing flow object that can be processed by the chart processing flow built into the general chart interface.

[0033] Step 102 : filtering the chart parameters to generate target chart parameters. The target chart parameters are parameters that comply with general chart rules. The general chart rules are rules for processing charts using a general chart interface.

[0034] The target chart parameters may be parameters that comply with a general chart interface processing flow, and the general chart rules may be a general chart interface processing flow, wherein the general chart interface processing flow is a chart processing flow built into the general chart interface.

[0035] In the embodiment of the present invention, the universal chart interface obtains the chart filtering process through the chart processing process obtained in step 101, and generates target chart parameters after filtering the chart parameters (ie, the chart processing process object).

[0036] It should be noted that if a Java Virtual Machine (JVM) is not added to the graph processing flow, it is automatically added to obtain the graph filtering flow.

[0037] In another optional embodiment, the chart processing interface obtains a chart filtering process through the chart processing process obtained in step 101, and generates target chart parameters after filtering the chart parameters according to the chart processing process built into the general chart interface.

[0038] Step 103: Call the chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data.

[0039] In the embodiment of the present invention, the target chart parameters obtained in step 102 may be processed by calling a chart processing flow built into the general chart interface to generate chart data.

[0040] It should be understood that the chart processing flow described above includes a stored procedure. After the chart processing flow is obtained using the chart identifier obtained in step 101, the stored procedure built into the general chart interface is called to process the target chart parameters to generate chart data. The stored procedure is executed by the database server and only the execution results, i.e., the chart data in this embodiment of the present invention, are returned to the client.

[0041] In an optional embodiment, the chart processing interface may also process the target chart parameters by calling a built-in chart processing flow of a universal chart interface connected thereto to generate chart data matching the target chart parameters.

[0042] It should be noted that, if the user rewrites the stored procedure, the target chart parameters can be processed through the rewritten stored procedure to generate chart data.

[0043] Step 104: Generate a target chart based on the chart data.

[0044] The chart data is the chart processing result adapted to the chart parameters, and a target chart is generated based on the chart processing result, wherein the format of the target chart should be the format defined in the chart processing flow. In an optional embodiment, the format of the target chart may include CSV or Excel.

[0045] In an alternative embodiment, the general chart generation interface generates a target chart based on chart data obtained from the general chart query interface. Because the parameters required by the general chart data generation interface are the same as those required by the general chart query interface, no special processing of the parameters is required when calling the interface; the chart data obtained through the general chart query interface can be simply passed in.

[0046] In the embodiment of the present invention, since the universal chart interface has a built-in chart processing flow, the chart parameters are processed by calling the built-in chart processing flow of the universal chart interface to generate a target chart, thereby improving the efficiency of chart generation.

[0047] In the specific implementation, there is no need to develop separate chart Java business code. Chart data can be obtained by calling the general chart interface, which decouples the code from the business. New charts only need to configure the chart processing flow and add the corresponding data query storage procedure. In addition, during development, the general chart generation interface can be used directly to export chart data.

[0048] Optionally, calling a chart processing flow built into the universal chart interface to process the target chart parameters and generate chart data includes: Calling a chart processing flow built into the universal chart interface to filter the target chart parameters and generate first target chart data; The first target chart data are assembled to generate second target chart data.

[0049] The chart processing flow built into the universal chart interface may include a filtering process and an assembly process. Specifically, the first target chart data may be chart data filtered by the chart processing flow built into the universal chart interface, while the second target chart data may be chart data assembled by the chart processing flow built into the universal chart interface. The chart data after filtering and assembly is the target chart data.

[0050] It should be understood that filtering the target chart parameters involves performing a secondary filtering on the target chart parameters obtained in step 102. This filtering process is part of the chart processing process built into the universal chart interface. After the first target chart data is generated through the secondary filtering process, the chart assembly process built into the universal chart interface is invoked to perform assembly, ultimately generating a target chart that matches the chart parameters obtained in step 101.

[0051] Alternatively, as Figure 2 As shown, Figure 2 This is the execution flow chart of the general chart query interface. After the general chart interface receives the chart request information, it obtains the unique chart identifier contained in the chart request information to obtain the chart processing process (i.e., chart strategy). After obtaining the above-mentioned chart processing process, it obtains the chart filtering process (i.e., chart filtering strategy). When it is determined that the chart to be generated includes the above-mentioned chart filtering process, it calls the chart processing process built into the general chart interface to pre-process the chart parameters (i.e., filter the chart parameters and filter out useless parameters to generate the target chart parameters). Then, it calls the stored procedure built into the general chart interface. After the call is successful, it post-processes the returned chart data (i.e., filters the chart data). Then, it calls the chart assembly process built into the general chart interface to process the chart data (including data unit conversion and data format conversion) to generate the target chart data.

[0052] The process of calling the built-in chart assembly process of the general chart interface to process the chart data can be found in Figure 3 ,like Figure 3 As shown, the average value of each data in the filtered chart data is calculated to obtain the unit conversion rate that meets the conversion requirements of each data. Under the premise of determining that the data unit needs to be converted, the data unit is converted. The converted chart data will also be assembled. At this point, the general chart query interface completes all execution routes, among which the converted data units need to be written into the encapsulation object.

[0053] Alternatively, as Figure 4 As shown, Figure 4 This is the execution flow chart for the general chart generation interface. After the general chart query interface completes execution and generates target chart data, the general chart generation interface receives the target chart data and generates the target chart in CSV or Excel format. This completes the general chart interface's execution flow.

[0054] Optionally, assembling the first target chart data to generate second target chart data includes: When the first target chart data average value is greater than a first preset unit conversion value, the first target chart data is converted to generate second target chart data, wherein the data unit of the second target chart data is a second preset unit having a unit level higher than the first preset unit.

[0055] It should be understood that assembling the first target chart data may include data unit conversion. The first preset unit and the second preset unit are both standard data units, and the first preset unit conversion value may be a standard conversion value. Thus, when the average value of the first target chart data is greater than the standard conversion value, the data units of the first target chart data are converted to the data units of the second target chart data, thereby making the data representation of the chart clearer and more concise.

[0056] The first target chart data and the second target chart data are equal in size, and the only difference between the two is the data unit.

[0057] In an optional embodiment, the first preset unit may be a data flow unit of megabytes (M), and the second preset unit may be a data flow unit of gigabytes (G). Since 1G equals 1024M, the standard conversion value may be 1024M. When the average value of multiple data in the first target chart data is greater than 1024M, the data units may be converted. For example, if a data item in the first target chart data is 1030M, 1030M may be converted to 1.005G. Correspondingly, the data units of other data items are converted using the standard conversion value, so that all data in the second target chart data are in gigabytes, thereby improving the simplicity of the generated chart.

[0058] Optionally, the request information includes a chart type, and the assembling of the first target chart data to generate the second target chart data further includes: The first target chart data is converted to generate second target chart data, where the second target chart data is chart data in a data format that complies with the chart type.

[0059] The above-mentioned chart types can be at least one of a line chart, a bar chart, a pie chart, a scatter plot, a relationship diagram, a bar chart, etc., and when the icon parameters are more complex, the target chart can also be displayed through two or more chart types, which is not limited in this embodiment.

[0060] It should be understood that when filtering the target chart parameters by calling the built-in chart processing flow of the universal chart interface, when the first target chart data generated is chart data in a data format that does not meet the required chart type, the data format of the chart type of the generated first target chart data can be converted.

[0061] In an optional implementation, when the request information indicates that the chart type of the chart to be generated is a line chart, the data format of the first target chart data may be converted into chart data conforming to the data format of a line chart.

[0062] Optionally, the target chart is in CSV or Excel format.

[0063] The comma-separated values (CSV) is a simple and practical file format used to store and represent various types of data including text and numerical values.

[0064] The Excel format can also be used to store and represent various types of data, and is particularly suitable for storing and representing data such as currency, percentages, decimals, dates, and telephone numbers.

[0065] In the embodiment of the present invention, by generating a target chart in CSV or Excel format, since CSV or Excel format is a universal data storage format, user convenience can be improved.

[0066] See also Figure 5 , Figure 5 A diagram of a chart generating apparatus provided in an embodiment of the present invention is shown in the figure. As shown in the figure, the apparatus 500 includes: Receiving module 501, configured to receive chart request information, wherein the request information includes a chart identifier and chart parameters; A first processing module 502 is configured to filter the chart parameters to generate target chart parameters, where the target chart parameters are parameters that comply with general chart rules, and the general chart rules are rules for general chart interface processing charts; The second processing module 503 is used to call the chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; The generating module 504 is configured to generate a target chart based on the chart data.

[0067] Optionally, the second processing module 503 includes: A first processing submodule is configured to call a chart processing flow built into the universal chart interface, filter the chart data, and generate first target chart data; The second processing submodule is used to assemble the first target chart data to generate second target chart data.

[0068] Optionally, the second processing submodule includes: The first processing unit is configured to convert the first target chart data to generate second target chart data when the average value of the first target chart data is greater than a first preset unit conversion value, wherein the data unit of the second target chart data is a second preset unit having a unit level higher than the first preset unit.

[0069] Optionally, the request information includes a chart type, and the second processing submodule further includes: The second processing unit is configured to convert the first target chart data to generate second target chart data, where the second target chart data is chart data in a data format that complies with the chart type.

[0070] Optionally, the second target chart data is in CSV or Excel format.

[0071] The chart generating device in the embodiment of the present invention may be an electronic device, such as an electronic device with an operating system, or a component in the electronic device, such as an integrated circuit or a chip.

[0072] The diagram generating device provided by the embodiment of the present invention can realize Figure 1 The various processes implemented in the method embodiment shown achieve the same technical effect, and to avoid repetition, they will not be described again here.

[0073] Alternatively, as Figure 6 As shown, an embodiment of the present invention further provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be run on the processor 601, and when the program or instruction is executed by the processor 601, the various steps of the above-mentioned chart generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0074] An embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned chart generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0075] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.

[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A Java-based database monitoring general chart interface implementation method, characterized in that: include: receiving a chart request message, wherein the request message includes a chart identifier and chart parameters; Filtering the chart parameters to generate target chart parameters, where the target chart parameters are parameters that comply with general chart rules, and the general chart rules are rules for processing charts through a general chart interface; Calling the chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; A target chart is generated according to the chart data.

2. A Java-based database monitoring universal chart interface implementation method according to claim 1, characterized in that: The calling of the chart processing flow built into the universal chart interface to process the target chart parameters and generate chart data includes: Calling a chart processing flow built into the universal chart interface to filter the target chart parameters and generate first target chart data; The first target chart data are assembled to generate second target chart data.

3. The method for implementing a Java-based database monitoring universal chart interface according to claim 2, characterized in that: The step of assembling the first target chart data to generate the second target chart data includes: When the first target chart data average value is greater than a first preset unit conversion value, the first target chart data is converted to generate second target chart data, wherein the data unit of the second target chart data is a second preset unit having a unit level higher than the first preset unit.

4. The method for implementing a Java-based database monitoring universal chart interface according to claim 3, characterized in that: The request information includes a chart type, and the assembling of the first target chart data to generate the second target chart data further includes: The first target chart data is converted to generate second target chart data, where the second target chart data is chart data in a data format that complies with the chart type.

5. The method for implementing a Java-based database monitoring universal chart interface according to claim 1, characterized in that: The target chart is in CSV or Excel format.

6. The method for implementing a Java-based database monitoring universal chart interface according to claim 1, characterized in that: The chart of the chart interface implementation method is implemented by a chart generating device, which includes: A receiving module, configured to receive chart request information, wherein the request information includes a chart identifier and chart parameters; A first processing module is configured to filter the chart parameters to generate target chart parameters, wherein the target chart parameters are parameters that comply with general chart rules, and the general chart rules are rules for processing charts in a general chart interface; a second processing module, configured to call a chart processing flow built into the universal chart interface to process the target chart parameters to generate chart data; A generating module is used to generate a target chart based on the chart data.

7. The method for implementing a Java-based database monitoring universal chart interface according to claim 6, characterized in that: The second processing module includes: A first processing submodule is configured to call a chart processing flow built into the universal chart interface, filter the chart data, and generate first target chart data; The second processing submodule is used to assemble the first target chart data to generate second target chart data.

8. The method for implementing a Java-based database monitoring universal chart interface according to claim 7, characterized in that: The second processing submodule includes: A processing unit is configured to convert the first target chart data to generate second target chart data when the average value of the first target chart data is greater than a first preset unit conversion value, wherein the data unit of the second target chart data is a second preset unit with a unit level higher than the first preset unit.

Citation Information

Patent Citations

  • Method and device for generating chart data

    CN113536748A

  • Data chart processing method and related device

    CN115878712A

  • Self-adaptive data curve dynamic display method

    CN119829035A

  • Data visual display method and apparatus, computer device, and storage medium

    WO2025092112A1