[go: up one dir, main page]

CN117056566A - Business application query method and device, storage medium and electronic device - Google Patents

Business application query method and device, storage medium and electronic device Download PDF

Info

Publication number
CN117056566A
CN117056566A CN202311034438.7A CN202311034438A CN117056566A CN 117056566 A CN117056566 A CN 117056566A CN 202311034438 A CN202311034438 A CN 202311034438A CN 117056566 A CN117056566 A CN 117056566A
Authority
CN
China
Prior art keywords
program
service application
query
target
statement
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
CN202311034438.7A
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 CN202311034438.7A priority Critical patent/CN117056566A/en
Publication of CN117056566A publication Critical patent/CN117056566A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a query method and a query device for business application programs, a storage medium and an electronic device, and relates to the field of financial science and technology, wherein the method comprises the following steps: receiving a program inquiry request initiated by a client; generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation; executing the graph relation query statement in the program database to obtain a reference service application program meeting the target calling relation; and sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program. The application solves the problems of low query efficiency of the business application program and the like in the related technology.

Description

Query method and device for business application program, storage medium and electronic device
Technical Field
The present application relates to the field of financial science and technology, and in particular, to a method and apparatus for querying a service application, a storage medium, and an electronic device.
Background
In the related art, the main host system is mainly developed by IBM corporation, and the host is a product purchased and used by all major commercial banks. For call relation generation between service application programs running on IBM mainframe CICS, it is common at present to generate a unique identification ID (Identity Document, identity number) for each program name, then analyze the call relation between programs in the code, obtain the caller and the callee, and finally save the original call relation. When the calling relation of the program is to be inquired, the calling relation of the program which needs to be focused is obtained by splicing according to the original calling relation, obtaining the program name according to the ID and carrying out multiple association inquiry.
In this way, a large amount of time is often required to analyze the calling relationship between the programs, and a large amount of time is required to splice the original calling relationship, while the calling relationship between the programs is often complex, and a large amount of time is often required to be wasted to obtain the final query result.
Aiming at the problems of low query efficiency of service application programs and the like in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application mainly aims to provide a query method and device for service application programs, a storage medium and an electronic device, so as to solve the problems of low query efficiency of the service application programs in the related technology.
In order to achieve the above object, according to one aspect of the present application, there is provided a query method of a business application. The method comprises the following steps: receiving a program query request initiated by a client, wherein the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, and the target call relationship comprises a call relationship of calling other service application programs by the target service application program and/or a call relationship of calling other service application programs by the target service application program; generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure; executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure form, the graph structure form represents the service application program in a node mode, and the call relation among the service application programs in a node connection side mode; and sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
Optionally, the generating, using the target service application and the target call relationship, a graph relationship query statement corresponding to the program query request includes: generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program; generating a query statement, wherein the query statement is used for indicating that a query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is that the target service application program is called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is that the target service application program is called by other service application programs; generating a reply statement, wherein the reply statement is used for indicating to return a called party program corresponding to the target service application program in a graph structure when the target calling relationship is a calling relationship of the target service application program for calling other service application programs, and the reply statement is used for indicating to return a calling party program corresponding to the target service application program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the graph relationship query statement comprises: the matching statement, the query statement and the reply statement.
Optionally, the executing the graph relation query statement in the program database to obtain the reference service application program meeting the target call relation includes: executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database; executing the query statement on the reference graph structure to obtain a candidate graph structure conforming to the query condition indicated by the query statement; and executing the reply statement on the candidate graph structure to obtain the reference service application program.
Optionally, before the executing the graph relation query statement in the program database to obtain the reference service application program meeting the target call relation, the method further includes: accessing a program source code library; analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following steps: a calling party program, a called party program and a calling relation from the calling party program to the called party program; converting the service application program with the calling relation into a graph structure creation statement, wherein the graph structure creation statement is used for creating a graph structure for representing the service application program with the calling relation; and executing the graph structure creation statement in an initial program database to obtain the program database.
Optionally, the parsing the service application program with the calling relationship from the program source code library includes: acquiring target keywords used for representing calling relations among service application programs in the program; searching the target keywords from the program source code library; and determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, and determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, so as to obtain the business application program with the calling relation.
Optionally, the converting the service application program with the calling relationship into a graph structure creating statement includes: generating a node creation statement, wherein the node creation statement is used for creating a calling equation sequence node with the attribute of a calling party program and a called equation sequence node with the attribute of a called party program; a relationship creation statement is generated, wherein the relationship creation statement is used to match a calling equation order node and a called party program node in the initial program database and create an edge from the calling equation order node to the called equation order node.
Optionally, the executing the graph structure creation statement in the initial program database includes: executing the node creation statement on the initial program database, and adding attributes and node names for the created nodes; and executing the relation creation statement on the initial program database, wherein in the case that the created nodes are not matched, the created nodes are added to the initial program database, edges between the nodes are added, in the case that one created node is matched, the other created node is added to the initial program database, edges between the nodes are added, and in the case that all the created nodes are matched, edges between the nodes are added to the initial program database.
To achieve the above object, according to another aspect of the present application, there is provided a query device for a business application. The device comprises: the system comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving a program query request initiated by a client, the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, the target call relationship comprises a call relationship of the target service application program for calling other service application programs, and/or a call relationship of the target service application program called by other service application programs; the generation module is used for generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure; the first execution module is used for executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure mode, the graph structure mode represents the service application program in a node mode, and the call relation among the service application programs is represented by a connecting edge among the nodes; and the sending module is used for sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
According to the application, under the condition that the client side hopes to inquire the calling relation of the service application program, the method can execute the graph relation inquiry statement in the program database, so that the service application program which is called by the service application program and/or the service application program which is called by the service application program is inquired in the graph structure stored in the program database. Thereby achieving the technical effect of improving the query efficiency of the business application program.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
FIG. 1 is a flow chart of a method for querying a business application provided in accordance with an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative program database according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative query invocation relationship, in accordance with an embodiment of the application;
FIG. 4 is a schematic diagram of an alternative keyword implemented in accordance with the present application;
FIG. 5 is a schematic diagram of an alternative business application query device, in accordance with an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative business application query method in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of a query device of a business application according to an embodiment of the application;
fig. 8 is a schematic diagram of an alternative electronic device according to an embodiment of the application.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, the following will describe some terms or terminology involved in the embodiments of the present application:
and (3) a host computer: MAINFRAME, which refers to an IBM mainframe, or IBM mini-server that hosts the OS/390 operating system.
CICS (Customer Information Control System ): a host transaction processing middleware of IBM corporation supports online transaction service (OLTP), provides online transaction processing and transaction management for applications, can realize online transaction with high concurrency, and provides real-time transaction request and response for users.
Graph database: the data management system uses the point and edge as the basic storage units and uses the efficient storage and inquiry diagram data as the design principle. In graph databases, where relationships between data are as important as the data itself, they are stored as part of the data, such an architecture enables the graph database to quickly respond to complex associative queries. The use of graph databases is the best way to store, query and analyze highly interconnected data.
CQL: graph database query language.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The present application will be described with reference to preferred implementation steps, and fig. 1 is a flowchart of a method for querying a service application provided according to an embodiment of the present application, as shown in fig. 1, where the method includes the following steps:
Step S102, receiving a program query request initiated by a client, wherein the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, and the target call relationship comprises a call relationship of the target service application program for calling other service application programs and/or a call relationship of the target service application program for calling other service application programs;
step S104, generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure;
step S106, executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure form, the graph structure form represents the service application program by nodes, and the call relation among the service application programs is represented by connecting edges among the nodes;
Step S108, a program inquiry response is sent to the client, wherein the program inquiry response is used for indicating that the inquiry result of the program inquiry request is the reference service application program.
Through the steps, when the client side wants to inquire the calling relation of the service application program, the method can execute the diagram relation inquiry statement in the program database, so that the service application program which is called by the service application program and/or the service application program which is called by the service application program is inquired in the diagram structure stored in the program database. Thereby achieving the technical effect of improving the query efficiency of the business application program.
In the technical solution provided in step S102, the client may, but not limited to, display a call relationship query Interface (e.g., UI (User Interface)) of an application program, where the call relationship query Interface displays a plurality of service applications to be queried and call relationships of the plurality of service applications to be queried, determine, as a target service application, a service application having performed a selection operation in the call relationship query Interface, and determine, as a target call relationship, a call relationship having performed a selection operation in the call relationships of the target service application.
For example: the call relation query interface displays a plurality of service application programs 1, 2 and 3 to be queried, and call relations of the service application programs 1 for calling other service application programs, call relations of the service application programs 2 for calling other service application programs, call relations of the service application programs 3 for calling other service application programs, and call relations of the service application programs 3 for calling other service application programs. Wherein, the service application program 1 is executed with the selection operation, and the calling relation of the service application program 1 for calling other service application programs is executed with the selection operation, so that the calling relation of the service application program 1 is the calling relation of the service application program called by the service application program 1.
Optionally, in the query method of a service application provided in the embodiment of the present application, an application field and a call relationship field are displayed in a call relationship query interface of an application, and a target service application to which the application field is adjusted and a target call relationship to which the call relationship field is adjusted are respectively obtained.
By the method, the service application program which is expected to be inquired and the calling relation of the service application program are selected on the interface displayed by the client, and the operation experience of a user is improved.
In the technical solution provided in the above step S104, the graph relation query term may include, but is not limited to, a query term developed through a computer language, for example: the present application is not limited in this regard as to the JAVA language, or CQL, or c++, or other computer languages.
Optionally, in the query method of the service application program provided by the embodiment of the present application, the call relationships of each service application program are stored in the graph structure, and it can be understood that the call relationships of each service application program called by other service application programs and the call relationships of each service application program called by other service application programs are stored in the graph structure, and in the case that the query of the target call relationships of the target service application program is desired, the target call relationships of the target service application program can be directly queried from the graph structure, so that the analysis of the call relationships of each service application program is avoided, thereby obtaining the call relationships between the service application programs, reducing the time for determining the call relationships of the service application program, and improving the efficiency for determining the call relationships of the service application program.
In one exemplary embodiment, the graph relationship query statement corresponding to the target business application and target call relationship generator query request may be used, but is not limited to, by: generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program; generating a query statement, wherein the query statement is used for indicating that a query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is that the target service application program is called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is that the target service application program is called by other service application programs; generating a reply statement, wherein the reply statement is used for indicating to return a called party program corresponding to the target service application program in a graph structure when the target calling relationship is a calling relationship of the target service application program for calling other service application programs, and the reply statement is used for indicating to return a calling party program corresponding to the target service application program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the graph relationship query statement comprises: the matching statement, the query statement and the reply statement.
Optionally, in the query method of the service application provided by the embodiment of the present application, the generation sequence of the matching statement, the query statement and the reply statement may be, but is not limited to, for example: the matching statement, the query statement, and the reply statement are generated in a random order. Such as: the method can be that firstly generates the query sentence, regenerates the matching sentence, and finally generates the reply sentence, or firstly generates the reply sentence, regenerates the matching sentence and finally generates the query sentence. The order between the matching statement, the query statement, and the reply statement included in the graph relational query statement is fixed, such as: the matching statement, the query statement and the reply statement which are sequentially connected are included in the graph relation query statement.
Optionally, in the query method of the service application provided by the embodiment of the present application, the matching statement, the query statement and the reply statement may include, but are not limited to, statements developed by a computer language, for example: JAVA language, or CQL, or c++, or the like. The matching statement may be, but is not limited to being: MATCH (linkprog: caller program) - [: link ] - (islinkedprog: callee program), for example: the matching statement may be MATCH (linkprog: prog) - [: link ] - (islinkedprog: prog).
Optionally, in the query method of a service application provided in the embodiment of the present application, when the target calling relationship is a calling relationship of a target service application for calling other service applications, the query statement is used to indicate that the query condition is that the target service application is a calling party program in the graph structure, for example: the query statement is used for indicating that the query conditions are: WHERE caller= "caller identification", such as: the query statement is used to instruct the query conditional service application PROG2 to call the call relationship of other service applications, in which case the query statement may be: WHERE linkprog.name= "PROG2".
Optionally, in the query method of a service application provided in the embodiment of the present application, when the target calling relationship is a calling relationship of a target service application called by another service application, the query statement is used to indicate that the query condition is that the target service application is a called party program in the graph structure, for example: the query statement is used for indicating that the query conditions are: WHERE callee procedure= "identification of callee procedure". Such as: the query statement is used to indicate the calling relationship of the query condition service application PROG2 called by other service applications, in which case the query statement may be: WHERE islinkedprog.name= "PROG2".
Optionally, in the query method of a service application provided in the embodiment of the present application, when the target calling relationship is a calling relationship of a target service application for calling other service applications, the reply sentence is used to indicate to return to a called party program corresponding to the target service application in the graph structure, for example: the query statement is: in the case WHERE name= "PROG2", the reply sentence may be, but is not limited to, a return to other business application called by business application PROG2, such as: PROG1 and PROG3, in which case the reply sentence may be, but is not limited to,: RETURN linkprog.PROG1PROG3.
Optionally, in the query method of a service application provided in the embodiment of the present application, when the target call relationship is a call relationship of a target service application called by another service application, the reply sentence is used to indicate to return to a corresponding caller program of the target service application in the graph structure, for example: the query statement may be: in the case WHERE there is an islinkedprog.name= "PROG2", the reply sentence may be, but is not limited to, a return to the business application that invoked the business application PROG2, such as: PROG1 and PROG6, in which case the reply sentence may be, but is not limited to,: RETURN islingkenedprog.PROG1PROG6.
In the technical solution provided in step S106, the form of the graph structure may be, but is not limited to, that the nodes represent the service applications, and that the connection edges between the nodes represent the calling relationships between the service applications, and that the connection edges between the nodes may be, but are not limited to, having directions, and that the directions of the connection edges between the nodes may be, but are not limited to, pointing from the calling party program to the called party program. For example: business application 1 invokes business application 2, business application 1 corresponds to node 1, business application 2 corresponds to node 2, in which case the direction of the connecting edge between node 1 and node 2 is from node 1 to node 2.
Optionally, in the query method of a service application provided by the embodiment of the present application, the same service application may be called by a plurality of service applications, or the same service application may be called by a plurality of service applications, where in this case, nodes corresponding to the same service application may have connection edges with nodes corresponding to the plurality of service applications. Business application 1 and business application 3 both call business application 2, business application 1 corresponds to node 1, business application 2 corresponds to node 2, business application 3 corresponds to node 3, in which case the direction of the connecting edge between node 1 and node 2 is from node 1 to node 2, and the direction of the connecting edge between node 1 and node 3 is from node 1 to node 3.
In one exemplary embodiment, the reference business application satisfying the target call relationship may be obtained by, but is not limited to, executing the graph relationship query statement in the program database by: executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database; executing the query statement on the reference graph structure to obtain a candidate graph structure conforming to the query condition indicated by the query statement; and executing the reply statement on the candidate graph structure to obtain the reference service application program.
Optionally, in the query method of service application provided by the embodiment of the present application, at least one connection edge is provided for a node corresponding to each service application in the reference graph structure, that is, a service application having a calling relationship is first obtained from a program database. The candidate graph structure meeting the query condition indicated by the query statement may be further obtained from the reference graph structure, but is not limited to, it being understood that the candidate graph structure is obtained from the reference graph structure by obtaining the graph structure including the node corresponding to the target service application. The node of the candidate graph structure pointed to the node corresponding to the target service application program and/or the node pointed to by the node corresponding to the target service application program may be further obtained by, but not limited to, executing the matching statement in the candidate graph structure.
For a better understanding of the query method of the service application in the embodiment of the present application, the following description and description will be made with reference to alternative embodiments, which may be, but are not limited to, applicable to the embodiment of the present application.
Taking 7 host programs PROG1 to 7 (or referred to as service application programs PROG1 to 7) in the library as an example, the call relationship between the service application programs PROG1 to 7 is as follows:
the service application program PROG1 invokes the service application program PROG2 and the service application program PROG6; the service application program PROG2 is called by the service application program PROG1 and the service application program PROG6, and simultaneously, the service application program PROG2 also calls the service application program PROG3; the service application program PROG3 is called by the service application program PROG2, and simultaneously, the service application program PROG3 also calls the service application program PROG4 and the service application program PROG5; the service application program PROG4 is called by the service application program PROG3, and at the same time, the service application program PROG4 also calls the service application program PROG5; the service application PROG5 is invoked by the service application PROG4, the service application PROG3 and the service application PROG 7; the service application PROG7 invokes the service application PROG5.
It can be seen that the service application programs have a complicated call relationship and a multi-layer call long-chain relationship. This relationship is difficult to implement in the related art, and the problem of query efficiency is solved, so that the efficiency is not acceptable after the data reaches a certain amount. When the relation between the intricate and multi-layer calling is converted into the form of a graph and is solidified to a graph database, the calling and called relation of any program in the program library and the indirect calling relation of any layer number can be rapidly obtained, and the problem can be solved. FIG. 2 is a schematic diagram of an alternative program database for storing business applications in the form of a graph structure representing business applications in terms of nodes and calling relationships between business applications in terms of connecting edges between nodes, as shown in FIG. 2, in accordance with an embodiment of the present application. For example: the connection edges of the nodes of the service application PROG1 point to the nodes of the service application PROG6 and the nodes of the service application PROG2, it being understood that the service application PROG1 invokes the service application PROG6 and the service application PROG2.
FIG. 3 is a schematic diagram of an alternative query invocation relationship, as shown in FIG. 3, for finding out which business applications have invoked or are invoked by which business applications by executing a graph query simple statement (or called a graph relational query statement) in a program database, according to an embodiment of the present application. For example, to quickly find all business applications that call the business application PROG2, the underlying query statement may be expressed as follows:
MATCH(linkprog:Prog)-[:link]-(islinkedprog:Prog)
WHERE islinkedprog.name=”PROG2”
RETURN linkprog. The result is the business applications PROG1 and PROG6.
For another example, to quickly find all business applications invoked by the business application PROG3, the underlying query statement may be expressed as follows:
MATCH(linkprog:Prog)-[:link]-(islinkedprog:Prog)
WHERE linkprog.name=”PROG3”
RETURN linkprog. The result is the business applications PROG4 and PROG5.
In one exemplary embodiment, the program database may be obtained, but is not limited to, by: accessing a program source code library; analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following steps: a calling party program, a called party program and a calling relation from the calling party program to the called party program; converting the service application program with the calling relation into a graph structure creation statement, wherein the graph structure creation statement is used for creating a graph structure for representing the service application program with the calling relation; and executing the graph structure creation statement in an initial program database to obtain the program database.
Alternatively, in the present embodiment, in the case of creating the program database for the first time, the initial program database may be, but is not limited to being, empty. It will be appreciated that there is no graph structure already created in the initial program database, in which case the program database may be obtained by, but is not limited to, creating a graph structure for the business application having a correspondence in the program source code library.
Alternatively, in the present embodiment, without executing the creation of the program database, it may be understood that the calling relationships of the respective business applications are already stored in the initial program database, and in such a case, the calling relationships of the part of the caller programs in the program source code library to the callee programs may be changed, for example: the service application program 1 calls the service application program 2 before the change, and the service application program 2 calls the service application program 1 after the change. In such a case, the program database may be obtained by, but not limited to, updating the graph structure of the call relationship of the service application program whose call has changed in the initial program database, and keeping the graph structure of the service application program whose call relationship has not changed unchanged.
In one exemplary embodiment, a business application having a calling relationship may be parsed from a program source code library, but is not limited to, by: acquiring target keywords used for representing calling relations among service application programs in the program; searching the target keywords from the program source code library; and determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, and determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, so as to obtain the business application program with the calling relation.
Alternatively, in this embodiment, the target keyword may include, but is not limited to, a preset keyword. Fig. 4 is a schematic diagram of an alternative keyword implemented according to the present application, as shown in fig. 4, the program 1 may include but is not limited to PROG 1CALL PROG 2, the program 2 may include but is not limited to PROG 1LINK PROG, and the preset keyword may include but is not limited to CALL or LINK.
The initiator to which the searched CALL or LINK is connected may be determined as a caller program, and the terminator to which the searched CALL or LINK is connected may be determined as a callee program, but not limited thereto. For example: PROG 1call PROG 2, PROG 1 is a calling party program, and PROG 2 is a called party program in this case. Also for example: PROG 1link PROG 2 in this case, PROG 1 is the calling party program and PROG 2 is the called party program.
In one exemplary embodiment, a business application having a calling relationship may be converted into a graph structure creation statement by, but is not limited to: generating a node creation statement, wherein the node creation statement is used for creating a calling equation sequence node with the attribute of a calling party program and a called equation sequence node with the attribute of a called party program; a relationship creation statement is generated, wherein the relationship creation statement is used to match a calling equation order node and a called party program node in the initial program database and create an edge from the calling equation order node to the called equation order node.
Alternatively, in this embodiment, the node creation statement may, but is not limited to, create a calling equation node whose attribute is the program identifier of the caller program and a called equation node whose attribute is the program identifier of the callee program, for example: the attribute is the program name or code number of the caller program, etc., and the attribute is the program name or code number of the callee program, etc. The relationship creation statement is used to match the calling and called program nodes in the initial program database and create edges from the calling to called program nodes, it being understood that the edges of the calling to called program nodes may have directions including, but not limited to, pointing from the calling program node to the called program node.
To better understand the generation process of the graph structure creation statement in the embodiment of the present application, taking the service application program "PROG1" calling "PROG2" as an example, the process of generating the "create" executable statement (or called the graph structure creation statement) of the CQL through the "node" and the "calling relationship" may be, but is not limited to, as follows: two nodes of a calling party program 'linkprog' and a called party program 'islinkedprog' are established, the labels are 'Prog', an attribute 'name' is added into the two nodes, and the attribute value of the attribute designates the program name associated with the node. The underlying CQL "create" executable statement may be expressed as:
the node creation statement may be, but is not limited to being: CREATE (linkprog: prog { name: "Prog1" }) (islinkedprog: prog { name: "Prog2" });
the relationship creation statement may be, but is not limited to being: MATCH (linkprog: prog { name: "Prog1" }) (islinkedprog: prog { name: "Prog2" }) CREATE (linkprog) - [: link ] - (islinkedprog). By executing the node creation statement and the relationship creation statement, the edges from the node of the service application program PROG1 to the node of the service application program PROG2 can be created.
In one exemplary embodiment, the graph structure creation statement may be executed in the initial program database by, but is not limited to, the following: executing the node creation statement on the initial program database, and adding attributes and node names for the created nodes; and executing the relation creation statement on the initial program database, wherein in the case that the created nodes are not matched, the created nodes are added to the initial program database, edges between the nodes are added, in the case that one created node is matched, the other created node is added to the initial program database, edges between the nodes are added, and in the case that all the created nodes are matched, edges between the nodes are added to the initial program database.
Optionally, in the query method of the service application provided by the embodiment of the present application, in the case that the created node is not matched, it may be indicated that the created node does not exist in the initial program database, and it may be understood that the created node may be a newly added caller program and a callee program, where in this case, the created node may be added to the initial program database and an edge between the nodes may be added.
Optionally, in the query method of the service application provided by the embodiment of the present application, in a case of matching to a created node, for example: adding the created nodes of the called program to the initial program database and adding edges between the nodes under the condition that the created nodes of the called program are matched; alternatively, in the case of matching to the node of the created callee program, the node of the created callee program is added to the initial program database, and edges between the nodes are added.
In the technical solution provided in step S108, a program query response may be, but is not limited to, sent to the client, where the program query response is used to indicate that the query result of the program query request is a reference service application, and it may be understood that the reference service application may be a service application invoked by the target service application and/or a service application invoked by the target service application. By the method, the calling relation among the queried service application programs is simply and intuitively displayed on the client, and the readability of the query result of the calling relation of the service application programs is improved.
In order to better understand the query method of the service application in the embodiment of the present application, the query method of the service application in the embodiment of the present application is explained and illustrated below in conjunction with an alternative embodiment, which can be applied to, but not limited to, the embodiment of the present application.
Fig. 5 is a schematic diagram of an alternative query device for a business application according to an embodiment of the present application, as shown in fig. 5, the query device for a business application may include, but is not limited to, a program library (or called program source code library) 101, a program parsing and CQL generating module 102, a CQL updating module 103, a graph database (or called program database) 104, a CQL querying module 105, and a UI interface 106 in a client.
The library 101 is a source library for storing host applications, and contains the full amount of program source codes P1, P2, P3, and P4 … …. The host programs have complicated calling relations, such as P1 calling P2, P2 calling P4, P4 calling P3, P3 calling P2 and the like, and the program source codes can be called by using keywords such as 'CALL' or 'LINK'.
Program parsing and CQL generation module 102 has two main units: the first is a host program source code analyzing unit, which scans and reads the programs in the program library 101 one by one, and analyzes the source code according to the key words such as "CALL" or "LINK" to obtain the program name of the calling party program and the program name of the called party program; and the CQL executable statement generating unit is used for converting the calling party program name and the called party program name obtained by the analysis of the host program source code analysis unit into 'nodes' of the graph database, converting the program calling relationship into 'relationships' of the graph database and generating the CQL executable statement according to the 'nodes' and the 'relationships'.
The CQL updating module 103 reads the CQL executable statement generated by the program parsing and CQL generating module 102, connects the graph database 104, executes the CQL executable statement generated by the program parsing and CQL generating module 102, and inserts the relationship of the call relationship between programs into the graph database 104, and performs curing by the graph database 104.
The graph database 104 interfaces with the CQL updating module 103 for storing caller program and callee program node information and association relationships between nodes, and attributes of the nodes include, but are not limited to, version of the program or modification time. In addition, graph database 104 also accepts program call relational query instructions from CQL query module 105.
The CQL query module 105 generates a CQL map relationship query statement according to the information such as the call type and the program name transmitted from the UI interface 106, connects the map database, executes the CQL map relationship query statement, acquires the call or called condition of the program, returns the result to the terminal, and outputs the result to the UI interface 106.
The UI interface 106 is a channel of input and output interaction that the system provides to the user. The user may input the call relationship of the program desired to be queried through the UI interface 106 and receive the query result returned from the CQL query module 105.
FIG. 6 is a schematic diagram of an alternative business application query method according to an embodiment of the present application, as shown in FIG. 6, which may include, but is not limited to, the following steps:
step S601, acquiring a program library (or called a program source code library) which needs to be scanned at the time;
step S602, scanning programs in a program library, and performing code analysis (preset keywords such as CALL or LINK) to obtain calling relations among the programs;
step S603, converting the calling program and the called program into 'nodes' of the graph database, and converting the calling relationship between the programs into 'relationships' of the graph database;
in step S604, a graph structure creation statement is generated by "nodes" and "relationships", such as: "Create" executable statements of CQL;
step S605 determines whether the procedure has been completed for all scans. If not, executing step S602; if yes, go to step S606;
step S606, the graph database is connected, and an executable statement of CQL creation is executed to generate a relationship graph;
in step S607, it is determined whether there is a front-end UI query request (or referred to as a program query request). If not, executing step S611; if yes, go to step S608;
step S608, generating a CQL relationship query statement (or referred to as a graph relationship query statement) according to the query type, the program name, etc. as parameters;
Step S609, a graph database (or called a program database) is connected, a CQL graph relation query statement is executed, and a query result is obtained;
step S610, returning the relation query result (or called as program query response) to the terminal and outputting the relation query result to the UI interface;
in step S611, the processing flow ends.
Through the mode, the clearing of the calling relationship among the programs is crucial, and the clearing of the calling relationship among the programs has the effect of half effort on problem investigation, business understanding, integrated test and the like. However, clearing the calling relationship among the programs is not easy, and especially for the traversal of huge program quantity, huge original calling relationship quantity and intricate multi-layer calling relationship of the program library, the complexity is rapidly increased along with the depth of the calling relationship.
According to the query method of the business application program, under the condition that the client side wants to query the calling relation of the business application program, the query statement of the graph relation can be executed in the program database, so that the business application program which is called by the business application program and/or the business application program which is called by the business application program is queried in the graph structure which is stored in the program database. Thereby achieving the technical effect of improving the query efficiency of the business application program.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment of the application also provides a query device of the service application program, and the query device of the service application program can be used for executing the query method for the service application program. The following describes a query device for a service application provided by an embodiment of the present application.
Fig. 7 is a schematic diagram of a query device of a business application according to an embodiment of the present application. As shown in fig. 7, the apparatus includes:
a receiving module 702, configured to receive a program query request initiated by a client, where the program query request is used to request to query a target call relationship of a target service application, where the target service application is used to execute a target transaction service, and the target call relationship includes a call relationship that the target service application calls other service applications, and/or a call relationship that the target service application is called by other service applications;
A generating module 704, configured to generate a graph relationship query statement corresponding to the program query request by using the target service application program and the target call relationship, where the graph relationship query statement is used to query the graph structure for the target call relationship of the target service application program;
a first execution module 706, configured to execute the graph relationship query statement in a program database, to obtain a reference service application program that meets the target call relationship, where the program database is configured to store the service application program in a graph structure, and the graph structure represents the service application program in a form of nodes, and represents a call relationship between the service application programs in a form of connecting edges between the nodes;
and a sending module 708, configured to send a program query response to the client, where the program query response is used to indicate that the query result of the program query request is the reference service application program.
Optionally, in the query device for a service application provided by the embodiment of the present application, the generating module includes:
the first generation unit is used for generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program;
The second generating unit is used for generating a query statement, wherein the query statement is used for indicating that the query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs;
a third generating unit, configured to generate a reply sentence, where, in a case where the target call relationship is a call relationship of the target service application program for calling another service application program, the reply sentence is used to instruct to return a called party program corresponding to the target service application program in a graph structure, and in a case where the target call relationship is a call relationship of the target service application program called by another service application program, the reply sentence is used to instruct to return a calling party program corresponding to the target service application program in a graph structure, and the graph relationship query sentence includes: the matching statement, the query statement and the reply statement.
Optionally, in the query device for a service application provided by the embodiment of the present application, the first execution module includes:
the first execution unit is used for executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database;
the second execution unit is used for executing the query statement on the reference graph structure to obtain a candidate graph structure which accords with the query condition indicated by the query statement;
and the third execution unit is used for executing the reply statement on the candidate graph structure to obtain the reference service application program.
Optionally, in the query device for a service application provided by the embodiment of the present application, the device further includes:
the access module is used for accessing a program source code library before the graph relation query statement is executed in the program database to obtain a reference service application program meeting the target calling relation;
the analysis module is used for analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following components: a calling party program, a called party program and a calling relation from the calling party program to the called party program;
The creating module is used for converting the service application program with the calling relation into a graph structure creating statement, wherein the graph structure creating statement is used for creating a graph structure representing the service application program with the calling relation;
and the second execution module is used for executing the graph structure creation statement in the initial program database to obtain the program database.
Optionally, in the query device for a service application provided by the embodiment of the present application, the parsing module includes:
the acquisition unit is used for acquiring target keywords used for representing calling relations among service application programs in the programs;
the searching unit is used for searching the target keywords from the program source code library;
and the determining unit is used for determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, and obtaining the business application program with the calling relation.
Optionally, in the query device for a service application provided by the embodiment of the present application, the creating module includes:
A fourth generating unit, configured to generate a node creation statement, where the node creation statement is configured to create a calling equation sequence node with an attribute being a caller program and a called equation sequence node with an attribute being a callee program;
and a fifth generating unit configured to generate a relationship creation statement for matching a calling equation sequence node and a called party program node in the initial program database and creating an edge from the calling equation sequence node to the called equation sequence node.
Optionally, in the query device for a service application provided by the embodiment of the present application, the second execution module includes:
the fourth execution unit is used for executing the node creation statement on the initial program database and adding attributes and node names for the created nodes;
and a fifth execution unit, configured to execute the relationship creation statement on the initial program database, where, in a case where no created node is matched, create nodes and add edges between nodes to the initial program database, in a case where one created node is matched, add another created node to the initial program database and add edges between nodes to the initial program database, and in a case where all created nodes are matched, add edges between nodes to the initial program database.
Through the steps, when the client side wants to inquire the calling relation of the service application program, the method can execute the diagram relation inquiry statement in the program database, so that the service application program which is called by the service application program and/or the service application program which is called by the service application program is inquired in the diagram structure stored in the program database. Thereby achieving the technical effect of improving the query efficiency of the business application program.
The query device of the business application program comprises a processor and a memory, wherein the units and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the query efficiency of the business application program is improved by adjusting the kernel parameters (the purpose of the invention).
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the application provides a computer readable storage medium, wherein a program is stored on the computer readable storage medium, and the program is executed by a processor to realize the query method of the business application program.
The embodiment of the application provides a processor which is used for running a program, wherein the query method of the business application program is executed when the program runs.
Fig. 8 is a schematic diagram of an alternative electronic device according to an embodiment of the present application, and as shown in fig. 8, an embodiment of the present application provides an electronic device, where the device includes a processor, a memory, and a program stored on the memory and executable on the processor, and the processor implements the following steps when executing the program: receiving a program query request initiated by a client, wherein the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, and the target call relationship comprises a call relationship of calling other service application programs by the target service application program and/or a call relationship of calling other service application programs by the target service application program; generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure; executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure form, the graph structure form represents the service application program in a node mode, and the call relation among the service application programs in a node connection side mode; and sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
Optionally, the following steps may be implemented when the above processor executes a program: generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program; generating a query statement, wherein the query statement is used for indicating that a query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is that the target service application program is called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is that the target service application program is called by other service application programs; generating a reply statement, wherein the reply statement is used for indicating to return a called party program corresponding to the target service application program in a graph structure when the target calling relationship is a calling relationship of the target service application program for calling other service application programs, and the reply statement is used for indicating to return a calling party program corresponding to the target service application program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the graph relationship query statement comprises: the matching statement, the query statement and the reply statement.
Optionally, the following steps may be implemented when the above processor executes a program: executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database; executing the query statement on the reference graph structure to obtain a candidate graph structure conforming to the query condition indicated by the query statement; and executing the reply statement on the candidate graph structure to obtain the reference service application program.
Optionally, the following steps may be implemented when the above processor executes a program: accessing a program source code library; analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following steps: a calling party program, a called party program and a calling relation from the calling party program to the called party program; converting the service application program with the calling relation into a graph structure creation statement, wherein the graph structure creation statement is used for creating a graph structure for representing the service application program with the calling relation; and executing the graph structure creation statement in an initial program database to obtain the program database.
Optionally, the following steps may be implemented when the above processor executes a program: acquiring target keywords used for representing calling relations among service application programs in the program; searching the target keywords from the program source code library; and determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, and determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, so as to obtain the business application program with the calling relation.
Optionally, the following steps may be implemented when the above processor executes a program: generating a node creation statement, wherein the node creation statement is used for creating a calling equation sequence node with the attribute of a calling party program and a called equation sequence node with the attribute of a called party program; a relationship creation statement is generated, wherein the relationship creation statement is used to match a calling equation order node and a called party program node in the initial program database and create an edge from the calling equation order node to the called equation order node.
Optionally, the following steps may be implemented when the above processor executes a program: executing the node creation statement on the initial program database, and adding attributes and node names for the created nodes; and executing the relation creation statement on the initial program database, wherein in the case that the created nodes are not matched, the created nodes are added to the initial program database, edges between the nodes are added, in the case that one created node is matched, the other created node is added to the initial program database, edges between the nodes are added, and in the case that all the created nodes are matched, edges between the nodes are added to the initial program database.
The device herein may be a server, PC, PAD, cell phone, etc.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: receiving a program query request initiated by a client, wherein the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, and the target call relationship comprises a call relationship of calling other service application programs by the target service application program and/or a call relationship of calling other service application programs by the target service application program; generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure; executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure form, the graph structure form represents the service application program in a node mode, and the call relation among the service application programs in a node connection side mode; and sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program; generating a query statement, wherein the query statement is used for indicating that a query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is that the target service application program is called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is that the target service application program is called by other service application programs; generating a reply statement, wherein the reply statement is used for indicating to return a called party program corresponding to the target service application program in a graph structure when the target calling relationship is a calling relationship of the target service application program for calling other service application programs, and the reply statement is used for indicating to return a calling party program corresponding to the target service application program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the graph relationship query statement comprises: the matching statement, the query statement and the reply statement.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database; executing the query statement on the reference graph structure to obtain a candidate graph structure conforming to the query condition indicated by the query statement; and executing the reply statement on the candidate graph structure to obtain the reference service application program.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: accessing a program source code library; analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following steps: a calling party program, a called party program and a calling relation from the calling party program to the called party program; converting the service application program with the calling relation into a graph structure creation statement, wherein the graph structure creation statement is used for creating a graph structure for representing the service application program with the calling relation; and executing the graph structure creation statement in an initial program database to obtain the program database.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: acquiring target keywords used for representing calling relations among service application programs in the program; searching the target keywords from the program source code library; and determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, and determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, so as to obtain the business application program with the calling relation.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: generating a node creation statement, wherein the node creation statement is used for creating a calling equation sequence node with the attribute of a calling party program and a called equation sequence node with the attribute of a called party program; a relationship creation statement is generated, wherein the relationship creation statement is used to match a calling equation order node and a called party program node in the initial program database and create an edge from the calling equation order node to the called equation order node.
Optionally, the computer program product mentioned above, when executed on a data processing device, is adapted to perform a program initialized with the method steps of: executing the node creation statement on the initial program database, and adding attributes and node names for the created nodes; and executing the relation creation statement on the initial program database, wherein in the case that the created nodes are not matched, the created nodes are added to the initial program database, edges between the nodes are added, in the case that one created node is matched, the other created node is added to the initial program database, edges between the nodes are added, and in the case that all the created nodes are matched, edges between the nodes are added to the initial program database.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method for querying a business application, comprising:
receiving a program query request initiated by a client, wherein the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, and the target call relationship comprises a call relationship of calling other service application programs by the target service application program and/or a call relationship of calling other service application programs by the target service application program;
generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure;
executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure form, the graph structure form represents the service application program in a node mode, and the call relation among the service application programs in a node connection side mode;
And sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
2. The method of claim 1, wherein the generating the graph relationship query statement corresponding to the program query request using the target business application and the target call relationship comprises:
generating a matching statement, wherein the matching statement is used for matching a graph structure of a calling equation sequence connected to a called party program;
generating a query statement, wherein the query statement is used for indicating that a query condition is that the target service application program is a calling party program in a graph structure when the target calling relationship is that the target service application program is called by other service application programs, and the query statement is used for indicating that the query condition is that the target service application program is a called party program in the graph structure when the target calling relationship is that the target service application program is called by other service application programs;
generating a reply statement, wherein the reply statement is used for indicating to return a called party program corresponding to the target service application program in a graph structure when the target calling relationship is a calling relationship of the target service application program for calling other service application programs, and the reply statement is used for indicating to return a calling party program corresponding to the target service application program in the graph structure when the target calling relationship is a calling relationship of the target service application program called by other service application programs, and the graph relationship query statement comprises: the matching statement, the query statement and the reply statement.
3. The method of claim 2, wherein executing the graph relationship query statement in a program database results in a reference business application that satisfies the target call relationship, comprising:
executing the matching statement on the graph structure in the program database to obtain a reference graph structure conforming to the matching statement in the program database;
executing the query statement on the reference graph structure to obtain a candidate graph structure conforming to the query condition indicated by the query statement;
and executing the reply statement on the candidate graph structure to obtain the reference service application program.
4. The method of claim 1, wherein prior to said executing the graph relationship query statement in a program database to obtain a reference business application that satisfies the target call relationship, the method further comprises:
accessing a program source code library;
analyzing the service application program with the calling relation from the program source code library, wherein the service application program with the calling relation comprises the following steps: a calling party program, a called party program and a calling relation from the calling party program to the called party program;
Converting the service application program with the calling relation into a graph structure creation statement, wherein the graph structure creation statement is used for creating a graph structure for representing the service application program with the calling relation;
and executing the graph structure creation statement in an initial program database to obtain the program database.
5. The method of claim 4, wherein parsing the business application having the calling relationship from the program source code library comprises:
acquiring target keywords used for representing calling relations among service application programs in the program;
searching the target keywords from the program source code library;
and determining the initiator connected with the searched target keyword as a calling party program, determining the terminator connected with the searched target keyword as a called party program, and determining the connection from the initiator to the terminator as a calling relation from the calling party program to the called party program, so as to obtain the business application program with the calling relation.
6. The method of claim 4, wherein converting the business application having the call relationship into a graph structure creation statement comprises:
Generating a node creation statement, wherein the node creation statement is used for creating a calling equation sequence node with the attribute of a calling party program and a called equation sequence node with the attribute of a called party program;
a relationship creation statement is generated, wherein the relationship creation statement is used to match a calling equation order node and a called party program node in the initial program database and create an edge from the calling equation order node to the called equation order node.
7. The method of claim 6, wherein executing the graph structure creation statement in an initial program database comprises:
executing the node creation statement on the initial program database, and adding attributes and node names for the created nodes;
and executing the relation creation statement on the initial program database, wherein in the case that the created nodes are not matched, the created nodes are added to the initial program database, edges between the nodes are added, in the case that one created node is matched, the other created node is added to the initial program database, edges between the nodes are added, and in the case that all the created nodes are matched, edges between the nodes are added to the initial program database.
8. A business application query device, comprising:
the system comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving a program query request initiated by a client, the program query request is used for requesting to query a target call relationship of a target service application program, the target service application program is used for executing a target transaction service, the target call relationship comprises a call relationship of the target service application program for calling other service application programs, and/or a call relationship of the target service application program called by other service application programs;
the generation module is used for generating a graph relation query statement corresponding to the program query request by using the target service application program and the target call relation, wherein the graph relation query statement is used for querying the target call relation of the target service application program from a graph structure;
the first execution module is used for executing the graph relation query statement in a program database to obtain a reference service application program meeting the target call relation, wherein the program database is used for storing the service application program in a graph structure mode, the graph structure mode represents the service application program in a node mode, and the call relation among the service application programs is represented by a connecting edge among the nodes;
And the sending module is used for sending a program query response to the client, wherein the program query response is used for indicating that the query result of the program query request is the reference service application program.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 7 by means of the computer program.
CN202311034438.7A 2023-08-16 2023-08-16 Business application query method and device, storage medium and electronic device Pending CN117056566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311034438.7A CN117056566A (en) 2023-08-16 2023-08-16 Business application query method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311034438.7A CN117056566A (en) 2023-08-16 2023-08-16 Business application query method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117056566A true CN117056566A (en) 2023-11-14

Family

ID=88656768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311034438.7A Pending CN117056566A (en) 2023-08-16 2023-08-16 Business application query method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117056566A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486563A (en) * 2020-12-02 2021-03-12 车智互联(北京)科技有限公司 Code management method, system, computing device and readable storage medium
WO2021168634A1 (en) * 2020-02-24 2021-09-02 深圳中砼物联网科技有限公司 Graphical codeless programming method, computer device, and storage medium
CN113609347A (en) * 2021-10-08 2021-11-05 支付宝(杭州)信息技术有限公司 Data storage and query method, device and database system
CN113886839A (en) * 2021-10-21 2022-01-04 中国工商银行股份有限公司 Method and device for identifying risk problems in batch job dependencies
CN114443780A (en) * 2021-12-28 2022-05-06 阿里云计算有限公司 Data processing method, device, equipment and storage medium
CN114489783A (en) * 2022-02-17 2022-05-13 中国工商银行股份有限公司 Program processing method and device
CN115130456A (en) * 2022-05-25 2022-09-30 腾讯科技(深圳)有限公司 Sentence parsing and matching model training method, device, equipment and storage medium
CN115827720A (en) * 2022-09-26 2023-03-21 中国工商银行股份有限公司 Big data query method and device, processor and electronic equipment
CN115964384A (en) * 2023-01-10 2023-04-14 中国建设银行股份有限公司 Data query method and device, electronic equipment and computer readable medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021168634A1 (en) * 2020-02-24 2021-09-02 深圳中砼物联网科技有限公司 Graphical codeless programming method, computer device, and storage medium
CN112486563A (en) * 2020-12-02 2021-03-12 车智互联(北京)科技有限公司 Code management method, system, computing device and readable storage medium
CN113609347A (en) * 2021-10-08 2021-11-05 支付宝(杭州)信息技术有限公司 Data storage and query method, device and database system
CN113886839A (en) * 2021-10-21 2022-01-04 中国工商银行股份有限公司 Method and device for identifying risk problems in batch job dependencies
CN114443780A (en) * 2021-12-28 2022-05-06 阿里云计算有限公司 Data processing method, device, equipment and storage medium
CN114489783A (en) * 2022-02-17 2022-05-13 中国工商银行股份有限公司 Program processing method and device
CN115130456A (en) * 2022-05-25 2022-09-30 腾讯科技(深圳)有限公司 Sentence parsing and matching model training method, device, equipment and storage medium
CN115827720A (en) * 2022-09-26 2023-03-21 中国工商银行股份有限公司 Big data query method and device, processor and electronic equipment
CN115964384A (en) * 2023-01-10 2023-04-14 中国建设银行股份有限公司 Data query method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
US7953722B2 (en) Query response service for business objects
RU2573764C2 (en) Contextual queries
US9146955B2 (en) In-memory, columnar database multidimensional analytical view integration
CN111190924A (en) Cross-domain data query method and device
CN113419740B (en) Program data stream analysis method and device, electronic equipment and readable storage medium
Euzenat et al. Ontology alignments: an ontology management perspective
CN112491943B (en) Data request method, device, storage medium and electronic equipment
CN108959294B (en) A method and apparatus for accessing a search engine
US11341154B2 (en) Normalizing encodings of requested data from a common data schema to a target data schema
US20170011128A1 (en) Dynamic domain query and query translation
CN111198772A (en) Method and system for generating application program interface API
US20180307692A1 (en) Software application interface for mediating access to services of a centralized data store
CN111259067A (en) Method, device and equipment for realizing DAO interface based on Spring
CN116414707A (en) Test data execution method, device, equipment, medium and product based on API (application program interface) document
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
CN112597105B (en) File association object processing method, server device and storage medium
CN116541037A (en) Code conversion processing method, device and client
WO2023164294A1 (en) Query splitter for an inverted index datastore
US20150169675A1 (en) Data access using virtual retrieve transformation nodes
CN119149558B (en) Distributed database shard key update method, device, equipment and medium
CN111125216B (en) Method and device for importing data into Phoenix
US12001458B2 (en) Multi-cloud object store access
CN117056566A (en) Business application query method and device, storage medium and electronic device
CN117609303A (en) Multi-table joint query method, device, equipment and storage medium
CN117453980A (en) Metadata management, configuration page generation method, server and storage medium

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