Link generation method, apparatus, device, and storage medium
By retrieving the underlying tables from the database and generating the target call path using parsing and verification strategies, the problems of high time consumption and low accuracy in database sorting are solved, achieving efficient and intelligent call path generation.
Patent Information
- Application Number
- CN202310677526.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-06-08
AI Technical Summary
Existing technologies, when reducing the operational pressure on databases, suffer from problems such as high time consumption in program and call logic analysis, low accuracy, low efficiency, and low level of intelligence.
By generating requests based on call links, the underlying database tables are obtained from the database, the call relationships are analyzed, and the initial call links are automatically generated using file type identifier parsing strategies and preset verification strategies. The validity of these links is then verified, and the target links are finally marked.
It improves the accuracy and efficiency of generating call chains, enhances the intelligence of program call logic, and reduces the time spent sorting out program call logic.
Smart Images

Figure CN116719793B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of big data or the technical field of financial technology, and in particular, to a link generation method, device, equipment, storage medium and program product. BACKGROUND
[0002] With the maturity of the application, the new functions of the application are increasing, and the old functions are gradually withdrawn, which leads to a large number of abandoned tables, programs and invalid data, thereby increasing the running pressure of the database. In this stage, it is crucial to slim down the database of the application to reduce the running pressure of the database.
[0003] In the process of implementing the present disclosure, the inventors found that the related art generally has the following problems: in the process of reducing the running pressure of the database, the programs and calling logic in the database need to be sorted out first, and the related art has the problems of high time consumption, low accuracy, low efficiency and low intelligentization degree in sorting out the programs and calling logic in the database. SUMMARY
[0004] In view of the above problems, the present disclosure provides a link generation method, device, equipment, storage medium and program product.
[0005] One aspect of the present disclosure provides a link generation method, comprising: obtaining a bottom database table from a database specified by a link generation request based on the link generation request; performing calling relationship analysis on the bottom database table to obtain a file type identifier of an upper file, wherein the upper file calls the bottom database table; using an analysis strategy having a mapping relationship with the file type identifier to further analyze the calling relationship of the upper file to obtain an initial calling link; using a preset verification strategy to verify the validity of the calling relationship in the initial calling link to obtain a validity verification result; and using the validity verification result to mark the initial calling link to obtain a target link.
[0006] According to an embodiment of the present disclosure, the type identifier of the upper layer file includes a first file type identifier, the initial call link includes a first initial sub-link, and the first file type identifier is used to represent a call relationship of a package, a call relationship of a stored procedure, and a call relationship of a function; the further parsing of the call relationship of the upper layer file by using the parsing strategy having the mapping relationship with the file type identifier to obtain the initial call link includes: based on the first file type identifier, searching a first parsing strategy having a mapping relationship with the first file type identifier from a parsing strategy library; and parsing a nested loop call relationship among the package, the stored procedure, and the function by using the first parsing strategy to obtain at least one of a package call sub-link, a stored procedure call sub-link, and a function call sub-link; and splicing the at least one sub-link to obtain the first initial sub-link.
[0007] According to an embodiment of the present disclosure, the type identifier of the upper layer file further includes a second file type identifier, the initial call link further includes a second initial sub-link, and the second file type identifier is used to represent a call relationship of a view and a call relationship of a synonym; the further parsing of the call relationship of the upper layer file by using the parsing strategy having the mapping relationship with the file type identifier to obtain the initial call link further includes: based on the second file type identifier, searching a second parsing strategy having a mapping relationship with the second file type identifier from the parsing strategy library, where the second parsing strategy includes a same-type parsing sub-strategy and an upper layer call parsing sub-strategy; parsing a same-type nested loop call relationship between the view and the synonym by using the same-type parsing sub-strategy to obtain a same-type call sub-link; parsing a nested loop call relationship among a called package, a called stored procedure, and a called function in the same-type call sub-link by using the upper layer call parsing sub-strategy to obtain an upper layer call sub-link; and splicing the same-type call sub-link and the upper layer call sub-link to obtain the second initial sub-link.
[0008] According to an embodiment of the present disclosure, the type identifier of the upper layer file further includes a third file type identifier, the initial call link further includes a third initial sub-link, and the third file type identifier is used to represent a call relationship of a trigger; the further parsing of the call relationship of the upper layer file by using the parsing strategy having the mapping relationship with the file type identifier to obtain the initial call link further includes: based on the third file type identifier, searching a third parsing strategy having a mapping relationship with the third file type identifier from the parsing strategy library; and parsing an existence of the trigger in the database table by using the third parsing strategy to obtain the third initial sub-link.
[0009] According to an embodiment of the present disclosure, the preset verification strategy includes a data verification strategy; the validity of the call relationship in the initial call link is verified by using the preset verification strategy to obtain a validity verification result, which includes: based on the data verification strategy, preset time periods and preset fields are transmitted to a database table of at least one sub-link in the initial link to verify whether the database table has data associated with the preset fields entered in the preset time periods; in the case where the database table has data associated with the preset fields entered in the preset time periods, a verification result that at least one sub-link of the initial call link is valid is obtained.
[0010] According to an embodiment of the present disclosure, the preset verification strategy further includes a configuration call verification strategy; the validity of the call relationship in the initial call link is verified by using the preset verification strategy to obtain a validity verification result, which further includes: based on the configuration call strategy, the cross-database configuration of a package, a stored procedure and a function of at least one sub-link in the initial link is verified by using a configuration call address of the package, the stored procedure and the function; in the case where the package, the stored procedure and the function of at least one sub-link have cross-database configuration, a verification result that at least one sub-link of the initial call link is valid is obtained.
[0011] According to an embodiment of the present disclosure, the preset verification strategy further includes a cross-application call verification strategy; the validity of the call relationship in the initial call link is verified by using the preset verification strategy to obtain a validity verification result, which further includes: based on the cross-application call verification strategy, it is determined whether at least one sub-link in the initial call link involves a cross-application call file; in the case where at least one sub-link involves the cross-application call file, a verification result that at least one sub-link of the initial call link is valid is obtained.
[0012] According to an embodiment of the present disclosure, the method further includes: obtaining the target link; and displaying the target link by using a visual component.
[0013] Another aspect of the present disclosure also provides a link generation apparatus, comprising: a first obtaining module configured to obtain, based on a link generation request, a bottom database table from a database specified by the link generation request; an analyzing module configured to analyze a calling relationship of the bottom database table to obtain a file type identifier of a top file, wherein the top file calls the bottom database table; a parsing module configured to further parse the calling relationship of the top file by using a parsing strategy having a mapping relationship with the file type identifier to obtain an initial calling link; a verifying module configured to verify the calling relationship in the initial calling link by using a preset verifying strategy to obtain a validity verification result; and a marking module configured to mark the initial calling link by using the validity verification result to obtain a target link.
[0014] Another aspect of the present disclosure also provides an electronic device, comprising: one or more processors; and a storage apparatus configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the link generation method.
[0015] Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the link generation method.
[0016] Another aspect of the present disclosure also provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the link generation method.
[0017] According to the link generation method, apparatus, device, storage medium and program product provided by the embodiments of the present disclosure, the bottom database table is obtained from the specified database based on the link generation request; the calling relationship of the bottom database table is analyzed to obtain the file type identifier of the top file; the top file is parsed by using the parsing strategy having the mapping relationship with the file type identifier to obtain the initial calling link; and the initial calling link is marked according to the validity verification result obtained by verifying the initial calling link by using the preset verifying strategy, so that the target link with the effective mark can be obtained. Since the calling relationship is parsed by using different parsing strategies for different types of top files starting from the bottom database table in the link generation process, and the verifying strategy is used for the verification of the missing part to improve the accuracy of the generated target link, and the whole process can be automatically performed, at least part of the problems of high time consumption, low accuracy and low efficiency in the related art in the process of combing the program and the calling logic in the database are overcome, and the accuracy and efficiency of the generated calling link are improved, the intelligent degree of the combing program and the calling logic is improved, and the time consumption of the combing program and the calling logic is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description when taken in conjunction with the accompanying drawings, in which:
[0019] Figure 1 An application scenario diagram of a link generation method, apparatus, device, storage medium and program product according to embodiments of the present disclosure is schematically shown;
[0020] Figure 2 A flowchart of a link generation method according to embodiments of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a link generation method according to another embodiment of the present disclosure is schematically shown;
[0022] Figure 4 A system architecture diagram of a link generation method according to another embodiment of the present disclosure is schematically shown;
[0023] Figure 5 A structural block diagram of a link generation apparatus according to embodiments of the present disclosure is schematically shown; and
[0024] Figure 6 A block diagram of an electronic device suitable for implementing a link generation method according to embodiments of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary of the present disclosure, but is not intended to limit the scope of the present disclosure. In the following detailed description of the embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to one skilled in the art that the present disclosure can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present disclosure.
[0026] The terms used herein are merely used to describe specific embodiments, and are not intended to limit the present disclosure. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present description, and should not be interpreted in an idealized or excessively formal manner.
[0028] In the case of using expressions such as "at least one of A, B, and C", it is generally intended to mean "A, B, and / or C" (i.e., A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B, and C together).
[0029] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (such as including but not limited to user personal information) comply with relevant laws and regulations, necessary security measures are taken, and do not violate public order and good customs.
[0030] It is crucial to slim down the database to reduce the running pressure of the database. At present, the programs of the database can only be sorted out by manual searching. Starting from the table, manual searching can be applicable to searching a small amount of call relationship, but for a large amount of multi-layer call relationship, the time-consuming of manual searching will increase, and the time-consuming is relatively long. As for the remaining reference indicators, such as whether new data is generated in a certain table in recent period, whether there is a table configuration program, whether there is an upstream and downstream application call, and the like, manual sorting is easy to miss. The preliminary sorting work is the cornerstone of slimming down, and the missing sorting will undoubtedly increase the subsequent production risk, resulting in a large production problem.
[0031] Therefore, an automatic program call link searching method is provided to automatically search the upward link starting from the table, and to support the extension of the remaining elements, which is particularly important for reducing the pressure of the database. Specifically, the embodiments of the present disclosure provide a link generation method, device, equipment, storage medium, and program product, which are used to improve the accuracy and efficiency of generating call links, improve the intelligent degree of sorting program call logic, and reduce the time-consuming of sorting program call logic. The method comprises the following steps: based on a link generation request, obtaining a bottom database table from a database specified by the link generation request; performing call relationship analysis on the bottom database table to obtain a file type identifier of an upper layer file, wherein the upper layer file calls the bottom database table; using an analysis strategy having a mapping relationship with the file type identifier to further analyze the call relationship of the upper layer file to obtain an initial call link; using a preset verification strategy to verify the validity of the call relationship in the initial call link to obtain a validity verification result; and using the validity verification result to mark the initial call link to obtain a target link.
[0032] It should be noted that the link generation method and device determined by the embodiments of the present disclosure can be used in the field of big data technology or the field of financial technology, and can also be used in any field other than the field of big data technology or the field of financial technology. The embodiments of the present disclosure do not limit the application field of the determined link generation method and device.
[0033] Figure 1 An application scenario diagram of the link generation method, device, equipment, storage medium and program product according to the embodiments of the present disclosure is schematically shown.
[0034] As shown in Figure 1 The application scenario 100 according to the embodiments can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0035] A user can use at least one of the first terminal device 101, the second terminal device 102 and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send a link generation request, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102 and the third terminal device 103, such as applications for processing call chains, financial applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0036] The first terminal device 101, the second terminal device 102 and the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.
[0037] The server 105 can be a server providing various services, such as a background management server providing support for the link generation request sent by the user using the first terminal device 101, the second terminal device 102 and the third terminal device 103 (only as an example). The background management server can analyze and process the received link generation request and other data, and feed back the processing result (such as the call link, webpage, information or data obtained or generated according to the user request) to the terminal device.
[0038] It should be noted that the link generation method provided by the embodiments of the present disclosure can be generally executed by the server 105. Accordingly, the link generation apparatus provided by the embodiments of the present disclosure can be generally arranged in the server 105. The link generation method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the link generation apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above scenario is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
[0040] The link generation method of the embodiments of the present disclosure will be described in detail below based on the scenario described above. Figure 1 Figures 2 to 4 The link generation method of the embodiments of the present disclosure will be described in detail below based on the scenario described above.
[0041] Figure 2 A flowchart of the link generation method according to the embodiments of the present disclosure is schematically shown.
[0042] As shown in Figure 2 , the link generation of this embodiment includes operations S210-S250.
[0043] In operation S210, based on the link generation request, the underlying database table is obtained from the database specified by the link generation request.
[0044] In operation S220, the underlying database table is analyzed for the calling relationship to obtain the file type identifier of the upper layer file, wherein the upper layer file calls the underlying database table.
[0045] In operation S230, the calling relationship of the upper layer file is further analyzed by using the analysis strategy having a mapping relationship with the file type identifier to obtain the initial calling link.
[0046] In operation S240, the calling relationship in the initial calling link is verified for validity by using the preset verification strategy to obtain the validity verification result.
[0047] In operation S250, the initial calling link is marked by using the validity verification result to obtain the target link.
[0048] According to an embodiment of the present disclosure, the link generation case can refer to a request of generating a call link, such as a program call link, a data call link, etc. The link generation request generally carries an identifier of a database, for example, generating a program call link of an Oracle database, at this time, the specified database can refer to the Oracle database.
[0049] According to an embodiment of the present disclosure, the Oracle database is composed of at least one table space and database schema object. Here, the schema can be a collection of objects, and the schema object can be a logical structure directly referencing database data. The schema object can include some structures such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database chains, etc. The logical storage structure can include table spaces, segments, and extents, which are used to describe how to use the physical space of the database. The logical structure can be composed of logical storage structures (table spaces, segments, extents, blocks) and logical data structures (tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database chains, etc.), and the schema object (logical data structure) and the relationship form the relational design of the database. The underlying database table can be in the Oracle database, and the call logic is the bottommost file.
[0050] According to an embodiment of the present disclosure, the upper layer file of the call database can include packages, stored procedures, functions, views, synonyms, triggers, etc. The file type identifier can be a field, character, number, etc. used to represent the above-mentioned files. Among them, the package in the Oracle database can arrange the stored procedures and functions in a logical grouping. The package has two separate components, the package specification (specification and package header) and the package body (body); they are stored in the data dictionary respectively. The package can be understood as a named declaration section, any statement that can appear in the declaration can be used in the package, including procedures, functions, cursors, types, and variables, etc.
[0051] According to an embodiment of the present disclosure, the parsing strategy can be used to parse the call relationship of the upper layer files. Due to the difference of the upper layer file types, in order to more quickly sort out the call relationship of the files, different parsing strategies are set for different upper layer files. When obtaining the parsing strategy, the parsing strategy associated with the file identifier can be found from the parsing strategy library according to the file type identifier, so as to realize the classified parsing of the upper layer files.
[0052] According to an embodiment of the present disclosure, the preset verification strategy can be used to verify whether the calling chain is valid, and can also be used as a strategy for checking and filling in the gaps. The preset verification strategy can be used to verify whether new data has been generated in a database table recently, whether there is a table configuration program, whether there is an upstream and downstream application call, and the like. If at least one of the following conditions occurs: new data has been generated recently, there is a table configuration program, and there is an upstream and downstream application call, it can be considered that the current calling chain is valid, or the associated sub-calling chain in the calling chain is useful.
[0053] According to an embodiment of the present disclosure, the valid sub-calling chain is marked in the initial chain link, for example, an effective identification (a color identification, a field, a line shape, or the like representing validity) is assigned, and an effective marked calling link can be obtained. The target link can refer to the effective marked calling link.
[0054] According to an embodiment of the present disclosure, the calling chain can refer to a link formed by various programs through a calling relationship. In an oracle database, various programs include a package, a stored procedure, a function, a view, a synonym, a trigger, and the like. Such programs are a link and a point on the calling chain. The calling chain is executed in a head-to-tail order, and can be represented by a line. In practice, there are many calling chains, and they can intersect multiple times. That is, different calling chains contain the same program, and the program is an intersection point.
[0055] According to the link generation method, device, equipment, storage medium, and program product provided by the embodiment of the present disclosure, the underlying database table is obtained from the specified database based on the link generation request; the calling relationship of the underlying database table is analyzed to obtain a file type identifier of an upper layer file; the upper layer file is parsed by using a parsing strategy having a mapping relationship with the file type identifier to obtain an initial calling link; and the initial calling link is marked according to an effectiveness verification result obtained by verifying the effectiveness of the initial calling link by using a preset verification strategy, so that a final target link with an effective mark can be obtained. In the link generation process, the calling relationship of different types of upper layer files is parsed by using different parsing strategies starting from the underlying database table; and the verification strategy is used for checking and filling in the gaps, so as to improve the accuracy of the generated target link, and the whole process can be automated, at least partially overcoming the problems of high time consumption, low accuracy, and low efficiency in the related art in the process of combing the programs and calling logic in the database, and thus the accuracy and efficiency of generating the calling link are improved, the intelligent degree of combing the program calling logic is improved, and the time consumption of combing the program calling logic is reduced.
[0056] According to an embodiment of the present disclosure, the type identifier of the upper-layer file can include a first file type identifier, and the initial call link can include a first initial sub-link. The first file type identifier is used to represent the call relationship of a package, the call relationship of a stored procedure, and the call relationship of a function. Operation S230 can include the following operations: based on the first file type identifier, searching, from the parsing strategy library, a first parsing strategy having a mapping relationship with the first file type identifier; using the first parsing strategy, parsing the nested loop call relationship among the package, the stored procedure, and the function to obtain at least one of a package call sub-link, a stored procedure call sub-link, and a function call sub-link; and splicing the at least one sub-link to obtain the first initial sub-link.
[0057] According to an embodiment of the present disclosure, the upper-layer call of a package (PACKAGE), a stored procedure (PROCDUCE), and a function (FUNCTION). A package can include a single or multiple stored procedure bodies and function bodies; a stored procedure can include only a single stored procedure body, and a function can include only a single function body. Therefore, when considering the package call, it is necessary to determine which specific stored procedure or function in the package calls, otherwise a large amount of redundancy will be generated, resulting in inaccurate call links. Specifically, the syntax tree can be used for determination, a syntax tree is generated according to the call relationship of the package, and the actual called stored procedure or function in the actual package is determined according to the syntax tree. There can be a mutual nesting relationship among the three types of calls, that is, a package can call a stored procedure and a function; a stored procedure can call a package and a function; and a function can call a package and a stored procedure. Therefore, the nested call relationship among the package, the stored procedure, and the function needs to be determined in a loop until the top-level call is found. The top-level call can be understood as the file at the top level no longer calls other files.
[0058] According to an embodiment of the present disclosure, the first file type identifier, the second file type identifier, and the third file type identifier can all refer to the name, number, or other information of the upper-layer file.
[0059] According to an embodiment of the present disclosure, the parsing strategy library can store various parsing strategies, which can be classified according to file types. By classifying the parsing strategies, the associated parsing strategy of the upper-layer file can be found more quickly when searching for the parsing strategy and parsing the call relationship of the upper-layer file, and the call relationship of the upper-layer file can be efficiently parsed, so that the analysis of the call relationship is more targeted.
[0060] According to an embodiment of the present disclosure, the package calling sublink can be a calling relationship sublink obtained based on a package as a reference node; the stored procedure calling sublink can be a calling relationship sublink obtained based on a stored procedure as a reference node; and the function calling sublink can be a calling relationship sublink obtained based on a function as a reference node. When the package calling sublink, the stored procedure calling sublink, and the function calling sublink are spliced, the three sublinks can be spliced according to the calling relationship, or a total node can be added to the reference nodes of the three sublinks to connect the three sublinks.
[0061] According to an embodiment of the present disclosure, the type identifier of the upper-layer file can further include a second file type identifier, and the initial calling link can further include a second initial sublink. The second file type identifier is used to represent the calling relationship of the view and the calling relationship of the synonym. The operation S230 can further include the following operation: based on the second file type identifier, searching, from the parsing strategy library, a second parsing strategy having a mapping relationship with the second file type identifier, wherein the second parsing strategy includes a same-type parsing sub-strategy and an upper-layer calling parsing sub-strategy; using the same-type parsing sub-strategy to parse the nested loop calling relationship between the views and the synonyms of the same type to obtain a same-type calling sublink; using the upper-layer calling parsing sub-strategy to parse the nested loop calling relationship between the called packages, stored procedures, and functions in the same-type calling sublink to obtain an upper-layer calling sublink; and splicing the same-type calling sublink and the upper-layer calling sublink to obtain the second initial sublink.
[0062] According to an embodiment of the present disclosure, the upper-layer calling of the view (VIEW) and the synonym (SYNONYM). The view and the synonym are both based on a table and can be called by the same type. Therefore, the same-type calling sublink is obtained by using the same-type parsing sub-strategy to analyze the calling relationship between the views and the synonyms, and the upper-layer calling sublink is obtained by using the upper-layer calling parsing sub-strategy to analyze the calling relationship between the packages, the stored procedures, and the functions in the upper layer. The upper-layer calling parsing sub-strategy can refer to the first parsing strategy described above. The same-type parsing sub-strategy is used to analyze the same-type calling between the views and the synonyms, such as the calling between the views and the calling between the synonyms. For example, whether the views call each other can be determined according to the attributes and the identifiers of the views.
[0063] According to an embodiment of the present disclosure, the type identifier of the upper layer file can further include a third file type identifier, and the initial call link can further include a third initial sub-link, and the third file type identifier is used to represent the call relationship of the trigger; the operation S230 can further include the following operation: based on the third file type identifier, searching the third parsing strategy having a mapping relationship with the third file type identifier from the parsing strategy library; using the third parsing strategy, parsing the existence of the trigger in the database table to obtain the third initial sub-link.
[0064] According to an embodiment of the present disclosure, the upper layer of the trigger (TRIGGER) is called. The trigger is implicitly automatically executed and is not explicitly called. Therefore, only the third parsing strategy is used to query whether the trigger exists in a certain table, and the trigger is not called in the remaining programs.
[0065] According to an embodiment of the present disclosure, by adding a common total node at the origin of the first initial link, the second initial link and the third initial link, the initial call link can be obtained.
[0066] According to an embodiment of the present disclosure, by classifying and parsing the call relationship of the upper layer file, the parsing efficiency of the call relationship can be improved, and the efficiency and accuracy of generating the initial call link can be improved.
[0067] According to an embodiment of the present disclosure, the preset verification strategy includes a data verification strategy; the operation S240 can include the following operation: based on the data verification strategy, inputting a preset time period and a preset field into the database table of at least one sub-link of the initial link to verify whether there is data associated with the preset field in the database table within the preset time period; in the case that there is data associated with the preset field in the database table within the preset time period, a verification result that at least one sub-link of the initial call link is valid is obtained.
[0068] According to an embodiment of the present disclosure, a data verification strategy is used to determine whether there is a data adjustment operation, such as addition, modification, deletion, etc., in a database table in the near future, to confirm whether the database table is currently still in use. For the case of whether new data is generated in the near future. There is a time field in part of the table, and the time is recorded when new data is added or updated. Therefore, for such a table, the tool provides two optional parameters, which can be transmitted to a database table. The relevant preset field name and the preset time period or the preset time point in the table. The time format needs to be consistent. After transmitting the two parameters, it can be determined whether there is a change in new data in the database table within the time period or after the preset time point. If there is a change in data, it can be understood that the database table is in use in the near future, and the sub-link associated with the database table is valid, and the sub-link can be discarded first. If there is no change in data, it can be understood that the database table is not in use in the near future, and the sub-link associated with the database table is currently invalid, and the discarded sub-link can be discarded first and stored in the discarded record for review; the sub-link can also not be discarded first, and a discardable identifier is marked in the initial link, so that the business personnel can further determine whether it needs to be discarded. The preset field name and the preset time period or the preset time point can be adaptively adjusted according to actual needs.
[0069] According to an embodiment of the present disclosure, the preset verification strategy can also include a configuration call verification strategy; the operation S240 can also include the following operations: based on the configuration call strategy, verifying the cross-database configuration of the package, stored procedure, function of at least one sub-link in the initial link by using the configuration call address of the package, stored procedure, function; in the case that the package, stored procedure, function of at least one sub-link exists cross-database configuration, obtaining the verification result that at least one sub-link of the initial call link is valid.
[0070] According to an embodiment of the present disclosure, the configuration call strategy is used to determine whether at least one of the database table, the package, the stored procedure, and the function exists cross-database configuration. For the case of whether the table exists configuration table, program. Part of the database table, the package, the stored procedure, and the function can exist configuration call, that is, configuration in another table for query call. For such configuration call, it is necessary to investigate and sort out the possible call first, and then determine whether there is cross-database configuration, and then batch query according to the sorting out in the early stage. Exemplarily, if there is a database table that exists cross-database configuration, the sub-link associated with the database table is valid, and the sub-link can be discarded first. If the database table does not exist cross-database configuration, the sub-link associated with the database table is currently invalid, and the discarded sub-link can be discarded first and stored in the discarded record for review; the sub-link can also not be discarded first, and a discardable identifier is marked in the initial link, so that the business personnel can further determine whether it needs to be discarded.
[0071] According to an embodiment of the present disclosure, the preset verification strategy can further include a cross-application call verification strategy; the operation S240 can further include the following operations: determining, based on the cross-application call verification strategy, whether at least one sub-link in the initial call link involves a cross-application call file; and obtaining a verification result that the at least one sub-link of the initial call link is valid in a case where the at least one sub-link involves the cross-application call file.
[0072] According to an embodiment of the present disclosure, the cross-application call verification strategy is used to determine whether at least one of a database table, a package, a stored procedure, and a function is configured to be cross-application. Whether there is an upstream call can be determined by checking whether there is a cross-application call file. That is, a CDC configuration (Connected Device Configuration, a connection-oriented device configuration layer) is configured to synchronize data in an online or batch manner with a table as a source table or a target table. For such cross-application calls, it is necessary to determine whether the cross-application call is involved according to a specific CDC file or a configuration of a CDC table. For example, if a database table is configured to be cross-application, a sub-link associated with the database table is valid, and the sub-link can be not discarded. If the database table is not configured to be cross-application, a sub-link associated with the database table is currently invalid, and the sub-link can be discarded, and the discarded sub-link is stored in a discarded record for review. The sub-link can also be not discarded, and a discardable identifier is marked in the initial link, so that a business personnel further determines whether the sub-link needs to be discarded.
[0073] According to an embodiment of the present disclosure, the preset verification strategy can not only be limited to the initial link, but also be used to verify other files except the initial link in response to a request of a business personnel, so as to supplement the missing files of the initial link.
[0074] According to an embodiment of the present disclosure, after the initial link is generated, the remaining reference indicators of the initial link, for example, whether new data is generated in a table in a recent period, whether a configuration program exists in the table, and whether an upstream application call exists, are verified, so as to find the missing files, distinguish the valid and invalid sub-links, mark the valid sub-links in the initial link, obtain a target link, and improve the accuracy of generating the target link.
[0075] According to an embodiment of the present disclosure, the link generation method can further include obtaining the target link; and displaying the target link by using a visual component. The target link is displayed by using a data visualization chart library such as Echarts and Highcharts. The target link is displayed, which is more helpful for a business personnel to make an analysis and a decision.
[0076] Figure 3A flowchart of a link generation method according to another embodiment of the present disclosure is shown.
[0077] As shown in Figure 3 The link generation method of another embodiment can include operations S310-S340.
[0078] In operation S310, the file type of the first layer call is first determined, wherein the package, the stored procedure and the function are one type, the view and the synonym are one type, and the trigger is one type.
[0079] In operation S320, the package, the stored procedure and the function call are all the file types of the upper layer, so the upper layer call is nested and the result is recorded. The view and the synonym call are first nested and queried whether they are called by other views and synonyms, and then the upper layer package, the stored procedure and the function call are nested and queried, and the result is recorded. The trigger call is only determined whether there is a table call, and the result is recorded.
[0080] In operation S330, after the link call is queried, the extension call query is performed according to the application-specific situation, such as whether there is new data generated in the table, whether there is a table configuration program, whether there is an upstream and downstream application call, and the like, and the result is recorded.
[0081] In operation S340, the query result is exported, and according to the link call and the index data, it can be directly determined whether the table can be discarded.
[0082] The link generation method provided by another embodiment of the present disclosure can mainly include two parts. The first part is based on the table to automatically query all the call relationships in the upper layer of the database and form a link display. The second part is an extensible module (verification) to query and analyze the remaining reference indicators. For example, there is no call relationship in the first part, but there is in the part indicators, which still needs to be further determined whether it can be discarded. The content in operations S310-S340 can refer to the related content in operations S210-S250, which will not be repeated here.
[0083] Figure 4 A system architecture diagram of a link generation method according to another embodiment of the present disclosure is shown.
[0084] As shown in Figure 4As shown, for a database table 401, several types of upper-layer files calling the database table can be found. Package calling, stored procedure calling, and function calling can be the first type of file 402; view calling and synonym calling can be the second type of file 403; trigger calling can be the third type of file 404; and the remaining extensible calling can be the fourth type of file 405. For the first type of file 401, after analyzing the nested loop calling relationship between the packages, stored procedures, and functions to obtain a first calling relationship 406, the extension application verification is performed to obtain a first extension application verification result 407. For the second type of file 403, after analyzing the nested loop calling relationship between the views and synonyms to obtain a same type of calling relationship 408, the nested loop calling relationship between the packages, stored procedures, and functions called by the views and synonyms is analyzed to obtain an upper-layer calling relationship 409, and then the extension application verification is performed to obtain a second extension application verification result 410. For the third type, the table where the trigger is located is queried to obtain a third calling relationship 411.
[0085] Based on the above technical solution, the embodiment of the present disclosure provides an Oracle database-based upward calling link query tool. Through link calling analysis and extension calling configuration, automatic query work is performed on possible calling conditions, and one-key query is finally realized. The problems of time-consuming, poor accuracy, and low reliability in manual sorting are effectively solved, the manual cost is effectively reduced, effective technical support is provided for the pre-work of database slimming, the research and development efficiency of database slimming is improved, and the timeliness and accuracy of processing are improved.
[0086] It should be noted that, unless it is explicitly stated that there is an execution sequence between different operations or there is an execution sequence in the technical implementation of different operations, the execution sequence of multiple operations can not be distinguished, and multiple operations can be executed simultaneously.
[0087] Based on the above link generation method, the present disclosure further provides a link generation device. The following will be described in detail Figure 5 The device is described in detail.
[0088] Figure 5 The structure block diagram of the link generation device according to the embodiment of the present disclosure is schematically shown.
[0089] As Figure 5 shown, the link generation device 500 of the embodiment includes a first acquisition module 510, an analysis module 520, a parsing module 530, a verification module 540, and a marking module 550.
[0090] The first acquisition module 510 is configured to acquire a bottom-layer database table from a database specified by a link generation request based on the link generation request.
[0091] The analysis module 520 is configured to perform call relationship analysis on the underlying database table to obtain a file type identifier of the upper layer file, wherein the upper layer file calls the underlying database table.
[0092] The parsing module 530 is configured to further parse the call relationship of the upper layer file by using a parsing strategy that has a mapping relationship with the file type identifier to obtain an initial call link.
[0093] The verification module 540 is configured to perform validity verification on the call relationship in the initial call link by using a preset verification strategy to obtain a validity verification result.
[0094] The marking module 550 is configured to mark the initial call link by using the validity verification result to obtain a target link.
[0095] According to the link generation method, device, equipment, storage medium and program product provided by the embodiments of the present disclosure, the underlying database table is obtained from the specified database based on the link generation request; the call relationship of the underlying database table is analyzed to obtain a file type identifier of the upper layer file; the upper layer file is parsed by using a parsing strategy that has a mapping relationship with the file type identifier to obtain an initial call link; and the initial call link is marked according to a validity verification result obtained by performing validity verification on the initial call link by using a preset verification strategy, so that a final target link with an effective mark can be obtained. Since the call relationship is parsed by using different parsing strategies for different types of upper layer files starting from the underlying database table in the link generation process, and the verification strategy is used for leak detection and defect repair verification, the accuracy of the generated target link is improved, and the whole process can be automated, thereby at least partially overcoming the problems of high time consumption, low accuracy and low efficiency in the related art in the process of combing the programs and call logic in the database, and the accuracy and efficiency of the generated call link are improved, the intelligent degree of the combing of the program call logic is improved, and the time consumption of the combing of the program call logic is reduced.
[0096] According to the embodiments of the present disclosure, the parsing module can include a first finding unit, a first parsing unit and a first splicing unit.
[0097] The first finding unit is configured to find, based on the first file type identifier, a first parsing strategy that has a mapping relationship with the first file type identifier from a parsing strategy library.
[0098] The first parsing unit is configured to parse the nested loop call relationship among the packages, the stored procedures and the functions by using the first parsing strategy to obtain at least one of the package call sub-link, the stored procedure call sub-link and the function call sub-link.
[0099] The first splicing unit is configured to splice at least one sub-link to obtain a first initial sub-link.
[0100] According to an embodiment of the present disclosure, the parsing module further includes a second finding unit, a second parsing unit, a third parsing unit, and a second splicing unit.
[0101] The second finding unit is configured to find, based on a second file type identifier, a second parsing strategy having a mapping relationship with the second file type identifier from a parsing strategy library, wherein the second parsing strategy includes a same-type parsing sub-strategy and an upper-layer calling parsing sub-strategy.
[0102] The second parsing unit is configured to parse, by using the same-type parsing sub-strategy, a nested loop calling relationship between views and synonyms of the same type to obtain a same-type calling sub-link.
[0103] The third parsing unit is configured to parse, by using the upper-layer calling parsing sub-strategy, a nested loop calling relationship between packages, stored procedures, and functions called in the same-type calling sub-link to obtain an upper-layer calling sub-link.
[0104] The second splicing unit is configured to splice the same-type calling sub-link and the upper-layer calling sub-link to obtain a second initial sub-link.
[0105] According to an embodiment of the present disclosure, the parsing module further includes a third finding unit and a fourth parsing unit.
[0106] The third finding unit is configured to find, based on a third file type identifier, a third parsing strategy having a mapping relationship with the third file type identifier from the parsing strategy library.
[0107] The fourth parsing unit is configured to parse, by using the third parsing strategy, an existence of a trigger in a database table to obtain a third initial sub-link.
[0108] According to an embodiment of the present disclosure, the verification module includes a transmission unit and a first result unit.
[0109] The transmission unit is configured to transmit, based on a data verification strategy, a preset time period and a preset field into a database table of at least one sub-link in an initial link to verify whether the database table has data associated with the preset field entered in the preset time period.
[0110] The first result unit is configured to obtain a verification result that at least one sub-link of an initial calling link is valid in a case where the database table has data associated with the preset field entered in the preset time period.
[0111] According to an embodiment of the present disclosure, the verification module further includes a verification unit and a second result unit.
[0112] The verification unit is configured to verify, based on the configuration invocation strategy, a cross-database configuration of the package, the stored procedure, or the function of at least one sub-link in the initial link, by using the configuration invocation address of the package, the stored procedure, or the function.
[0113] The second result unit is configured to obtain a valid verification result of at least one sub-link in the initial invocation link in a case where the package, the stored procedure, or the function of at least one sub-link exists cross-database configuration.
[0114] According to an embodiment of the present disclosure, the verification module can further include a determination unit and a third result unit.
[0115] The determination unit is configured to determine, based on a cross-application invocation verification strategy, whether at least one sub-link in the initial invocation link involves a cross-application invocation file.
[0116] The third result unit is configured to obtain a valid verification result of at least one sub-link in the initial invocation link in a case where at least one sub-link involves a cross-application invocation file.
[0117] According to an embodiment of the present disclosure, the link generation apparatus can further include a second acquisition module and a display module.
[0118] The acquisition module is configured to acquire a target link.
[0119] The display module is configured to display the target link by using a visual component.
[0120] According to an embodiment of the present disclosure, any of the first obtaining module 510, the analyzing module 520, the parsing module 530, the verifying module 540 and the marking module 550 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the first obtaining module 510, the analyzing module 520, the parsing module 530, the verifying module 540 and the marking module 550 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of hardware or firmware that can be integrated or packaged with a circuit, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first obtaining module 510, the analyzing module 520, the parsing module 530, the verifying module 540 and the marking module 550 can be at least partially implemented as a computer program module that can perform corresponding functions when it is run.
[0121] It should be noted that the link generation device part in the embodiments of the present disclosure corresponds to the link generation method part in the embodiments of the present disclosure, and the description of the link generation device part is specifically referred to the link generation method part, which will not be repeated here.
[0122] Figure 6 A block diagram of an electronic device suitable for implementing the link generation method according to an embodiment of the present disclosure is schematically shown.
[0123] As shown in Figure 6 The electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (such as an application specific integrated circuit (ASIC)), and the like. The processor 601 can also include an on-board memory for cache use. The processor 601 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present disclosure.
[0124] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via the bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the programs can also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0125] According to an embodiment of the present disclosure, the electronic device 600 can further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 can further include one or more of the following components connected to the input / output (I / O) interface 605: an input part 606 including a keyboard, a mouse, and the like; an output part 607 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 608 including a hard disk, and the like; and a communication part 609 including a network interface card such as a LAN card, a modem, and the like. The communication part 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 610 as necessary, so that a computer program read therefrom is installed in the storage part 608 as necessary.
[0126] The present disclosure also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0127] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM or Flash memory), a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories, such as the ROM 602 and / or the RAM 603 described above, and / or one or more memory chips other than the ROM 602 and the RAM 603.
[0128] Embodiments of the present disclosure also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the link generation method provided by the embodiments of the present disclosure.
[0129] The above-described functions defined in the system / apparatus / module / unit of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. According to an embodiment of the present disclosure, the above-described system, apparatus, module, unit, etc. can be implemented by the computer program modules.
[0130] In one embodiment, the computer program can rely on a tangible storage medium, such as an optical storage medium, a magnetic storage medium, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal via a network medium, and be downloaded and installed through the communication part 609, and / or be installed from the detachable medium 611. The program codes contained in the computer program can be transmitted via any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.
[0131] In such an embodiment, the computer program can be downloaded and installed from a network via the communication part 609, and / or be installed from the detachable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the above-described system, apparatus, device, module, unit, etc. can be implemented by the computer program modules.
[0132] According to embodiments of the present disclosure, program code of the computer program for performing the methods provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and can be implemented in a computer program product. Specifically, the computer program can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. The programming language includes, but is not limited to, Java, C++, python, “C” language, or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, and partly on a remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).
[0133] The computer program product of the present disclosure can be a computer program product, which is a machine-readable medium (or computer readable medium) having stored therein a sequence of instructions readable by a machine (e.g., a computer). The instructions in the machine-readable medium focus on the function of the computer program (e.g., in the form of a program unit) and on the cooperation behavior between such program units. The program can be distributed over networks coupled to one or more processors or computers, and can be stored on computer readable media including computer program products, hard drives, RAMs, or any other device (internal or external) from which a processor or computer reads incoming data or instructions. In addition to being distributed over the Internet, or over any other publicly or privately accessed network, the aforementioned program product can also be stored in the memory of the respective machine and / or processor.
[0134] Those skilled in the art can understand that the features described in various embodiments of the present disclosure and / or claims can be combined or / and integrated, even if such combinations or integrations are not explicitly described in the present disclosure. In particular, the features described in various embodiments of the present disclosure and / or claims can be combined and / or integrated in various combinations, without departing from the spirit and teachings of the present disclosure. All these combinations and / or integrations fall within the scope of the present disclosure.
[0135] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. A link generation method, comprising: obtaining a bottom database table from a database specified by a link generation request based on the link generation request; performing call relationship analysis on the bottom database table to obtain a file type identifier of an upper layer file, wherein the upper layer file calls the bottom database table; performing further analysis on the call relationship of the upper layer file by using an analysis strategy having a mapping relationship with the file type identifier to obtain an initial call link; performing validity verification on the call relationship in the initial call link by using a preset verification strategy to obtain a validity verification result; labeling the initial call link by using the validity verification result to obtain a target link; wherein the performing validity verification on the call relationship in the initial call link by using a preset verification strategy to obtain a validity verification result comprises at least one of the following: inputting a preset time period and a preset field into the initial call link, and obtaining the validity verification result according to a case where the preset field exists in the initial call link; or verifying a cross-database configuration of the initial call link by using a predetermined configuration call address to obtain the validity verification result; or verifying the initial call link by using a cross-application call file required for cross-application calling, and obtaining the validity verification result according to a case where the cross-application call file exists in the initial call link; the type identifier of the upper layer file comprises a first file type identifier, and the initial call link comprises a first initial sub-link, and the first file type identifier is used to represent a call relationship of a package, a call relationship of a stored procedure, and a call relationship of a function; the performing further analysis on the call relationship of the upper layer file by using an analysis strategy having a mapping relationship with the file type identifier to obtain an initial call link comprises: finding a first analysis strategy having a mapping relationship with the first file type identifier from an analysis strategy library based on the first file type identifier; analyzing a nested loop call relationship among the package, the stored procedure, and the function by using the first analysis strategy to obtain at least one of a package call sub-link, a stored procedure call sub-link, and a function call sub-link; and splicing the at least one sub-link to obtain the first initial sub-link.
2. The method of claim 1, wherein, the type identifier of the upper layer file further comprises a second file type identifier, and the initial call link further comprises a second initial sub-link, and the second file type identifier is used to represent a call relationship of a view and a call relationship of a synonym; the performing further analysis on the call relationship of the upper layer file by using an analysis strategy having a mapping relationship with the file type identifier to obtain an initial call link further comprises: finding a second analysis strategy having a mapping relationship with the second file type identifier from the analysis strategy library based on the second file type identifier, wherein the second analysis strategy comprises a same type analysis sub-strategy and an upper layer call analysis sub-strategy. The same type of analysis sub-strategy is used to analyze the nested loop calling relationship between the same type of the view and the synonym, and a same type of calling sub-link is obtained. The upper calling analysis sub-strategy is used to analyze the nested loop calling relationship between the calling package, stored procedure and function in the same type of calling sub-link, and an upper calling sub-link is obtained. The same type of calling sub-link and the upper calling sub-link are spliced to obtain the second initial sub-link.
3. The method of claim 2, wherein, The type identifier of the upper layer file further includes a third file type identifier, and the initial calling link further includes a third initial sub-link. The third file type identifier is used to represent the calling relationship of a trigger. The initial calling link obtained by further analyzing the calling relationship of the upper layer file by using the analysis strategy having a mapping relationship with the file type identifier further includes: Based on the third file type identifier, a third analysis strategy having a mapping relationship with the third file type identifier is searched from the analysis strategy library. The third analysis strategy is used to analyze the existence of the trigger in the database table, and the third initial sub-link is obtained.
4. The method of claim 1, wherein, The preset verification strategy includes a data verification strategy. The preset time period and the preset field are transmitted into the initial calling link, and the validity verification result is obtained based on the existence of the preset field in the initial calling link, including: Based on the data verification strategy, the preset time period and the preset field are transmitted into the database table of at least one sub-link of the initial calling link, to verify whether there is data associated with the preset field in the database table within the preset time period. In the case that there is data associated with the preset field in the database table within the preset time period, the verification result of at least one sub-link of the initial calling link is obtained.
5. The method of claim 1, wherein, The preset verification strategy further includes a configuration calling verification strategy, and the predetermined configuration calling address includes the configuration calling address of the package, stored procedure and function. The initial calling link is verified by using the predetermined configuration calling address, and the validity verification result is obtained, including: Based on the configuration calling verification strategy, the configuration calling address of the package, stored procedure and function is used to verify the cross-database configuration of the package, stored procedure and function of at least one sub-link in the initial calling link. In the case that the package, stored procedure and function of at least one sub-link exist cross-database configuration, the verification result of at least one sub-link of the initial calling link is obtained.
6. The method of claim 1, wherein, The preset verification strategy further includes a cross-application calling verification strategy. The initial calling link is verified by using the cross-application calling file required by cross-application calling, and the validity verification result is obtained based on the existence of the cross-application calling file in the initial calling link, including: Based on the cross-application calling verification strategy, it is determined whether at least one sub-link in the initial calling link involves the cross-application calling file. In a case where the cross-application calling file is involved in at least one of the sub-links, a verification result of validity of at least one sub-link of the initial calling link is obtained.
7. The method of claim 1, further comprising: obtaining the target link; displaying the target link by using a visualization component.
8. A link generation apparatus, comprising: a first obtaining module, configured to obtain a bottom database table from a database specified by a link generation request based on the link generation request; an analysis module, configured to perform calling relationship analysis on the bottom database table to obtain a file type identifier of an upper layer file, wherein the upper layer file calls the bottom database table; a parsing module, configured to perform further parsing on a calling relationship of the upper layer file by using a parsing strategy having a mapping relationship with the file type identifier to obtain an initial calling link; a verification module, configured to perform validity verification on a calling relationship in the initial calling link by using a preset verification strategy to obtain a validity verification result; a marking module, configured to mark the initial calling link by using the validity verification result to obtain a target link; wherein the validity verification on the calling relationship in the initial calling link by using the preset verification strategy to obtain the validity verification result comprises at least one of the following: a preset time period and a preset field are passed into the initial calling link, and the validity verification result is obtained according to a case where the preset field exists in the initial calling link; or a cross-database configuration of the initial calling link is verified by using a predetermined configuration calling address to obtain the validity verification result; or the initial calling link is verified by using a cross-application calling file required for cross-application calling, and the validity verification result is obtained according to a case where the cross-application calling file exists in the initial calling link; the type identifier of the upper layer file comprises a first file type identifier, and the initial calling link comprises a first initial sub-link, and the first file type identifier is used to represent a calling relationship of a package, a calling relationship of a stored procedure, and a calling relationship of a function; the parsing module comprises a first finding unit, a first parsing unit, and a first splicing unit; the first finding unit is configured to find a first parsing strategy having a mapping relationship with the first file type identifier from a parsing strategy library based on the first file type identifier; the first parsing unit is configured to parse a nested loop calling relationship among the package, the stored procedure, and the function by using the first parsing strategy to obtain at least one of a package calling sub-link, a stored procedure calling sub-link, and a function calling sub-link; and the first splicing unit is configured to splice at least one of the sub-links to obtain the first initial sub-link.
9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-7.
Citation Information
Patent Citations
Method for generating and displaying multi-system method calling link diagram
CN110717032A
File processing method and device, electronic equipment and storage medium
CN113590554A
Reflection-guided Java deserialization call chain mining method and system
CN114722392A
Calling relation processing method and device, storage medium and electronic equipment
CN114840321A