Intelligent report data configuration method and system
By identifying the database library type and building a pull program, the problem of users needing to understand the data attributes of different data sources to configure data is solved, and the simplification and practicality of intelligent report data configuration is achieved.
Patent Information
- Application Number
- CN202411902051.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, users need to understand the data attributes of different data sources and realize data extraction configuration by setting data filtering parameters, resulting in a high threshold for data configuration and reducing the practicality of smart reports.
By identifying the database library type, the corresponding pull program is pre-built, the pull program is associated with the public database, and the demand data is pulled from the database according to the report configuration request, forming a data set, and associated the data into the cells of the smart report.
It reduces the workload of users to write extract codes every time they configure data, avoids the requirement that users need to understand the data attributes of data sources, simplifies the data configuration process, and improves the practicality of smart reports.
Smart Images

Figure CN120067100A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an intelligent report data configuration method and system. Background Art
[0002] At present, the use of intelligent reports has become common in data statistics systems. Intelligent reports are used to summarize data and generate corresponding statistical tables through flexible interface settings. The core functions of intelligent reports are mainly in two aspects: first, flexible page display effect configuration; second, customized data configuration.
[0003] For flexible interface display, the core is to realize flexible configuration of cells like Excel, which is basically realized in the reports on the market. However, in terms of data configuration, for more data sources, users need to be familiar with the data attributes of different data sources, and filter out unnecessary data by setting data filtering parameters in a targeted manner, and then complete the data extraction configuration. However, this raises the threshold for users to configure data and reduces the practicality of intelligent reports. Summary of the invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a smart report data configuration method and system, aiming to solve the technical problem in the prior art of completing report construction by mastering the data attributes of different data sources and then realizing data extraction configuration by setting data filtering parameters in a targeted manner, which raises the threshold for data configuration and reduces the practicality of smart reports.
[0005] In order to achieve the above objectives, in a first aspect, an embodiment of the present application provides a method for configuring intelligent report data, comprising the following steps:
[0006] Acquire several data sources associated with the intelligent report, wherein the several data sources are respectively stored in several databases, acquire the library types of the databases, and construct corresponding pull programs based on the library types;
[0007] Associating the pulling program with a public database, obtaining a report configuration request from a user through the public database, and pulling required data from the database through the report configuration request to form a data set in the public database;
[0008] The data in the data set is associated with cells of the smart report through the report configuration request.
[0009] Compared with the prior art, the beneficial effects of the present invention are as follows: By identifying the library type of the database and constructing the pulling program in advance, it is avoided that the user needs to write corresponding extraction codes according to different data sources every time data configuration for the report is required, reducing the workload; in the case of multiple data sources, the corresponding pulling program can be directly obtained according to the report configuration request, and the required data can be pulled based on the pulling program, without the user needing to understand the data attributes of the data source. The user only needs to initiate the report configuration requirement according to the data need to complete the adaptation of the database by himself and further complete the acquisition of the required data, reducing the threshold of data configuration and enhancing the practicability of the intelligent report.
[0010] Further, the library types include SQL databases, Oracle databases, and xml databases, and the pulling programs include SQL pulling programs, Oracle pulling programs, and file stream pulling programs.
[0011] Furthermore, the step of pulling the required data from the database through the report configuration request to form a data set in the public database includes:
[0012] Extract the required data type from the report configuration request, compare the required data type with the library type to select a target library from several databases;
[0013] Select a target program corresponding to the target library from several pulling programs and select a data source from the target library;
[0014] Extract the required data from the data source and copy the required data to the public database. Several pieces of the required data form a data set.
[0015] Furthermore, the step of extracting the required data from the data source includes:
[0016] Extract the required string from the report configuration request;
[0017] The target program generates a target query statement based on the required string, and retrieves the required data from the data source through the target query statement.
[0018] Furthermore, after the step of selecting a target program corresponding to the target library from several pulling programs and selecting a data source from the target library, it further includes:
[0019] Obtain the extraction permission level of the data source and obtain the request permission level corresponding to the report configuration request;
[0020] Compare the extraction permission level with the requested permission level. If the requested permission level is lower than the extraction permission level, send an extraction inquiry message to the administrator corresponding to the extraction permission level.
[0021] Further, after the step of associating the pulling program with the public database, obtaining the report configuration request of the user through the public database, and pulling the required data from the database through the report configuration request to form a data set in the public database, the method further includes:
[0022] Perform format processing on several pieces of the required data in the data set to make the formats of several pieces of the required data unified.
[0023] Further, the step of associating the data in the data set with the cells of the intelligent report through the report configuration request includes:
[0024] Extract the required keywords corresponding to the cells of the intelligent report from the report configuration request, match the required keywords with the data set to select the target words;
[0025] Obtain the result data corresponding to the target words, and fill the result data into the cells.
[0026] In a second aspect, an embodiment of the present application provides an intelligent report data configuration system, which is applied to the intelligent report data configuration method as described in the first aspect above. The system includes:
[0027] A construction module, configured to obtain several data sources associated with the intelligent report, store several data sources in several databases respectively, obtain the database type of the databases, and construct a corresponding pulling program based on the database type;
[0028] An extraction module, configured to associate the pulling program with the public database, obtain the report configuration request of the user through the public database, and pull the required data from the database through the report configuration request to form a data set in the public database;
[0029] An association module, configured to associate the data in the data set with the cells of the intelligent report through the report configuration request.
[0030] In a third aspect, an embodiment of the present application provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the intelligent report data configuration method as described in the first aspect above is implemented.
[0031] Fourthly, an embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the intelligent report data configuration method as described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of the intelligent report data configuration method in the first embodiment of the present invention;
[0033] Figure 2 It is a structural block diagram of the intelligent report data configuration system in the second embodiment of the present invention;
[0034] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. SPECIFIC EMBODIMENTS
[0035] For the convenience of understanding the present invention, the present invention will be described more comprehensively below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present invention more thorough and comprehensive.
[0036] It should be noted that when an element is referred to as being "fixedly provided on" another element, it can be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0038] Please refer to Figure 1 , the intelligent report data configuration method provided by the first embodiment of the present invention includes the following steps:
[0039] S10: Obtain a plurality of data sources associated with the intelligent report. The plurality of data sources are respectively stored in a plurality of databases. Obtain the database type of the database, and construct a corresponding pulling program based on the database type;
[0040] The library types include SQL databases, Oracle databases, and xml databases, and the pulling programs include SQL pulling programs, Oracle pulling programs, and file stream pulling programs. Understandably, if there are more such library types, corresponding pulling programs can be constructed accordingly.
[0041] S20: Associate the pulling program with the common database, obtain the report configuration request of the user through the common database, and pull the required data from the database through the report configuration request to form a data set in the common database;
[0042] The report configuration request is a pre-set request template associated with the pulling program and the data source, which includes but is not limited to data type options, reference identifier options, and associated data options corresponding to the reference identifier options that the user needs to configure when configuring the data of the intelligent report.
[0043] The step S20 includes:
[0044] S210: Extract the required data type from the report configuration request, compare the required data type with the library types to select a target library from several databases;
[0045] S220: Select a target program corresponding to the target library from several pulling programs, and select a data source from the target library;
[0046] S230: Extract the required data from the data source, copy the required data to the common database, and several pieces of the required data form a data set;
[0047] Understandably, the required data type is the content filled by the user in the data type option, and the data source is selected from the target library through the content filled by the user in the reference identifier option. After selecting the data source, extract the required string from the report configuration request; the target program generates a target query statement based on the required string, and retrieves the required data from the data source through the target query statement. Understandably, the required string is generated based on the content filled by the user in the associated data option. By copying the required data to the common database, the operation on the required data can be prevented from affecting the data in the data source, ensuring data security.
[0048] Preferably, in the step S220, it further includes:
[0049] S240: Obtain the extraction permission level of the data source, and obtain the request permission level corresponding to the report configuration request;
[0050] S250: Compare the extraction permission level with the requested permission level. If the requested permission level is lower than the extraction permission level, send an extraction inquiry message to the administrator corresponding to the extraction permission level;
[0051] The requested permission level is obtained based on the user account corresponding to the report configuration request. By setting the extraction permission level and the requested permission level, the data security can be further enhanced.
[0052] S30: Through the report configuration request, associate the data in the data set with the cells of the intelligent report;
[0053] The step S30 includes:
[0054] S310: Extract the requirement keywords corresponding to the cells of the intelligent report from the report configuration request, match the requirement keywords with the data set to select the target words;
[0055] It can be understood that the requirement keywords can also be obtained from the content filled in the reference identifier option and the associated data option.
[0056] S320: Obtain the result data corresponding to the target word and fill the result data into the cell.
[0057] Preferably, after the step S20, the method further includes:
[0058] S40: Process the formats of several pieces of the requirement data in the data set to make the formats of several pieces of the requirement data unified;
[0059] It can be understood that the data formats of the requirement data pulled from different databases through different pulling programs are different. Therefore, after obtaining the requirement data, the formats of the requirement data need to be processed to facilitate the subsequent generation of reports.
[0060] By identifying the type of the database and constructing the pulling program in advance correspondingly, it is avoided that the user needs to write the corresponding extraction code according to the different data sources every time when data configuration of the report is required, reducing the workload; in the case of multiple data sources, the corresponding pulling program can be directly obtained according to the report configuration request, and the requirement data can be pulled based on the pulling program without the user understanding the data attributes of the data sources. The user only needs to initiate the report configuration requirement according to the data needs to complete the adaptation of the database by himself / herself and further complete the acquisition of the requirement data, reducing the threshold of data configuration and enhancing the practicability of the intelligent report.
[0061] Please refer to Figure 2, the second embodiment of the present invention provides an intelligent report data configuration system. This system is applied to the intelligent report data configuration method in the above embodiment, and the parts that have been described will not be repeated. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0062] The system includes:
[0063] A construction module 10, configured to obtain a plurality of data sources associated with an intelligent report. The plurality of data sources are respectively stored in a plurality of databases, obtain the library types of the databases, and construct corresponding pulling programs based on the library types;
[0064] An extraction module 20, configured to associate the pulling program with a public database, obtain a report configuration request of a user through the public database, pull required data from the database through the report configuration request, so as to form a data set in the public database;
[0065] The extraction module 20 includes:
[0066] A first unit, configured to extract a required data type from the report configuration request, compare the required data type with the library type, so as to select a target library from the plurality of databases;
[0067] A second unit, configured to select a target program corresponding to the target library from the plurality of pulling programs, and select a data source from the target library;
[0068] A third unit, configured to extract required data from the data source, copy the required data to the public database, and the plurality of required data form a data set;
[0069] The third unit is specifically configured to extract a required string from the report configuration request; the target program generates a target query statement based on the required string, and retrieves required data from the data source through the target query statement;
[0070] Preferably, the extraction module 20 further includes:
[0071] A fourth unit, configured to obtain the extraction permission level of the data source, and obtain the request permission level corresponding to the report configuration request;
[0072] A fifth unit for comparing the extracted permission level with the requested permission level, and if the requested permission level is less than the extracted permission level, sending an extraction inquiry message to the administrator corresponding to the extracted permission level;
[0073] An association module 30 for associating the data in the data set with the cells of the intelligent report through the report configuration request;
[0074] The association module 30 includes:
[0075] A sixth unit for extracting, from the report configuration request, demand keywords corresponding to the cells of the intelligent report, and matching the demand keywords with the data set to select target words;
[0076] A seventh unit for obtaining result data corresponding to the target words and filling the result data into the cells.
[0077] Preferably, the system further includes:
[0078] A processing module 40 for performing format processing on several pieces of the demand data in the data set to make the formats of the several pieces of demand data uniform.
[0079] The present invention also provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the intelligent report data configuration method described in the above technical solution is implemented.
[0080] The present invention also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the intelligent report data configuration method described in the above technical solution is implemented.
[0081] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0082] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention shall be subject to the appended claims.
Claims
1. A method for configuring intelligent report data, characterized in that: The following steps are involved: Acquire several data sources associated with the intelligent report, wherein the several data sources are respectively stored in several databases, acquire the library types of the databases, and construct corresponding pull programs based on the library types; Associating the pulling program with a public database, obtaining a report configuration request from a user through the public database, and pulling required data from the database through the report configuration request to form a data set in the public database; The data in the data set is associated with cells of the smart report through the report configuration request.
2. The intelligent report data configuration method according to claim 1, characterized in that: The library types include SQL database, Oracle database and XML database, and the pulling program includes SQL pulling program, Oracle pulling program and file stream pulling program.
3. The intelligent report data configuration method according to claim 1, characterized in that: The step of pulling required data from the database through the report configuration request to form a data set in the public database includes: extracting a required data type from the report configuration request, and comparing the required data type with the library type to select a target library from the plurality of databases; Selecting a target program corresponding to the target library from a plurality of the pulling programs, and selecting a data source from the target library; The demand data is extracted from the data source, and the demand data is copied into the public database. A plurality of the demand data constitute a data set.
4. The intelligent report data configuration method according to claim 3, characterized in that: The step of extracting the required data from the data source comprises: Extracting a required string from the report configuration request; The target program generates a target query statement based on the requirement character string, and retrieves the required data from the data source through the target query statement.
5. The intelligent report data configuration method according to claim 3, characterized in that: After the step of selecting a target program corresponding to the target library from the plurality of pull programs and selecting a data source from the target library, the method further includes: Obtaining an extraction permission level of the data source, and obtaining a request permission level corresponding to the report configuration request; The extraction authority level is compared with the request authority level, and if the request authority level is lower than the extraction authority level, an extraction inquiry message is sent to an administrator corresponding to the extraction authority level.
6. The intelligent report data configuration method according to claim 1, characterized in that: After the step of associating the pulling program with a public database, obtaining a report configuration request from a user through the public database, and pulling required data from the database through the report configuration request to form a data set in the public database, the method further includes: Format processing is performed on the plurality of demand data in the data set so as to unify the formats of the plurality of demand data.
7. The intelligent report data configuration method according to claim 1, characterized in that: The step of associating the data in the data set with the cells in the smart report through the report configuration request includes: Extracting demand keywords corresponding to cells of the smart report from the report configuration request, and matching the demand keywords with the data set to select a target word; Result data corresponding to the target word is obtained, and the result data is filled into the cell.
8. An intelligent report data configuration system, applied to the intelligent report data configuration method according to any one of claims 1 to 7, characterized in that: The system comprises: A construction module is used to obtain several data sources associated with the intelligent report, wherein the several data sources are respectively stored in several databases, obtain the library type of the database, and construct a corresponding pull program based on the library type; An extraction module, used to associate the pulling program with a public database, obtain a user's report configuration request through the public database, and pull required data from the database through the report configuration request to form a data set in the public database; The association module is used to associate the data in the data set with the cells of the intelligent report through the report configuration request.
9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the intelligent report data configuration method according to any one of claims 1 to 7 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the intelligent report data configuration method according to any one of claims 1 to 7 is implemented.