Traffic plug-in, traffic data acquisition method and system, and electronic equipment

By applying traffic plug-ins in the development environment to obtain and display fine-grained traffic data in the production environment, the problems of coarse granularity and poor ease of use in the existing technology are solved, and the work efficiency of R&D personnel is improved.

CN120179219APending Publication Date: 2025-06-20SHANGHAI TRAVEL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510388697.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, the granularity of identifying traffic data is coarse, the ease of use of traffic playback tools is poor, and the method-level traffic data needs to be modified to release codes, which is low in efficiency and time-consuming.

Method used

Provides a traffic plug-in for application in a development environment, including acquisition modules and display modules. The acquisition module is used to obtain fine-grained traffic data in the production environment, and the display module is used to feed the fine-grained traffic data back to the development environment for display.

Benefits of technology

Through the traffic plug-in, the real traffic situation corresponding to each executable method in the production environment can be quickly, intuitively and accurately displayed in the development environment, and the work efficiency of R&D personnel can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179219A_ABST
    Figure CN120179219A_ABST
Patent Text Reader

Abstract

The invention provides a traffic plug-in, a traffic data acquisition method, a traffic data acquisition system and electronic equipment. The traffic plug-in is applied to a development environment and comprises an acquisition module and a display module. The acquisition module is used for acquiring fine-grained flow data in a production environment; and the display module is used for feeding back the fine-grained traffic data to the development environment for display. According to the method and the device, the real flow condition corresponding to each executable method in the production environment is obtained through the flow plug-in, and the real flow condition is quickly, intuitively and accurately displayed in the development environment and presented to developers, so that the working efficiency of the developers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of JAVA (an object - oriented programming language) programming, and particularly to a traffic plug - in, a method for obtaining traffic data, a system, and an electronic device. Background Art

[0002] In the Internet industry, the service architecture of SOA (Service Oriented Architecture) is usually adopted, and different services are connected through well - defined interfaces and contracts. At the architecture layer, the traffic situation of an interface is identified through statistical means such as code embedding to obtain traffic data at the service dimension and interface dimension for further analysis.

[0003] However, more often, during the requirement iteration process, product managers and R & D personnel need to know more detailed functions, such as whether there is traffic for a class, a method, or a branch. Currently, there is no intuitive tool that can be directly presented to product R & D personnel during the development process, resulting in the need to further confirm the online execution situation of relevant code branches through code embedding or debugging. This not only affects efficiency but also is prone to omissions. With the pressure of rapid go - live, online problems caused by insufficient evaluation are everywhere.

[0004] The existing traffic acquisition methods have the following disadvantages: (1) The traffic data statistically obtained at the SOA architecture layer can only reach the interface level at the minimum dimension and cannot reach a finer granularity, such as the method level. (2) Some traffic playback tools, such as Jmeter (a stress - testing tool), LoadRunner (a load - testing tool), JVM - SANDBOX (an open - source JVM (Java Virtual Machine) sandbox container), etc., focus more on the recording of production requests and playback in the test environment. Since the final comparison result is also at the interface level, it cannot reach the finer - granularity method level either. Moreover, the traffic playback scenario is in the test environment, and R & D personnel cannot directly perceive the traffic situation in the development environment. In addition, traffic playback tools usually require the assistance of an independent platform, and R & D personnel cannot conveniently observe traffic data. (3) To obtain the traffic situation of a method through code embedding, R & D personnel need to write a large amount of code - embedding code and release it to the production environment for confirmation, which is inefficient and can only obtain limited traffic data. Summary of the Invention

[0005] The technical problem to be solved by the present disclosure is to overcome the defects in the prior art, such as the coarse granularity of identifying traffic data, the poor usability of traffic playback tools, and the need to modify code and go through the release process for method - level traffic data, which is inefficient and time - consuming, and to provide a traffic plug - in, a method for obtaining traffic data, a system, and an electronic device.

[0006] The present disclosure solves the above - mentioned technical problems through the following technical solutions:

[0007] According to a first aspect of the present disclosure, a traffic plug-in is provided. The traffic plug-in is applied to a development environment, and the traffic plug-in includes an acquisition module and a display module;

[0008] The acquisition module is used to acquire fine-grained traffic data in a production environment;

[0009] The display module is used to feedback the fine-grained traffic data to the development environment for display.

[0010] Optionally, the fine-grained traffic data includes traffic data at the method level.

[0011] According to a second aspect of the present disclosure, a method for acquiring traffic data is provided. The acquisition method includes:

[0012] Acquire the source code of the production environment and perform static analysis to obtain at least one executable method in the source code, and store the executable method in a pre-configured knowledge base;

[0013] Dynamically acquire traffic data corresponding to different executed methods in the production environment, and synchronize the traffic data to the knowledge base;

[0014] Match and analyze the executed method with the executable method to obtain target traffic data corresponding to the target execution method;

[0015] Use the traffic plug-in described in the first aspect of the present disclosure to acquire the target traffic data, and display the target traffic data at the method declaration corresponding to the target execution method in the development environment.

[0016] Optionally, the step of acquiring the source code of the production environment and performing static analysis includes:

[0017] Acquire the source code of the production environment, and use the Java-callgraph2 (an open-source project for generating static call graphs of Java programs) static analysis tool to perform static analysis on the source code.

[0018] Optionally, the step of dynamically acquiring traffic data corresponding to different executed methods in the production environment and synchronizing the traffic data to the knowledge base includes:

[0019] Use the program counter of the JVM (Java Virtual Machine, an abstract computer) to dynamically acquire the traffic data corresponding to different executed methods in the production environment;

[0020] Use a message mechanism or a service mechanism to synchronize the traffic data to the knowledge base.

[0021] Optionally, the knowledge base uses a graph database to store the call relationships of the executable methods.

[0022] According to a third aspect of the present disclosure, there is provided a traffic data acquisition system, which includes a static analysis module, a dynamic analysis module, a matching analysis module, and the traffic plug-in described in the first aspect of the present disclosure;

[0023] The static analysis module is used to obtain the source code of the production environment and perform static analysis to obtain at least one executable method in the source code, and store the executable method in a pre-configured knowledge base;

[0024] The dynamic analysis module is used to dynamically obtain the traffic data corresponding to different executed methods in the production environment, and synchronize the traffic data to the knowledge base;

[0025] The matching analysis module is used to match and analyze the executed method with the executable method to obtain the target traffic data corresponding to the target execution method;

[0026] The traffic plug-in is used to obtain the target traffic data and display the target traffic data at the method declaration corresponding to the target execution method in the development environment.

[0027] Optionally, the static analysis module is further used to obtain the source code of the production environment and perform static analysis on the source code using the Java-callgraph2 static analysis tool.

[0028] Optionally, the dynamic analysis module includes a dynamic acquisition unit and a synchronization processing unit;

[0029] The dynamic acquisition unit is used to dynamically obtain the traffic data corresponding to different executed methods in the production environment by using the program counter of the JVM;

[0030] The synchronization processing unit is used to synchronize the traffic data to the knowledge base by using a message mechanism or a service mechanism.

[0031] Optionally, the knowledge base uses a graph database to store the call relationships of the executable methods.

[0032] According to a fourth aspect of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored on the memory and used to run on the processor. When the processor executes the computer program, it implements the acquisition method described in the second aspect of the present disclosure.

[0033] According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program, which when executed by a processor implements the acquisition method described in the second aspect of the present disclosure.

[0034] According to a sixth aspect of the present disclosure, there is provided a computer program product comprising a computer program, which when executed by a processor implements the acquisition method described in the second aspect of the present disclosure.

[0035] Based on common general knowledge in the art, the above preferred conditions can be combined arbitrarily to obtain various preferred examples of the present disclosure.

[0036] The positive and progressive effects of the present disclosure are as follows: By means of the traffic plug-in, the real traffic conditions corresponding to each executable method in the production environment are obtained and quickly, intuitively, and accurately displayed in the development environment for developers, so as to improve the work efficiency of R & D personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the traffic plug-in module of the present disclosure;

[0038] Figure 2 It is a schematic diagram of the display of traffic data in the development environment of the present disclosure;

[0039] Figure 3 It is a flowchart of the method for obtaining traffic data of the present disclosure;

[0040] Figure 4 It is a schematic diagram of the implementation mechanism of the method for obtaining traffic data of the present disclosure;

[0041] Figure 5 It is a schematic diagram of the knowledge base (method call link) of the present disclosure;

[0042] Figure 6 It is a schematic diagram of the dynamic analysis of the present disclosure;

[0043] Figure 7 It is a schematic diagram of the static analysis of the present disclosure;

[0044] Figure 8 It is a schematic diagram of the system module for obtaining traffic data of the present disclosure;

[0045] Figure 9 It is a schematic diagram of the structure of an electronic device of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] The present disclosure will be further described below by way of examples, but the present disclosure is not limited to the scope of the described examples.

[0047] In the embodiments of the present disclosure, prefix words such as "first" and "second" are only used to distinguish different described objects, and have no restrictive effect on the position, order, priority, quantity, content, etc. of the described objects. The use of prefix words such as ordinal numbers for distinguishing described objects in the embodiments of the present disclosure does not constitute a restriction on the described objects. For the statements of the described objects, refer to the descriptions in the claims or the context of the embodiments. It should not constitute an unnecessary restriction due to the use of such prefix words. In addition, in the description of this embodiment, unless otherwise specified, the meaning of "a plurality" is two or more.

[0048] In the embodiments of the present disclosure, the processing of the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0049] Embodiment 1

[0050] In a specific embodiment of the present disclosure, a traffic plug-in is provided. The traffic plug-in is applied to a development environment, such as Figure 1 As shown, the traffic plug-in 100 includes an acquisition module 101 and a display module 102;

[0051] The acquisition module 101 is used to acquire fine-grained traffic data in the production environment;

[0052] The display module 102 is used to feed back the fine-grained traffic data to the development environment for display.

[0053] Specifically, considering the situation that current developers cannot view the real traffic data of different executable methods in the source code in the local environment in real time, resulting in the problem that they cannot optimize the production environment targeted. By designing the traffic plug-in 100 applied to the development environment, for example, the traffic plug-in 100 for IDEA (an integrated environment developed by the Java programming language) for the Java language. The traffic plug-in 100 is applied to an integrated development environment (such as IDEs like IDEA and Eclipse (an extensible development platform based on Java)), and the acquisition module 101 of the traffic plug-in 100 acquires fine-grained traffic data including method levels in the production environment in real time and matches it with the local code source file. The display module 102 of the traffic plug-in 100 directly displays the acquired fine-grained traffic data embedded at the position of the corresponding method in the development environment, so that developers can view the actual execution situation of the executable methods in the production environment like referring to the method reference situation, and then optimize the production environment targeted.

[0054] Among them, in integrated development environments such as IDEA and Eclipse, functions for developers to write plugins are provided to facilitate the integration of third-party plugins. The traffic plugin 100 in this embodiment only needs to be installed according to the plugin installation specifications of different IDEs. After the traffic plugin 100 is installed, as Figure 2 shown, developers can view the real traffic data of the production environment in the workspace of the development environment.

[0055] In this embodiment, the traffic plugin obtains the real traffic conditions corresponding to each executable method in the production environment, and quickly, intuitively, and accurately displays them in the development environment for developers, so as to improve the work efficiency of developers. And the traffic plugin can be easily installed into the integrated development environment and is easy to promote and use.

[0056] Embodiment 2

[0057] In a specific embodiment of the present disclosure, a method for obtaining traffic data is provided. As Figure 3 shown, the obtaining method includes:

[0058] S1. Obtain the source code of the production environment and perform static analysis to obtain at least one executable method in the source code, and store the executable method in a pre-configured knowledge base;

[0059] S2. Dynamically obtain the traffic data corresponding to different executed methods in the production environment, and synchronize the traffic data to the knowledge base;

[0060] S3. Match and analyze the executed method with the executable method to obtain the target traffic data corresponding to the target execution method;

[0061] S4. Use the traffic plugin 100 described in any of the above embodiments to obtain the target traffic data, and display the target traffic data at the method declaration corresponding to the target execution method in the development environment.

[0062] Specifically, install the traffic plugin 100 encapsulating the API (a set of predefined functions, procedures, methods, or classes) in Embodiment 1 in the development environment. Obtain the war (Web Application Archive, a packaging format for deploying Java web (programs developed in the Java language and running on the World Wide Web) applications) package data of the production environment through step S1. Among them, different Internet companies have corresponding ways to obtain the war package, and the war package can be obtained according to the corresponding obtaining method. After obtaining the war package, perform static analysis on the source code to determine each executable method in the production environment, so as to obtain the static analysis result of the war package, and synchronize the static analysis result to the pre-configured knowledge base.

[0063] Executable methods include callable methods and non-callable methods, and developers can customize the executable methods that need to obtain real traffic data.

[0064] Through step S2, dynamically obtain the traffic data corresponding to each executed method in the production environment, and synchronize the obtained traffic data to the knowledge base to perform matching analysis processing in combination with each executable method obtained by static analysis.

[0065] It should be noted that the execution order of step S1 and step S2 can be set according to actual needs. For example, first execute step S2, then execute step S1, or execute step S1 and step S2 simultaneously. This specific implementation does not make specific limitations on this.

[0066] After obtaining the static analysis data and dynamic analysis data, through step S3, match and analyze the executed method with the executable methods in the knowledge base to obtain the target traffic data corresponding to the target execution method, and store the target traffic data obtained by the matching analysis in the knowledge base.

[0067] Then, each time a developer opens the IDE local project, through step S4, use the installed traffic plugin 100 to obtain the target traffic data in the knowledge base, and combine the code files opened in the workspace to present the target traffic data at the method declaration corresponding to the target execution method, so that the developer can intuitively learn the actual traffic conditions of different executable methods in the production environment.

[0068] In a specific example, as Figure 4 shown, the developer changes the code in the IDE local project and performs a production release. Through the traffic data acquisition method of this embodiment, static analysis and dynamic analysis are performed on the source code in the production environment to obtain fine-grained traffic data at the method level, and the static analysis results and dynamically obtained traffic data are synchronized to the knowledge base. The static analysis results and dynamically obtained traffic data are matched and analyzed to obtain the target traffic data corresponding to the target execution method, and then displayed in the development environment through the Java traffic plugin 100 so that the developer can intuitively learn the actual traffic conditions of different executable methods in the production environment, and then optimize the production environment targeted.

[0069] This embodiment combines static analysis and dynamic analysis to obtain fine-grained traffic data at the method level, and uses the traffic plugin 100 to obtain the real traffic conditions corresponding to each executable method in the production environment, and quickly, intuitively, and accurately display them in the development environment for the developer to improve the work efficiency of the R & D personnel.

[0070] In a specific implementation, as Figure 5As shown in the figure, the knowledge base uses a graph database to store the call relationships of executable methods. Among them, nodes represent methods, and lines represent the call relationships between methods.

[0071] Specifically, considering that the call relationships between methods are complex, changeable, and hierarchical, the knowledge base for static analysis uses a graph database to store method call relationships. For example, nebula graph (a distributed graph database) not only makes the retrieval complexity lower and the performance better, but also can intuitively reflect the current situation of the system. In addition, by supplementing the traffic data corresponding to different executable methods into the graph database in real time, the execution situation of the executable methods can be dynamically reflected.

[0072] In a specific embodiment, step S1 includes: obtaining the source code of the production environment and performing static analysis on the source code using the Java-callgraph2 static analysis tool;

[0073] Step S2 includes:

[0074] S21. Dynamically obtain the traffic data corresponding to different executed methods in the production environment using the program counter of the JVM;

[0075] S22. Synchronize the traffic data to the knowledge base using a message mechanism or a service mechanism.

[0076] Specifically, the program counter of the JVM can be used to obtain traffic data, and the traffic data can be synchronized to the knowledge base through a message mechanism or a service mechanism. As Figure 6 shown in the figure, the traffic data is counted by the JVM and synchronized to the knowledge base through a message mechanism. Then, data matching and analysis processing are performed with the static analysis results in the knowledge base, and the target traffic data corresponding to the target execution method obtained is stored in the knowledge base. Since the traffic data at the method level is obtained based on the counting principle of the JVM, there is no implantation and no risk to the production environment, thus ensuring the security of the production environment.

[0077] And considering that if only the traffic data collected by the JVM program counter is analyzed, the traffic data of the current project and the dependent JAR (a Java platform archive file format) cannot be identified. Therefore, the open-source Java-callgraph2 static analysis tool is used. By leveraging the parsing performance of the Java-callgraph2 static analysis tool for the call relationships between classes and methods, the source code of the production environment is parsed to combine project static analysis and dynamic traffic analysis, achieve accurate delineation of the analysis target of the project, and improve the analysis accuracy of fine-grained traffic data at the method level. As Figure 7As shown in the figure, after code commit, image generation is performed, and instances are created and released to complete instance online. Then, service registration is carried out and system release is completed. The source code parsing of the newly released system is triggered through the message processing platform. By downloading the war package, parsing the source code, and constructing the call chain, static analysis data is obtained and stored in the knowledge base, such as nebula graph and MySQL (relational database management system).

[0078] In a specific embodiment, the traffic data and static analysis data of the latest code version corresponding to the production environment can also be obtained and fed back to the development environment in real time to further improve the accuracy of the fine-grained traffic data at the method level.

[0079] In this embodiment, the real traffic conditions corresponding to each executable method in the production environment are obtained through the traffic plug-in and quickly, intuitively, and accurately displayed in the development environment for developers to improve the work efficiency of R & D personnel.

[0080] Embodiment 3

[0081] In a specific embodiment of the present disclosure, a system for obtaining traffic data is provided, as Figure 8 shown. The obtaining system includes a static analysis module 201, a dynamic analysis module 202, a matching analysis module 203, and the traffic plug-in 100 described in any of the above embodiments;

[0082] The static analysis module 201 is used to obtain the source code of the production environment and perform static analysis to obtain at least one executable method in the source code and store the executable method in a pre-configured knowledge base;

[0083] The dynamic analysis module 202 is used to dynamically obtain the traffic data corresponding to different executed methods in the production environment and synchronize the traffic data to the knowledge base;

[0084] The matching analysis module 203 is used to match and analyze the executed method with the executable method to obtain the target traffic data corresponding to the target execution method;

[0085] The traffic plug-in 100 is used to obtain the target traffic data and display the target traffic data at the method declaration corresponding to the target execution method in the development environment.

[0086] In a specific embodiment, the static analysis module 201 is further used to obtain the source code of the production environment and perform static analysis on the source code using the Java-callgraph2 static analysis tool.

[0087] In a specific embodiment, the dynamic analysis module 202 includes a dynamic acquisition unit and a synchronization processing unit;

[0088] The dynamic acquisition unit is used to dynamically acquire traffic data corresponding to different executed methods in the production environment by using the program counter of the JVM;

[0089] The synchronization processing unit is used to synchronize the traffic data to the knowledge base by using a message mechanism or a service mechanism.

[0090] In a specific embodiment, the knowledge base uses a graph database to store the call relationships of executable methods.

[0091] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the partial description of the method embodiment. The system embodiment described above is only illustrative, where the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present disclosure solution.

[0092] In this embodiment, the traffic plug-in is used to obtain the real traffic conditions corresponding to each executable method in the production environment, and quickly, intuitively, and accurately display them to the developers in the development environment, so as to improve the work efficiency of the R & D personnel.

[0093] Embodiment 4

[0094] Figure 9 As shown in the structural schematic diagram of an electronic device shown in an exemplary embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored on the memory and used to run on the processor. When the processor executes the computer program, it implements the method for acquiring traffic data described in any of the above embodiments. Figure 9 The shown electronic device 30 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0095] Such as Figure 9 shown, the electronic device 30 can be presented in the form of a general computing device, for example, it can be a server device. The components of the electronic device 30 may include but are not limited to: at least one of the above processors 31, at least one of the above memories 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0096] The bus 33 includes a data bus, an address bus, and a control bus.

[0097] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.

[0098] The memory 32 may also include a program tool 325 (or utility) having a set (at least one) of program modules 324. Such program modules 324 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0099] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the method for obtaining traffic data provided in any of the above embodiments.

[0100] The electronic device 30 may also communicate with one or more external devices 34 (such as a keyboard, a pointing device, etc.). Such communication may be performed through an input / output (I / O) interface 35. Moreover, the electronic device 30 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 36. As shown in the figure, the network adapter 36 communicates with other modules of the electronic device 30 through a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in combination with the electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0101] It should be noted that, although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules.

[0102] Embodiment 5

[0103] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for obtaining traffic data provided in any of the above embodiments.

[0104] Among them, the more specific readable storage medium that can be adopted may include, but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0105] Example 6

[0106] An embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method for acquiring traffic data described in any one of the above when executed by a processor.

[0107] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on the user device, partially on the user device, executed as an independent software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0108] Although the specific embodiments of the present disclosure have been described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Without departing from the principles and essence of the present disclosure, those skilled in the art can make various changes or modifications to these embodiments, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A flow plug-in, characterized in that: The traffic plug-in is applied in a development environment, and the traffic plug-in includes an acquisition module and a display module; The acquisition module is used to acquire fine-grained flow data in the production environment; The display module is used to feed back the fine-grained flow data to the development environment for display.

2. The flow plug-in according to claim 1, characterized in that: The fine-grained traffic data includes method-level traffic data.

3. A method for acquiring flow data, characterized in that: The acquisition method comprises: Obtaining source code of a production environment and performing static analysis to obtain at least one executable method in the source code, and storing the executable method in a preconfigured knowledge base; Dynamically obtain flow data corresponding to different executed methods in the production environment, and synchronize the flow data to the knowledge base; Matching and analyzing the executed method with the executable method to obtain target flow data corresponding to the target execution method; The target traffic data is acquired by using the traffic plug-in as claimed in claim 1 or 2, and the target traffic data is displayed at the method declaration corresponding to the target execution method in the development environment.

4. The acquisition method according to claim 3, characterized in that: The step of obtaining the source code of the production environment and performing static analysis includes: The source code of the production environment is obtained, and a Java-callgraph2 static analysis tool is used to perform static analysis on the source code.

5. The acquisition method according to claim 3, characterized in that: The step of dynamically acquiring the flow data corresponding to different executed methods in the production environment and synchronizing the flow data to the knowledge base includes: Using the program counter of JVM to dynamically obtain the flow data corresponding to different executed methods in the production environment; The flow data is synchronized to the knowledge base using a message mechanism or a service mechanism.

6. The acquisition method according to any one of claims 3 to 5, characterized in that: The knowledge base uses a graph database to store the calling relationships of the executable methods.

7. A flow data acquisition system, characterized in that: The acquisition system comprises a static analysis module, a dynamic analysis module, a matching analysis module and a traffic plug-in as claimed in claim 1 or 2; The static analysis module is used to obtain the source code of the production environment and perform static analysis to obtain at least one executable method in the source code, and store the executable method in a pre-configured knowledge base; The dynamic analysis module is used to dynamically obtain the flow data corresponding to different executed methods in the production environment, and synchronize the flow data to the knowledge base; The matching analysis module is used to match and analyze the executed method with the executable method to obtain target flow data corresponding to the target execution method; The traffic plug-in is used to obtain the target traffic data and display the target traffic data at a method declaration corresponding to the target execution method in the development environment.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the acquisition method according to any one of claims 3 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the acquisition method according to any one of claims 3 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the acquisition method according to any one of claims 3 to 6 is implemented.