Dynamic report generation method and system based on semantic model
The dynamic report generation method based on the semantic model solves the time-consuming and resource-consuming problem of traditional report generation methods, achieves efficient and flexible report generation and data analysis, and improves the report management effect.
Patent Information
- Application Number
- CN202410860216.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
The existing report generation method requires technical personnel to perform fixed coding according to business needs, which consumes a lot of time and resources. It lacks dynamic adjustment capabilities and cannot meet the real-time needs of users.
Adopt a dynamic report generation method based on semantic models. By building a semantic model including semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers, it receives dynamic configuration parameters and customized output parameters, generates and visually displays dynamic reports, and supports data filtering. , sorting, paging and summary operations to simplify the integration and management of multiple data sources.
It significantly improves the efficiency and flexibility of report generation, enhances the automation of data processing and analysis, enriches the visual display of data, and improves the effects of report management and data analysis.
Smart Images

Figure CN118734820A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a dynamic report generation method and system based on a semantic model. Background Art
[0002] Report management is a commonly used data analysis and display tool in existing enterprises. Reports can help better understand data, and can also be used to summarize and analyze data to obtain useful information. The existing report generation is that the technical staff returns the required data according to the corresponding attribute fields based on business requirements, and the front end displays it on the interface according to the returned fields. It lacks dynamic adjustment capabilities and cannot conveniently adjust the report content and format in real time according to user needs. The existing methods require a lot of manual operations in the data processing and analysis links, and lack automation and intelligent support.
[0003] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0004] The main purpose of the present invention is to provide a dynamic report generation method, system, terminal and computer-readable storage medium based on a semantic model, aiming to solve the technical problem that the traditional report generation method requires technical personnel to perform fixed coding according to business needs, which consumes a lot of time and resources. By introducing a dynamic report generation method based on a semantic model, many limitations of the traditional report generation method are overcome, the efficiency and flexibility of report generation are significantly improved, the integration and management process of multiple data sources are simplified, the degree of automation of data processing and analysis is enhanced, and the means of visual display of data are enriched, thereby comprehensively improving the effect of report management and data analysis.
[0005] To achieve the above object, the present invention provides a dynamic report generation method based on a semantic model, and the dynamic report generation method based on a semantic model comprises the following steps:
[0006] Constructing a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors, and semantic parsers;
[0007] Receiving dynamic configuration parameters and inputting the semantic model to generate a model object;
[0008] A custom output parameter is received, a dynamic report is generated according to the model object and the custom output parameter, and the dynamic report is visually displayed.
[0009] Optionally, the semantic qualifier is used to control the subject of the dynamic report, and the semantic script includes an SQL script and an interface call script.
[0010] Optionally, the semantic descriptor is used to perform data processing on the data obtained through the semantic script, and the data processing includes filtering, sorting, paging and aggregation operations.
[0011] Optionally, the semantic parser is used to configure and manage multiple data sources and databases, and support different data processing requirements.
[0012] Optionally, the step of receiving dynamic configuration parameters and inputting the semantic model to generate a model object includes:
[0013] Receiving dynamic configuration parameters and inputting them into the semantic model, extracting configuration parameters and configuration items;
[0014] Respond to changes in demand in real time according to the configuration parameters;
[0015] The execution mode and data processing mode of the semantic model are controlled according to the configuration items, and a model object is generated.
[0016] Optionally, the step of receiving the custom output parameter and generating a dynamic report according to the model object and the custom output parameter includes:
[0017] Receiving custom output parameters and applying the custom output parameters to the model object, the custom output parameters including field selection, data filtering, sorting rules, grouping criteria and aggregation functions;
[0018] The semantic descriptor performs data filtering and combined query analysis according to the custom output parameters to generate a dynamic report.
[0019] Optionally, visually displaying the dynamic report includes:
[0020] Automatically generate a report menu by configuring the control items in the semantic model, and adjust the report menu in real time according to the dynamic configuration parameters;
[0021] Performing hierarchical management and authority control on the dynamic report according to the report menu;
[0022] Setting the layout and style of the dynamic report according to the custom output parameters;
[0023] The types of charts and tables are selected according to the custom output parameters, and the dynamic report is visually displayed.
[0024] Optionally, visually displaying the dynamic report includes:
[0025] Automatically generate a report menu by configuring the control items in the semantic model, and adjust the report menu in real time according to the dynamic configuration parameters;
[0026] Performing hierarchical management and authority control on the dynamic report according to the report menu;
[0027] The layout and style of the dynamic report are set according to the custom output parameters; the types of charts and tables are selected according to the custom output parameters, and the dynamic report is visually displayed.
[0028] In addition, to achieve the above-mentioned purpose, the present invention further provides a dynamic report generation system based on a semantic model, wherein the dynamic report generation system based on a semantic model comprises:
[0029] A model building module, used to build a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers;
[0030] A parameter receiving module, used for receiving dynamic configuration parameters and inputting them into the semantic model to generate a model object;
[0031] The visualization module is used to receive the custom output parameters, generate a dynamic report according to the model object and the custom output parameters, and visualize the dynamic report.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a dynamic report generation program based on a semantic model stored in the memory and executable on the processor, wherein the dynamic report generation program based on a semantic model implements the steps of the dynamic report generation method based on a semantic model as described above when executed by the processor.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which computer-readable instructions are stored, wherein when the computer-readable instructions are executed by a processor, the various steps of the dynamic report generation method based on the semantic model as described above are implemented.
[0034] In the present invention, a semantic model is constructed, and the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors, and semantic parsers; dynamic configuration parameters are received and input into the semantic model to generate a model object; custom output parameters are received, and a dynamic report is generated according to the model object and the custom output parameters, and the dynamic report is visualized. The present invention overcomes many limitations of traditional report generation methods by introducing a dynamic report generation method based on a semantic model, significantly improves the efficiency and flexibility of report generation, simplifies the integration and management process of multiple data sources, enhances the automation of data processing and analysis, and enriches the means of visual display of data, thereby comprehensively improving the effects of report management and data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flow chart of a preferred embodiment of the method for generating dynamic reports based on a semantic model of the present invention;
[0036] Figure 2 It is a schematic diagram of the principle of a preferred embodiment of a dynamic report generation system based on a semantic model of the present invention;
[0037] Figure 3 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0039] The dynamic report generation method based on semantic model described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the dynamic report generation method based on the semantic model includes the following steps:
[0040] Step S10: construct a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers.
[0041] Specifically, the semantic model is a model used to define data extraction and processing logic. As the core component of dynamic report generation, it makes report generation more flexible and efficient through the comprehensive definition of data acquisition, processing and display. The semantic model consists of semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers.
[0042] Furthermore, the semantic qualifier is used to control the subject of the dynamic report, and the semantic script includes an SQL script and an interface call script.
[0043] Specifically, semantic qualifiers are key elements used to define and limit the subject of a report, similar to setting a topic label for a report. Semantic qualifiers are used to control the subject and scope of report generation, and define the context and constraints of the data. Semantic qualifiers can be used to clarify the areas, data types, and content scope of the report. For example, semantic qualifiers can specify the time range, geographic location, product category, etc. of the report. For example, in a sales report, semantic qualifiers can be "annual sales report", "regional sales data", etc.
[0044] Semantic scripts are scripts used to extract data from data sources. They are the core tools for implementing data query and acquisition. By executing semantic scripts, data that meets the semantic qualifier conditions can be extracted from different data sources. Semantic scripts can be SQL scripts (Structured Query Language Script) or interface call scripts that adapt to different data source types and structures. Semantic scripts are definitions for obtaining data, where SQL scripts are used to extract data from databases, and interface call scripts (API Call Script) are used to obtain data from external systems or services through API interfaces. As an example, an SQL script can be a rule query statement for a database, and an interface call script can be a call to a REST API to obtain the latest inventory data. Through the rule query statement and REST API, real-time updated data can be obtained, such as obtaining sales data for a certain month from an e-commerce platform API.
[0045] Furthermore, the semantic descriptor is used to perform data processing on the data obtained through the semantic script, and the data processing includes filtering, sorting, paging and aggregation operations.
[0046] Specifically, the semantic descriptor is a tool for defining data processing rules. Its main function is to filter, sort, page, and summarize data according to business needs during report generation. It provides users with a flexible configuration interface that can be customized for different data processing needs. The main function of the semantic descriptor in data processing is to process the original data according to preset rules so that the data can be presented in a more structured, refined, and easy-to-analyze form, which can not only reduce the complexity of data processing, but also improve the efficiency and accuracy of data analysis.
[0047] Specifically, data filtering refers to filtering data according to specified conditions and retaining only the data records that meet the conditions. For example, when processing sales data, you may only need sales data for a certain period of time. The filtering operation can help eliminate data that does not meet the conditions and ensure that the report only contains relevant data. For example, in financial reports, the finance department can use data filtering to extract only the financial data of a certain year and ignore the data of other years, so as to focus on the financial status analysis of a certain year.
[0048] Data sorting refers to arranging data in order according to certain key fields, such as arranging in ascending or descending order by date, amount or name. Sorting can clearly show the changing trend of data and help identify anomalies and patterns. Ordered data makes it easier to find specific information and improves the convenience of data browsing. For example, in a sales analysis report, the sales department can sort sales data in descending order by sales amount to quickly identify which products or services contribute to the highest sales.
[0049] Data paging refers to dividing a large amount of data into multiple pages to avoid loading too much data at one time, which would cause system performance degradation. Paging reduces the amount of data loaded at one time and increases the speed of report loading, so that users can view data page by page, with an appropriate amount of information displayed on each page, which is convenient for detailed review and analysis. For example, in a customer feedback report, the customer service department can set a certain number of customer feedback records to be displayed on each page, making it more convenient to view and analyze customer opinions and avoiding displaying a large amount of feedback information at one time, which would affect the browsing experience.
[0050] Data aggregation refers to statistical and aggregate processing of data, such as calculating the total, average, maximum and minimum values. Through aggregation operations, users can quickly obtain the overall overview of the data and the main statistical indicators, which is convenient for analysis and decision-making. Aggregation can also convert complex raw data into concise and clear statistical data, making analysis easier and more intuitive. In financial statements, for example, the finance department can aggregate the income and expenditure data of different departments, calculate the total income and total expenditure of each department, and thus grasp the company's overall financial status.
[0051] Furthermore, the semantic parser is used to configure and manage multiple data sources and databases, and support different data processing requirements.
[0052] Specifically, the semantic parser is used to configure and manage various data sources and databases during the report generation process. Data sources refer to systems or platforms used to store and provide data, such as relational databases: such as MySQL, PostgreSQL, Oracle, etc., which mainly store structured data and are suitable for complex queries and transaction processing; NoSQL databases: such as MongoDB, Cassandra, Redis, etc., which are suitable for storing unstructured data and big data, and support high concurrency and fast read and write operations; API services: such as RESTful API, SOAP, etc., which provide network-based data access interfaces and are suitable for real-time data acquisition; file storage: such as CSV files, JSON files, Excel tables, etc., which are suitable for storing and transmitting batch data. Each data source may have different data structures and access methods, so unified configuration and management are required, and the semantic parser can integrate multiple heterogeneous data sources to ensure accurate data extraction and processing, and support different types of data processing requirements, so that the system can flexibly respond to complex data environments and business scenarios.
[0053] Furthermore, different application scenarios may require different types of data processing operations, such as data conversion, data merging, data filtering, etc. The semantic parser needs to be able to flexibly support these different data processing requirements to ensure the flexibility and efficiency of the report generation process. For example, in a large enterprise, there are multiple departments using different databases or data sources. The semantic parser needs to integrate the data of each department to generate cross-departmental comprehensive reports. First, configure the department data source, configure the connection information and authentication information for each department's data source, and ensure that the data of all departments can be accessed; merge department data, configure data merging rules according to business needs, and integrate data from different departments, such as merging the budget data of the finance department and the actual sales data of the sales department to generate a budget-actual comparison report; filter department data, configure data filtering rules according to different report requirements, and only extract data from relevant departments to ensure the relevance and accuracy of the report content; perform multi-data source data analysis.
[0054] Furthermore, in data analysis, it may be necessary to obtain data from multiple data sources at the same time, such as obtaining business data from the ERP system and obtaining customer data from the CRM system. The semantic parser can help analysts integrate this data for comprehensive analysis. Configure the connection information and authentication information of multiple data sources to ensure that data can be obtained from multiple systems; configure data conversion rules according to analysis requirements to convert data in different formats, such as converting business data from the ERP system to a format compatible with the CRM system; configure data merging rules to merge data from different data sources, such as merging business data and customer data to generate customer business analysis reports.
[0055] Furthermore, data may exist in different formats, such as database tables, JSON data returned by APIs, CSV data stored in files, etc. The semantic parser can help process these data in different formats and generate consistent reports. Configure data format conversion rules to convert data in different formats, such as converting JSON data to database table structures and converting CSV data to Excel formats; configure data format merging rules according to business needs to merge data in different formats, such as merging JSON data returned by APIs with data in database tables to generate comprehensive reports; configure data format filtering rules to filter data in different formats according to specific conditions, such as filtering JSON data based on field values and filtering CSV data based on line numbers.
[0056] Step S20: Receive dynamic configuration parameters and input the semantic model to generate a model object.
[0057] Specifically, dynamic configuration parameters are parameters input by the user and can be changed at any time. They are used to adjust data extraction and processing in the report generation process in real time, including query conditions, display fields, etc., to define the content and display method of the report. By customizing output parameters, users can flexibly control the report field selection, data filtering, sorting rules, grouping criteria and data aggregation methods, so that users can adjust the report generation process according to specific business needs, improving the flexibility and usability of the report. These parameters allow users to quickly generate dynamic reports that meet business needs without modifying the underlying data model.
[0058] Furthermore, the step of receiving dynamic configuration parameters and inputting the semantic model to generate a model object includes:
[0059] Receiving dynamic configuration parameters and inputting them into the semantic model, extracting configuration parameters and configuration items;
[0060] Respond to changes in demand in real time according to the configuration parameters;
[0061] The execution mode and data processing mode of the semantic model are controlled according to the configuration items, and a model object is generated.
[0062] Specifically, dynamic configuration items refer to setting information used to control the execution mode and data processing mode of the semantic model, usually including execution mode, data processing rules, etc. The system parses the input dynamic configuration parameters and extracts valid configuration items. For example, data processing rules and report generation mode are parsed from system settings, and the parsed configuration items are mapped to the corresponding positions in the semantic model, such as mapping data processing rules to data processing modules, and mapping report generation modes to report generation modules, etc. Finally, the mapped configuration items are stored in the data structure of the semantic model for subsequent semantic model execution and data processing.
[0063] Furthermore, the system monitors the changes of dynamic configuration parameters in real time, such as when the user changes the query conditions in the front-end interface, the system environment parameters change, etc. Based on the change detection results, the system identifies the changes in actual needs, feeds the changes back to the semantic model, updates the data structure and execution logic of the semantic model, and ensures that report generation and data processing meet the latest needs. As an example, the real-time response mechanism may include parameter update: the system updates the configuration parameters and configuration items in the semantic model in real time according to the detected changes in needs, such as updating the time range, adjusting data filtering rules, etc.; model reconstruction: the system reconstructs the data structure and execution logic of the semantic model according to the updated parameters and configuration items, such as regenerating data query statements, adjusting data processing procedures, etc.; data refresh: the system refreshes data and reports in real time according to the updated semantic model to ensure that the report content seen by users is the latest, such as re-querying the database, regenerating reports, etc.
[0064] Furthermore, the execution mode refers to the execution mode selected by the semantic model at runtime, such as full query, incremental update, real-time calculation, etc. The system selects the appropriate execution mode based on the configuration items, such as selecting the full query mode for complete data query, selecting the incremental update mode for incremental data update, etc., and configures the execution flow of the semantic model and adjusts the execution parameters in the semantic model based on the selected execution mode; the data processing mode refers to the way the semantic model processes data. The system sets data processing rules based on the configuration items, configures the data processing flow in the semantic model based on the set data processing rules, and finally adjusts the data processing parameters in the semantic model based on the data processing mode to generate the model object.
[0065] Step S30: receiving a custom output parameter, generating a dynamic report according to the model object and the custom output parameter, and visually displaying the dynamic report.
[0066] Specifically, the model object is a specific data structure generated by the semantic model during the execution process, which is used to store and manage the data and configuration information required for report generation. The system instantiates the model object based on the input configuration parameters and configuration items, and can further generate dynamic reports and perform visual displays to support enterprise operation management and data monitoring.
[0067] Furthermore, the step of receiving the custom output parameter and generating a dynamic report according to the model object and the custom output parameter includes:
[0068] Receiving custom output parameters and applying the custom output parameters to the model object, the custom output parameters including field selection, data filtering, sorting rules, grouping criteria and aggregation functions;
[0069] The semantic descriptor performs data filtering and combined query analysis according to the custom output parameters to generate a dynamic report.
[0070] For example, a pre-designed system user interface or API interface allows users to input custom output parameters. Users can input parameters in the following ways:
[0071] Graphical User Interface: Users set the desired output parameters by selection, input or drag and drop.
[0072] Command Line Interface: Advanced users can input parameters through the command line to quickly generate reports.
[0073] API call: The system provides an API interface for other applications to pass parameters and automatically generate reports.
[0074] Furthermore, after receiving the custom output parameters, the system will verify and preprocess the parameters to ensure the legality and validity of the parameters, and check whether the types of the input parameters meet the requirements, such as the field selection should be a string array and the sorting rule should be a Boolean value.
[0075] Furthermore, the parameter value range validation checks whether the parameter value is within the predefined range, such as the paging size should be between 1 and 1000, and the sorting field should be a field existing in the database. For parameters not provided by the user, the system uses default values to supplement them to ensure that the parameter set is complete. For example, if the user does not specify the paging size, the system can use the default paging size of 50.
[0076] Furthermore, by applying custom output parameters to model objects, users can specify the fields that need to be displayed in the report. The system will extract and display data based on these fields, and map the fields selected by the user with the actual fields in the data source to ensure the accuracy of data extraction. At the same time, it allows users to add temporary calculated fields or alias fields in the report to improve the flexibility and readability of the report.
[0077] Furthermore, based on the filtering conditions entered by the user, the system will filter the data and only retain the data that meets the conditions. The user can define multiple filtering conditions, such as time range, numerical interval, text matching, etc. The system filters the data based on these conditions. At the same time, it can support users to combine multiple filtering conditions and use logical operators such as AND, OR, and NOT to perform complex data filtering.
[0078] Furthermore, users can specify sorting rules for data, such as sorting in ascending or descending order, and the system will sort the data according to these rules. For example, sorting rules can include single-field sorting, allowing users to specify a field for sorting, such as sorting sales data in ascending order by date; multi-field sorting, supporting users to specify multiple fields for sorting, such as sorting by department first, then by date, to ensure the logic and hierarchy of data display.
[0079] Furthermore, users can specify data grouping criteria, and the system will group and display the data according to these criteria. For example, the grouping criteria can include single-field grouping, grouping by a single field, such as displaying sales data by region; multi-field grouping, which supports users to specify multiple fields for grouping, such as grouping by region and product category, providing more granular data analysis.
[0080] Furthermore, users can select a variety of aggregation functions, such as sum, average, maximum, minimum, etc., and the system will aggregate the data based on these functions. For example, the aggregation function can include numerical data aggregation, which aggregates numerical data, such as calculating total sales, average customer purchases, etc.; non-numeric data aggregation, which aggregates non-numeric data, such as calculating the number of different customer types, etc., to support complex data analysis.
[0081] Furthermore, the semantic descriptor will filter the data according to the custom output parameters to ensure that the report contains only qualified data. For example, data filtering can include static filtering, which filters data according to fixed filtering conditions, such as filtering out invalid data and abnormal data; dynamic filtering, which filters data according to real-time user input, such as the time range and region selected by the user, to ensure the real-time and relevance of the data.
[0082] Furthermore, combined query analysis is the system that performs combined query analysis based on the query conditions and analysis requirements defined by the user through the semantic descriptor to generate the required data results. For example, combined query analysis can include condition combination, executing queries based on multiple query condition combinations, such as querying sales data by time and product category, to ensure the comprehensiveness and accuracy of data analysis; query optimization, by optimizing query statements and execution plans, improving query efficiency and ensuring rapid response of report generation; analysis rules, executing data statistics, trend analysis, correlation analysis, etc. according to the user's analysis needs, to generate valuable dynamic reports.
[0083] Furthermore, visually displaying the dynamic report includes:
[0084] Automatically generate a report menu by configuring the control items in the semantic model, and adjust the report menu in real time according to the dynamic configuration parameters;
[0085] Performing hierarchical management and authority control on the dynamic report according to the report menu;
[0086] Setting the layout and style of the dynamic report according to the custom output parameters;
[0087] The types of charts and tables are selected according to the custom output parameters, and the dynamic report is visually displayed.
[0088] Specifically, the report menu is the function navigation that users see when using the report system, including the entrance to generate and view various reports. Through the report menu, users can easily access and manage the required reports; controls are key components in the semantic model, which are used to define the structure and display rules of the report. The system will automatically generate the report menu through these controls, and users can customize the menu content by configuring these controls.
[0089] Specifically, the process of automatically generating a report menu according to the user-defined control items and the custom output parameters, and adjusting the report menu in real time according to the dynamic configuration parameters includes the following steps:
[0090] Read control item configuration: Read the control item configuration in the semantic model, including the menu structure, submenus, and reports corresponding to each menu item.
[0091] Generate menu tree: Generate a menu tree structure based on the read configuration, and automatically organize and arrange menu items.
[0092] Menu item link: Associate each menu item with the corresponding report generation and display logic to ensure that the corresponding report can be opened correctly when the user clicks the menu item.
[0093] Parameter update detection: Real-time monitoring of changes in dynamic configuration parameters, such as user selections in different time periods, permissions of different users, etc.
[0094] Menu item update: Update the display status, content, and links of report menu items in real time based on detected parameter changes, such as adding, deleting, or adjusting menu items.
[0095] Adaptive adjustment: Automatically adjust the layout and display order of the menu according to user operations and environmental changes to ensure that the menu structure is clear and easy to use.
[0096] Furthermore, hierarchical management is to group and categorize reports at different levels in the reporting system, and to perform hierarchical management according to the type, content, and application scenario of the report, such as sales reports, financial reports, customer analysis reports, etc., and to group similar or related reports, such as by department, business line, time period, etc., and to classify related reports in the same menu or submenu for users to quickly access. Hierarchical management helps to simplify the report search and management process. Permission control is to manage the access and operation permissions of reports, ensuring that only authorized users can access and operate the corresponding reports, and assign different report access permissions according to user roles and permissions. For example, administrators can access and manage all reports, and ordinary users can only view reports within their own permissions. According to the changes in user permissions and system settings, the system will dynamically adjust the user's report access permissions, such as user position changes, permission upgrades, etc., to ensure the timeliness and accuracy of permission control.
[0097] Furthermore, layout setting is to configure the display structure of the report, such as the arrangement order of columns, the organization of data blocks, etc., so that the report can display data in the best form. The present invention supports responsive layout design, automatically adjusts the layout of the report according to different devices and screen sizes, and ensures that the report can be well displayed on various devices; style setting is to configure the appearance and style of the report, such as color, font, chart style, etc., to make the report more visually beautiful and professional. As an example, a variety of preset themes can be provided, and users can choose suitable themes to apply to reports, such as business themes, simple themes, etc., to meet the needs of different scenarios. Users can customize the appearance of the report by setting colors, fonts, borders and other styles to ensure that the report style is in line with the corporate brand image or personal preferences. Chart type selection is the user's choice of a suitable chart type for data display based on data characteristics and analysis requirements. The present invention can provide a variety of standard chart types, such as line charts, bar charts, pie charts, scatter plots, etc., and can further design advanced chart types according to requirements, such as heat maps, geographic maps, tree diagrams, etc. Users can select these charts for visual analysis of complex data; table type selection is the choice of displaying data in tabular form, such as standard tables, cross tables, etc., among which the standard is suitable for displaying structured data, such as simple two-dimensional data tables; cross tables are suitable for displaying multidimensional data, such as summary data, cross-analysis data, etc. Users can freely adjust the content and display mode of the report by customizing output parameters and semantic models. At the same time, through the friendly user interface and automatic report generation function, the user's usage threshold is lowered and the efficiency of report generation is improved.
[0098] Furthermore, if Figure 2 As shown, based on the above-mentioned dynamic report generation method based on the semantic model, the present invention also provides a dynamic report generation system based on the semantic model, wherein the dynamic report generation system based on the semantic model includes:
[0099] A model building module 51, used to build a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers;
[0100] A parameter receiving module 52, used to receive dynamic configuration parameters and input them into the semantic model to generate a model object;
[0101] The visualization module 53 is used to receive the custom output parameters, generate a dynamic report according to the model object and the custom output parameters, and visualize the dynamic report.
[0102] Furthermore, if Figure 3As shown, based on the above-mentioned dynamic report generation method and system based on the semantic model, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0103] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a dynamic report generation program 40 based on a semantic model is stored on the memory 20, and the dynamic report generation program 40 based on a semantic model can be executed by the processor 10, thereby realizing the dynamic report generation method based on a semantic model in the present application.
[0104] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the dynamic report generation method based on the semantic model.
[0105] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0106] In one embodiment, when the processor 10 executes the gas detection program 40 based on multimodal data in the memory 20, the following steps are implemented:
[0107] Constructing a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors, and semantic parsers;
[0108] Receiving dynamic configuration parameters and inputting the semantic model to generate a model object;
[0109] A custom output parameter is received, a dynamic report is generated according to the model object and the custom output parameter, and the dynamic report is visually displayed.
[0110] The semantic qualifier is used to control the subject of the dynamic report, and the semantic script includes an SQL script and an interface call script.
[0111] The semantic descriptor is used to perform data processing on the data obtained through the semantic script, and the data processing includes filtering, sorting, paging and summarizing operations.
[0112] The semantic parser is used to configure and manage multiple data sources and databases, and supports different data processing requirements.
[0113] The step of receiving dynamic configuration parameters and inputting the semantic model to generate a model object includes:
[0114] Receiving dynamic configuration parameters and inputting them into the semantic model, extracting configuration parameters and configuration items;
[0115] Respond to changes in demand in real time according to the configuration parameters;
[0116] The execution mode and data processing mode of the semantic model are controlled according to the configuration items, and a model object is generated.
[0117] The step of receiving the custom output parameter and generating a dynamic report according to the model object and the custom output parameter comprises:
[0118] Receiving custom output parameters and applying the custom output parameters to the model object, the custom output parameters including field selection, data filtering, sorting rules, grouping criteria and aggregation functions;
[0119] The semantic descriptor performs data filtering and combined query analysis according to the custom output parameters to generate a dynamic report.
[0120] The step of visually displaying the dynamic report includes:
[0121] Automatically generate a report menu by configuring the control items in the semantic model, and adjust the report menu in real time according to the dynamic configuration parameters;
[0122] Performing hierarchical management and authority control on the dynamic report according to the report menu;
[0123] Setting the layout and style of the dynamic report according to the custom output parameters;
[0124] The types of charts and tables are selected according to the custom output parameters, and the dynamic report is visually displayed.
[0125] In summary, the present invention provides a method and system for generating dynamic reports based on a semantic model, the method comprising: constructing a semantic model, the semantic model comprising semantic qualifiers, semantic scripts, semantic descriptors, and semantic parsers; receiving dynamic configuration parameters and inputting them into the semantic model to generate a model object; receiving custom output parameters, generating a dynamic report according to the model object and the custom output parameters, and visually displaying the dynamic report. The present invention overcomes many limitations of traditional report generation methods by introducing a dynamic report generation method based on a semantic model, significantly improves the efficiency and flexibility of report generation, simplifies the integration and management process of multiple data sources, enhances the automation of data processing and analysis, and enriches the means of visual display of data, thereby comprehensively improving the effects of report management and data analysis.
[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal 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, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0127] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0128] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A dynamic report generation method based on a semantic model, characterized in that: The dynamic report generation method based on the semantic model includes: Constructing a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors, and semantic parsers; Receiving dynamic configuration parameters and inputting the semantic model to generate a model object; A custom output parameter is received, a dynamic report is generated according to the model object and the custom output parameter, and the dynamic report is visually displayed.
2. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The semantic qualifier is used to control the subject of the dynamic report, and the semantic script includes an SQL script and an interface call script.
3. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The semantic descriptor is used to perform data processing on the data obtained through the semantic script, and the data processing includes filtering, sorting, paging and summarizing operations.
4. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The semantic parser is used to configure and manage multiple data sources and databases, and support different data processing requirements.
5. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The step of receiving dynamic configuration parameters and inputting the semantic model to generate a model object comprises: Receiving dynamic configuration parameters and inputting them into the semantic model, extracting configuration parameters and configuration items; Respond to changes in demand in real time according to the configuration parameters; The execution mode and data processing mode of the semantic model are controlled according to the configuration items, and a model object is generated.
6. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The step of receiving the custom output parameter and generating a dynamic report according to the model object and the custom output parameter comprises: Receiving custom output parameters and applying the custom output parameters to the model object, the custom output parameters including field selection, data filtering, sorting rules, grouping criteria and aggregation functions; The semantic descriptor performs data filtering and combined query analysis according to the custom output parameters to generate a dynamic report.
7. The method for generating dynamic reports based on a semantic model according to claim 1, characterized in that: The visual display of the dynamic report comprises: Automatically generate a report menu by configuring the control items in the semantic model, and adjust the report menu in real time according to the dynamic configuration parameters; Performing hierarchical management and authority control on the dynamic report according to the report menu; Setting the layout and style of the dynamic report according to the custom output parameters; The types of charts and tables are selected according to the custom output parameters, and the dynamic report is visually displayed.
8. A dynamic report generation system based on a semantic model, characterized in that: include: A model building module, used to build a semantic model, wherein the semantic model includes semantic qualifiers, semantic scripts, semantic descriptors and semantic parsers; A parameter receiving module, used for receiving dynamic configuration parameters and inputting them into the semantic model to generate a model object; The visualization module is used to receive the custom output parameters, generate a dynamic report according to the model object and the custom output parameters, and visualize the dynamic report.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a dynamic report generation program based on a semantic model stored in the memory and executable on the processor. When the dynamic report generation program based on a semantic model is executed by the processor, the steps of the dynamic report generation method based on a semantic model as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the method for generating a dynamic report based on a semantic model as described in any one of claims 1 to 7 are implemented.
