Perspective chart generation method and device and computer equipment

By receiving the perspective chart generation request, extracting and clustering data, and generating the perspective chart, the complex problem of the chart generation process in the prior art is solved, and the process is simplified and efficiency is improved.

CN119311694APending Publication Date: 2025-01-14CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411549134.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing chart generation process is complicated and requires a large amount of front-end chart drawing logical code, which increases the difficulty of code maintenance, and multiple sets of charts require repeated extraction of data and calculations.

Method used

By receiving a pivot chart generation request, extracting the target data set in the preset database, clustering data, determining the data required for the pivot chart, and generating a pivot chart based on the data, simplifying the chart generation process.

Benefits of technology

It simplifies the chart generation process, reduces the difficulty of code maintenance, avoids repeated data extraction and calculation, and improves the efficiency of chart generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311694A_ABST
    Figure CN119311694A_ABST
Patent Text Reader

Abstract

The invention discloses a perspective chart generation method and device and computer equipment. The method comprises the steps that a generation request of the perspective chart is received, and the generation request at least comprises data fields contained in the perspective chart; extracting a target data set from a preset database according to data fields contained in the perspective chart, and clustering data in the target data set according to the data fields to obtain clustered data; determining data required by the perspective chart according to the clustered data; and generating the perspective chart based on the data required by the perspective chart. The technical problem that the chart generation process is complex in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a perspective chart generation method, apparatus and computer equipment. Background Art

[0002] At present, chart calculation mainly relies on special chart drawing program code to achieve, which requires specific code to be written for each chart type and is not easy to expand. In addition, multiple sets of charts often need to repeatedly extract data from the data source and repeat calculations. At the same time, the existing chart calculation technology is mainly based on the front-end page for chart drawing and display, which requires the front-end to write a large amount of chart drawing logic code. With the increase in data volume and chart types, the amount of front-end chart drawing logic code has increased sharply, and the difficulty of code maintenance has increased. Summary of the invention

[0003] The embodiments of the present application provide a perspective chart generation method, apparatus and computer device to at least solve the technical problem of complex chart generation process in related technologies.

[0004] According to one aspect of an embodiment of the present application, a perspective chart generation method is provided, comprising: receiving a request for generating a perspective chart, the generation request comprising at least: data fields contained in the perspective chart; extracting a target data set from a preset database according to the data fields contained in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data; determining data required for the perspective chart according to the clustered data; and generating the perspective chart based on the data required for the perspective chart.

[0005] Optionally, extracting a target data set from a preset database based on data fields contained in the perspective chart includes: obtaining a row area field, a column area field and a value area field in the data field, the row area field being used to represent the row structure of the perspective chart, the column area field being used to represent the column structure of the perspective chart, and the value area field being used to represent the value corresponding to the perspective chart; extracting a data set that matches the row area field, the column area field and the value area field from the preset database, and determining it as the target data set.

[0006] Optionally, clustering the data in the target data set according to the data field to obtain the data required for the perspective chart includes: converting the target data set into a data sequence, determining the first field of the row area field as the target field; sorting the data sequence according to the target field to obtain a sorted data sequence; and grouping the sorted data sequence to obtain the clustered data.

[0007] Optionally, determining the data required for the perspective chart based on the clustered data includes: obtaining the type of each data in the sorted data sequence from the target field; grouping the data in the sorted data sequence according to the type of each data to obtain a grouped data sequence; obtaining the attribute of each data in the grouped data sequence according to the target field, and sorting each group of the grouped data sequence according to the attribute of each data to obtain processed data; and obtaining the data required for the perspective chart based on the processed data.

[0008] Optionally, obtaining the data required for the perspective chart based on the processed data includes: acquiring a data calculation method from configuration information of the perspective chart; extracting values ​​of the row area field, the column area field and the value area field from the processed data; calculating the values ​​of the value area field corresponding to the values ​​of all row area fields and the column area fields according to the calculation method to obtain a calculation result; and filling the calculation result into a result container to obtain the data required for the perspective chart.

[0009] Optionally, the result container includes: multiple rows, multiple field columns and a calculation result column, wherein each row corresponds to a value of a field in the row area, each field column corresponds to a value of a field in the column area, and the calculation result column is used to store the calculation result.

[0010] Optionally, the method further includes: obtaining a chart identifier of the perspective chart; obtaining configuration information of the perspective chart from the preset database according to the chart identifier, the configuration information including at least: a chart type of the perspective chart, the target data set and a name of the perspective chart; and generating the perspective chart according to the chart type of the perspective chart, the target data set and the name of the perspective chart.

[0011] According to another aspect of an embodiment of the present application, a perspective chart generating device is also provided, characterized in that it includes: a receiving module, used to receive a request for generating a perspective chart, the generation request at least including: data fields contained in the perspective chart; a clustering module, used to extract a target data set from a preset database according to the data fields contained in the perspective chart, and cluster the data in the target data set according to the data fields to obtain clustered data; a determination module, used to determine data required for the perspective chart according to the clustered data; and a generation module, used to generate the perspective chart based on the data required for the perspective chart.

[0012] According to another aspect of the embodiment of the present application, a computer device is provided, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and is used to execute the above-mentioned perspective chart generation method.

[0013] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned perspective chart generation method by running the computer program.

[0014] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above perspective chart generation method when executed by a processor.

[0015] In an embodiment of the present application, a request for generating a perspective chart is received, wherein the request for generating the perspective chart includes at least: data fields contained in the perspective chart; extracting a target data set from a preset database according to the data fields contained in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data; determining data required for the perspective chart according to the clustered data; and generating the perspective chart based on the data required for the perspective chart, thereby achieving the purpose of simplifying the perspective chart generation process and solving the technical problem of the complex chart generation process in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a perspective chart generation method according to an embodiment of the present application;

[0018] Figure 2 is a flow chart of a perspective chart generation method according to an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of the structure of a perspective chart generation system according to an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of a perspective chart generation process according to an embodiment of the present application;

[0021] Figure 5 is another schematic diagram of a perspective chart generation process according to an embodiment of the present application;

[0022] Figure 6It is a structural diagram of a perspective chart generating device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] The information collected in the embodiments of the present application is information and data authorized by the account or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for the account to choose to authorize or reject the automated decision-making results; if the account chooses to reject, it enters the expert decision-making process.

[0026] In order to solve the problems existing in the related art, the present application embodiment provides a perspective chart generation method, which can be run on Figure 1 In the computer terminal shown, the computer terminal is explained below.

[0027] The perspective diagram generation method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a perspective chart generation method. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0028] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0029] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the perspective chart generation method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned perspective chart generation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0030] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] The display may be, for example, a touch screen liquid crystal display (LCD), which may enable the account to interact with the account interface of the computer terminal 10 .

[0032] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.

[0033] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a perspective chart generation method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] Figure 2 is a flowchart of a perspective chart generation method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0035] Step S202, receiving a request for generating a perspective chart, wherein the request at least includes: data fields included in the perspective chart;

[0036] Step S204, extracting a target data set from a preset database according to the data fields included in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data;

[0037] Step S206, determining data required for the perspective chart according to the clustered data;

[0038] Step S208: generating the perspective chart based on the data required by the perspective chart.

[0039] Through the above steps S202 to S208, the generation request of the perspective chart is received, and the generation request at least includes: the data fields contained in the perspective chart; extracting the target data set from the preset database according to the data fields contained in the perspective chart, and clustering the data in the target data set according to the data fields to obtain the clustered data; determining the data required for the perspective chart according to the clustered data; generating the perspective chart based on the data required for the perspective chart, thereby achieving the purpose of simplifying the perspective chart generation process, and thus solving the technical problem of the complex chart generation process in the related art. The following is a detailed description.

[0040] It should be noted that the above method can also be used in Figure 3 Executed in the system shown, Figure 3 As shown, the system includes a presentation layer, a service layer, and a data layer, which are used to store and manage various structured data, including preset databases, such as relational databases and non-relational databases. The data storage module is located in the data layer and uses a distributed database system to ensure high availability and secure storage of data. The data parsing module is also in the data layer, which is used to parse structured data from different data sources and extract field information. The task of this layer is to ensure the integrity, availability, and efficient storage of data, and to provide a data basis for subsequent calculations and presentations.

[0041] The service layer is the core part of the entire invention device, responsible for data processing and processing to generate chart data. The service layer includes a service module, which includes a calculation module, an intelligent filtering algorithm, a graphic data visualization algorithm, and a data processing flow optimization algorithm. The calculation module is used to aggregate, filter, sort, and restrict data to generate chart data. The intelligent filtering algorithm is used to optimize data processing, multi-level aggregation, time series aggregation, etc. The graphic data visualization algorithm is used to visualize data into charts. The data processing flow optimization algorithm is used to improve data processing efficiency. The task of this layer is to process the original data into data that can be used for chart generation.

[0042] The presentation layer is responsible for presenting the data generated by the computing layer to the user in the form of charts. This layer includes the chart drawing module and the configuration requests used by the front-end engineers. After receiving the configuration request from the front-end engineer, the presentation layer sends a request to the computing layer to obtain the required data, and then uses the chart drawing module to visualize the data into charts. The task of the presentation layer is to present the data generated by the computing layer to the user in a user-friendly manner to meet the needs of data visualization. Pluggable algorithm extensions are part of the service layer and are designed to allow the system to introduce custom algorithms to meet different data processing needs. The main function of this extension is to allow users or developers to expand the data processing capabilities of the system by writing custom algorithm modules and plugging them into the system.

[0043] It should also be noted that in the embodiment of the present application, a data processing flow optimization algorithm can be used in the process of data processing. It selects the most effective processing path according to the data type and the complexity of the computing operation to improve computing performance. The aggregation method used in the embodiment of the present application includes but is not limited to tree-structured aggregation, multi-level aggregation, and time series aggregation, etc., to meet different data analysis needs.

[0044] In step S204 of the perspective chart generation method described above, a target data set is extracted from a preset database according to the data fields contained in the perspective chart, including: obtaining a row area field, a column area field and a value area field in the data field, the row area field being used to represent the row structure of the perspective chart, the column area field being used to represent the column structure of the perspective chart, and the value area field being used to represent the value corresponding to the perspective chart; extracting a data set that matches the row area field, the column area field and the value area field from the preset database, and determining it as the target data set.

[0045] It should be noted that the row area field defines the row dimension in the chart, that is, different categories or groups of data will be distributed along the vertical direction of the chart. For example, in a sales data pivot chart, if the row area field is "product category", then different product categories will be listed on the left side of the chart to form different rows. The column area field defines the column dimension in the chart, that is, different categories or groups of data will be distributed along the horizontal direction of the chart. Continuing with the above example, if the column area field is "region", then different regions will be listed at the top of the chart to form different columns. The value area field is a field used for numerical aggregation in the chart, usually displayed in the cells where the rows and columns intersect. In the sales data pivot chart, the value area field can be "sales amount" or "sales quantity", and the values ​​of these fields will be aggregated according to the row and column fields, such as sum, average, etc., to reflect the sales performance under a specific product category and region combination.

[0046] In some embodiments of the present application, chart style and indicator configuration information may also be obtained, and value area fields may be generated according to the chart style and indicator configuration information. For example, chart style and indicator configuration are parameters used to define the appearance of the chart and data calculation rules. Chart style includes visual elements such as color, font, and layout, while indicator configuration defines how to calculate and display data in the value area field. For example, the indicator calculation rules may be configured as sum, average, maximum, minimum, etc.

[0047] The row area fields, column area fields, and value area fields together determine the data structure and dimensions of the chart, while the chart style and indicator configuration determine the visual representation of the chart and the way the data is calculated. When developing a chart calculation service, these configuration information are usually stored in the chart configuration database. When a chart drawing request is received from the front end, the request parsing module will parse the chart identifier. The query module will obtain the corresponding configuration and data information from the chart configuration database and the data set database based on this identifier. The calculation module will then process the data based on this information to generate the data required for the chart. Finally, the chart drawing module uses this data and chart style configuration to draw the final perspective chart.

[0048] In an optional manner, the data in the target data set can be clustered according to the data field to obtain the data required for the pivot chart, including: converting the target data set into a data sequence, determining the first field of the row area field as the target field; sorting the data sequence according to the target field to obtain a sorted data sequence; and grouping the sorted data sequence to obtain the clustered data.

[0049] Wherein, determining the data required for the perspective chart according to the clustered data includes: obtaining the type of each data in the sorted data sequence from the target field; grouping the data in the sorted data sequence according to the type of each data to obtain a grouped data sequence; obtaining the attribute of each data in the grouped data sequence according to the target field, and sorting each group of the grouped data sequence according to the attribute of each data to obtain processed data; and obtaining the data required for the perspective chart based on the processed data.

[0050] For example, sort the data in the data sequence according to the first field (key, target field) in the row area field. This step is completed by calling the sorted() method (a function for sorting) of the StreamAPI (streaming API). By sorting, you can ensure that the data is arranged in a specific order for subsequent grouping and aggregation operations.

[0051] The sorted data sequence will be grouped based on the first field code (key) of the row area field. Each group of data is indexed by the key. Then each group of data is sorted again to ensure that the data within each group is sorted according to the same field.

[0052] For example, if the first field key represents age, the data is sorted in ascending order according to age.

[0053] In some embodiments of the present application, determining the data required for the perspective chart based on the clustered data includes: obtaining the type of each data in the sorted data sequence from the target field; grouping the data in the sorted data sequence according to the type of each data to obtain a grouped data sequence; obtaining the attribute of each data in the grouped data sequence according to the target field, and sorting each group of the grouped data sequence according to the attribute of each data to obtain processed data; and obtaining the data required for the perspective chart based on the processed data.

[0054] Wherein, obtaining the data required for the perspective chart based on the processed data includes: obtaining a data calculation method from the configuration information of the perspective chart; extracting the values ​​of the row area field, the column area field and the value area field from the processed data; calculating the values ​​of the value area field corresponding to the values ​​of all row area fields and the column area fields according to the calculation method to obtain a calculation result; and filling the calculation result into a result container to obtain the data required for the perspective chart. The result container includes: multiple rows, multiple field columns and a calculation result column, wherein each row corresponds to a value of the row area field, each field column corresponds to a value of the column area field, and the calculation result column is used to store the calculation result.

[0055] In actual application scenarios, such as Figure 4As shown, the pivot function can be used to calculate the processed data to obtain the data required for the pivot chart, for example: Initialize the result container: First, the pivot method will initialize a two-dimensional result container, which is designed according to the values ​​of the row area field and the column area field. Each row and each column will correspond to a specific value of the row area field and the column area field, and each cell will store the calculation result of the value area field corresponding to the combination of the row area field and the column area field. Pivot then traverses each group of data in the processed data. For each data record in the processed data, the pivot method will perform the following operations according to the configured calculation method: Extract the values ​​of the row area field, column area field, and value area field from the processed data. Perform calculation operations such as aggregation, filtering, or sorting on the value area field. For example, if the configuration requires summation, the pivot method will calculate the sum of the value area field values ​​of all matching row area fields and column area fields. According to the values ​​of the row area field and the column area field, the calculation results are filled into the result container. If the calculation result column is not included, the pivot method will create the calculation result column according to the configuration information. During the traversal and calculation process, if the row area field, column area field, and value area field are empty or missing data, the pivot method will handle these situations according to preset rules, such as filling with zero or predefined values ​​to ensure the integrity and accuracy of the pivot chart. Complete calculation: When all data records are processed, the pivot method will complete the calculation of the pivot chart. At this time, the result container has been filled with all the data calculated based on the row area field, column area field, and value area field.

[0056] In another embodiment, the perspective chart can be generated by obtaining a chart identifier of the perspective chart; obtaining configuration information of the perspective chart from the preset database according to the chart identifier, wherein the configuration information includes at least: a chart type of the perspective chart, the target data set and a name of the perspective chart; and generating the perspective chart according to the chart type of the perspective chart, the target data set and the name of the perspective chart.

[0057] like Figure 5 As shown, the requesting end sends a chart drawing request, the system parses the request and obtains the chart configuration information, queries the target data set according to the chart configuration information, and generates a perspective chart after data processing.

[0058] Figure 6 is a structural diagram of a perspective chart generating device according to an embodiment of the present application, such as Figure 6 As shown, the device comprises:

[0059] The receiving module 60 is used to receive a request for generating a perspective chart, wherein the request for generating the perspective chart at least includes: data fields included in the perspective chart;

[0060] A clustering module 62, configured to extract a target data set from a preset database according to the data fields contained in the perspective chart, and cluster the data in the target data set according to the data fields to obtain clustered data;

[0061] A determination module 64, configured to determine data required for the perspective chart according to the clustered data;

[0062] The generating module 66 is configured to generate the perspective chart based on the data required by the perspective chart.

[0063] The perspective chart generation device can achieve the purpose of simplifying the perspective chart generation process by receiving a perspective chart generation request, wherein the generation request at least includes: data fields contained in the perspective chart; extracting a target data set from a preset database according to the data fields contained in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data; determining data required for the perspective chart according to the clustered data; and generating the perspective chart based on the data required for the perspective chart, thereby solving the technical problem of complex chart generation process in the related art.

[0064] The analysis module 82 in the above-mentioned perspective chart generating device includes: an extraction submodule, which is used to extract a target data set from a preset database according to the data fields contained in the perspective chart, including: obtaining a row area field, a column area field and a value area field in the data field, the row area field is used to represent the row structure of the perspective chart, the column area field is used to represent the column structure of the perspective chart, and the value area field is used to represent the value corresponding to the perspective chart; extracting a data set that matches the row area field, the column area field and the value area field from the preset database, and determining it as the target data set.

[0065] The extraction submodule includes: a clustering unit, which is used to cluster the data in the target data set according to the data field to obtain the data required for the perspective chart, including: converting the target data set into a data sequence, determining the first field of the row area field as the target field; sorting the data sequence according to the target field to obtain a sorted data sequence; grouping the sorted data sequence to obtain the clustered data.

[0066] The clustering unit includes: a first determining subunit and a second determining subunit, which are used to determine the data required for the perspective chart based on the clustered data, including: obtaining the type of each data in the sorted data sequence from the target field; grouping the data in the sorted data sequence according to the type of each data to obtain a grouped data sequence; obtaining the attribute of each data in the grouped data sequence according to the target field, and sorting each group of the grouped data sequence according to the attribute of each data to obtain processed data; obtaining the data required for the perspective chart based on the processed data.

[0067] The second determination subunit is used to obtain the data required for the perspective chart based on the processed data, including: obtaining a data calculation method from the configuration information of the perspective chart; extracting the values ​​of the row area field, the column area field and the value area field from the processed data; calculating the values ​​of the value area field corresponding to the values ​​of all row area fields and the column area fields according to the calculation method to obtain a calculation result; and filling the calculation result into a result container to obtain the data required for the perspective chart.

[0068] The result container includes: multiple rows, multiple field columns and calculation result columns, wherein each row corresponds to a value of a field in the row area, each field column corresponds to a value of a field in the column area, and the calculation result column is used to store the calculation result.

[0069] The perspective chart generating device also includes: a chart module, which is used to obtain a chart identifier of the perspective chart; obtain configuration information of the perspective chart from the preset database according to the chart identifier, wherein the configuration information at least includes: a chart type of the perspective chart, the target data set and a name of the perspective chart; and generate the perspective chart according to the chart type of the perspective chart, the target data set and the name of the perspective chart.

[0070] It should be noted that Figure 6 The perspective chart generating device shown is used to perform Figure 2 The perspective chart generating method shown in the figure, therefore the relevant explanations in the above perspective chart generating method are also applicable to the perspective chart generating device, and will not be repeated here.

[0071] The embodiment of the present application further provides a computer device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned perspective chart generation method.

[0072] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned perspective chart generation method by running the computer program.

[0073] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the perspective chart generation method in the present application are implemented.

[0074] The embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the perspective chart generation method in the present application.

[0075] The embodiment of the present application also provides a computer program, which, when executed by a processor, implements the steps of the perspective chart generation method in the present application.

[0076] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0077] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0078] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program code.

[0082] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A perspective chart generation method, characterized in that: include: receiving a request for generating a perspective chart, wherein the request at least includes: data fields included in the perspective chart; Extracting a target data set from a preset database according to the data fields included in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data; Determining data required for the perspective chart according to the clustered data; The perspective chart is generated based on data required by the perspective chart.

2. The method according to claim 1, characterized in that Extracting a target data set from a preset database according to the data fields included in the perspective chart includes: Acquire a row area field, a column area field and a value area field in the data field, wherein the row area field is used to represent the row structure of the perspective chart, the column area field is used to represent the column structure of the perspective chart, and the value area field is used to represent the value corresponding to the perspective chart; A data set matching the row area field, the column area field and the value area field is extracted from the preset database and determined as the target data set.

3. The method according to claim 2, characterized in that Clustering the data in the target data set according to the data field to obtain data required for the perspective chart includes: Convert the target data set into a data sequence, and determine the first field in the row area as the target field; Sorting the data sequence according to the target field to obtain a sorted data sequence; The sorted data sequence is grouped to obtain the clustered data.

4. The method according to claim 3, characterized in that: Determining data required for the perspective chart according to the clustered data includes: Acquire the type of each data in the sorted data sequence from the target field; Grouping the data in the sorted data sequence according to the type of each data to obtain a grouped data sequence; Acquire the attribute of each data in the grouped data sequence according to the target field, and sort each group of the grouped data sequence according to the attribute of each data to obtain processed data; The data required for the perspective chart is obtained based on the processed data.

5. The method according to claim 4, characterized in that Obtaining data required for the perspective chart based on the processed data includes: Obtaining a data calculation method from configuration information of the perspective chart; extracting values ​​of the row area field, the column area field, and the value area field from the processed data; Calculate the values ​​of the value area fields corresponding to the values ​​of all row area fields and column area fields according to the calculation method to obtain a calculation result; The calculation result is filled into the result container to obtain the data required by the perspective chart.

6. The method according to claim 5, characterized in that The result container includes: multiple rows, multiple field columns and a calculation result column, wherein each row corresponds to a value of a field in the row area, each field column corresponds to a value of a field in the column area, and the calculation result column is used to store the calculation result.

7. The method according to claim 1, characterized in that The method further comprises: Obtaining a chart identifier of the perspective chart; Acquire configuration information of the perspective chart from the preset database according to the chart identifier, wherein the configuration information at least includes: a chart type of the perspective chart, the target data set, and a name of the perspective chart; The perspective chart is generated according to the chart type of the perspective chart, the target data set, and the name of the perspective chart.

8. A perspective chart generating device, characterized in that: include: A receiving module, configured to receive a request for generating a perspective chart, wherein the request at least includes: data fields included in the perspective chart; A clustering module, used for extracting a target data set from a preset database according to the data fields contained in the perspective chart, and clustering the data in the target data set according to the data fields to obtain clustered data; A determination module, used for determining data required for the perspective chart according to the clustered data; A generating module is used to generate the perspective chart based on data required by the perspective chart.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory, and is used to execute the perspective diagram generating method according to any one of claims 1 to 7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the perspective diagram generating method according to any one of claims 1 to 7 is implemented.