Report generation method, device, readable storage medium and electronic device

By obtaining and correlating the dimension tables and fact tables in the general data model, the target storage table is generated, which solves the problems of slow report generation and complex development in the existing technology, and achieves the effect of quickly generating reports and reducing operation and maintenance costs.

CN112699128BActive Publication Date: 2024-09-13XINAO SHUNENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011630026.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-09-13
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

In the existing technology, enterprise-level data warehouses require multiple table correlations when generating reports, which results in reduced report generation speed, complex data query and high cost, and each user's report requirements require manual development, resulting in a lot of repetitive work and errors. The efficiency is high and the operation and maintenance cost is high.

Method used

By obtaining the general data model and target table, establish the association between the dimension table and the fact table, determine the target storage table corresponding to the general data model, determine the target report data from the target storage table according to the target user's identification, and generate the target user's target Reports avoid multi-table associations and improve data query speed and development efficiency.

Benefits of technology

It achieves rapid report generation, reduces the difficulty of data query and development cost, improves the speed and efficiency of report generation, eliminates the need to manually develop each user's report data query script, and simplifies the report maintenance and editing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112699128B
    Figure CN112699128B
Patent Text Reader

Abstract

The present invention discloses a report generation method, device, computer-readable storage medium and electronic device, the method comprising: obtaining a general data model and a target table corresponding to the general data model, the target table comprising a dimension table and a fact table; establishing an association between the dimension table and the fact table according to the general data model, and determining a target storage table corresponding to the general data model; determining the target report data of the target user from the target storage table according to the identifier of the target user; and generating a target report corresponding to the target user according to the target report data. Through the technical solution of the present invention, the dimension table and the fact table can be associated based on the general data model to obtain a general storage table, and the report data can be queried based on the storage table, so as to quickly generate a report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy technology, and in particular to a report generation method, device, readable storage medium and electronic equipment. Background Art

[0002] After entering the era of the Internet of Things and big data, people pay more attention to energy data. It is a common way to store and process data in a data warehouse, and then use BI tools to display, view, analyze, and monitor energy supply data, and then adjust energy supply plans.

[0003] Currently, enterprise-level data warehouses often need to connect to data from multiple departments and businesses, so dimension tables need to be processed and then associated to generate reports.

[0004] However, the use of multi-table association reduces the speed of report generation. Summary of the invention

[0005] The present invention provides a report generation method, device, computer-readable storage medium and electronic device, which can associate dimension tables and fact tables based on a common data model to obtain a common storage table, query report data based on the storage table, and thus quickly generate reports.

[0006] In a first aspect, the present invention provides a report generation method, comprising:

[0007] Acquire a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table;

[0008] According to the general data model, establishing associations between the dimension table and the fact table, and determining a target storage table corresponding to the general data model;

[0009] According to the identifier of the target user, determining the target report data of the target user from the target storage table;

[0010] A target report corresponding to the target user is generated according to the target report data.

[0011] In a second aspect, the present invention provides a report generation device, comprising:

[0012] An acquisition module, used to acquire a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table;

[0013] An association module, used to establish an association between the dimension table and the fact table according to the general data model, and determine a target storage table corresponding to the general data model;

[0014] A query module, used to determine the target report data of the target user from the target storage table according to the identifier of the target user;

[0015] A generating module is used to generate a target report corresponding to the target user according to the target report data.

[0016] In a third aspect, the present invention provides a computer-readable storage medium, comprising execution instructions. When a processor of an electronic device executes the execution instructions, the processor executes any method described in the first aspect.

[0017] In a fourth aspect, the present invention provides an electronic device, comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes any method described in the first aspect.

[0018] The present invention provides a report generation method, device, computer-readable storage medium and electronic device. The method obtains relevant data by acquiring a general data model, a dimension table and a fact table, and then, according to the general data model, establishes an association between the dimension table and the fact table, determines the target storage table corresponding to the general data model, and then, according to the identifier of the target user, determines the target report data of the target user from the target storage table, without determining the target report data by associating multiple tables, thereby reducing the difficulty of data query and improving the speed of data query. Afterwards, a target report corresponding to the target user is generated according to the target report data. In summary, the technical solution of the present invention can associate the dimension table and the fact table based on the general data model to obtain a general storage table, and query the report data based on the storage table, thereby quickly generating a report.

[0019] The further effects of the above-mentioned non-conventional preferred manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 A flow chart of a report generation method provided by an embodiment of the present invention;

[0022] Figure 2 A flowchart of another report generation method provided by an embodiment of the present invention;

[0023] Figure 3 A structural schematic diagram of a report generation device provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] In the prior art, it is necessary to store the user's multi-dimensional data in a data warehouse developed based on the data warehouse platform HIVE, and then divide the data according to the time granularity, clean and aggregate it. Since the data warehouse is used for large-scale computing, the latency is very high and it is not suitable for real-time query of reports. Therefore, it is also necessary to export the data in the data warehouse to the MySQL relational database. Then the reporting platform reads the MySQL relational database through the database connection, associates the dimension table with the fact table according to the user's needs, and determines the report data.

[0027] However, there are the following problems in the prior art:

[0028] 1. The data warehouse and MySQL relational database need to be imported and exported back and forth.

[0029] 2. The report needs to associate multiple tables when reading data, and loading is very slow.

[0030] 3. The reporting requirements of various users are basically similar, but the data model cannot be reused, resulting in the need to redevelop each report and report data, resulting in a lot of repetitive work.

[0031] 4. Every user's needs require manual participation in the entire process, which is costly and time-consuming. As business and report needs increase, scheduling is required, and users have to wait for a long time. Report development requires 2-3 manpower.

[0032] 5. Manual coding in each link results in high error rate and poor data quality.

[0033] 6. When troubleshooting, each user's report needs to be checked for related logic separately, which increases the operation and maintenance cost. It is risky and inconvenient to directly edit the report data.

[0034] In order to solve the problems existing in the prior art, such as Figure 1 As shown, a report generation method provided by an embodiment of the present invention is provided. The method provided by the embodiment of the present invention can be applied to an electronic device, and can be specifically applied to a server or a general computer. The embodiment of the present invention is described with the electronic device as the execution subject. In this embodiment, the method specifically includes the following steps:

[0035] Step 101: Obtain a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table.

[0036] The general data model can be understood as a data structure that can integrate multi-dimensional data of all users for a certain type of report. The dimension table refers to the angle of observing data, such as the time dimension (year, month, day), the organization dimension (province, city, county), the energy type dimension (water, electricity, gas), etc. The fact table refers to the data to be paid attention to, which can be understood as the value of multi-dimensional data, such as sales, profit, PV, UV, electricity consumption, gas consumption, etc. In practical applications, the general data model can be understood as a row header in a table, wherein the field names in the row header include but are not limited to system identification, system name, device identification, device name, indicator identification, indicator name, indicator data time point. It should be noted that there can be multiple indicator names, and different indicator names correspond to different indicator identifications. Usually, the indicator data time point can be each hour in 24 hours. It should be understood that by setting the indicator in the row header, fixing the column data, and comprehensively considering the multi-dimensional data, the multi-dimensional data of all users can be summarized.

[0037] In some feasible implementations, the general data model describes data types and time granularity, and step 101 includes:

[0038] Acquire data description information corresponding to the general data model, the data description information including data type information and the time granularity information;

[0039] Obtain a target table corresponding to the data description information from a target data warehouse.

[0040] The data type information indicates the category of the data, which can be table bottom or usage. The table bottom data of the table bottom is the data at a certain time point, and the usage data of the usage needs to be obtained by subtracting the table bottom data of each of the two time points. The time information of the table bottom data and the usage data is inconsistent. Therefore, the table bottom and usage are not suitable to be put together to establish a general model.

[0041] The time granularity information indicates the measurement frequency or aggregation degree (year, quarter, month, day, hour) of the measurement value, which can be minutes, hours, days, months or years. In practical applications, it can be 15 minutes, hours, days, months or years. This embodiment does not make specific limitations on this, and it needs to be determined in combination with actual needs.

[0042] Based on the data type information and time granularity information, dimension tables and fact tables are selected from the target data warehouse. The target data warehouse refers to a database that stores multi-dimensional data of users with reporting requirements, and is used to store massive data. For example, there are two types of data type information, namely usage and table bottom, and there are five types of time granularity information, namely 15 minutes, hours, days, months, and years. There are eight general data models, and the model names are shown in Table 1 below.

[0043]

[0044]

[0045] Table 1

[0046] In some feasible implementations, the multi-dimensional data of the user mentioned above is usually IoT data, which refers to data collected through sensor IoT. Sensor IoT data collection is an existing technology and will not be described in detail here. The target data warehouse includes the multi-dimensional data of the user. The target data warehouse can be determined by the following method:

[0047] According to the public information metadata model, obtain the measurement point information;

[0048] According to the measuring point information, collecting measuring point data, and storing the measuring point data in a database;

[0049] The databases are integrated to obtain a target data warehouse, where the target data warehouse is used to store the common data model, the dimension table, the fact table and the target storage table.

[0050] The energy physical world is a complex system composed of different energy types (gas, electricity, cold, heat, etc.) and equipment in different energy fields (load, source, network, storage). The digital description of this system requires a universal information model, so that objects of different energy types and different energy fields and their related characteristics can be described using a unified description framework (common information metadata model), thus laying the foundation for the digitalization of the energy world. Therefore, the common information metadata model is used to describe objects of different energy types and different energy fields and their related characteristics, and provides data models and various corresponding interface specifications and technologies.

[0051] The measuring point information includes the measuring point name, measuring point code, and IoT information of the measuring point name, wherein the measuring point name indicates the attribute corresponding to the measuring point data, for example, it can be the air preheater inlet water temperature, air preheater outlet water temperature, desuperheater outlet steam temperature, desuperheater water inlet cumulative flow, desuperheater water inlet pressure, desuperheater water inlet instantaneous flow, steam pressure high, desuperheater water inlet temperature, and steam temperature high. The measuring point code is used to uniquely identify the measuring point name. For example, the measuring point information includes the air preheater inlet water temperature (TwAphIn), wherein the air preheater inlet water temperature is the measuring point name, and TwAphIn is the measuring point code. The IoT information indicates the device address, data type, data unit, and data communication method of the data acquisition device. The data acquisition device refers to the device that collects the measurement point data, for example, it can be an IoT gateway; the data type indicates the properties of the measurement point data, for example, it can be an instantaneous value, a cumulative value, or a status value; the data communication method refers to how the data acquisition device uploads data to the database, usually referring to the communication protocol, for example, it can be RS232 (asynchronous transmission standard interface), SPI (serial peripheral interface), CAN (field bus), I2C (internal bus) and RS485 (synchronous transmission standard interface), which needs to be determined based on actual conditions.

[0052] After determining the measuring point information, the measuring point data can be collected according to the IoT information of the measuring point name. The measuring point data is stored in the database, and then the database is integrated to obtain the target data warehouse. Here, the database is extracted, cleaned, converted, and loaded into the target data warehouse. Here, the target data warehouse can be understood as a data warehouse platform.

[0053] Step 102: According to the general data model, establish an association between the dimension table and the fact table, and determine a target storage table corresponding to the general data model.

[0054] Generally speaking, a fact table is associated with one or more dimension tables.

[0055] In some possible implementations, the general data model indicates the field names in the row header, and the target storage table can be determined in the following ways:

[0056] Obtaining a blank table to be filled in, wherein the row headers in the blank table to be filled in match the general data model;

[0057] The dimension table and the fact table in the target table are imported into the corresponding fields in the blank table to be filled in, and the target storage table corresponding to the general data model is determined.

[0058] Specifically, a blank table to be filled is constructed, the row header of which is the general data model, including multiple field names, and the dimension table and the fact table are imported into the blank fields corresponding to the field names in the blank table to be filled, thereby obtaining a target storage table corresponding to the general data model.

[0059] Step 103: Determine the target report data of the target user from the target storage table according to the identifier of the target user.

[0060] The target user's identifier is used to uniquely indicate the user. It should be understood that the target user's identifier is determined based on a common data model and can uniquely identify the user. Optionally, the identifier may include a system identifier, a device identifier, and an indicator identifier. The target report data refers to data used to generate a report.

[0061] In some feasible implementations, the target report data may be determined in the following ways:

[0062] According to the identification of the target user, based on the target query engine, the data in the target storage table is screened to determine the target report data corresponding to the target user, and the similarity between the syntax of the target query engine and the data warehouse storing the target storage table meets the preset conditions.

[0063] Based on the target user's identifier, the target storage table can be filtered through the target query engine to obtain the target report data corresponding to the target user. In order to speed up the query efficiency of the target query engine, the similarity between the syntax of the target query engine and the storage target storage table meets the preset condition, where the preset condition includes that the syntax of the target query engine and the storage target storage table is the same.

[0064] It should be noted that based on the query operation on the target storage table, compared with determining the target report by associating multiple tables, the query speed of report data can be improved. At the same time, there is no need to import dimension tables and fact tables into the relational database, and there is no need to develop data query scripts separately for each user, which reduces development costs and improves development efficiency.

[0065] Step 104: Generate a target report corresponding to the target user according to the target report data.

[0066] In this embodiment, a target report corresponding to a target user is generated based on the target report data. It should be noted that in actual applications, report attribute information is also required, such as table number, table name, chart type, chart color and other parameters necessary for constructing a report. Then, based on the target report data and the report attribute information, a target report corresponding to a target user can be generated. Here, the report attribute information can be configured in advance by the target user or developed by the developer.

[0067] As a feasible implementation method, the target report can be determined based on the report module. Specifically, the target report can be determined in the following ways:

[0068] Get the reference report template;

[0069] According to the target report data, the reference report template is adjusted to determine the target report template;

[0070] A target report is determined according to the target report data and the target report template.

[0071] Specifically, obtain a reference report template, which refers to a fixed format used for drawing or designing a plan. Considering that the target report data may differ from the reference report template, it is necessary to adjust the reference report template so that the reference report template and the target report data are compatible. For example, if the reference report template has only 4 columns, but the target report data has 10 columns, the number of columns in the reference report template needs to be adjusted. For another example, if the title in the reference report template does not match the target user, the title needs to be modified. After that, import the target report data into the target report template to determine the target report.

[0072] Furthermore, it also includes:

[0073] Publishing the target report to generate a report link of the target report;

[0074] The report link is sent to the client of the target user so that the client displays the target report.

[0075] Reports are generally developed on a report development platform set up on electronic devices, but users cannot obtain the developed reports. Therefore, it is necessary to generate a report link for the target report through the report development platform. The report link is used to uniquely identify the target report and indicate the location of the target report. After that, the report link is published to the client of the target user, so that the client can parse the report link, load the target report, and display the target report on the client for subsequent analysis and decision-making. Loading the target report only requires data query from the target storage table, thereby improving the loading speed of the report.

[0076] It can be seen from the above technical solutions that the beneficial effects of this embodiment are: the dimension table and the fact table can be associated based on the common data model to obtain a common storage table, and the report data can be queried based on the storage table, so as to quickly generate reports. At the same time, there is no need to export data, which is convenient for report development. In the later stage, only the common storage table needs to be maintained to facilitate report dimensions.

[0077] Figure 1What is shown is only a basic embodiment of the method of the present invention. By performing certain optimization and expansion on this basis, other preferred embodiments of the method can be obtained.

[0078] like Figure 2 FIG. 1 is another specific embodiment of the report generation method of the present invention. Based on the above embodiments, this embodiment is described in more detail in combination with application scenarios. The method specifically includes the following steps:

[0079] Step 201: Acquire measurement point information according to a public information metadata model; collect measurement point data according to the measurement point information, and store the measurement point data in a database.

[0080] Related content can also be found Figure 1 The description of step 101 of the embodiment will not be repeated here.

[0081] Step 202: Integrate the databases to obtain a target data warehouse, wherein the target data warehouse stores a common data model and a target table corresponding to the common data model, wherein the target table includes a dimension table and a fact table.

[0082] Based on the process of data extraction, conversion and loading, the target data warehouse is obtained. The target data warehouse is a database for storing massive data based on the data warehouse tool HIVE.

[0083] There can be 8 general data models, named respectively as daily usage report (15 minutes), daily usage report (hours), monthly usage report, annual usage report, daily usage report at the bottom of the table (15 minutes), daily usage report at the bottom of the table (hours), monthly usage report at the bottom of the table, and annual usage report at the bottom of the table.

[0084] Step 203: obtain a blank table to be filled in, wherein the row headers in the blank table to be filled in match the general data model; import the dimension table and the fact table in the target table into the corresponding fields in the blank table to be filled in, and determine the target storage table corresponding to the general data model.

[0085] Taking the model name as the daily report at the bottom of the table (15 minutes) as an example, the field names include system ID, system name, device ID, device name, indicator ID, indicator name, 0 o'clock table bottom, 1 o'clock table bottom, ..., 23 o'clock table bottom, indicator ID, indicator name, 0 o'clock table bottom, 1 o'clock table bottom, ..., 23 o'clock table bottom, ..., the target storage table can be obtained by importing the data in the dimension table and the fact table into the corresponding blank fields.

[0086] Store the target storage table in the target data warehouse.

[0087] Step 204: According to the identifier of the target user, based on the target query engine, the data in the target storage table is screened to determine the target report data corresponding to the target user, and the similarity between the syntax of the target query engine and the data warehouse storing the target storage table meets the preset conditions.

[0088] The high-performance memory-based engine Presto filters the data in the target storage table in the target data warehouse to determine the target report data corresponding to the target user's ID. The target user ID includes the system ID, device ID, and indicator ID.

[0089] Step 205: Acquire a reference report template; adjust the reference report template according to the target report data to determine a target report template; determine a target report according to the target report data and the target report template.

[0090] Related content can also be found Figure 1 The description of step 104 of the embodiment will not be repeated here.

[0091] Step 206: Publish the target report to generate a report link of the target report; send the report link to the client of the target user so that the client displays the target report.

[0092] Publish the target report to determine the report link of the target report, send the report link to the client of the target user, and parse the report link through the client to load and display the target report.

[0093] It can be seen from the above technical solutions that the beneficial effects of this embodiment are: the dimension table and the fact table can be associated based on the common data model to obtain a common storage table, and the report data can be queried based on the storage table, so as to quickly generate reports. At the same time, there is no need to export data, which is convenient for report development. In the later stage, only the common storage table needs to be maintained to facilitate report dimensions.

[0094] Based on the same concept as the embodiment of the method of the present invention, please refer to Figure 3 The embodiment of the present invention further provides a report generation device, comprising:

[0095] An acquisition module 301 is used to acquire a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table;

[0096] An association module 302 is used to establish an association between the dimension table and the fact table according to the general data model, and determine a target storage table corresponding to the general data model;

[0097] A query module 303, configured to determine the target report data of the target user from the target storage table according to the identifier of the target user;

[0098] The generating module 304 is used to generate a target report corresponding to the target user according to the target report data.

[0099] In one embodiment of the present invention, the association module 302 includes: a table determination unit and an association unit; wherein:

[0100] The table determination unit is used to obtain a blank table to be filled in, wherein the row headers in the blank table to be filled in match the general data model;

[0101] The association unit is used to import the dimension table and the fact table in the target table into the corresponding fields in the blank table to be filled in, and determine the target storage table corresponding to the general data model.

[0102] In one embodiment of the present invention, the acquisition module 301 includes: a first acquisition unit and a second acquisition unit; wherein,

[0103] The first acquisition unit is used to acquire data description information corresponding to the general data model, where the data description information includes data type information and the time granularity information;

[0104] The second acquisition unit is used to acquire the target table corresponding to the data description information from the target data warehouse.

[0105] In one embodiment of the present invention, it further includes: a measuring point acquisition module, a collection storage module and an integration module; wherein,

[0106] The measuring point acquisition module is used to acquire measuring point information according to the public information metadata model;

[0107] The acquisition and storage module is used to acquire the measurement point data according to the measurement point information and store the measurement point data in a database;

[0108] The integration module is used to integrate the databases to obtain a target data warehouse, and the target data warehouse is used to store the common data model, the dimension table, the fact table and the target storage table.

[0109] In one embodiment of the present invention, the query module 303 includes: a query unit; wherein:

[0110] The query unit is used to screen the data in the target storage table according to the identifier of the target user and based on the target query engine to determine the target report data corresponding to the target user, and the similarity between the syntax of the target query engine and the data warehouse storing the target storage table meets the preset conditions.

[0111] In one embodiment of the present invention, the generating module 304 includes: a template acquiring unit, an adjusting unit and a generating unit; wherein,

[0112] The template acquisition unit is used to acquire a reference report template;

[0113] The adjusting unit is used to adjust the reference report template according to the target report data to determine the target report template;

[0114] The generating unit is used to determine the target report according to the target report data and the target report template.

[0115] In one embodiment of the present invention, it further includes: a link generation module and a publishing module; wherein,

[0116] The link generation module is used to publish the target report to generate a report link of the target report;

[0117] The publishing module is used to send the report link to the client of the target user so that the client displays the target report.

[0118] Figure 4It is a structural diagram of an electronic device provided by an embodiment of the present invention. At the hardware level, the electronic device includes a processor 401 and a memory 402 storing execution instructions, and optionally also includes an internal bus 403 and a network interface 404. Among them, the memory 402 may include a memory 4021, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 4022 (non-volatile memory), such as at least one disk storage, etc.; the processor 401, the network interface 404 and the memory 402 can be interconnected through an internal bus 403, and the internal bus 403 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc.; the internal bus 403 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. Of course, the electronic device may also include hardware required for other services. When the processor 401 executes the execution instruction stored in the memory 402, the processor 401 executes the method in any embodiment of the present invention, and is at least used to execute the following steps: Figure 1 or Figure 2 The method shown.

[0119] In a possible implementation, the processor reads the corresponding execution instructions from the non-volatile memory into the memory and then runs them, and can also obtain the corresponding execution instructions from other devices to form a report generation device at the logical level. The processor executes the execution instructions stored in the memory to implement a report generation method provided in any embodiment of the present invention through the execution of the execution instructions.

[0120] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0121] The embodiment of the present invention further provides a computer-readable storage medium, including an execution instruction. When a processor of an electronic device executes the execution instruction, the processor executes the method provided in any embodiment of the present invention. The electronic device may be specifically as follows: Figure 4 The electronic device shown; the execution instruction is a computer program corresponding to the report generating device.

[0122] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods or computer program products. Therefore, the present invention may be implemented in the form of a complete hardware embodiment, a complete software embodiment, or a combination of software and hardware.

[0123] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0124] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0125] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A report generation method, It is characterized in that include: Acquire a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table; According to the general data model, establishing associations between the dimension table and the fact table, and determining a target storage table corresponding to the general data model; According to the identifier of the target user, determining the target report data of the target user from the target storage table; Generate a target report corresponding to the target user according to the target report data; The obtaining of the target table corresponding to the general data model includes: Acquire data description information corresponding to the general data model, wherein the data description information includes data type information and time granularity information; Obtaining a target table corresponding to the data description information from a target data warehouse; Before obtaining the general data model and the target table corresponding to the general data model, the method further includes: Obtaining measurement point information according to a public information metadata model; the public information metadata model is used to describe objects of different energy types and different energy fields and their related characteristics, and provides a data model and corresponding interface specifications and technologies; According to the measuring point information, collecting measuring point data, and storing the measuring point data in a database; Integrate the databases to obtain a target data warehouse, where the target data warehouse is used to store the common data model, the dimension table, the fact table and the target storage table; wherein the target data warehouse is a database based on a data warehouse tool HIVE; The establishing, according to the general data model, an association between the dimension table and the fact table, and determining a target storage table corresponding to the general data model, includes: Obtaining a blank table to be filled in, wherein the row headers in the blank table to be filled in match the general data model; The dimension table and the fact table in the target table are imported into the corresponding fields in the blank table to be filled in, and the target storage table corresponding to the general data model is determined.

2. The method according to claim 1, It is characterized in that The step of determining the target report data of the target user from the target storage table according to the identifier of the target user includes: According to the identification of the target user, based on the target query engine, the data in the target storage table is screened to determine the target report data corresponding to the target user, and the similarity between the syntax of the target query engine and the data warehouse storing the target storage table meets the preset conditions.

3. The method according to claim 1, It is characterized in that Generating a target report corresponding to the target user according to the target report data includes: Get the reference report template; According to the target report data, the reference report template is adjusted to determine the target report template; A target report is determined according to the target report data and the target report template.

4. The method according to claim 1, It is characterized in that Also includes: Publishing the target report to generate a report link of the target report; The report link is sent to the client of the target user so that the client displays the target report.

5. A report generating device, It is characterized in that include: An acquisition module, used to acquire a general data model and a target table corresponding to the general data model, wherein the target table includes a dimension table and a fact table; An association module, used to establish an association between the dimension table and the fact table according to the general data model, and determine a target storage table corresponding to the general data model; A query module, used to determine the target report data of the target user from the target storage table according to the identifier of the target user; A generating module, used for generating a target report corresponding to the target user according to the target report data; The obtaining of the target table corresponding to the general data model includes: Acquire data description information corresponding to the general data model, wherein the data description information includes data type information and time granularity information; Obtaining a target table corresponding to the data description information from a target data warehouse; Before obtaining the general data model and the target table corresponding to the general data model, the method further includes: Obtaining measurement point information according to a public information metadata model; the public information metadata model is used to describe objects of different energy types and different energy fields and their related characteristics, and provides a data model and corresponding interface specifications and technologies; According to the measuring point information, collecting measuring point data, and storing the measuring point data in a database; Integrate the databases to obtain a target data warehouse, where the target data warehouse is used to store the common data model, the dimension table, the fact table and the target storage table; wherein the target data warehouse is a database based on a data warehouse tool HIVE; The association module includes: a table determination unit and an association unit; wherein, The table determination unit is used to obtain a blank table to be filled in, wherein the row headers in the blank table to be filled in match the general data model; The association unit is used to import the dimension table and the fact table in the target table into the corresponding fields in the blank table to be filled in, and determine the target storage table corresponding to the general data model. 6 . A computer-readable storage medium, comprising an execution instruction. When a processor of an electronic device executes the execution instruction, the processor executes the method according to claim 1 .

7. An electronic device, comprising a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor executes the method according to any one of claims 1 to 4.