Data acquisition method and device based on Java Agent, computer equipment and storage medium

By adopting a Java Agent-based data acquisition method in the microservice architecture, the problem that the traditional manual maintenance configuration management database method cannot meet the deep perception needs is solved, and non-invasive data acquisition, monitoring and analysis is realized, reducing costs, improving efficiency, and improving the scalability of the system.

CN119988059APending Publication Date: 2025-05-13广州千阅传媒有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510084970.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Under the microservice architecture, the data acquisition and management methods of traditional manual maintenance configuration management database (CMDB) cannot meet the needs of depth perception, resulting in limited accuracy and timeliness of service topology data, high cost, low efficiency, and poor scalability.

Method used

Using the Java Agent-based data acquisition method, the data acquisition end, configuration center, remote call end, data analysis end and display end are coordinated to achieve non-invasive acquisition, monitoring and analysis. The specific steps include receiving business service startup instructions, loading preset remote data calling classes, calling preset data acquisition plug-in, initializing data acquisition configuration components, collecting business data, and generating a business service relationship topology diagram through data analysis and display.

Benefits of technology

It realizes non-invasive acquisition, monitoring, analysis of data and visualization of data in the microservice architecture, reducing costs, improving efficiency, and improving system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988059A_ABST
    Figure CN119988059A_ABST
Patent Text Reader

Abstract

The invention relates to a Java Agent-based data acquisition method, which comprises the following steps of: receiving a business service starting instruction sent by a remote calling end, and sending a data acquisition request to a data acquisition end by loading a preset remote data calling class; the data acquisition end calls a preset data acquisition plug-in through the configuration center; the data acquisition end initializes a data acquisition configuration component of the preset data acquisition plug-in; the data acquisition end acquires business data through the data acquisition configuration component and returns the business data to the data analysis end; the data analysis end obtains a business data relationship according to the collected business data, and sends the business data relationship to the display end; and the display end generates the business service relation topological graph according to the business data relation. The purposes of non-intrusive data acquisition, monitoring and analysis and data visualization in the micro-service architecture are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a data collection method, device, computer equipment and storage medium based on Java Agent. Background Art

[0002] With the widespread application of microservice architecture, the dependencies between services are complex under the microservice architecture, and the traditional data collection and management method of manually maintaining the configuration management database (CMDB) cannot meet the needs of deep perception.

[0003] Existing technologies mainly rely on manual maintenance and simple service discovery services, which are unable to collect all service call information and data, resulting in limited accuracy and timeliness of service topology data, high cost, low efficiency, and poor scalability.

[0004] Therefore, based on the above problems, a data acquisition method that can achieve non-invasive collection, monitoring, and analysis is an urgent need in this field. Summary of the invention

[0005] The embodiments of the present invention propose a data collection method, device, computer equipment and storage medium based on Java Agent to solve the problems of high cost and low efficiency caused by manual intervention in data collection in the current microservice architecture.

[0006] In a first aspect, an embodiment of the present invention provides a Java Agent-based data collection method, the method is applied to a Java Agent-based data collection system, the system includes a data collection end, a configuration center, a remote call end, a data analysis end and a display end, the method includes:

[0007] Receive the business service start instruction sent by the remote call end, and send a data collection request to the data collection end by loading the preset remote data call class;

[0008] The data acquisition terminal calls the preset data acquisition plug-in through the configuration center;

[0009] The data acquisition terminal initializes the data acquisition configuration component of the preset data acquisition plug-in;

[0010] The data collection end collects business data through the data collection configuration component and returns it to the data analysis end;

[0011] The data analysis end obtains the business data relationship based on the collected business data, and sends it to the display end;

[0012] The display end generates the business service relationship topology diagram according to the business data relationship.

[0013] In a second aspect, an embodiment of the present invention further provides a data acquisition device based on Java Agent, the device is applied to a data acquisition system based on Java Agent, the system includes a data acquisition end, a configuration center, a remote call end, a data analysis end and a display end, the device includes:

[0014] A business service startup instruction receiving module is used to receive the business service startup instruction sent by the remote call end, and send a data collection request to the data collection end by loading a preset remote data call class;

[0015] A preset data acquisition plug-in calling module, used for the data acquisition terminal to call the preset data acquisition plug-in through the configuration center;

[0016] An initialization module, used for the data acquisition terminal to initialize the data acquisition configuration component of the preset data acquisition plug-in;

[0017] A business data collection module, used for the data collection end to collect business data through the data collection configuration component and return it to the data analysis end;

[0018] A data analysis module, used for the data analysis end to obtain business data relationships based on the collected business data and send the relationships to the display end;

[0019] A relationship topology diagram generation module is used for the display terminal to generate the business service relationship topology diagram according to the business data relationship.

[0020] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0021] one or more processors;

[0022] a memory for storing one or more programs,

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the Java Agent-based data collection method as described in any one of the first aspects.

[0024] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the Java Agent-based data collection method as described in any one of the first aspects is implemented.

[0025] In this embodiment, the business service startup instruction sent by the remote call end is received, and a data collection request is sent to the data collection end by loading a preset remote data call class; the data collection end calls the preset data collection plug-in through the configuration center; the data collection end initializes the data collection configuration component of the preset data collection plug-in; the data collection end collects business data through the data collection configuration component and returns it to the data analysis end; the data analysis end obtains the business data relationship based on the collected business data and sends it to the display end; the display end generates the business service relationship topology diagram based on the business data relationship. The purpose of non-invasive data collection, monitoring, and analysis and data visualization in the microservice architecture is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A flowchart of a data collection method based on Java Agent provided in Embodiment 1 of the present invention;

[0027] Figure 2 This is an example diagram of the architecture of a Java Agent-based data acquisition system provided in the first embodiment of the present invention;

[0028] Figure 3 This is a diagram showing an example of a data calling module design provided in the first embodiment of the present invention;

[0029] Figure 4 This is a diagram showing an example of module design of a Java Agent-based data acquisition system provided in the first embodiment of the present invention;

[0030] Figure 5 This is an example diagram of a service call topology diagram provided in the first embodiment of the present invention;

[0031] Figure 6 A schematic diagram of the structure of a data acquisition device based on Java Agent provided in Embodiment 2 of the present invention;

[0032] Figure 7 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It is also necessary to explain that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0034] Embodiment 1

[0035] Figure 1This is a flow chart of a Java Agent-based data collection method provided in Embodiment 1 of the present invention. The method is applied to a Java Agent-based data collection system, which includes a data collection end, a configuration center, a remote call end, a data analysis end, and a display end. The method specifically includes the following steps:

[0036] Step 101: Receive a business service start instruction sent by the remote call end, and send a data collection request to the data collection end by loading a preset remote data call class.

[0037] In the embodiment of the present invention, when a business service startup instruction is received from a remote call end in a Java Agent-based data acquisition system, the initialization process of the Java Agent is triggered, that is, the preset remote data call class is loaded and a data acquisition request is sent to the data acquisition end.

[0038] Step 102: The data collection terminal calls a preset data collection plug-in through the configuration center.

[0039] In the embodiment of the present invention, when the data acquisition end receives the data acquisition request, it needs to continue to call the preset data acquisition plug-in to complete the data acquisition task.

[0040] Preferably, in another embodiment of the present invention, step 102 further includes:

[0041] Sub-step C1: the data acquisition terminal sends a preset data acquisition plug-in call request to the configuration center.

[0042] Specifically, the data collection end receives a data collection request and sends a preset data collection plug-in call request to the configuration center. The data collection indicators involved in the data collection request will be sent to the configuration center along with the data collection request to ensure that the called plug-in can have all the components required for the data collection task.

[0043] Sub-step C2: the configuration center obtains the switch mark of the preset data acquisition plug-in.

[0044] Specifically, after receiving the preset data collection plug-in call request sent by the data collection terminal, the configuration center first obtains the switch mark of the plug-in to confirm whether the plug-in is in an available state.

[0045] Sub-step C3: if the switch mark is on, then the data reporting standard of the preset data collection plug-in is returned, otherwise, information indicating failure in calling the preset data collection plug-in is returned.

[0046] Specifically, if the obtained switch mark is turned on, it means that the plug-in is available, and the configuration center returns the reporting standard of the plug-in collected data, that is, the return method of the plug-in collected data, such as standard output, file and HTTP output.

[0047] Understandably, in order to prevent Java Agent problems from affecting the operation of the service, or to adjust the configuration of some plug-ins to adapt to different scenarios, the dynamic configuration function is added, mainly for:

[0048] Agent's master switch: controls whether all agent-level plug-ins are effective.

[0049] Data reporting method: divided into standard output, file and HTTP

[0050] Plugin switch: controls whether the plugin is effective

[0051] Plugin collection configuration: collection mode (full sampling or partial sampling).

[0052] The above settings are all set by relevant technical personnel according to actual conditions, and the embodiments of the present invention do not impose specific limitations on this.

[0053] Step 103: The data acquisition terminal initializes the data acquisition configuration component of the preset data acquisition plug-in.

[0054] In the embodiment of the present invention, the data collection end requests the configuration center for the plug-in configuration, which will be used to dynamically adjust the behavior of data collection to adapt to different monitoring requirements. After the configuration center returns the plug-in configuration to the data collection end, the data collection end will initialize the plug-in according to the specific requirements of data collection.

[0055] Preferably, in another embodiment of the present invention, step 103 further includes:

[0056] Sub-step D1: the data collection end loads a class method matching component, a class method monitoring component, and an indicator collection component in the preset data collection plug-in.

[0057] Specifically, the data collection end initializes the required components, including the configuration component, the class method matching component, the class method monitoring component and the indicator collection component, to realize the basis of data collection and monitoring functions.

[0058] Among them, the indicator information called by the data collection end, such as call time, return value, etc. These indicator information are crucial for evaluating service performance and diagnosing problems.

[0059] It is understandable that in actual applications, the loading and initialization of components are set by relevant technicians according to data collection requirements, and the embodiments of the present invention are not limited to this.

[0060] Step 104: The data collection end collects business data through the data collection configuration component and returns it to the data analysis end.

[0061] In the embodiment of the present invention, the data collection end collects data corresponding to the service demand by calling the preset data collection plug-in loaded with the data collection configuration component, and then returns the data to the data analysis end for further processing and analysis.

[0062] Step 105: The data analysis end obtains business data relationships based on the collected business data and sends the relationships to the display end.

[0063] In the embodiment of the present invention, the data analysis end identifies identification information of the business data based on the collected business data, and can obtain the relationship between the business data.

[0064] Preferably, in another embodiment of the present invention, step 105 further includes:

[0065] Sub-step E1: the data analysis end obtains remote call indicator information in the business data.

[0066] Specifically, the data analysis end collects and reports remote call indicator information, which may include but is not limited to the frequency of service calls, response time, error rate, call links, etc.

[0067] Sub-step E2: the data analysis end identifies the service call relationship in the remote call indicator information.

[0068] Specifically, the data analysis end processes the above remote call indicator information, such as data cleaning, formatting, and conversion to a format suitable for analysis, converting timestamps to easy-to-understand dates and times, or converting response times to statistical data such as averages, minimums, and maximums. Through the above data processing and analysis, the configuration center can identify the calling patterns between services, for example, determine which services are calling other services, the order of calls, and the frequency of calls.

[0069] In actual applications, the key identification information of the service code is used to identify dependencies such as RPC interfaces, database links, and message queues, and dynamically build internal and external dependencies of the service.

[0070] For example, from the perspective of services, we can associate and build relationships based on the key identification information of different components:

[0071] Depends on the RPC interface: RpcConsumer

[0072] Provide RPC interface: RpcProvider

[0073] Depends on redis address and command: RedisClient

[0074] Depends on kafka's address:

[0075] KafkaConsumer

[0076] KafkaProducer

[0077] Depends on mysql address: MysqlClient

[0078] Dependency on HBase address: HBaseClient

[0079] Depends on HTTP interface: HttpClient

[0080] Provide HTTP interface: HttpServer

[0081] Preferably, in another embodiment of the present invention, the method further comprises:

[0082] Step A1: receiving an update request for the preset remote data call class sent by the remote call end.

[0083] Specifically, according to different business requirements, the remote call end can update the preset remote data call class at any time. At this time, an update request can be sent first.

[0084] Step A2: obtaining the remote data call update class in the update request, and updating the preset remote data call class.

[0085] Specifically, when the system receives an update request, it first obtains the remote data call update class therein and loads it into the preset remote data call class to implement the update.

[0086] Preferably, in another embodiment of the present invention, step A2 further comprises:

[0087] Sub-step F1: identifying the remote data call relationship in the update request.

[0088] Specifically, the relationship between remote data call data services in the update request is identified.

[0089] Sub-step F2: obtaining data calling logic through the remote data calling relationship.

[0090] Specifically, the calling logic of the plug-in to be called to obtain the corresponding data is determined according to the above relationship.

[0091] Sub-step F3: updating the class bytecode of the preset remote data call class, and updating the preset remote data call class.

[0092] Specifically, when updating the preset remote data call class, you first need to consider the configuration and properties of the plug-in:

[0093] First, depending on the classes involved in different versions of the component, they may be divided into different independent plug-ins, and the corresponding version of the dependency package needs to be added in pom.xml (scope needs to be provide, and external dependencies cannot be introduced to affect the business service itself). For example, kafka-clients-0.11.0.3.jar and kafka-clients-1.0.1.jar can be processed in the same plug-in, and kafka-clients-2.0.1.jar needs to be processed in another plug-in.

[0094] Secondly, when the business service mounts the athena agent, all plugins will be included, but some plugins will introduce classes in the component dependency package. For example, the HBase plugin needs to obtain the address information of HBase and needs to introduce org.apache.hadoop.conf.Configuration, but in fact the business service may not have introduced hbase-client, and the agent will report an error. To avoid the above problems, when the main framework loads the plugin, it is necessary to determine whether the corresponding class file exists in the system class path (Class.forName(className) cannot be used. If the class exists, it will be loaded by the system class loader, and some plugins will fail to enhance the class).

[0095] Finally, the key methods are enhanced by modifying the bytecode based on asm, and classes can be added or modified dynamically.

[0096] Before modification:

[0097] public long executeUpdateInternal(byte[][]batchedParameterStrings,

[0098] InputStream[]batchedParameterStreams,

[0099] boolean[]batchedIsStream,

[0100] int[]batchedStreamLengths,

[0101] boolean[]batchedIsNull,

[0102] boolean isReallyBatch){ ...

[0104] return 0L;

[0105] }

[0106] After bytecode modification:

[0107] protected long executeUpdateInternal(byte[][] batchedParameterStrings,

[0108] InputStream[] batchedParameterStreams,

[0109] boolean[] batchedIsStream,

[0110] int[] batchedStreamLengths,

[0111] boolean[] batchedIsNull,

[0112] boolean isReallyBatch){

[0113] Object[] allArguments = new Object[]{batchedParameterStrings, batchedParameterStr eams, batchedIsStream, batchedStreamLengths, batchedIsNull, isReallyBatch};

[0114] ProfileMethodInterceptor.onMethodEnter(193829849, this, allArguments);

[0115] try{

[0116] Long r=original$executeUpdateInternal((byte[][])allArguments[0],(InputStream[])allArguments[1],(boolean[])allArguments[2],(int[])allArguments[3],(boolean[])allArguments[4],(boolean)allArguments[5]);

[0117] ProfileMethodInterceptor.onMethodExit(193829849,this,allArguments,r);

[0118] return r;

[0119] }catch(Throwable t){

[0120] ProfileMethodInterceptor.onMethodException(193829849,this,allArguments,t);

[0121] throw t;

[0122] }

[0123] }

[0124] public long original$executeUpdateInternal(byte[][]batchedParameterStrings,

[0125] InputStream[]batchedParameterStreams,

[0126] boolean[]batchedIsStream,

[0127] int[]batchedStreamLengths,

[0128] boolean[]batchedIsNull,

[0129] boolean isReallyBatch){ ...

[0131] return 0L;

[0132] }

[0133] It can be understood that in actual applications, the specific method of updating the class according to modifying the bytecode is set by relevant technical personnel, and the embodiment of the present invention does not limit this.

[0134] Step 106: The display terminal generates the business service relationship topology diagram according to the business data relationship.

[0135] In the embodiment of the present invention, the display end analyzes the calling relationship between services based on the reported indicator information, and constructs a business service relationship topology diagram, which shows the dependency relationship between services so that the remote calling end can understand the system architecture and diagnose problems.

[0136] Preferably, in another embodiment of the present invention, the method further comprises:

[0137] Step B1: The display terminal converts the business service relationship topology diagram into a business service data relationship diagram visible to users.

[0138] Specifically, the presentation end converts the business service relationship topology diagram into a user-friendly visualization format, namely, a business service data relationship diagram.

[0139] Step B2: The display terminal displays the business service data relationship diagram on the user interface.

[0140] Specifically, the business service data relationship diagram is updated and displayed in real time on the user interface, allowing users to monitor the dependencies and performance indicators between services in real time.

[0141] The following is a detailed description of the workflow of the data collection system based on Java Agent by way of example:

[0142] like Figure 2 The figure shows a simplified Java Agent-based data collection system diagram, demonstrating the basic workflow and components of the system.

[0143] Java Microservice 1 and Java Microservice 2 represent microservice instances in the system and are used to collect service behavior data at runtime. Java Agent is responsible for monitoring and collecting runtime data of microservices, such as method calls, exception information, and performance indicators.

[0144] Push means that Java microservice 1 actively sends its monitoring data to the microservice architecture perception system through push.

[0145] Pull means that the Java microservice 2 obtains configuration or request data from the microservice architecture awareness system through pull.

[0146] Finally, based on the data collected from each microservice, a dependency graph between services is constructed. The constructed topology is presented to the user in a visual way. This makes the system architecture and dependency relationships more intuitive and easier to monitor and manage.

[0147] like Figure 3 The interaction process between various components in the data collection system based on Java Agent is demonstrated:

[0148] First, the business service is started, triggering the initialization process of the data collection (Java Agent). The data collection end requests the collection configuration switch from the configuration center to determine whether data collection is required. The data collection (Java Agent) end initializes the configuration components, class method matching components, class method listeners, and indicator collectors.

[0149] Then, during the startup process, the business service loads the remote call related classes to prepare for the subsequent remote calls. At the same time, the data collection end requests the plug-in configuration from the configuration center so as to dynamically adjust the data collection behavior according to the configuration. The configuration center returns the plug-in configuration to the data collection end.

[0150] Among them, when the remote call class needs to be updated, the remote call end dynamically enhances the remote call related class through the remote call business service, and implants the call information capture logic without modifying the original business code.

[0151] Finally, the data collection end collects indicator information of remote calls, such as call time, return value, etc., and reports it to the data collection system. The display end builds a dependency topology diagram between services based on the reported RPC indicator information and displays it in real time.

[0152] like Figure 4 The design description of the core module in the Java Agent-based data acquisition system is presented.

[0153] Among them, the data collection module adopts Push mode, that is, the collection end actively reports data to the collection end to ensure the real-time nature of the data, and Pull mode, that is, the collection end actively pulls data to avoid traffic overload and loss problems.

[0154] Specifically, the data collection system relies on two aspects of Java Agent. The first is the asm core dependency, which is used to support various plug-ins in the athena agent and can dynamically add or modify classes. In addition, classgraph is composed of the main framework and various plug-ins of the athena agent. Since the JDK SPI uses the system class loader to load the class, some plug-ins will fail to function. The classgraph framework is used to scan the athena agent plug-in class for registration.

[0155] In addition, the athena agent module design consists of a main framework and various plug-ins.

[0156] The main framework is responsible for plugin activation control, dynamic configuration management, dependency injection, and scanning and registering various plugins. Plugins are responsible for avoiding the impact of components involved in different functions (dependency versions). Each plugin is an independent module and can be loaded on demand.

[0157] Understandably, the main considerations for plugin design are that, depending on the classes involved in different versions of the component, different independent plugins may be created, and the corresponding version of the dependency package needs to be added to pom.xml (scope needs to be provide, and external dependencies cannot be introduced to affect the business service itself). For example, kafka-clients-0.11.0.3.jar and kafka-clients-1.0.1.jar can be processed in the same plugin, and kafka-clients-2.0.1.jar needs to be processed in another plugin. Secondly, when the business service mounts the athena agent, all plugins will be included. However, some plugins will introduce classes from component dependency packages. For example, the HBase plugin needs to obtain the address information of HBase and needs to introduce org.apache.hadoop.conf.Configuration. However, the business service may not actually introduce hbase-client. In this case, the agent will report an error. To avoid this problem, when the main framework loads the plugin, it is necessary to determine whether there is a corresponding class file in the system class path (Class.forName(className) cannot be used. If the class exists, it will be loaded by the system class loader, and some plugins will fail to enhance the class).

[0158] like Figure 5 As shown, a topology diagram is built based on the dependencies between services.

[0159] It can be seen that the central node between services is the IM service management background (IM_web_admin), which is responsible for coordinating and managing all connected services and databases. Each HTTP server provides different service capabilities. For example, HTTP Server-1 (HTTPServer-1) is a server that provides Web services, which may be used to process user requests and provide API interfaces. HTTP Server-2 (HTTPServer-2) is used for load balancing or to provide different services. HTTP Server-3 (HTTPServer-3) can be used to further expand the service capabilities of the system. HTTP Server-4 (HTTPServer-4) can be used to increase the redundancy and scalability of the system. HTTP Server-5 (HTTPServer-5) can continue to expand the service scope of the system.

[0160] Among them, each relational database server MySQL is responsible for different data services, such as MySQL Server-1 is used to store structured data. MySQL Server-2 is used for redundant data backup or sub-library and sub-table. Each memory server Redis is responsible for different memory services, such as Redis Server-1 is used for caching and fast data access. Redis Server-2 is used for distributed storage or load balancing of cache. Redis Server-3 can be used to further enhance the cache capability.

[0161] Furthermore, the distributed database server Hbase implements distributed and scalable big data storage, such as Hbase server-1 (HbaseServer-1) is mainly used for real-time read and write access to large-scale data sets.

[0162] Figure 5 The dashed arrows in the middle represent the connection relationship between the IM service management backend and each server. These connections may represent network communication, data synchronization or the transmission of management instructions.

[0163] from Figure 5 It can be seen that the topology of the microservice architecture can provide highly available services through the configuration of multiple HTTP servers and database servers, and the system design allows the service capabilities to be expanded by adding more servers. Different services and databases can also be combined as needed to meet different business needs. This fully reflects the dynamics and flexibility of the microservice architecture.

[0164] In this embodiment, the business service startup instruction sent by the remote call end is received, and a data collection request is sent to the data collection end by loading a preset remote data call class; the data collection end calls the preset data collection plug-in through the configuration center; the data collection end initializes the data collection configuration component of the preset data collection plug-in; the data collection end collects business data through the data collection configuration component and returns it to the data analysis end; the data analysis end obtains the business data relationship based on the collected business data and sends it to the display end; the display end generates the business service relationship topology diagram based on the business data relationship. The purpose of non-invasive data collection, monitoring, and analysis and data visualization in the microservice architecture is achieved.

[0165] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0166] Embodiment 2

[0167] Figure 6 This is a structural block diagram of a Java Agent-based data acquisition device provided in Embodiment 2 of the present invention. The device is applied to a Java Agent-based data acquisition system. The system includes a data acquisition terminal, a configuration center, a remote call terminal, a data analysis terminal, and a display terminal. Specifically, the following modules may be included:

[0168] The business service startup instruction receiving module 201 is used to receive the business service startup instruction sent by the remote call end, and send a data collection request to the data collection end by loading a preset remote data call class;

[0169] The preset data collection plug-in calling module 202 is used for the data collection end to call the preset data collection plug-in through the configuration center.

[0170] Preferably, in another embodiment of the present invention, the preset data acquisition plug-in calling module 202 is further used for:

[0171] The data acquisition terminal sends a preset data acquisition plug-in call request to the configuration center;

[0172] The configuration center obtains the switch mark of the preset data acquisition plug-in;

[0173] If the switch mark is turned on, the data reporting standard of the preset data collection plug-in is returned, otherwise the failure information of calling the preset data collection plug-in is returned.

[0174] The initialization module 203 is used by the data acquisition terminal to initialize the data acquisition configuration component of the preset data acquisition plug-in.

[0175] Preferably, in another embodiment of the present invention, the initialization module 203 is further used for:

[0176] The data collection end loads a class method matching component, a class method monitoring component, and an indicator collection component in the preset data collection plug-in.

[0177] A business data collection module 204, used for the data collection end to collect business data through the data collection configuration component and return it to the data analysis end;

[0178] The data analysis module 205 is used for the data analysis end to obtain the business data relationship according to the collected business data and send it to the display end;

[0179] Preferably, in another embodiment of the present invention, the data analysis module 205 is further used for:

[0180] The data analysis end obtains remote call indicator information in the business data;

[0181] The data analysis end identifies the service call relationship in the remote call indicator information.

[0182] The relationship topology diagram generating module 206 is used for the display terminal to generate the business service relationship topology diagram according to the business data relationship.

[0183] Preferably, in another embodiment of the present invention, the device further comprises:

[0184] An update request receiving module, used for receiving an update request for the preset remote data call class sent by the remote call end;

[0185] The preset remote data call class update module is used to obtain the remote data call update class in the update request and update the preset remote data call class.

[0186] Preferably, in another embodiment of the present invention, the remote data call class update module is preset and is also used for:

[0187] Identifying a remote data call relationship in the update request;

[0188] Acquire data calling logic through the remote data calling relationship;

[0189] The class bytecode of the preset remote data call class is updated, and the preset remote data call class is updated.

[0190] Preferably, in another embodiment of the present invention, the device further comprises:

[0191] A relationship diagram generation module, used for the display terminal to convert the business service relationship topology diagram into a business service data relationship diagram visible to users;

[0192] The relationship diagram display module is used for the display terminal to display the business service data relationship diagram on the user interface.

[0193] The Java Agent-based data collection device provided in the embodiment of the present invention can execute the Java Agent-based data collection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0194] Embodiment 3

[0195] Figure 7 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 7 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0196] like Figure 7 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0197] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0198] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0199] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0200] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0201] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the computer device 12, and / or may communicate with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the computer device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the computer device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0202] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the Java Agent-based data collection method provided in the embodiment of the present invention.

[0203] Embodiment 4

[0204] Embodiment 4 of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned Java Agent-based data collection method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0205] Among them, computer-readable storage media may include, for example, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.

[0206] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data collection method based on Java Agent, characterized in that: The method is applied to a JavaAgent-based data collection system, the system comprising a data collection end, a configuration center, a remote call end, a data analysis end and a display end, and the method comprises: Receive the business service start instruction sent by the remote call end, and send a data collection request to the data collection end by loading the preset remote data call class; The data acquisition terminal calls the preset data acquisition plug-in through the configuration center; The data acquisition terminal initializes the data acquisition configuration component of the preset data acquisition plug-in; The data collection end collects business data through the data collection configuration component and returns it to the data analysis end; The data analysis end obtains the business data relationship based on the collected business data, and sends it to the display end; The display end generates the business service relationship topology diagram according to the business data relationship.

2. The method according to claim 1, characterized in that Also includes: Receiving an update request for the preset remote data call class sent by the remote call end; The remote data call update class in the update request is obtained, and the preset remote data call class is updated.

3. The method according to claim 1, characterized in that Also includes: The display end converts the business service relationship topology diagram into a business service data relationship diagram visible to a user; The display terminal displays the business service data relationship diagram on a user interface.

4. The method according to claim 1, characterized in that: The data collection end calls the preset data collection plug-in through the configuration center, including: The data acquisition terminal sends a preset data acquisition plug-in call request to the configuration center; The configuration center obtains the switch mark of the preset data acquisition plug-in; If the switch mark is turned on, the data reporting standard of the preset data collection plug-in is returned, otherwise the failure information of calling the preset data collection plug-in is returned.

5. The method according to claim 1, characterized in that The data acquisition terminal initializes the data acquisition configuration component of the preset data acquisition plug-in, including: The data collection end loads a class method matching component, a class method monitoring component, and an indicator collection component in the preset data collection plug-in.

6. The method according to claim 1, characterized in that The data analysis end obtains the business data relationship according to the collected business data and sends it to the display end, including: The data analysis end obtains remote call indicator information in the business data; The data analysis end identifies the service call relationship in the remote call indicator information.

7. The method according to claim 2, characterized in that Obtaining the remote data call update class in the update request and updating the preset remote data call class includes: Identifying a remote data call relationship in the update request; Acquire data calling logic through the remote data calling relationship; The class bytecode of the preset remote data call class is updated, and the preset remote data call class is updated.

8. A data collection device based on Java Agent, characterized in that: The device is applied to a JavaAgent-based data acquisition system, the system includes a data acquisition terminal, a configuration center, a remote call terminal, a data analysis terminal and a display terminal, and the device includes: A business service startup instruction receiving module is used to receive the business service startup instruction sent by the remote call end, and send a data collection request to the data collection end by loading a preset remote data call class; A preset data acquisition plug-in calling module, used for the data acquisition terminal to call the preset data acquisition plug-in through the configuration center; An initialization module, used for the data acquisition terminal to initialize the data acquisition configuration component of the preset data acquisition plug-in; A business data collection module, used for the data collection end to collect business data through the data collection configuration component and return it to the data analysis end; A data analysis module, used for the data analysis end to obtain business data relationships based on the collected business data and send the relationships to the display end; A relationship topology diagram generation module is used for the display terminal to generate the business service relationship topology diagram according to the business data relationship.

9. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the Java Agent-based data collection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Java Agent-based data collection method according to any one of claims 1 to 7 is implemented.