CN112667630A - Method, device, equipment and storage medium for integrating business report - Google Patents

Method, device, equipment and storage medium for integrating business report Download PDF

Info

Publication number
CN112667630A
CN112667630A CN202011549416.0A CN202011549416A CN112667630A CN 112667630 A CN112667630 A CN 112667630A CN 202011549416 A CN202011549416 A CN 202011549416A CN 112667630 A CN112667630 A CN 112667630A
Authority
CN
China
Prior art keywords
business
report
reports
script
business report
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011549416.0A
Other languages
Chinese (zh)
Other versions
CN112667630B (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 CN202011549416.0A priority Critical patent/CN112667630B/en
Priority to PCT/CN2021/084534 priority patent/WO2022134363A1/en
Publication of CN112667630A publication Critical patent/CN112667630A/en
Application granted granted Critical
Publication of CN112667630B publication Critical patent/CN112667630B/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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for integrating business reports, wherein the method comprises the following steps: searching a source database in which a business report is stored; reading base table information in each source database, and generating a data dictionary according to the base table information; generating acquisition scripts respectively corresponding to all the business reports according to the data dictionary, and acquiring task scripts for operating all the business reports according to all the acquisition scripts; recursively analyzing each task script to obtain a coupling relation between each business report; and acquiring the business report forms in each source database, and storing each business report form and the coupling relation between the business report forms to obtain the target database. The invention has the beneficial effects that: therefore, the target database not only has all the business reports in each source database, but also retains the coupling relation among all the business reports in the source database.

Description

Method, device, equipment and storage medium for integrating business report
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for integrating business reports.
Background
A database is also called a data management system, and is a data set in which processed data are stored together in a certain manner, so that redundancy can be reduced as much as possible by sharing the data with a plurality of users. When storing business data, due to the limitation of databases or when developers develop different functions, the same kind of business data may be stored in a plurality of databases respectively, and the databases need to be traversed during retrieval, so that the retrieval process is very complicated. Even some business data will be stored repeatedly, wasting storage space, so a method for integrating business reports is urgently needed.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for integrating business reports, and aims to solve the problem that the retrieval process is very complicated because each database needs to be traversed during retrieval.
The invention provides a method for integrating business reports, which comprises the following steps:
searching a source database in which a business report is stored;
reading base table information in each source database, and generating a data dictionary according to the base table information, wherein the data dictionary records position information of each business report;
generating acquisition scripts respectively corresponding to all the business reports according to the data dictionary, and acquiring task scripts for operating all the business reports according to all the acquisition scripts;
recursively analyzing each task script to obtain a coupling relation between each business report;
and acquiring the business reports in each source database, and storing each business report and the coupling relation between each business report to a target database.
Further, the step of recursively analyzing each task script to obtain the coupling relationship between the business reports includes:
acquiring one or more SQL sentences involved in the task script;
detecting the business report executed in each SQL statement and whether the SQL statement can be executed or not;
performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
analyzing the target task script, and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
and recursively analyzing the calculation functions in the steps of the working stack to obtain the coupling relation between the business reports.
Further, the step of storing each business report and the coupling relationship between each business report to a target database includes:
acquiring form information of each business report;
sorting out a hierarchy rule according to the table information;
dividing each business report into different levels according to the level rules;
performing cluster analysis on the business reports of the same level, and assigning the same label to the business reports of the same type according to the analysis result;
and storing each business report to the target database in a classified manner according to the label of each business report, and storing the coupling relation among the business reports.
Further, the step of storing each business report and the coupling relationship between each business report to a target database further includes:
acquiring script information of the task script; the script information at least comprises a script path, an operation type and a related associated business report;
analyzing the script information to obtain the occurrence times and vertex information of each associated business report;
setting corresponding weight for each associated business report according to the occurrence frequency of each associated business report;
and setting the vertex information as a main key of the associated business report, setting the weight as a vertex attribute of the associated business report for storage, and storing the coupling relation between the business reports.
Further, after the step of obtaining the business report form in each source database and storing each business report form and the coupling relationship between each business report form in the target database, the method further includes:
detecting an intermediate temporary table in each business report according to a set detection rule;
acquiring a first report form having a blood relationship with the intermediate temporary table and a second report form having a relationship with the intermediate temporary table; the first report and the second report are both the business report;
directly establishing the coupling relation between the first report and the second report according to the coupling relation between the intermediate temporary table and the second report;
deleting the intermediate temporary table to establish a knowledge graph of the target database.
Further, the step of parsing the target task script and establishing a work stack includes:
converting the target task script into an ASTNode abstract syntax tree;
traversing the depth of the ASTNode abstract syntax tree, and analyzing an output and input table and a condition judgment statement of the ASTNode abstract syntax tree;
and setting an execution scheme of the ASTNode abstract syntax tree according to the output input table and the condition judgment statement to obtain the working stack.
The invention also provides a device for integrating the business report, which comprises:
the searching module is used for searching a source database in which the business report is stored;
the reading module is used for reading the base table information in each source database and generating a data dictionary according to the base table information, wherein the data dictionary records the position information of each service report;
the generating module is used for generating the acquisition scripts corresponding to the business reports respectively according to the data dictionary and acquiring the task scripts for operating the business reports according to the acquisition scripts;
the acquisition module is used for recursively analyzing each task script to acquire the coupling relation between the business reports;
and the storage module is used for acquiring the business reports in the source databases, and storing the business reports and the coupling relation among the business reports to obtain the target database.
Further, the obtaining module comprises:
the acquisition submodule is used for acquiring one or more SQL sentences related in the task script;
the detection submodule is used for detecting the business report included in each SQL statement and whether the SQL statement can be executed or not;
the processing submodule is used for performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
the establishing submodule is used for analyzing the target task script and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
and the analysis submodule is used for recursively calling the calculation functions of all the steps according to the working stack to carry out analysis so as to obtain the coupling relation between the business reports.
The invention also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of any of the above methods when the processor executes the computer program.
The invention also provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method of any of the above.
The invention has the beneficial effects that: and acquiring the corresponding task script by setting the acquisition script, analyzing the coupling relation among the service reports, and acquiring the service reports stored in the source databases and the coupling relation among the service reports. The method and the system have the advantages that all the service reports in each source database are available in the target database, the coupling relation among the service reports in the source databases is reserved, and related personnel can obtain and traverse the retrieval results in the source databases without traversing a plurality of source databases when retrieving in the target database.
Drawings
FIG. 1 is a flowchart illustrating a method for integrating business reports according to an embodiment of the present invention;
FIG. 2 is a block diagram illustrating a structure of an apparatus for integrating business reports according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship between the components, the motion situation, etc. in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly, and the connection may be a direct connection or an indirect connection.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, the present invention provides a method for integrating business reports, including:
s1: searching a source database in which a business report is stored;
s2: reading base table information in each source database, and generating a data dictionary according to the base table information; the data dictionary records the position information of each business report;
s3: generating acquisition scripts respectively corresponding to all the business reports according to the data dictionary, and acquiring task scripts for operating all the business reports according to all the acquisition scripts;
s4: recursively analyzing each task script to obtain a coupling relation between each business report;
s5: and acquiring the business reports in each source database, and storing each business report and the coupling relation between each business report to a target database.
As described in the above step S1, the source database storing the business report is searched. The method for acquiring the business data report includes acquiring header information of a needed business report, and reading base table information in each initial database according to an automation script set by the header information. The setting of the automation script can be set by a developer according to the header information.
As described in step S2, the database table information in each source database is read, and a data dictionary is generated according to each database table information. The reading mode can be that the base table information in the initial database is read according to the automation script, the source database with the service report is screened out, and the base table information in the source database is obtained, wherein the base table information is the directory of different data tables. The database generally establishes base table information so as to conveniently inquire corresponding data, if the base table information does not exist, the base table information can be acquired in a traversal mode, then a corresponding data dictionary is generated according to the base table information, and the data dictionary comprises the position of the database stored in each business report and the position information in the database. In some embodiments, there may be a certain service form existing in two source databases at the same time, so duplicate checking may be performed before establishing the data dictionary according to the inventory information of each source database, that is, whether there is a same new service report is detected, and if there is a new service report, only one of the service reports may be acquired, so as to avoid the problem of data duplication.
As described in step S3, the obtaining scripts corresponding to the business reports are generated according to the data dictionary, and the task script for operating each business report is obtained according to each obtaining script. The task script can exist in a source database, or in a third-party channel such as a third client, and can be obtained by obtaining the script to the set position. And setting a plurality of corresponding acquisition scripts according to the data dictionary, wherein the acquisition scripts are required to acquire task scripts related to the business report besides the corresponding business report. The task scripts are task scripts for operating the service report, that is, the condition that the service report is used can be known by obtaining the service report for operating the service report, and the condition that each service report is called in the source database, that is, the coupling relationship between each task script and another service report can also be known.
As described in the above step S4, each task script is recursively analyzed to obtain a coupling relationship between the business reports. Because the execution process of the task script may be very complex, and it may be difficult to obtain the final result by direct parsing, the execution steps of each task script may be obtained, and the final result is obtained by a reverse recursion manner, that is, the recursion parsing of each task script.
As described in step S5, the business report in each source database is obtained, and each business report and the coupling relationship between the business reports are stored, so as to obtain the target database. And storing the obtained service report in each source database and the analyzed coupling relation between the service reports. Therefore, the obtained target database not only contains all the service reports in each source database, but also keeps the coupling relation among the service reports in the source databases, so that relevant personnel can obtain and traverse the retrieval results in the plurality of source databases without traversing the plurality of source databases when retrieving in the target database.
In one embodiment, the step S4 of recursively parsing each task script to obtain a coupling relationship between the business reports includes:
s401: acquiring one or more SQL sentences involved in the task script;
s402: detecting the business report executed in each SQL statement and whether the SQL statement can be executed or not;
s403: performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
s404: analyzing the target task script, and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
s405: and recursively analyzing the calculation functions in the steps of the working stack to obtain the coupling relation between the business reports.
As described above in steps S401-S405, recursive parsing of task scripts is implemented. The task script includes at least one SQL (Structured Query Language) statement, and the corresponding task in the task script is completed. Specifically, a business report executed in an SQL statement is detected (it should be noted that the SQL statement does not include a business report, and only includes execution commands such as processing and calling on each business report), since the obtained SQL statement often includes instructions, special functions, custom functions, dynamic parameters, and the like, so that the SQL statement is not executable, the unexecutable statement needs to be changed into an executable statement through operations such as a replacement function or parameter constant quantization, and the operations can be automatically completed by setting a corresponding program, but if an unexecutable statement that cannot be automatically processed is encountered, the unexecutable statement can be extracted separately, and the unexecutable statement is executable by a corresponding technician (generally, the unexecutable statement is also processed through operations such as a replacement function or parameter constant quantization). Therefore, the SQL sentences in the task script can be executed to obtain the target task script. Analyzing the target task script and establishing a working stack, wherein the mode of establishing the working stack can be that a node of the abstract syntax tree is set by combining condition judgment in the target task script through establishing the abstract syntax tree, and then the result of the abstract syntax tree, namely the calling sequence of each business report and how to be executed by SQL, is reversely deduced according to the execution steps of the target task script. The recursive calculation method can convert a large and complex problem into a problem with a smaller scale similar to the original problem layer by layer to solve, and simplifies the operation difficulty.
In one embodiment, the step S404 of parsing the target task script and establishing a production stack includes:
s4041: converting the target task script into an ASTNode abstract syntax tree;
s4042: traversing the depth of the ASTNode abstract syntax tree, and analyzing an output and input table and a condition judgment statement of the ASTNode abstract syntax tree;
s4043: and setting an execution scheme of the ASTNode abstract syntax tree according to the output input table and the condition judgment statement to obtain the working stack.
As described above in steps S4041-S4043, a resume for the production stack is implemented. The target task script is a step which is sequentially executed through condition judgment, and if equivalent exchange of grammars is carried out before, the subsequent steps can be influenced. Therefore, the technical problem brought by the grammar aspect can be solved by adopting the ASTNode abstract syntax tree. Specifically, the target task script is first converted into the astinode abstract syntax tree, and the conversion method may be to judge and set nodes of the tree according to conditions in the target task script, and set branches of the tree according to relationships among the steps, so as to obtain the corresponding astinode abstract syntax tree. Traversing the depth of the ASTNode abstract syntax tree, analyzing an output input table and a condition judgment statement of the ASTNode abstract syntax tree, wherein the depth refers to the complexity of a tree branch, namely the number of steps needing to be carried out, and then analyzing the output input table and the condition judgment statement. And then setting a corresponding execution scheme, namely calculating the result which can be obtained by calculation, returning the result of calculation to the previous node for continuous calculation, and obtaining the corresponding execution scheme by adopting the calculation mode so as to obtain the working stack.
In one embodiment, the step S5 of storing each business report and the coupling relationship between each business report to the target database includes:
s501: acquiring form information of each business report;
s502: sorting out a hierarchy rule according to the table information;
s503: dividing each business report into different levels according to the level rules;
s504: performing cluster analysis on the business reports of the same level, and assigning the same label to the business reports of the same type according to the analysis result;
s505: and storing each business report to the target database in a classified manner according to the label of each business report, and storing the coupling relation among the business reports.
As described in the above steps S501-S505, the classified saving of the business report is realized. The table information of the business report forms is firstly obtained (generally, only a header is obtained), after the table information of each business report form is obtained, a corresponding hierarchy rule can be arranged, the arrangement mode is that the corresponding relation between the table information and the hierarchy is preset, then the hierarchy rule which is suitable for all the business tables is obtained according to the table information, namely, some business report forms can be derived from the content in other business report forms, but the business report forms are generally recorded in the header, therefore, the hierarchy of each business report form can be divided according to the header, each business report form is divided into different hierarchies, then cluster analysis is carried out, the cluster mode can be that a text cluster algorithm (any one of a cluster algorithm based on division, a cluster algorithm based on hierarchy, a cluster algorithm based on density, a cluster algorithm based on grids, a cluster algorithm based on models and a cluster algorithm based on fuzzy), and then, the same labels are given to the business reports of the same type. And subsequently storing each business report and the coupling relation between the business reports in a target database according to the corresponding label.
In one embodiment, the step S5 of storing each business report and the coupling relationship between each business report to the target database includes:
s511: acquiring script information of a task script; the script information at least comprises a script path, an operation type and a related associated business report;
s512: analyzing the script information to obtain the occurrence times and vertex information of each associated business report;
s513: setting corresponding weight for each associated business report according to the occurrence frequency of each associated business report;
s514: and setting the vertex information as a main key of the associated business report, setting the weight as a vertex attribute of the associated business report for storage, and storing the coupling relation between the business reports.
As described in the above steps, the storage of each associated business report is realized. That is, in the target database, each business report is a vertex, and the data content contained in the business report is the vertex attribute. The relationship between the vertex and the vertex is the coupling relationship between the business reports, and the vertex attribute is the basis of the importance of the business report, i.e. in the later retrieval process, if the vertex attribute is better, the vertex can be traversed first. Specifically, script information of a task script is obtained, wherein the script information includes a corresponding script path, an operation type and a related associated business report, and even further includes a data source in script data, a corresponding associated business report and the number of times of occurrence of the associated business report, and vertex information (i.e. information of the business report, including content in the business report and coupling relation with other business reports, etc.) can be obtained according to the script information, a weight is set for the associated business report according to the number of times of occurrence of the associated business report, so as to facilitate subsequent retrieval, it should be understood that the more the number of times of occurrence of the associated business report, the greater the weight is, the less the number of times of occurrence of the associated business report is, the smaller the weight is, and then a main key is set for the associated business report, wherein the main key is an expression form of the associated business report, and may be data obtained by encrypting the script information, or directly using the script information as a main key, and then setting the weight as a vertex attribute for storage, thereby realizing the storage of each business report.
In an embodiment, after the step S5 of acquiring the business report in each source database, and storing each business report and the coupling relationship between each business report in the target database, the method further includes:
s601: detecting an intermediate temporary table in each business report according to a set detection rule;
s602: acquiring a first report form having a blood relationship with the intermediate temporary table and a second report form having a relationship with the intermediate temporary table; the first report and the second report are both the business report;
s603: directly establishing the coupling relation between the first report and the second report according to the coupling relation between the intermediate temporary table and the second report;
s604: deleting the intermediate temporary table to establish a knowledge graph of the target database.
As described above in steps S601-S604, optimization of the target database is achieved. Namely, detecting the intermediate temporary table in each business report according to a set detection rule. Generally, each business report is generated by using the generated basis time as a header, so the set detection rule can be set as a detection header, that is, whether the business report is an intermediate temporary table can be known according to information of the header, and then a first report having a blood relationship with the intermediate temporary table and a second report having an association relationship with the intermediate temporary table are obtained, wherein the obtaining mode is obtained according to the coupling relationship obtained by analysis, that is, the coupling relationship records the relationship between the intermediate temporary table and other business reports. And directly establishing the coupling relationship between the first report and the second report according to the coupling relationship between the intermediate temporary table and the second report, specifically, the label of the intermediate temporary table can be marked as False, and the labels of other business reports can be marked as True, so that the map relationship in the target database comprises four types of False-True, False-False, tube-False and True-True, the coupling relationship between True and True need not to be processed, for False-True, False-False and tube-True, the Pregel graph iterative calculation is performed, and the head-tail relationship is stored into the vertex attribute set every time when meeting True-n number of the Tase-True. And deleting the vertex of False, and directly establishing the relationship between True and True according to the attribute set. Therefore, the knowledge map of the target database is simplified, the user can clearly and visually extract the data with useful value, and the maintenance of the target database is facilitated.
Referring to fig. 2, the present invention further provides a device for integrating business reports, including:
the searching module 10 is used for searching a source database in which the business report is stored;
a reading module 20, configured to read the library table information in each source database, and generate a data dictionary according to each library table information, where the data dictionary records location information of each service report;
the generating module 30 is configured to generate an obtaining script corresponding to each business report according to the data dictionary, and obtain a task script for operating each business report according to each obtaining script;
the obtaining module 40 is configured to recursively analyze each task script to obtain a coupling relationship between the service reports;
the storage module 50 is configured to obtain the business report in each source database, and store each business report and the coupling relationship between each business report in the target database.
In one embodiment, the obtaining module 40 includes:
the acquisition submodule is used for acquiring one or more SQL sentences related in the task script;
the detection submodule is used for detecting the business report executed in each SQL statement and whether the SQL statement can be executed or not;
the processing submodule is used for performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
the establishing submodule is used for analyzing the target task script and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
and the analysis submodule is used for recursively analyzing the calculation functions in each step of the working stack to obtain the coupling relation between the business reports.
In one embodiment, the building submodule includes:
the conversion unit is used for converting the target task script into an ASTNode abstract syntax tree;
the traversal unit is used for traversing the depth of the ASTNode abstract syntax tree and analyzing an output and input table and a condition judgment statement of the ASTNode abstract syntax tree;
and the setting unit is used for setting an execution scheme of the ASTNode abstract syntax tree according to the output input table and the condition judgment statement so as to obtain the working stack.
In one embodiment, the memory module 50 includes:
the table information acquisition submodule is used for acquiring the table information of each business report;
the sorting submodule is used for sorting out a hierarchy rule according to the table information;
the dividing submodule is used for dividing each business report into different levels according to the level rules;
the clustering submodule is used for carrying out clustering analysis on the business reports of the same level and endowing the same type of business reports with the same label according to the analysis result;
and the storage submodule is used for storing each business report to the target database in a classified manner according to the label of each business report and storing the coupling relation among the business reports.
In one embodiment, the storage module 50 further includes:
the script information acquisition submodule is used for acquiring script information of the task script; the script information at least comprises a script path, an operation type and a related associated business report;
the script information analysis submodule is used for analyzing the script information to obtain the occurrence times and the vertex information of each associated business report;
the weight setting submodule is used for setting corresponding weight for each associated business report according to the occurrence frequency of each associated business report;
and the main key setting submodule is used for setting the vertex information as a main key of the associated business report, setting the weight as a vertex attribute of the associated business report for storage, and storing the coupling relation between the business reports.
In one embodiment, the apparatus for integrating business reports further includes:
the intermediate temporary table detection module is used for detecting the intermediate temporary tables in the business report forms according to a set detection rule;
the first report acquisition module is used for acquiring a first report which has a blood relationship with the intermediate temporary table and a second report which has a relationship with the intermediate temporary table; the first report and the second report are both the business report;
the coupling relation establishing module is used for directly establishing the coupling relation between the first report and the second report according to the coupling relation between the intermediate temporary table and the second report;
and the deleting module is used for deleting the intermediate temporary table to establish the knowledge graph of the target database.
The invention has the beneficial effects that: and acquiring the corresponding task script by setting the acquisition script, analyzing the coupling relation among the service reports, and acquiring the service reports stored in the source databases and the coupling relation among the service reports. The method and the system have the advantages that all the service reports in each source database are available in the target database, the coupling relation among the service reports in the source databases is reserved, and related personnel can obtain and traverse the retrieval results in the source databases without traversing a plurality of source databases when retrieving in the target database.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer equipment is used for storing various business reports and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program can implement the method for integrating business reports described in any of the above embodiments when executed by a processor.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is only a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects may be applied.
The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for integrating business reports according to any of the embodiments above may be implemented.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A method for integrating business reports, comprising:
searching a source database in which a business report is stored;
reading base table information in each source database, and generating a data dictionary according to the base table information, wherein the data dictionary records position information of each business report;
generating acquisition scripts respectively corresponding to all the business reports according to the data dictionary, and acquiring task scripts for operating all the business reports according to all the acquisition scripts;
recursively analyzing each task script to obtain a coupling relation between each business report;
and acquiring the business reports in each source database, and storing each business report and the coupling relation between each business report to a target database.
2. The method of integrating business reports of claim 1 wherein said step of recursively parsing each of said task scripts to obtain coupling relationships between each of said business reports comprises:
acquiring one or more SQL sentences involved in the task script;
detecting the business report executed in each SQL statement and whether the SQL statement can be executed or not;
performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
analyzing the target task script, and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
and recursively analyzing the calculation functions in the steps of the working stack to obtain the coupling relation between the business reports.
3. The method of integrating business reports of claim 1 wherein said step of storing each of said business reports and the coupling relationship between each of said business reports to a target database comprises:
acquiring form information of each business report;
sorting out a hierarchy rule according to the table information;
dividing each business report into different levels according to the level rules;
performing cluster analysis on the business reports of the same level, and assigning the same label to the business reports of the same type according to the analysis result;
and storing each business report to the target database in a classified manner according to the label of each business report, and storing the coupling relation among the business reports.
4. The method of integrating business reports of claim 1 wherein said step of storing each of said business reports and the coupling relationship between each of said business reports to a target database further comprises:
acquiring script information of the task script; the script information at least comprises a script path, an operation type and a related associated business report;
analyzing the script information to obtain the occurrence times and vertex information of each associated business report;
setting corresponding weight for each associated business report according to the occurrence frequency of each associated business report;
and setting the vertex information as a main key of the associated business report, setting the weight as a vertex attribute of the associated business report for storage, and storing the coupling relation between the business reports.
5. The method of integrating business reports of claim 1, wherein after the step of obtaining the business reports from the source databases and storing the business reports and the coupling relationship between the business reports in the target database, the method further comprises:
detecting an intermediate temporary table in each business report according to a set detection rule;
acquiring a first report form having a blood relationship with the intermediate temporary table and a second report form having a relationship with the intermediate temporary table; the first report and the second report are both the business report;
directly establishing the coupling relation between the first report and the second report according to the coupling relation between the intermediate temporary table and the second report;
deleting the intermediate temporary table to establish a knowledge graph of the target database.
6. The method of integrating business reports of claim 2 wherein said step of parsing said target task script and building a production stack comprises:
converting the target task script into an ASTNode abstract syntax tree;
traversing the depth of the ASTNode abstract syntax tree, and analyzing an output and input table and a condition judgment statement of the ASTNode abstract syntax tree;
and setting an execution scheme of the ASTNode abstract syntax tree according to the output input table and the condition judgment statement to obtain the working stack.
7. An apparatus for integrating business reporting forms, comprising:
the searching module is used for searching a source database in which the business report is stored;
the reading module is used for reading the base table information in each source database and generating a data dictionary according to the base table information, wherein the data dictionary records the position information of each service report;
a generating module for generating the corresponding acquisition script of each business report according to the data dictionary and acquiring the task script for operating each business report according to each acquisition script
The acquisition module is used for recursively analyzing each task script to acquire the coupling relation between the business reports;
and the storage module is used for acquiring the business reports in the source databases and storing the business reports and the coupling relation among the business reports to a target database.
8. The apparatus for integrating business reporting forms of claim 7 wherein the obtaining module comprises:
the acquisition submodule is used for acquiring one or more SQL sentences related in the task script;
the detection submodule is used for detecting the business report executed in each SQL statement and whether the SQL statement can be executed or not;
the processing submodule is used for performing executable processing on the unexecutable SQL statement to obtain an executable target task script;
the establishing submodule is used for analyzing the target task script and establishing a working stack based on the analyzed content; wherein the production stack comprises each step executed by the target task script;
and the analysis submodule is used for recursively analyzing the calculation functions in each step of the working stack to obtain the coupling relation between the business reports.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011549416.0A 2020-12-24 2020-12-24 Method, device, equipment and storage medium for integrating business report Active CN112667630B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011549416.0A CN112667630B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for integrating business report
PCT/CN2021/084534 WO2022134363A1 (en) 2020-12-24 2021-03-31 Service report integration method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011549416.0A CN112667630B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for integrating business report

Publications (2)

Publication Number Publication Date
CN112667630A true CN112667630A (en) 2021-04-16
CN112667630B CN112667630B (en) 2023-06-02

Family

ID=75409843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011549416.0A Active CN112667630B (en) 2020-12-24 2020-12-24 Method, device, equipment and storage medium for integrating business report

Country Status (2)

Country Link
CN (1) CN112667630B (en)
WO (1) WO2022134363A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114818645A (en) * 2022-06-29 2022-07-29 深圳红途科技有限公司 Automatic report generation method, device, equipment and medium based on data body
CN115423595A (en) * 2022-11-02 2022-12-02 深圳高灯计算机科技有限公司 File information processing method and device, computer equipment and storage medium
CN116303370A (en) * 2023-05-17 2023-06-23 建信金融科技有限责任公司 Script blood margin analysis method, script blood margin analysis device, storage medium, script blood margin analysis equipment and script blood margin analysis product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
US20150347473A1 (en) * 2014-05-29 2015-12-03 International Business Machines Corporation Database partition
CN111125254A (en) * 2019-12-23 2020-05-08 北京懿医云科技有限公司 Database synchronization method and device, electronic equipment and computer readable medium
CN111666743A (en) * 2020-04-28 2020-09-15 平安科技(深圳)有限公司 Report automatic generation method and device, computer equipment and storage medium
CN111914066A (en) * 2020-08-17 2020-11-10 山东合天智汇信息技术有限公司 Multi-source database global search method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110202831A1 (en) * 2010-02-15 2011-08-18 Microsoft Coproration Dynamic cache rebinding of processed data
CN104252443A (en) * 2013-06-28 2014-12-31 腾讯科技(深圳)有限公司 Report generation method and device
CN104036040B (en) * 2014-06-30 2017-11-03 北京猎豹移动科技有限公司 Report form generation method and device
CN105893488A (en) * 2016-03-29 2016-08-24 国云科技股份有限公司 Method for quickly, conveniently and flexibly making data statistics report forms

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541867A (en) * 2010-12-15 2012-07-04 金蝶软件(中国)有限公司 Data dictionary generating method and system
US20150347473A1 (en) * 2014-05-29 2015-12-03 International Business Machines Corporation Database partition
CN111125254A (en) * 2019-12-23 2020-05-08 北京懿医云科技有限公司 Database synchronization method and device, electronic equipment and computer readable medium
CN111666743A (en) * 2020-04-28 2020-09-15 平安科技(深圳)有限公司 Report automatic generation method and device, computer equipment and storage medium
CN111914066A (en) * 2020-08-17 2020-11-10 山东合天智汇信息技术有限公司 Multi-source database global search method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114818645A (en) * 2022-06-29 2022-07-29 深圳红途科技有限公司 Automatic report generation method, device, equipment and medium based on data body
CN115423595A (en) * 2022-11-02 2022-12-02 深圳高灯计算机科技有限公司 File information processing method and device, computer equipment and storage medium
CN116303370A (en) * 2023-05-17 2023-06-23 建信金融科技有限责任公司 Script blood margin analysis method, script blood margin analysis device, storage medium, script blood margin analysis equipment and script blood margin analysis product
CN116303370B (en) * 2023-05-17 2023-08-15 建信金融科技有限责任公司 Script blood margin analysis method, script blood margin analysis device, storage medium, script blood margin analysis equipment and script blood margin analysis product

Also Published As

Publication number Publication date
CN112667630B (en) 2023-06-02
WO2022134363A1 (en) 2022-06-30

Similar Documents

Publication Publication Date Title
CN112667630A (en) Method, device, equipment and storage medium for integrating business report
US11023500B2 (en) Systems and methods for code parsing and lineage detection
US10572822B2 (en) Modular memoization, tracking and train-data management of feature extraction
CN109376166B (en) Script conversion method, script conversion device, computer equipment and storage medium
CN110019384B (en) Method for acquiring blood edge data, method and device for providing blood edge data
CN112711591B (en) Data blood margin determination method and device based on field level of knowledge graph
CN107766353B (en) Method and device for migrating statistical information of database
CN109308258A (en) Building method, device, computer equipment and the storage medium of test data
CN114610635A (en) Interface test case generation method and device, computer equipment and storage medium
CN115098600A (en) Directed acyclic graph construction method and device for data warehouse and computer equipment
CN114625748A (en) SQL query statement generation method and device, electronic equipment and readable storage medium
CN107330031B (en) Data storage method and device and electronic equipment
CN112559538A (en) Incidence relation generation method and device, computer equipment and storage medium
US10223086B2 (en) Systems and methods for code parsing and lineage detection
CN114185958B (en) Blood relationship generation method, device, computer equipment and storage medium
CN114579203A (en) Script file checking method and device, electronic equipment and storage medium
CN113221528A (en) Automatic generation and execution method of clinical data quality evaluation rule based on openEHR model
CN113868138A (en) Method, system, equipment and storage medium for acquiring test data
CN112579705A (en) Metadata acquisition method and device, computer equipment and storage medium
Hakim et al. Identifying and localizing the inter-consistency errors among UML use cases and activity diagrams: An approach based on functional and structural size measurements
CA2983510A1 (en) Systems and methods for code parsing and lineage detection
CN112416966B (en) Impromptu query method, impromptu query device, computer device and storage medium
CN113626423B (en) Log management method, device and system of business database
KR100426620B1 (en) Method of an class instance updating with OID in the main memory resident, object-relational DBMS
CN117389908B (en) Dependency analysis method, system and medium for interface automation test case

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40041486

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant