CN114489783A - Program processing method and device - Google Patents

Program processing method and device Download PDF

Info

Publication number
CN114489783A
CN114489783A CN202210146045.4A CN202210146045A CN114489783A CN 114489783 A CN114489783 A CN 114489783A CN 202210146045 A CN202210146045 A CN 202210146045A CN 114489783 A CN114489783 A CN 114489783A
Authority
CN
China
Prior art keywords
program
calling
programs
service type
calling relation
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
CN202210146045.4A
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 CN202210146045.4A priority Critical patent/CN114489783A/en
Publication of CN114489783A publication Critical patent/CN114489783A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code

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 invention provides a program processing method and a program processing device, which can be used in the financial field or other fields. The method comprises the following steps: code resources of a plurality of programs are obtained, the code resources are classified, and the type corresponding to each program is determined; analyzing codes of the code resources to obtain the mutual calling relationship among the programs belonging to the same type and the direct calling relationship among the programs of the types; and generating a program calling relation graph according to the mutual calling relation and the direct calling relation, and generating a program list corresponding to each service type according to a preset service type and the program calling relation graph. The invention automatically combs program codes and analyzes the calling relationship among the programs to obtain a program calling relationship diagram, realizes the rapid generation of the program list corresponding to each service type, improves the accuracy and efficiency of program code modification and optimization, and can greatly facilitate service design and development.

Description

Program processing method and device
Technical Field
The present invention relates to the field of program analysis technology, and more particularly, to a method and apparatus for processing a program.
Background
At present, in the financial field, with the enrichment and upgrade of the internet banking function, more and more programs are available, and the calling relationship among the programs is more and more complex. For the modification of a certain program, a plurality of service function modules may be affected, and only by manual combing of developers, omission is easily caused, so that the use of a client is affected after the program is on line.
Disclosure of Invention
In view of the problems in the prior art, embodiments of the present invention mainly aim to provide a program processing method and apparatus, which improve accuracy and efficiency of program combing.
In order to achieve the above object, an embodiment of the present invention provides a program processing method, including:
code resources of a plurality of programs are obtained, the code resources are classified, and the type corresponding to each program is determined;
analyzing codes of the code resources to obtain mutual calling relations among the programs belonging to the same type and obtain direct calling relations among the programs of the types;
and generating a program calling relation graph according to the mutual calling relation and the direct calling relation, and generating a program list corresponding to each service type according to a preset service type and the program calling relation graph.
Optionally, in an embodiment of the present invention, the analyzing the code of the code resource to obtain the mutual calling relationship among the programs belonging to the same type includes:
and carrying out code analysis on the code resources of the programs belonging to the same type by using the regular expression to obtain the mutual calling relation among the programs belonging to the same type.
Optionally, in an embodiment of the present invention, the analyzing the code of the code resource to obtain the direct call relationship between the types of programs includes:
and carrying out code analysis on the code resources of the programs of all types by using the regular expression to obtain a direct calling relation among the programs of all types.
Optionally, in an embodiment of the present invention, the generating a program call relation graph according to the mutual call relation and the direct call relation includes:
and taking the mutual calling relation and the direct calling relation as edges, taking each program as a point, and constructing the program calling relation graph.
Optionally, in an embodiment of the present invention, the generating a program list corresponding to each service type according to a preset service type and the program call relation diagram includes:
determining an inlet program corresponding to each service type according to a preset service type;
and performing reachability query in the program calling relation graph according to the entry program to generate a program list corresponding to each service type.
Optionally, in an embodiment of the present invention, the performing, according to the portal program, reachability query in the program call relationship graph, and generating a program list corresponding to each service type includes:
performing reachability query in the program call relation graph according to the entry program to generate a program list corresponding to each service type;
and determining a basic data structure corresponding to each service type according to the program list.
Optionally, in an embodiment of the present invention, performing reachability query in the program call relationship graph according to the portal program, and generating a program list corresponding to each service type includes: and according to the entry program, performing reachability query in the program calling relational graph, and marking the queried points in the program calling relational graph as traversed points to obtain a program list corresponding to each service type.
An embodiment of the present invention further provides a program processing apparatus, where the apparatus includes:
the program classification module is used for acquiring code resources of a plurality of programs, classifying the code resources and determining the type corresponding to each program;
the calling relation module is used for carrying out code analysis on the code resources to obtain the mutual calling relation among the programs belonging to the same type and obtain the direct calling relation among the programs of the types;
and the program list module is used for generating a program calling relation graph according to the mutual calling relation and the direct calling relation and generating a program list corresponding to each service type according to a preset service type and the program calling relation graph.
Optionally, in an embodiment of the present invention, the call relationship module includes:
the mutual calling unit is used for carrying out code analysis on the code resources of the programs belonging to the same type by utilizing the regular expression to obtain the mutual calling relation among the programs belonging to the same type;
and the direct calling unit is used for carrying out code analysis on the code resources of the programs of all types by utilizing the regular expression to obtain the direct calling relation among the programs of all types.
Optionally, in an embodiment of the present invention, the program list module is further configured to use the mutual call relationship and the direct call relationship as edges, use each program as a point, and construct the program call relationship graph.
Optionally, in an embodiment of the present invention, the program listing module includes:
the access program unit is used for determining an access program corresponding to each service type according to the preset service type;
and the program list unit is used for performing reachability query in the program calling relation graph according to the entry program and generating a program list corresponding to each service type.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
The invention automatically combs program codes and analyzes the calling relationship among the programs to obtain a program calling relationship diagram, realizes the rapid generation of the program list corresponding to each service type, improves the accuracy and efficiency of program code modification and optimization, and can greatly facilitate service design and development.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a program processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of determining a call relationship in an embodiment of the present invention;
FIG. 3 is a flow chart of generating a program listing in an embodiment of the present invention;
FIG. 4 is a diagram illustrating types of programs and their calling relationships in an embodiment of the present invention;
FIG. 5 is a diagram illustrating a procedure call relationship diagram according to an embodiment of the present invention;
FIG. 6 is a functional block diagram of a system of an application processing method according to an embodiment of the present invention;
FIG. 7 is a block diagram of a system for processing application programs according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a program processing apparatus according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a structure of a call relation module according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating the structure of a program listing module according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a program processing method and a program processing device, which can be used in the financial field and other fields, and can be used in the financial field and any fields except the financial field.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a program processing method according to an embodiment of the present invention, where an execution subject of the program processing method according to the embodiment of the present invention includes, but is not limited to, a computer. The invention automatically combs program codes and analyzes the calling relationship among the programs to obtain a program calling relationship diagram, realizes the rapid generation of the program list corresponding to each service type, improves the accuracy and efficiency of program code modification and optimization, and can greatly facilitate service design and development. Specifically, the method shown in the figure includes:
step S1, obtaining code resources of a plurality of programs, classifying the code resources, and determining a type corresponding to each program.
The method comprises the steps of reading code resources of all programs, namely codes of the programs, from an enterprise working area, classifying the code resources, namely extracting code resources of various categories from the code resources, and determining the type corresponding to each program. Specifically, the types of the programs include a Java type, a JavaScript type, an Object Pascal type, and the like.
And step S2, analyzing the codes of the code resources to obtain the mutual calling relation among the programs belonging to the same type and the direct calling relation among the programs of the same type.
The regular expression is adopted to analyze each type of code resource, so as to obtain the mutual calling relationship among the code resources and obtain the direct calling relationship of the type of code resources to other types of resources.
Further, the direct call relationship between the various types of programs is shown in fig. 4, the columns in the figure refer to the service types, the JSP and the Java are different types of programs, and the connecting lines represent the call relationship.
And step S3, generating a program calling relation graph according to the mutual calling relation and the direct calling relation, and generating a program list corresponding to each service type according to the preset service type and the program calling relation graph.
The direct calling relation and the mutual calling relation can represent the calling relation of the program from two layers, so that the calling relation of the program can be accurately determined. The direct calling relation and the mutual calling relation are edges, the program is used as a node to construct a program calling relation graph, as shown in fig. 5, in the graph, Jsp _ B, Op _1 and the like are program names, and connecting lines between the program names represent the calling relations.
Further, the direct call relationship of the programs of the same type in fig. 5 is the mutual call relationship, for example, the call relationship between Op _1, Op _2 and Op _3 is the mutual call relationship between the programs. In addition, the calling relationship of the different types of programs in fig. 5 is a direct calling relationship, and as shown in fig. 4, Jsp _ B and Op _1 are different types of programs, and the calling relationship therebetween is a direct calling relationship.
As an embodiment of the present invention, as shown in fig. 2, code analysis is performed on a code resource to obtain a mutual call relationship between programs belonging to the same type, and the direct call relationship between the programs of different types includes:
step S21, code analysis is carried out on the code resources of the programs belonging to the same type by utilizing the regular expression, and the mutual calling relation among the programs belonging to the same type is obtained;
and step S22, code analysis is carried out on the code resources of the programs of all types by using the regular expression, and the direct calling relation among the programs of all types is obtained.
The regular expression is adopted to analyze each type of code resource, so as to obtain the mutual calling relation among the code resources and obtain the direct calling relation of the type of code resources to other types of resources.
Further, code analysis is performed on the code resources of the programs belonging to the same type by using the regular expression, and then code analysis is performed on the code resources of the programs belonging to the same type by using the regular expression, so that a mutual calling relation and a direct calling relation are obtained respectively.
Furthermore, in the code analysis process, the references of other program resources during program calling are matched through a regular expression technology, so that the mutual calling relation and the direct calling relation of the programs are obtained.
As an embodiment of the present invention, generating a program call relationship diagram according to a mutual call relationship and a direct call relationship includes: and taking the intermodulation relation and the direct calling relation as edges, taking each program as a point, and constructing a program calling relation graph.
The calling relationship graph between the programs can be abstracted by taking the program resources as nodes and taking the calling relationship of the programs as edges, including the mutual calling relationship and the direct calling relationship, as shown in fig. 5.
As an embodiment of the present invention, as shown in fig. 3, generating a program list corresponding to each service type according to a preset service type and the program call relation diagram includes:
step S31, determining an entry program corresponding to each service type according to the preset service type;
and step S32, performing reachability inquiry in the program calling relation graph according to the entrance program, and generating a program list corresponding to each service type.
In this embodiment, performing reachability query in the program call relation graph according to the entry program, and generating a program list corresponding to each service type includes: according to the entry program, performing reachability query in the program calling relation graph to generate a program list corresponding to each service type; and determining a basic data structure corresponding to each service type according to the program list. Specifically, as can be seen from the dotted line in fig. 5, there is a "loop" in this call relationship, which exactly corresponds to the Graph (Graph) structure in the computer concept, and can be used as the basic data structure for program ledger combing.
In this embodiment, according to the portal program, performing reachability query in the program call relationship graph, and generating a program list corresponding to each service type includes: and according to the entrance program, performing reachability query in the program calling relational graph, and marking the queried points in the program calling relational graph as traversed points to obtain a program list corresponding to each service type.
Different service types have corresponding column functions and column entries through presetting, and the column entries are entry programs. Specifically, as shown in fig. 4, the accessibility query is performed from the portal program corresponding to the service type to determine the types of programs associated with the portal program, and then the program call relationship diagram shown in fig. 5 is combined to generate the program list corresponding to each service type.
Furthermore, in the process of finding reachable program resource nodes on the graph, loops may occur, which causes repeated traversal and endless loop of the nodes. In order to avoid this problem, in the traversal process, a mark is made on the program node that has arrived, for example, the mark is traversed, so as to mark the column information that is currently traversed, and thus obtain the program list corresponding to each service type.
Furthermore, the program list corresponding to each service type can be used for subsequent program development, optimization, modification and the like, so that the accuracy and efficiency of program code modification and optimization are improved, and service design and development can be greatly facilitated.
In an embodiment of the present invention, as shown in fig. 6, a functional structure diagram of a system of an application processing method in the embodiment of the present invention is shown. In order to search the relation between the enterprise online banking code resources, the enterprise online banking code resource analysis processing system is designed and realized by combining the characteristics of multiple types and large quantity of code resources in an enterprise online banking working area. The system takes the code resources in the enterprise online bank working area as input, and takes the mutual calling relation among the code resources and the program resource list related to each online bank column as output after processing. Ultimately, these outputs can be used to assist development and designers in analysis and decision-making.
In this embodiment, the system shown in fig. 6 is mainly divided into three major modules, a program resource extraction module, a call relationship analysis module, and a call relationship network construction module. The program resource extraction module is responsible for reading all code resources in the working area, extracting code resources of various types from the code resources respectively and preparing for further processing the codes of different types respectively; the calling relation analysis module is responsible for analyzing each type of code resources to obtain mutual calling among the code resources and calling of the type of code resources to other types of resources, and storing the obtained direct calling relations into a database; the calling relation network building module builds a network structure called by program resources by using the direct calling relation among the programs, and queries by taking an entry program corresponding to the enterprise internet bank column as a starting point to obtain all program code resources related to the column.
In this embodiment, as the architecture shown in fig. 7, since the types of code resources in the enterprise cyber-banking working area are relatively many, they need to be processed separately, and the related function points are relatively complicated. To improve the flexibility and maintainability of the system, the system adopts the architecture as shown in fig. 7 according to the concept of "top-down, step-by-step refinement". The system respectively corresponds to an actuator, a module and a processing unit from top to bottom. Each analysis task is controlled by an actuator, and each subfunction module in the same analysis task is realized by a module. Under each module, a plurality of processing units are managed, and each processing unit is responsible for specifically analyzing and processing source files in the working area. The three-layer architecture can greatly develop and debug the system, and meanwhile, the number and the types of specific sub-modules managed by the upper-layer module can be configured through configuration files, so that the flexibility of system operation is greatly improved.
According to the current program status of the online bank, the program types in the current online bank working area and the calling relationship among the types are sorted out, as shown in fig. 4. Aiming at the calling relations, the system analyzes the direct calling relations among various program calls by scanning the directory where the working area is located. In the analysis process, the references of other program resources are mainly matched when the program is called through a regular expression technology. In addition, in fig. 4, includeJSP is a JSP public page, JSP is a transaction JSP page, OP is a transaction flow configuration file, a component ID is a Java public program identifier, a DSR interface is a host interface, and a Procedure is a storage process.
Further, abstracting the obtained call relationship, taking the program resource as a node (Vetex) and the call relationship of the program as an Edge (Edge), so as to abstract the call relationship between the programs, as shown in fig. 5. Specifically, as can be seen from the dotted line in fig. 5, there is a "loop" in this call relationship, which exactly corresponds to the Graph (Graph) structure in the computer concept, and can be used as the basic data structure for program ledger combing.
Further, with the foregoing result, the program resource is used as a node (Vetex), the calling relationship of the program is used as an Edge (Edge), and the program calling relationship Graph (Graph) is constructed in the memory.
Then, the process of combing program ledgers related to a certain directory is to find a corresponding entry node according to the entry program of the column, and then, taking the node as a starting point, perform reachability query on the Graph to see which program resource nodes can be reached from the entry node. The program resources represented by all reachable nodes are all program lists of the corresponding columns.
Specifically, the entry program of the column function Func1 corresponding to the service type is Op _1, and by using the program call relation diagram shown in fig. 5, the node can start from the Op _1, and the reachable program resource node in the diagram is Jsp _ A, Jsp _ F, Jsp _ E. This results in a Func 1-related resource ledger list, as follows: op _1, Jsp _ A, Jsp _ F, Jsp _ E.
In this embodiment, when a node of a program resource that can be reached is found on a graph from an entry program node, a loop may appear, which causes repeated traversal and endless loop of the node. In order to avoid the problem, in the process of traversing, a mark is made on the program node which is reached, and the column information which is traversed currently is marked. Thus, when a node is reached, whether the node has a mark corresponding to the current column is judged:
if yes, the node is described to be traversed, and other nodes are stopped and traversed;
if not, the node is not traversed, the identified program is taken as the program of the column, and the traversal of the child node is continued.
Further, according to the foregoing flow, for each column of the internet bank, reachability query is performed on the graph structure from the column entry, and all programs represented by reachable nodes, that is, program lists of the columns, are obtained. And finally, importing the column obtained by the previous program and the incidence relation of the program into a database for the reference of other online banking development and designers. The number of the covered source files reaches nearly 4 thousands, the calling relation reaches more than 20 thousands, and powerful support is provided for assisting development and designers to make code level decisions.
The invention can greatly facilitate the design and development of the enterprise internet bank through the 'program resource calling relation diagram' of the program resource: the upstream and downstream resources influenced by the change of certain program resources can be obtained very conveniently through the relational network, and accurate modification and no leakage can be realized; when a designer designs and optimizes codes, the designer can conveniently know the workload difference of different schemes through a relational network; in addition, all program resources under the column menu can be obtained through the column menu inlet for design and development reference.
Fig. 8 is a schematic structural diagram of a program processing apparatus according to an embodiment of the present invention, where the apparatus includes:
the program classifying module 10 is configured to obtain code resources of a plurality of programs, classify the code resources, and determine a type corresponding to each program.
The method comprises the steps of reading code resources of all programs from an enterprise working area, classifying the code resources, namely extracting code resources of various types from the code resources, and determining the type corresponding to each program. Specifically, the program type includes Java and the like.
The call relation module 20 is configured to perform code analysis on the code resource to obtain a call relation between the programs belonging to the same type and a direct call relation between the programs belonging to the same type.
The regular expression is adopted to analyze each type of code resource, so as to obtain the mutual calling relation among the code resources and obtain the direct calling relation of the type of code resources to other types of resources.
And the program list module 30 is configured to generate a program call relationship diagram according to the mutual call relationship and the direct call relationship, and generate a program list corresponding to each service type according to a preset service type and the program call relationship diagram.
The direct calling relation and the mutual calling relation can represent the calling relation of the program from two layers, so that the calling relation of the program can be accurately determined. The direct calling relation and the mutual calling relation are taken as edges, and the program is taken as a node to construct a program calling relation graph
As an embodiment of the present invention, as shown in fig. 9, the call relation module 20 includes:
the mutual calling unit 21 is configured to perform code analysis on code resources of the programs belonging to the same type by using a regular expression, so as to obtain a mutual calling relationship between the programs belonging to the same type;
and the direct calling unit 22 is configured to perform code analysis on the code resources of the various types of programs by using the regular expression, so as to obtain a direct calling relationship between the various types of programs.
As an embodiment of the present invention, the program listing module 30 is further configured to construct a program call relationship graph by taking the mutual call relationship and the direct call relationship as edges and taking each program as a point.
As an embodiment of the present invention, as shown in fig. 10, the program list module 30 includes:
an entry program unit 31, configured to determine an entry program corresponding to each service type according to a preset service type;
and a program list unit 32, configured to perform reachability query in the program call relation graph according to the portal program, and generate a program list corresponding to each service type.
The invention also provides the program processing device based on the same application concept as the program processing method. Since the principle of solving the problem of the program processing apparatus is similar to that of the program processing method, the implementation of the program processing apparatus can refer to the implementation of the program processing method, and repeated descriptions are omitted.
The invention automatically combs program codes and analyzes the calling relationship among the programs to obtain a program calling relationship diagram, realizes the rapid generation of the program list corresponding to each service type, improves the accuracy and efficiency of program code modification and optimization, and can greatly facilitate service design and development.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 11, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 11; in addition, the electronic device 600 may also include components not shown in fig. 11, which may be referred to in the prior art.
As shown in fig. 11, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable devices. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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 in the flowchart flow or flows and/or block diagram block or blocks.
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.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A program processing method, characterized in that the method comprises:
code resources of a plurality of programs are obtained, the code resources are classified, and the type corresponding to each program is determined;
analyzing codes of the code resources to obtain mutual calling relations among the programs belonging to the same type and obtain direct calling relations among the programs of the types;
and generating a program calling relation graph according to the mutual calling relation and the direct calling relation, and generating a program list corresponding to each service type according to a preset service type and the program calling relation graph.
2. The method of claim 1, wherein the code parsing the code resource to obtain the mutual calling relationship between the programs belonging to the same type comprises:
and carrying out code analysis on the code resources of the programs belonging to the same type by using the regular expression to obtain the mutual calling relation among the programs belonging to the same type.
3. The method of claim 1, wherein the code parsing the code resource to obtain the direct call relationship between the types of programs comprises:
and carrying out code analysis on the code resources of the various types of programs by using the regular expression to obtain a direct calling relationship among the various types of programs.
4. The method of claim 1, wherein generating a program call relationship graph according to the mutual call relationship and the direct call relationship comprises:
and taking the mutual calling relation and the direct calling relation as edges, taking each program as a point, and constructing the program calling relation graph.
5. The method according to claim 1, wherein the generating a program list corresponding to each service type according to a preset service type and the program call relationship diagram comprises:
determining an inlet program corresponding to each service type according to a preset service type;
and performing reachability query in the program calling relation graph according to the entry program to generate a program list corresponding to each service type.
6. The method according to claim 1, wherein the performing reachability query in the program call relationship graph according to the portal program, and generating a program list corresponding to each service type includes:
according to the entry program, performing reachability query in the program calling relation graph to generate a program list corresponding to each service type;
and determining a basic data structure corresponding to each service type according to the program list.
7. The method according to claim 6, wherein the performing reachability query in the program call relationship graph according to the portal program, and generating a program list corresponding to each service type includes:
and according to the entry program, performing reachability query in the program calling relational graph, and marking the queried points in the program calling relational graph as traversed points to obtain a program list corresponding to each service type.
8. A program processing apparatus, characterized in that the apparatus comprises:
the program classification module is used for acquiring code resources of a plurality of programs, classifying the code resources and determining the type corresponding to each program;
the calling relation module is used for carrying out code analysis on the code resources to obtain the mutual calling relation among the programs belonging to the same type and obtain the direct calling relation among the programs of the types;
and the program list module is used for generating a program calling relation graph according to the mutual calling relation and the direct calling relation and generating a program list corresponding to each service type according to a preset service type and the program calling relation graph.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 7.
CN202210146045.4A 2022-02-17 2022-02-17 Program processing method and device Pending CN114489783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210146045.4A CN114489783A (en) 2022-02-17 2022-02-17 Program processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210146045.4A CN114489783A (en) 2022-02-17 2022-02-17 Program processing method and device

Publications (1)

Publication Number Publication Date
CN114489783A true CN114489783A (en) 2022-05-13

Family

ID=81482949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210146045.4A Pending CN114489783A (en) 2022-02-17 2022-02-17 Program processing method and device

Country Status (1)

Country Link
CN (1) CN114489783A (en)

Similar Documents

Publication Publication Date Title
CN110543301B (en) Method and device for generating jenkins code file
CN111949832A (en) Method and device for analyzing dependency relationship of batch operation
CN109299913B (en) Employee salary scheme generation method and device
CN114820080A (en) User grouping method, system, device and medium based on crowd circulation
CN112784112A (en) Message checking method and device
CN112860264B (en) Method and device for reconstructing abstract syntax tree
CN112988600A (en) Service scene testing method and device, electronic equipment and storage medium
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN110597765A (en) Large retail call center heterogeneous data source data processing method and device
CN114489783A (en) Program processing method and device
CN113190236B (en) HQL script verification method and device
CN113515447B (en) Automatic testing method and device for system
CN112948251B (en) Automatic software testing method and device
CN114968960A (en) Log processing method and device, computer equipment and storage medium
CN113722228A (en) Software system testing method and device
CN113553530A (en) Information reporting dynamic page configuration method and device
CN113419957A (en) Rule-based big data offline batch processing performance capacity scanning method and device
CN113506099A (en) Configuration system, method, computer device and storage medium for reporting service
CN112988598A (en) Method and device for automatically testing interface
CN113742212A (en) New and old system migration test method and device
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN111782641A (en) Data error repairing method and system
CN111767435A (en) User behavior analysis method and device
CN105320674B (en) Method and device for establishing domain ontology base and server
US11934396B2 (en) Data reconciliation for big data environments

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