Anomaly detection method and apparatus

CN116055348BActive Publication Date: 2026-10-09XINHUASAN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211646309.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2026-10-09
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

[0004]但是,在一些情况下,服务端的进程可能正常运行,可以接收到客户端的读写请求,但是无法对客户端的读写请求进行响应,比如服务端软件的异常致使读写请求在响应前进入循环等,此时,工作人员需要较长时间监测才能够确定出服务端异常,延长了对服务端进行修复的周期,降低了存储节点单台设备乃至进群集群整体的可靠性

Benefits of technology

[0036] In the embodiments described in this specification, a virtual client is formed within the storage node to receive statistical information sent by the server. When it is determined that the server's response increment to the external client is less than a predetermined increment, the virtual client formed within the storage node interacts with the server, and the server is determined based on the statistical information determined by the virtual client to determine whether the server has failed. This allows for faster identification of the server's abnormal state and improves the reliability of the storage node.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055348B_ABST
    Figure CN116055348B_ABST
Patent Text Reader

Abstract

The present specification provides an anomaly detection method and device, and relates to the technical field of communication. An anomaly detection method applied to a storage node comprises: a virtual client receiving a first statistical result obtained by a server for a first operation request sent by an external client, wherein the first statistical result at least comprises a request number of the first operation request and a response number of the first operation request; if the virtual client determines that an increment of the request number of the first operation request is less than a first preset increment according to the first statistical result, the virtual client initiates a second operation request to the server according to an access protocol corresponding to the external client; and if a success rate of responses received by the virtual client for the second operation request within a first continuous period is less than a preset success rate, the virtual client confirms that the server is abnormal and reports the server anomaly, wherein the success rate is determined according to the request number and the response number. Through the above method, the reliability of the storage node is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of communication technology, and in particular to an anomaly detection method and apparatus. Background Technology

[0002] With the popularization of network technology, the network can provide users with more and more services, which also requires the network to provide faster transmission speeds and larger storage space. As servers that provide network data storage and application support, they are gradually developing towards clustering in order to expand storage space, and managing distributed storage nodes through management nodes.

[0003] After a storage node in the cluster establishes a connection with a client on the user's side, the client sends a read / write request to the server. The server then searches the storage node based on the read / write request and sends the result back to the client, thus completing one interaction between the server and the client. During the operation of the storage node, the storage node monitors the running status of the server. If the server process freezes, the storage node can recover by restarting the process.

[0004] However, in some cases, the server-side process may run normally and receive read and write requests from the client, but it may be unable to respond to these requests. For example, an anomaly in the server-side software may cause read and write requests to enter a loop before a response is received. In such cases, staff need to monitor the server for a long time to determine the anomaly, which prolongs the repair cycle and reduces the reliability of individual storage nodes or even the entire cluster. Summary of the Invention

[0005] To overcome the problems existing in related technologies, this specification provides an anomaly detection method and apparatus.

[0006] In conjunction with the first aspect of the embodiments of this specification, this application provides an anomaly detection method applied to a storage node, wherein the storage node has a server and a virtual client, including:

[0007] The virtual client receives a first statistical result obtained by the server in response to a first operation request sent by an external client. The first statistical result includes at least the number of requests for the first operation request and the number of responses to the first operation request.

[0008] If the virtual client determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, then it initiates a second operation request to the server according to the access protocol corresponding to the external client.

[0009] If the success rate of the response to the second operation request received by the virtual client in the first consecutive period is less than the preset success rate, then an anomaly is confirmed on the server side, and the server anomaly is reported. The success rate is determined based on the number of requests and the number of responses.

[0010] Optionally, the virtual client initiates a second operation request to the server according to the access protocol corresponding to the external client, including:

[0011] The virtual client initiates a connection to the server based on the access protocol corresponding to that of the external client;

[0012] If the virtual client fails to establish a connection with the server for a preset number of consecutive attempts, it is confirmed that there is an error on the server side and the server error is reported.

[0013] If the virtual client establishes a connection with the server, it will send a second operation request to the server according to the access protocol corresponding to the external client.

[0014] Optionally, after initiating a second operation request to the server according to the access protocol corresponding to the external client, the process may further include:

[0015] If the increment of the number of responses to the first operation request count by the virtual client in the second consecutive period is not less than the second preset increment, then the connection established between the virtual client and the server based on the access protocol will be disconnected.

[0016] Optionally, before the virtual client receives the first statistical result obtained from the first operation request sent by the server to the external client, the method further includes:

[0017] If the virtual client does not receive the first statistical result from the server within the third consecutive period, it is confirmed that there is an anomaly on the server side and the server anomaly is reported.

[0018] Optionally, the method further includes:

[0019] The server performs statistics on the first operation request sent by the external client and the response to the first operation request, and sends the first statistical result to the virtual client.

[0020] In conjunction with a second aspect of the embodiments described herein, this application provides a virtual client applied to a storage node, wherein a server is also formed within the storage node, comprising:

[0021] The virtual client includes a monitoring module and a simulation module;

[0022] The monitoring module is used to receive the first statistical result obtained by the server in response to the first operation request sent by the external client. The first statistical result includes at least the number of requests for the first operation request and the number of responses to the first operation request.

[0023] If the monitoring module determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, it notifies the simulation module to initiate a second operation request to the server according to the access protocol corresponding to the external client.

[0024] If the success rate of the response to the second operation request received by the monitoring module within the first consecutive period is less than the preset success rate, then an anomaly is confirmed on the server side, and the server anomaly is reported. The success rate is determined based on the number of requests and the number of responses.

[0025] Optionally, the simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, including:

[0026] The simulation module initiates a connection to the server based on the access protocol corresponding to the external client;

[0027] If the simulation module fails to establish a connection with the server for a preset number of consecutive times, it is confirmed that there is an error on the server and the server error is reported.

[0028] If the simulation module establishes a connection with the server, it will send a second operation request to the server according to the access protocol corresponding to the external client.

[0029] Optionally, after the simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, it also includes:

[0030] If the increment of the number of responses to the first operation request counted by the monitoring module in the second consecutive period is not less than the second preset increment, then the simulation module is notified to disconnect the connection established between the virtual client and the server based on the access protocol.

[0031] Optionally, before the monitoring module receives the first statistical result obtained from the first operation request sent by the server to the external client, it also includes:

[0032] If the monitoring module does not receive the first statistical result from the server within the third consecutive period, it confirms that the server has encountered an anomaly and reports the server anomaly.

[0033] In conjunction with a third aspect of the embodiments of this specification, this application provides a storage node including a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor. The processor is prompted by the machine-executable instructions to: form a server and a virtual client in the storage node, and implement the method steps of any of the above.

[0034] In conjunction with the fourth aspect of the embodiments of this specification, this application provides a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, cause the processor to: form a server and a virtual client in a storage node, and implement the method steps of any of the above.

[0035] The technical solutions provided by the embodiments in this specification may include the following beneficial effects:

[0036] In the embodiments described in this specification, a virtual client is formed within the storage node to receive statistical information sent by the server. When it is determined that the server's response increment to the external client is less than a predetermined increment, the virtual client formed within the storage node interacts with the server, and the server is determined based on the statistical information determined by the virtual client to determine whether the server has failed. This allows for faster identification of the server's abnormal state and improves the reliability of the storage node.

[0037] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0039] Figure 1 This is a flowchart of an anomaly detection method involved in this application;

[0040] Figure 2 This is a network diagram applicable to an anomaly detection method involved in this application;

[0041] Figure 3 This is a network diagram of an anomaly detection method according to an embodiment of this application;

[0042] Figure 4 This is a schematic diagram of the structure of a virtual client involved in this application;

[0043] Figure 5 This is a schematic diagram of the structure of a server involved in this application;

[0044] Figure 6 This is a schematic diagram of the structure of a storage node involved in this application. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification.

[0046] This application provides an anomaly detection method applied to a storage node, where a server and a virtual client are formed, such as... Figure 1 As shown, it includes:

[0047] S100: The virtual client receives the first statistical result obtained by the server in response to the first operation request sent by the external client.

[0048] In such Figure 2 The storage cluster shown contains several storage nodes. A management center is deployed either inside or outside the storage cluster to manage the storage nodes. The following description assumes the management center is located within the storage cluster. Each storage node contains a server and virtual clients, which can be understood as being formed through program virtualization.

[0049] This server can communicate with external clients outside the storage cluster to write data to or read data from the storage cluster. The virtual client is associated with a separately allocated storage space within the storage node, isolated from the storage space managed by the server. The virtual client and server can be two independent processes running on the storage node.

[0050] The storage node stores several access protocols for use by the server and virtual clients. These access protocols are used for storage access between external clients and the server. For example, protocols such as FC (Fibre Channel Protocol), iSCSI (Internet Small Computer System Interface), NBD (Network Block Device), and RBD (Rados Block Device) are used to implement block storage; CIFS (Common Internet File System), NFS (Network File System), FTP (File Transfer Protocol), and HTTP (Hypertext Transfer Protocol) are used to implement file storage; and S3 (Simple Storage Service) and Swift are used to implement object storage.

[0051] After the storage cluster starts up, the server establishes a connection with the external client based on the access protocol selected by the external client. The server can then receive the first operation request sent by the external client. This first operation request can be a write request to write data to the storage node or a read request to read data from the storage node; there are no restrictions.

[0052] After receiving the first operation request, the server records the interaction, such as the number of times the operation request was received and the number of times it responded to the operation request, and generates statistical results. The statistical results of the first operation request from the external client are referred to as the first statistical results. The first statistical results include at least the number of times the first operation request was received and the number of times it responded to the first operation request.

[0053] After obtaining the statistical results, the server can send these results to the virtual client so that the virtual client can monitor the working status of the server.

[0054] S101. If the virtual client determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, then it initiates a second operation request to the server according to the access protocol corresponding to the external client.

[0055] After receiving the initial statistical results, the virtual client can determine the total number of requests from external clients to the server based on the request count. Both the server and the virtual client can record the initial statistical results over several consecutive periods. For example, regarding the total number of requests, the virtual client can determine the change in the total number of requests between the previous period and the current period; this change can be called the increment of the request count. If this increment is not less than a first preset increment, it can be considered that external clients are continuously accessing the server, and the server's external connections are in a normal state. If the increment is less than the first preset increment, it can be considered that the external client's access has not reached the server, and the server may be experiencing an anomaly.

[0056] At this point, the storage node cannot determine whether the anomaly is caused by a fault in the server itself or by a decrease in the number of operation requests from external clients. If no further anomaly assessment is performed, the anomaly may not be discovered for a long time, resulting in data loss from previous operation requests. If the anomaly is handled directly based on this result, it may lead to misjudgment and cause the server (or storage node) to restart, which will also result in data loss.

[0057] To avoid the above situation, a virtual client is created in the storage node to determine the access protocol selected by the external client connected to the server, and a second operation request is formed based on the access protocol to access the server. In other words, the first operation request and the second operation request are formed based on the same access protocol. If the server's processing of a certain access protocol is abnormal, it can be monitored and statistically analyzed through the second operation request based on the same access protocol and the second operation response to the second operation request.

[0058] S102. If the success rate of the response to the second operation request received by the virtual client in the first consecutive period is less than the preset success rate, then it is confirmed that there is an anomaly on the server side and the server anomaly is reported.

[0059] After a period of interaction, the virtual client can statistically analyze the second operation request and the responses to it, and calculate the success rate of the responses. The success rate is determined by the number of requests and the number of successful responses. Specifically, the number of requests can be considered the total number of requests or responses that should be given, while the number of successful responses can be understood as the number of successful responses (i.e., excluding non-response and failed responses). Therefore, the response success rate within a period is the quotient of the number of successful responses to the number of requests. Within a period, if the server's response success rate is less than the preset success rate, it indicates that the server's success rate in responding to operation requests is lower than expected, and this is considered an anomaly on the server side. A non-response refers to a response exceeding the preset response time after a request.

[0060] To avoid potential deviations in statistical results within a single period, a setting can be implemented where a server-side anomaly is confirmed if the success rate consistently falls below a preset success rate for the first consecutive period (e.g., two periods). The virtual client then reports this anomaly to the management center within the storage cluster, allowing users to become aware of its occurrence as quickly as possible.

[0061] By creating a virtual client within the storage node to receive statistical information sent by the server, when it is determined that the server's response increment to the external client is less than a predetermined increment, the virtual client created within the storage node interacts with the server, and determines whether the server has failed based on the statistical information determined by the virtual client. This allows for faster identification of abnormal server conditions and improves the reliability of the storage node.

[0062] Optionally, in step S102, the virtual client initiates a second operation request to the server according to the access protocol corresponding to the external client, including:

[0063] S102A: The virtual client initiates a connection to the server based on the access protocol corresponding to that of the external client.

[0064] S102B: If the virtual client fails to establish a connection with the server for a preset number of consecutive times, it is confirmed that there is an error on the server side, and the server error is reported.

[0065] S102C. If the virtual client establishes a connection with the server, it initiates a second operation request to the server according to the access protocol corresponding to the external client.

[0066] After determining the access protocol with the server, the virtual client establishes a connection with the server according to the access protocol. It should be noted that there may be multiple connection methods between the virtual client and the server. For example, when the virtual client interacts with the server to exchange statistical results, it could be communication between two processes on the storage node, achieved through mutually exposed access interfaces. However, communication between the virtual client and the server based on the access protocol can be an interaction performed through the access protocol itself; the two communication methods are different. When the server and the virtual client communicate based on the access protocol, protocol interaction is required, and a connection must be established.

[0067] If a virtual client initiates multiple connections to the server (e.g., 3 times) but fails to establish a connection, it indicates an anomaly on the server side regarding the access protocol, making access impossible. In this case, the virtual client can report the fault to the management center.

[0068] If the virtual client establishes a connection with the server, it means that the virtual client can access the server based on the access protocol. After that, the virtual client continuously sends a second operation request to the server, receives the response to the second operation request, and jumps to step S102 for processing.

[0069] Optionally, after step S101, which involves initiating a second operation request to the server according to the access protocol corresponding to the external client, the method further includes:

[0070] S103. If the increment of the number of responses to the first operation request counted by the virtual client in the second consecutive period is not less than the second preset increment, then disconnect the connection established between the virtual client and the server based on the access protocol.

[0071] After the virtual client establishes a connection with the server and initiates a second operation request to the server, the virtual client also continuously receives the server's response to the second operation request.

[0072] However, during this statistical process, the server may resume interaction with external clients. At this time, the interaction between the virtual client used for detection and the server will consume server resources.

[0073] To avoid virtual client requests consuming server resources, virtual clients can disconnect connections established based on access requests, thereby improving the server's processing efficiency for the first operation request sent by the external client.

[0074] In a virtual client, the connection to the server can be identified by the configured access protocol. The configured access protocol determines the connection of the virtual client to interact with external clients, thus enabling interaction between the external client and the server, as well as between the virtual client and the server.

[0075] Similarly, to avoid potential misjudgments when determining the server's working status based on a single statistical result, the virtual client can be configured to determine that the server is in a normal state if the statistical results for several consecutive periods confirm that the increment of the first operation request is not less than a second preset increment, thereby severing the connection between the virtual client and the server.

[0076] Optionally, before step S100, where the virtual client receives the first statistical result obtained by the server in response to the first operation request sent by the external client, the method further includes:

[0077] S104. If the virtual client does not receive the first statistical result sent by the server within the third consecutive period, it is confirmed that the server has an abnormality and the server abnormality is reported.

[0078] When the server is working normally, it continuously sends the initial statistical results to external clients to the virtual client so that the virtual client can obtain the server's working status. If the virtual client fails to receive the initial statistical results, it can be assumed that there may be an anomaly on the server side, and no action will be taken at this time.

[0079] Subsequently, if the virtual client fails to receive the first statistical result sent by the server within several consecutive periods, it can be determined that there is an anomaly on the server side, and the anomaly will be reported to the management center to improve the user's perception speed of server failure.

[0080] Optionally, the method further includes:

[0081] S105. The server performs statistics on the first operation request sent by the external client and the response to the first operation request, and sends the first statistical results to the virtual client.

[0082] During normal operation of the server, it will receive and count the first operation request and the first operation response sent by the external client, and send the first statistical result containing both to the virtual client so that the virtual client can determine whether the server has encountered an anomaly based on the first statistical result.

[0083] It should be noted that the first, second, and third continuous periods mentioned above can be the same number of periods or different numbers of periods. The first and second preset increments can also be set to the same or different numbers. These numbers can be set according to actual needs and are not restricted.

[0084] The following is combined with, for example Figure 3 The network shown is illustrated as a specific implementation method to explain an anomaly detection method involved in this application. Figure 3 In the storage cluster, there are storage node 1, storage node 2 and management center. Storage node 1 and storage node 2 are connected to the management center so that the management center can monitor and display the working status of each storage node. Client 1 and client 2 are set up in the storage cluster, and these two clients are connected to storage node 1.

[0085] In storage node 1 and storage node 2, server and virtual client processes are started via software. Within the virtual client, threads for monitoring and simulation modules are launched. The monitoring module is used to acquire statistical results sent by the server and to perform statistical analysis on the interactions between the simulation module and the server. Specifically, the virtual client in storage node 1 is labeled Virtual Client 1, its monitoring module is labeled Monitoring Module 10, and its simulation modules are labeled Simulation Module 11 and Simulation Module 12. Similarly, the virtual client in storage node 2 is labeled Virtual Client 2, its monitoring module is labeled Monitoring Module 20, and its simulation module is labeled Simulation Module 21.

[0086] An anomaly detection method, comprising:

[0087] S1. The server establishes a connection with the external client and receives operation requests from the external client.

[0088] Specifically, server 13 and client 1 establish a connection based on the iSCSI protocol, server 14 and client 2 establish a connection based on the S3 protocol, and server 2 and client 3 establish a connection based on the NFS protocol.

[0089] Server 13 receives read requests from client 1, server 14 receives write requests from client 2, and server 2 receives read requests from client 3. The following description uses the processing in storage node 1 as an example.

[0090] S2. The server counts the number of operation requests and responses for each client and sends the results to the monitoring module of the virtual client.

[0091] Within four defined cycles (10 seconds per cycle), server 13 and server 14 respectively count the number of requests and responses received from client 1 and client 2 in each cycle.

[0092] S3. The virtual client determines whether it has not received statistical results from the server for several consecutive periods. If it has received them, it jumps to step S4. If it has not received them, it reports the anomaly to the management center in the storage cluster.

[0093] Assuming that the monitoring module 10 can receive the statistical results sent by the server 13 and the server 14, no abnormality will be reported for the time being. After receiving the statistical results, the monitoring module 10 will jump to step S4.

[0094] S4. The virtual client records and calculates the success rate of responding to operation requests over several periods based on statistical results.

[0095] The statistical results obtained by monitoring module 10 are shown in Table 1:

[0096]

[0097] Table 1

[0098] Based on the data in Table 1 above, the success rate of the response is calculated, where the success rate is the quotient of the number of responses to the number of requests.

[0099] S5. The virtual client compares the increment of operation requests over several consecutive cycles to determine whether there is a cycle within the consecutive cycles that has not reached the preset increment. If so, the consecutive cycles are redefined; otherwise, the process proceeds to step S6.

[0100] As shown in the statistical results of client 1, since the increment in period 1 is 10, which does not meet the preset increment (40 times), the statistical results of this period are ignored, and the calculation starts from the next period. The preset increment is met in period 2, period 3 and period 4, which can be used as three consecutive periods for success rate calculation.

[0101] As shown in the statistical results of client 2, period 1 meets the preset increment, but period 2 does not meet the preset increment, so the consecutive periods need to be redefined. Periods 3 and 4 meet the preset increment and can be used as two consecutive periods for success rate calculation.

[0102] S6. The virtual client determines whether there may be an anomaly on the server based on the statistical results. If there may be, it jumps to S7. If not, it repeats the process from step S2 to step S6.

[0103] If the success rate is less than 50% for two consecutive cycles, it is considered that there may be an anomaly on the server side. Based on Table 1, the virtual client can determine the interaction with client 1. Since the success rate is less than 50% for two consecutive cycles 3 and 4, it is determined that some threads of server 13 interacting with client 1 may be abnormal, while the threads of server 14 interacting with client 2 can be determined to be in a normal state.

[0104] S7. The virtual client determines the access protocol between the server and the client, and starts the corresponding thread based on the access protocol to attempt to establish a connection with the server. If a connection fails to be established for several consecutive cycles, an exception is reported to the management center. If the connection is established successfully, proceed to S8.

[0105] In virtual client 1, each different emulation module can be configured with a different access protocol. For example, emulation module 11 is configured with the iSCSI protocol, and emulation module 12 is configured with the S3 protocol.

[0106] S8. The virtual client's simulation module constructs an operation request and transmits it to the server. The server processes the operation request and sends an operation response back to the virtual client. The virtual client's monitoring module performs statistics on the operation requests and responses.

[0107] Since the simulation module 11 sends a read request, the read response sent by the server will carry the read data. The simulation module 11 stores the data in the read response into the storage space it has allocated, thus completing one read operation interaction.

[0108] S9. The monitoring module in the virtual client determines whether the success rate of the response within a certain number of consecutive periods is less than the preset success rate based on the statistical results. If it is less than the preset success rate, the server is determined to be abnormal and reported to the management center. If it is not less than the preset success rate, the server is confirmed to be normal and the detection results are reported to the management center.

[0109] The specific success rate settings and comparisons are similar to those described in Table 1 above, and will not be repeated here.

[0110] Based on the above steps S1-S9, the server can be detected by the virtual client virtualized in the storage node to determine whether there are any abnormalities in the server.

[0111] S10. If the virtual client receives an incremental request for an operation from an external client that is not less than the preset increment, it disconnects the simulation module that is interacting with the server and stops the detection.

[0112] During the interaction between the simulation module 11 and the server 13, the client 1, which uses the same protocol as the simulation module 11, also interacts with the server 13. The server 13 sends statistical results to the monitoring module 10. Based on the statistical results, the monitoring module 10 determines that the server 13 has returned to a normal state, i.e., the increment of operation requests is greater than the preset increment. Therefore, the monitoring module 10 considers that the server 13 can resume providing services to the client 1. At this time, the monitoring module 10 can notify the simulation module 11 to disconnect from the server 13, reducing the processing burden on the server 13.

[0113] Correspondingly, this application provides a virtual client, such as Figure 4 As shown, this is applied to storage nodes, and a server is also formed within the storage node, including:

[0114] The virtual client includes a monitoring module and a simulation module;

[0115] The monitoring module is used to receive the first statistical result obtained by the server in response to the first operation request sent by the external client. The first statistical result includes at least the number of requests for the first operation request and the number of responses to the first operation request.

[0116] If the monitoring module determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, it notifies the simulation module to initiate a second operation request to the server according to the access protocol corresponding to the external client.

[0117] If the success rate of the response to the second operation request received by the monitoring module within the first consecutive period is less than the preset success rate, then an anomaly is confirmed on the server side, and the server anomaly is reported.

[0118] The success rate is determined based on the number of requests and the number of responses.

[0119] Optionally, the simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, including:

[0120] The simulation module initiates a connection to the server based on the access protocol corresponding to the external client;

[0121] If the simulation module fails to establish a connection with the server for a preset number of consecutive times, it is confirmed that there is an error on the server and the server error is reported.

[0122] If the simulation module establishes a connection with the server, it will send a second operation request to the server according to the access protocol corresponding to the external client.

[0123] Optionally, after the simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, it also includes:

[0124] If the increment of the number of responses to the first operation request counted by the monitoring module in the second consecutive period is not less than the second preset increment, then the simulation module is notified to disconnect the connection established between the virtual client and the server based on the access protocol.

[0125] Optionally, before the monitoring module receives the first statistical result obtained from the first operation request sent by the server to the external client, it also includes:

[0126] If the monitoring module does not receive the first statistical result from the server within the third consecutive period, it confirms that the server has encountered an anomaly and reports the server anomaly.

[0127] Correspondingly, this application provides a server-side solution, such as... Figure 5 As shown, it includes:

[0128] The processing module is used to process the first operation request received from the external client;

[0129] The response module is used to send a response to the first operation request to the external client;

[0130] The statistics module is used to perform statistics on the first operation request and the response to the first operation request, and send the first statistical results to the virtual client.

[0131] Optionally, the processing module is also used to process a second operation request received from the virtual client;

[0132] The response module is also used to send a response to the client in response to the second operation request.

[0133] Correspondingly, this application provides a storage node, such as Figure 6 As shown, it includes a transceiver, a processor, and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor. The processor is prompted by the machine-executable instructions to: form a server and a virtual client in the storage node, and implement the method steps of any of the above.

[0134] Correspondingly, this application provides a machine-readable storage medium storing machine-executable instructions. When called and executed by a processor, the machine-executable instructions cause the processor to: form a server and a virtual client in the storage node, and implement any of the above method steps.

[0135] The technical solutions provided by the embodiments in this specification may include the following beneficial effects:

[0136] In the embodiments described in this specification, a virtual client is formed within the storage node to receive statistical information sent by the server. When it is determined that the server's response increment to the external client is less than a predetermined increment, the virtual client formed within the storage node interacts with the server, and the server is determined based on the statistical information determined by the virtual client to determine whether the server has failed. This allows for faster identification of the server's abnormal state and improves the reliability of the storage node.

[0137] It should be understood that this specification is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

[0138] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the scope of protection of this specification.

Claims

1. An anomaly detection method, characterized in that, Applied to storage nodes, wherein a server and a virtual client are formed, including: The virtual client receives a first statistical result obtained by the server in response to a first operation request sent by an external client, wherein the first statistical result includes at least the number of requests for the first operation request and the number of responses to the first operation request; If the virtual client determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, then it initiates a second operation request to the server according to the access protocol corresponding to the external client. If the success rate of the response to the second operation request received by the virtual client in the first consecutive period is less than the preset success rate, then the server is confirmed to be abnormal, and the abnormality is reported to the management center deployed in or outside the storage cluster. The success rate is determined based on the number of requests and the number of responses.

2. The method according to claim 1, characterized in that, The virtual client initiates a second operation request to the server according to the access protocol corresponding to the external client, including: The virtual client initiates a connection to the server based on the access protocol corresponding to the external client; If the virtual client fails to establish a connection with the server for a preset number of consecutive times, it is confirmed that the server is abnormal and the server abnormality is reported. If the virtual client establishes a connection with the server, it initiates a second operation request to the server according to the access protocol corresponding to the external client.

3. The method according to claim 2, characterized in that, After initiating a second operation request to the server according to the access protocol corresponding to the external client, the method further includes: If the increment of the number of responses to the first operation request counted by the virtual client in the second consecutive period is not less than the second preset increment, then the connection established between the virtual client and the server based on the access protocol is disconnected.

4. The method according to claim 1, characterized in that, Before the virtual client receives the first statistical result obtained from the first operation request sent by the server to the external client, the method further includes: If the virtual client does not receive the first statistical result sent by the server within the third consecutive period, it is confirmed that the server is abnormal and the server abnormality is reported.

5. The method according to any one of claims 1-4, characterized in that, Also includes: The server performs statistics on the first operation request sent by the external client and the response to the first operation request, and sends the first statistical result to the virtual client.

6. A virtual client, characterized in that, Applied to storage nodes, wherein a server is also formed within the storage node, including: The virtual client includes a monitoring module and a simulation module; The monitoring module is used to receive a first statistical result obtained by the server in response to a first operation request sent by an external client, wherein the first statistical result includes at least the number of requests for the first operation request and the number of responses to the first operation request. If the monitoring module determines, based on the first statistical result, that the increment of the number of requests for the first operation request is less than the first preset increment, then it notifies the simulation module to initiate a second operation request to the server according to the access protocol corresponding to the external client. If the success rate of the response to the second operation request received by the monitoring module in the first consecutive period is less than the preset success rate, then the server is confirmed to be abnormal, and the abnormality is reported to the management center deployed in or outside the storage cluster. The success rate is determined based on the number of requests and the number of responses.

7. The virtual client according to claim 6, characterized in that, The simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, including: The simulation module initiates a connection to the server based on the access protocol corresponding to the external client; If the simulation module fails to establish a connection with the server for a preset number of consecutive times, it is confirmed that the server is abnormal and the server abnormality is reported. If the simulation module establishes a connection with the server, it initiates a second operation request to the server according to the access protocol corresponding to the external client.

8. The virtual client according to claim 7, characterized in that, After the simulation module initiates a second operation request to the server according to the access protocol corresponding to the external client, the method further includes: If the increment of the number of responses to the first operation request counted by the monitoring module in the second consecutive period is not less than the second preset increment, then the simulation module is notified to disconnect the connection established between the virtual client and the server based on the access protocol.

9. The virtual client according to claim 6, characterized in that, Before the monitoring module receives the first statistical result obtained from the first operation request sent by the server to the external client, it further includes: If the monitoring module does not receive the first statistical result sent by the server within the third consecutive period, it confirms that the server is abnormal and reports the server abnormality.

10. A storage node, characterized in that, The device includes a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which is prompted by the machine-executable instructions to: form a server and a virtual client in a storage node, and implement the steps of the method according to any one of claims 1-5.

11. A machine-readable storage medium, characterized in that, The storage contains machine-executable instructions that, when invoked and executed by a processor, cause the processor to: form a server and a virtual client in the storage node, and implement the steps of the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Application monitoring system and method based on simulated user requests

    CN107819614A