Multi-thread monitoring system and method based on Java

Through a Java-based multi-threaded monitoring system, the main thread module, heartbeat log module and system operation log module are used to establish a Java thread pool, analyze thread status and heartbeat information, and provide web interface monitoring, solving the multi-threaded monitoring in the existing technology The problems of low efficiency and high maintenance cost achieve efficient thread management and exception handling.

CN112631876BActive Publication Date: 2024-11-22BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011638017.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-11-22
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The existing multi-threaded monitoring methods have high maintenance costs, low running speed, and low production and maintenance efficiency. They cannot effectively monitor and manage multi-threads, resulting in frequent thread termination and false death, affecting system stability.

Method used

A multi-threaded monitoring system based on Java was designed, including monitoring the main thread module, heartbeat log module, system operation log module, service interface layer and web monitoring main interface. By establishing a Java thread pool, recording and analyzing thread status information and heartbeat Information and operation information, providing thread operation interface and exception alarm information, realizing automatic monitoring and intervention of threads.

Benefits of technology

It improves the efficiency and running speed of production and maintenance, reduces maintenance costs, can automatically monitor and handle thread exceptions, reduces the impact on normal threads and processes, and realizes fine-grained management of multi-threads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112631876B_ABST
    Figure CN112631876B_ABST
Patent Text Reader

Abstract

The invention discloses a multi-thread monitoring system and method based on Java, wherein the system comprises: a monitoring main thread module, a heartbeat log module, a system operation log module, a service interface layer and a Web monitoring main interface; the heartbeat log module records the heartbeat information of each business sub-thread when it is in a non-working state; the system operation log module records the operation information of each business sub-thread when it is in a working state; the monitoring main thread module establishes a Java thread pool, monitors the state information, heartbeat information and operation information of each business sub-thread, analyzes the thread operation situation in combination with the thread attribute information, and records the analysis result to a memory data structure; the service interface layer reads information from the memory data structure and the Java thread pool and provides a thread operation interface and pushes abnormal alarm information to the Web monitoring main interface; the Web monitoring main interface calls the service interface layer. The present invention can improve production maintenance efficiency and operation speed, and reduce maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a Java-based multi-thread monitoring system and method. Background Art

[0002] In recent years, with the continuous development of banking and financial services, the requirements for information construction have become increasingly higher. As an integrated private trading platform for the global financial market of Bank of China, the PCTS system mainly provides private foreign exchange, options, precious metals and margin financial products. Facing numerous private customers, the daily trading volume is extremely large. In order to quickly respond to customer requests and solve the problem of high concurrency in the system, the main business logic implementation in the system relies on multi-threading. Although the use of multi-threading has greatly improved the response speed of the system to a certain extent, the abnormal termination and pseudo-death of threads have brought certain risks to the system.

[0003] The existing multi-thread monitoring method has the problems of high maintenance cost, low operation speed and low production and maintenance efficiency. Therefore, there is an urgent need for a multi-thread monitoring solution that can overcome the above problems. Summary of the invention

[0004] The embodiment of the present invention provides a Java-based multi-thread monitoring system for monitoring multi-threads, improving the efficiency and running speed of production maintenance, and reducing maintenance costs. The system includes: a monitoring main thread module, a heartbeat log module, a system operation log module, a service interface layer, and a Web monitoring main interface;

[0005] The heartbeat log module is used to record the heartbeat information of each business sub-thread when it is not in working state;

[0006] The system operation log module is used to record the operation information of each business sub-thread when it is in working state;

[0007] The monitoring main thread module is used to establish a Java thread pool, monitor the status information, heartbeat information and operation information of each business sub-thread, analyze the thread operation status according to the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information and operation information, and record the analysis results into the memory data structure. Each business sub-thread is created by the Java thread pool;

[0008] The service interface layer is used to read the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and the Java thread pool, and provide the thread operation interface to the Web monitoring main interface and push abnormal alarm information;

[0009] The Web monitoring main interface calls the service interface layer to display the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information, operation information and analysis results.

[0010] The embodiment of the present invention provides a Java-based multi-thread monitoring method for monitoring multi-threads, improving the efficiency and running speed of production maintenance, and reducing maintenance costs. The method includes:

[0011] The monitoring main thread module establishes a Java thread pool, and the Java thread pool creates each business sub-thread;

[0012] The heartbeat log module records the heartbeat information of each business sub-thread when it is not in working state;

[0013] The system operation log module records the operation information of each business sub-thread when it is in working state;

[0014] The monitoring main thread module monitors the status information, heartbeat information and operation information of each business sub-thread;

[0015] The monitoring main thread module analyzes the thread operation status according to the thread attribute information and corresponding status information, heartbeat information and operation information of each business sub-thread, and records the analysis results into the memory data structure;

[0016] The service interface layer reads the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and Java thread pool;

[0017] The service interface layer provides thread operation interface and pushes abnormal alarm information to the Web monitoring main interface;

[0018] The Web monitoring main interface calls the service interface layer to display the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information, operation information and analysis results.

[0019] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned Java-based multi-thread monitoring method when executing the computer program.

[0020] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned Java-based multi-threaded monitoring method.

[0021] The Java-based multi-thread monitoring system provided by the embodiment of the present invention comprises: a monitoring main thread module, a heartbeat log module, a system operation log module, a service interface layer and a Web monitoring main interface; the heartbeat log module is used to record the heartbeat information of each business sub-thread when it is in a non-working state; the system operation log module is used to record the operation information of each business sub-thread when it is in a working state; the monitoring main thread module is used to establish a Java thread pool, monitor the state information, heartbeat information and operation information of each business sub-thread, analyze the thread operation status according to the thread attribute information and the corresponding state information, heartbeat information and operation information of each business sub-thread, and record the analysis result into a memory data structure, wherein each business sub-thread is created by the Java thread pool; the service interface layer is used to read the thread attribute information and the corresponding state information, heartbeat information, operation information and analysis result of each business sub-thread from the memory data structure and the Java thread pool, and provide a thread operation interface to the Web monitoring main interface and push abnormal alarm information; the Web monitoring main interface calls the service interface layer to display the thread attribute information and the corresponding state information, heartbeat information, operation information and analysis result of each business sub-thread. The embodiment of the present invention realizes statistical analysis of thread anomalies of heartbeat information and operation information by monitoring the main thread module, without the need to manually check the log. Development and maintenance personnel only need to view the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread through the Web monitoring main interface, and perform relevant intervention on the thread, thereby effectively monitoring multiple threads, improving the efficiency and running speed of production maintenance, and reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0023] Figure 1 This is a structural diagram of a multi-threaded monitoring system based on Java in an embodiment of the present invention;

[0024] Figure 2 Schematic diagram of a Java-based multi-threaded monitoring method in an embodiment of the present invention. DETAILED DESCRIPTION

[0025] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0026] In order to monitor multithreading, improve the efficiency and running speed of production maintenance, and reduce maintenance costs, the embodiment of the present invention provides a multithreading monitoring system based on Java, such as Figure 1 As shown, the system may include: a monitoring main thread module 101, a heartbeat log module 102, a system operation log module 103, a service interface layer 104 and a Web monitoring main interface 105;

[0027] The heartbeat log module 102 is used to record the heartbeat information of each business sub-thread when it is not in working state;

[0028] The system operation log module 103 is used to record the operation information of each business sub-thread when it is in the working state;

[0029] The monitoring main thread module 101 is used to establish a Java thread pool, monitor the status information, heartbeat information and operation information of each business sub-thread, analyze the thread operation status according to the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information and operation information, and record the analysis results into a memory data structure. Each business sub-thread is created by a Java thread pool;

[0030] The service interface layer 104 is used to read the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and the Java thread pool, and provide the thread operation interface and push abnormal alarm information to the Web monitoring main interface 105;

[0031] The Web monitoring main interface 105 calls the service interface layer 104 to display the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information, operation information and analysis results.

[0032] Depend on Figure 1As shown, the Java-based multi-threaded monitoring system provided by the embodiment of the present invention includes: a monitoring main thread module, a heartbeat log module, a system operation log module, a service interface layer and a Web monitoring main interface; the heartbeat log module is used to record the heartbeat information of each business sub-thread when it is not in a working state; the system operation log module is used to record the operation information of each business sub-thread when it is in a working state; the monitoring main thread module is used to establish a Java thread pool, monitor the status information, heartbeat information and operation information of each business sub-thread, and analyze the thread operation status according to the thread attribute information and the corresponding status information, heartbeat information and operation information of each business sub-thread, and record the analysis results in the memory data structure, and each business sub-thread is created by the Java thread pool; the service interface layer is used to read the thread attribute information and the corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and the Java thread pool, and provide a thread operation interface to the Web monitoring main interface and push abnormal alarm information; the Web monitoring main interface calls the service interface layer to display the thread attribute information and the corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread. The embodiment of the present invention realizes statistical analysis of thread anomalies of heartbeat information and operation information by monitoring the main thread module, without the need to manually check the log. Development and maintenance personnel only need to view the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread through the Web monitoring main interface, and perform relevant intervention on the thread, thereby effectively monitoring multiple threads, improving the efficiency and running speed of production maintenance, and reducing maintenance costs.

[0033] The inventor found that the current domestic financial market is gradually opening up, and financial transactions are becoming more and more active. With the sharp increase in customer transaction volume, the pressure on financial product trading systems is also increasing. In order to alleviate system pressure and solve system bottlenecks, more and more trading systems have adopted distributed multi-node cluster deployment, and single node applications are processed in a multi-threaded manner. For multi-node monitoring, there are often relatively mature solutions at present, but for more fine-grained thread monitoring, there is no complete solution, which is only to check the thread status through the heartbeat log. If there is an exception in a single thread, it is solved by simply restarting the entire service process. In this way, the threads that work normally are also restarted, which increases the degree to which the business processing of the node is affected. At present, there are mainly two ways to monitor multi-threads: the first is to directly use the thread pool to manage multiple threads, obtain the status of each thread through the thread pool and directly output it to the application log, or analyze the thread status through the heartbeat log printed by the thread. The second is to monitor the entire JVM (including thread resources) through the jvisualvm monitoring tool that comes with JDK, or the third-party monitoring tool JProfile. This method is mainly used in system performance analysis scenarios, including monitoring CPU usage, memory (heap, stack) usage, and the status and execution time of each thread.

[0034] However, there are problems with the above methods in actual applications. The thread pool monitoring method or the heartbeat log method can only obtain the thread status through manual log analysis, and it is impossible to effectively intervene in the thread, which increases the maintenance cost. When using the JVM penetration monitoring tool during the monitoring process, the server will additionally start a listening program for the monitoring tool to connect. This monitoring method will significantly reduce the running speed of the service. Therefore, this method is not advisable when used in actual production operation. In actual production operation and maintenance, if a single thread fails, the thread is often restarted by restarting the entire application process. In this way, the entire application service will be affected. The embodiment of the present invention provides a method for better monitoring threads, and can operate on a single thread without affecting other normal threads or the entire process service. The operation is more fine-grained, which greatly improves the efficiency of production maintenance and reduces the risks brought by restarting the application process.

[0035] In the embodiment, the monitoring main thread is different from the common way of establishing multiple threads. The embodiment of the present invention first establishes the monitoring main thread before establishing multiple threads. As a resident thread in the process, the monitoring main thread is used to establish a thread pool, monitor the status information of each business sub-thread, and automatically restart the abnormal dead thread; it can also monitor the heartbeat log output by each business thread and the printed application log information; and the thread's unique identification ID, thread name, thread abnormal output information, etc. are recorded in the JVM memory data structure in a timely manner, and the thread is automatically restarted when a thread is found to be in a pseudo-death phenomenon.

[0036] In the embodiment, in the heartbeat log module and the system operation log module, each business thread outputs heartbeat information every 1 minute (configurable time) when it is not in working state to prove that it is awake and can be put into work at any time. The system operation log will record the operation information of each thread when actually processing business logic. When the thread encounters a runtime exception caused by abnormal data or other factors, the stack information of the relevant error will be printed in time.

[0037] For example, in actual use, business thread 1 prints once every 1 minute:

[0038] 2020-11-11 08:01:00 000[thread1]Thread1 is heartbeating!

[0039] 2020-11-11 08:02:00 000[thread1]Thread1 is heartbeating!

[0040] 2020-11-11 08:03:00 000[thread1]Thread1 is heartbeating!

[0041] When the main thread finds that no log is printed at 8:04, it believes that thread1 has crashed. At this time, the main thread will search for the last business log output information of the thread [thread1] and save this information in memory.

[0042] The storage structure is List <hashmap>, the key of the Map is the thread id, and the value is a json string

[0043] For example: Key: thread1 Value: status: 1, heartBeatNormal: 0, logInfo: "Error [thread1] Null Pointer Exception". The technician can view these logs through the Web monitoring main interface and quickly locate that thread1 encountered a null pointer exception. There is no need to go to the machine room, the problem can be quickly located at the workstation, and an alarm will be generated when a problem occurs, notifying the maintenance personnel in time.

[0044] In the embodiment, the service interface layer mainly provides the relevant thread operation interface and specific implementation for the Web monitoring main interface, and provides the push function of thread abnormality alarm information. There are two ways to provide services, depending on the type of service. For Web applications or ordinary Java applications, the RMI publishing service of the Spring framework can be used; for Java distributed service classes, service frameworks such as Dubbo and Thrift can be used to implement service publishing.

[0045] In the embodiment, the Web monitoring main interface serves as the caller of the service interface layer, and mainly provides the development and maintenance personnel with the status information display and operation buttons of each thread.

[0046] In an embodiment, the heartbeat log module is further used to: print a heartbeat log according to the heartbeat information; the system operation log module is further used to: print an application log according to the operation information when an exception occurs in a business sub-thread.

[0047] In an embodiment, the monitoring main thread module is further used to: determine whether the thread is suspended according to the thread attribute information and corresponding status information and heartbeat information of each business sub-thread, and obtain a judgment result; determine the cause of the thread abnormality according to the operation information of each business sub-thread; and determine the analysis result according to the judgment result and the cause of the thread abnormality.

[0048] In the embodiment, the Web monitoring main interface calls the API of the service interface layer through Http Ajax or Socket. You can also send a text message to the technician, and the text message content can be "Hello, application thread: thread number is working abnormally, please handle it in time."

[0049] In the embodiment, the thread pool is a multi-threaded processing form, in which tasks are added to the queue during the processing, and then these tasks are automatically started after the thread is created. The use of the thread pool can control the number of threads, improve the manageability of the threads, reduce the consumption of each resource acquisition, and improve the utilization of resources. By printing the heartbeat log, it is possible to analyze whether the thread is running normally, blocked, etc., which is indispensable for the state analysis of the thread. The monitoring main thread plays the role of general control as a resident thread, and plays an irreplaceable role in the collection and analysis of multi-threaded information, replacing the manual viewing and analysis of the log. The service interface layer provides various operations of the thread, including status query, suspension, wake-up, restart, etc., and provides functions such as abnormal information query and abnormal information push. The creation and release of the service also require certain framework support. In the production and operation of the customer transaction system, it is much safer to operate on a more fine-grained thread than to operate on the entire application process, and the impact on the business is also minimal. The embodiment of the present invention realizes statistical analysis of thread abnormal output information in the heartbeat log and application log by monitoring the main thread, without the need to manually view the log. Development and maintenance personnel only need to use the Web monitoring interface to view the status and abnormal information output of each thread and make relevant interventions on the thread. When a thread fails, an email or text message is automatically sent to the relevant development and maintenance personnel to detect application abnormalities in a timely manner. In actual production, if a single business thread fails, the thread can be restarted through the monitoring interface without starting the entire service process. The risk of restarting a single thread is far less than restarting the entire application service, and the time is also greatly reduced.

[0050] Based on the same inventive concept, the embodiment of the present invention also provides a Java-based multi-threaded monitoring method, as described in the following embodiments. Since the principles of solving these problems are similar to those of the Java-based multi-threaded monitoring system, the implementation of the method can refer to the implementation of the system, and the repeated parts will not be repeated.

[0051] Figure 2 FIG. 1 is a schematic diagram of a Java-based multi-thread monitoring method according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0052] Step 201, monitoring the main thread module to establish a Java thread pool, and the Java thread pool creates each business sub-thread;

[0053] Step 202: The heartbeat log module records the heartbeat information of each service sub-thread when it is in a non-working state;

[0054] Step 203: The system operation log module records the operation information of each business sub-thread in the working state;

[0055] Step 204: The monitoring main thread module monitors the status information, heartbeat information, and operation information of each business sub-thread;

[0056] Step 205: The monitoring main thread module analyzes the thread operation status according to the thread attribute information and corresponding status information, heartbeat information and operation information of each business sub-thread, and records the analysis results into the memory data structure;

[0057] Step 206: The service interface layer reads thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each service sub-thread from the memory data structure and the Java thread pool;

[0058] Step 207: The service interface layer provides a thread operation interface to the Web monitoring main interface and pushes abnormal alarm information;

[0059] Step 208: The Web monitoring main interface calls the service interface layer to display the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information, operation information and analysis results.

[0060] In one embodiment, the Java-based multi-threaded monitoring method further includes:

[0061] After the heartbeat log module records the heartbeat information of each business sub-thread when it is not in working state, it prints the heartbeat log according to the heartbeat information;

[0062] After the system operation log module records the operation information of each business sub-thread in the working state, when an exception occurs in the business sub-thread, the application log is printed according to the operation information.

[0063] In one embodiment, the monitoring main thread module performs thread operation status analysis based on thread attribute information and corresponding status information, heartbeat information, and operation information of each business sub-thread, including:

[0064] The monitoring main thread module determines whether the thread is suspended according to the thread attribute information and corresponding status information and heartbeat information of each business sub-thread and obtains the judgment result;

[0065] The monitoring main thread module determines the cause of thread abnormality based on the operation information of each business sub-thread;

[0066] The main thread monitoring module determines the analysis result according to the judgment result and the cause of the thread abnormality.

[0067] In one embodiment, the Web monitoring main interface calls the API of the service interface layer through Http Ajax or Socket.

[0068] In summary, the Java-based multi-threaded monitoring system provided by the embodiment of the present invention includes: a monitoring main thread module, a heartbeat log module, a system operation log module, a service interface layer and a Web monitoring main interface; the heartbeat log module is used to record the heartbeat information of each business sub-thread when it is in a non-working state; the system operation log module is used to record the operation information of each business sub-thread when it is in a working state; the monitoring main thread module is used to establish a Java thread pool, monitor the status information, heartbeat information and operation information of each business sub-thread, analyze the thread operation status according to the thread attribute information and the corresponding status information, heartbeat information and operation information of each business sub-thread, and record the analysis results in the memory data structure, and each business sub-thread is created by the Java thread pool; the service interface layer is used to read the thread attribute information and the corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and the Java thread pool, and provide a thread operation interface to the Web monitoring main interface and push abnormal alarm information; the Web monitoring main interface calls the service interface layer to display the thread attribute information and the corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread. The embodiment of the present invention realizes statistical analysis of thread anomalies of heartbeat information and operation information by monitoring the main thread module, without the need to manually check the log. Development and maintenance personnel only need to view the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread through the Web monitoring main interface, and perform relevant intervention on the thread, thereby effectively monitoring multiple threads, improving the efficiency and running speed of production maintenance, and reducing maintenance costs.

[0069] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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 disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0070] 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 flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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 flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0073] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.< / hashmap>

Claims

1. A multi-threaded monitoring system based on Java, characterized in that: include: Monitor the main thread module, heartbeat log module, system operation log module, service interface layer and Web monitoring main interface; The heartbeat log module is used to record the heartbeat information of each business sub-thread when it is not in working state; The system operation log module is used to record the operation information of each business sub-thread when it is in working state; The monitoring main thread module is used to establish a Java thread pool, monitor the status information, heartbeat information and operation information of each business sub-thread, analyze the thread operation status according to the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information and operation information, and record the analysis results into the memory data structure. Each business sub-thread is created by the Java thread pool; The service interface layer is used to read the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and the Java thread pool, and provide the thread operation interface to the Web monitoring main interface and push abnormal alarm information; The Web monitoring main interface calls the service interface layer to display the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread; Wherein, the monitoring main thread module is further used for: According to the thread attribute information and corresponding status information and heartbeat information of each business sub-thread, it is judged whether the thread is suspended or not, and a judgment result is obtained; Determine the cause of thread abnormality based on the operation information of each business sub-thread; An analysis result is determined based on the judgment result and the cause of the thread abnormality.

2. The Java-based multi-threaded monitoring system according to claim 1, characterized in that: The heartbeat log module is also used to: print a heartbeat log according to the heartbeat information; The system operation log module is also used to: when an exception occurs in the business sub-thread, print the application log according to the operation information.

3. The Java-based multi-threaded monitoring system according to claim 1, characterized in that: The Web monitoring main interface calls the API of the service interface layer through Http Ajax or Socket.

4. A method for performing Java-based multi-thread monitoring using the system described in any one of claims 1 to 3, characterized in that: include: The monitoring main thread module establishes a Java thread pool, and the Java thread pool creates each business sub-thread; The heartbeat log module records the heartbeat information of each business sub-thread when it is not in working state; The system operation log module records the operation information of each business sub-thread when it is in working state; The monitoring main thread module monitors the status information, heartbeat information and operation information of each business sub-thread; The monitoring main thread module analyzes the thread operation status according to the thread attribute information and corresponding status information, heartbeat information and operation information of each business sub-thread, and records the analysis results into the memory data structure; The service interface layer reads the thread attribute information and corresponding status information, heartbeat information, operation information and analysis results of each business sub-thread from the memory data structure and Java thread pool; The service interface layer provides thread operation interface and pushes abnormal alarm information to the Web monitoring main interface; The main Web monitoring interface calls the service interface layer to display the thread attribute information of each business sub-thread and the corresponding status information, heartbeat information, operation information and analysis results; The monitoring main thread module analyzes the thread operation status according to the thread attribute information and corresponding status information, heartbeat information and operation information of each business sub-thread, including: The monitoring main thread module determines whether the thread is suspended according to the thread attribute information and corresponding status information and heartbeat information of each business sub-thread and obtains the judgment result; The monitoring main thread module determines the cause of thread abnormality based on the operation information of each business sub-thread; The main thread monitoring module determines the analysis result according to the judgment result and the cause of the thread abnormality.

5. The Java-based multi-threaded monitoring method according to claim 4, characterized in that: Also includes: After the heartbeat log module records the heartbeat information of each business sub-thread when it is not in working state, it prints the heartbeat log according to the heartbeat information; After the system operation log module records the operation information of each business sub-thread in the working state, when an exception occurs in the business sub-thread, the application log is printed according to the operation information.

6. The Java-based multi-threaded monitoring method according to claim 4, characterized in that: The Web monitoring main interface calls the API of the service interface layer through Http Ajax or Socket.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 4 to 6 is implemented.

8. 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 method according to any one of claims 4 to 6 is implemented.