CN108460068B - Method, device, storage medium and terminal for importing and exporting report - Google Patents

Method, device, storage medium and terminal for importing and exporting report Download PDF

Info

Publication number
CN108460068B
CN108460068B CN201711215119.0A CN201711215119A CN108460068B CN 108460068 B CN108460068 B CN 108460068B CN 201711215119 A CN201711215119 A CN 201711215119A CN 108460068 B CN108460068 B CN 108460068B
Authority
CN
China
Prior art keywords
report
import
file
platform
imported
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
CN201711215119.0A
Other languages
Chinese (zh)
Other versions
CN108460068A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711215119.0A priority Critical patent/CN108460068B/en
Priority to PCT/CN2018/077360 priority patent/WO2019104891A1/en
Publication of CN108460068A publication Critical patent/CN108460068A/en
Application granted granted Critical
Publication of CN108460068B publication Critical patent/CN108460068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Abstract

The invention is suitable for the technical field of communication, and provides a method for importing and exporting reports, which comprises the following steps: acquiring a user name and a password of a report designer, and sending the user name and the password to a publishing platform to log in the publishing platform; when a report is imported, acquiring at least one report file to be imported, which is selected locally by a report designer, starting an import thread with the same number as the number of the report files to be imported, and importing the report files to the issuing platform through the import thread according to the storage paths of the distributed report files; when a report is exported, acquiring at least one report file to be exported, which is selected by a report designer from the publishing platform, starting export threads with the same number as the number of the report files to be exported, and exporting the report files from the publishing platform according to the storage paths of the distributed report files through the export threads; the method and the device realize batch import and export operation of the report files and solve the problems of low efficiency and complicated process when the report files are imported and exported in the prior art.

Description

Method, device, storage medium and terminal for importing and exporting report
Technical Field
The invention belongs to the technical field of communication, and particularly relates to a method, a device, a storage medium and a terminal for importing and exporting a report.
Background
Pentaho is the most popular open source business intelligent software at present, is a BI suite which takes workflow as a core and emphasizes solution-oriented schemes rather than tool components, and integrates a large number of machine learning algorithms capable of undertaking data mining tasks, including preprocessing, classifying, regressing, clustering and association rule analysis of data and visualizing the data on an interactive interface. The existing Pentaho framework mainly comprises three parts, namely an analyzer, a designer and a release platform. The designer is an editing tool for assisting a designer to create a cube (data cube), the parser is a set of Report generation tools utilizing JFreeReport, the publishing platform is a set of Pentaho BI with simplified configuration, and the Report is generated by indirectly applying the parser through Pentaho Sequence Flow, Pentaho Report component and other components. The cube, namely the data cube and the cube file, is a multi-dimensional matrix, and can package multi-dimensional metadata from a database or a file, so that a user can conveniently explore and analyze a data set from multiple angles. After the data cube is designed and the storage path is selected, a file taking the mdc file name as the end is loaded on the data cube and is marked as a report file, and subsequent data analysis directly accesses the report file. However, when importing or exporting a report file, the existing Pentaho only supports one process, and the efficiency of importing or exporting is low, and the process is complicated. In addition, the Schema-workbench component in the existing Pentaho also limits the modification operation on the report file, and each modification operation can be performed on only one report file, so that the efficiency is low. In the case of batch modification, the problem of missed modification is easily caused.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a storage medium and a terminal for importing and exporting a report, and aims to solve the problems of low efficiency and complicated process when a report file is imported, exported and modified in the prior art.
The embodiment of the invention provides a method for importing and exporting reports, which comprises the following steps:
acquiring a user name and a password of a report designer, and sending the user name and the password to a publishing platform to log in the publishing platform;
when a report is imported, acquiring a target folder selected locally by a report designer, wherein the target folder comprises at least one report file to be imported, starting import threads with the same number as the number of the report files to be imported, distributing the report files to be imported to the import threads one by one, and importing the report files to the issuing platform through the import threads according to the storage paths of the distributed report files;
when the report is exported, at least one report file to be exported, which is selected by the report designer from the publishing platform, is obtained, export threads with the same number as the report files to be exported are opened, the report files to be exported are distributed to the export threads one by one, and the report files are exported from the publishing platform through the export threads according to the storage paths of the distributed report files.
Further, the method further comprises:
before the report is imported, starting a monitoring task, and testing the connection state between the report and the release platform through the monitoring task;
and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
Further, after the report file is imported to the publishing platform through the import thread according to the allocated storage path of the report file, the method further includes:
reading a check statement corresponding to the allocated report file through the import thread;
generating a check instruction according to the check statement, and sending the check instruction to the issuing platform so that the issuing platform verifies whether the report file is imported according to the check instruction;
if an import success message returned by the issuing platform is received, distributing a report file to be imported next to the import thread;
and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
Further, after exporting the report file from the publishing platform according to the storage path of the allocated report file through the export thread, the method further includes:
acquiring the content to be modified or the content to be added in the report file;
and searching the report files which are correlated with each other, and uniformly modifying the report files which are correlated with each other according to the content to be modified or the content to be added.
Further, the acquiring the content to be modified or the content to be added in the report file includes:
analyzing the exported report file to obtain a plurality of keywords;
generating a modification table by taking the key words as table conditions, and displaying the modification table for the report designer to check and modify;
and acquiring the content to be modified or the content to be added through the modification table, and displaying the content to be modified or the content to be added to prompt the report designer to confirm.
The embodiment of the invention also provides a device for importing and exporting the report, which comprises the following components:
the login module is used for acquiring a user name and a password of a report designer and sending the user name and the password to the release platform so as to log in the release platform;
the report file importing method comprises the steps that an importing module is used for acquiring a target folder selected locally by a report designer when a report is imported, wherein the target folder comprises at least one report file to be imported, importing threads with the same number as the number of the report files to be imported are opened, the report files to be imported are distributed to the importing threads one by one, and the report files are imported to the issuing platform through the importing threads according to the storage paths of the distributed report files;
and the export module is used for acquiring at least one report file to be exported, which is selected by the report designer from the publishing platform when the report is exported, starting export threads with the same number as the report files to be exported, distributing the report files to be exported to the export threads one by one, and exporting the report files from the publishing platform according to the storage paths of the distributed report files through the export threads.
Further, the apparatus further comprises:
the monitoring module is used for starting a monitoring task before the report is imported, and testing the connection state between the monitoring task and the release platform; and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
Further, the apparatus further comprises:
the verification module is used for reading a verification statement corresponding to the distributed report file through the import thread, generating a verification instruction according to the verification statement, and sending the verification instruction to the issuing platform so that the issuing platform verifies whether the report file is imported according to the verification instruction;
the distribution module is used for distributing the next report file to be imported to the import thread if the import success message returned by the release platform is received; and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for importing and exporting a report as described above.
The embodiment of the invention also provides a terminal, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the report import and export method when executing the computer program.
Compared with the prior art, the embodiment of the invention has the advantages that by adding the multithread processing mechanism, when the report is imported, the target folder selected locally by the report designer is obtained, the target folder comprises at least one report file to be imported, then the import threads with the same number as the number of the report files to be imported are opened, the report files to be imported are distributed to the import threads one by one, and the report files are imported to the issuing platform through the import threads according to the storage paths of the distributed report files; when a report is exported, at least one report file to be exported, which is selected by a report designer from the publishing platform, is firstly obtained, then export threads with the same number as the report files to be exported are opened, the report files to be exported are distributed to the export threads one by one, and the report files are exported from the publishing platform through the export threads according to the storage paths of the distributed report files; wherein, one import thread/one export thread correspondingly processes one report file; therefore, batch import and export operations of the report files are realized, a plurality of report files can be imported or exported at one time, and the problems of low efficiency and complex process when the report files are imported and exported in the prior art are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a first implementation of a method for importing and exporting a report according to an embodiment of the present invention;
fig. 2 is a flowchart of a second implementation of a method for importing and exporting a report according to an embodiment of the present invention;
fig. 3 is a flowchart of a third implementation of a method for importing and exporting a report according to an embodiment of the present invention;
fig. 4 is a flowchart of a fourth implementation of a method for importing and exporting a report according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating an implementation of step S404 in the method for importing and exporting a report according to the embodiment of the present invention;
fig. 6 is a configuration diagram of a report import/export apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
Fig. 1 shows a first implementation flow of a method for importing and exporting a report according to an embodiment of the present invention.
In the embodiment of the invention, the method for importing and exporting the report is applied to terminals including but not limited to computers, servers and the like. The report is a report file for generating the cube, namely a file with the mdc file name as the end.
Referring to fig. 1, the method for importing and exporting the report includes:
in step S101, a user name and a password of a report designer are obtained, and the user name and the password are sent to a publishing platform to log in the publishing platform.
In the embodiment of the invention, when the import and export operations of the report are carried out, a report designer needs to log in the publishing platform first to obtain the operation authority. And acquiring a user name and a password of a report designer during login, then sending the user name and the password to the publishing platform, and performing login verification by the publishing platform. If the verification of the publishing platform is passed, the login is successful, and a report operation interface is displayed to a report designer locally at the terminal so as to open import and export operation authority, so that the safety of the import and export operation of the report is improved.
In step S102, when a report is imported, a target folder selected locally by the report designer is obtained, where the target folder includes at least one report file to be imported, an import thread having the same number as the number of the report files to be imported is opened, the report files to be imported are allocated to the import thread one by one, and the report files are imported to the publishing platform through the import thread according to the allocated storage path of the report files.
Here, if a plurality of report files need to be imported simultaneously, it is necessary that a report designer complete one report file every time the report file is developed, the report file to be imported is stored in the same folder, and configuration parameters of each report file are set. The configuration parameters comprise a link url of the publishing platform, a saving path of the report file on the publishing platform and a publishing format.
The publishing platform is a pentaho platform, the importing instruction provided by the pentaho platform is identified by reading the importing source code of the pentaho platform, the importing instruction is packaged by using java language, and a program for generating and executing the importing instruction in batch is developed. When the import operation is performed, the terminal obtains the report file related to the import operation according to the folder selected by the user, namely the target folder. And generating import instructions in batches, starting a plurality of import threads according to the import instructions, and distributing the report files related to the import operation to each import thread. And then importing the report file to the issuing platform according to the storage path, thereby realizing the batch import function of the report file.
In step S103, when exporting a report, at least one report file to be exported, which is selected by the report designer from the publishing platform, is obtained, export threads with the same number as the number of the report files to be exported are opened, the report files to be exported are allocated to the export threads one by one, and the report files are exported from the publishing platform through the export threads according to the storage paths of the allocated report files.
Similar to batch export, the embodiment of the invention also identifies the export instruction provided by the pentaho platform by reading the export source code of the pentaho platform, encapsulates the export instruction by using java language, and develops a program for generating and executing the export instruction in batch.
And if the export operation is carried out, acquiring at least one report file to be exported, which is selected from the publishing platform by the report designer. Counting the number of the selected report files to be exported, generating export instructions in batches, and starting a plurality of import threads according to the import instructions. And distributing the report file related to the exporting operation to each exporting thread, acquiring a storage path of the distributed report file through the exporting thread, and downloading the report file from the issuing platform according to the storage path, thereby realizing the batch exporting function of the report file.
In summary, in the embodiment of the present invention, by adding a multithread processing mechanism, when a report is imported, an import thread having the same number as that of the report file to be imported is opened, and the report file is imported to the publishing platform by the import thread according to the allocated storage path of the report file; when the report is exported, exporting threads with the same number as the number of the report files to be exported are started, and the report files are exported from the publishing platform through the exporting threads according to the storage paths of the distributed cube files; therefore, batch import and export operations of the report files are realized, a plurality of report files can be simultaneously selected for import or export at one time, the efficiency of importing and exporting reports is effectively improved, and the problems of low efficiency and complex process when the report files are imported and exported in the prior art are solved.
Further, a second implementation procedure of the report import and export method provided by the embodiment of the present invention is provided based on the first implementation procedure of the report import and export method provided in fig. 1.
As shown in fig. 2, it is a flowchart of a second implementation of the method for importing and exporting a report according to the embodiment of the present invention, where the method includes:
in step S201, a user name and a password of a report designer are obtained, and the user name and the password are sent to a publishing platform to log in the publishing platform.
Step S201 is the same as step S101 described in the embodiment of fig. 1, and please refer to the description of the above embodiment for details, which are not described herein again.
In step S202, before the report is imported, a monitoring task is started, and the connection state between the report and the publishing platform is tested through the monitoring task.
In step S203, when the connection status is in connection, creating a corresponding log file for importing the current report, capturing an abnormal problem in the importing process through the monitoring task, and writing the abnormal problem into the log file.
Here, the embodiment of the present invention creates a log file according to a connection state between the terminal and the distribution platform. Before the report is imported, a monitoring task is started first, and the connection state between the terminal and the release platform is tested through the monitoring task. And when the connection state is in connection, indicating that preparation work is already done between the terminal and the publishing platform for importing the report, creating a log file to record the file loss problem in the importing process.
And in the report import process, capturing abnormal problems in real time through the monitoring task, and recording the abnormal problems into the created log file. Here, the exception problem refers to an instruction stream that causes the report importing program to interrupt running, and if the exception is not captured and processed, the program may be interrupted and executed, which causes a report importing error. According to the embodiment of the invention, the problem of file loss in the import process can be obtained by recording the abnormal problem, the error correction function of the import process is realized, and the accuracy of report import is ensured.
In step S204, when a report is imported, a target folder selected locally by the report designer is obtained, where the target folder includes at least one report file to be imported, an import thread having the same number as the number of the report files to be imported is opened, the report files to be imported are allocated to the import thread one by one, and the report files are imported to the publishing platform through the import thread according to the allocated storage path of the report files.
In step S205, when exporting a report, at least one report file to be exported, which is selected by the report designer from the publishing platform, is obtained, export threads with the same number as the number of the report files to be exported are opened, the report files to be exported are allocated to the export threads one by one, and the report files are exported from the publishing platform through the export threads according to the storage paths of the allocated report files.
Steps S204 and S205 are the same as steps S102 and S103 described in the embodiment of fig. 1, and please refer to the description of the above embodiments, which is not repeated here.
Further, a third implementation procedure of the report import and export method provided by the embodiment of the present invention is provided based on the first implementation procedure of the report import and export method provided in fig. 2.
As shown in fig. 3, it is a flowchart of a third implementation of the report import/export method according to the embodiment of the present invention, and the flowchart includes steps S301 to S303, where steps S301 to S303 are the same as steps S101 to S103 described in the embodiment of fig. 1, and refer to the description of the above embodiment for details, which are not repeated herein.
After the report file is imported to the publishing platform through the import thread according to the allocated storage path of the report file, the method further comprises:
in step S304, the check statement corresponding to the allocated report file is read through the import thread.
In the embodiment of the invention, after each import thread imports the distributed report file into the publishing platform, the check statement corresponding to the report file is continuously read. Here, the check statement is an SQL statement.
In step S305, a check instruction is generated according to the check statement, and the check instruction is sent to the issuing platform, so that the issuing platform verifies whether the report file is imported according to the check instruction.
After the verification statement is obtained, the embodiment of the invention generates the verification instruction. And the check statement comprises key information of the report file. The generated verification instruction defines the condition information of the verification, namely the key information. Based on the check instruction, the issuing platform inquires whether the report file corresponding to the key information exists or not, so that whether the report file processed by the import thread is successfully imported or not is determined, the import result of the report file is confirmed, and the import effectiveness of the report file is ensured.
In step S306, if the import success message returned by the publishing platform is received, the report file to be imported next is allocated to the import thread.
In step S307, if an import failure message returned by the publishing platform is received, the report file with import failure is re-allocated to the import thread
Optionally, the method further comprises: if the report file corresponding to the key information exists in the inquiry of the issuing platform, the report file distributed by the import thread is indicated to be successfully imported, an import success message is returned to the terminal, and the terminal distributes the next report file to be imported to the import thread according to the import success message; if the report file corresponding to the key information does not exist in the inquiry of the issuing platform, indicating that the report file distributed by the import thread fails to be imported, returning an import failure message to the terminal, and distributing the report file to the import thread again by the terminal according to the import failure message so as to be imported again, so that the batch import of the report file is realized.
Further, when a new service is involved and a report file needs to be modified, the prior art may download the published report file from the publishing platform, and re-publish the report file after modification. However, when the report file is modified, each modification only supports the modification of a single report file, and the modification efficiency is low. In order to solve the above technical problem, a fourth implementation procedure of the report import and export method provided in the embodiment of the present invention is provided based on the first implementation procedure of the report import and export method provided in fig. 1.
Fig. 4 is a flowchart of a fourth implementation of the report import/export method according to the embodiment of the present invention. The method comprises the following steps:
step S401 to step S403, wherein step S401 to step S403 are the same as step S101 to step S103 described in the embodiment of fig. 1, and please refer to the description of the above embodiments for details, which are not repeated herein.
The method further comprises the following steps:
in step S404, the content to be modified or the content to be added in the report file is obtained.
Optionally, in order to improve the experience of the user, fig. 5 shows a specific implementation flow of step S404 provided in the embodiment of the present invention. Referring to fig. 5, the step S404 of obtaining the content to be modified or the content to be added in the report file includes:
in step S501, the derived report file is parsed to obtain a plurality of keywords.
In the embodiment of the invention, the derived report file is synchronously analyzed to obtain the key words included in the report file, wherein the key words are the constituent elements of the report file. Here, like the X, Y, Z coordinate axis in mathematics represents 3 space creation cubes, the cube generated from the report file is a multidimensional dataset for business intelligence analysis that is built with different business views as dimensions, and thus, the keywords include, but are not limited to, table, dimensionuse, Level, category, Measure, calledmember, Formula. The dimension refers to an angle used for analysis when data analysis is performed, such as time, things, and places; the layer refers to a hierarchical relation of dimension data logically, for example, the time dimension can be divided into four levels of a first quarter, a second quarter, a third quarter and a fourth quarter; categories refer to data elements that are independent on a level in one dimension; the indicators are data used to measure the performance of the business, to determine the quantitative results of the success of the business operations, or key performance indicators such as revenue, cost, add/drop amount. It can be seen that at least one content is included under each keyword.
In step S502, a modification table is generated by using the keyword as a table condition, and the modification table is displayed for the report designer to view and perform modification operation.
The modification table takes the keywords as table conditions, each table condition corresponds to one or more modification windows, and the modification table is provided for report designers to view and add or modify the content included under the keywords.
In step S503, the content to be modified or the content to be added is acquired through the modification table, and the content to be modified or the content to be added is displayed to prompt the report designer to confirm.
The report designer can perform input operation on the modification window of the modification form to complete the modification or addition of the content contained in the keyword. The terminal obtains the form condition to be modified and/or the form condition to be added according to the operation of the user, obtains the content to be modified and/or the content to be added, and displays the content before and after modification so as to prompt the user to confirm whether the modification is correct. The embodiment of the invention displays the modifiable key words and the modified or added content through the visual interface, thereby facilitating the verification operation of the user.
In step S405, the report files related to each other are searched for, and the report files related to each other are uniformly modified according to the content to be modified or the content to be added.
Here, in the embodiment of the present invention, the modification source code of the pentaho platform is interpreted, the modification instruction provided by the pentaho platform is recognized, and the modification instruction is encapsulated by using java language, so as to develop a program for generating and executing the modification instruction in batch.
When the content to be modified is obtained, the report file comprising the keywords corresponding to the content to be modified is inquired, the report files which are correlated are obtained, and the keywords of the report files which are correlated are modified. When the content to be added is obtained, the keyword corresponding to the content to be added is obtained, the report file comprising the keyword is searched, the report file which is correlated with each other is obtained, and the content is added to the report file which is correlated with each other. Exemplarily, in the process of project development of some insurance services, user alias information is often required to be added, the user alias information belongs to a user information dimension and is a level of the user information dimension, other report files with the user information dimension are searched to obtain correlated report files, and the user alias information to be added is added to the correlated report files, so that batch addition of user names to the report files is realized, the modification efficiency is improved, and the condition of missed modification is avoided.
It should be understood that, in the above embodiments, the order of execution of the steps is not meant to imply any order, and the order of execution of the steps should be determined by their function and inherent logic, and should not limit the implementation process of the embodiments of the present invention.
Example 2
Fig. 6 is a configuration diagram of a report import/export apparatus according to an embodiment of the present invention, and only a part related to the embodiment of the present invention is shown for convenience of description.
In an embodiment of the present invention, the report import/export apparatus is used to implement the report import/export method described in the embodiments of fig. 1, fig. 2, fig. 3, fig. 4, and fig. 5, and may be a software unit, a hardware unit, or a unit combining software and hardware that is built in a terminal, where the terminal includes but is not limited to a computer, a server, and the like.
Referring to fig. 6, the device for importing and exporting the report includes:
and the login module 61 is used for acquiring a user name and a password of a report designer, and sending the user name and the password to the release platform so as to log in the release platform.
The import module 62 is configured to obtain a target folder selected locally by a report designer when a report is imported, where the target folder includes at least one report file to be imported, open an import thread with the same number as the number of the report files to be imported, allocate the report files to be imported to the import thread one by one, and import the report files to the publishing platform through the import thread according to the allocated storage paths of the report files.
And the export module 63 is configured to, when exporting a report, obtain at least one report file to be exported, which is selected by the report designer from the publishing platform, open export threads with the same number as the report files to be exported, assign the report files to be exported to the export threads one by one, and export the report files from the publishing platform according to the storage paths of the assigned report files through the export threads.
Wherein, one import thread/one export thread correspondingly processes one report file.
Optionally, the apparatus further comprises:
the monitoring module 64 is used for starting a monitoring task before the report is imported, and testing the connection state between the report and the release platform through the monitoring task; and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
Optionally, the apparatus further comprises:
the checking module 65 is configured to read a check statement corresponding to the allocated report file through the import thread, generate a check instruction according to the check statement, and send the check instruction to the issuing platform, so that the issuing platform verifies whether the report file is imported according to the check instruction.
The allocating module 66 is configured to allocate a next report file to be imported to the import thread if the import success message returned by the publishing platform is received; and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
Optionally, the apparatus further comprises:
and the obtaining module 67 is configured to obtain the content to be modified or the content to be added in the report file.
And the modifying module 68 is configured to search the report files related to each other, and uniformly modify the report files related to each other according to the content to be modified or the content to be added.
Further, the obtaining module 67 further includes:
an analysis unit 671 for analyzing the exported report file to obtain a plurality of keywords;
a generating unit 672, configured to generate a modification table by using the keyword as a table condition, and display the modification table for the report designer to view and perform modification operation;
the display unit 673 is configured to obtain the content to be modified or the content to be added through the modification table, and display the content to be modified or the content to be added to prompt the report designer to confirm.
It should be noted that each module/unit in the embodiment of the present invention may be configured to implement all technical solutions in the foregoing method embodiments, and specific working processes thereof may refer to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Example 3
This embodiment provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for importing and exporting a report table in embodiment 1 is implemented, and details are not described herein again to avoid repetition. Alternatively, the computer program, when executed by the processor, implements the functions of each module/unit in the apparatus for importing and exporting a report in embodiment 2, and is not described herein again to avoid redundancy.
Example 4
Fig. 7 is a schematic diagram of a terminal provided in an embodiment of the present invention, where the terminal includes, but is not limited to, a server and a mobile terminal. As shown in fig. 7, the terminal 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72 stored in said memory 71 and executable on said processor 70. When the processor 70 executes the computer program 72, the steps in the embodiment of the method for importing and exporting a report described above are implemented, for example, steps S101 to S103 shown in fig. 1, steps S201 to S205 described in the embodiment of fig. 2, steps S301 to S307 described in the embodiment of fig. 3, steps S401 to S405 described in the embodiment of fig. 4, and steps S501 to S503 described in the embodiment of fig. 5; alternatively, the processor 70, when executing the computer program 72, implements the functions of each module/unit in the above-mentioned report import/export apparatus embodiment, for example, the functions of the modules 61 to 68 shown in fig. 6.
Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the terminal 7. For example, the computer program 72 may be divided into a login module, an import module, and an export module, and the specific functions of each module are as follows:
the login module is used for acquiring a user name and a password of a report designer and sending the user name and the password to the release platform so as to log in the release platform;
the report file importing method comprises the steps that an importing module is used for acquiring a target folder selected locally by a report designer when a report is imported, wherein the target folder comprises at least one report file to be imported, importing threads with the same number as the number of the report files to be imported are opened, the report files to be imported are distributed to the importing threads one by one, and the report files are imported to the issuing platform through the importing threads according to the storage paths of the distributed report files;
the export module is used for acquiring at least one to-be-exported report file selected by the report designer from the publishing platform when the report is exported, starting export threads with the same number as the to-be-exported report files, distributing the to-be-exported report files to the export threads one by one, and exporting the report files from the publishing platform through the export threads according to the storage paths of the distributed report files;
wherein, one import thread/one export thread correspondingly processes one report file.
Optionally, the computer program 72 further comprises:
the monitoring module is used for starting a monitoring task before the report is imported, and testing the connection state between the monitoring task and the release platform; and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
Optionally, the computer program 72 further comprises:
the verification module is used for reading a verification statement corresponding to the distributed report file through the import thread, generating a verification instruction according to the verification statement, and sending the verification instruction to the issuing platform so that the issuing platform verifies whether the report file is imported according to the verification instruction;
the distribution module is used for distributing the next report file to be imported to the import thread if the import success message returned by the release platform is received; and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
The terminal 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is only an example of a terminal 7 and does not constitute a limitation of the terminal 7, and that it may comprise more or less components than those shown, or some components may be combined, or different components, for example the terminal may further comprise input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the terminal and connects the various parts of the overall terminal using various interfaces and lines.
The memory 71 may be used to store the computer programs and/or modules, and the processor may implement various functions of the terminal by operating or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include electrical carrier signals and telecommunication signals according to legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A method for importing and exporting reports is characterized by comprising the following steps:
acquiring a user name and a password of a report designer, and sending the user name and the password to a publishing platform to log in the publishing platform;
when a report is imported, acquiring a target folder selected locally by a report designer, wherein the target folder comprises at least one report file to be imported, starting import threads with the same number as the number of the report files to be imported, distributing the report files to be imported to the import threads one by one, importing the report files to the publishing platform through the import threads according to the storage paths of the distributed report files, wherein one import thread processes one report file each time, and each import thread runs independently;
when a report is exported, acquiring at least one report file to be exported, which is selected by a report designer from the publishing platform, starting export threads with the same number as the report files to be exported, distributing the report files to be exported to the export threads one by one, and exporting the report files from the publishing platform through the export threads according to the storage paths of the distributed report files;
the publishing platform is a pentaho platform, the report is a report file for generating a cube, and the report file takes a mdc file name as an ending file; packaging the import instruction provided by the pentaho platform through java language, and developing a program for generating and executing the import instruction in batches; packaging the export instruction provided by the pentaho platform through java language, and developing a program for generating and executing the export instruction in batches;
after the report file is imported to the publishing platform through the import thread according to the allocated storage path of the report file, the method further comprises:
reading a check statement corresponding to the allocated report file through the import thread;
generating a check instruction according to the check statement, and sending the check instruction to the issuing platform so that the issuing platform verifies whether the report file is imported according to the check instruction;
if an import success message returned by the issuing platform is received, distributing a report file to be imported next to the import thread;
and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
2. The report import/export method according to claim 1, further comprising:
before the report is imported, starting a monitoring task, and testing the connection state between the report and the release platform through the monitoring task;
and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
3. The report import and export method according to any of claims 1 to 2, wherein after exporting the report file from the publishing platform according to the storage path of the allocated report file by the export thread, the method further comprises:
acquiring the content to be modified or the content to be added in the report file;
and searching the report files which are correlated with each other, and uniformly modifying the report files which are correlated with each other according to the content to be modified or the content to be added.
4. The report import/export method according to claim 3, wherein the acquiring the content to be modified or the content to be added in the report file comprises:
analyzing the exported report file to obtain a plurality of keywords;
generating a modification table by taking the key words as table conditions, and displaying the modification table for the report designer to check and modify;
and acquiring the content to be modified or the content to be added through the modification table, and displaying the content to be modified or the content to be added to prompt the report designer to confirm.
5. An apparatus for importing and exporting reports, the apparatus comprising:
the login module is used for acquiring a user name and a password of a report designer and sending the user name and the password to the release platform so as to log in the release platform;
the report file importing method comprises the steps that an importing module is used for acquiring a target folder selected locally by a report designer when a report is imported, wherein the target folder comprises at least one report file to be imported, importing threads with the same number as the number of the report files to be imported are opened, the report files to be imported are distributed to the importing threads one by one, the report files are imported to the issuing platform through the importing threads according to the storage paths of the distributed report files, one importing thread processes one report file each time, and each importing thread runs independently;
the export module is used for acquiring at least one to-be-exported report file selected by the report designer from the publishing platform when the report is exported, starting export threads with the same number as the to-be-exported report files, distributing the to-be-exported report files to the export threads one by one, and exporting the report files from the publishing platform through the export threads according to the storage paths of the distributed report files;
the publishing platform is a pentaho platform, the report is a report file for generating a cube, and the report file takes a mdc file name as an ending file; packaging the import instruction provided by the pentaho platform through java language, and developing a program for generating and executing the import instruction in batches; packaging the export instruction provided by the pentaho platform through java language, and developing a program for generating and executing the export instruction in batches;
the device further comprises:
the verification module is used for reading a verification statement corresponding to the distributed report file through the import thread, generating a verification instruction according to the verification statement, and sending the verification instruction to the issuing platform so that the issuing platform verifies whether the report file is imported according to the verification instruction;
the distribution module is used for distributing the next report file to be imported to the import thread if the import success message returned by the release platform is received; and if receiving an import failure message returned by the issuing platform, re-distributing the report file with import failure to the import thread.
6. The report import/export apparatus of claim 5, further comprising:
the monitoring module is used for starting a monitoring task before the report is imported, and testing the connection state between the monitoring task and the release platform; and when the connection state is in connection, creating a corresponding log file imported by the report, capturing abnormal problems in the import process through the monitoring task, and writing the abnormal problems into the log file.
7. A computer-readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing the steps of the method for importing and exporting reports according to any one of claims 1 to 4.
8. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method of importing and exporting a report according to any one of claims 1 to 4.
CN201711215119.0A 2017-11-28 2017-11-28 Method, device, storage medium and terminal for importing and exporting report Active CN108460068B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711215119.0A CN108460068B (en) 2017-11-28 2017-11-28 Method, device, storage medium and terminal for importing and exporting report
PCT/CN2018/077360 WO2019104891A1 (en) 2017-11-28 2018-02-27 Method and device for importing and exporting report, storage medium, and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711215119.0A CN108460068B (en) 2017-11-28 2017-11-28 Method, device, storage medium and terminal for importing and exporting report

Publications (2)

Publication Number Publication Date
CN108460068A CN108460068A (en) 2018-08-28
CN108460068B true CN108460068B (en) 2021-03-12

Family

ID=63221143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711215119.0A Active CN108460068B (en) 2017-11-28 2017-11-28 Method, device, storage medium and terminal for importing and exporting report

Country Status (2)

Country Link
CN (1) CN108460068B (en)
WO (1) WO2019104891A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359282B (en) * 2018-09-25 2022-10-21 北京海数宝科技有限公司 List data import method and device, computer equipment and storage medium
CN109241074B (en) * 2018-09-28 2023-09-26 中国平安财产保险股份有限公司 Automatic auditing data processing method and device, computer equipment and storage medium
CN112417012A (en) * 2020-04-29 2021-02-26 上海哔哩哔哩科技有限公司 Data processing method and system
CN113378520B (en) * 2021-04-20 2024-04-09 北京灵伴即时智能科技有限公司 Text editing method and system
CN114546971B (en) * 2022-01-26 2022-11-08 北京元年科技股份有限公司 Data file format conversion method, device, equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866599A (en) * 2015-06-01 2015-08-26 北京京东尚科信息技术有限公司 Production method and system of visual report
CN106708925A (en) * 2016-11-11 2017-05-24 山东浪潮云服务信息科技有限公司 Form business realization method and system, and business terminal
CN106911765A (en) * 2017-01-23 2017-06-30 北京思特奇信息技术股份有限公司 A kind of report file method for down loading and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8538912B2 (en) * 2010-09-22 2013-09-17 Hewlett-Packard Development Company, L.P. Apparatus and method for an automatic information integration flow optimizer
US20140100787A1 (en) * 2012-10-09 2014-04-10 Aakash Jha Assay Analysis, Tracking and Reporting System (AATR)
CN103235807A (en) * 2013-04-19 2013-08-07 浪潮集团山东通用软件有限公司 Data extracting and processing method supporting high-concurrency large-volume data
CN103927338A (en) * 2014-03-26 2014-07-16 网神信息技术(北京)股份有限公司 Log information storage processing method and log information storage processing device
CN107145537B (en) * 2017-04-21 2021-06-18 深圳市天天来玩科技有限公司 Table data importing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866599A (en) * 2015-06-01 2015-08-26 北京京东尚科信息技术有限公司 Production method and system of visual report
CN106708925A (en) * 2016-11-11 2017-05-24 山东浪潮云服务信息科技有限公司 Form business realization method and system, and business terminal
CN106911765A (en) * 2017-01-23 2017-06-30 北京思特奇信息技术股份有限公司 A kind of report file method for down loading and device

Also Published As

Publication number Publication date
WO2019104891A1 (en) 2019-06-06
CN108460068A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
CN108460068B (en) Method, device, storage medium and terminal for importing and exporting report
CN109062780B (en) Development method of automatic test case and terminal equipment
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
CN111177231A (en) Report generation method and report generation device
CA3198981A1 (en) Constructing executable program code based on sequence codes
US10552304B2 (en) Using test workload run facts and problem discovery data as input for business analytics to determine test effectiveness
US20150269234A1 (en) User Defined Functions Including Requests for Analytics by External Analytic Engines
CN110941488A (en) Task processing method, device, equipment and storage medium
CN113360519B (en) Data processing method, device, equipment and storage medium
US11366704B2 (en) Configurable analytics for microservices performance analysis
CN112559525B (en) Data checking system, method, device and server
CN113010208B (en) Version information generation method, device, equipment and storage medium
CN111897728B (en) Interface debugging method and related equipment
CN114116509A (en) Program analysis method, program analysis device, electronic device, and storage medium
US20230409468A1 (en) Providing application error data for use by third-party library development systems
CN107506299B (en) Code analysis method and terminal equipment
CN111324332A (en) Big data task processing method and system, electronic device and storage medium
CN110309062A (en) Case generation method, device, electronic equipment and storage medium
US11960560B1 (en) Methods for analyzing recurring accessibility issues with dynamic web site behavior and devices thereof
CN117407430B (en) Data query method, device, computer equipment and storage medium
CN110309038B (en) Performance test method and device, electronic equipment and computer readable storage medium
US20210110059A1 (en) Dynamically Identifying and Redacting Data from Diagnostic Operations via Runtime Monitoring of Data Sources
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN115114337A (en) Method, device and medium for adjusting business process
CN106687999B (en) Generating a set of instructions implementing rules designed to update objects specified according to an application data model

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