CN113703729A - Method, device and equipment for generating program call chain - Google Patents

Method, device and equipment for generating program call chain Download PDF

Info

Publication number
CN113703729A
CN113703729A CN202111001463.6A CN202111001463A CN113703729A CN 113703729 A CN113703729 A CN 113703729A CN 202111001463 A CN202111001463 A CN 202111001463A CN 113703729 A CN113703729 A CN 113703729A
Authority
CN
China
Prior art keywords
program
calling
identifier
called
call
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.)
Pending
Application number
CN202111001463.6A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111001463.6A priority Critical patent/CN113703729A/en
Publication of CN113703729A publication Critical patent/CN113703729A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the specification provides a method, a device and equipment for generating a program calling chain, and can be used in the field of artificial intelligence. The method comprises the steps of obtaining a program identifier of a target calling program; retrieving in a program calling relation table based on the program identifier, and obtaining the program identifier of the called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers; and generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program. By using the embodiment of the specification, the program calling chain can be generated quickly, and the working efficiency of the system is improved.

Description

Method, device and equipment for generating program call chain
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method, an apparatus, and a device for generating a program call chain.
Background
At present, IBM mainframe has wide application in the national key fields of banking, postal service, retail sale and the like. However, with the continuous development of the business of each industry, the application systems running on the IBM mainframe become larger and larger, the deployed programs become more and more, the call relationship between the programs becomes not only complex but also extremely high in coupling degree, so that the generation time of the program call link becomes very long, and the working efficiency of the system is reduced.
Therefore, a technical solution that can solve the above technical problems is needed.
Disclosure of Invention
The embodiment of the specification provides a method, a device and equipment for generating a program calling chain, which can quickly generate the program calling chain and improve the working efficiency of a system.
The method, the device and the equipment for generating the program call chain are realized in the following modes.
A method of generating a chain of program calls, comprising: acquiring a program identifier of a target calling program; retrieving in a program calling relation table based on the program identifier, and obtaining the program identifier of the called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers; and generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
An apparatus to generate a chain of program calls, comprising: the acquisition module is used for acquiring the program identifier of the target calling program; an obtaining module, configured to retrieve, based on the program identifier, in a program call relationship table, to obtain a program identifier of a called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers; and the generation module is used for generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
An apparatus for generating a chain of program calls, comprising at least one processor and a memory storing computer-executable instructions, which when executed by the processor, perform the steps of any one of the method embodiments of the present specification.
A computer readable storage medium having stored thereon computer instructions which, when executed, implement the steps of any one of the method embodiments in the present specification.
The specification provides a method, a device and equipment for generating a program call chain. In some embodiments, a program identifier of a target calling program may be obtained, and a program identifier of a called program associated with the target calling program is obtained by retrieving from a program calling relationship table based on the program identifier, where the program calling relationship table includes calling relationships between programs, and the calling relationships are represented by the program identifiers. Further, a call chain of the target calling program may be generated according to the program identifier of the called program associated with the target calling program. Because the method and the device only need to perform one-time full code scanning, the required call chain can be obtained through splicing when the follow-up requirement is needed, and therefore the working efficiency of the system can be improved. By adopting the implementation scheme provided by the specification, the program calling chain can be generated quickly, and the working efficiency of the system is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, are incorporated in and constitute a part of this specification, and are not intended to limit the specification. In the drawings:
FIG. 1 is a flow diagram illustrating one embodiment of a method for generating a program call chain provided herein;
FIG. 2 is a schematic diagram illustrating one embodiment of a method for generating a program call chain;
FIG. 3 is a block diagram illustrating an exemplary embodiment of an apparatus for generating a program call chain;
fig. 4 is a block diagram of a hardware configuration of an embodiment of a server for generating a program call chain provided in the present specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments in the present specification, and not all of the embodiments. All other embodiments that can be obtained by a person skilled in the art on the basis of one or more embodiments of the present description without inventive step shall fall within the scope of protection of the embodiments of the present description.
The following describes an embodiment of the present disclosure with a specific application scenario as an example. Specifically, fig. 1 is a flowchart illustrating an embodiment of a method for generating a program call chain provided in this specification. Although the present specification provides the method steps or apparatus structures as shown in the following examples or figures, more or less steps or modules may be included in the method or apparatus structures based on conventional or non-inventive efforts.
One embodiment provided by the present specification can be applied to a client, a server, and the like. The client may include a terminal device, such as a smart phone, a tablet computer, and the like. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed system, and the like.
It should be noted that the following description of the embodiments does not limit the technical solutions in other extensible application scenarios based on the present specification. In one embodiment, the method for generating a program call chain provided in the present specification, as shown in fig. 1, may be applied to a persistent integration platform, and the method may include the following steps.
S0: and acquiring the program identification of the target calling program.
The target calling program may include a program that wants to generate a call chain, such as a business application on IBM mainframe cics (client Information Control system). The CICS is an application server or transaction server, and is used for connection of backend databases and online transaction control on IBM hosts.
In some embodiments, each program may be assigned a program identifier in advance and then stored in a corresponding database or memory, so that when a call chain needs to be generated for a certain program, the corresponding program identifier may be directly obtained from the database or memory.
In some embodiments, the program identification may be made up of one or more of numbers, letters, characters, and the like.
S2: retrieving in a program calling relation table based on the program identifier, and obtaining the program identifier of the called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers.
In this embodiment of the present specification, after obtaining the program identifier of the target calling program, the program identifier of the called program associated with the target calling program may be obtained by searching in the program calling relationship table based on the program identifier. The program identification of the called program associated with the target calling program can comprise one or more program identifications.
In some embodiments, the program call relation table may pre-store call relations between different programs. Wherein the calling relation can be represented by a program identifier.
In some embodiments, the procedure call relationship table may be obtained by: acquiring a full program in a program version library; distributing a program identifier for each program in the full-scale programs to obtain a first relation table; the first relation table comprises a corresponding relation between a program name and a program identifier; analyzing the full program to obtain a calling information set; the calling information set comprises a plurality of calling records, and each calling record comprises a calling program name and a corresponding called program name; and representing the program name in the calling information set by using a corresponding program identifier to obtain a program calling relation table. Wherein the program version library may be used to store the full amount of programs. The full-scale program may also be referred to as full-scale program source code.
Since there may be a case where multiple program version libraries are developed in parallel in an actual scenario, in some implementation scenarios, multiple versions of program version libraries may exist according to different development times. Each program version library may include the same program or may include different programs. The programs included in each program version library may be the full amount of programs corresponding to the program version library when generated based on the program version library.
In some implementations, the full amount of programs in each program version library may be obtained in turn, and then program identifications may be assigned to the programs in each program version library. For example, in some implementation scenarios, the full amount of programs P1, P2, P3, P4, and … … in the program version library may be obtained, and then a unique program identifier may be assigned to each of P1, P2, P3, P4, and … …. Among them, P1, P2, P3 and P4 may represent program names.
In some implementations, when multiple program version libraries are included, the program identification may be assigned to each program version library based on the version number of the program version library. Wherein, the larger the version number, the larger the program identification allocated in the program version library. For example, in some implementation scenarios, considering the case where there are multiple program version libraries developed in parallel, the program identifier may be generated according to the old and new version of the program version library, and the newer version, the larger the program identifier. Thus, when the same program exists in the two program version libraries, the corresponding program identifiers are different due to the fact that the program versions are located in different program version libraries. Of course, the above description is only exemplary, and the way of assigning program identifiers to programs in each program version library is not limited to the above examples, and other modifications are possible for those skilled in the art in light of the technical spirit of the present application, and all that can be achieved is covered by the scope of the present application as long as the functions and effects achieved by the present application are the same as or similar to those of the present application.
In some implementation scenarios, after the program identifier is allocated to each program, the program name and the program identifier corresponding to the same program may be stored in the data table to obtain the first relationship table, so that the corresponding program identifier may be quickly obtained according to the program name, and the corresponding program name may also be quickly obtained according to the program identifier, thereby improving data acquisition efficiency.
In some implementation scenarios, the parsing the full-scale program to obtain the call information set may include: scanning the full program to obtain a program calling statement included by each program; the program calling statement comprises keywords representing calling relations; analyzing a program calling statement included in each program to obtain a calling record corresponding to each program; and summarizing the call records corresponding to all the programs to obtain a call information set.
In some implementation scenarios, a full number of programs in the program version library may be scanned, and a program call statement included in each program may be obtained according to a keyword representing a call relationship. The keywords indicating the calling relationship include but are not limited to CALL, LINK, and DPL.
In some implementation scenarios, after the program call statement is obtained, the name of the program to be called in the program call statement may be parsed, and a call record is generated for each call relationship to obtain a call information set. Wherein, one or more call records can be analyzed in each program. Each call record may include a calling program name and a called program name. The calling program name may also be called a caller, and the called program name may also be called a callee, and for example, after the program with the program name P1 is analyzed, the obtained call records are respectively the caller P1 and the called P2; caller P1, callee P3; caller P1, callee P4, etc. Wherein P1, P2, P3 and P4 represent program names. It is to be understood that the above description is only exemplary, and the method of analyzing the program is not limited to the above examples, and those skilled in the art may make other modifications within the spirit of the present application, but the scope of the present application should be covered as long as the functions and effects achieved by the present application are the same as or similar to those of the present application.
In some implementations, after the call record is generated, the call record may be stored in a database table. In some implementations, a call record may be stored in a database table per row, with each call record including a caller name and a callee name. It is to be understood that the above description is only exemplary, the storage manner of the call record is not limited to the above examples, and other modifications may be made by those skilled in the art within the spirit of the present application, but the scope of the present application should be covered as long as the achieved function and effect are the same or similar to the present application.
For example, in some implementation scenarios, a whole number of programs in a program version library may be scanned, for each program P1, a keyword (such as CALL, LINK, DPL, etc.) is found first, then program names P2, P3, and P4 … … that need to be called are analyzed, further, each calling relationship is generated into a record, and the record is stored in a database table and is recorded as a caller P1 and a callee P2; caller P1, callee P3; caller P1, callee P4, and so on, to obtain the set of call information.
In some implementation scenarios, after the call information set is obtained, since the call record in the call information set is represented by the program name, when multiple program version libraries contain the same program, one program name corresponds to multiple program identifiers, and at this time, if the corresponding program is obtained by the program name, multiple same programs are obtained from multiple program version libraries, which increases processor load and reduces program obtaining efficiency.
In order to improve the program acquisition efficiency and preferentially call the program in the latest program version library, in some implementation scenarios, the program names in the call information set may be represented by program identifiers, so that, because the program identifiers corresponding to the programs in each program version library are different, when a plurality of program version libraries contain the same program, the corresponding programs in the corresponding program version libraries may be acquired according to the program identifiers, thereby improving the program acquisition efficiency.
In some implementation scenarios, when the called program name of the first call record in the call information set corresponds to a plurality of program identifiers, the program identifier corresponding to the called program name in the first call record may be determined by: judging whether a program corresponding to the called program name exists in a first program version library or not; the first program version library is a program version library in which a program corresponding to the calling program name in the first calling record is located; when the program version library exists, acquiring a first program identifier corresponding to the called program from a first relation table corresponding to the first program version library; and taking the first program identification as the program identification corresponding to the called program name in the first calling record. For example, in some implementation scenarios, the calling program name in the calling record a is P1, the called program name is P2, and the called program name P2 has multiple program identifiers (e.g., 36, 196, 366), at this time, it may be determined whether a program identifier corresponding to P2 exists in the program version library in which P1 exists, and if so (say 196), 196 is taken as the program identifier corresponding to the called program P2 in the calling record a.
In some implementation scenarios, when it is determined that the program corresponding to the called program name does not exist in the first program version library, the second program identifier corresponding to the called program name may be obtained from the first relationship table corresponding to the second program version library; the second program version library is a program version library with the maximum version number except the first program version library; and taking the second program identification as the program identification corresponding to the called program name in the first calling record. For example, in some implementation scenarios, the calling program name in the calling record a is P1, the called program name is P2, and the called program name P2 has multiple program identifiers (e.g., 36, 196, 366), at this time, it may be determined whether the program identifier corresponding to P2 exists in the program version library in which P1 exists, and if not, the maximum value (i.e., 366) of all the program identifiers corresponding to P2 may be selected as the program identifier corresponding to the called program P2 in the calling record a.
Of course, the above description is only an exemplary description, and the way of determining the program identifier corresponding to the called program name in the call record is not limited to the above example, and other modifications are possible for those skilled in the art in light of the technical spirit of the present application, but all that can be achieved by the method and the device are intended to be covered by the scope of the present application as long as the function and effect achieved by the method and the device are the same or similar to the present application.
In some embodiments, after the program name in the calling information set is represented by the program identifier, the representation result can be stored in a database table, so as to obtain a program calling relation table. The program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers. One or more call records may be included in the program call relationship table, and each call record includes a program identifier of the calling program and a program identifier of the called program.
In some embodiments, after obtaining the program calling relationship table, the program calling relationship table may be searched according to the program identifier of the target calling program, so as to obtain the program identifier of the called program associated with the target calling program.
In some implementations, upon obtaining the program identification of the callee associated with the target caller, a first call record in which the caller identification (i.e. the program identification of the caller) is the target caller identification (the program identification of the target caller) may be obtained from the program call relation table, then, a second call record with the calling program identifier as the called program identifier (the program identifier of the called program) in the first call record is obtained from the program call relation table, and a third call record with the calling program identifier as the called program identifier (the program identifier of the called program) in the second call record is further obtained from the program call relation table, … …, until no corresponding call record exists in the program call relation table, and the program identifiers corresponding to the called programs in all the obtained call records are used as the program identifiers of the called programs associated with the target calling program.
For example, in some implementation scenarios, the program identifier of the target calling program is a1, the call record of the calling program identifier a1 is obtained from the program call relationship table and includes a1- - > a2, a1- - > a3, a1- - > a4, then the call records of the calling program identifiers a2, a3, and a4 are obtained from the program call relationship table and include a2- - > a7, a3- - > a6, a4- - > a8, and further the call records of the calling program identifiers a7, a6, and a8 are obtained from the program call relationship table, and so on until there is no corresponding call record in the program call relationship table, and the program identifiers corresponding to the called programs included in all the obtained call records are used as the program identifiers of the called programs associated with the target calling program.
S4: and generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
In this embodiment of the present specification, after obtaining the program identifier of the called program associated with the target calling program, a call chain of the target calling program may be generated according to the program identifier of the called program associated with the target calling program.
In some embodiments, the generating a call chain of the target calling program according to the program identifier of the called program associated with the target calling program may obtain a program name corresponding to the called program associated with the target calling program according to the program identifier of the called program associated with the target calling program; and splicing the program names corresponding to the called programs related to the target calling program to obtain a calling chain of the target calling program.
In some implementation scenarios, after obtaining the program identifier of the called program associated with the target calling program, the program identifier corresponding to the target calling program and the program identifier of the called program associated with the target calling program may be spliced together according to the retrieval order in the program call relation table to obtain the first call chain of the target calling program. Wherein the first call chain is represented by a program identifier.
In some implementation scenarios, after obtaining the first call chain of the target calling program, each program identifier in the first call chain may be converted into a corresponding program name, thereby generating a call chain of the target calling program.
In some implementation scenarios, after the call chain of the target calling program is generated, the call chain of the target calling program can be output and displayed so as to intuitively know the program calling relationship.
In the embodiment of the specification, the code is scanned once, each scanning is not needed, the method is simple and efficient, the speed is high, the consumption is low, and powerful support can be provided for the tasks of IBM mainframe program problem analysis and troubleshooting, business system optimization, environment operation and maintenance and the like.
In the embodiment of the specification, the code can be repeatedly used later only by scanning once, and the retrieval program calling link relation with high efficiency and low cost can be realized without scanning every time.
In the embodiment of the specification, the output calling chains can be freely combined according to requirements, various query requirements can be met, and the use is flexible and efficient.
In this embodiment of the present specification, only the most original link layer may be stored, and the entire call link may not be fully stored. By matching the program identification storage and retrieval with the calling relation, not only can the storage resources be saved, but also the retrieval efficiency is high.
In the embodiment of the present specification, diversified retrieval requirements can be supported, generation of call chains of mainstream EGL (EGL is an enterprise-Oriented platform-independent high-level programming Language designed by IBM) and COBOL (Common Business-organized Language) programs is supported, which programs are called by a certain program can be searched, and query by calling layer number, query by program version library, single or batch mode, and the like can be supported. Among them, COBOL is a process-oriented high-level programming language, and is mainly used for data processing.
It is to be understood that the foregoing is only exemplary, and the embodiments of the present disclosure are not limited to the above examples, and other modifications may be made by those skilled in the art within the spirit of the present disclosure, and the scope of the present disclosure is intended to be covered by the claims as long as the functions and effects achieved by the embodiments are the same as or similar to the present disclosure.
The method for generating the program call chain is described below in a specific implementation scenario, however, it should be noted that this specific embodiment is only for better explaining the present application, and does not constitute a limitation to the present application. Fig. 2 is a schematic diagram of a specific embodiment of a method for generating a program call chain provided in this specification, and may include the following steps.
And S101, acquiring a program version library required to be scanned at this time.
And S102, allocating a program identifier to each program in the program version library.
Wherein, the program identification of the program with the same program name in the latest program version library is the largest.
S103, recording the corresponding relation between the program name and the program identifier into a table T1.
Here, the table T1 may be understood as a first relationship table including a correspondence between program names and program identifications.
And S104, scanning each program, and acquiring the name of the called program according to the keyword.
S105, inquiring a T1 table based on the called program name.
And S106, judging whether a program corresponding to the called program name exists in the current program version library.
If yes, executing S107, otherwise executing S108.
And S107, taking the program identifier corresponding to the called program name in the current program version library as the target program identifier of the called program name.
And S108, taking the maximum value in the program identifiers corresponding to the called program names in the other program version libraries as the target program identifier of the called program name.
S109, recording the calling relation and the program identification corresponding to the calling relation into the table T2.
The table T2 can be understood as a program call relation table including call relations between programs, which are represented by program identifiers.
The calling relation is the relation between the calling program and the called program.
S110, obtaining a first calling chain of the target calling program according to the table T2, obtaining the program name of each program identifier in the first calling chain, and outputting the complete calling chain of the target calling program.
Wherein each program in the first call chain is represented by a program identifier.
In the embodiment of the present specification, by scanning a full amount of application programs, statements in which other programs are called are analyzed one by one, program names are obtained and recorded, and finally, splicing is performed according to the records, so that a complete program calling link is obtained. According to the method and the device, only one-time full code scanning is needed, and the required complete link relation can be obtained through splicing when the requirement is needed subsequently, so that the method and the device have important effects on the aspects of problem solving, system analysis, operation and maintenance decision making and the like.
In the embodiment of the present specification, by analyzing the call link of the application program, an overall view of the program call relationship can be provided, and powerful support is provided for problem analysis and solution, efficient operation and maintenance of the system, and fast iteration of the service.
From the above description, it can be seen that in the embodiment of the present application, the program identifier of the target calling program may be obtained, and the program identifier of the called program associated with the target calling program is obtained by retrieving in the program calling relationship table based on the program identifier, where the program calling relationship table includes calling relationships between programs, and the calling relationships are represented by the program identifiers. Further, a call chain of the target calling program may be generated according to the program identifier of the called program associated with the target calling program. Because the method and the device only need to perform one-time full code scanning, the required call chain can be obtained through splicing when the follow-up requirement is needed, and therefore the working efficiency of the system can be improved.
In the present specification, each embodiment of the method is described in a progressive manner, and the same and similar parts in each embodiment may be joined together, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments.
Based on the method for generating the program call chain, one or more embodiments of the present specification further provide an apparatus for generating the program call chain. The apparatus may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in the embodiments of the present specification in conjunction with any necessary apparatus to implement the hardware. Based on the same innovative conception, embodiments of the present specification provide an apparatus as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific implementation of the apparatus in the embodiment of the present specification may refer to the implementation of the foregoing method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Specifically, fig. 3 is a schematic block diagram of an embodiment of an apparatus for generating a program call chain provided in this specification, and as shown in fig. 3, the apparatus for generating a program call chain provided in this specification may include: an obtaining module 120, an obtaining module 122, and a generating module 124.
An obtaining module 120, configured to obtain a program identifier of a target calling program;
an obtaining module 122, configured to obtain, based on the program identifier, a program identifier of a called program associated with the target calling program, where the program identifier is retrieved from a program calling relationship table; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers;
the generating module 124 may be configured to generate a call chain of the target calling program according to the program identifier of the called program associated with the target calling program.
It should be noted that the above-mentioned description of the apparatus according to the method embodiment may also include other embodiments, and specific implementation manners may refer to the description of the related method embodiment, which is not described herein again.
This specification also provides an embodiment of an apparatus to generate a chain of program calls, comprising a processor and a memory to store processor-executable instructions that when executed by the processor implement steps comprising: acquiring a program identifier of a target calling program; retrieving in a program calling relation table based on the program identifier, and obtaining the program identifier of the called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers; and generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
It should be noted that the above-mentioned apparatuses may also include other embodiments according to the description of the method or apparatus embodiments. The specific implementation manner may refer to the description of the related method embodiment, and is not described in detail herein.
The method embodiments provided in the present specification may be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking an example of the server running on the server, fig. 4 is a hardware configuration block diagram of an embodiment of a server for generating a program call chain provided in this specification, where the server may be an apparatus for generating a program call chain or a device for generating a program call chain in the above embodiments. As shown in fig. 4, the server 10 may include one or more (only one shown) processors 100 (the processors 100 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 200 for storing data, and a transmission module 300 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration and is not intended to limit the structure of the electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 4, and may also include other processing hardware, such as a database or multi-level cache, a GPU, or have a different configuration than shown in FIG. 4, for example.
The memory 200 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method of generating a program call chain in the embodiment of the present specification, and the processor 100 executes various functional applications and data processing by executing the software programs and modules stored in the memory 200. Memory 200 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 200 may further include memory located remotely from processor 100, which may be connected to a computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 300 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission module 300 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission module 300 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The method or apparatus provided by the present specification and described in the foregoing embodiments may implement service logic through a computer program and record the service logic on a storage medium, where the storage medium may be read and executed by a computer, so as to implement the effect of the solution described in the embodiments of the present specification. The storage medium may include a physical device for storing information, and typically, the information is digitized and then stored using an electrical, magnetic, or optical media. The storage medium may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
The method or apparatus embodiments for generating a program call chain provided in this specification may be implemented in a computer by executing corresponding program instructions by a processor, for example, implemented in a PC using a c + + language of a windows operating system, implemented in a linux system, or implemented in an intelligent terminal using, for example, android and iOS system programming languages, implemented in processing logic based on a quantum computer, and the like.
It should be noted that descriptions of the apparatus, the device, and the system described above according to the related method embodiments may also include other embodiments, and specific implementations may refer to descriptions of corresponding method embodiments, which are not described in detail herein.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of some modules may be implemented in one or more software and/or hardware, or the modules implementing the same functions may be implemented by a plurality of sub-modules or sub-units, etc.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, devices, systems according to embodiments of the invention. It will be understood that the implementation can be by computer program instructions which can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims.

Claims (10)

1. A method of generating a chain of program calls, the method comprising:
acquiring a program identifier of a target calling program;
retrieving in a program calling relation table based on the program identifier, and obtaining the program identifier of the called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers;
and generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
2. The method of claim 1, wherein the procedure call relationship table is obtained by:
acquiring a full program in a program version library;
distributing a program identifier for each program in the full-scale programs to obtain a first relation table; the first relation table comprises a corresponding relation between a program name and a program identifier;
analyzing the full program to obtain a calling information set; the calling information set comprises a plurality of calling records, and each calling record comprises a calling program name and a corresponding called program name;
and representing the program name in the calling information set by using a corresponding program identifier to obtain a program calling relation table.
3. The method of claim 2, wherein when multiple program version libraries are included, said assigning a program identification to each program in the full-scale program comprises:
distributing program identification for the program in each program version library according to the version number of the program version library; wherein, the larger the version number, the larger the program identification allocated in the program version library.
4. The method of claim 3, wherein parsing the full quantum program to obtain a set of call information comprises:
scanning the full program to obtain a program calling statement included by each program; the program calling statement comprises keywords representing calling relations;
analyzing a program calling statement included in each program to obtain a calling record corresponding to each program;
and summarizing the call records corresponding to all the programs to obtain a call information set.
5. The method according to claim 2, wherein when the called program name of the first call record in the call information set corresponds to a plurality of program identifiers, the program identifier corresponding to the called program name in the first call record is determined by:
judging whether a program corresponding to the called program name exists in a first program version library or not; the first program version library is a program version library in which a program corresponding to the calling program name in the first calling record is located;
when the program version library exists, acquiring a first program identifier corresponding to the called program from a first relation table corresponding to the first program version library;
and taking the first program identification as the program identification corresponding to the called program name in the first calling record.
6. The method of claim 5, further comprising:
when the calling program name does not exist, acquiring a second program identifier corresponding to the called program name from a first relation table corresponding to a second program version library; the second program version library is a program version library with the maximum version number except the first program version library;
and taking the second program identification as the program identification corresponding to the called program name in the first calling record.
7. The method of claim 1, wherein generating the call chain of the target calling program according to the program identifier of the called program associated with the target calling program comprises:
acquiring a program name corresponding to the called program associated with the target calling program according to the program identifier of the called program associated with the target calling program;
and splicing the program names corresponding to the called programs related to the target calling program to obtain a calling chain of the target calling program.
8. An apparatus for generating a chain of program calls, comprising:
the acquisition module is used for acquiring the program identifier of the target calling program;
an obtaining module, configured to retrieve, based on the program identifier, in a program call relationship table, to obtain a program identifier of a called program associated with the target calling program; the program calling relation table comprises calling relations among programs, and the calling relations are represented by program identifiers;
and the generation module is used for generating a calling chain of the target calling program according to the program identifier of the called program associated with the target calling program.
9. An apparatus for generating a chain of program calls, comprising at least one processor and a memory storing computer-executable instructions, which when executed by the processor implement the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer instructions which, when executed, implement the steps of the method of any one of claims 1 to 7.
CN202111001463.6A 2021-08-30 2021-08-30 Method, device and equipment for generating program call chain Pending CN113703729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111001463.6A CN113703729A (en) 2021-08-30 2021-08-30 Method, device and equipment for generating program call chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111001463.6A CN113703729A (en) 2021-08-30 2021-08-30 Method, device and equipment for generating program call chain

Publications (1)

Publication Number Publication Date
CN113703729A true CN113703729A (en) 2021-11-26

Family

ID=78656537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111001463.6A Pending CN113703729A (en) 2021-08-30 2021-08-30 Method, device and equipment for generating program call chain

Country Status (1)

Country Link
CN (1) CN113703729A (en)

Similar Documents

Publication Publication Date Title
US20160171505A1 (en) Extract, transform, and load (etl) processing
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN105630684A (en) Software development kit identification method and device
CN109408594B (en) Cross-chain data retrieval system based on block chain
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN110597896A (en) Data display method, data display device and terminal equipment
CN111324619B (en) Object updating method, device, equipment and storage medium in micro-service system
US11068496B2 (en) System and method for data management
CN110554951A (en) Method and device for managing embedded points
CN115238138A (en) Graph data query method and device
CN112395307A (en) Statement execution method, statement execution device, server and storage medium
CN108959294B (en) Method and device for accessing search engine
CN113051271A (en) Cold and hot data separation method, device and equipment
CN113703729A (en) Method, device and equipment for generating program call chain
US9996799B2 (en) Migrating a legacy system by inferring context-sensitive business rules from legacy source code
CN114817300A (en) Log query method based on SQL (structured query language) statements and application thereof
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
CN114168122A (en) Data script generation method and device
CN112835901A (en) File storage method and device, computer equipment and computer readable storage medium
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN107451050B (en) Function acquisition method and device and server
CN113535768A (en) Production monitoring method and device
CN108628909B (en) Information pushing method and device
CN112199092A (en) Application development method and device and electronic equipment
CN112799797A (en) Task management method and device

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