A chart view configuration generation method, device, storage medium and terminal

CN115796136BActive Publication Date: 2026-08-18BEIJING PALMGO INFOTECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211227031.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-09
Publication Date
2026-08-18
Estimated Expiration
2042-10-09

AI Technical Summary

Technical Problem

[0005]但是,基于通用图表组件和通用容器框架,必然导致对定制化的用户体验满足程度降低,例如,对于一个省级的月度报告生成任务,传统定制开发方法只需要替换参数(省),通过图表联动就可以生成不同省的报告;但基于通用图表组件的方法只能基于任务模板泛化生成针对不同空间范围(省)的分析任务来完成

Benefits of technology

[0054]In this embodiment, the chart view configuration generation device first obtains the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers. Then, based on the chart component identifiers, it searches for chart components that meet the requirements from a preset chart component library. The chart component includes chart view configuration parameters and a data source identifier. Based on the data entity interface filtering parameters, it obtains target data that meets the requirements. Finally, it instantiates the chart component based on the target data to generate the target chart view. Since the chart view configuration generation in this application involves searching for chart components that meet the requirements from a preset chart component library and obtaining target data from a data entity interface based on the obtained chart component identifiers and entity interface filtering parameters of the chart view generation requirements, and instantiating the chart component based on the target data, the target chart view can be obtained, thereby improving the efficiency of chart view generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115796136B_ABST
    Figure CN115796136B_ABST
Patent Text Reader

Abstract

The application discloses a chart view configuration generation method and device, a storage medium and a terminal, and relates to the technical field of chart view configuration generation. The method comprises the following steps: acquiring a chart view configuration generation requirement, wherein the chart view configuration generation requirement comprises a data entity interface filtering parameter and a chart component identifier; searching for a target chart component satisfying the requirement from a preset chart component library according to the chart component identifier, wherein the chart component comprises a chart view configuration parameter and a data source identifier; acquiring target data satisfying the requirement according to the data entity interface filtering parameter; and performing instantiation processing on the chart component according to the target data, to generate a target chart view. The application can obtain the target chart view by performing instantiation processing on the chart component satisfying the requirement according to the target data satisfying the requirement acquired according to the data entity interface filtering parameter, so that the generation efficiency of the chart view is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method, apparatus, storage medium, and terminal for generating configurations of chart views. Background Technology

[0002] New-generation information technologies such as mobile internet and the Internet of Things have given rise to new application forms. These applications are continuously generating big data. By managing, analyzing, and optimizing data from different sources, and feeding the results back into these applications, enormous economic and social value will be created. Charts are a primary form of presenting big data analysis results. Due to their intuitive expression and diverse formats, charts are used as one of the main carriers in application systems, large-screen displays, and reports.

[0003] From a software architecture perspective, charts can be viewed as components, while application systems, large-screen display systems, and reporting systems can be seen as container frameworks that load these chart components. In traditional software development practices, both chart components and container frameworks are custom-developed, and their functions are highly coupled. For example... Figure 1 As shown, each chart component entity (such as...) These (e.g., I1, I2, etc.) are all custom-developed from interfaces and integrated into different container frameworks (framework 1, framework 2, etc.) to complete the corresponding analysis tasks. The same chart component entity (e.g., ...) and When integrated into different frameworks (Framework 1 and Framework 2), different custom development processes (Process 2 and Process 3) are required. Although custom development methods can achieve some differentiated user experiences (such as linkage between different charts, drill-down and up charts, etc.), the scalability of system functions is relatively weak.

[0004] To address scalability issues, published patent documents such as CN111581932A, CN112016018A, and CN113792235A propose a general big data task generation process that decouples the container framework from chart components. According to this method, firstly, the same container framework can be integrated with different chart components to complete different big data analysis and monitoring tasks; secondly, the same components can be reused across different tasks, reducing the overall workload of component development; and finally, the system has evolutionary capabilities, with both the container framework and chart components continuously being improved and supplemented, thereby gradually enhancing its responsiveness to future big data analysis and monitoring tasks. For example, in patent CN112016018A, the decoupling of the container framework from chart components is achieved through the component instantiation process, such as... Figure 2 As shown, taking container framework 1 as an example, the big data analysis and monitoring task M corresponding to container framework 1 is defined as follows: the time range and spatial range of task M are respectively... and Will and Pass to the chart component Interface I1, the data of interface I1 according to and Perform filtering and instantiate the filtered data stream. generate Chart component entity It is then integrated into Framework 1 to complete the corresponding analysis tasks. Figure 1 The difference is, and Both are based on chart components Chart component entities instantiated through different container frameworks are therefore more... Figure 1 The development practices shown aim to reduce workload and optimize the scalability of features.

[0005] However, relying on generic chart components and a generic container framework inevitably leads to a decrease in the ability to satisfy customized user experiences. For example, for a task generating a monthly report for a province, traditional custom development methods only require replacing the parameter (province) and generating reports for different provinces through chart linkage; but methods based on generic chart components can only generate analysis tasks for different spatial ranges (provinces) based on task templates. Furthermore, in order to accommodate the customized user experience requirements of different tasks, the definition of generic chart components becomes highly uncertain, inevitably requiring the development of a large number of chart components with largely similar functions. This not only increases development costs but also places a significant burden on the management and application of chart components. Summary of the Invention

[0006] This application provides a method, apparatus, storage medium, and terminal for generating configurations of chart views. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general description, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0007] In a first aspect, embodiments of this application provide a method for generating a configuration of a chart view, the method comprising:

[0008] Obtain the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers;

[0009] The system searches for a suitable chart component from the preset chart component library based on the chart component identifier. The chart component includes pre-configured parameters of the chart view and the data source identifier.

[0010] Obtain the target data that meets the requirements based on the filtering parameters of the data entity interface;

[0011] Instantiate the chart component based on the target data to generate the target chart view.

[0012] Optionally, the preset chart component library includes chart component generation rules and chart view configuration parameter fields. The chart component generation rules include data source filtering rules, data pivot rules, and drawing rules. The chart view configuration parameter fields include data source filtering parameter fields, data pivot parameter fields, and drawing parameter fields.

[0013] The chart component generation methods in the preset chart component library include:

[0014] Obtain the data source identifier and chart view pre-configuration parameters, including data source filtering parameters, pivot parameters, and plotting parameters;

[0015] Generate chart components according to the chart component generation rules;

[0016] The chart component includes preset chart view styles.

[0017] Optionally, when the chart component includes a preset chart view style,

[0018] The target chart component that meets the requirements is searched from the preset chart component library based on the chart component identifier, including:

[0019] Based on the chart component identifier, match a chart component with a preset style that matches the preset style of the chart view from the preset chart component library;

[0020] The matched chart component is denoted as the target chart component.

[0021] Optionally, when the chart component identifier includes a chart view preset style;

[0022] The search for a target chart component that meets the requirements from a preset chart component library based on the chart component identifier includes:

[0023] Based on the chart component identifier, a chart component that matches the preset style of the chart view is matched from the preset chart component library;

[0024] The matched chart component is denoted as the target chart component.

[0025] Optionally, when the first dimension data in the pivot table parameters includes at least two levels of statistical labels,

[0026] The data pivot parameters include batch parameters, where batch parameters refer to statistical labels describing the second or higher levels of the first dimension data.

[0027] Optionally, the chart component is instantiated based on the target data to generate a target chart view, including:

[0028] Obtain the original data corresponding to the target data;

[0029] Filter the original data based on the data source filtering parameters of the target chart component;

[0030] Based on the pivot parameters, perform pivot processing on the filtered original data;

[0031] Based on the drawing parameters, the perspective view is drawn to generate the target chart view;

[0032] When the pivot parameters contain batch parameters, the target chart view contains batch parameter identifiers.

[0033] Optional data pivoting processes include data grouping and data statistics;

[0034] Based on pivot table processing, the filtered data is subjected to pivot table processing, including:

[0035] Data grouping is used to group the filtered row data according to the grouping parameters to generate multiple groups of data; each group of data includes a target key and a set of row data.

[0036] Data statistics perform statistical operations on the set of rows in each data group according to statistical parameters to obtain the target value for each data group.

[0037] The target key and its corresponding target value in each set of data are combined into key-value pairs to obtain a key-value pair sequence.

[0038] The key-value pair sequence is identified as pivot data.

[0039] Secondly, embodiments of this application provide a method for updating a chart view, used for updating a chart view within a container. The container includes a listening mechanism to monitor changes in chart view configuration generation requirements. The method includes:

[0040] When a data refresh is detected in the data entity interface of any chart view within the container...

[0041] Refresh the chart view.

[0042] Optionally, the method also includes:

[0043] When it is detected that the container has modified the batch parameter definition, or any chart component has modified the batch parameter definition;

[0044] Broadcast the updated batch parameters to the container;

[0045] When a chart view containing batch parameters within a container recognizes a change, the corresponding chart view is updated based on the updated batch parameters.

[0046] Secondly, embodiments of this application provide a configuration generation apparatus for a chart view, the apparatus comprising:

[0047] The requirement retrieval module is used to retrieve the requirements for generating chart view configurations. These requirements include data entity interface filtering parameters and chart component identifiers.

[0048] The chart component search module is used to find chart components that meet the requirements from the preset chart component library based on the chart component identifier. The chart component includes chart view configuration parameters and data source identifier.

[0049] The target data acquisition module is used to obtain target data that meets the requirements based on the filtering parameters of the data entity interface.

[0050] The target chart view generation module is used to instantiate chart components based on target data and generate the target chart view.

[0051] Thirdly, embodiments of this application provide a computer storage medium storing multiple instructions adapted for loading and execution of the above-described method steps by a processor.

[0052] Fourthly, embodiments of this application provide a terminal that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed by the above-described method steps.

[0053] The technical solutions provided in this application embodiment may include the following beneficial effects:

[0054] In this embodiment, the chart view configuration generation device first obtains the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers. Then, based on the chart component identifiers, it searches for chart components that meet the requirements from a preset chart component library. The chart component includes chart view configuration parameters and a data source identifier. Based on the data entity interface filtering parameters, it obtains target data that meets the requirements. Finally, it instantiates the chart component based on the target data to generate the target chart view. Since the chart view configuration generation in this application involves searching for chart components that meet the requirements from a preset chart component library and obtaining target data from a data entity interface based on the obtained chart component identifiers and entity interface filtering parameters of the chart view generation requirements, and instantiating the chart component based on the target data, the target chart view can be obtained, thereby improving the efficiency of chart view generation.

[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0057] Figure 1 This is a schematic diagram of an integrated architecture of a chart component and a container framework provided in an embodiment of this application;

[0058] Figure 2 This application provides an embodiment of another integrated architecture diagram of a chart component and a container framework;

[0059] Figure 3 This is a flowchart illustrating a method for generating a chart view configuration according to an embodiment of this application;

[0060] Figure 4 This is a schematic diagram of a data pivoting operation provided in an embodiment of this application;

[0061] Figure 5 This is a schematic diagram of a chart view generation operation provided in an embodiment of this application;

[0062] Figure 6 This is a schematic diagram of a chart view generation path provided in an embodiment of this application;

[0063] Figure 7 This is a schematic diagram of message passing between a chart component with batch parameters and a container framework provided in an embodiment of this application;

[0064] Figure 8This is a schematic diagram illustrating a function of drill-down and up-down chart components based on batch parameters and message passing, provided in an embodiment of this application.

[0065] Figure 9 This is a schematic diagram of the structure of a chart view configuration generation device provided in an embodiment of this application;

[0066] Figure 10 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0067] The following description and accompanying drawings fully illustrate specific embodiments of the invention to enable those skilled in the art to practice them.

[0068] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0069] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0070] In the description of this invention, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances. Furthermore, in the description of this invention, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0071] This application provides a method, apparatus, storage medium, and terminal for generating chart views to address the problems existing in the aforementioned related technologies. In the technical solution provided by this application, since the target data that meets the requirements is obtained by instantiating chart components that meet the requirements through a given data entity interface and filtering parameters of the data entity interface, a target chart view can be obtained. This improves the generation efficiency of chart components and enhances the degree to which chart components meet customized requirements, thereby significantly reducing the size of the chart component library. The following detailed description uses exemplary embodiments.

[0072] The following will be combined with the appendix Figure 3 -Appendix Figure 8 This application provides a detailed description of the chart view configuration generation method provided in its embodiments. This method can be implemented using a computer program and can run on a chart view configuration generation device based on the von Neumann architecture. This computer program can be integrated into an application or run as a standalone utility application.

[0073] Please see Figure 3 This is a flowchart illustrating a method for generating a chart view configuration, as provided in an embodiment of this application. Figure 3 As shown, the method in this application embodiment may include the following steps:

[0074] S101, Obtain the chart view configuration generation requirements;

[0075] The requirements for generating chart view configurations include data entity interface filtering parameters and chart component identifiers.

[0076] Typically, different chart views can be generated by adjusting the data entity interface filtering parameters or chart component identifiers, thereby improving the efficiency and flexibility of chart component generation and bringing better scalability to big data analysis and monitoring tasks.

[0077] In this embodiment, when generating the chart view configuration, the chart view generation requirement is parsed to obtain the corresponding data entity interface filtering parameters and chart component identifiers from the configuration generation requirement. In this embodiment, the data entity interface filtering parameters include time range filtering parameters. and spatial range filtering parameters

[0078] S102, Search for a chart component that meets the requirements from the preset chart component library according to the chart component identifier. The chart component includes chart view configuration parameters and data source identifier;

[0079] In one specific embodiment, a preset chart component library stores the correspondence between each chart component identifier and the chart component definition;

[0080] The chart component rules include data source filtering rules, pivot table rules, and plotting rules. Data source filtering rules include data source interface descriptions and time granularity descriptions. Pivot table rules include pivot table processing descriptions, including batch parameter descriptions. Plotting rules include chart type and display settings. Chart view pre-configuration parameters include data source filtering parameters, pivot table parameters, and plotting parameters. Each chart component is generated from the obtained chart view pre-configuration parameters and data source identifier according to the rules in the chart component rule library.

[0081] In one specific implementation, the preset chart component library includes chart component generation rules and chart view configuration parameter fields. The chart component generation rules include data source filtering rules, pivot table rules, and plotting rules. The chart view configuration parameter fields include data source filtering parameter fields, pivot table parameter fields, and plotting parameter fields. The chart component generation process of the preset chart component library includes:

[0082] Obtain the data source identifier and chart view pre-configuration parameters. The chart view pre-configuration parameters include data source filtering parameters, pivot parameters, and plotting parameters. The data source filtering parameters are obtained from the data source filtering parameter field, the pivot parameters are obtained from the pivot parameter field, and the plotting parameters are obtained from the plotting parameter field.

[0083] Generate chart components according to the chart component generation rules;

[0084] The obtained chart component includes a chart component identifier, which includes a chart view preset style or chart component number information.

[0085] In this embodiment, each chart component is generated based on preset chart component rules and acquired configuration parameters. The generation process is configured according to preset standardized rules, resulting in efficient chart component configuration and generation. The pre-configured chart components are stored in a preset chart component library. When a view configuration generation request is received, the target chart component can be quickly located from the preset chart component library based on the chart component identification information in the request. Then, the target chart component is materialized based on the data entity filtering parameters, enabling a rapid response to the target chart view request. This improves the flexibility of the target chart view display request, avoids the large amount of customized development required for traditional view displays, and improves development efficiency.

[0086] In one specific implementation, when the chart component identifier includes a preset chart view style,

[0087] The target chart component that meets the requirements is searched from the preset chart component library based on the chart component identifier, including:

[0088] Based on the chart component identifier, match a chart component with a preset style that matches the preset style of the chart view from the preset chart component library;

[0089] The matched chart component is denoted as the target chart component.

[0090] In one specific implementation, when the first dimension data in the pivot data parameters includes at least two levels of statistical labels, the pivot data parameters include batch parameters, wherein the batch parameters refer to the statistical labels of the second or higher levels describing the first dimension data.

[0091] In one specific implementation, a chart component definition rule library is set in the preset chart component library. The chart component definition rule library includes data source filtering rules, data pivot processing rules, and drawing rules. Specifically, each chart component is determined by the acquired chart component generation parameters and multiple dimension rules in the chart component definition rule library.

[0092] In one specific implementation, the chart component X D =F(I0, θ), where I0 is the data source identifier, and θ is the pre-configured parameter of the chart view. In this embodiment, θ = <θ S θ P θ D >, where θ S θ is the data filtering parameter. P For pivot parameters, θ D These are the plotting parameters; in this embodiment, the chart component definition includes data filtering rules, data pivot rules, and plotting rules. Specifically, in this embodiment, the data source identified by I0 is set to X.

[0093] Data filtering rules are based on the function f S () represents the condition table X generated by filtering data source X. S =f S (X, θ) S );

[0094] Pivot processing rules are based on the function f P () represents the condition table X from the data source. S Perspective generation of perspective table X p =f P (X S θ P );

[0095] Drawing rules are represented by drawing rules in a drawing rule library. Specifically, in this implementation, drawing rules can be represented by functions f. D () represents the pivot table X. P Chart generation component X D =f D (X P θ D Therefore, the chart component X D =f D (f P (f S ((I0(θ0), θ) S ), θ P ), θ D ).

[0096] S103, Obtain the target data that meets the requirements based on the data entity interface filtering parameters;

[0097] In this embodiment of the application, after determining the data entity interface filtering parameters, the target data that meets the requirements can be obtained based on the parameters.

[0098] In one possible implementation, the data entity interface filtering parameter θ0 includes a time filtering parameter. and spatial filtering parameters The original table X = I0(θ0) can be obtained based on the data entity interface I0 and the parameter θ0, and the data in the original table can be determined as the target data.

[0099] For example, when the target task is data statistics, the time granularity of the data is a very important parameter. Taking traffic statistics as an example, we can count traffic for one hour, one day, or even one year. θ0 can be used as a parameter for the time granularity to extract traffic statistics data of the corresponding time granularity from the interface. In a specific implementation, let θ0 = day, then the traffic statistics data obtained from interface I0 are based on days, and the original table is shown in Table 1.

[0100] Table 1

[0101]

[0102]

[0103] Therefore, in Table 1, for a given day d k It belongs to the provincial p i a certain city c i,j Statistics of city c i,j In d k Passenger traffic volume within a day is recorded as Truck traffic volume is recorded as Total flow is denoted as The year-on-year comparison of total flow is denoted as

[0104] It should be noted that in the implementation shown in Table 1, the statistics of traffic flow in the regional dimension include two levels of statistical labels, namely the province label and the city label. In this implementation, the second level label used to describe the regional statistical dimension is the province label, which can be set as a batch parameter of the statistical dimension. In this implementation, the first dimension is the regional dimension.

[0105] S104, Instantiate the chart component based on the target data to generate the target chart view.

[0106] In this embodiment of the application, when instantiating the chart component based on the target data to generate the target chart view, the original data corresponding to the target data is first obtained, and then the pivot table is pivoted according to the pivot parameters to obtain the pivot data. The pivot processing includes column processing or row processing of the original data. Finally, the pivot data is converted into a chart view in the target format according to the drawing parameters, which is denoted as the target chart view. Wherein, when the pivot parameters contain batch parameters, the target chart view contains batch parameter identifiers.

[0107] In one specific implementation, the raw data in the above implementation can be represented by a condition table; the pivot data can be represented by a pivot table.

[0108] Specifically, when retrieving the condition table corresponding to the target data, a filtering operation f can be defined. S () and parameter θ S Extract condition table X from original table X S =f S (X, θ) S For example, after obtaining the original table X, filtering the original table X according to business needs yields the following results. For instance, if only the traffic situation of provincial capital cities is needed in Table 1, then parameter θ can be set. S Let "provincial capital city = Y" to filter out traffic information from non-provincial capital cities. It should be noted that, for the sake of simplicity in the following method steps, in one specific implementation, the parameter θ is set... S It is empty, that is, X S =X.

[0109] Specifically, a chart is a one-dimensional profile view of a data entity, therefore it is necessary to analyze the condition table X. S Performing a summary analysis of data across one or more dimensions can be called a pivot table operation. Pivot table processing includes data grouping and data statistics.

[0110] The process of creating a pivot table from target data through pivot processing involves several steps. First, a grouping operation is performed, dividing the row data of the target data table into multiple groups according to grouping parameters. Each group includes a target key and a set of row data. Second, statistical operations are performed on the row data set in each group according to statistical parameters based on the data statistical description to obtain the target value for each group. Then, the target key and its corresponding target value in each group are combined into key-value pairs to obtain a sequence of key-value pairs. Finally, the sequence of key-value pairs is used to define the pivot table.

[0111] For example, condition table X S The row data is processed according to preset parameters. Perform the grouping operation using Group(), denoted as There are N groups in total. Among them, for 1 ≤ n ≤ N, It is the key of the nth group, φ n It is the Xth S The set of rows in the table belonging to the nth group. For any φ n According to preset parameters Perform the statistical operation Sat(), denoted as This statistical result will be used as the value for the nth group. and Serialized as key-value pairs into pivot table X p .

[0112] Here, the grouping operation Group() and the statistical operation Sat() are combined and referred to as the perspective operation f. P (), These are called pivot parameters. Here, Sat() includes general operations such as counting, summing, and averaging, and can also be further extended according to business logic.

[0113] In this invention, the perspective operation uses a drag-and-drop interaction method. For example... Figure 4 As shown, X S Drag the date column labels into In the settings box, you can specify X. S Row data according to date d k Grouping by (1≤k≤K);

[0114] X S Drag the passenger vehicle traffic volume label into the list. In the settings box, if you set the summation operation, it means that for the same date d... k The passenger flow data from all rows is summed to obtain the pivot table result of passenger flow summation. Similarly, the perspective result for obtaining the average truck traffic flow is as follows: Based on data pivot parameters The pre-set pivot table X can be obtained in actual application scenarios. p The format is shown in Table 2.

[0115] Table 2

[0116]

[0117]

[0118] like Figure 4 As shown, X S Drag the province label into In the settings box, If the setting remains unchanged, it means that for the same province p iSum the passenger flow rates of all rows in the sequence (1≤i≤I) to obtain the perspective result of the summation of passenger flow rates. Similarly, the perspective result for obtaining the average truck traffic flow is as follows: Based on data pivot parameters The pre-set pivot table X can be obtained in actual application scenarios. p The format is shown in Table 3.

[0119] Table 3

[0120] <![CDATA[p1]]> <![CDATA[α1]]> <![CDATA[β1]]> … … … <![CDATA[p i ]]> <![CDATA[α i ]]> <![CDATA[β i ]]> … … … <![CDATA[p I ]]> <![CDATA[α I ]]> <![CDATA[β I ]]>

[0121] Furthermore, in In the settings, combined operations can also be introduced, and their functions are adjusted according to the parameters. Select the values ​​in the column for further grouping. Taking Table 3 as an example, if you perform a region grouping operation on the provinces (Northeast China, North China, etc.), you can combine the results of Table 3 into Table 4.

[0122] Table 4

[0123] Northeast China <![CDATA[α 东北地区 ]]> <![CDATA[β 东北地区 ]]> North China <![CDATA[α 华北地区 ]]> <![CDATA[β 华北地区 ]]> … … …

[0124] In existing technologies, generic components are insufficient in meeting the needs of personalized user experiences. For example, for a task of generating a monthly report for a province, traditional custom development methods only require replacing the parameter (province) and generating reports for different provinces through chart linkage; however, methods based on generic chart components can only generate analysis tasks for different spatial ranges (provinces) based on task templates. When processing using the approach of this application, the present invention... The settings introduce batch operations, specifically including:

[0125] by Figure 4 For example, let X S Drag the province and city labels into In the settings box, If the setting remains unchanged, it means that for the same province p i (1≤i≤I) and the same city c i,j The passenger flow of all rows in the sequence (1≤j≤#{(i,j)}) is summed to obtain the perspective result of the summation of passenger flow. Similarly, the perspective result for obtaining the average truck traffic flow is as follows: The resulting pivot table is shown in Table 5.

[0126] Table 5

[0127] <![CDATA[p1]]> <![CDATA[c 1,1 ]]> <![CDATA[α 1,1 ]]> <![CDATA[β 1,1 ]]> … … … … <![CDATA[p i ]]> <![CDATA[c i,j ]]> <![CDATA[α i,j ]]> <![CDATA[β i,j ]]> … … … … <![CDATA[p I ]]> <![CDATA[c I,J ]]> <![CDATA[α I,J ]]> <![CDATA[β I,J ]]>

[0128] exist In the settings, if the province label is set as a batch parameter, then the province labels are filtered in batches based on Table 5, thus transforming to obtain the pivot table shown in Table 6.

[0129] When different provinces are selected as parameters, the data in Table 6 will be adjusted according to the parameters.

[0130] Table 6 p1 (dropdown selection) / p2 / ... / p I

[0131] <![CDATA[c 1,1 ]]> <![CDATA[α 1,1 ]]> <![CDATA[β 1,1 ]]> <![CDATA[c 1,2 ]]> <![CDATA[α 1,2 ]]> <![CDATA[β 1,2 ]]> <![CDATA[c 1,3 ]]> <![CDATA[α 1,3 ]]> <![CDATA[β 1,3 ]]> … … …

[0132] Specifically, when converting pivot table data into a chart view of the target format based on plotting parameters, the plotting parameters include the plotting operation f. D () and parameter θ D It can be used according to the drawing operation f D () and parameter θ D For pivot table X P Transform data into charts and graphs in the target format. Figure X D =f D (X P θ D ).For example, Figure 5 As shown, parameter θ D The settings are divided into 5 aspects, namely

[0133] Select the chart type;

[0134] In some application scenarios, it is necessary to filter pivot tables based on conditions. For example, in the pivot table shown in Table 2, rows where the passenger flow exceeds a set threshold are filtered.

[0135] and To configure the rows and columns of a chart, the method is the same as above. and

[0136] Configure the chart display settings, such as setting the graphic's color and font.

[0137] like Figure 6 As shown, according to the present invention, based on a given data interface I0, different chart views are generated through different parameter configuration sequences. Figure 6 In the context of a given set of parameters This can generate a chart view. Similarly, based on a given set of parameters This can generate a chart view. Thus forming Figure 6 The tree structure shown here, with data interface I0 as the root node, is denoted as Tree(I0).

[0138] Understandably, in this embodiment, for a given set of chart view configuration parameters θ0 is the data source parameter. For pivot table parameters, For drawing parameters, For data filtering parameters, in some implementations, the filtering step can be omitted, and the filtering operation can be eliminated. According to this implementation, given the chart view configuration parameters and data source identifier, the chart components can be determined. Therefore, each chart component in the preset group table component definition library is defined by the chart view configuration parameters and data source. Thus, for a given data entity interface I0, only the chart generation parameter set θ needs to be adjusted to generate different chart components, which undoubtedly improves the efficiency and flexibility of chart component generation. The chart view in Tree(I0) Figure 1 It must be a leaf node, but a leaf node does not necessarily have to be a chart view; it can also be a pivot table (e.g., ...). This could be due to a pivot table (condition table) or even a condition table. The reason for this could be that a leaf node downstream of the pivot table (condition table) has been deleted or is awaiting generation, but this does not affect the use of leaf nodes in other charts.

[0139] It is important to note that the connection between parent and child nodes in Tree(I0) is bidirectional. This means that a parent node can find its child nodes, and a child node can find its parent node. This mechanism is conducive to achieving collaboration between different nodes, thereby enabling customized user experiences.

[0140] exist Figure 6 In the text, the publishable chart components include: and There are 4 in total. Unreleased due to incompleteness. (Regarding the component...) In other words, and Based on pivot table Different chart views generated by assigning different drawing parameters can be switched and displayed within the same component, thus giving the component a variety of display effects.

[0141] Furthermore, this application provides a method for updating chart views within a container. The container includes a listening mechanism to monitor changes in chart view configuration requirements. Specifically, when a data refresh is detected in the data entity interface of any chart view within the container, the chart view is refreshed. When a change in batch parameter settings is detected within the container, or by any chart component, the updated batch parameters are broadcast to the container. When a chart view within the container that contains batch parameters recognizes the change, the corresponding chart view is updated according to the updated batch parameters.

[0142] Furthermore, this application can also support customized user scenarios, namely, it supports a dynamic collaboration mechanism between chart components, mainly including the following two aspects:

[0143] (1) Component collaborative display based on batch parameters

[0144] like Figure 7 As shown, for a series of parameters p1, p2, ..., p I Chart component view and chart component views without these batch parameters In fact, the instantiated chart component entity is As described above, when a chart component has batch parameters, the instantiated chart component entity will also have batch parameters.

[0145] like Figure 7 As shown, select a specific chart component entity and set it as... A batch parameter p2 is set for this component entity. Simultaneously, this component entity sends the batch parameter p2 to the container framework via a messaging mechanism. The container framework then broadcasts this to other component entities within the framework. If the component entity can recognize the batch parameter p2, it refreshes the data according to p2 (e.g., ...). Otherwise, no data refresh will be performed (e.g.) This enables collaboration between chart components based on batch parameters.

[0146] The following example, using the generation of provincial monthly reports, illustrates the use case of a component collaboration mechanism based on batch parameters. Assume all components within the provincial monthly report generation task container framework use the province label as the batch parameter. When any component is set with a province label parameter (e.g., Beijing), all components within the task container framework will display relevant charts and views of Beijing. The downloaded view set can then be formatted and automatically generated as a monthly report for Beijing. Similarly, when any component is set with a province label parameter of Shandong Province, all components within the task container framework will display relevant charts and views of Shandong Province, thus automatically generating a monthly report for Shandong Province.

[0147] Furthermore, scenarios where the chart view is refreshed according to the set province parameters include, but are not limited to, highlighting the legend of the province set in the chart.

[0148] (2) Collaborative display of component drilling up and down based on batch parameters

[0149] Drill-down display between charts is a very challenging task for non-customized systems. This invention solves the problem of component drill-down by refreshing the component system based on batch parameters.

[0150] like Figure 8 As shown, and Based on the same condition table The generated two chart component views, and It is the instantiated chart component entity, let's say The view presented is the table view defined in Table 3. The table presented shows the batch parameters p1, p2, ..., p as defined in Table 6. I The table view. From the view, Tables 3 and 6 show a drill-down relationship; within the frame, and They are in a relationship of mutual overlay display.

[0151] When on When a province is selected, such as p2, the component entity sends parameter p2 to the container framework via a messaging mechanism. The container framework then broadcasts this information to other component entities within that framework. If the component entity can recognize the batch parameter p2, it refreshes the data according to the batch data p2 (e.g., ...). Otherwise, no data refresh is performed, thus enabling collaboration between chart components based on batch parameters. Furthermore, when a specific batch parameter p2 is selected, its corresponding chart component entity... For chart component entities before setting batch parameters This allows for overlapping display, enabling a collaborative display effect where the two components work together from top to bottom.

[0152] Note that the drilling-up coordination of this invention does not require completion between two identical components in the overlay display. Further conditions can be extended to include the lower-level component containing the batch parameter p, and the row setting in the upper-level component (…). By setting the batch parameter p corresponding to the lower-level component, the two can complete the drill-up and drill-down display based on the message mechanism.

[0153] In this embodiment, the chart view configuration generation device first obtains the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers. Then, based on the chart component identifiers, it searches a preset chart component library for a chart component that meets the requirements. The chart component includes chart view configuration parameters and a data source identifier. Next, it obtains target data that meets the requirements based on the data entity interface filtering parameters. Finally, it instantiates the chart component based on the target data to generate the target chart view. Because this application obtains the target chart view by providing a data entity interface and instantiating the target data that meets the requirements based on the data entity interface filtering parameters, it improves the efficiency of chart component generation and enhances the degree to which chart components meet customized requirements, thereby significantly reducing the size of the chart component library.

[0154] The following are embodiments of the apparatus of the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.

[0155] Please see Figure 9 This diagram illustrates the structure of a chart view configuration generation device provided in an exemplary embodiment of the present invention. This chart view configuration generation device can be implemented as all or part of a terminal through software, hardware, or a combination of both. The device 1 includes a requirement acquisition module 10, a chart component search module 20, a target data acquisition module 30, and a target chart view generation module 40.

[0156] The requirement acquisition module 10 is used to acquire the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers.

[0157] The chart component search module 20 is used to search for chart components that meet the requirements from the preset chart component library based on the chart component identifier. The chart component includes chart view configuration parameters and data source identifier.

[0158] The target data acquisition module 30 is used to acquire target data that meets the requirements based on the data entity interface filtering parameters.

[0159] The target chart view generation module 40 is used to instantiate the chart component based on the target data and generate the target chart view.

[0160] It should be noted that the chart view configuration generation device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the chart view configuration generation method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the chart view configuration generation device and the chart view configuration generation method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0161] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0162] In this embodiment, the chart view configuration generation device first obtains the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers. Then, based on the chart component identifiers, it searches a preset chart component library for a chart component that meets the requirements. The chart component includes chart view configuration parameters and a data source identifier. Next, it obtains target data that meets the requirements based on the data entity interface filtering parameters. Finally, it instantiates the chart component based on the target data to generate the target chart view. Because this application obtains the target chart view by providing a data entity interface and instantiating the target data that meets the requirements based on the data entity interface filtering parameters, it improves the efficiency of chart component generation and enhances the degree to which chart components meet customized requirements, thereby significantly reducing the size of the chart component library.

[0163] The present invention also provides a computer-readable medium storing program instructions thereon, which, when executed by a processor, implement the chart view configuration generation method provided in the above-described method embodiments. The present invention also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the chart view configuration generation method of the above-described method embodiments.

[0164] Please see Figure 10 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 10 As shown, terminal 1000 may include: at least one processor 1001, at least one network interface 1004, user interface 1003, memory 1005, and at least one communication bus 1002.

[0165] The communication bus 1002 is used to realize the connection and communication between these components.

[0166] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.

[0167] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0168] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts within the electronic device 1000 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 1001.

[0169] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 10 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a configuration generation application for graphical views.

[0170] exist Figure 10 In the terminal 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user's input data; while the processor 1001 can be used to call the configuration generation application of the chart view stored in the memory 1005, and specifically perform the following operations:

[0171] Obtain the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers;

[0172] The system searches for chart components that meet the requirements from the preset chart component library based on the chart component identifier. The chart component includes chart view configuration parameters and data source identifier.

[0173] Obtain the target data that meets the requirements based on the filtering parameters of the data entity interface;

[0174] The chart component is instantiated based on the target data to generate the target chart view.

[0175] In one embodiment, when the processor 1001 instantiates the chart component based on the target data and generates the target chart view, it specifically performs the following operations:

[0176] Obtain the original data corresponding to the target data;

[0177] Filter the original data based on the data source filtering parameters of the target chart component;

[0178] Based on the pivot parameters, perform pivot processing on the filtered original data;

[0179] Based on the drawing parameters, the data after perspective is plotted to generate the target chart view;

[0180] When the pivot parameters contain batch parameters, the target chart view contains batch parameter identifiers.

[0181] In one embodiment, when processor 1001 performs pivot processing on target data to obtain a pivot table according to the data pivot processing flow description, it specifically performs the following operations:

[0182] Pivot processing includes data grouping and data statistics;

[0183] Based on pivot table processing, the filtered data is subjected to pivot table processing, including:

[0184] Data grouping is used to group the filtered row data according to the grouping parameters to generate multiple groups of data; each group of data includes a target key and a set of row data.

[0185] Data statistics perform statistical operations on the set of rows in each data group according to statistical parameters to obtain the target value for each data group.

[0186] The target key and its corresponding target value in each set of data are combined into key-value pairs to obtain a key-value pair sequence.

[0187] The key-value pair sequence is identified as pivot data.

[0188] In one embodiment, the processor 1001 also performs the following operations:

[0189] When a data refresh is detected in the data entity interface of any chart view within the container...

[0190] Refresh the chart view.

[0191] In one embodiment, the processor 1001 also performs the following operations:

[0192] When it is detected that the container has modified the batch parameter definition, or any chart component has modified the batch parameter definition;

[0193] Broadcast the updated batch parameters to the container;

[0194] When a chart view containing batch parameters within a container recognizes a change, the corresponding chart view is updated based on the updated batch parameters.

[0195] In this embodiment, the chart view configuration generation device first obtains the chart view configuration generation requirements, which include data entity interface filtering parameters and chart component identifiers. Then, based on the chart component identifiers, it searches a preset chart component library for a chart component that meets the requirements. The chart component includes chart view configuration parameters and a data source identifier. Next, it obtains target data that meets the requirements based on the data entity interface filtering parameters. Finally, it instantiates the chart component based on the target data to generate the target chart view. Because this application obtains the target chart view by providing a data entity interface and obtaining target data that meets the requirements based on the data entity interface filtering parameters, and then instantiating the chart component that meets the requirements, the efficiency of chart view generation is improved.

[0196] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program generated by configuring the graphical view can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.

[0197] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method for generating a configuration of a chart view, characterized in that, The method includes: Obtain the chart view configuration generation requirements, wherein the chart view configuration generation requirements include data entity interface filtering parameters and chart component identifiers; The target chart component that meets the requirements is searched from a preset chart component library based on the chart component identifier. The chart component includes chart view configuration parameters and a data source identifier. The preset chart component library is configured with chart component generation rules and chart view configuration parameter fields. The chart component generation rules include data source filtering rules, pivot table rules, and plotting rules. The chart view configuration parameter fields include data source filtering parameter fields, pivot table parameter fields, and plotting parameter fields. When the first dimension data in the pivot table parameter field includes at least two levels of statistical labels, the pivot table parameter field includes batch parameters. The batch parameters refer to statistical labels at the second and higher levels. Obtain the target data that meets the requirements based on the filtering parameters of the data entity interface; The chart component is instantiated based on the target data to generate the target chart view.

2. The method according to claim 1, characterized in that, The method for generating chart components in the preset chart component library includes: Obtain the data source identifier and chart view pre-configuration parameters, wherein the chart view pre-configuration parameters include data source filtering parameters, data pivot parameters, and drawing parameters; Generate chart components according to the chart component generation rules; The chart component includes a preset chart view style.

3. The method according to claim 2, characterized in that, When the chart component identifier includes a preset chart view style The step of searching for a target chart component that meets the requirements from a preset chart component library based on the chart component identifier includes: matching a chart component that matches the preset style of the chart view from the preset chart component library based on the chart component identifier; The matched chart component is denoted as the target chart component.

4. The method according to claim 1, characterized in that, Instantiate the chart component based on the target data to generate a target chart view, including: Obtain the original data corresponding to the target data; The original data is filtered according to the data source filtering parameters of the target chart component; Based on the data pivot parameters, perform data pivot processing on the filtered original data; Based on the drawing parameters, the data after perspective is plotted to generate the target chart view; Wherein, when the data pivot parameter contains a batch parameter, the target chart view contains a batch parameter identifier.

5. The method according to claim 4, characterized in that, The data pivoting process includes data grouping and data statistics; The step of performing data pivoting processing on the filtered original data according to the data pivoting parameters includes: The data grouping is used to group the filtered row data according to the grouping parameters to generate multiple groups of data; wherein, each group of data includes a target key and a set of row data; The data statistics process performs statistical operations on the row data set in each data group according to statistical parameters to obtain the target value of each data group. The target key and its corresponding target value in each group of data are combined into a key-value pair to obtain a key-value pair sequence. The key-value pair sequence is identified as perspective data.

6. A method for updating a chart view, used for updating a chart view within a container, wherein the chart view is generated using the method described in claims 1-5, characterized in that, The container is equipped with a listening mechanism to monitor changes in chart view configuration generation requirements. The method is as follows: When a data refresh is detected in the data entity interface of any of the chart views within the container... This will refresh the chart view.

7. The method according to claim 6, characterized in that, The method further includes: When it is detected that the container has modified the batch parameter definition, or any chart component has modified the batch parameter definition; Broadcast the updated batch parameters to the container; When a chart view containing the batch parameters within a container recognizes the change, the corresponding chart view is updated according to the updated batch parameters.

8. A configuration generation device for a chart view, characterized in that, The device includes: The requirement acquisition module is used to acquire the chart view configuration generation requirements, wherein the chart view configuration generation requirements include data entity interface filtering parameters and chart component identifiers; The chart component search module is used to search for chart components that meet the requirements from a preset chart component library based on the chart component identifier. The chart component includes chart view configuration parameters and a data source identifier. The preset chart component library is configured with chart component generation rules and chart view configuration parameter fields. The chart component generation rules include data source filtering rules, pivot table rules, and plotting rules. The chart view configuration parameter fields include data source filtering parameter fields, pivot table parameter fields, and plotting parameter fields. When the first dimension data in the pivot table parameter field includes at least two levels of statistical labels, the pivot table parameter field includes batch parameters. The batch parameters refer to statistical labels at the second and higher levels. The target data acquisition module is used to acquire target data that meets the requirements based on the data entity interface filtering parameters. The target chart view generation module is used to instantiate the chart component based on the target data and generate the target chart view.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the method steps as claimed in any one of claims 1-7.

10. A terminal, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1-7.

Citation Information

Patent Citations

  • Data-driven big data analysis method, system and device, storage medium and terminal

    CN111581932A

  • Road network operation monitoring method and device, storage medium and terminal

    CN112016018A

  • Template-based road network operation monitoring method and device, equipment and medium

    CN113792235A

  • Linkage display method and device between components in a chart

    CN109582403A

  • Report generation method and device, computer device and storage medium

    CN110335009A