Method for constructing report template of flexibly customized electric power marketing system
Technical Field
The invention relates to computer science, in particular to a method for constructing a report template of a flexibly customized electric power marketing system.
Background
The data center station is a main department for data processing, summarizing, statistics and analysis of the national network, and provides data support for the national network in the aspects of decision analysis, operation management and the like mainly through products such as reports, signboards, monitoring subjects and the like.
After marketing 2.0 is on line, in order to respond to the requirement of the national network headquarters, the data center develops a set of fixed reports for checking various data and analyzing the current situation of the national network and a big report for performing business logic check and data comparison on the 1.0 report. When two sets of reports are displayed, dimension data are found to be disordered, the hierarchy and logic relation between the dimensions cannot be guaranteed, and therefore the report data cannot be used for statistical analysis and the reports cannot be reported. Similar problems are found in the development and verification processes of other products, and due to the fact that the dimension relation is disordered, statistical data are deviated and cannot be used as effective data for statistical analysis. Meanwhile, it is found that when data corresponding to a certain dimension in the bottom layer data is empty, the dimension is lost when the data is displayed on the interface, so that the conditions that the dimension cannot correspond to the data, the interface display is disordered and the like occur.
In the report reporting process, the hierarchy and logic relationship of the dimensionality cannot be guaranteed, so that the hierarchy relationship is disordered when the report is displayed, the position of the dimensionality of the first-level industry is exchanged with the position of the subordinate industry, and the first-level industry which is supposed to be located above the second-level industry is displayed below the second-level industry, as shown in fig. 2.
In addition, when the billboard product is displayed in an application mode, the fact that when data corresponding to a certain dimension in bottom-layer data is empty, the dimension can be lost when the data is displayed on an interface is found, and therefore the situation that the dimension cannot correspond to the data and the interface display is disordered occurs.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a method for constructing a report template of a power marketing system, which can be flexibly customized, so that the problems of dimension loss and dimension data confusion in the product display process are solved.
The technical scheme is as follows: in order to solve the problems that dimension data are disordered and disordered, the hierarchical relation is disordered, dimension loss occurs when dimension corresponding indexes have no data and the like during product display of reports, signboards and the like in a data center, and the national network service analysis and decision making are influenced, the invention creates a template table association method which can meet the requirements of different products in a marketing system and constructs a plurality of dimension-based tables. The template table is used for solving a plurality of problems of dimensionality, and effective and accurate support is provided for data analysis and verification of the national network.
The templates can be divided into several types (such as industry templates, user classification templates and the like) according to the front-end interface and different product requirements, and each template is assigned with a unique identifier for distinguishing different template data. Meanwhile, in order that all the common dimensions may correspond to each dimension data, each template must be cartesian-product with the common dimensions of the product (product to which the template table is applied). To this end, a complete template table has been formed. The template table is used as a main table and then is associated with other data tables, so that the problems that no hierarchical relation exists among dimensions during display and dimension data columns cannot be guaranteed not to be lost can be solved.
The existing report forms and billboard products of the data center all use template tables to ensure the format and accuracy of the data, only the dimension data used by the two template tables are different, the report form template ensures the accuracy of the industry dimension format, and the data in the template table is the all-industry dimension data. The billboard template table is used for ensuring that the data of the management unit is displayed normally and not lost, and the data in the template table is the data of the management unit. The method is characterized in that the method comprises the steps of storing needed different dimension data into a table through correlation, and then using the table as a main table to disassociate an index data table, so that the effect of a template table is realized, and the format and the accuracy of the dimension data are ensured.
The invention provides a method for constructing a report template of a flexibly customized electric power marketing system, which comprises the following steps:
(1) determining the number of dimension columns according to the dimensions of the product to be displayed and the hierarchical relationship among the dimensions;
(2) integrating the related dimension data into the electronic table according to the display dimension classification;
(3) the method comprises the steps that dimension data are grouped into different templates in an electronic form according to styles required to be displayed by products;
(4) assigning a unique code to each dimension template to ensure that dimension data cannot be repeated when being taken;
(5) adding a management unit column into the spreadsheet, uniformly assigning value data to the column, and generating Cartesian product with the management unit data;
(6) building a table in a database by contrasting rows and columns of the spreadsheet;
(7) importing the integrated dimension data source into a development tool through a spreadsheet;
(8) constructing a template table in a database through Cartesian product, and determining that each management unit can acquire data of all dimensions;
(9) the template table is used as a main table association index data table to form a target table and is applied to reports and other products.
A computer storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the above method for constructing a flexibly customized report template of a power marketing system.
A computer device comprises a storage, a processor and a computer program which is stored on the storage and can be operated on the reprocessor, and when the processor executes the computer program, the method for constructing the report template of the flexibly customized electric power marketing system is realized.
Has the beneficial effects that: compared with the prior art, the invention has the following advantages: 1. the problems of dimension loss and dimension data confusion in the product display process are successfully solved; 2. the report of the fixed report form and the big report form and the normal display of the billboard product are ensured, and important guarantee and support are provided for the data analysis and decision making of the national network headquarters and business personnel.
Drawings
FIG. 1 is a flow chart of steps;
FIG. 2 is a display of the secondary industry chlor-alkali and primary chemical feedstock and chemical manufacturing industry interface;
FIG. 3 is dimensional data presented at the front end;
FIG. 4 is a template table structure;
FIG. 5 is a dimensional data source before import, with the table structure consistent with the table build statement;
FIG. 6 is a method of associating usage of a template table: the unique property is ensured by associating template table numbers, management unit codes and dimension column codes;
FIG. 7 shows the effect achieved through the template table, with no loss of dimension and guaranteed dimension hierarchy.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
As shown in fig. 1, the method for constructing a report template of a flexibly customized power marketing system according to the present invention includes the following steps:
(1) determining the number of dimension columns according to the dimensions to be displayed of the product and the hierarchical relationship among the dimensions, for example: the industry dimension is divided into 4 corresponding dimension columns, and the dimension columns are divided into 4 columns;
(2) integrating the related dimension data into the spreadsheet according to the display dimension classification, as shown in FIG. 3;
(3) the method comprises the steps that dimension data are grouped into different templates in an electronic form according to styles required to be displayed by products;
(4) assigning a unique code to each dimension template to ensure that dimension data can not be repeated when being taken;
(5) adding a management unit column into the spreadsheet, uniformly assigning value data to the column, and generating Cartesian product with the management unit data;
(6) tabulating against the rows and columns of the spreadsheet in the database, as shown in FIG. 4;
(7) importing the integrated dimension data source into a development tool through a spreadsheet, as shown in FIG. 5;
(8) constructing a template table in a database through Cartesian product, and determining that each management unit can acquire data of all dimensions;
(9) the template table is used as a main table association index data table to form a target table, and is applied to reports and other products, and the association method is shown in fig. 6.
The technical implementation effect diagram of the invention is shown in FIG. 7.
A computer storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the above method for constructing a flexibly customized report template of a power marketing system.
A computer device comprises a storage, a processor and a computer program which is stored on the storage and can run on the processor, and the processor executes the computer program to realize the method for constructing the report template of the flexibly customized electric power marketing system.