A JAVA application monitoring and early warning method and system based on memory operation
Through the JAVA application monitoring and early warning method and system based on memory operations, the problem of frequent disk IO in JAVA application monitoring is solved, high-performance, refined and real-time monitoring is achieved, rapid problem investigation and early warning are supported, and the flexibility and real-time performance of monitoring are improved.
Patent Information
- Application Number
- CN202111322497.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-09
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-11-09
AI Technical Summary
Existing JAVA application monitoring methods have the problem of frequent disk IO operations affecting performance, lack of flexibility, and cannot effectively solve the problems of flexibility, real-time, refinement, precision and dynamic configuration.
It adopts a JAVA application monitoring and early warning method and system based on memory operation, provides monitoring configuration function through plug-in automatic tracking monitoring, realizes real-time configuration of services that need to be monitored, reduces reliance on manual tracking, improves performance and refines monitoring, and generates monitoring result reports in real time.
It achieves high-performance monitoring of JAVA application services, reduces performance loss, provides refined and dynamically configurable monitoring, supports rapid problem detection and early warning, and improves the flexibility and real-time performance of monitoring.
Smart Images

Figure CN114036025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security and large-scale data management, and in particular to a JAVA application monitoring and early warning method and system based on memory operation. Background Art
[0002] JAVA is an object-oriented programming language that can be used to write cross-platform applications and is widely used in various application designs. With the rapid development of JAVA applications in recent years, their complexity has also increased. Monitoring the health of application services to ensure stable and high-performance operation, provide timely warnings, and quickly locate problems have become important indicators for JAVA application monitoring.
[0003] Currently, existing JAVA application monitoring mainly uses in-application point tracking logs or non-invasive monitoring technology log output statistics. These methods all involve frequent disk IO operations, which have a very serious impact on system performance. For in-application point tracking, R&D personnel need to manually embed the tracking program into the application service program, and then obtain the monitoring report through the tracking log output and aggregation analysis, resulting in delayed reports. In addition, this method is too dependent on R&D personnel and lacks flexibility. New businesses require R&D personnel to manually add the tracking program, which greatly consumes human resources. For non-invasive monitoring technology, it is necessary to modify the binary executable file of the JAVA application during the JAVA service code compilation process to embed the monitoring plug-in, thereby realizing the monitoring of the JAVA application. The performance overhead for monitoring the entire application service is very high, and it is impossible to achieve fine-grained monitoring of the application service, resulting in a lack of flexibility in monitoring and cannot fully meet the actual needs of application monitoring. Summary of the Invention
[0004] In order to address the deficiencies of the prior art, the present invention proposes a JAVA application monitoring and early warning method and system based on memory operation, which monitors and warns JAVA application services based on Spring, SpringMVC, SpringBoot, SpringCloud, Mybatis, and ibatis frameworks. When JAVA is running, the application service adopts plug-in automatic point-of-sale monitoring, provides monitoring configuration functions, and realizes real-time configuration of services that need to be monitored, reducing the dependence of manual point-of-sale on R&D personnel. At the same time, it is more non-invasive monitoring, improves performance, increases the refinement of monitoring, generates monitoring result reports in real time, and improves the real-time nature of monitoring. The monitoring information is purely memory-operated, pre-statistical, without disk IO, batch data processing, and high-performance monitoring, which provides a guarantee for the healthy and efficient operation of application services. The refined monitoring and business data dynamic configuration capture functions provide a guarantee for rapid location and troubleshooting of problems. It solves many problems that traditional monitoring does not have, such as flexibility, real-time, refinement, precision, dynamic configuration, and high-performance monitoring.
[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:
[0006] A JAVA application monitoring and early warning method based on memory operation, characterized by comprising:
[0007] S1. Establish application service monitoring configuration;
[0008] S2. Track the application services that need to be monitored according to the application service monitoring configuration;
[0009] S3. Collect application service call data through tracking points;
[0010] S4. Collect and count the collected application service call data in memory to form data to be analyzed;
[0011] S5. Use the preset risk warning model to analyze and process the data to be analyzed to obtain application service warning data;
[0012] S6. Generate an early warning report using the application service early warning data, and issue an early warning based on the application service issues included in the application service early warning data;
[0013] Wherein, step S3 includes the following sub-steps:
[0014] S31. Setting a regular information collection interval, where the regular information includes application service information of normal responses;
[0015] S32. Set a system information collection interval; the regular information collection interval is the same as the system information collection interval, or is an integer multiple of the system information collection interval;
[0016] S33. According to the regular information collection interval, collect the regular information set within the regular information collection interval;
[0017] S34. Periodically collect and obtain the latest system information according to the system information collection interval;
[0018] S35. Collect all abnormal information, including application service information that does not respond normally;
[0019] S36. Combine the general information, system information, and exception information to form application service call data;
[0020] Step S4 includes the following sub-steps:
[0021] S41, arranging and storing the collected application service call data in a memory message queue;
[0022] S42, pre-processing and counting the application service call data in the memory message queue and then caching it;
[0023] S43: extracting the aggregated data of the application service call data after pre-processing and statistics in the cache to form data to be analyzed.
[0024] Furthermore, the application service information includes the number of calls to the corresponding application service, the call success rate, the response time, the number of response exceptions, the business data summary value and the application service parameters;
[0025] The system information includes CPU usage, memory usage, disk swap partition usage, system load and JVM information.
[0026] Furthermore, the application service monitoring configuration includes:
[0027] Set up the spring method interceptor;
[0028] Set up the mybatis plugin mechanism;
[0029] Set the interception scope, which includes all Bean methods and DAO methods corresponding to the application service;
[0030] Configure collection data filtering rules.
[0031] Furthermore, the tracking of application services that need to be monitored according to the application service monitoring configuration includes:
[0032] Create a tracking plug-in based on the application service monitoring configuration;
[0033] Use the tracking plug-in to track application services.
[0034] Furthermore, the tracking of application services that need to be monitored according to the application service monitoring configuration also includes:
[0035] Update tracking plug-ins based on changes in application service monitoring configuration.
[0036] Furthermore, the preset risk warning model is established through the following steps:
[0037] Obtain historical application service call data and historical warning reports corresponding to the historical application service call data;
[0038] Use historical application service call data and historical warning reports as model training data to obtain the model to be verified;
[0039] Create virtual test data and input the test data into the model to be verified to obtain the results to be verified;
[0040] The prediction success rate of the model to be verified is evaluated using the results to be verified. When the success rate meets the threshold, the model to be verified is saved as a risk warning model.
[0041] Furthermore, the historical application service call data and the historical warning report are used as model training data, and the training to obtain the model to be verified includes training using the XGBoost algorithm;
[0042] The evaluating the prediction success rate of the model to be verified includes evaluating the verification result using naive Bayes and / or logistic regression.
[0043] The present invention also relates to a JAVA application monitoring and early warning system based on memory operation, which is characterized by comprising:
[0044] Configuration module, used to establish application service monitoring configuration;
[0045] The application service monitoring module is used to track application services that need to be monitored according to the application service monitoring configuration and collect application service call data;
[0046] Model management module, used to generate and update risk warning models;
[0047] The first data processing module is used to collect and count the collected application service call data in memory to form data to be analyzed;
[0048] The second data processing module is used to analyze and process the data to be analyzed using a preset risk warning model to obtain application service warning data;
[0049] The early warning module is used to generate early warning reports using application service early warning data and issue early warnings based on application service problems contained in the application service early warning data.
[0050] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.
[0051] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;
[0052] The memory is used to store application service monitoring configuration and application service call data;
[0053] The processor is used to execute the above method by calling application service monitoring configuration and application service calling data.
[0054] The beneficial effects of the present invention are:
[0055] The JAVA application monitoring and early warning method and system based on memory operation described in the present invention are used to monitor and warn JAVA application services based on Spring, SpringMVC, SpringBoot, SpringCloud, Mybatis, and ibatis frameworks. When JAVA is running, the application service adopts plug-in-type automatic point-of-sight monitoring, provides monitoring configuration functions, and realizes real-time configuration and automated, precise, refined, plug-in-based, configurable, and flexible monitoring of services that need to be monitored. An independent monitoring plug-in is provided to facilitate application configuration integration, provide monitoring application service configuration, collect application service data you are concerned about, and support the configuration of specific collection data items for monitoring application services. Accurate monitoring information collection greatly reduces the workload of application monitoring and reduces the dependence of manual point-of-sight on R&D personnel. At the same time, it has non-invasive monitoring, improves performance, increases the refinement of monitoring, generates monitoring result reports in real time, and improves the real-time nature of monitoring. Monitoring information is operated purely in memory, with pre-statistics, no disk IO, and batch data processing. Using pure memory operations and high-performance monitoring data collection, it significantly reduces performance loss to JAVA application services, ensuring the healthy and efficient operation of application services. Refined monitoring and dynamic configuration capture of business data ensure rapid problem location and troubleshooting. Real-time and trend warnings for application service issues immediately provide feedback to application service providers, enabling rapid identification and location of problems and improving problem location efficiency. Conventional monitoring data is aggregated and minute-level in-memory statistics are generated, and queues are output to the monitoring and analysis system. With the help of big data monitoring and analysis, monitoring and early warning models, trend analysis of application services is performed, and problems are predicted through trend analysis. Warnings are issued before problems occur, allowing problems to be resolved before they occur. This addresses many issues that traditional monitoring lacks, including flexibility, real-time performance, refinement, precision, dynamic configuration, and high-performance monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 The figure is a flow chart of the JAVA application monitoring and early warning method based on memory operation of the present invention.
[0057] Figure 2 This is a structural diagram of the JAVA application monitoring and early warning system based on memory operation of the present invention. DETAILED DESCRIPTION
[0058] Monitoring JAVA application services involves establishing an early warning platform using the method described in the present invention. This platform is preferably based on the Springcloud microservices framework, with Mybatis as the persistence layer middleware and the Netty NIO communication framework ensuring real-time transmission of monitoring data. Traditional relational databases like MySQL and non-relational NoSQL databases such as Redis and MongoDB support data access, while the open source message queue middleware Kafaka provides high-performance data transmission support. The platform primarily consists of two components: data log collection and monitoring, analysis, and early warning. The data log collection component is integrated into the monitored JAVA application services through configuration, responsible for collecting data logs for these services and sending the collected logs for monitoring, analysis, and early warning. The monitoring, analysis, and early warning component is responsible for configuring the application services to be monitored, the application service data to be output, specific monitoring data indicators, early warning thresholds, receiving data sent by the log collection, further processing and generating reports, and issuing early warnings for problematic application services.
[0059] The log collection part intercepts all business beans and Daos through the Spring interceptor and Mybatis plug-in mechanism. Through the application service monitoring configuration, it automatically embeds the business that needs to be monitored, collects application service call data (such as delay, success or failure, error status, call parameters, etc.), performs simple memory aggregation and statistics on the collected data, pushes it into the queue, and sends it to the monitoring, analysis and early warning platform. The entire process does not require disk IO operations.
[0060] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the accompanying drawings and embodiments.
[0061] The first aspect of the present invention relates to a process of steps as follows Figure 1 The JAVA application monitoring and early warning method based on memory operations shown includes:
[0062] S1. Establish application service monitoring configuration, which mainly includes setting spring method interceptor, setting mybatis plug-in mechanism, setting interception range, which includes all Bean methods and DAO methods corresponding to the application service, and configuring collection data filtering rules.
[0063] Beans are important cross-platform components developed in Java and represent a component architecture. JavaBeans demonstrate strong vitality in server-side applications and are often used in JSP programs to encapsulate business logic, database operations, and more. Traditional applications can instantiate beans using new and reflection methods. The Spring IoC container, on the other hand, uses reflection to create beans based on the configuration metadata in the bean definition. The methods available for creating beans based on bean definitions in the Spring IoC container include: instantiating beans using constructors, instantiating beans using static factories, instantiating beans using instance factory methods, and instantiating beans using setters. In practice, application developers can choose the appropriate method to create beans based on their needs.
[0064] DAO (Data Access Object) is an object-oriented database interface that allows developers to connect directly to Access tables. The DAO method is most suitable for single-system applications or small-scale local distributed use. The DAO pattern is one of the standard J2EE design patterns. Developers use this pattern to separate the underlying data access operations from the upper-level business logic. A typical DAO implementation includes the following components: 1. At least one DAO factory class; 2. At least one DAO interface; 3. A specific class that implements the DAO interface; 4. A data transfer object (value object). The specific DAO class contains the logic for accessing data from a specific data source. The DAO method can achieve convenient access to the database and is used to configure collection data filtering rules.
[0065] S2. Create a tracking plug-in based on the application service monitoring configuration and use it to track the application services that need to be monitored. In particular, the tracking plug-in can be updated based on changes in the application service monitoring configuration.
[0066] Through the Spring interceptor and Mybatis plug-in mechanism, all business beans and Daos are intercepted. Through the application service monitoring configuration, the business that needs to be monitored is automatically buried, and the application service call data (such as delay, success or failure, error status, call parameters, etc.) is collected. The collected data is simply aggregated and counted in memory, pushed into the queue, and sent to the monitoring, analysis and early warning platform. The entire process requires no disk IO operations.
[0067] S3. Collect application service call data through tracking. The application service call data includes general information, abnormal information and system information. It is preferred to collect them separately and then integrate them.
[0068] System information includes CPU usage, memory usage, disk swap usage, system load, and JVM information. Both general information and exception information belong to application service information, including the number of calls to the corresponding application service, call success rate, response time, number of response exceptions, business data summary values, and application service parameters. General information refers to application service information with normal responses. To reduce the pressure on system records, you can choose to set a general information collection interval (for example, 10 seconds, 1 minute, or any interval), and collect general information within the general information collection interval time period, such as the total number of calls and total response time within the time period, as recorded general information. This means that statistical methods are used to reduce the pressure on system records.
[0069] Similarly, system information can be collected periodically by setting a system information collection interval. In particular, the regular information collection interval can be matched with the system information collection interval. For example, the regular information collection interval and the system information collection interval can be set to be the same, or the regular information collection interval can be set to an integer multiple of the system information collection interval. In this way, the latest system information at the current moment can be obtained for matching while collecting regular information. Abnormal information refers to application service information that does not respond normally, such as corresponding information on feedback response failures. It is selected to record each item to ensure that all abnormal information can be correctly collected and fed back.
[0070] S4. Collect and count the collected application service call data in memory to form data to be analyzed.
[0071] During execution, the collected application service call data is arranged and stored in the memory message queue. An asynchronous preprocessing module can be preferably used to preprocess and count the application service call data in the memory message queue and then cache it. Then, an asynchronous sending module is used to extract the collected data of the preprocessed and counted application service call data in the cache to form data to be analyzed and sent.
[0072] When collecting data for monitoring, it's important to consider how the data being collected is recorded. System data is already recorded on the local disk, and application data is typically stored in the application's own directory for easier collection. Application logs can also be sent directly to a collection server over the network, reducing the burden of local log writing.
[0073] During implementation, it is preferred to provide monitoring data in two dimensions: system and application. When pushing batch messages, pure memory operations are used without disk IO, combining pre-statistics and batch sending to achieve high efficiency. System performance logs are collected regularly, including CPU, disk, memory, SWAP, system load, JVM stack, threads, GC, etc.
[0074] In a highly concurrent system with frequent log collection, frequent disk IO operations have a significant impact on system performance. To address this issue, a disk-free IO log collection method is adopted. The collected log data is simply aggregated in memory and then sent directly to a remote log collection server via the network. In addition to manual log embedding, the proportion of automatic log embedding based on the framework can also be increased. Since Spring and MyBatis have become the standard configuration of the project, the Spring method interceptor and MyBatis plug-in mechanism are used to intercept all business bean methods and DAO methods, and collect call performance data (such as latency, success or failure, error status, call parameters, etc.). The collected log information will be pushed into the memory message queue. An asynchronous pre-statistics module will retrieve the logs in the memory queue for preprocessing, statistics, and caching. Finally, the asynchronous sender will send the cached aggregated data to the log collection server.
[0075] Preferably, a server performance data collection module is integrated into the application, and the system performance log is collected regularly (for example, every minute), including CPU, memory, disk, swap space, system load, JVM and other related information. This information is also sent to the log server through the same path.
[0076] S5. Analyze and process the data to be analyzed using a preset risk warning model to obtain application service warning data. The risk warning model is preferably learned using the XGBoost algorithm, trained using historical application service call data and historical warning reports as model training data, and the verification results are evaluated using naive Bayesian and / or logistic regression methods to obtain a suitable risk warning model.
[0077] The basic Bayesian classifier method is to calculate the probability of each category based on certain features based on statistical data, thereby achieving classification. Naive Bayes takes it a step further and assumes that all features are independent of each other. This allows the probability of each category to be calculated, thereby finding the class with the highest probability. Using Naive Bayes can greatly simplify calculations and has little impact on the accuracy of the classification results.
[0078] Logistic regression is a generalized linear regression analysis model commonly used in fields such as data mining, automated disease diagnosis, and economic forecasting. For example, we can explore risk factors in application service warning data and predict the probability of application service failure based on these risk factors. For example, in the analysis of application service warning data, two sets of data are selected: one for dangerous applications and one for safe applications. These two sets of data must have different characteristics. Therefore, the dependent variable is whether the application is dangerous, with a value of "yes" or "no." The independent variables can include a wide range of factors, such as data length and specific feature values. Independent variables can be either continuous or categorical. Logistic regression analysis then determines the weights of the independent variables, providing a rough understanding of which factors are risk factors for the application service. Furthermore, these weights can be used to predict the probability of an application service being dangerous based on the risk factors.
[0079] S6. Use application service warning data to generate warning reports and issue warnings based on the application service issues contained in the warning data. Based on warning indicator thresholds, real-time monitoring alerts can be generated to ensure the operation of Java application services, enabling immediate detection of issues. Monitoring warning models can be used to predict application service health trends and provide early warnings for potential risky applications, enabling proactive monitoring and preventing problems before they occur.
[0080] When collecting data for monitoring, it's important to consider how the data being collected is recorded. System data is already recorded on the local disk, and application data is typically stored in the application's own directory for easier collection. Application logs can also be sent directly to a collection server over the network, alleviating the burden of local log writing to a certain extent.
[0081] When receiving log messages (data messages), it is preferred to start an NIO receiving service. After receiving the log messages, a series of log message processing is performed, including decoding, diversion, etc., and finally the log messages are placed in a preset time segment. Each time segment has a certain timeliness, which can generally be selected as 1 minute. The log messages are analyzed and processed in various dimensions (including storage) in this time segment.
[0082] Another aspect of the present invention relates to a JAVA application monitoring and early warning system based on memory operation, the structure of which is as follows: Figure 2 As shown, including:
[0083] Configuration module, used to establish application service monitoring configuration, including setting spring method interceptor, setting mybatis plug-in mechanism, and setting the interception range corresponding to all Bean methods and DAO methods;
[0084] The application service monitoring module is used to track the application services that need to be monitored according to the application service monitoring configuration and collect application service call data. Through the Spring interceptor and Mybatis plug-in mechanism, it intercepts the beans and Daos of all businesses. Through the application service monitoring configuration, it automatically tracks the businesses that need to be monitored and collects application service call data.
[0085] The model management module is used to generate and update the risk warning model. The risk warning model is preferably learned using the XGBoost algorithm, and is trained using historical application service call data and historical warning reports as model training data. The verification results are evaluated using naive Bayes and / or logistic regression methods.
[0086] A first data processing module is configured to aggregate and count the collected application service call data in memory to form data to be analyzed, and to arrange and store the collected application service call data in a memory message queue. Preferably, an asynchronous preprocessing module may be used to preprocess and count the application service call data in the memory message queue and then cache it. An asynchronous sending module may then be used to extract the aggregated data of the preprocessed and counted application service call data from the cache to form data to be analyzed and sent.
[0087] The second data processing module is used to analyze and process the data to be analyzed using a preset risk warning model to obtain application service warning data. Based on the warning indicator threshold, it outputs monitoring alarm notifications in real time to ensure the operation of JAVA application services. Problems are monitored in the first place and the health trend of application services is predicted through monitoring and warning models.
[0088] The early warning module is used to generate early warning reports using application service early warning data and issue early warnings based on application service problems contained in the application service early warning data.
[0089] By using this system, the above-mentioned calculation and processing method can be executed and the corresponding technical effects can be achieved.
[0090] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the method in the above embodiment. The computer-readable storage medium stores a computer program that implements all steps of the method in the above embodiment when executed by a processor.
[0091] An embodiment of the present invention also provides an electronic device for executing the above-mentioned method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores the data and related computer programs required for executing the method, such as application service monitoring configuration and application service call data, etc., and all steps of the implementation method are executed by the processor calling the data and programs in the memory to obtain the corresponding technical effects.
[0092] Preferably, the electronic device may include a bus architecture, which may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art and, therefore, will not be described further herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter can be the same component, namely a transceiver, which provides a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory can be used to store data used by the processor when performing operations.
[0093] Additionally, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operating control) employed may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device. The memory may be one or more of a cache, flash memory, a hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices, and may store the aforementioned data and information. It may also store programs for executing the relevant information, and the processor may execute the programs stored in the memory to implement information storage or processing. The input unit is used to provide input to the processor, and may, for example, be a keypad or touch input device. The power supply is used to provide power to the electronic device. The display is used to display objects such as images and text, and may, for example, be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, similar to the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules can be provided in the same electronic device, such as a cellular network module, a Bluetooth module, and / or a wireless local area network module. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone, thereby implementing common telecommunications functions. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processing unit, enabling local recording via the microphone and playback of stored audio via the speaker.
[0094] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.
[0096] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system that is implemented in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The present invention is described in detail below. ...
[0098] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention are intended to be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A JAVA application monitoring and early warning method based on memory operation, characterized in that: include: S1. Establish an application service monitoring configuration, which includes dynamically setting the Spring method interceptor and the Mybatis plug-in mechanism; setting the interception range, which includes all Bean methods and DAO methods corresponding to the application service, and configuring the collection data filtering rules; S2. Create a tracking plug-in based on the application service monitoring configuration, use the tracking plug-in to track the application service that needs to be monitored, and automatically update the tracking plug-in when the configuration changes; S3. Collect application service call data through tracking, including: S31. Setting a regular information collection interval and a system information collection interval, wherein the regular information collection interval is an integer multiple of the system information collection interval; S32. Periodically collect a set of regular information within the regular information collection interval based on the regular information collection interval, wherein the regular information includes the number of calls, response time, and business data summary value; S33, periodically collecting system information based on the system information collection interval, including JVM stack and GC; S34. Collect all abnormal information, including application service information that does not respond normally; S35. Combining regular information, system information, and exception information to form application service call data; S4. Arrange and store the collected application service call data in a memory message queue. Use an asynchronous preprocessing module to preprocess and count the application service call data in the memory message queue and then cache it. Then use an asynchronous sending module to extract the aggregated data of the preprocessed and counted application service call data in the cache to form data to be analyzed and send it. S5. Use the XGBoost algorithm to train the risk warning model, using historical application service call data and historical warning reports as model training data. Evaluate the verification results using naive Bayes and / or logistic regression methods to obtain a risk warning model. S6. Generate an early warning report using the application service early warning data, and issue an early warning based on the application service issues contained in the application service early warning data; issue an early warning based on the application service issues contained in the application service early warning data through a risk early warning model.
2. A JAVA application monitoring and early warning system based on memory operation, characterized in that: include: Configuration module, used to establish application service monitoring configuration; The application service monitoring module is used to track application services that need to be monitored according to the application service monitoring configuration and collect application service call data; Model management module, used to generate and update risk warning models; The first data processing module is used to collect and count the collected application service call data in memory to form data to be analyzed; The second data processing module is used to analyze and process the data to be analyzed using a preset risk warning model to obtain application service warning data; An early warning module is used to generate early warning reports using application service early warning data and issue early warnings based on application service issues contained in the application service early warning data; When the system is executed, the method according to claim 1 is implemented.
3. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which implements the method according to claim 1 when executed by a processor.
4. An electronic device, characterized in that: including processor and memory; The memory is used to store application service monitoring configuration and application service call data; The processor is configured to execute the method according to claim 1 by calling application service monitoring configuration and application service calling data.
Citation Information
Patent Citations
Micro-service full-link monitoring system and method thereof
CN111464373A
Ambari service state early warning method, system and apparatus and medium
CN111737093A
Universal automatic point burying method for Android client
CN112486965A
Log storage method and device
CN112860195A