IP Library › Granted Patent US 11,397,575
Granted Patent B2
US 11,397,575 · App. 17/122,971 · Granted Jul 26, 2022

Microservices graph generation

Inventors: Deng Feng Wan (Shanghai, CN); Zuxing Wang (Shanghai, CN)
Assignee: SAP SE
G06F8/75G06F9/22G06F16/24526
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,397,575
App. No.
17/122,971
Granted
Jul 26, 2022
Kind
B2
Abstract

The present disclosure provides systems and methods for generating a graph of microservices of a software application. Source code for the application may be parsed using one or more method identifiers to identify a plurality of methods of the software application. Names and path values for the plurality of methods may be stored in a graph database as nodes and edges. The graph database may be queried to determine dependencies of a method, including the microservice that the method belongs to any remote methods called by the method. In addition, properties of the nodes may be transformed into a set of vectors to provide searching of the graph and recommendations.

Claims (59)

1. A computer system, comprising:

one or more processors; and

one or more machine-readable medium coupled to the one or more processors and storing computer program code comprising sets of instructions executable by the one or more processors to:

parse source code of a software application comprising a plurality of microservices to identify a plurality of methods based on one or more method identifiers, the plurality of methods comprising a plurality of remote calling methods;

determine a name and a path value for each method of the plurality of methods, the name identifying the method, the path value identifying a microservice that the method belongs to;

determine a remote name and a remote path value for each remote calling method of the plurality of remote calling methods, the remote name identifying a remote method of the plurality of methods called by the remote calling method, the remote path value identifying an endpoint for calling the remote method;

store the name for each method of the plurality of methods in a graph database representing a graph, each method of the plurality of methods represented as a node in the graph;

store the path value for each method of the plurality of methods in the graph database, each path value represented as an edge between a node representing the method and a node representing the microservice that the method belongs to;

store the remote path value for each remote calling method of the plurality of remote calling methods in the graph database, each remote path value represented as an edge between a node representing the remote calling method and a node representing the remote method of the plurality of methods called by the remote calling method; and

query the graph database using an identifier of a first method of the plurality of methods to determine one or more dependent methods related to the first method.

2. The computer system of claim 1 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

parse the source code of the software application to identify the plurality of microservices based on one or more microservice identifiers;

store a name for each microservice of the plurality of microservices in the graph database, each microservice of the plurality of microservice represented as a node in the graph.

3. The computer system of claim 1 , wherein the graph database stores a unique node identifier, a node type, and a node name for each node of the graph.

4. The computer system of claim 1 , wherein the graph database stores a unique edge identifier, a relationship type, an origin node identifier, and a destination node identifier for each edge of the graph.

5. The computer system of claim 1 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

transform properties of nodes in the graph to sets of vectors, first properties of a first node of the graph transformed to a first set of vectors, second properties of a second node of the graph transformed to a second set of vectors; and

determine a cosine similarity between the first set of vectors and the second set of vectors, the cosine similarity indicating a similarity of a first method of the plurality of methods to a second method of the plurality of methods, the first node representing the first method, the second node representing the second method.

6. The computer system of claim 5 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

obtain a search request including the first set of vectors; and

return a search response identifying the second node based on the cosine similarity between the first set of vectors and the second set of vectors.

7. The computer system of claim 1 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

determine communities of nodes in the graph using a community detection algorithm.

8. One or more non-transitory computer-readable medium storing computer program code comprising sets of instructions to:

parse source code of a software application comprising a plurality of microservices to identify a plurality of methods based on one or more method identifiers, the plurality of methods comprising a plurality of remote calling methods;

determine a name and a path value for each method of the plurality of methods, the name identifying the method, the path value identifying a microservice that the method belongs to;

determine a remote name and a remote path value for each remote calling method of the plurality of remote calling methods, the remote name identifying a remote method of the plurality of methods called by the remote calling method, the remote path value identifying an endpoint for calling the remote method;

store the name for each method of the plurality of methods in a graph database representing a graph, each method of the plurality of methods represented as a node in the graph;

store the path value for each method of the plurality of methods in the graph database, each path value represented as an edge between a node representing the method and a node representing the microservice that the method belongs to;

store the remote path value for each remote calling method of the plurality of remote calling methods in the graph database, each remote path value represented as an edge between a node representing the remote calling method and a node representing the remote method of the plurality of methods called by the remote calling method; and

query the graph database using an identifier of a first method of the plurality of methods to determine one or more dependent methods related to the first method.

9. The non-transitory computer-readable medium of claim 8 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

parse the source code of the software application to identify the plurality of microservices based on one or more microservice identifiers;

store a name for each microservice of the plurality of microservices in the graph database, each microservice of the plurality of microservice represented as a node in the graph.

10. The non-transitory computer-readable medium of claim 8 , wherein the graph database stores a unique node identifier, a node type, and a node name for each node of the graph.

11. The non-transitory computer-readable medium of claim 8 , wherein the graph database stores a unique edge identifier, a relationship type, an origin node identifier, and a destination node identifier for each edge of the graph.

12. The non-transitory computer-readable medium of claim 8 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

transform properties of nodes in the graph to sets of vectors, first properties of a first node of the graph transformed to a first set of vectors, second properties of a second node of the graph transformed to a second set of vectors; and

determine a cosine similarity between the first set of vectors and the second set of vectors, the cosine similarity indicating a similarity of a first method of the plurality of methods to a second method of the plurality of methods, the first node representing the first method, the second node representing the second method.

13. The non-transitory computer-readable medium of claim 12 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to: obtain a search request including the first set of vectors; and return a search response identifying the second node based on the cosine similarity between the first set of vectors and the second set of vectors.

14. The non-transitory computer-readable medium of claim 8 , wherein the computer program code further comprises sets of instructions executable by the one or more processors to:

determine communities of nodes in the graph using a community detection algorithm.

15. A computer-implemented method, comprising:

parsing source code of a software application comprising a plurality of microservices to identify a plurality of methods based on one or more method identifiers, the plurality of methods comprising a plurality of remote calling methods;

determining a name and a path value for each method of the plurality of methods, the name identifying the method, the path value identifying a microservice that the method belongs to;

determining a remote name and a remote path value for each remote calling method of the plurality of remote calling methods, the remote name identifying a remote method of the plurality of methods called by the remote calling method, the remote path value identifying an endpoint for calling the remote method;

storing the name for each method of the plurality of methods in a graph database representing a graph, each method of the plurality of methods represented as a node in the graph;

storing the path value for each method of the plurality of methods in the graph database, each path value represented as an edge between a node representing the method and a node representing the microservice that the method belongs to;

storing the remote path value for each remote calling method of the plurality of remote calling methods in the graph database, each remote path value represented as an edge between a node representing the remote calling method and a node representing the remote method of the plurality of methods called by the remote calling method; and

querying the graph database using an identifier of a first method of the plurality of methods to determine one or more dependent methods related to the first method.

16. The computer-implemented method of claim 15 , further comprising:

parsing the source code of the software application to identify the plurality of microservices based on one or more microservice identifiers;

storing a name for each microservice of the plurality of microservices in the graph database, each microservice of the plurality of microservice represented as a node in the graph.

17. The computer-implemented method of claim 15 , wherein the graph database stores a unique node identifier, a node type, and a node name for each node of the graph.

18. The computer-implemented method of claim 15 , wherein the graph database stores a unique edge identifier, a relationship type, an origin node identifier, and a destination node identifier for each edge of the graph.

19. The computer-implemented method of claim 15 , further comprising:

transforming properties of nodes in the graph to sets of vectors, first properties of a first node of the graph transformed to a first set of vectors, second properties of a second node of the graph transformed to a second set of vectors; and

determining a cosine similarity between the first set of vectors and the second set of vectors, the cosine similarity indicating a similarity of a first method of the plurality of methods to a second method of the plurality of methods, the first node representing the first method, the second node representing the second method.

20. The computer-implemented method of claim 19 , further comprising: obtaining a search request including the first set of vectors; and returning a search response identifying the second node based on the cosine similarity between the first set of vectors and the second set of vectors.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 18, 2020
From: WAN, DENG FENG; WANG, ZUXING
To: SAP SE
Reel/Frame 054699/0506 →
Continuity (1)
Related Publication 20220188104A1 · Jun 16, 2022
Cited By (2)
US 12,602,362 US 12,743,578