Application program port monitoring method and device

By obtaining application port status information and generating check pass rate and port change rate, and dynamically adjusting thresholds in deep learning models, the application port monitoring is automated, and the monitoring efficiency and insufficient accuracy caused by manual maintenance in the existing technology are solved. The problem of the monitoring range is extended to all active ports of the server.

CN111930596BActive Publication Date: 2024-11-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010812639.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-13
Publication Date
2024-11-12
Estimated Expiration
2040-08-13

AI Technical Summary

Technical Problem

Existing application port monitoring methods require manual maintenance of IP and port information, resulting in large workloads and prone to errors. Especially when server scale grows in cloud computing and distributed environments, it is difficult to effectively monitor the active detection method.

Method used

By obtaining the port status information during the application operation, generating check pass rate and port change rate, dynamically adjusting thresholds using deep learning models, automatically identifying port abnormalities, generating alarm information, and automating port monitoring.

Benefits of technology

No manual configuration is required, which saves environmental maintenance costs, improves monitoring accuracy, and expands the monitoring range to all active ports of the server to achieve more comprehensive port monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111930596B_ABST
    Figure CN111930596B_ABST
Patent Text Reader

Abstract

The application port monitoring method and device provided by the present invention can be applied to the fields of big data and artificial intelligence technology. The application port monitoring method of the present invention obtains the port status information during the operation of the application to be monitored, and then generates the inspection pass rate and the port change rate according to the counting data of the normal port status, the total inspection number data and the status change counting data, and then generates alarm information. The application port of the present invention is automatically identified without manual configuration, which saves environmental maintenance costs and improves monitoring accuracy. The port monitoring range is no longer limited to the application port monitoring, but all active ports of the server, and the server port monitoring is more comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of application monitoring, and in particular to an application program port monitoring method and device. Background Art

[0002] After the application is started, the IP and port information are exposed to provide services. Application port monitoring is an effective method to detect program anomalies. Generally, active detection methods are used for port monitoring, such as Figure 2 The specific steps are as follows:

[0003] 1. After the application is deployed, the administrator will manually enter the IP address and port information that needs to be monitored into the configuration center storage.

[0004] 2. The monitoring server obtains the IP address and port information from the configuration center, regularly polls for liveness detection, and issues an alarm for liveness detection failure.

[0005] The active detection method has the following disadvantages:

[0006] 1. There are many types of applications, especially the introduction of a large number of open source software, which leads to different application ports. The IP and port information of the active detection method need to be manually maintained.

[0007] 2. With the rapid development of our business and the extensive use of cloud computing and distributed computing, the scale of servers has experienced explosive growth. Manual entry of IP addresses and ports is labor-intensive and prone to errors. Summary of the invention

[0008] In view of the problems in the prior art, the present invention provides an application port monitoring method and device.

[0009] In one aspect of the present invention, a method for monitoring an application port includes:

[0010] Acquire port status information during the operation of the application to be monitored, wherein the port status information includes count data of normal port status, total number of inspections, and count data of status changes;

[0011] Generate an inspection pass rate and a port change rate according to the counting data of the normal port state, the total inspection number data and the state change counting data;

[0012] Alarm information is generated according to the inspection pass rate and the port change rate, a preset first threshold and a second threshold to trigger an alarm.

[0013] In some embodiments, it also includes:

[0014] A deep learning model is established, wherein the input of the deep learning model is the application to be monitored, and the output of the deep learning model is the first threshold and the second threshold.

[0015] In some embodiments, it also includes:

[0016] Collecting historical port status information of the application to be monitored;

[0017] A first threshold and a second threshold obtained according to the historical port status information and manual verification;

[0018] The deep learning model is trained using a training set consisting of the historical port status information, the first threshold, and the second threshold.

[0019] In some embodiments, generating the inspection pass rate according to the normal port status count data and the status change count data includes:

[0020] The inspection pass rate is generated according to the counting data of the normal port status and the total inspection number data.

[0021] In some embodiments, generating a port change rate according to the count data of the normal port state and the count data of the state change includes:

[0022] The port change rate is generated according to the total inspection number data and the state change count data.

[0023] In some embodiments, it also includes:

[0024] Setting an initial first threshold and a second threshold;

[0025] When the port is abnormal, record the inspection results of the inspection pass rate and the port change rate;

[0026] Receive manually marked alarm information and compare it with the generated alarm information. If the comparison is consistent, lower the first threshold and increase the second threshold.

[0027] Another aspect of the present invention is an application port monitoring device, comprising:

[0028] An information acquisition module is used to acquire the port status information during the operation of the application program to be monitored, wherein the port status information includes the count data of the normal port status, the total number of inspection times and the count data of the status change;

[0029] A generation module generates an inspection pass rate and a port change rate according to the counting data of the normal port state, the total number of inspection times and the state change counting data;

[0030] The alarm module generates alarm information according to the inspection pass rate and the port change rate, a preset first threshold and a second threshold to trigger an alarm.

[0031] In some embodiments, it also includes:

[0032] A model building module builds a deep learning model, wherein the input of the deep learning model is the application to be monitored, and the output is the first threshold and the second threshold.

[0033] In some embodiments, it also includes:

[0034] A collection module, collecting historical port status information of the application to be monitored;

[0035] A threshold determination module, which obtains the first threshold and the second threshold according to the historical port status information and manual verification;

[0036] A training module trains the deep learning model using a training set consisting of the historical port status information, the first threshold, and the second threshold.

[0037] In some embodiments, it also includes:

[0038] A setting module, setting an initial first threshold and a second threshold;

[0039] A recording module, when a port is abnormal, records the inspection results of the inspection pass rate and the port change rate;

[0040] The comparison module receives the manually marked alarm information and compares it with the generated alarm information. If the comparison is consistent, the first threshold is lowered and the second threshold is increased.

[0041] Another aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the application port monitoring method when executing the program.

[0042] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements an application port monitoring method when executed by a processor.

[0043] It can be seen from the above technical scheme that the application port monitoring method and device provided by the present invention obtain the port status information during the operation of the application to be monitored, and then generate the inspection pass rate and port change rate according to the counting data of the normal port status, the total inspection number data and the status change counting data, and then generate alarm information. The application port of the present invention is automatically identified without manual configuration, which saves environmental maintenance costs and improves monitoring accuracy. The port monitoring scope is no longer limited to application port monitoring, but all active ports of the server, and the server port monitoring is more comprehensive. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 The figure is a flow chart of a method for monitoring application ports in an embodiment of the present invention.

[0046] Figure 2 This is a diagram of the active detection port monitoring architecture in an embodiment of the present invention.

[0047] Figure 3 This is a diagram of the monitoring architecture in an embodiment of the present invention.

[0048] Figure 4 The figure is a schematic diagram of the structure of an application port monitoring device in an embodiment of the present invention.

[0049] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] It should be noted that the present invention can be applied to the fields of big data and artificial intelligence technology. Of course, it can also be used in other technical fields, such as application monitoring, etc., and the present invention is not limited to this.

[0052] The first embodiment of the present invention provides an application port monitoring method, such as Figure 1 As shown, including:

[0053] S1: Acquire port status information during the operation of the application to be monitored, wherein the port status information includes count data of normal port status, total check times data and state change count data;

[0054] S2: Generate an inspection pass rate and a port change rate according to the counting data of the normal port state, the total inspection number data and the state change counting data;

[0055] S3: Generate alarm information according to the inspection pass rate and the port change rate, a preset first threshold and a second threshold to trigger an alarm.

[0056] The application port monitoring method and device provided by the present invention obtain the port status information during the operation of the application to be monitored, and then generate the inspection pass rate and port change rate according to the counting data of the normal port status, the total inspection number data and the status change counting data, and then generate alarm information. The application port of the present invention is automatically identified without manual configuration, which saves environmental maintenance costs and improves monitoring accuracy. The port monitoring scope is no longer limited to the application port monitoring, but all active ports of the server, and the server port monitoring is more comprehensive.

[0057] The first threshold and the second threshold of the present invention can be obtained based on a neural network. The present invention also includes:

[0058] A deep learning model is established, wherein the input of the deep learning model is the application to be monitored, and the output of the deep learning model is the first threshold and the second threshold.

[0059] Specifically, the first threshold and the second threshold are determined according to the specific application program to be monitored, thereby ensuring accuracy and being able to be set specifically for different programs.

[0060] Furthermore, the present invention also includes:

[0061] Collecting historical port status information of the application to be monitored;

[0062] A first threshold and a second threshold obtained according to the historical port status information and manual verification;

[0063] The deep learning model is trained using a training set consisting of the historical port status information, the first threshold, and the second threshold.

[0064] In the present invention, the inspection pass rate is generated, including:

[0065] The inspection pass rate is generated according to the counting data of the normal port status and the total inspection number data.

[0066] In the present invention, generating a port change rate includes:

[0067] The port change rate is generated according to the total inspection number data and the state change count data.

[0068] For example, the monitoring architecture of the present invention is shown in FIG. Figure 3 As shown in the figure, it includes two modules: monitoring agent and monitoring server: (1) the monitoring agent is deployed on the application server to automatically identify the server port and send monitoring data; (2) the monitoring server is deployed separately to collect the data sent by the monitoring agent and issue regular alarms.

[0069] The core module of the present invention is a monitoring Agent, which includes two modules: automatic port data collection and abnormal port identification.

[0070] First, the operating system netstat command is used to read the ports in the LISTEN state, that is, the ports in the normal state, and record them in the LIST, and update the history table.

[0071] The history table contains the following:

[0072] Port number (PORT): the port where the operating system is in LISTEN state;

[0073] Port check times (N): The total number of times the port is checked starts from the time it is normal for the first time.

[0074] Normal port check times (N1): the number of times the port is in the LISTEN state;

[0075] Number of port status changes (N2): Counts when the port changes from LISTEN to non-LISTEN or from non-LISTEN to LISTEN.

[0076] Then, identify the ports that need to be monitored. Generally, applications use fixed ports for communication, but some programs use random ports for temporary communication in addition to fixed ports, and close the LISTEN after the communication ends. Therefore, define two indicators to improve the accuracy of port identification.

[0077] Port check pass rate: used to identify whether a port is in long-term use. The higher the check pass rate, the greater the possibility that the port is a port that needs to be monitored.

[0078]

[0079] Port change rate: used to identify temporary port disturbances. The more frequently the port LISTEN state changes, the greater the likelihood that the port is a temporary port, and it is a port that needs to be excluded from monitoring.

[0080]

[0081] Set thresholds T1 and T2 for P1 and P2 respectively. When P1 > T1 and P2 < T2 for a port, then the port is a port that needs to be monitored. Alarm when it is detected that the port is in a non-LISTEN state.

[0082] Furthermore, the present invention can dynamically set two thresholds. Specifically, the present invention further includes:

[0083] Set initial first and second thresholds;

[0084] When a port is abnormal, record the inspection results of the inspection pass rate and port change rate;

[0085] Receive the alarm information marked manually and compare it with the generated alarm information. If the comparison is consistent, then lower the first threshold and raise the second threshold.

[0086] In this embodiment, since the start and stop behaviors of application program ports are different, in order to improve the alarm accuracy, different thresholds need to be set for different ports. For this reason, we adopt a method for dynamically adjusting thresholds based on user feedback, and the specific implementation method is as follows:

[0087] (1) Set the initial values of T1 and T2 according to experience. When a port is abnormal, record the inspection results of P1 and P2 respectively. For example, P1: TRUE, P2: FALSE.

[0088] (2) Push the alarm information to the relevant server responsible person and provide a feedback function for marking whether it is an accurate alarm (TRUE) or a false alarm (FALSE).

[0089] (3) Threshold adjustment. When the P1 result is consistent with the user feedback, it means that the P1 index is effective for the port. Adjust T1 smaller to make it easier to trigger an alarm, otherwise adjust T1 larger. Similarly, when the P2 result is consistent with the user feedback, adjust T2 larger, otherwise adjust T2 smaller.

[0090] It can be understood that the present invention provides a method for monitoring application program ports without manual configuration, realizing automatic port identification, and no longer requiring maintenance of IP addresses and ports. The specific advantages are described as follows:

[0091] 1. Automatic identification of application program ports without manual configuration, saving the environmental maintenance cost and improving the monitoring accuracy.

[0092] 2. Dynamic adjustment of ports, realizing automatic addition of active ports and automatic deletion of inactive ports.

[0093] 3. The port monitoring scope is no longer limited to application port monitoring, but all active ports of the server, making server port monitoring more comprehensive.

[0094] Based on the same inventive concept, the embodiment of the present invention also provides an application port monitoring device, such as Figure 4 As shown, including:

[0095] Information acquisition module 1, acquires port status information during the operation of the application to be monitored, the port status information including count data of normal port status, total number of inspections and count data of status changes;

[0096] Generating module 2, generating an inspection pass rate and a port change rate according to the counting data of the normal port state, the total number of inspection times and the state change counting data;

[0097] The alarm module 3 generates alarm information according to the inspection pass rate and the port change rate, a preset first threshold and a second threshold to trigger an alarm.

[0098] In some embodiments, further comprising:

[0099] A model building module builds a deep learning model, wherein the input of the deep learning model is the application to be monitored, and the output is the first threshold and the second threshold.

[0100] In some embodiments, further comprising:

[0101] A collection module, collecting historical port status information of the application to be monitored;

[0102] A threshold determination module, which obtains the first threshold and the second threshold according to the historical port status information and manual verification;

[0103] A training module trains the deep learning model using a training set consisting of the historical port status information, the first threshold, and the second threshold.

[0104] In some embodiments, further comprising:

[0105] A setting module, setting an initial first threshold and a second threshold;

[0106] A recording module, when a port is abnormal, records the inspection results of the inspection pass rate and the port change rate;

[0107] The comparison module receives the manually marked alarm information and compares it with the generated alarm information. If the comparison is consistent, the first threshold is lowered and the second threshold is increased.

[0108] The application port monitoring device provided by the present invention obtains the port status information during the operation of the monitored application, and then generates the inspection pass rate and the port change rate according to the counting data of the normal port status, the total inspection times data and the status change counting data, and then generates the alarm information. The application port of the present invention is automatically identified without manual configuration, which saves the environmental maintenance cost and improves the monitoring accuracy. The port monitoring scope is no longer limited to the application port monitoring, but all active ports of the server, and the server port monitoring is more comprehensive.

[0109] From the hardware level, the present invention provides an embodiment of an electronic device for implementing all or part of the content of the application port monitoring method, and the electronic device specifically includes the following content:

[0110] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between servers, devices, distributed message middleware cluster devices, various databases and user terminals and other related devices; the electronic device can be a desktop computer, a tablet computer and a mobile terminal, etc., and the present embodiment is not limited thereto. In the present embodiment, the electronic device can be implemented with reference to the embodiment of the application port monitoring method in the embodiment, and the embodiment of the prediction device for time series data, the contents of which are incorporated herein, and the repeated parts are not repeated.

[0111] Figure 5 FIG. 9 is a schematic block diagram of a system structure of an electronic device 9600 according to an embodiment of the present invention. Figure 5 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 5 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0112] In one embodiment, the prediction function of time series data can be integrated into the central processing unit 9100.

[0113] In another embodiment, the prediction device for time series data may be configured separately from the central processing unit 9100. For example, the prediction device for time series data may be configured as a chip connected to the central processing unit 9100, and the prediction function of time series data may be implemented through the control of the central processing unit.

[0114] like Figure 5 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 5 In addition, the electronic device 9600 may also include Figure 5 For components not shown, reference may be made to the prior art.

[0115] like Figure 5 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0116] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0117] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0118] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0119] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0120] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0121] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0122] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the application port monitoring method in the above embodiment, wherein the execution subject may be a server. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all steps of the application port monitoring method in the above embodiment are implemented.

[0123] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, 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.

[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), 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 generate 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.

[0125] 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.

[0126] 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.

[0127] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for monitoring an application port, characterized in that: Including: Obtain the port status information during the running of the application to be monitored, where the port status information includes the count data of normal port status, the total number of inspection times data, and the status change count data; Generate an inspection pass rate and a port change rate according to the count data of the normal port status, the total number of inspection times data, and the status change count data; Generate an alarm message according to the inspection pass rate, the port change rate, a preset first threshold, and a second threshold to trigger an alarm; The step of generating an inspection pass rate and a port change rate according to the count data of the normal port status, the total number of inspection times data, and the status change count data includes: Automatically read and record all ports in the LISTEN state using the netstat command of the operating system, and update them to a historical table, where the historical table records the port number, the number of port inspections, the number of normal port inspections, and the number of port status changes; where The step of generating an alarm message according to the inspection pass rate, the port change rate, a preset first threshold, and a second threshold to trigger an alarm includes: Respectively set a first threshold T1 and a second threshold T2 for the inspection pass rate and the port change rate. When P1 > T1 and P2 < T2 for a port, determine that the port is a port to be monitored, and trigger an alarm when it is detected that the port is not in the LISTEN state.

2. The application port monitoring method according to claim 1, characterized in that: It also includes: Establish a deep learning model, where the input of the deep learning model is the application to be monitored, and the output is the first threshold and the second threshold.

3. The application port monitoring method according to claim 2, characterized in that: It also includes: Collect the historical port status information of the application to be monitored; Obtain the first threshold and the second threshold according to the historical port status information and manual verification; Use the training set composed of the historical port status information, the first threshold, and the second threshold to train the deep learning model.

4. The application port monitoring method according to any one of claims 1 to 3, characterized in that: The step of generating an inspection pass rate according to the count data of the normal port status and the status change count data includes: Generate the inspection pass rate according to the count data of the normal port status and the total number of inspection times data.

5. The application port monitoring method according to any one of claims 1 to 3, characterized in that: The step of generating a port change rate according to the count data of the normal port status and the status change count data includes: Generate the port change rate according to the total number of inspection times data and the status change count data.

6. The application port monitoring method according to any one of claims 1 to 3, characterized in that: It also includes: Set an initial first threshold and a second threshold; When the port is abnormal, record the inspection results of the inspection pass rate and the port change rate; Receive the manually marked alarm message, compare it with the generated alarm message, and if they match, lower the first threshold and raise the second threshold.

7. An application port monitoring device, characterized in that: Including: An information acquisition module that obtains the port status information during the running of the application to be monitored, where the port status information includes the count data of normal port status, the total number of inspection times data, and the status change count data; A generation module that generates an inspection pass rate and a port change rate according to the count data of the normal port status, the total number of inspection times data, and the status change count data; An alarm module that generates an alarm message according to the inspection pass rate, the port change rate, a preset first threshold, and a second threshold to trigger an alarm; The generation module is used for: Automatically read and record all ports in the LISTEN state using the netstat command of the operating system, and update them into a historical table, where the historical table records the port number, the number of port checks, the number of normal port checks, and the number of port status changes; wherein the alarm module is used for: respectively set a first threshold T1 and a second threshold T2 for the inspection pass rate and the port change rate. When P1 > T1 and P2 < T2 for a port, determine that the port is a port to be monitored, and trigger an alarm when it is detected that the port is not in the LISTEN state.

8. The application port monitoring device according to claim 7, characterized in that: It further includes: a model establishment module, which establishes a deep learning model. The input of the deep learning model is the application program to be monitored, and the output is the first threshold and the second threshold.

9. An electronic 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 program, it implements the application program port monitoring method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the application program port monitoring method according to any one of claims 1 to 6.