Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Micro-service dependency link static analysis method and system based on syntactic analysis tree

A grammatical analysis and static analysis technology, applied in the direction of program code conversion, instrumentation, electrical digital data processing, etc., can solve the problems of increased communication and management costs, high time and labor costs for obtaining call link information, and lack of dependencies. Achieve the effect of improving the efficiency and level of information management, improving the efficiency of development and testing, and ensuring the quality of development

Pending Publication Date: 2022-03-25
山东经伟晟睿数据技术有限公司 +1
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As the complexity of system business requirements increases, the call link dependencies between services under the distributed service architecture are also more complex
[0004] In order to achieve link tracking collection, Google published a distributed link tracking paper "Dapper, a Large-Scale Distributed Systems Tracing Infrastructure", and then Google released the distributed link tracking system Dapper, proposing a distributed chain based on Google-Dapper The dynamic analysis and collection technology of road data can build a microservice link tracking data model and can identify the call dependencies between microservices; however, the current Dapper-based microservice link tracking dynamic analysis technology solution still faces the following deficiencies: 1) It is impossible to obtain the call dependency information between microservice modules in real time during the system development stage
2) The integrity and accuracy of the obtained call link information is low
3) The time and labor costs for obtaining call link information are high
4) The obtained call link information is lagging for developers, testers and operation and maintenance personnel, which affects the efficiency of development, testing and operation and maintenance
[0008] B. There are some code blocks in the code that satisfy the above pattern but may not be called by microservices. For example, some URL addresses pointing to third parties will also satisfy the above pattern, but obviously this does not belong to the call dependency between microservice modules within the system
[0009] C. The developer's call to the microservice module in the code does not follow the preset regular expression pattern. For example, the url is generated by dynamic splicing of variables, so that it cannot be correctly identified according to the above pattern, which leads to this type of technology Some dependencies may be missing in the identified dependencies among the various microservices of the entire system
[0010] 2) No technical support plan is given, it is entirely dependent on the self-consciousness of the developers, the management cost is high and there are technical risks
In actual project experience, it is unrealistic to rely entirely on developers to consciously abide by certain development rules. Generally, code walkthroughs or other automated monitoring tools are required to assist in guaranteeing, which will undoubtedly increase communication and management costs.
[0013] 3) The calculation logic is complex and the time cost is high
This static analysis technology for microservice links based on association analysis requires a large number of vector and similarity calculations, and requires the establishment of an association knowledge base, and the calculation logic time complexity is high.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Micro-service dependency link static analysis method and system based on syntactic analysis tree
  • Micro-service dependency link static analysis method and system based on syntactic analysis tree
  • Micro-service dependency link static analysis method and system based on syntactic analysis tree

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] The microservice architecture pattern divides a traditional single application program into a group of independent and small service modules. The service modules coordinate and cooperate with each other, and the services use a lightweight communication mechanism to cooperate with each other (usually based on the HTTP protocol. RESTful API). Each service module is built around the most suitable technology stack for a specific business, and can be independently deployed into a production environment. As the business requirements of the system become more and more complex, large-scale information systems designed using the microservice architecture may have dozens or even hundreds of microservices supporting them in the background for seemingly simple business scenarios. The more, the more complex the call link dependencies between services under this distributed service architecture, such as figure 1 shown.

[0056] The dependency link information between microservices ...

Embodiment 2

[0110] like Figure 7 As shown, this embodiment proposes a static analysis system for microservice dependency links based on a syntax analysis tree, including:

[0111] The microservice coding protocol module is configured to code the microservice calls;

[0112] The first source code analysis module is configured to convert the current microservice source code file into a syntax analysis tree object;

[0113] The second source code analysis module is configured to obtain a class definition object according to the syntax analysis tree object, obtain a class declaration object array according to the class definition object, traverse the declaration object array, and obtain a method declaration object;

[0114] The third source code analysis module is configured to obtain the method declaration source code according to the method declaration object, and retrieve the microservice calling method defined in the specification from the method declaration source code;

[0115] The d...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a micro-service dependency link static analysis method and system based on a syntactic analysis tree. The method comprises the following steps: carrying out coding reduction on micro-service calling; converting the current micro-service source code file into a grammar analysis tree object; obtaining a class definition object according to the grammatical analysis tree object, obtaining a declaration object array of a class according to the class definition object, and traversing the declaration object array to obtain a method declaration object; obtaining a method declaration source code according to the method declaration object, and retrieving a micro-service calling method defined in the specification in the method declaration source code; and judging whether the name of the called micro-service in the micro-service calling method meets the specification requirement or not, and positioning the abnormal dependency link according to the judgment result. Uniform coding reduction is carried out on the calling process of the micro-service modules, so that the abnormal dependency relationship between the micro-service modules is positioned, and the project management quality is improved.

Description

technical field [0001] The present invention relates to the technical field of computer microservice distributed systems, in particular to a method and system for static analysis of microservice dependency links based on syntax analysis trees. Background technique [0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art. [0003] The microservice architecture pattern divides a traditional single application program into a group of independent and small service modules. The service modules coordinate and cooperate with each other, and the services use a lightweight communication mechanism to cooperate with each other (usually based on the HTTP protocol. RESTful API). As the complexity of system business requirements increases, the call link dependencies between services under the distributed service architecture are also more complex. [0004] In order to achieve link tracking ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/42G06F8/433
Inventor 刘宏亮李铭车帅张丽丽
Owner 山东经伟晟睿数据技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products