CN114417803B - Report generation method and device, computing equipment and computer storage medium - Google Patents

Report generation method and device, computing equipment and computer storage medium Download PDF

Info

Publication number
CN114417803B
CN114417803B CN202210318039.2A CN202210318039A CN114417803B CN 114417803 B CN114417803 B CN 114417803B CN 202210318039 A CN202210318039 A CN 202210318039A CN 114417803 B CN114417803 B CN 114417803B
Authority
CN
China
Prior art keywords
target
report
subclass
attribute
bean
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.)
Active
Application number
CN202210318039.2A
Other languages
Chinese (zh)
Other versions
CN114417803A (en
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.)
Shenzhen Zhuyun Technology Co ltd
Original Assignee
Shenzhen Zhuyun Technology 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 Shenzhen Zhuyun Technology Co ltd filed Critical Shenzhen Zhuyun Technology Co ltd
Priority to CN202210318039.2A priority Critical patent/CN114417803B/en
Publication of CN114417803A publication Critical patent/CN114417803A/en
Application granted granted Critical
Publication of CN114417803B publication Critical patent/CN114417803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/183Tabulation, i.e. one-dimensional positioning

Abstract

The embodiment of the invention relates to the technical field of computers, and discloses a report generation method, a report generation device, computer equipment and a computer storage medium, wherein the method comprises the following steps: receiving a report generation request, wherein the report generation request carries identification information of a target report type and target data information; acquiring target data according to the target data information; determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute; and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report. Through the mode, the embodiment of the invention can realize easy dimensionality and expansion and dynamically adjust the report.

Description

Report generation method and device, computing equipment and computer storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a report generation method, a report generation device, a computing device and a computer storage medium.
Background
A report is a form of displaying data using a form such as a table, a chart, etc. Generally classified into types of bar charts, pie charts, line charts, tables, volume charts, and the like. Important information such as daily conditions of enterprises, production and management conditions and the like can be known through the report, and the strategy can be further quickly adjusted to adapt to ever-changing market demands. All layers of data can be visually displayed in a report form mode, and a user can be assisted in analyzing and making decisions.
With the continuous accumulation of the system data volume, in the process of implementing the invention, the inventor finds that in the prior art, a customized static report development mode according to the requirements of the user needs to be developed again each time the requirements or dimension adjustment of the report is required, so that the development efficiency is low, and the various requirements of the user on the report cannot be quickly responded.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a report generation method and apparatus, a computing device, and a computer storage medium, which overcome the problem of low development efficiency of report adjustment in a development process.
According to an aspect of an embodiment of the present invention, there is provided a report generation method, including:
receiving a report generation request, wherein the report generation request carries identification information of a target report type and target data information;
acquiring target data according to the target data information;
determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
In an optional manner, the method for determining the subclass attribute, the parent attribute and the report generation of the target parameter according to the identification information and the target data information includes:
determining the bean name of the target report type according to the identification information;
acquiring a corresponding bean from a spring container according to the bean name;
and obtaining the target parameter subclass attribute, the target parameter parent attribute and a report generation method from the bean according to the target data information.
In an optional manner, before the acquiring the corresponding bean from the spring container according to the bean name, the method further includes:
judging whether the spring container contains the bean or not;
if said bean is not contained in said spring container;
acquiring a subclass full path of the target report type from a database according to the identification information;
searching a jar package of the report under a lib directory of a server according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type and all parameter subclass attributes, full paths of the subclass, a report generation method, bean names and basic parameters of the target subclass;
initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass;
registering the bean instance in a spring container to generate a bean.
In an optional manner, the jar package stored in the lib directory of the server is searched according to the full path of the subclass, and the jar package is packaged and placed in the lib directory of the server before the report generation request.
In an optional manner, the full path of the subclass of the target report type obtained from the database according to the identification information is set before the report generation request.
According to another aspect of the embodiments of the present invention, there is provided a report generation apparatus, including:
the receiving module is used for receiving a report generation request, wherein the report generation request carries identification information and target data information of a target report type;
the acquisition module is used for acquiring target data according to the target data information;
the determining module is used for determining a target parameter subclass attribute, a target parameter parent attribute and a report generating method according to the identification information and the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and the generation module is used for binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
In an optional manner, the determining module is further configured to:
determining the bean name of the target report type according to the identification information;
acquiring a corresponding bean from a spring container according to the bean name;
and obtaining the target parameter subclass attribute, the target parameter parent attribute and the report generation method from the bean according to the target data information.
In an optional manner, the apparatus further includes a judging module and a bean generating module, wherein
The judging module is used for judging whether the spring container contains the bean or not before the determining module acquires the corresponding bean from the spring container according to the bean name;
the bean generation module is used for acquiring a subclass full path of the target report type from a database according to the identification information when the spring container does not contain the bean; searching a jar package of the report under a lib directory of a server according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type and all parameter subclass attributes, full paths of the subclass, a report generation method, bean names and basic parameters of the target subclass; initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass; registering the bean instance in a spring container to generate a bean.
According to still another aspect of the present invention, there is provided a computer apparatus including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the steps of the report generation method.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes the processor to execute the steps of the report generation method.
The embodiment of the invention generates a request by receiving a report; determining a target parameter subclass attribute and a report generation method according to identification information and dimension information of a target report type carried in a report generation request, wherein the target parameter subclass attribute is a specific attribute of the target report type; and inheriting the target parent parameter attribute of the target report type according to the target parameter subclass attribute to obtain the target parent parameter attribute of the target report type, wherein the target parent parameter attribute is common to all report types, and inheriting the target parent parameter attribute by using the target parameter subclass attribute, so that only the target parameter subclass attribute and a generation method need to be separately defined during development, and then binding target data carried in a report generation request with the target parameter subclass attribute and the target parameter parent attribute according to the report generation method to generate the target report. And all parameter attributes and methods of the report types do not need to be redefined aiming at each report type, so that the code is simplified, the dimensionality and the extension are easy, the dimensionality generated by the report can be dynamically adjusted, and the real-time requirement of a user is met.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a report generation method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a report generation method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram illustrating a report generating apparatus according to an embodiment of the present invention;
fig. 4 is another schematic structural diagram of a report generating apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computing device provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 shows a flowchart of a report generation method according to an embodiment of the present invention. First, an application environment of the embodiment of the present invention is explained: in order to quickly respond to various demands of a user on a report, quickly expand a report type and dynamically adjust the report dimension and the report type, the report generation method provided by the embodiment of the invention is based on a report system, wherein the report system comprises a report generation system and a report configuration system, the report generation system is used for displaying a preset type of report model to the user and generating a report according to the demands of the user and a selected report type template, and the report generation system also provides a visual editing page used for acquiring the report type and the dimension information which are selected by the user to be generated through the visual editing page. The report configuration system is used for providing various types of report models for the report generation system.
In the embodiment of the invention, the report model with various report types is pre-configured in the report configuration system, each report model is stored in the report configuration system in the form of jar packet, and when the report generation system needs the report model with a certain report type, the report configuration system can load the report model into the report generation system. In order to improve the starting efficiency of the report generation system, the report configuration system does not load the report models of all report types into the report generation system, but loads a plurality of common report models in advance. When the user uses the common report models in the report generation system, the common report models can be directly obtained in the report generation system. And if the report type of the report model requested by the user is not in the common report models, the report generation system requests the report configuration system to obtain a report model jar packet of the report type in the report configuration system and loads the report model jar packet into the report generation system so as to facilitate the subsequent use of the user. By the method, report models of all report types are not required to be loaded into the report generation system, so that the efficiency of the report generation system is prevented from being reduced when the report generation system is started, and the efficiency of the system is improved.
Based on the report system, as shown in fig. 1, the report generation method includes:
step S110: and receiving a report generation request, wherein the report generation request carries the identification information of the target report type and the target data information.
In the embodiment of the invention, the report generation system receives a report generation request triggered by a user on an editable page. The report generation request is a request triggered by the requirement of a user to generate a report of a target report type.
Wherein the target report type comprises one or more of a column chart, a pie chart, a line chart, a table, a volume chart and the like. The identification information may be an ID number of the target report type, each report type has a unique ID number, or may be a name of the target report type, which is not limited herein. The configurable parameters of each report type comprise dimension information and data types of each report type. The identification information and the configurable parameters of the pre-loaded report model with the preset type are displayed in a visual editing interface of the report generation system for a user to select and trigger a report generation request.
In a possible implementation manner of the present invention, a user may set a required target report type and information of collected original data in a visual editing interface in advance, where the information of collected original data includes information such as data dimensions and data types. If the user selects the report type as a line graph and the data type as authentication data and sets data dimensions as day, total and authentication types, the report generation system binds the dimension day as an abscissa, the dimension total is bound as an ordinate and the authentication data is bound as authentication success and authentication failure. And the report generation system starts a timing task to collect original data related to the dimension according to the information of the collected original data, and displays the original data and the collection record information of the original data in a visual editing interface according to the collected original data after the timing task is finished. The acquisition record information of the original data comprises task execution conditions such as an executor, execution time, total consumed time, start time, end time, an execution final result and the like, and a user can select a time range, start time and end time of the report display required to be generated on the visual editing interface. When the user selects the collected original data, target data information is generated, and the target data information is used for representing relevant information of the target data selected by the user, such as time information of the target data, target data generation rules and other information. And the report generation system generates a report generation request according to the information of the target data, the target report type selected by the user in advance, the data dimension, the data type and the like.
Step S120: and acquiring target data according to the target data information.
In the embodiment of the invention, the report generation system acquires the target data from the corresponding original data according to the target data information. Specifically, the report generation system selects data which accords with the target data information from the original data according to the authentication data, the dimension information and the target data information, and performs data integration processing to obtain the target data. And if necessary, processing the original data in the displayed time range into a data format conforming to the generation rule of the selected dimension, or carrying out ETL integration processing on the original data in the displayed time range according to the data format of the generation rule of the selected dimension to form target data.
Step S130: and determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute.
The report models of different types have some common parameter attributes, such as time attributes of report types including line graphs, bar graphs and tables, and the report models of different types also have specific parameter attributes, such as line names. Therefore, in order to improve the efficiency of report development and maintenance, the embodiment of the invention sets a parameter subclass attribute and a parameter parent attribute, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a preset attribute common to report types, and the target parameter subclass attribute inherits the target parameter parent attribute, so that the efficiency of report development and maintenance is improved. Specifically, in the embodiment of the present invention, the target parameter subclass attribute is a specific attribute of the target report type except for an attribute common to other report types, and the target parameter subclass attribute is an attribute not possessed by other report types, for example, if the target report type is a line diagram, the target parameter subclass attribute is a name of each line of the line diagram, an abscissa record, an ordinate record, and the like; and if the target report type is a table, the target parameter subclass attributes are records displayed on each page, field names, field numbers, paging and total record number and the like. The target parent parameter attribute is an attribute common to all report types, for example, all report types have start time and end time; for example, the target report type is a broken line graph, the data type is authentication data, the dimensions are a day, a total number and an authentication type, wherein the dimension degree day is bound into an abscissa, the dimension total number is bound into an ordinate, the data is bound into authentication success and authentication failure, the starting time is ten am, the ending time is six pm, the dimension degree day and the dimension total number are target parameter subclass attributes, the starting time and the ending time are target parameter parent attributes, the technical personnel only need to abstract a common interface and a common method of all report types during development, define the common interface and the common method as parameter parent attributes, enable the target parameter subclass attributes to inherit through the abstract interface to obtain the target parameter parent attributes according to java inheritance, and only need to predefine the parameter attributes and methods specific to expand the new report type during the expansion of the new report type, without the need to repeatedly write parameter parent attributes that are common to other report types.
Specifically, as shown in fig. 2, step S130 includes:
step S131: and determining the bean name of the target report type according to the identification information.
Each target report type corresponds to a bean name, which is set before the report generation request is received.
Step S132: and acquiring the corresponding bean from the spring container according to the bean name.
In the embodiment of the invention, a plurality of extensible report types are available, but only a few types of report types are available for users, and the data of the report to be checked by different users and the report types are different.
After the report type expansion is completed, developers do not load all the expandable report types into the report generation system at one time, but load the report types according to the requirements of users. When the report generation system has loaded the report template of the target report type, and the bean does not exist in the spring container at this time, the target report type needs to be loaded into the report generation system to generate the bean, and the specific loading mode is obtained through lazy loading, and is as follows: acquiring a subclass full path of a target report type from a report configuration system according to the identification information; searching a jar package of the report under a lib directory according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type, parameter subclass attributes of the target subclass, a full path of the subclass, a report generation method, a bean name and basic parameters; initializing the target subclasses into bean instances through a java reflection mechanism according to the subclass full path; and registering the bean instance into the spring container to generate the bean, so that the report model of the report type is loaded into the report generating system. Therefore, when the report generation system is started, all extensible report resources do not need to be loaded, only when a report generation request is received for the first time, the report logic is recorded and executed, and the loading mode is carried out according to actual requirements, so that the low efficiency and the waste of resources when the report generation system is started are avoided.
Specifically, the jar package is packaged and put under the lib catalog of the server of the report configuration system before the report generation request, and when a developer develops for the first time, defining a method shared by all report types, an in-participating parent class and an out-participating parent class, wherein the in-participating parent class attribute contained in the in-participating parent class and the out-participating parent class attribute contained in the out-participating parent class comprise report type codes, starting time, ending time, report information set by a user and the like, the out-participating parent class attribute and the out-participating parent class attribute form a parameter parent class attribute together, abstracting the common method and parameter parent class attribute into an abstract class and defining an abstract interface, when the report types are expanded later, only the specific parameter subclass attribute of each report type needs to be defined, and the parameter parent attribute is obtained through the parameter subclass attribute and inheritance of the abstract interface; for example, if the expanded report type is a broken line graph, a developer only needs to define the entry subclass, the exit subclass and the generation method of the broken line graph, the expanded entry subclass attribute and the exit subclass attribute are each line name, abscissa record, ordinate record and the like, wherein the entry subclass attribute and the exit subclass attribute together form a parameter subclass attribute, if the expanded report type is a bar graph, the entry subclass, the exit subclass and the generation method of the bar graph need to be defined, wherein the entry subclass attribute and the exit subclass attribute of the entry subclass are each column name, abscissa record, ordinate record and the like, if the expanded report type is a table, the entry subclass, the exit subclass and the generation method of the table need to be defined, wherein the entry subclass attribute and the exit subclass attribute of the entry subclass of the table are the record attribute displayed on each page, After the field name, the field number, the paging and the total record number are defined, the related information of each extended report type is defined, the defined information is packaged into jar packets before the report generation system is started, the jar packets are copied to a lib directory of a server of the report configuration system, and the jar packets are displayed in the report generation system after the report generation system is started. After the jar package is copied to a lib directory of a server of the report configuration system, a subclass full path, bean names, identification information and the like are required to be kept in a database, so that when the report generation system generates beans for the first time, the subclass full path can be obtained according to the identification information, and target subclasses in the jar package are initialized into bean instances through a java reflection mechanism through the subclass full path.
Step S133: and obtaining a target parameter subclass attribute, a target parameter parent attribute and a report generation method from the bean according to the target data information.
Step S140: and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
The method comprises the steps of abstracting common attributes and methods of all report types into a parameter parent class, utilizing the inheritance and polymorphic mechanism of java, obtaining the parameter parent class through inheritance of a parameter subclass specific to each report type, and determining a target parameter subclass attribute and a report generation method according to identification information and dimension information of a target report type carried in a report generation request when the report generation request is received, wherein the target parameter subclass attribute is a specific attribute of the target report type; and inheriting the target parent parameter attribute of the target report type according to the target parameter subclass attribute to obtain the target parent parameter attribute of the target report type, wherein the target parent parameter attribute is common to all report types, and inheriting the target parent parameter attribute by using the target parameter subclass attribute, so that only the target parameter subclass attribute and a generation method need to be separately defined during development, and then binding target data carried in a report generation request with the target parameter subclass attribute and the target parameter parent attribute according to the report generation method to generate the target report. And all parameter attributes and methods of the report types do not need to be redefined aiming at each report type, so that the code is simplified, the dimensionality and the extension are easy, the dimensionality generated by the report can be dynamically adjusted, and the real-time requirement of a user is met.
Fig. 3 shows a schematic structural diagram of an embodiment of a report generation apparatus of the present invention, and as shown in fig. 3, the apparatus 200 includes: the system comprises a receiving module 210, an obtaining module 220, a determining module 230 and a generating module 240, wherein the receiving module 210 is configured to receive a report generation request, and the report generation request carries identification information of a target report type and target data information; the obtaining module 220 is configured to obtain target data according to the target data information; the determining module 230 is configured to determine a target parameter subclass attribute, a target parameter parent attribute, and a report generating method according to the identification information and the target data information, where the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute; the generating module 240 is configured to bind the target data with the target parameter subclass property and the target parameter parent property according to the report generating method to generate a target report.
In an alternative manner, the determining module 230 is further configured to: determining the bean name of the target report type according to the identification information; acquiring a corresponding bean from a spring container according to the bean name; and obtaining the target parameter subclass attribute, the target parameter parent attribute and the report generation method from the bean according to the target data information.
In an optional manner, as shown in fig. 4, the report generation apparatus further includes a judging module 250 and a bean generation module 260, where the judging module 250 is configured to judge whether the spring container contains the bean before the determining module 230 acquires the corresponding bean from the spring container according to the bean name; the bean generation module 260 is configured to: when the judging module 260 judges that the spring container does not contain the bean, acquiring a subclass full path of the target report type from a database according to the identification information; searching a jar package of the report under a lib directory of a server according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type and all parameter subclass attributes, full paths of the subclass, a report generation method, bean names and basic parameters of the target subclass; initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass; registering the bean instance in a spring container to generate a bean.
And searching a jar package stored in a lib directory of a server according to the subclass full path, wherein the jar package is packaged before the report generation request and is placed in the lib directory of the server. And acquiring the subclass full path of the target report type from a database according to the identification information, wherein the subclass full path is set before the report generation request.
The specific working process of the report generation apparatus 200 according to the embodiment of the present invention is the same as the specific method steps of the report generation method described above, and details are not described here.
The embodiment of the invention receives a report generation request, wherein the report generation request carries the identification information of the target report type and the target data information; acquiring target data according to the target data information; and determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, binding the target data with the target parameter subclass attribute and the target parameter parent attribute according to the report generation method to generate a target report, wherein the target parameter parent attribute can be obtained by inheriting the target parameter subclass attribute, so that only the parameter subclass attribute of the report type to be expanded needs to be defined during development, the parameter subclass attribute does not need to be defined, the code is simplified, and the generated report type and dimension information can be dynamically adjusted, so that a user can more visually check important concerned information.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the device.
As shown in fig. 5, the computing device may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 52, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically execute relevant steps in the report generation method embodiment described above.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU or an application Specific Integrated circuit asic or an Integrated circuit or Integrated circuits configured to implement embodiments of the present invention. The one or each processor included in the device may be the same type of processor, such as one or each CPU; or may be different types of processors such as one or each CPU and one or each ASIC.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
receiving a report generation request, wherein the report generation request carries identification information of a target report type and target data information;
acquiring target data according to the target data information;
determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
In an alternative, program 510 causes the processor to:
determining the bean name of the target report type according to the identification information;
acquiring a corresponding bean from a spring container according to the bean name;
and obtaining the target parameter subclass attribute, the target parameter parent attribute and a report generation method from the bean according to the target data information.
In an alternative approach, program 510 also causes the processor to:
judging whether the spring container contains the bean or not;
if the bean is not contained in the spring container;
acquiring a subclass full path of the target report type from a database according to the identification information;
searching a jar package of the report under a lib directory of a server according to the full path of the subclasses, wherein the jar package comprises target subclasses predefined by the target report types, all parameter subclass attributes of the target subclasses, full paths of the subclasses, a report generation method, bean names and basic parameters;
initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass;
registering the bean instance in a spring container to generate a bean.
And searching for a jar package stored in a lib directory of a server according to the subclass full path, wherein the jar package is packaged before the report generation request and is placed in the lib directory of the server. And the subclass full path in the subclass full path of the target report type acquired from the database according to the identification information is set before the report generation request.
The embodiment of the invention receives a report generation request, wherein the report generation request carries the identification information of the target report type and the target data information; acquiring target data according to the target data information; and determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, binding the target data with the target parameter subclass attribute and the target parameter parent attribute according to the report generation method to generate a target report, wherein the target parameter parent attribute can be obtained by inheriting the target parameter subclass attribute, so that only the parameter subclass attribute of the report type to be expanded needs to be defined during development, the parameter subclass attribute does not need to be defined, the code is simplified, and the generated report type and dimension information can be dynamically adjusted, so that a user can more visually check important concerned information.
The embodiment of the invention provides a nonvolatile computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the report generation method in any method embodiment.
The executable instructions may be specifically configured to cause the processor to:
receiving a report generation request, wherein the report generation request carries identification information and target data information of a target report type;
acquiring target data according to the target data information;
determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
In embodiments of the present invention, the executable instructions further cause the processor to:
determining the bean name of the target report type according to the identification information;
acquiring a corresponding bean from a spring container according to the bean name;
and obtaining the target parameter subclass attribute, the target parameter parent attribute and a report generation method from the bean according to the target data information.
In embodiments of the invention, the executable instructions further cause the processor to:
judging whether the spring container contains the bean or not;
if said bean is not contained in said spring container;
acquiring a subclass full path of the target report form type from a database according to the identification information;
searching a jar package of the report under a lib directory of a server according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type and all parameter subclass attributes, full paths of the subclass, a report generation method, bean names and basic parameters of the target subclass;
initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass;
registering the bean instance in a spring container to generate a bean.
And searching for a jar package stored in a lib directory of the server according to the full path of the subclass, wherein the jar package is packaged before the report generation request and is placed in the lib directory of the server. And the subclass full path in the subclass full path of the target report type acquired from the database according to the identification information is set before the report generation request.
The embodiment of the invention receives a report generation request, wherein the report generation request carries the identification information of the target report type and the target data information; acquiring target data according to the target data information; and determining a target parameter subclass attribute, a target parameter parent attribute and a report generation method according to the identification information and the target data information, binding the target data with the target parameter subclass attribute and the target parameter parent attribute according to the report generation method to generate a target report, wherein the target parameter parent attribute can be obtained by inheriting the target parameter subclass attribute, so that only the parameter subclass attribute of the report type to be expanded needs to be defined during development, the parameter subclass attribute does not need to be defined, the code is simplified, and the generated report type and the generated dimension information can be dynamically adjusted, so that a user can more visually check important concerned information.
Embodiments of the present invention provide a computer program, where the computer program can be called by a processor to enable a computer device to execute a report generation method in any of the above method embodiments.
An embodiment of the present invention provides a computer program product, where the computer program product includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions, when the program instructions are run on a computer, the computer is caused to execute a report generation method in any of the above method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (6)

1. A report generation method is characterized by comprising the following steps:
receiving a report generation request, wherein the report generation request carries identification information of a target report type and target data information;
acquiring target data according to the target data information;
determining the bean name of the target report type according to the identification information;
judging whether the spring container contains bean or not;
if the bean is not contained in the spring container, acquiring a subclass full path of the target report type from a database according to the identification information;
searching a jar package of the report under a lib directory of a server according to the full path of the subclasses, wherein the jar package comprises target subclasses predefined by the target report types and all parameter subclass attributes, full paths of the subclasses, report generation methods, bean names and basic parameters of the target subclasses;
initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass;
registering the bean instance in the spring container to generate the bean;
acquiring a corresponding bean from the spring container according to the bean name;
obtaining the target parameter subclass attribute, the target parameter parent attribute and a report generation method from the bean according to the target data information; the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a common attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
2. The method of claim 1, wherein the full path lookup according to the subclass is stored in a jar package under a lib directory of a server, and the jar package is packaged and placed under the lib directory of the server before the report generation request.
3. The method according to claim 1, wherein said obtaining the full path of the subclass of the target report type from the database according to the identification information is set before the report generation request.
4. A report generation apparatus, comprising:
the receiving module is used for receiving a report generation request, wherein the report generation request carries identification information of a target report type and target data information;
the acquisition module is used for acquiring target data according to the target data information;
the determining module is used for determining the bean name of the target report type according to the identification information;
the judging module is used for judging whether the spring container contains the bean or not;
a bean generating module, configured to, when the bean is not included in the spring container,
acquiring a subclass full path of the target report type from a database according to the identification information; searching a jar package of the report under a lib directory of a server according to the full path of the subclass, wherein the jar package comprises a target subclass with a predefined target report type and all parameter subclass attributes, full paths of the subclass, a report generation method, bean names and basic parameters of the target subclass; initializing the target subclass into a bean instance through a java reflection mechanism according to the full path of the subclass; registering the bean instance in the spring container to generate a bean;
the determining module is further used for acquiring the corresponding bean from the spring container according to the bean name; obtaining a target parameter subclass attribute, a target parameter parent attribute and a report generation method from the bean according to the target data information, wherein the target parameter subclass attribute is a specific attribute of the target report type, the target parameter parent attribute is a general attribute of the report, and the target parameter subclass attribute inherits the target parameter parent attribute;
and the generation module is used for binding the target data with the target parameter subclass property and the target parameter parent property according to the report generation method to generate a target report.
5. A computer device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction which causes the processor to execute the steps of the report generation method according to any one of claims 1-3.
6. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform the steps of the report generation method according to any of the claims 1-3.
CN202210318039.2A 2022-03-29 2022-03-29 Report generation method and device, computing equipment and computer storage medium Active CN114417803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210318039.2A CN114417803B (en) 2022-03-29 2022-03-29 Report generation method and device, computing equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210318039.2A CN114417803B (en) 2022-03-29 2022-03-29 Report generation method and device, computing equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN114417803A CN114417803A (en) 2022-04-29
CN114417803B true CN114417803B (en) 2022-07-19

Family

ID=81262767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210318039.2A Active CN114417803B (en) 2022-03-29 2022-03-29 Report generation method and device, computing equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN114417803B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126019A (en) * 2019-11-28 2020-05-08 泰康保险集团股份有限公司 Report generation method and device based on mode customization and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104376068B (en) * 2014-11-07 2018-04-03 北京思特奇信息技术股份有限公司 A kind of data exhibiting system and method based on dynamic statement template
CN111611784A (en) * 2020-04-29 2020-09-01 平安科技(深圳)有限公司 Report generation method and device, terminal equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126019A (en) * 2019-11-28 2020-05-08 泰康保险集团股份有限公司 Report generation method and device based on mode customization and electronic equipment

Also Published As

Publication number Publication date
CN114417803A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN111596965B (en) Project engineering initialization method, device, computer equipment and storage medium
US7676816B2 (en) Systems and methods for integrating services
CN111708537A (en) Page rendering method and device based on component template and readable storage medium
US11762920B2 (en) Composite index on hierarchical nodes in the hierarchical data model within a case model
EP2110781A1 (en) Method and system for automatic tracing of a computerized process using a relationship model
CN110096434A (en) A kind of interface test method and device
US20080270153A1 (en) Service oriented architecture (soa) lifecycle model migration
CA3139243A1 (en) Information collection method, device, computer equipment and storage medium
CN111506849A (en) Page generation method and device
US8862613B2 (en) Extensibility of business process and application logic
US9454535B2 (en) Topical mapping
US10963888B2 (en) Payment complaint method, device, server and readable storage medium
CN102004752A (en) Flexible cube data warehousing
CN110673839B (en) Distributed tool configuration construction generation method and system
US20120030223A1 (en) Extensibility of business process and application logic
CN113448862A (en) Software version testing method and device and computer equipment
CN115860451A (en) Flow operation method and device, electronic equipment and storage medium
CN111651140A (en) Service method and device based on workflow
US20050114308A1 (en) User customizable reporting
CN114417803B (en) Report generation method and device, computing equipment and computer storage medium
CN116911588A (en) Business process execution method, device, equipment and storage medium
EP1710698A2 (en) Generic software requirements analyser
US20050278687A1 (en) System and method for facilitating computer software features requested by end users
CN115993971A (en) Active page generation method, computing device and computer storage medium
CN115617338A (en) Method and device for quickly generating service page and readable storage medium

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
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 518000 4001, Block D, Building 1, Chuangzhi Yuncheng Lot 1, Liuxian Avenue, Xili Community, Xili Street, Nanshan District, Shenzhen, Guangdong

Patentee after: Shenzhen Zhuyun Technology Co.,Ltd.

Address before: 518000 East, 3rd floor, incubation building, China Academy of science and technology, 009 Gaoxin South 1st Road, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: Shenzhen Zhuyun Technology Co.,Ltd.

CP02 Change in the address of a patent holder