Report migration method and device, storage medium and electronic equipment
By extracting data from report design files, clustering and merging, the time-consuming and labor-intensive problem of traditional report migration methods is solved, and efficient report migration and cost-reducing effects are achieved.
Patent Information
- Application Number
- CN202411722188.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-18
AI Technical Summary
The traditional report migration method relies on manual operations, which is time-consuming and costly, making it difficult to efficiently complete the upgrade or migration of the old platform reporting system to a new platform.
By extracting the extracted logical data and table sample element data from the report design file, clustering and merging processing, generating a merged report set, and migrating it to the target report system, reducing manual participation and migration.
It effectively reduces the workload and cost of report migration, improves migration efficiency, and reduces manual participation.
Smart Images

Figure CN119474059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of report processing, and in particular to a report migration method and device, a storage medium and an electronic device. Background Art
[0002] With the continuous development of information technology and the acceleration of enterprise digital transformation, the reporting system of the old platform often faces the need to upgrade or migrate to the new platform. In the process of migrating reports from the old platform to the new platform, the traditional migration method often adopts manual coding and item-by-item comparison. This method requires engineers to conduct in-depth analysis of the reporting system of the old platform, understand its data structure, business logic and report format, and then rebuild the corresponding reporting system on the new platform. In this process, engineers need to invest a lot of time and energy to carry out tedious coding and testing work. The traditional report migration method mainly relies on manual operation, which is not only time-consuming and labor-intensive, but also costly. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a report migration method and device, a storage medium and an electronic device. The solution provided by the present application is applied to extract data acquisition logic data and table sample element data from the design file of the report, and cluster each report using the data acquisition logic data and table sample element data of each report. Based on the clustering results, each report is merged to obtain a plurality of merged reports, and each merged report is migrated to the target report system. The whole process reduces manual participation, and by merging reports, the amount of report migration is reduced, thereby effectively reducing the workload of report migration and reducing the migration cost of the report.
[0004] To achieve the above objectives, the present application provides the following technical solutions:
[0005] A report migration method, comprising:
[0006] Obtaining a set of reports to be migrated, wherein the set of reports to be migrated includes various reports;
[0007] Acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report;
[0008] Based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained;
[0009] Based on the clustering data of each of the reports, clustering processing is performed on each of the reports to obtain a clustering result;
[0010] Based on the clustering result, each of the reports is merged to obtain a merged report set, wherein the merged report set includes each merged report obtained after the merge process, and the merged report set is migrated to a target report system.
[0011] In the above method, optionally, the step of extracting the data acquisition logic data and table sample element data of each report from the design file of each report includes:
[0012] Extracting query statement information from the design file of each report using a preset logical extraction method;
[0013] Using a preset field reading method to extract field information in the design file of each report;
[0014] For each of the reports, based on the query statement information and field information of the report, generate data retrieval logic data of the report;
[0015] For each of the reports, a sample of the report is obtained from a design file of the report, and a design area of the report is obtained from the design file, each design element in the design area is extracted, and based on the sample of the report and each design element, sample element data of the report is generated.
[0016] Optionally, the method described above, based on the data acquisition logic data and table sample element data of each report, obtains the clustering data of each report, including:
[0017] Determine the attributes of each cluster;
[0018] For each of the reports, the attribute data of the report at each of the cluster attributes is acquired from the data acquisition logic data and the table sample element data of the report, and the cluster data of the report is generated based on each of the attribute data.
[0019] Optionally, in the above method, clustering the reports based on the clustering data of the reports to obtain clustering results includes:
[0020] The clustering data of each report is input into a preset clustering model, so that the clustering model processes each report according to each clustering data and outputs a clustering result, wherein the clustering result includes multiple report sets, and each report set includes at least one report.
[0021] In the above method, optionally, based on the clustering result, merging the reports to obtain a merged report set includes:
[0022] Acquire each report set in the clustering result, wherein the report set includes at least one report;
[0023] For each of the report sets, determining whether the number of reports in the report set is greater than 1;
[0024] When the number of reports in the report set is not greater than 1, determining the reports in the report set as consolidated reports of the report set;
[0025] When the number of reports in the report set is greater than 1, the data acquisition logic data and table sample element data of each report in the report set are merged to obtain a merged report of the report set;
[0026] A combined report set is generated that includes combined reports of each of the report sets.
[0027] A report migration device, comprising:
[0028] A first acquisition unit is used to acquire a report set to be migrated, wherein the report set to be migrated includes various reports;
[0029] A second acquisition unit is used to acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report;
[0030] A third acquisition unit, used for acquiring clustering data of each report based on the data acquisition logic data and table sample element data of each report;
[0031] A clustering processing unit, configured to perform clustering processing on each of the reports based on the clustering data of each of the reports to obtain a clustering result;
[0032] The merging processing unit is used to merge the reports based on the clustering result to obtain a merged report set, wherein the merged report set includes the merged reports obtained after the merging process, and migrate the merged report set to a target report system.
[0033] In the above device, optionally, the second acquisition unit executes a process of extracting data acquisition logic data and table sample element data of each report from the design file of each report, including:
[0034] Extracting query statement information from the design file of each report using a preset logical extraction method;
[0035] Using a preset field reading method to extract field information in the design file of each report;
[0036] For each of the reports, based on the query statement information and field information of the report, generate data retrieval logic data of the report;
[0037] For each of the reports, a sample of the report is obtained from a design file of the report, and a design area of the report is obtained from the design file, each design element in the design area is extracted, and based on the sample of the report and each design element, sample element data of the report is generated.
[0038] In the above device, optionally, the third acquisition unit executes a process of acquiring clustering data of each report based on the data acquisition logic data and table sample element data of each report, including:
[0039] Determine the attributes of each cluster;
[0040] For each of the reports, the attribute data of the report at each of the cluster attributes is acquired from the data acquisition logic data and the table sample element data of the report, and the cluster data of the report is generated based on each of the attribute data.
[0041] In the above device, optionally, the cluster processing unit performs cluster processing on each report based on the cluster data of each report to obtain a clustering result, including:
[0042] The clustering data of each report is input into a preset clustering model, so that the clustering model processes each report according to each clustering data and outputs a clustering result, wherein the clustering result includes multiple report sets, and each report set includes at least one report.
[0043] In the above device, optionally, the merging processing unit performs a process of merging the reports based on the clustering result to obtain a merged report set, including:
[0044] Acquire each report set in the clustering result, wherein the report set includes at least one report;
[0045] For each of the report sets, determining whether the number of reports in the report set is greater than 1;
[0046] When the number of reports in the report set is not greater than 1, determining the reports in the report set as consolidated reports of the report set;
[0047] When the number of reports in the report set is greater than 1, the data acquisition logic data and table sample element data of each report in the report set are merged to obtain a merged report of the report set;
[0048] A combined report set is generated that includes combined reports of each of the report sets.
[0049] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the report migration method as described above.
[0050] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the report migration method as described above.
[0051] Compared with the prior art, this application has the following advantages:
[0052] The present application provides a report migration method and device, storage medium and electronic device, including: obtaining a report set to be migrated, the report set to be migrated includes various reports; obtaining the design file of each report in the report set to be migrated, and extracting the data acquisition logic data and table sample element data of each report from the design file of each report; obtaining the clustering data of each report based on the data acquisition logic data and table sample element data of each report; clustering the various reports based on the clustering data of each report to obtain clustering results; merging the various reports based on the clustering results to obtain a merged report set, the merged report set includes various merged reports obtained after merging, and migrating the merged report set to the target report system. Before migrating the reports, merge the reports to merge multiple reports that can be merged into one report, effectively reducing the number of reports to be migrated, reducing manual participation in the migration process, and reducing the cost of migrating reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 A process of a report migration method provided in an embodiment of the present application;
[0055] Figure 2 A flowchart for extracting data acquisition logic data and table sample element data of each report from the design files of each report provided in the embodiment of the present application;
[0056] Figure 3 An example diagram of the types of fields provided for embodiments of the present application;
[0057] Figure 4 A flowchart of merging various reports based on clustering results to obtain a merged report set provided in an embodiment of the present application;
[0058] Figure 5 A flowchart of another report migration provided in an embodiment of the present application;
[0059] Figure 6 A structural diagram of a report migration device provided in an embodiment of the present application;
[0060] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0063] Terminology explanation:
[0064] Report: A report that presents data in the form of tables or graphs; it is usually used in banks to present operating conditions, capital status, and financial success.
[0065] Reporting tools: Software used to design and generate reports, available in open source and commercial formats.
[0066] Rpt: A report design file type. After the report is designed by a reporting tool, it is in a special storage format and can be opened and edited through a special client.
[0067] Table template: The format of a report, which is used to define the text, symbols or numbers required for an empty table with no data.
[0068] Data acquisition logic: extract data from the data source and convert it into analyzable data.
[0069] SQL: Structured Query Language is a database query and programming language used to access data and query, update, and manage relational database systems.
[0070] XML: An Extensible Markup Language, a subset of Standard Generalized Markup Language, is a markup language used to mark up electronic documents to give them a structure.
[0071] JAVA: An object-oriented computer programming language.
[0072] Interface: The system's external interface, used by external users to read or write information to the server to achieve the purpose of data sharing.
[0073] Model: A mathematical model that uses methods from fields such as mathematics, statistics, and machine learning to analyze, process, predict, and optimize data with certain regularity and predictability.
[0074] Reports have always been an important data display tool for banks to reflect their financial status and operating capabilities, and provide services for corporate business decisions and regulatory reporting. With the development of business and the accumulation of time, a large number of business decision-making reports have accumulated in the banking system. With the domestic technological innovation in recent years, new reporting tools have also been introduced and used more frequently. These new reporting tools can respond to market and regulatory needs more quickly, and the display styles are also richer and more diverse. However, maintaining multiple reporting tools at the same time is a big challenge for business personnel and developers. Therefore, it is necessary to migrate the existing reports to the new reporting tool, including the data acquisition logic and table samples of the reports, to meet the usage needs of the business inventory. Due to the large number of existing reports, migration requires huge manpower costs.
[0075] In order to solve the problems mentioned above and in the background technology, the present application provides a report migration solution, which obtains a set of reports to be migrated, obtains the design files of each report in the set of reports to be migrated, and extracts the data acquisition logic data and table sample element data of each report from the design files of each report; based on the data acquisition logic data and table sample element data of each report, obtains the clustering data of each report; based on the clustering data of each report, clusters each report to obtain a clustering result; based on the clustering result, merges each report to obtain a merged report set, and the merged report set contains each merged report obtained after the merge process, and migrates the merged report set to the target report system. Therefore, when migrating reports, the reports are merged first, and then the merged reports are migrated, which reduces the number of reports that need to be migrated, effectively reduces the computing resources required to migrate reports, and reduces manual participation in the migration process, reducing the cost required for report migration.
[0076] The present invention can be used in many general or special computing device environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc. Preferably, the solution provided by the present application can be used to migrate bank statements, that is, the solution provided by the present application can be applied in banking systems.
[0077] Reference Figure 1 , which is a process of a report migration method provided in an embodiment of the present application, and the relevant description is as follows:
[0078] S101. Obtain a report set to be migrated, where the report set to be migrated includes various reports.
[0079] First, determine the scope of reports to be migrated, and obtain the report set to be migrated based on the report range to be migrated. Further, determine all reports in all systems within the report range to be migrated as reports that need to be migrated, that is, the report set to be migrated includes reports in all systems within the report range to be migrated.
[0080] S102: Obtain the design file of each report in the report set to be migrated, and extract data acquisition logic data and table sample element data of each report from the design file of each report.
[0081] When obtaining the design file of each report in the report set to be migrated, you can use the reportReportClientDocument class interface to read the design file of each report in the report set to be migrated.
[0082] It should be noted that the design file is directly opened with a text tool as garbled text, which cannot be directly read and understood by humans. It needs to be read and parsed through the interface tool provided by the report tool. You can also use the rpt to xml tool to directly convert the rpt file into an understandable file and directly parse the xml file to achieve the purpose of extracting data acquisition logic and table samples. This application uses the interface tool provided by the report tool to parse the design file. The specific process is as follows Figure 2 shown.
[0083] Reference Figure 2 , which is a flowchart of extracting data acquisition logic data and table sample element data of each report from the design file of each report provided in the embodiment of the present application, and is specifically described as follows:
[0084] S201. Use a preset logical extraction method to extract query statement information in the design file of each report.
[0085] Preferably, the logic extraction method here may be a getDatabaseController method. For each report, the query statement information of the report is obtained from the design file of the report through the getDatabaseController method. The query statement information may be the query SQL of the report.
[0086] S202: Use a preset field reading method to extract field information in the design file of each report.
[0087] Preferably, the field reading method may be a getDataDefinition method, and for each report, the getDataDefinition method is used to read the field information of the report from the design file of the report, and the field information includes multiple fields. Furthermore, each field can be regarded as a logical element for obtaining data of the report.
[0088] Furthermore, after obtaining the field information of the report, the type of each field in the field information may be determined through the getKind method. For example, the type of the field may be a database field, a formula field, a parameter field, and the like.
[0089] S203: For each report, generate the data retrieval logic data of the report based on the query statement information and field information of the report.
[0090] Each report has corresponding data retrieval logic data. Preferably, the data retrieval logic element includes query statement information, field information, and the type of each field in the field information of the report.
[0091] Reference Figure 3 , which is an example diagram of the types of fields provided in an embodiment of the present application. As shown in the figure, the types of fields are divided into database fields, formula fields and parameter fields, among which database fields include fields such as business type, customer number, currency and beneficiary; formula fields include but are not limited to fields such as summary amount, year-on-year amount and month-on-month amount; parameter fields include but are not limited to fields such as date range and query currency.
[0092] S204. For each report, obtain the report template from the report design file, obtain the report design area from the design file, extract each design element in the design area, and generate report template element data based on the report template and each design element.
[0093] Preferably, for each report, the getReportDefinition method can be used to obtain the report template from the report design file, the getSections method can be used to read the report design area from the report design file, and then the getReportObjects method can be used to traverse and extract the various design elements in the design area, thereby extracting the display domain, type, and location information in the template. Furthermore, the design area includes but is not limited to the header, detail page, and footer areas.
[0094] Each report has table element data, which includes the report's table template and various design elements.
[0095] The present application processes the design files of the report using various methods, and can quickly read out the data acquisition logic data and table sample element data required for subsequent reconstruction of the report.
[0096] S103: Based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained.
[0097] The process of obtaining clustering data for each report is as follows: determining each clustering attribute; for each report, obtaining attribute data of each clustering attribute of the report from the data acquisition logic data and table sample element data of the report, and generating clustering data of the report based on each attribute data.
[0098] The report's SQL, database fields, formula fields, page headers, and details can be used as clustering attributes. Furthermore, each clustering attribute can be considered as the input field of the clustering.
[0099] The cluster data for a report contains the attribute data for each cluster attribute in the report.
[0100] S104: Based on the clustering data of each report, cluster processing is performed on each report to obtain a clustering result.
[0101] The clustering data of each report is input into a preset clustering model, so that the clustering model processes each report according to each clustering data and outputs a clustering result, wherein the clustering result includes multiple report sets, and each report set includes at least one report.
[0102] Preferably, the clustering data of each report is processed using a clustering model to obtain the similarity between each report, and then each report is clustered according to the similarity between each report. The clustering results are output by continuously iterating the clustering of each report until the clustering model converges.
[0103] The clustering algorithm used in the clustering model of the present application may be a hierarchical clustering algorithm, a BIRCH algorithm, etc., which will not be described in detail here.
[0104] The clustering model clusters reports with high similarity and more likely to be merged into one report set; the clustering effect includes multiple report sets, each report set includes at least one report, and further, the similarity values of the reports in the same report set are very high.
[0105] S105 . Based on the clustering result, each report is merged to obtain a merged report set, wherein the merged report set includes each merged report obtained after the merge process, and the merged report set is migrated to the target report system.
[0106] Reference Figure 4 , which is a flowchart of merging various reports based on clustering results to obtain a merged report set provided in an embodiment of the present application, and is specifically described as follows:
[0107] S301: Acquire each report set in the clustering result, where the report set contains at least one report.
[0108] S302, for each report set, determine whether the number of reports in the report set is greater than 1; when the number of reports in the report set is not greater than 1, execute S303; when the number of reports in the report set is greater than 1, execute S304.
[0109] S303: Determine the reports in the report set as the consolidated reports of the report set.
[0110] When there is only one report in the report set, it means there are no other similar reports. In this case, there is no need to process the report and the report can be directly determined as a consolidated report.
[0111] S304: Merge the data acquisition logic data and table sample element data of each report in the report set to obtain a merged report of the report set.
[0112] It should be noted that the process of merging the data acquisition logic data and table sample element data of each report in the report set is equivalent to the process of reconstructing each report in the report set, thereby obtaining a reconstructed report, which is a merged report. By summarizing the data acquisition logic data and table sample element data of each report in the report set, taking the maximum value, merging or deduplicating the same content, a new report is formed, namely a merged report.
[0113] Furthermore, when a report set contains multiple reports, the report set can be fed back to the staff first so that the staff can mark the reports in the report set that can be merged, and then the processor merges the marked reports to obtain a merged report of the report set. At this time, the number of merged reports obtained is at least one, and there may be more than one.
[0114] Preferably, when a report set includes multiple reports, it can be considered that the reports in the report set can be merged, and the reports in the report set are merged.
[0115] S305: Generate a consolidated report set including consolidated reports of each report set.
[0116] Combine the consolidated reports of each report set into a consolidated report set.
[0117] After obtaining the merged report set, the merged report set is migrated to the target report system. Furthermore, the target report system can be understood as a new system, and the system used when obtaining the report set to be migrated can be regarded as an old system.
[0118] This application clusters each report to obtain multiple report sets, and merges each report in each report set to obtain a new report. By merging reports, the structure and format of the report can be improved to make it clearer, more accurate and readable. This helps users understand the report content more quickly and improves the efficiency of data use. Merging reports can simplify the complexity of report migration. By merging multiple reports into one comprehensive report, the number of reports that need to be migrated can be reduced, thereby reducing the difficulty and time cost of the migration work. Merging reports helps ensure data consistency. During the migration process, if there is data intersection or overlap between multiple reports, merging reports can avoid data duplication or omissions and ensure the integrity and accuracy of the data.
[0119] In the method provided in the embodiment of the present application, a report set to be migrated is obtained, and each report is included in the report set to be migrated; the design file of each report in the report set to be migrated is obtained, and the data acquisition logic data and table sample element data of each report are extracted from the design file of each report; based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained; based on the clustering data of each report, each report is clustered to obtain a clustering result; based on the clustering result, each report is merged to obtain a merged report set, and the merged report set contains each merged report obtained after the merge process, and the merged report set is migrated to the target report system. Before migrating the reports, the reports are merged to merge multiple reports that can be merged into one report, which effectively reduces the number of reports to be migrated, reduces manual participation in the migration process, and reduces the cost required for migration.
[0120] Reference Figure 5 , is a flowchart of another report migration provided in an embodiment of the present application, and the specific description is as follows:
[0121] 1. First, determine the report scope of this migration process.
[0122] 2. Use the report ReportClientDocument class interface to read the report design file.
[0123] 3. Extract the data retrieval logic through the getDatabaseController method to obtain the query SQL of the report; read the field information of the report through the getDataDefinition method, and determine the type of the field through the getKind method, such as database field, formula field, and parameter field, etc. Figure 3 As shown, no further description is given here.
[0124] 4. Get the report template through the getReportDefinition method, read the report design area, such as the header, details, and footer area, through the getSections method, and then traverse the elements in the area through getReportObjects to extract the display field, type, and location information in the template.
[0125] 5. Use the clustering model to process the data of each report, calculate the similarity of the report, cluster the report, and output the report clustering results. For reports with high similarity in the report clustering results, determine whether they can be deduplicated. If so, merge the reports to obtain a new report. If they cannot be deduplicated, mark them as not deduplicated and cluster the reports again. For reports with low similarity in the report clustering results, directly determine them as unmerged reports. Thus, through continuous iteration, the reports that can be merged can be merged.
[0126] Furthermore, Figure 5 The unconsolidated financial statements and the new financial statements shown in the report can be regarded as the consolidated financial statements mentioned above.
[0127] Figure 5 The dedupe model shown can be a clustering model. In the process of clustering reports, since the parameter fields and footers of each report are similar, they are not used as the input of the model to avoid interference. At the same time, the element position is not a key factor in report design and is also removed from the model input. Finally, the sql, database field, formula field, header and details of each report are selected as input fields, the reports are clustered, the similarity values are calculated, and the reports with high similarity are grouped together. The higher the similarity value of the reports in a cluster, the more likely the reports are to be merged.
[0128] 6. Manually confirm the reports that need to be merged, and organize and summarize the data acquisition logic and table samples of the reports that are confirmed to be merged, take the largest set, and form a new report; add the reports that are determined to be unmerged to finally form the report set to be migrated.
[0129] 7. According to the interface of the new reporting tool, use the XML file generation function provided by the DocumentHelper class to generate the report data acquisition logic and table sample to the XML format required by the interface.
[0130] 8. The Java code calls the interface of the new reporting tool, and inserts the data acquisition logic data and table samples in XML format into the new reporting system in batches to form a new report file, which is finally displayed to business users.
[0131] This application provides a method for automated report migration, which can overcome differences in technology stacks and vendors, save a lot of manpower in switching between old and new report platforms, and avoid possible mistakes caused by manual operations through automated migration. At the same time, it optimizes and merges redundant reports, saving subsequent operation and maintenance workload. The solution provided by this application can continue to provide users with continuous reporting services with richer functions and more diverse display forms as technology continues to innovate.
[0132] The present application provides a solution for parsing, reconstructing and migrating reports. By using Java code, the rpt file of the old report is automatically parsed to extract the data acquisition logic and table sample elements in the design file; the parsed report elements are clustered through a similarity comparison algorithm. For reports with high similarity, the technical staff will preliminarily judge the feasibility of merging, and then the business will confirm the feasibility of merging the reports that need to be merged, and the data acquisition logic and table sample will be reintegrated; the determined report elements are automatically inserted into the new report platform in batches by calling the interface of the new report tool, so that the report can be migrated quickly, the manual participation can be reduced, and the cost of report migration can be reduced.
[0133] Although the present invention depicts operations in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.
[0134] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0135] and Figure 1 Corresponding to the method shown, the present application also provides a report migration device, which is used to support Figure 1 In a specific implementation of the method shown, the device is set in a processor or a server.
[0136] Reference Figure 6 , is a structural diagram of a report migration device provided in an embodiment of the present application, and is specifically described as follows:
[0137] The first acquisition unit 501 is used to acquire a report set to be migrated, wherein the report set to be migrated includes various reports;
[0138] The second acquisition unit 502 is used to acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report;
[0139] The third acquisition unit 503 is used to acquire the clustering data of each report based on the data acquisition logic data and the table sample element data of each report;
[0140] A clustering processing unit 504, configured to perform clustering processing on each of the reports based on the clustering data of each of the reports to obtain a clustering result;
[0141] The merging processing unit 505 is used to merge the reports based on the clustering result to obtain a merged report set, wherein the merged report set includes the merged reports obtained after the merging process, and migrate the merged report set to a target report system.
[0142] In the device provided in the embodiment of the present application, a report set to be migrated is obtained, which includes various reports; the design file of each report in the report set to be migrated is obtained, and the data acquisition logic data and table sample element data of each report are extracted from the design file of each report; based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained; based on the clustering data of each report, each report is clustered to obtain a clustering result; based on the clustering result, each report is merged to obtain a merged report set, and the merged report set includes each merged report obtained after the merge process, and the merged report set is migrated to the target report system. Before migrating the reports, the reports are merged to merge multiple reports that can be merged into one report, which effectively reduces the number of reports to be migrated, reduces manual participation in the migration process, and reduces the cost of migrating reports.
[0143] In another embodiment provided by the present application, the second acquisition unit of the device performs a process of extracting data acquisition logic data and table sample element data of each report from the design file of each report, including:
[0144] Extracting query statement information from the design file of each report using a preset logical extraction method;
[0145] Using a preset field reading method to extract field information in the design file of each report;
[0146] For each of the reports, based on the query statement information and field information of the report, generate data retrieval logic data of the report;
[0147] For each of the reports, a sample of the report is obtained from a design file of the report, and a design area of the report is obtained from the design file, each design element in the design area is extracted, and based on the sample of the report and each design element, sample element data of the report is generated.
[0148] In another embodiment provided by the present application, the third acquisition unit of the device executes a process of acquiring clustering data of each report based on the data acquisition logic data and the table sample element data of each report, including:
[0149] Determine the attributes of each cluster;
[0150] For each of the reports, the attribute data of the report at each of the cluster attributes is acquired from the data acquisition logic data and the table sample element data of the report, and the cluster data of the report is generated based on each of the attribute data.
[0151] In another embodiment provided by the present application, the cluster processing unit of the device performs cluster processing on each of the reports based on the cluster data of each of the reports to obtain a clustering result, including:
[0152] The clustering data of each report is input into a preset clustering model, so that the clustering model processes each report according to each clustering data and outputs a clustering result, wherein the clustering result includes multiple report sets, and each report set includes at least one report.
[0153] In another embodiment provided by the present application, the merging processing unit of the device performs a process of merging the reports based on the clustering result to obtain a merged report set, including:
[0154] Acquire each report set in the clustering result, wherein the report set includes at least one report;
[0155] For each of the report sets, determining whether the number of reports in the report set is greater than 1;
[0156] When the number of reports in the report set is not greater than 1, determining the reports in the report set as consolidated reports of the report set;
[0157] When the number of reports in the report set is greater than 1, the data acquisition logic data and table sample element data of each report in the report set are merged to obtain a merged report of the report set;
[0158] A combined report set is generated that includes combined reports of each of the report sets.
[0159] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned report migration method.
[0160] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 7 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to perform the following operations:
[0161] Obtaining a set of reports to be migrated, wherein the set of reports to be migrated includes various reports;
[0162] Acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report;
[0163] Based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained;
[0164] Based on the clustering data of each of the reports, clustering processing is performed on each of the reports to obtain a clustering result;
[0165] Based on the clustering result, each of the reports is merged to obtain a merged report set, wherein the merged report set includes each merged report obtained after the merge process, and the merged report set is migrated to a target report system.
[0166] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards in the relevant regions.
[0167] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0168] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0169] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0170] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A report migration method, characterized in that: include: Obtaining a set of reports to be migrated, wherein the set of reports to be migrated includes various reports; Acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report; Based on the data acquisition logic data and table sample element data of each report, the clustering data of each report is obtained; Based on the clustering data of each of the reports, clustering processing is performed on each of the reports to obtain a clustering result; Based on the clustering result, each of the reports is merged to obtain a merged report set, wherein the merged report set includes each merged report obtained after the merge process, and the merged report set is migrated to a target report system.
2. The method according to claim 1, characterized in that The step of extracting the data acquisition logic data and table sample element data of each report from the design file of each report includes: Using a preset logical extraction method to extract query statement information in the design file of each report; Using a preset field reading method to extract field information in the design file of each report; For each of the reports, based on the query statement information and field information of the report, generate data retrieval logic data of the report; For each of the reports, a sample of the report is obtained from a design file of the report, and a design area of the report is obtained from the design file, each design element in the design area is extracted, and based on the sample of the report and each design element, sample element data of the report is generated.
3. The method according to claim 1, characterized in that The step of acquiring clustering data of each report based on the data acquisition logic data and table sample element data of each report includes: Determine the attributes of each cluster; For each of the reports, the attribute data of the report at each of the cluster attributes is acquired from the data acquisition logic data and the table sample element data of the report, and the cluster data of the report is generated based on each of the attribute data.
4. The method according to claim 1, characterized in that The clustering data based on each of the reports, performing clustering processing on each of the reports to obtain a clustering result, includes: The clustering data of each report is input into a preset clustering model, so that the clustering model processes each report according to each clustering data and outputs a clustering result, wherein the clustering result includes multiple report sets, and each report set includes at least one report.
5. The method according to claim 1, characterized in that Based on the clustering result, each of the reports is merged to obtain a merged report set, including: Acquire each report set in the clustering result, wherein the report set includes at least one report; For each of the report sets, determining whether the number of reports in the report set is greater than 1; When the number of reports in the report set is not greater than 1, determining the reports in the report set as consolidated reports of the report set; When the number of reports in the report set is greater than 1, the data acquisition logic data and table sample element data of each report in the report set are merged to obtain a merged report of the report set; A combined report set is generated that includes combined reports of each of the report sets.
6. A report migration device, characterized in that: include: A first acquisition unit is used to acquire a report set to be migrated, wherein the report set to be migrated includes various reports; A second acquisition unit is used to acquire the design file of each report in the report set to be migrated, and extract the data acquisition logic data and table sample element data of each report from the design file of each report; A third acquisition unit, used for acquiring clustering data of each report based on the data acquisition logic data and table sample element data of each report; A clustering processing unit, configured to perform clustering processing on each of the reports based on the clustering data of each of the reports to obtain a clustering result; The merging processing unit is used to merge the reports based on the clustering result to obtain a merged report set, wherein the merged report set includes the merged reports obtained after the merging process, and migrate the merged report set to a target report system.
7. The device according to claim 6, characterized in that The second acquisition unit performs a process of extracting data acquisition logic data and table sample element data of each report from the design file of each report, including: Using a preset logical extraction method to extract query statement information in the design file of each report; Using a preset field reading method to extract field information in the design file of each report; For each of the reports, based on the query statement information and field information of the report, generate data retrieval logic data of the report; For each of the reports, a sample of the report is obtained from a design file of the report, and a design area of the report is obtained from the design file, each design element in the design area is extracted, and based on the sample of the report and each design element, sample element data of the report is generated.
8. The device according to claim 6, characterized in that The third acquisition unit executes a process of acquiring clustering data of each report based on the data acquisition logic data and the table sample element data of each report, including: Determine the attributes of each cluster; For each of the reports, the attribute data of the report at each of the cluster attributes is acquired from the data acquisition logic data and the table sample element data of the report, and the cluster data of the report is generated based on each of the attribute data.
9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the report migration method according to any one of claims 1 to 5.
10. An electronic device, characterized in that: The system comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the report migration method according to any one of claims 1 to 5.