CN115544991A - Report generation method, device, equipment, medium and program product - Google Patents

Report generation method, device, equipment, medium and program product Download PDF

Info

Publication number
CN115544991A
CN115544991A CN202211392613.5A CN202211392613A CN115544991A CN 115544991 A CN115544991 A CN 115544991A CN 202211392613 A CN202211392613 A CN 202211392613A CN 115544991 A CN115544991 A CN 115544991A
Authority
CN
China
Prior art keywords
report
data
target
template
attribute set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211392613.5A
Other languages
Chinese (zh)
Inventor
冯玮莹
邵培兴
邱晓海
陈礼蓉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211392613.5A priority Critical patent/CN115544991A/en
Publication of CN115544991A publication Critical patent/CN115544991A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a report generation method, a report generation device, a report generation equipment, a report generation medium and a program product, wherein the method comprises the following steps: under the condition of receiving a report generation instruction, determining a target report template and target data according to the report generation instruction; then, processing the target data according to the row attribute set, the column attribute set and at least one data operation rule in the target report template to obtain report data; and filling the table data into the positions corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set in the target report template to generate the target report. Therefore, according to the report generation instruction, the target data are assembled and decomposed by utilizing the row attribute set, the column attribute set and at least one data operation rule in the template, and then the data are assembled according to the report template to generate the report, so that the personalized report generation is realized, and different reports can be adaptively generated according to different instruction contents of users.

Description

Report generation method, device, equipment, medium and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for generating a report.
Background
The bank agent sales insurance (called bank insurance for short) business has the characteristics of various and complex products, wide related range and the like, so in order to accurately master the development condition of the bank insurance business, the sales data of the bank insurance business needs to be rapidly subjected to statistical analysis from different angles, thereby formulating a more reasonable business management method, optimizing the bank sales resource allocation and adjusting the insurance product sales strategy.
In the prior art, the bank agent insurance system needs to rewrite report programs according to different requirements to generate reports, so that the operation is complex and the consumed time is long.
Disclosure of Invention
The embodiment of the application provides a report generation method, a report generation device, a report generation apparatus, a report generation medium and a program product, which can improve report generation efficiency.
In one aspect, an embodiment of the present application provides a report generation method, where the method includes:
under the condition that a report generation instruction is received, determining a target report template and target data according to the report generation instruction, wherein the target report template comprises a row attribute set, a column attribute set and at least one data operation rule, the row attribute set comprises at least one row attribute, and the column attribute set comprises at least one column attribute;
processing the target data according to the row attribute set, the column attribute set and the at least one data operation rule to obtain report data, wherein the report data comprises data corresponding to row attributes in the row attribute set and column attributes in the column attribute set;
and filling the report data into a position corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set in a target report template to generate a target report.
In some embodiments, the report generation instructions include content information of the target report,
the determining a target report template according to the report generation instruction comprises the following steps:
acquiring a key field in the content information of the target report;
querying at least one report template matched with the key field in a report template database, wherein different report templates are used for generating reports aiming at different transaction data;
determining the matching degree of each report template according to the key fields and the row attribute fields and the column attribute fields of the at least one report template;
and determining the report template with the highest matching degree in the at least one report template as the target report template.
In some embodiments, the determining the matching degree of each report template according to the key field and the row attribute field and the column attribute field of the at least one report template includes:
under the condition of acquiring at least two key fields, determining the weight of each key field;
determining a first similarity between each key field and a row attribute field and a column attribute field of a first report template, wherein the first report template is any report template in the at least one report template;
and determining the matching degree of the first report template according to the weight of each key field and the first similarity.
In some embodiments, after determining the matching degree of each report template according to the key field and the row attribute field and the column attribute field of the at least one report template, the method further includes:
under the condition that the matching degree of each report template in the at least one report template is lower than a preset threshold value, acquiring historical data of the report template selected by a user;
determining a second report template according to the historical data, wherein the second report template is the report template with the most user selection times in the historical data;
and determining the second report template as a target report template.
In some embodiments, the determining target data according to the report generation instruction includes:
determining a query field and a data query model of the target data based on the key field;
generating a query condition of the target data according to the query field;
and calling the data query model, and querying the target data from a database through the query condition.
In some embodiments, the processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data includes:
determining first data in the target data according to the at least one row attribute, wherein the first data is data with a row attribute value;
determining second data in the target data according to the at least one column attribute, wherein the second data is data with a column attribute value;
wherein the report data comprises the first data and the second data.
In some embodiments, the processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data includes:
under the condition that the row attribute set or the column attribute set comprises at least one cross attribute, processing the target data according to a first operation rule associated with each cross attribute to obtain blending data, wherein the at least one data operation rule comprises the first operation rule;
wherein the report data comprises the blending data, the first data and the second data.
In some embodiments, after determining the target report template and the target data according to the report generating instruction when the report generating instruction is received, the method further includes:
determining the data volume of the target data under the condition that the target report template is a detail table;
under the condition that the data volume is larger than or equal to a preset numerical value, grouping the report data to obtain a plurality of grouped data;
generating a target report according to the target report template and the report data comprises the following steps:
generating a report aiming at each of the plurality of grouped data based on the target report template to obtain a plurality of grouped reports;
wherein the target report comprises the plurality of grouped reports.
On the other hand, an embodiment of the present application provides a report generating device, where the report generating device includes:
the report generation method comprises the steps that a first determination module is used for determining a target report template and target data according to a report generation instruction under the condition that the report generation instruction is received, wherein the target report template comprises a row attribute set, a column attribute set and at least one data operation rule, the row attribute set comprises at least one row attribute, and the column attribute set comprises at least one column attribute;
the processing module is used for processing the target data according to the row attribute set, the column attribute set and the at least one data operation rule to obtain report data, wherein the report data comprises data corresponding to row attributes in the row attribute set and column attributes in the column attribute set;
a generating module, configured to fill the report data into a position in a target report template corresponding to the row attribute in the row attribute set and the column attribute in the column attribute set, so as to generate a target report, where in another aspect, an embodiment of the present application provides a report generating device, where the device includes: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the report generation method described above.
In still another aspect, an embodiment of the present application provides a computer storage medium, where computer program instructions are stored on the computer storage medium, and when executed by a processor, the computer program instructions implement the report generating method described above.
In still another aspect, an embodiment of the present application provides a computer program product, where when executed by a processor of an electronic device, an instruction in the computer program product causes the electronic device to perform the report generation method described above.
According to the report generation method, the report generation device, the report generation equipment and the computer storage medium, under the condition that a report generation instruction is received, a target report template and target data are determined according to the report generation instruction; then, processing the target data according to the row attribute set, the column attribute set and at least one data operation rule in the target report template to obtain report data; and filling the table data into the positions, corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set, in the target report template to generate the target report. Therefore, according to the report generation instruction, the target data are assembled and decomposed by utilizing the row attribute set, the column attribute set and at least one data operation rule in the template, and then the data are assembled according to the report template to generate the report, so that the personalized report generation is realized, and different reports can be adaptively generated according to different instruction contents of users.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a report generation method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a report generation apparatus according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of a report generating device according to another embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of, and not restrictive on, the present application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising 8230; \8230;" comprises 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
According to the technical scheme, the data acquisition, storage, use, processing and the like meet the relevant regulations of national laws and regulations.
The bank agent insurance system: the method is characterized in that timely transmission of information of an applicant is realized through connection of a business processing system of a bank and an insurance company system. The information of insurance underwriting by the insurance company is transmitted to the client in time by the bank, and after the client obtains the underwriting of the insurance company, the information is fed back to the client at the bank side, thereby providing the proxy insurance service for the client handling the insurance business at the bank.
And (3) at the end of the day: and (4) the agent insurance system carries out the account settling time after the business is finished.
And (4) detail report form: refers to a one-dimensional detail report.
Cross table: refers to a two-dimensional data interaction table, which includes two-dimensional intersection data and two-dimensional summary data.
A report template: the method refers to a standardized template file for report form design, and some data calculation and report generation in the report depend on a report template.
The bank agent insurance system relates to fund and business data of both banks and insurance companies, in the past, the bank agent insurance system generates reports by writing programs according to different requirements, each report writes a large number of codes, the code repeatability is high, the readability is poor, the workload of developers is large, and for a cross table, the developers need to write a large number of codes which are used for complex processing of data. In order to solve the problem, the embodiment of the application provides that the report template is used for data extraction, the codes depend on the report template to automatically calculate and generate the corresponding report, the workload of development and test of a new report is greatly reduced, the system pressure is reduced when a large-data-volume report is generated, and the expansibility is very high.
In order to solve the prior art problems, embodiments of the present application provide a report generation method, apparatus, device, and computer storage medium.
First, a report generation method provided in the embodiment of the present application is described below.
Fig. 1 shows a flowchart of a report generation method according to an embodiment of the present application. As shown in fig. 1, the report generation method provided in the embodiment of the present application includes the following steps: s101 to S104:
s101, under the condition that a report generation instruction is received, determining a target report template and target data according to the report generation instruction.
The target report template comprises a row attribute set, a column attribute set and at least one data operation rule, wherein the row attribute set comprises at least one row attribute, and the column attribute set comprises at least one column attribute.
S102, processing the target data according to the row attribute set, the column attribute set and at least one data operation rule to obtain report data.
The report data comprises data corresponding to row attributes in the row attribute set and column attributes in the column attribute set.
S103, filling the report data into the positions, corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set, of the target report template to generate a target report.
According to the report generation method, under the condition that a report generation instruction is received, a target report template and target data are determined according to the report generation instruction; then, processing the target data according to the row attribute set, the column attribute set and at least one data operation rule in the target report template to obtain report data; and filling the table data into the positions corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set in the target report template to generate the target report. Therefore, according to the report generation instruction, the target data inquired by the database is assembled and decomposed by utilizing the row attribute set, the column attribute set and at least one data operation rule in the template, and then the data is assembled according to the report template to generate the report, so that the personalized report generation is realized, and different reports can be adaptively generated according to different instruction contents of users.
In S101, when the report generation instruction is received, the report generation instruction may be analyzed first, and the target report template and the target data are determined according to the content of the report generation instruction.
Here, the target report template may be a template that matches the contents of the report generation instruction and is obtained from a preset report template library. At least one row attribute, at least one column attribute and at least one operation rule are preset in the report template. The operation rule here is a rule for processing data, and may be, for example, an accumulation process for some kind of data or may be a rule for keeping source data unchanged.
In some embodiments, the report generation instruction includes content information of the target report,
determining a target report template according to the report generation instruction, comprising:
acquiring at least one key field in the content information of the target report;
querying at least one report template matched with the at least one key field in a report template database, wherein different report templates are used for generating reports aiming at different transaction data;
determining the matching degree of each report template according to the at least one key field and the row attribute field and the column attribute field of the at least one report template;
and determining the report template with the highest matching degree in the at least one report template as a target report template.
Specifically, the report generation instruction may include content information of the target report. The method includes that a key field can be determined according to content information of a target report, for example, the content of report data needing to be generated is defined in a report generation instruction, if transaction data of wholesale or expected sale products of all companies of a certain banking institution are cancelled, the key field corresponding to the data content can be a institution name, a product name, a payment time limit, a payment amount, a name of a cancelling company and the like, can be set by a user according to the user demand, then the matching degree of each report template is calculated according to at least one key field and the row attribute field and the column attribute field of at least one report template, and the target report template is determined in a plurality of report templates according to the matching degree. Therefore, the target report template can be quickly determined according to the report generation instruction.
In some embodiments, the determining the matching degree of each report template according to the at least one key field and the at least one row attribute field and the at least one column attribute field of the report template may include:
determining the weight of each key field;
determining a first similarity between each key field and a row attribute field and a column attribute field of a first report template, wherein the first report template is any report template in at least one report template;
and determining the matching degree of the first report template according to the weight and the first similarity of each key field.
Specifically, after the key fields are obtained, the similarity between each key word and the row attribute word and the column attribute field of the report template is calculated, and the matching degree of each report template is calculated according to the similarity and the weight of the key words.
In one example, assume that the key field 1 is: the key field 2 of the agent insurance service is: the insurance business name can calculate the matching degree of the report template by the following method:
firstly, respectively calculating the similarity between the key field 1 and each row attribute field and each column attribute field of the report template, and adding the similarity to obtain the similarity 1;
then, respectively calculating the similarity between the key field 2 and each row attribute field and each column attribute field of the report template, and adding the similarities to obtain the similarity 2;
and adding the similarity 1 and the similarity 2 to obtain the matching degree of the report template.
In some embodiments, after determining the matching degree of each report template according to the at least one key field and the at least one row attribute field and the at least one column attribute field of the report template, the method further includes:
under the condition that the matching degree of each report template in at least one report template is lower than a preset threshold value, acquiring historical data of the report template selected by a user;
determining a second report template according to the historical data, wherein the second report template is the report template with the most user selection times in the historical data;
and determining the second report template as a target report template.
Specifically, when the matching degrees of the plurality of report templates obtained through matching are all smaller than the preset threshold, it is indicated that the matching degrees of the matched report templates are not high, and therefore, the historical data of the user, that is, the data of the report template selected historically, can be obtained, that is, the report template with the highest historical use frequency of the user can be obtained to serve as the target report template. Therefore, the report template which is used by the user longest can be obtained to serve as the target report template under the condition that the matching degree of the report template which is automatically matched by the system is low, and the requirement of the user can be met better.
In some embodiments, the report generation instruction may further include template identification information,
determining the target report template according to the report generating instruction may include:
determining the type of the target report according to the content information of the target report;
and determining a target report template matched with the template identification information in the report templates corresponding to the target report types.
Here, the template identification information may be a transaction code, for example, a report type may be generated at the time the report is defined by the backend configuration. The report template correspondingly adopts a form corresponding to the internal transaction code, the number of the report template is bound with the transaction code, after the front end calls out the back end to transact, the back end finds out the corresponding report template according to the transaction identification, the two-stage classification can be carried out on the same transaction, and the determination can be carried out through different identification information.
In some embodiments, the determining the target data according to the report generation instruction may include:
determining a query field and a data query model of the target data based on the key field;
generating a query condition of the target data according to the query field;
and calling a data query model, and querying target data from the database through query conditions.
Specifically, data query models corresponding to different data query types can be preset to meet data query requirements of different types of reports, query conditions corresponding to target data query are generated by determining query fields of target data through key fields in content information of a target report, so that during target data query, the target data query conditions can be determined in a personalized mode through the content information of the target report, the requirements for generating different reports can be met, and the method has better usability and convenience, and accordingly target data query time is simplified.
In some embodiments, in S102, processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data may include:
determining first data in the target data according to at least one row attribute, wherein the first data is data with a row attribute value;
determining second data in the target data according to at least one column attribute, wherein the second data is data with a column attribute value;
the report data comprises first data and second data.
Specifically, in obtaining the target data, data having a line attribute value in the target data may be extracted according to a line attribute, for example, the line attribute may be a name, a gender, an age, and the like; and similarly, data with the row attribute value in the target data can be extracted according to the row attribute.
In some embodiments, the processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data may further include:
under the condition that the row attribute set or the column attribute set comprises at least one cross attribute, processing target data according to a first operation rule associated with each cross attribute to obtain blending data, wherein at least one data operation rule comprises a first operation rule;
the report data comprises blending data, first data and second data.
In the report data area, the value of the report unit located at the row-column position corresponding to the cross attribute value is the summary result, i.e. the blending data, of the values of the data area units corresponding to different attribute values of the row-column attribute corresponding to the cross attribute value according to the preset operation rule.
Here, the operation rule may be a rule or algorithm for calculation set in advance according to the property of the cross attribute, and the operation rule may be set to add or subtract the data area unit values corresponding to different attribute values of the row and column attributes corresponding to the cross attribute value. For example, if one cross attribute in the row attribute set is the total transaction amount, the data area unit values corresponding to different attribute values of the corresponding row and column attributes may be added.
In one example, metadata, row attributes, column attributes, cross-calculation conditions (i.e., operation rules) in the target report template may be obtained. And (4) expanding the table in two dimensions according to the matching of the row attributes and the column attributes of the sql query results, and performing cross calculation on the metadata according to cross calculation conditions aiming at the cross attributes to obtain the blending data.
In some embodiments, after S101, the method may further include:
determining the data volume of the target data under the condition that the target report template is a detail table;
grouping the report data to obtain a plurality of grouped data under the condition that the data volume is greater than or equal to a preset numerical value;
generating a target report according to the target report template and the report data, wherein the generating of the target report comprises the following steps:
generating a report aiming at each of the plurality of grouped data based on the target report template to obtain a plurality of grouped reports;
wherein the target report comprises a plurality of grouped reports.
Specifically, when the target report template is a detail table, the data size of the target data is determined first, and when the data size is greater than a preset threshold (for example, 10000 pieces of data), the target data is paged according to the data size to generate a plurality of reports.
In one example, a large quantity of details can be downloaded, in order to prevent a JAVA object memory overflow caused by an excessively large data result set, the oracle database query is paged, paging query is performed in a mode of transmitting the number of pages and the number of each page to generate a corresponding excel file, and after all data are queried, the generated excel files are printed into a zip file to be downloaded.
In order to facilitate understanding of the report generation method provided in this embodiment, a practical application of the above authentication method is provided herein for explanation, specifically referring to the following example:
the report generation method of the embodiment of the application can realize automatic report generation, and comprises the following specific steps:
1. and summarizing and calculating the data of the current day at the end of the day:
a. and calculating single transaction commission fees generated by transactions of accounts, security and the like.
b. And (4) summarizing and calculating the single transaction commission charge according to the apertures of different reports, and writing the calculation result into a target table.
2. Triggering and generating a report form by the front end:
(1) According to the front-end request, judging the report type: detail or cross-table
(2) For the detail table:
a. query data volume
b. When the data volume is larger than ten thousand, paging packaging is carried out on oracle database query, paging query is carried out in a mode of transmitting the number of pages and the number of strips of each page to generate corresponding excel files, and after all data are queried, the generated excel files are printed into a zip file to be downloaded.
(3) Aiming at a cross table, assembling and decomposing a result set of database query, and assembling data according to a table sample, the method comprises the following specific steps:
a. and inquiring a required result set in the database according to the requirement.
b. And acquiring the blending items in the report template to perform data blending processing.
c. And acquiring the row attribute and the column attribute of the report template. And performing table sample integration according to the attribute values.
d. And writing the assembled and decomposed data into excel.
In the embodiment of the application, personalized report generation is realized by methods such as daily end data processing, API integration, standardized templates, asynchronous report generation and the like. The code amount of traditional report development is greatly reduced, and the development test period is greatly shortened. And an extensible gap is provided for more complex report requirements in the future, and richer business requirements can be supported. The statement is helpful for the bank to check the data with the insurance company. The cross table can visually show the development condition of each caliber business and provide powerful data support for the development of bank agent insurance business in the future.
Based on the report generation method provided by the above embodiment, correspondingly, the present application further provides a specific implementation manner of the data processing apparatus. Please see the examples below.
Referring first to fig. 2, a report generation apparatus 200 provided in the embodiment of the present application includes the following units:
the first determining module 201 is configured to determine a target report template and target data according to a report generation instruction under the condition that the report generation instruction is received, where the target report template includes a row attribute set, a column attribute set, and at least one data operation rule, the row attribute set includes at least one row attribute, and the column attribute set includes at least one column attribute;
the processing module 202 is configured to process the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data, where the report data includes data corresponding to the row attribute in the row attribute set and the column attribute in the column attribute set;
the generating module 203 is configured to fill the report data into the position, corresponding to the row attribute in the row attribute set and the column attribute in the column attribute set, in the target report template, so as to generate a target report.
The data processing device 200 provided by the application determines a target report template and target data according to a report generation instruction under the condition that the report generation instruction is received; then, processing the target data according to the row attribute set, the column attribute set and at least one data operation rule in the target report template to obtain report data; and generating a target report according to the target report template and the report data. Therefore, according to the report generation instruction, the target data inquired by the database is assembled and decomposed by utilizing the row attribute set, the column attribute set and at least one data operation rule in the template, and then the data is assembled according to the report template to generate the report, so that the personalized report generation is realized, and different reports can be adaptively generated according to different instruction contents of users.
As another implementation manner of the present application, the report generating instruction includes content information of a target report, and the first determining module 201 may include:
the first acquisition unit is used for acquiring at least one key field in the content information of the target report;
the first query unit is used for querying at least one report template matched with at least one key field in a report template database, and different report templates are used for generating reports aiming at different transaction data;
the first determining unit is used for determining the matching degree of each report template according to the at least one key field and the row attribute field and the column attribute field of the at least one report template;
and the second determining unit is used for determining the report template with the highest matching degree in the at least one report template as the target report template.
As an implementation manner of the present application, the first determining unit is specifically configured to determine a weight of each key field;
determining a first similarity between each key field and a row attribute field and a column attribute field of a first report template, wherein the first report template is any report template in at least one report template;
and determining the matching degree of the first report template according to the weight and the first similarity of each key field.
And matching the information with the target report template.
As an implementation manner of the present application, the first determining module 201 may further include:
the second acquisition unit is used for acquiring historical data of the report template selected by the user under the condition that the matching degree of each report template in at least one report template is lower than a preset threshold value;
the third determining unit is used for determining a second report template according to the historical data, wherein the second report template is the report template with the most user selection times in the historical data;
and the fourth determining unit is used for determining the second report template as the target report template.
As an implementation manner of the present application, the first determining module 201 may further include:
a fifth determining unit, configured to determine a query field and a data query model of the target data based on the content information of the target report;
the generating unit is used for generating a query condition of the target data according to the query field;
and the second query unit is used for calling the data query model and querying the target data from the database through the query condition.
As an implementation manner of the present application, in order to implement fast generation of a report, the processing module 202 may include:
a sixth determining unit configured to determine, according to at least one line attribute, first data in the target data, the first data being data having a line attribute value;
a seventh determining unit, configured to determine, according to at least one column attribute, second data in the target data, where the second data is data having a column attribute value;
the report data comprises first data and second data.
As an implementation manner of the present application, in order to implement fast generation of a report, the processing module 202 may include:
the processing unit is used for processing the target data according to a first operation rule associated with each cross attribute under the condition that the row attribute set or the column attribute set comprises at least one cross attribute to obtain blending data, wherein at least one data operation rule comprises the first operation rule;
the report data comprises blending data, first data and second data.
In some embodiments, the report generating apparatus 200 may include:
the second determining module is used for determining the data volume of the target data under the condition that the target report form template is a detail form;
the grouping module is used for grouping the report data to obtain a plurality of grouped data under the condition that the data volume is greater than or equal to a preset value;
the generating module 203 is specifically configured to generate a report for each of the plurality of grouped data based on the target report template, so as to obtain a plurality of grouped reports; wherein the target report comprises a plurality of grouped reports.
Fig. 3 shows a hardware structure diagram of a data processing device according to an embodiment of the present application.
The data processing device may comprise a processor 301 and a memory 302 in which computer program instructions are stored.
Specifically, the processor 301 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 302 may include mass storage for data or instructions. By way of example, and not limitation, memory 302 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, magnetic tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 302 may include removable or non-removable (or fixed) media, where appropriate. The memory 302 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 302 is a non-volatile solid-state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the report generation method according to any one of the embodiments of the present disclosure.
The processor 301 reads and executes the computer program instructions stored in the memory 302 to implement any one of the report generation methods in the above embodiments.
In one example, the data processing device may also include a communication interface 303 and a bus 310. As shown in fig. 3, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 to complete communication therebetween.
The communication interface 303 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiment of the present application.
Bus 310 includes hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 310 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the present application, any suitable buses or interconnects are contemplated by the present application.
In addition, in combination with the report generation method in the foregoing embodiments, embodiments of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the report generation methods in the above embodiments.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the attributes of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (12)

1. A report generation method is characterized by comprising the following steps:
under the condition of receiving a report generation instruction, determining a target report template and target data according to the report generation instruction, wherein the target report template comprises a row attribute set, a column attribute set and at least one data operation rule, the row attribute set comprises at least one row attribute, and the column attribute set comprises at least one column attribute;
processing the target data according to the row attribute set, the column attribute set and the at least one data operation rule to obtain report data, wherein the report data comprises data corresponding to row attributes in the row attribute set and column attributes in the column attribute set;
and filling the report data into the positions, corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set, in the target report template to generate a target report.
2. The method of claim 1, wherein the report generation instruction includes content information of a target report,
the determining a target report template according to the report generation instruction comprises the following steps:
acquiring at least one key field in the content information of the target report;
querying at least one report template matched with the at least one key field in a report template database, wherein different report templates are used for generating reports aiming at different transaction data;
determining the matching degree of each report template according to the at least one key field and the row attribute field and the column attribute field of the at least one report template;
and determining the report template with the highest matching degree in the at least one report template as the target report template.
3. The method according to claim 2, wherein determining the matching degree of each report template according to the at least one key field and the row attribute field and the column attribute field of the at least one report template comprises:
determining the weight of each key field;
determining a first similarity between each key field and a row attribute field and a column attribute field of a first report template, wherein the first report template is any report template in the at least one report template;
and determining the matching degree of the first report template according to the weight of each key field and the first similarity.
4. The method according to claim 2, wherein after determining the matching degree of each report template according to the at least one key field and the row attribute field and the column attribute field of the at least one report template, further comprising:
under the condition that the matching degree of each report template in the at least one report template is lower than a preset threshold value, acquiring historical data of the report template selected by a user;
determining a second report template according to the historical data, wherein the second report template is the report template with the most user selection times in the historical data;
and determining the second report template as a target report template.
5. The method of claim 2, wherein said determining target data according to said report generation instruction comprises:
determining a query field and a data query model of the target data based on the key field;
generating a query condition of the target data according to the query field;
and calling the data query model, and querying the target data from a database through the query condition.
6. The method of claim 1, wherein the processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data comprises:
determining first data in the target data according to the at least one row attribute, wherein the first data is data with a row attribute value;
determining second data in the target data according to the at least one column attribute, wherein the second data is data with a column attribute value;
wherein the report data comprises the first data and the second data.
7. The method of claim 6, wherein the processing the target data according to the row attribute set, the column attribute set, and the at least one data operation rule to obtain report data comprises:
under the condition that the row attribute set or the column attribute set comprises at least one cross attribute, processing the target data according to a first operation rule associated with each cross attribute to obtain blending data, wherein the at least one data operation rule comprises the first operation rule;
wherein the report data includes the presentation data, the first data, and the second data.
8. The method according to claim 3, wherein after determining the target report template and the target data according to the report generation instruction in case of receiving the report generation instruction, further comprising:
determining the data volume of the target data under the condition that the target report template is a detail table;
under the condition that the data volume is larger than or equal to a preset numerical value, grouping the report data to obtain a plurality of grouped data;
generating a target report according to the target report template and the report data comprises the following steps:
generating a report aiming at each of the plurality of grouped data based on the target report template to obtain a plurality of grouped reports;
wherein the target report includes the plurality of grouped reports.
9. A report generation apparatus, characterized in that the apparatus comprises:
the report generation method comprises the steps that a first determination module is used for determining a target report template and target data according to a report generation instruction under the condition that the report generation instruction is received, wherein the target report template comprises a row attribute set, a column attribute set and at least one data operation rule, the row attribute set comprises at least one row attribute, and the column attribute set comprises at least one column attribute;
the processing module is used for processing the target data according to the row attribute set, the column attribute set and the at least one data operation rule to obtain report data, wherein the report data comprises data corresponding to row attributes in the row attribute set and column attributes in the column attribute set;
and the generation module is used for filling the report data into the positions, corresponding to the row attributes in the row attribute set and the column attributes in the column attribute set, in the target report template to generate a target report.
10. A report generating apparatus, characterized in that the apparatus comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the report generating method according to any of claims 1-8.
11. A computer-readable storage medium having computer program instructions stored thereon which, when executed by a processor, implement the report generating method according to any one of claims 1-8.
12. A computer program product, characterized in that the instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the report generating method according to any of the claims 1-8.
CN202211392613.5A 2022-11-08 2022-11-08 Report generation method, device, equipment, medium and program product Pending CN115544991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211392613.5A CN115544991A (en) 2022-11-08 2022-11-08 Report generation method, device, equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211392613.5A CN115544991A (en) 2022-11-08 2022-11-08 Report generation method, device, equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN115544991A true CN115544991A (en) 2022-12-30

Family

ID=84720716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211392613.5A Pending CN115544991A (en) 2022-11-08 2022-11-08 Report generation method, device, equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115544991A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115879428A (en) * 2023-01-20 2023-03-31 北京长亭未来科技有限公司 Method, device and equipment for generating streaming report
CN117473974A (en) * 2023-12-26 2024-01-30 中冶南方工程技术有限公司 Multi-type intelligent report generation method based on nonstandard special-shaped pipeline model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115879428A (en) * 2023-01-20 2023-03-31 北京长亭未来科技有限公司 Method, device and equipment for generating streaming report
CN117473974A (en) * 2023-12-26 2024-01-30 中冶南方工程技术有限公司 Multi-type intelligent report generation method based on nonstandard special-shaped pipeline model
CN117473974B (en) * 2023-12-26 2024-04-16 中冶南方工程技术有限公司 Multi-type intelligent report generation method based on nonstandard special-shaped pipeline model

Similar Documents

Publication Publication Date Title
CN115544991A (en) Report generation method, device, equipment, medium and program product
CN104063450A (en) Hot spot information analyzing method and equipment
CN110704486B (en) Data processing method, device, system, storage medium and server
CN109872230B (en) Test method and device of financial data analysis system, medium and electronic equipment
CN110942392A (en) Service data processing method, device, equipment and medium
CN113034046A (en) Data risk metering method and device, electronic equipment and storage medium
CN109947797B (en) Data inspection device and method
CN112905677A (en) Data processing method and device, service processing system and computer equipment
CN113705201B (en) Text-based event probability prediction evaluation algorithm, electronic device and storage medium
CN106528718B (en) Method and apparatus for processing data from third party
CN114661740A (en) Data processing method, device, equipment, computer storage medium and program product
CN113609407B (en) Regional consistency verification method and device
CN113486145B (en) User consultation reply method, device, equipment and medium based on network node
CN116126299A (en) Data processing method and device, electronic equipment and readable storage medium
CN111897844A (en) Report validity detection method and device based on granularity information and electronic equipment
CN113626562A (en) Work order classification method, device, equipment and storage medium
CN111914543A (en) Report validity detection method and device, electronic equipment and readable storage medium
CN117495194A (en) Data index processing method, device, equipment and storage medium
CN114153945A (en) Method and device for detecting field standardization, electronic equipment and readable storage medium
CN115248697A (en) System gray scale upgrading method and device, electronic equipment and storage medium
CN116777585A (en) Data processing method, device, equipment, medium and product
CN114663218A (en) Interest rate determination method, device, equipment and computer storage medium
CN117632737A (en) Reverse test case generation method and device, electronic equipment and storage medium
CN117291660A (en) Data processing method, device, equipment, medium and product
CN117149165A (en) Service code generation method, device and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination