CN111144083A - Report generation method, device, equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN111144083A
CN111144083A CN201911330075.5A CN201911330075A CN111144083A CN 111144083 A CN111144083 A CN 111144083A CN 201911330075 A CN201911330075 A CN 201911330075A CN 111144083 A CN111144083 A CN 111144083A
Authority
CN
China
Prior art keywords
report
data
identifier
configuration information
template file
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.)
Granted
Application number
CN201911330075.5A
Other languages
Chinese (zh)
Other versions
CN111144083B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911330075.5A priority Critical patent/CN111144083B/en
Publication of CN111144083A publication Critical patent/CN111144083A/en
Application granted granted Critical
Publication of CN111144083B publication Critical patent/CN111144083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a report generation method, which comprises the following steps: detecting a generation instruction for generating a first report, wherein the generation instruction carries an identifier of the first report; acquiring a report template file and configuration information corresponding to the identifier; acquiring data corresponding to the identifier; and generating the first report according to the report template file, the data and the configuration information. By adopting the method and the device, the report can be quickly generated according to the requirements of the user, the platform does not need to be customized and developed, and the expansibility and the applicability of the platform are improved.

Description

Report generation method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for generating a report.
Background
With the continuous expansion of enterprise business, when data generated by a plurality of businesses are faced, the report forms become a preferred mode of data statistics and data analysis. At present, in order to generate reports more quickly, a common report generation platform provides components of a common report template, and a user can select the components to combine into a required report style by himself and manually input data to generate the report.
However, in practice, the existing report template component is relatively limited, and the requirement of users in various industries on report diversity cannot be met. Therefore, how to improve the extensibility of the report platform becomes a problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a report generation method, a report generation device, report generation equipment and a computer readable storage medium, which can quickly generate a report according to the requirements of a user, and can improve the expansibility and the applicability of a platform without customizing and developing the platform.
In a first aspect, an embodiment of the present application provides a method for generating a report, where the method for generating a report includes:
detecting a generation instruction for generating a first report, wherein the generation instruction carries an identifier of the first report;
acquiring a report template file and configuration information corresponding to the identifier;
acquiring data corresponding to the identifier;
and generating the first report according to the report template file, the data and the configuration information.
In a possible implementation manner, the configuration information is information of data required by cells in the report template file;
the generating the first report according to the report template file, the data and the configuration information includes:
generating a first table according to the report template file;
and respectively adding the data to corresponding cells in the first table according to the configuration information to obtain the first report.
In a possible implementation manner, the generation instruction further carries time information;
the acquiring data corresponding to the identifier includes:
acquiring first fixed data corresponding to the identifier and the time information;
acquiring variable data corresponding to the identifier and the time information;
calculating result data according to the fixed data and the variable data;
and determining the fixed data, the variable data and the result data as the data corresponding to the identification.
In one possible implementation, the method further includes:
obtaining an effective time period of the first fixed data to obtain a first effective time period;
receiving second fixed data corresponding to the identifier and an effective time period of the second fixed data, which are input by a user, to obtain the second fixed data and the second effective time period;
storing the second fixed data and the second valid period if there is no coincidence time between the first valid period and the second valid period;
the obtaining of the fixed data corresponding to the identifier and the time information includes:
acquiring all fixed data corresponding to the identification;
and acquiring first fixed data of which the corresponding effective time period comprises the time information in the fixed data.
In one possible implementation, the method further includes:
and under the condition that the coincidence time exists between the first effective time period and the second effective time period, outputting prompt information for prompting data storage failure.
In a possible implementation manner, the generation instruction is generated when the report template file corresponding to the identifier is an online file;
and under the condition that the report template file corresponding to the identifier is an offline file, the generation instruction is input by a user.
In a possible implementation manner, the adding the data to the corresponding cells in the first table according to the configuration information to obtain the first report includes:
adding the data to corresponding cells in the first table according to the configuration information;
calculating the values of the cells in the first table except the cells included in the configuration information according to the formula included in the first table and the added data.
In a second aspect, an embodiment of the present application provides a report generation apparatus, where the report generation apparatus includes:
the system comprises a detection unit, a report generation unit and a report generation unit, wherein the detection unit is used for detecting a generation instruction for generating a first report, and the generation instruction carries an identifier of the first report;
the first acquisition unit is used for acquiring the report template file and the configuration information corresponding to the identifier;
the second acquisition unit is used for acquiring data corresponding to the identifier;
and the generating unit is used for generating the first report according to the report template file, the data and the configuration information.
In a possible implementation manner, the configuration information is information of data required by cells in the report template file;
the generating unit is specifically configured to:
generating a first table according to the report template file;
and respectively adding the data to corresponding cells in the first table according to the configuration information to obtain the first report.
In a possible implementation manner, the generation instruction further carries time information;
the second obtaining unit is specifically configured to:
acquiring first fixed data corresponding to the identifier and the time information;
acquiring variable data corresponding to the identifier and the time information;
calculating result data according to the fixed data and the variable data;
and determining the fixed data, the variable data and the result data as the data corresponding to the identification.
In one possible implementation, the apparatus further includes:
a third obtaining unit, configured to obtain an effective time period of the first fixed data, so as to obtain a first effective time period;
the receiving unit is used for receiving second fixed data corresponding to the identifier and an effective time period of the second fixed data, which are input by a user, so as to obtain the second fixed data and the second effective time period;
a storage unit configured to store the second fixed data and the second valid period when there is no coincidence time between the first valid period and the second valid period;
the first obtaining unit is specifically configured to:
acquiring all fixed data corresponding to the identification;
and acquiring first fixed data of which the corresponding effective time period comprises the time information in the fixed data.
In one possible implementation, the apparatus further includes:
and the output unit is used for outputting prompt information for prompting data storage failure under the condition that the coincidence time exists between the first effective time period and the second effective time period.
In a possible implementation manner, the generation instruction is generated when the report template file corresponding to the identifier is an online file;
and under the condition that the report template file corresponding to the identifier is an offline file, the generation instruction is input by a user.
In a possible implementation manner, the generating unit is specifically configured to:
adding the data to corresponding cells in the first table according to the configuration information;
and calculating the values of the cells in the first table except the cells included in the configuration information according to the formula included in the first table and the added data.
In a third aspect, an embodiment of the present application provides an electronic device, which includes an output device, an input device, a processor, a transceiver, and a memory, where the output device, the input device, the processor, the transceiver, and the memory are connected to each other. The memory is configured to store a computer program enabling the terminal device to perform the method provided by the first aspect and/or any one of the possible implementations of the first aspect, and the transceiver is configured to receive information from and transmit information to other apparatuses than the apparatus. The computer program comprises program instructions, and the processor is configured to invoke the program instructions to perform the method provided by the first aspect and/or any one of the possible embodiments of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which when run on a computer, causes the computer to execute the report generation method disclosed in the first aspect or any possible implementation manner of the first aspect.
According to the embodiment of the application, when a generation instruction for generating the first report is detected, the report template file and the configuration information corresponding to the identifier of the first report carried by the instruction are obtained, corresponding data are obtained according to the identifier, and the first report can be rapidly generated according to the obtained data and the configuration information according to the template file of the report. Meanwhile, the report template file can be provided by a report generation platform or uploaded by a user, and when the template or the assembly of the platform cannot meet the requirement of the user on the report file, the user only needs to upload the report file and input configuration information.
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 description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a network architecture provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a report generation method according to an embodiment of the present application;
FIG. 3a is a diagram illustrating a report according to an embodiment of the present disclosure;
fig. 3b is a schematic diagram of a configuration information containing cell of a report according to an embodiment of the present disclosure;
FIG. 3c is a diagram illustrating a report cell containing a generating formula according to an embodiment of the present disclosure;
FIG. 3d is a diagram illustrating report generation according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a report generating method according to another embodiment of the present invention;
FIG. 5a is a schematic diagram of an interface for entering fixed data according to an embodiment of the present application;
FIG. 5b is a schematic interface diagram of importing a report template file according to an embodiment of the present disclosure;
FIG. 5c is a schematic diagram of an interface for inputting report template file configuration information according to an embodiment of the present application;
FIG. 5d is a schematic interface diagram of a configuration information list according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a report generation apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a report generation method, which improves the expansibility and applicability of a report generation platform, and the report generation scheme can be applied to electronic equipment, where the electronic equipment can include but is not limited to: servers, desktop computers, laptop computers, smart phones, tablet computers, desktop computers, and the like. The user can call the corresponding application client to execute the report generation method according to the actual report generation requirement. For example, a report may be generated by a client that may invoke report generation, where the client of report generation may include, but is not limited to: a client on a mobile terminal, a client on computer software, a web client, etc. For another example, the report generator may be called by the office client to generate a report, and so on.
In order to better understand the report generation method, apparatus, device, and computer-readable storage medium provided in the embodiments of the present application, a network architecture used in the embodiments of the present application is described below. Please refer to fig. 1, which is a schematic diagram of a network architecture provided in the present application. As shown in fig. 1, the network architecture includes a report generation apparatus 100 and one or more report receiving apparatuses (specifically, as shown in fig. 1, including an electronic device 200a, an electronic device 200b, and an electronic device 200c), where the report generation apparatus 100 may communicate with each report receiving apparatus through a network, and each report receiving apparatus may install a report generation client, where the client includes an application, a web page client, an applet client, and the like. The report generation device may be configured to generate a report according to the configuration information, wherein the report generation device may be configured to generate a report according to the configuration information, and the report generation device may be configured to generate a report according to the configuration information. For example, the report generation instruction triggered by the platform a may be sent by the user, the device (e.g., 200d in fig. 1) corresponding to the platform a transmits the instruction to the report generation device (e.g., 100 in fig. 1) through the client or by other means, and the report generation device transmits the generated report to the device corresponding to the platform a.
Therefore, the report generation scheme can upload the report template file and the configuration information through the user, is suitable for various scenes needing report generation, can meet the requirements of more users, and is wide in applicability.
Referring to fig. 2, fig. 2 is a schematic flowchart of a method for generating a report according to an embodiment of the present application, where the method includes:
and 201, detecting a generation instruction for generating a first report.
Specifically, when the report generation device detects a generation instruction of a first report, the instruction mainly comes from two aspects, one is an instruction triggered by a user through a report generation client, and the other is a report generation instruction periodically generated and triggered by a report generation platform, where the instruction carries an identifier and time information of the first report, and the identifier and the time information are data, a report template file, and configuration information required for acquiring a report from a database, and it can be understood that the identifier corresponding to the report herein can uniquely point to one identifier.
For example, company a signs a contract with a plurality of record companies, and a monthly report is required to be generated for settling copyright charges, at this time, the generation platform of the report may receive the record company name and the report generation instruction corresponding to the month input by the user, or the report generation instruction containing the record company name and the month generated and triggered at the end of the month or at the beginning of the next month, where the identifier may be the name of the record company, or a number stored correspondingly by the record company, and so on.
202. And acquiring the report template file and the configuration information corresponding to the identifier.
Specifically, before generating the report instruction, the report generation platform needs to store a report template file and configuration information corresponding to the report identifier. The report template file may be stored by the report generation platform, may be a report template file imported by a user, or may be a template file created on the report generation platform by a form editor or an existing form component. After the report template file is imported, configuration information needs to be input, wherein the configuration information is information of data needed by cells in the report template file, namely the positions of the cells of the report are corresponding to the data, and after the data needed by the report is obtained, the data is added into the cells corresponding to the positions input in the configuration information.
If the report template file and the configuration information corresponding to the identifier cannot be searched in the database after the report generation instruction is received, prompt information of 'temporarily not corresponding to the report template file and whether the universal template is needed' can be output to the user, various universal report templates are provided for the user to select, the report template file input by the user can be received, the user is prompted to input the configuration information related to the report template file, and the report template file and the configuration information are stored so as to be called subsequently.
The report template file may be an editable form file, such as an Excel form file, a number form file, an uploaded document file with a form, and the like, which is not limited herein. After receiving the report template file imported by the user, the report template file can be stored in a database for subsequent retrieval.
Further, when uploading the template file, the state selection of the report template file can be provided and divided into an online state and an offline state. When the template file is just uploaded, the template file of the report can be set to be in the offline state, and it is required to be known that the report template file in the offline state can only call the report template file to generate the report through a report generation instruction input by a configurator, and the report can be provided for the configurator to debug and use. After debugging is finished, the state of the report template file can be set to be an online state, and when the report template file is in the online state, the report template file can be called not only through a report generation instruction which is generated and triggered by a platform regularly, but also through a generation instruction input by a user.
For example, after the company a signs contracts with a plurality of record companies, the report template file corresponding to each record company may be uploaded to the platform, and the configuration information corresponding to the uploaded report template file, that is, the configuration information of the cells in the report template file and the report template file corresponding to each record company may be stored, and the status of the report template file selected by the user may be received when the report template file is uploaded.
203. And acquiring data corresponding to the identifier.
Specifically, before generating the report, the data filled in the report needs to be acquired and processed, and the generation instruction of the report carries time information. The time information may be accurate to each day, or may be accurate to a specific certain time, which is not limited herein. After obtaining the identification and time information, the fixed data and the variable data can be obtained according to the identification and time information, and it is required to know that the fixed data is not changed all the time, but is not actively changed in the time period included in the time information unless the user inputs a modification request. The variable data refers to data collected in real time in the time information or data uploaded by a user in the time information, and it is understood that the variable data is unpredictable in the time information and can only be obtained from stored data.
Further, according to data required by the report, a calculation formula or a calculation method can be determined, and result data calculated by the fixed data and the variable data is stored as data required by the report, so that the result data can be directly acquired when the report is generated.
For example, after the contract with a plurality of record companies is made, the fixed data entered by the user may be received, and the fixed data may be business data of the contract made by the record company, and data that does not change in the time range of the contract period without special circumstances, such as unit price of the member user agreed in the contract period, may be a value in the whole contract period. If the acquired time information is variable data of the last month, the number of times of listening to songs and the monthly income of the last month can be set, and the data can be changed every month and can only be acquired when the monthly report is generated. Therefore, the data corresponding to the identifier may be obtained by obtaining the variable data and the fixed data, and the result data calculated in the two aspects may also be data required by the report.
204. And generating the first report according to the report template file, the data and the configuration information.
Specifically, first, a table may be generated according to the report template file to obtain a first table, where the table includes all contents, format information, configuration information corresponding to cells, and a built-in generation formula in the report template file. After the first table is obtained, the obtained data, that is, the fixed data, the variable data, and the result data, may be combined into a table, where the table includes the three data. And then, the corresponding data can be respectively added into the cells in the corresponding first table according to the configuration information, the first report is obtained by storage, and the first report is provided for a user to download or is automatically downloaded in batch after being generated.
Further, the formula generated in the cell in the form template file, such as the formula generating the data of the current cell from the data of the existing cell, may generate the data of the cell in which the formula is generated from the data already added to the first form.
Optionally, the platform includes a form editor, and may receive a modification instruction input by a user after obtaining the first report, modify the generated first report, and output the modified first report after the modification is completed.
In a possible implementation manner, when a user judges that data in the first report is wrong or finds that the entered fixed data is wrong and the entered fixed data is not timely entered after the first report is generated, the platform cannot completely acquire and calculate result data when acquiring the data, so that the first report is generated wrongly or incompletely, or the report template file is not a corresponding report template file, modified data input by the user can be received, and the modified report template file can be uploaded again. And when a first report generation instruction manually input by a user is received, re-acquiring the fixed data and the variable data, re-calculating and adding the fixed data and the variable data to the first table, thereby generating the first report. It is necessary to know that the fixed data corresponds to an effective time, and it is ensured that the fixed data corresponding to two times of entry of the same identifier is unique, that is, when a user modifies the fixed data, if the effective time is modified, the time period before modification and the time period after modification need to be compared, and the modified data is stored under the condition that no overlapped time period exists. Or the user adds the fixed data corresponding to the identifier, and also needs to judge whether the valid time period corresponding to the added fixed data and the valid time period corresponding to the identifier have the coincidence time, and the fixed data can be stored only when judging that the valid time period does not have the coincidence time, and if judging that the coincidence time exists, the prompt information of data storage failure is output to the user, and the re-entered fixed data is not stored until the valid time period does not have the coincidence time.
For example, after contracts with a plurality of record companies are signed, a user inputs fixed data of each record company, wherein the fixed data refers to data which are not changed in the current contract period, the platform is stored in the database by taking the initial effective time of the record companies and the fixed data as a main key, and meanwhile, the platform checks the initial effective time and the failure time to ensure that the fixed data duration time of the same record company is not overlapped.
According to the embodiment of the application, when a generation instruction for generating the first report is detected, the report template file and the configuration information corresponding to the identifier of the first report carried by the instruction are obtained, corresponding data are obtained according to the identifier, and the first report can be rapidly generated according to the obtained data and the configuration information according to the template file of the report. Meanwhile, the report template file can be provided by a report generation platform or uploaded by a user, and when the template or the assembly of the platform cannot meet the requirement of the user on the report file, the user only needs to upload the report file and input configuration information.
Please refer to fig. 3a to fig. 3d, which are schematic diagrams illustrating report generation according to an embodiment of the present application. As shown in fig. 3a, the report template file that needs to be generated by a record company signed by company a every month is not completely the same, and a general structure may be abstracted, or each record company may have a structure of a report template separately. As shown in fig. 3a, the report is laid out in a matrix form, the row header is the parameter name corresponding to the data, the list header is the region and the currency identifier corresponding to the region (as shown in fig. 3 a), such as HDK for hong coin, MYR for horse coin, THB for coin, IDR for nininula, ZAR for south africa coin, and USD for dollar. For example, taking record company settlement as an example, the row header may be "subscription service income (a)", "distribution fee (b)", and "percentage of licensor income (c)", and the like. As shown in fig. 3b, the part of the report framed by the square is composed of the acquired data (fixed data, variable data, and result data calculated by both), and after the platform receives the generation instruction for generating the first report, the data is acquired and calculated, and after the calculation is completed, the cells configured according to the configuration information are filled in the report generated by the template. As shown in fig. 3c, the cells in the box include a generation formula, and after data is filled into the corresponding cells of the configuration information, the cells of the data can be generated according to the generation formula from the cells of the existing data, wherein the generation formula may be a function formula based on the cells, and is pre-deployed in the table, for example, in the cells in fig. 3c, the generation formula may be "ROUND (D14/D15, 6)" for the content of cell D16, and the generation formula may be "═ ROUND (D14/D15, 6)" for the content of cell D17, and the license fee revenue share calculation ((a-b) × D), and then the generation formula for cell D17 may be "═(D11-D12) × D13D 16", and similarly, the generation formula for cell E20 may be "═ E18E 19", wherein the values of a, b, c, D may be the filled data according to the configuration information, or may be data generated from configuration information and a generation formula. Then, according to the data generated by the filled data and the generating formula, the whole report can be obtained, as shown in fig. 3d, it can be understood that the obtained report file can be modified by an on-line editor or a platform provides a download link to download a form file for modification.
The following takes an example of applying the report generation method provided in the embodiment of the present application to the generation of a report of a corresponding record company, and details the report generation method. The specific process can be seen in fig. 4:
firstly, after a contract is made between a company and a record company, fixed data in a corresponding report form of the contract can be entered, and the entered fixed data is stored by a platform, wherein the platform can provide a visual interface and provide standard entered data, or an entered data form set by a user (as shown in fig. 5 a) can set necessary information and fillable information. Taking a record company as an example, for a fixed data, the fillable contents are money amount and the like in the contract of the record company, such as the content of the form not marked with an x in fig. 5a, the fillable contents may be the fill contents marked with an x in fig. 5a, such as the contract validity period, the contract start time, the contract end time and the like, it is to be understood that the contract from the start time to the end time may be used as the fixed data and the variable data in the acquired time period when the data is acquired after the report generation instruction is received, it is understood that the fixed data is the data which is not modified in a special case and is not changed after being recorded once, and the current form may be filled by user input, or may be provided with options for the user to select.
Secondly, importing a report template file, storing the report template file by a platform, wherein the stored identifier may be a name of a record company, a record company number, and the like, and the visual interface (as shown in fig. 5 b) of the imported report template file may provide the report template name, the record company name, the uploaded report template file, and the state of the current template file input by the user, wherein the difference of the up-and-down line state of the report template file is the source of receiving a generation instruction, and when the user sets a task of periodically generating report data, the platform only uses the report template file generation instruction to be on-line, and can provide a debugging space for the user. It can be understood that the fixed data and the report template file are not sequentially entered, the fixed data may be entered first, the report template file is entered later, the report template file may be entered first, the fixed data may be entered later, the fixed data and the report template file may be concurrently operated, and the fixed data and the report file are entered simultaneously, which is not limited herein.
Then, after the report template file exists, configuration information still needs to be uploaded for each template, where the configuration information may be configured for each cell that needs to be configured, a visual interface of the configuration information may be as shown in fig. 5c, and the content that needs to be filled may include: template name (template), cell (excel cell), parameter (params), type (type), and label group (label group), and other data related to the record company settlement service, may also be divided into mandatory and fillable. Further, since the report of the record company is generated by month, the selectable item that can be added is "whether to accumulate to next month" (when the selection is yes, the configuration data of the cell is accumulated in the report generated by next month, otherwise, no accumulation is performed.
After configuring each specific cell, the platform outputs a configuration summary table, as shown in fig. 5d, the data that may be included is "cell" (cell name), "report template name", "tag group/tag group +" (label group/label group +), "type" (type), "parameter name" (params name), "whether to accumulate to the next month" (or not), and so on, and optionally, the added data may be deleted, as "delete" in "operation" in fig. 5d, and may be further added (as "create" button in fig. 5 d), and the configured information may be copied by one key (as "copy parameters" button in fig. 5 d), so as to paste to other places.
Further, under the condition of daily regular tasks, for example, when a settlement report of a record company is generated regularly every month, a report generation instruction generated by the platform and triggered may also be a report generation instruction input by the user, wherein the report generation instruction generated by the platform can be generated and triggered only when the report template file is in an online state, and the report generation instruction input by the user may be that the user is debugging the report template file, so that the report generation instruction is manually input, or the report generated by the platform is not timely or is incorrectly input, so that the user needs to manually modify the fixed data, and then the report generation instruction is manually input, and the platform regenerates a new report. The operation of the report generated by the platform may be to obtain fixed data entered by the user and obtain variable data that changes every month, such as income of the month, number of times of listening to songs in the month, and the like, and the variable data may be data stored in other servers or databases. After the fixed data and the variable data are acquired, result data is calculated from the fixed data and the variable data. The fixed data, the variable data and the result data can be data configured in the configuration information, after a report generation instruction is received, the report is filled in cells in a table generated by the template file according to the configuration information, and the contents of other cells can be generated according to a generation formula. It can be understood that the generation of the report may be one report or a plurality of reports may be generated in batch, so as to improve efficiency.
After the report is generated, the report can be stored in the current server or a special file server, and a download link is generated and provided for the user to download.
In a possible implementation manner, after the report is generated, the generated report may be uploaded to the blockchain system through a blockchain node device, where the blockchain node device may be the current server or a dedicated file server. For example, uploading the generated report to a block chain system, that is, a distributed system, a new block may be generated on the chain for storing the hash value corresponding to the file, and it is understood that the block header data of one block includes: the version number, the hash value of the parent block, the merkle tree root (MT), the timestamp, the difficulty target, and the like can be stored by calculating the hash value corresponding to the file according to the currently generated file, and when more blocks are generated subsequently, the hash value corresponding to the current file is stored in the manner of the hash value corresponding to the merkle tree root, so that the security and the tamper resistance of the file are ensured.
Further, the block chain underlying platform may include processing modules such as user management, basic service, intelligent contract, operation monitoring and the like. After a new report file is generated, the basic service can firstly verify the interface adaptation and the public and private keys, then encrypt the report file through a consensus algorithm (calculate a hash value), transmit the encrypted report file to a shared account book, and record and store the encrypted report file. The intelligent contract can be issued by registering the contract and triggering the contract and executing the contract, for example, the storage of the current document can be determined according to the definition of a developer and the contract logic, and optionally, the real-time state of the whole system or the chain process of the file can be monitored by an operation monitoring module and output by a visual interface.
Therefore, the report generation scheme in the application can decouple the data acquisition and calculation of the report from the report generation, a small amount of limited data can support the generation of a large number of reports, and the report is provided with the cell generation formula in advance, so that the unavailable cell data can be generated by the obtained cell data, the work of a user is reduced, the customized development of a platform is not needed, and the expansibility is improved.
According to the embodiment of the application, when a generation instruction for generating the first report is detected, the report template file and the configuration information corresponding to the identifier of the first report carried by the instruction are obtained, corresponding data are obtained according to the identifier, and the first report can be rapidly generated according to the obtained data and the configuration information according to the template file of the report. Meanwhile, the report template file can be provided by a report generation platform or uploaded by a user, and when the template or the assembly of the platform cannot meet the requirement of the user on the report file, the user only needs to upload the report file and input configuration information.
Referring to fig. 6, fig. 6 is a device 6000 for generating a report according to an embodiment of the present application, and as shown in fig. 6, the device 6000 for generating a report includes:
a detecting unit 601, configured to detect a generating instruction for generating a first report, where the generating instruction carries an identifier of the first report;
a first obtaining unit 602, configured to obtain a report template file and configuration information corresponding to the identifier;
a second obtaining unit 603, configured to obtain data corresponding to the identifier;
a generating unit 604, configured to generate the first report according to the report template file, the data, and the configuration information.
In a possible implementation manner, the configuration information is information of data required by cells in the report template file;
the generating unit 604 is specifically configured to:
generating a first form according to the report template file;
and respectively adding the data to corresponding cells in the first table according to the configuration information to obtain the first report.
In a possible implementation manner, the generation instruction further carries time information;
the second obtaining unit 603 is specifically configured to:
acquiring first fixed data corresponding to the identifier and the time information;
acquiring variable data corresponding to the identifier and the time information;
calculating result data according to the fixed data and the variable data;
and determining the fixed data, the variable data and the result data as the data corresponding to the identifier.
In a possible implementation manner, the apparatus 6000 further includes:
a third obtaining unit 605, configured to obtain an effective time period of the first fixed data, so as to obtain a first effective time period;
a receiving unit 606, configured to receive second fixed data corresponding to the identifier and an effective time period of the second fixed data, which are input by a user, to obtain the second fixed data and the second effective time period;
a storage unit 607 for storing the second fixed data and the second valid period when there is no overlap time between the first valid period and the second valid period;
the first obtaining unit 602 is specifically configured to:
acquiring all fixed data corresponding to the identifier;
and acquiring first fixed data of which the corresponding effective time period comprises the time information in the fixed data.
In a possible implementation manner, the apparatus 6000 further includes:
an output unit 608, configured to output a prompt message for prompting a data storage failure when there is a coincidence time between the first valid time period and the second valid time period.
In a possible implementation manner, the generation instruction is generated when the report template file corresponding to the identifier is an online file;
and under the condition that the report template file corresponding to the identifier is an offline file, the generation instruction is input by a user.
In a possible implementation manner, the generating unit 604 is specifically configured to:
adding the data to corresponding cells in the first table according to the configuration information;
and calculating the values of the cells in the first table except the cells included in the configuration information according to the formula included in the first table and the added data.
The detailed descriptions of the detecting unit 601, the first obtaining unit 602, the second obtaining unit 603, the generating unit 604, the third obtaining unit 605, the receiving unit 606, the storing unit 607 and the outputting unit 608 may be directly obtained by referring to the related descriptions in the method embodiments shown in fig. 2 to fig. 4, which are not repeated herein.
According to the embodiment of the application, when a generation instruction for generating the first report is detected, the report template file and the configuration information corresponding to the identifier of the first report carried by the instruction are obtained, corresponding data are obtained according to the identifier, and the first report can be rapidly generated according to the obtained data and the configuration information according to the template file of the report. Meanwhile, the report template file can be provided by a report generation platform or uploaded by a user, and when the template or the assembly of the platform cannot meet the requirement of the user on the report file, the user only needs to upload the report file and input configuration information.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 7, the electronic device 7000 may include:
one or more processors 701, an input device 702, an output device 703, a memory 704, a transceiver 705. The processor 701, the input device 702, the output device 703, the memory 704, and the transceiver 705 are connected via a bus. The input device 702 may include a touch screen, a keyboard, a microphone, and the like, the output device 703 may include a display screen, a speaker, and the like, and the transceiver 705 is configured to receive and transmit data. The memory 704 is used for storing a computer program comprising program instructions, and the processor 701 is used for executing the program instructions stored in the memory 704, wherein the processor 701 is configured for calling the program instructions to execute the following steps:
detecting a generating instruction for generating a first report, wherein the generating instruction carries an identifier of the first report;
acquiring a report template file and configuration information corresponding to the identifier;
acquiring data corresponding to the identifier;
and generating the first report according to the report template file, the data and the configuration information.
In a possible implementation manner, the configuration information is information of data required by cells in the report template file;
the generating, by the processor 701, the first report according to the report template file, the data, and the configuration information includes:
generating a first form according to the report template file;
and respectively adding the data to corresponding cells in the first table according to the configuration information to obtain the first report.
In a possible implementation manner, the generation instruction further carries time information;
the obtaining, by the processor 701, data corresponding to the identifier includes:
acquiring first fixed data corresponding to the identifier and the time information;
acquiring variable data corresponding to the identifier and the time information;
calculating result data according to the fixed data and the variable data;
and determining the fixed data, the variable data and the result data as the data corresponding to the identifier.
In one possible implementation, the processor 701 is configured to call a program instruction to perform the following steps:
obtaining an effective time period of the first fixed data to obtain a first effective time period;
receiving second fixed data corresponding to the identifier and an effective time period of the second fixed data, which are input by a user, to obtain the second fixed data and the second effective time period;
storing the second fixed data and the second valid period when there is no overlap time between the first valid period and the second valid period;
the obtaining, by the processor 701, the fixed data corresponding to the identifier and the time information includes:
acquiring all fixed data corresponding to the identifier;
and acquiring first fixed data of which the corresponding effective time period comprises the time information in the fixed data.
In one possible implementation, the processor 701 is configured to call a program instruction to perform the following steps:
and outputting prompt information for prompting data storage failure when the first effective time period and the second effective time period have the coincidence time.
In a possible implementation manner, the generation instruction is generated when the report template file corresponding to the identifier is an online file;
and under the condition that the report template file corresponding to the identifier is an offline file, the generation instruction is input by a user.
In one possible implementation manner, the adding, by the processor 701, the data to corresponding cells in the first table according to the configuration information to obtain the first report includes:
adding the data to corresponding cells in the first table according to the configuration information;
the values of the cells in the first table other than the cell included in the configuration information are calculated based on the formula included in the first table and the added data.
It should be understood that, in some possible embodiments, the processor 701 may be a Central Processing Unit (CPU), and the processor 701 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein, the steps 201 to 204 can be executed by the processor 701 and the memory 704 in the report generation device.
Among them, the detection unit 601, the first acquisition unit 602, the second acquisition unit 603, the generation unit 604, the third acquisition unit 605, the reception unit 606, the storage unit 607, and the output unit 608 may be implemented by the processor 701 and the memory 704 in the server.
The server may also be configured to execute various methods executed in the foregoing method embodiments, which are not described again.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer storage medium, where the computer storage medium stores a computer program executed by the aforementioned report generating device, and the computer program includes program instructions, and when the processor executes the program instructions, the processor can execute the description of any one of the methods in the embodiment corresponding to any one of fig. 2 and fig. 4, and therefore, the description of any one of the methods will not be repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium to which the present invention relates, reference is made to the description of the method embodiments of the present invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer program instructions, and the above programs can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A report generation method is characterized by comprising the following steps:
detecting a generation instruction for generating a first report, wherein the generation instruction carries an identifier of the first report;
acquiring a report template file and configuration information corresponding to the identifier;
acquiring data corresponding to the identifier;
and generating the first report according to the report template file, the data and the configuration information.
2. The method according to claim 1, wherein the configuration information is information of data required for cells in the report template file;
the generating the first report according to the report template file, the data and the configuration information includes:
generating a first table according to the report template file;
and respectively adding the data to corresponding cells in the first table according to the configuration information to obtain the first report.
3. The method of claim 2, wherein the generation instruction further carries time information;
the acquiring data corresponding to the identifier includes:
acquiring first fixed data corresponding to the identifier and the time information;
acquiring variable data corresponding to the identifier and the time information;
calculating result data according to the fixed data and the variable data;
and determining the fixed data, the variable data and the result data as the data corresponding to the identification.
4. The method of claim 3, further comprising:
obtaining an effective time period of the first fixed data to obtain a first effective time period;
receiving second fixed data corresponding to the identifier and an effective time period of the second fixed data, which are input by a user, to obtain the second fixed data and the second effective time period;
storing the second fixed data and the second valid period if there is no coincidence time between the first valid period and the second valid period;
the obtaining of the fixed data corresponding to the identifier and the time information includes:
acquiring all fixed data corresponding to the identification;
and acquiring first fixed data of which the corresponding effective time period comprises the time information in the fixed data.
5. The method of claim 4, further comprising:
and under the condition that the coincidence time exists between the first effective time period and the second effective time period, outputting prompt information for prompting data storage failure.
6. The method according to claim 5, wherein the generation instruction is generated when the report template file corresponding to the identifier is an online file;
and under the condition that the report template file corresponding to the identifier is an offline file, the generation instruction is input by a user.
7. The method according to any one of claims 2 to 6, wherein the adding the data to the corresponding cells in the first table according to the configuration information to obtain the first report includes:
adding the data to corresponding cells in the first table according to the configuration information;
calculating the values of the cells in the first table except the cells included in the configuration information according to the formula included in the first table and the added data.
8. A report generation apparatus, comprising:
the system comprises a detection unit, a report generation unit and a report generation unit, wherein the detection unit is used for detecting a generation instruction for generating a first report, and the generation instruction carries an identifier of the first report;
the first acquisition unit is used for acquiring the report template file and the configuration information corresponding to the identifier;
the second acquisition unit is used for acquiring data corresponding to the identifier;
and the generating unit is used for generating the first report according to the report template file, the data and the configuration information.
9. An electronic device, comprising: a processor and a memory;
the processor is coupled to a memory, wherein the memory is configured to store program code and the processor is configured to invoke the program code to perform the method of any of claims 1-7.
10. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-7.
CN201911330075.5A 2019-12-20 2019-12-20 Report generation method, device, equipment and computer readable storage medium Active CN111144083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911330075.5A CN111144083B (en) 2019-12-20 2019-12-20 Report generation method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911330075.5A CN111144083B (en) 2019-12-20 2019-12-20 Report generation method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111144083A true CN111144083A (en) 2020-05-12
CN111144083B CN111144083B (en) 2023-11-03

Family

ID=70519216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911330075.5A Active CN111144083B (en) 2019-12-20 2019-12-20 Report generation method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111144083B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538731A (en) * 2020-05-14 2020-08-14 山东慧泰智能科技有限公司 Industrial data automatic generation report system
CN112131843A (en) * 2020-09-02 2020-12-25 苏宁云计算有限公司 Business report generation method and device, computer equipment and storage medium
CN112446707A (en) * 2020-11-13 2021-03-05 泰康保险集团股份有限公司 Rule updating method and device, electronic equipment and storage medium
CN112906362A (en) * 2021-02-05 2021-06-04 广东智能财税数据科技发展有限公司 Report summarizing method, device, equipment and storage medium
CN112906363A (en) * 2021-02-05 2021-06-04 广东智能财税数据科技发展有限公司 Report adding method, device, equipment and storage medium
CN113743060A (en) * 2021-08-30 2021-12-03 建信金融科技有限责任公司 Customizable report generation method and device, computer equipment and storage medium
WO2023041050A1 (en) * 2021-09-18 2023-03-23 北京字跳网络技术有限公司 Document processing method, apparatus and device, and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819293A (en) * 1996-06-06 1998-10-06 Microsoft Corporation Automatic Spreadsheet forms
CN108132925A (en) * 2017-12-15 2018-06-08 中盈优创资讯科技有限公司 A kind of report file generation method and device
US20190042554A1 (en) * 2016-02-03 2019-02-07 Global Software Innovation Pty Ltd Systems and Methods for Generating Electronic Document Templates and Electronic Documents
CN109582936A (en) * 2017-09-28 2019-04-05 北京国双科技有限公司 The method and apparatus for configuring report messages
CN109725933A (en) * 2018-05-24 2019-05-07 中国平安人寿保险股份有限公司 Big data document structure tree method, apparatus, equipment and computer readable storage medium
CN110096683A (en) * 2019-03-15 2019-08-06 中国平安人寿保险股份有限公司 Report form generation method, system, computer installation and computer readable storage medium
WO2019218454A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Subscription report generation method and apparatus, computer device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5819293A (en) * 1996-06-06 1998-10-06 Microsoft Corporation Automatic Spreadsheet forms
US20190042554A1 (en) * 2016-02-03 2019-02-07 Global Software Innovation Pty Ltd Systems and Methods for Generating Electronic Document Templates and Electronic Documents
CN109582936A (en) * 2017-09-28 2019-04-05 北京国双科技有限公司 The method and apparatus for configuring report messages
CN108132925A (en) * 2017-12-15 2018-06-08 中盈优创资讯科技有限公司 A kind of report file generation method and device
WO2019218454A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Subscription report generation method and apparatus, computer device and storage medium
CN109725933A (en) * 2018-05-24 2019-05-07 中国平安人寿保险股份有限公司 Big data document structure tree method, apparatus, equipment and computer readable storage medium
CN110096683A (en) * 2019-03-15 2019-08-06 中国平安人寿保险股份有限公司 Report form generation method, system, computer installation and computer readable storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538731A (en) * 2020-05-14 2020-08-14 山东慧泰智能科技有限公司 Industrial data automatic generation report system
CN111538731B (en) * 2020-05-14 2023-08-29 山东慧泰智能科技有限公司 Automatic report generation system for industrial data
CN112131843A (en) * 2020-09-02 2020-12-25 苏宁云计算有限公司 Business report generation method and device, computer equipment and storage medium
CN112446707A (en) * 2020-11-13 2021-03-05 泰康保险集团股份有限公司 Rule updating method and device, electronic equipment and storage medium
CN112906362A (en) * 2021-02-05 2021-06-04 广东智能财税数据科技发展有限公司 Report summarizing method, device, equipment and storage medium
CN112906363A (en) * 2021-02-05 2021-06-04 广东智能财税数据科技发展有限公司 Report adding method, device, equipment and storage medium
CN113743060A (en) * 2021-08-30 2021-12-03 建信金融科技有限责任公司 Customizable report generation method and device, computer equipment and storage medium
CN113743060B (en) * 2021-08-30 2023-05-26 建信金融科技有限责任公司 Customizable report generation method, device, computer equipment and storage medium
WO2023041050A1 (en) * 2021-09-18 2023-03-23 北京字跳网络技术有限公司 Document processing method, apparatus and device, and medium

Also Published As

Publication number Publication date
CN111144083B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN111144083B (en) Report generation method, device, equipment and computer readable storage medium
CN110263024B (en) Data processing method, terminal device and computer storage medium
CN108305055B (en) Payment testing method and device
CN110941630A (en) Database operation and maintenance method, device and system
CN111309745B (en) Virtual resource processing method and device, electronic equipment and storage medium
CN112738138B (en) Cloud security hosting method, device, equipment and storage medium
CN111488372A (en) Data processing method, device and storage medium
CN112017007A (en) User behavior data processing method and device, computer equipment and storage medium
CN111090581A (en) Intelligent contract testing method and device, computer equipment and storage medium
CN111523817B (en) Order business processing method, device, equipment and medium based on big data
CN115374175A (en) Method and device for tracking task execution progress based on micro-service architecture
CN111131234A (en) Intelligent contract data processing method and device in supply chain and computer equipment
CN113129002A (en) Data processing method and equipment
CN110347657A (en) Data creation method, device, electronic equipment and storage medium
CN110163606B (en) Refund method and device based on blockchain and electronic equipment
CN115914219A (en) Task request processing method, device and system, readable storage medium and electronic equipment
CN113015170A (en) Short message verification method, device, electronic equipment and medium
CN112668998A (en) Flow implementation method, device, system, electronic equipment and readable storage medium
CN112150299A (en) Annuity data processing method, device, medium and electronic equipment
CN110879835A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN114596155B (en) Financial business charging method, device, equipment and medium based on block chain
CN110766407A (en) Transaction verification method, accounting node and medium based on block chain
CN114596092B (en) Charging method, device and equipment based on blockchain and readable storage medium
CN116720300B (en) Drainage pipe network model system
CN109388527A (en) A kind of method, data processing method, device and the equipment of confirmation operation legitimacy

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