Routing inspection method and device for server

By using the Q-learning algorithm to process inspection indicator data in server inspection, the inspection process is automated, which solves the problems of high inspection cost, long time and irregularity in the existing technology, and realizes automated and standardized inspection.

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

Patent Information

Application Number
CN202410751645.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

The existing server inspection method lacks automation, resulting in high cost, long time and irregular inspection.

Method used

Obtain inspection indicator data through the server interface, generate inspection logs, and use the Q-learning algorithm to define the reward function and Q-value table, update the Q-value until convergence, determine the optimal inspection strategy, and realize automated inspection.

Benefits of technology

It reduces the cost of inspections, reduces the time required for inspections, and standardizes the inspection process without the need for manual inspections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760562A_ABST
    Figure CN118760562A_ABST
Patent Text Reader

Abstract

The invention discloses a server inspection method and device, and the method comprises the steps: obtaining inspection index data through a server interface, and generating an inspection log according to the inspection index data; routing inspection index data are recorded in the routing inspection log; when the inspection index data exceeds a preset index threshold value, determining that the inspection log is in an abnormal state; the method comprises the following steps: on the basis of a Q-learning algorithm, defining a Q-learning reward function; the reward function is used for maintaining a Q value table, and the Q value table comprises inspection index data; according to the inspection log in the abnormal state and a Q-learning reward function, calculating and updating a Q value at the same time until a Q value table converges; according to the Q value in the converged Q value table, optimal inspection index data are determined, an optimal inspection strategy is output, and the optimal inspection strategy comprises the optimal inspection index data. According to the invention, automatic inspection can be realized without manual inspection, so that the inspection cost is reduced, the inspection time consumption is reduced, and the inspection process is standardized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of patrol inspection technology, and in particular to a patrol inspection method and device for a server. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] At present, the existing inspection method requires professional staff to log in to the relevant server system and perform manual inspection. This inspection method has the problems of lack of automation, high inspection cost, and long time consumption. The existing technology cannot perform automated inspection, and there are problems such as long inspection time consumption and irregular inspection. Therefore, there is an urgent need for an inspection method to solve the above problems. Summary of the invention

[0004] The embodiment of the present invention provides a server inspection method for realizing automatic inspection, reducing inspection cost, reducing inspection time, and realizing standardization of the inspection process. The method includes:

[0005] Obtain inspection index data through the server interface, and generate inspection logs based on the inspection index data; the inspection logs record the inspection index data; the inspection index data include file directory disk status, engine concurrent paths, memory status, CPU status, and service process status;

[0006] When the inspection index data exceeds the preset index threshold, the inspection log is confirmed to be in an abnormal state;

[0007] When the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; the reward function is used to maintain the Q value table, which includes the inspection index data;

[0008] According to the inspection log under abnormal conditions and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges;

[0009] According to the Q value in the converged Q value table, the optimal inspection index data is determined, and the optimal inspection strategy is output. The optimal inspection strategy includes the optimal inspection index data.

[0010] The embodiment of the present invention further provides a server inspection device to realize automatic inspection, reduce inspection cost, reduce inspection time, and realize standardization of the inspection process. The device includes:

[0011] The inspection log generation module is used to obtain inspection index data through the server interface and generate inspection logs according to the inspection index data; the inspection logs record the inspection index data; the inspection index data include file directory disk status, engine concurrent paths, memory status, CPU status, and service process status;

[0012] The inspection log abnormal state confirmation module confirms that the inspection log is in an abnormal state when the inspection index data exceeds the preset index threshold;

[0013] The reward function definition module is used to define a Q-learning reward function based on the Q-learning algorithm when the inspection log is in an abnormal state; the reward function is used to maintain the Q value table, which includes the inspection indicator data;

[0014] The Q-value table maintenance module is used to calculate and update the Q-value according to the inspection log under abnormal conditions and the Q-learning reward function until the Q-value table converges;

[0015] The optimal inspection strategy determination module is used to determine the optimal inspection index data according to the Q value in the converged Q value table, and output the optimal inspection strategy, which includes the optimal inspection index data.

[0016] 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 server inspection method when executing the computer program.

[0017] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the inspection method of the server is implemented.

[0018] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the inspection method of the server is implemented.

[0019] In an embodiment of the present invention, inspection index data is obtained through a server interface, and an inspection log is generated according to the inspection index data; the inspection log records the inspection index data; the inspection index data includes the file directory disk status, engine concurrent paths, memory status, CPU status, and service process status; when the inspection index data exceeds a preset index threshold, the inspection log is confirmed to be in an abnormal state; when the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; the reward function is used to maintain a Q value table, which includes the inspection index data; according to the inspection log in the abnormal state and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges; according to the Q value in the converged Q value table, the optimal inspection index data is determined, and the optimal inspection strategy is output, and the optimal inspection strategy includes the optimal inspection index data. In the above process, the embodiment of the present invention updates the Q value through the Q-Learning algorithm to maintain the Q value table, determines the optimal inspection strategy according to the Q value, realizes automated inspection, eliminates the need for manual inspection, thereby reducing inspection costs, reducing inspection time, and realizing standardization of the inspection process. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] 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:

[0021] Figure 1 The present invention is a flow chart of a server inspection method according to an embodiment of the present invention;

[0022] Figure 2 This is a flowchart of restarting a service process in an embodiment of the present invention;

[0023] Figure 3 A flowchart of the performance evaluation of the optimal inspection strategy in an embodiment of the present invention;

[0024] Figure 4 is a schematic diagram of a patrol inspection device for a server in an embodiment of the present invention;

[0025] Figure 5 A diagram showing a specific example of a patrol inspection device for a server in an embodiment of the present invention;

[0026] Figure 6 It is a specific example diagram of the inspection device of the server in the embodiment of the present invention. DETAILED DESCRIPTION

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

[0028] Figure 1 The following is a flow chart of a method for inspecting a server according to an embodiment of the present invention. The method includes:

[0029] Step 101, obtaining inspection index data through the server interface, and generating an inspection log according to the inspection index data; the inspection log records the inspection index data; the inspection index data includes the file directory disk status, engine concurrent paths, memory status, CPU status, and service process status;

[0030] Step 102, when the inspection index data exceeds the preset index threshold, confirm that the inspection log is in an abnormal state;

[0031] Step 103, when the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; the reward function is used to maintain a Q value table, and the Q value table includes inspection index data;

[0032] Step 104, calculating and updating the Q value according to the inspection log under abnormal state and the Q-learning reward function until the Q value table converges;

[0033] Step 105, determining the optimal inspection index data according to the Q value in the converged Q value table, and outputting the optimal inspection strategy, wherein the optimal inspection strategy includes the optimal inspection index data.

[0034] Each step is described in detail below.

[0035] In step 101, inspection index data is obtained through the server interface, and an inspection log is generated based on the inspection index data; the inspection log records the inspection index data; the inspection index data includes file directory disk status, engine concurrent paths, memory status, CPU status, and service process status.

[0036] In a specific embodiment, the server is logged in through the SSH network security protocol connection. After the server is logged in, the relevant inspection index data can be obtained through the service interface, wherein when the inspection index data (disk status, memory status, CPU status, engine concurrent paths) is less than 80% of the maximum value and the service process exists, it means that the service performance is normal, and the relevant normal log is printed out; if the inspection index data is greater than 80% of the maximum value and the service process does not exist, it means an abnormality, and when the performance index is abnormal, the relevant server configuration is adaptively expanded through the Q-learning method.

[0037] In step 102, when the inspection index data exceeds a preset index threshold, the inspection log is confirmed to be in an abnormal state.

[0038] like Figure 2 As shown, in one embodiment, it also includes:

[0039] Step 201, when the inspection log is in an abnormal state, determine that the service process does not exist;

[0040] Step 202: if the service process does not exist, restart the service process, and update the service process status based on the restarted service process.

[0041] In a specific embodiment, when the file directory disk status value, engine concurrent path value, memory status value, CPU status, and service process status value are less than 80% of the preset maximum value and the service process exists, it indicates that the inspection log is in a normal state; if the write inspection index is greater than 80% of the preset maximum value and the service process does not exist, it indicates that the inspection log is in an abnormal state. When the inspection log is in an abnormal state, the related server configuration is adaptively expanded through the Q-learning method.

[0042] In a specific embodiment, a historical data set of server inspection indicators is constructed as a csv file for training, and the historical data set includes disk performance data, engine concurrent path data, memory status data, CPU status data and server process status data of the server in the past 30 days.

[0043] In step 103, when the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; the reward function is used to maintain a Q value table, which includes inspection index data.

[0044] In a specific embodiment, a reward function is defined, and the reward function is used to evaluate the effect of taking adaptive actions when the inspection log status is abnormal. For example, by expanding the capacity of the server inspection indicator, the inspection log status is changed to a normal state, and the server utilization rate after expansion is greater than or equal to 30%, then the operation should receive a positive reward; if the server utilization rate after expansion is less than 30%, a negative reward will be obtained.

[0045] In one embodiment, when the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm, including:

[0046] According to the inspection index data, determine the current state of the inspection index data and the action under the current state;

[0047] Calculate the penalty item of the inspection indicator data according to the current state of the inspection indicator data and the action in the current state;

[0048] The Q-learning reward function is determined based on the penalty item of the inspection indicator data, the current state of the inspection indicator data, and the action under the current state.

[0049] In a specific embodiment, the Q-learning reward function R(s,a) is:

[0050] R(s,a)=-w1·s1(s,a)-w2·s2(s,a);

[0051] Among them, s is the current state of the inspection indicator data, a is the action under the current state of the inspection indicator data, s1(s,a) represents the penalty item of the inspection indicator data, s2(s,a) represents the penalty item after the inspection indicator data is expanded, and w1 and w2 are weight coefficients.

[0052] In a specific embodiment, the inspection indicator status s of the server is defined as all possible states of the inspection indicator when it is in different threshold ranges, such as possible CPU usage status (low, medium, high), disk performance status (low, medium, high), memory usage status (low, medium, high), engine concurrent paths (low, medium, high), low represents 0-60% of the preset maximum value, medium represents 60%-80% of the preset maximum value, high represents more than 80% of the preset maximum value, and server process (exists, does not exist).

[0053] In a specific embodiment, action a under the inspection indicator state of the server is defined: determine all possible operations that can be taken, including normal output results or adaptive optimization. The CPU, disk performance, memory usage, and concurrent path data status are obtained through the server interface. When the service process exists, the data is printed into the inspection log and marked as normal; if the above data status is high, the CPU, disk, memory, and server quantity are adaptively expanded through the Q-Learning method. If the service process does not exist, the service can be restarted through the service restart interface.

[0054] In a specific embodiment, before maintaining the Q value table through the reward function, the Q value table is initialized. Usually, the initial Q value can be set to 0, where 0 represents a low state; otherwise, the Q value can be set to 1, where 1 represents a high state.

[0055] In step 104, the Q value is calculated and updated simultaneously according to the inspection log under the abnormal state and the Q-learning reward function until the Q value table converges.

[0056] In one embodiment, according to the inspection log under abnormal state and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges, including:

[0057] According to the inspection log under abnormal status and the Q-learning reward function, the Q value function of the inspection index data is determined; according to the Q value function of the inspection index data, the Q value is calculated and updated simultaneously until the Q value table converges.

[0058] In a specific embodiment, the inspection index data Q value function Q(s,a) is defined as:

[0059]

[0060] Among them, delta(t) is the error between time t+1 and time t, γ is the discount factor, Q max (s t+1 ,a) is in state s t+1 The maximum Q value when taking the optimal action a, Q(s t ,a) is in state s t The Q value function under t+1 ,a) is in state s t+1 The Q value function under , α is the learning rate.

[0061] In a specific embodiment, the network training model of the Q value function Q(s,a) is based on (s t , a t , r t+1 (a t ), s t+1 ) is the sample for training, where s t is the current state, a t is the action executed in the current state, r t+1 (a t ) is the immediate reward obtained after executing the action, s t+1 is the next state, and t is the time; the training steps are specifically: introducing a convolutional neural network into the Q value function; setting a network training model of the Q value function to calculate the target Q value.

[0062] In step 105, the optimal inspection index data is determined according to the Q value in the converged Q value table, and the optimal inspection strategy is output. The optimal inspection strategy includes the optimal inspection index data.

[0063] In one embodiment, determining the optimal inspection index data according to the Q value in the converged Q value table includes:

[0064] According to the inspection indicator data Q value function, select the optimal inspection indicator data based on the maximum Q value. Use the optimal inspection strategy in the actual server environment to optimize the server inspection performance.

[0065] like Figure 3 As shown, in one embodiment, it also includes:

[0066] Step 301, obtaining the inspection log of the optimal inspection strategy within a preset evaluation period;

[0067] Step 302: Evaluate the performance of the optimal inspection strategy using the inspection log.

[0068] The present invention also provides a server inspection device in an embodiment, as described in the following embodiment. Since the principle of solving the problem by the device is similar to that of the server inspection method, the implementation of the device can refer to the implementation of the server inspection method, and the repeated parts will not be repeated. Figure 4 As shown, the device comprises:

[0069] Inspection log generation module 401, used to obtain inspection index data through the server interface, and generate inspection logs according to the inspection index data; the inspection logs record the inspection index data; the inspection index data include file directory disk status, engine concurrent paths, memory status, CPU status, and service process status;

[0070] The inspection log abnormal state confirmation module 402 confirms that the inspection log is in an abnormal state when the inspection index data exceeds a preset index threshold;

[0071] The reward function definition module 403 is used to define a Q-learning reward function based on the Q-learning algorithm when the inspection log is in an abnormal state; the reward function is used to maintain the Q value table, and the Q value table includes the inspection index data;

[0072] A Q-value table maintenance module 404 is used to calculate and update the Q-value according to the inspection log under abnormal conditions and the Q-learning reward function until the Q-value table converges;

[0073] The optimal inspection strategy determination module 405 is used to determine the optimal inspection index data according to the Q value in the converged Q value table, and output the optimal inspection strategy, which includes the optimal inspection index data.

[0074] In one embodiment, the reward function definition module 403 is specifically used to:

[0075] According to the inspection index data, determine the current state of the inspection index data and the action under the current state;

[0076] Calculate the penalty item of the inspection indicator data according to the current state of the inspection indicator data and the action in the current state;

[0077] The Q-learning reward function is determined based on the penalty item of the inspection indicator data, the current state of the inspection indicator data, and the action under the current state.

[0078] In a specific embodiment, the Q-learning reward function is defined as R(s,a):

[0079] R(s,a)=-w1·s1(s,a)-w2·s2(s,a);

[0080] Among them, s is the current state of the inspection indicator data, a is the action under the current state of the inspection indicator data, s1(s,a) represents the penalty item of the inspection indicator data, s2(s,a) represents the penalty item after the inspection indicator data is expanded, and w1 and w2 are weight coefficients.

[0081] In one embodiment, the Q value table maintenance module 404 is specifically used to:

[0082] Determine the Q value function of the inspection index data based on the inspection log under abnormal conditions and the Q-learning reward function;

[0083] According to the inspection index data Q value function, the Q value is calculated and updated simultaneously until the Q value table converges.

[0084] In a specific embodiment, the inspection index data Q value function Q(s,a) is defined as:

[0085] delta(t)=R(s t+1 ,a)+γ·Q max (s t+1 ,a)-Q(s t ,a)

[0086] Q(s t+1 ,a)=Q(s t ,a)+α·delta(t);

[0087] Among them, delta(t) is the error between time t+1 and time t, γ is the discount factor, Q max (s t+1 ,a) is in state s t+1 The maximum Q value when taking the optimal action a, Q(s t ,a) is in state s t The Q value function under t+1 ,a) is in state s t+1 The Q value function under , α is the learning rate;

[0088] In one embodiment, the optimal inspection strategy determination module 405 is specifically used to:

[0089] According to the inspection index data Q value function, the optimal inspection index data based on the maximum Q value is selected.

[0090] like Figure 5As shown, in one embodiment, it also includes an optimal inspection strategy performance evaluation module 501, which is specifically used to:

[0091] Obtain the inspection log of the optimal inspection strategy within the preset evaluation time;

[0092] The inspection log is used to evaluate the performance of the optimal inspection strategy.

[0093] like Figure 6 As shown, in one embodiment, a service process restart module 601 is also included, which is specifically used to:

[0094] When the inspection log is in an abnormal state, make sure that the service process does not exist;

[0095] When the service process does not exist, the service process is restarted, and the service process status is updated based on the restarted service process.

[0096] The embodiment of the present invention can automatically extract relevant inspection indicators of the application system (including file directory status, CPU occupancy, memory usage, concurrent paths of speech recognition and synthesis server logs, whether the service process exists, etc.) through the pipeline automation strategy, and the automated inspection makes intelligent judgment and analysis on each inspection indicator in the following manner:

[0097] First, determine whether the service process exists. If the service process does not exist, provide process restart and query operations after restart; secondly, if the application directory disk occupancy is too large, the Q-Learning algorithm can be used to perform adaptive optimization functions, and finally send the conclusion to the relevant subscribers.

[0098] The server inspection method of the automation platform can effectively reduce inspection costs, avoid risks, and automatically push information. It has the following three advantages:

[0099] 1. Automated inspection: Transforming mechanized inspection into automation can effectively reduce the time and cost of operation and maintenance.

[0100] 2. Rules and regulations can avoid the risk of being reviewed by the Audit Bureau and Security Department due to manual operations not complying with industry regulations.

[0101] 3. Automated inspections can dynamically track server performance and push inspection information to relevant persons in charge via email every day, allowing application managers to adjust service plans and apply for resources in a timely manner.

[0102] 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 server inspection method when executing the computer program.

[0103] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the inspection method of the server is implemented.

[0104] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the inspection method of the server is implemented.

[0105] In an embodiment of the present invention, inspection index data is obtained through a server interface, and an inspection log is generated according to the inspection index data; the inspection log records the inspection index data; the inspection index data includes the file directory disk status, engine concurrent paths, memory status, CPU status, and service process status; when the inspection index data exceeds a preset index threshold, the inspection log is confirmed to be in an abnormal state; when the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; the reward function is used to maintain a Q value table, which includes the inspection index data; according to the inspection log in the abnormal state and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges; according to the Q value in the converged Q value table, the optimal inspection index data is determined, and the optimal inspection strategy is output, and the optimal inspection strategy includes the optimal inspection index data. In the above process, the embodiment of the present invention updates the Q value through the Q-Learning algorithm to maintain the Q value table, determines the optimal inspection strategy according to the Q value, realizes automated inspection, eliminates the need for manual inspection, thereby reducing inspection costs, reducing inspection time, and realizing standardization of the inspection process.

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

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

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

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

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

Claims

1. A server inspection method, characterized in that: include: Obtain inspection index data through the server interface and generate inspection logs based on the inspection index data; The inspection log records the inspection index data; the inspection index data includes the file directory disk status, engine concurrent paths, memory status, central processing unit CPU status, and service process status; When the inspection index data exceeds the preset index threshold, the inspection log is confirmed to be in an abnormal state; When the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm; The reward function is used to maintain the Q-value table, which includes inspection index data; According to the inspection log under abnormal conditions and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges; According to the Q value in the converged Q value table, the optimal inspection index data is determined, and the optimal inspection strategy is output. The optimal inspection strategy includes the optimal inspection index data.

2. The method according to claim 1, characterized in that Also includes: When the inspection log is in an abnormal state, make sure that the service process does not exist; When the service process does not exist, the service process is restarted, and the service process status is updated based on the restarted service process.

3. The method according to claim 1, characterized in that When the inspection log is in an abnormal state, a Q-learning reward function is defined based on the Q-learning algorithm, including: According to the inspection index data, determine the current state of the inspection index data and the action under the current state; Calculate the penalty item of the inspection indicator data according to the current state of the inspection indicator data and the action in the current state; The Q-learning reward function is determined based on the penalty item of the inspection indicator data, the current state of the inspection indicator data, and the action under the current state.

4. The method according to claim 3, characterized in that According to the inspection log under abnormal conditions and the Q-learning reward function, the Q value is calculated and updated simultaneously until the Q value table converges, including: According to the inspection log under abnormal status and the Q-learning reward function, the Q value function of the inspection index data is determined; according to the Q value function of the inspection index data, the Q value is calculated and updated simultaneously until the Q value table converges.

5. The method according to claim 4, characterized in that According to the Q value in the converged Q value table, determine the optimal inspection index data, including: According to the inspection index data Q value function, the optimal inspection index data based on the maximum Q value is selected.

6. The method according to claim 1, characterized in that Also includes: Obtain the inspection log of the optimal inspection strategy within the preset evaluation time; The inspection log is used to evaluate the performance of the optimal inspection strategy.

7. A server inspection device, characterized in that: include: The inspection log generation module is used to obtain inspection index data through the server interface and generate inspection logs according to the inspection index data; The inspection log records the inspection index data; the inspection index data includes the file directory disk status, engine concurrent paths, memory status, CPU status, and service process status; The inspection log abnormal state confirmation module confirms that the inspection log is in an abnormal state when the inspection index data exceeds the preset index threshold; The reward function definition module is used to define a Q-learning reward function based on the Q-learning algorithm when the inspection log is in an abnormal state; The reward function is used to maintain the Q-value table, which includes inspection index data; The Q-value table maintenance module is used to calculate and update the Q-value according to the inspection log under abnormal conditions and the Q-learning reward function until the Q-value table converges; The optimal inspection strategy determination module is used to determine the optimal inspection index data according to the Q value in the converged Q value table, and output the optimal inspection strategy, which includes the optimal inspection index data.

8. 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 1 to 6 is implemented.

9. 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 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.