Request processing method and device, equipment and readable storage medium

The method addresses data inconsistencies in centralized storage systems by discarding IO requests based on server fault types and request information, ensuring data coherence.

CN120321112APending Publication Date: 2025-07-15SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510535778.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In centralized storage systems, data inconsistency between clients and servers due to server failure or network failure.

Method used

By receiving the IO request sent by the target server, determining its fault type, and discarding the IO request when the discarding condition is met, including parsing the identification information and version information of the target server, processing the serial number using a hash algorithm, updating the data structure and version information to ensure data consistency.

Benefits of technology

This avoids the server continuing to execute IO requests that meet the discarding conditions, ensures that the client's expectations are consistent with the data actually executed by the server, and reduces the situation of data inconsistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321112A_ABST
    Figure CN120321112A_ABST
Patent Text Reader

Abstract

The invention relates to a request processing method and device, equipment and a readable storage medium. Comprising the steps of receiving an input / output IO request sent by a target server, determining a fault type of the target server according to detection information of the target server, analyzing the IO request according to the fault type and the IO request, obtaining analysis information of the IO request, and discarding the IO request under the condition that the IO request is determined to meet a discarding condition according to the analysis information; the fault of the target server occurs after the IO request is sent. According to the method, the IO requests meeting the discarding conditions are screened according to the analysis information, and the IO requests meeting the discarding conditions are discarded, so that the situation that the server continues to execute the IO requests meeting the discarding conditions, and the expectation of the client is inconsistent with the data actually executed by the server is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of centralized storage systems, and particularly to a method, apparatus, device, and readable storage medium for processing requests. Background Art

[0002] A centralized storage system usually includes multiple servers. When a slave execution module of any one of the servers receives an input / output (IO) request sent by a client, it forwards this IO request to the master execution module of other servers, so that the master execution module of other servers processes this IO request.

[0003] However, during the process of the slave execution module of server A forwarding IO request a to the master execution module of other servers, server A may fail or there may be a network failure between server A and the client. After the client senses the failure, it will resend the same IO request a1 to other servers except server A. After other servers execute IO request a1, the client sends IO request b to other servers. After other servers execute IO request b, IO request a is executed again. For IO request a1 and IO request b, other servers can normally send response messages to the client after execution. However, for IO request a, due to server A failure or network failure between server A and the client, IO request a cannot normally send a response message to the client after execution. In this case, the client expects the data corresponding to IO request b, while the data on other servers is actually the data of IO request a.

[0004] Therefore, traditional technologies may lead to the problem of data inconsistency between the client and servers in a centralized storage system. Summary of the Invention

[0005] Based on this, it is necessary to provide a method, apparatus, device, and readable storage medium for processing requests that can ensure data consistency between the client and servers in a centralized storage system for the above technical problems.

[0006] In a first aspect, this application provides a method for processing requests, including:

[0007] Receiving an input / output (IO) request sent by a target server;

[0008] Determining the failure type of the target server according to the detection information of the target server; the failure of the target server occurs after sending the IO request;

[0009] Discarding the IO request when it is determined that the IO request meets the discard condition according to the failure type and the IO request.

[0010] For the processing method of the above request, based on the detection information of the target server, determine the fault type of the target server, and based on the fault type of the target server and the received IO request, determine whether the IO request meets the discard condition, and discard the IO request that meets the discard condition, avoiding the server from continuing to execute the IO request that meets the discard condition, so as to prevent the situation where the expectation of the client is inconsistent with the data actually executed by the server.

[0011] In one embodiment, the above method further includes:

[0012] In the case where the fault type is a communication network fault between the target server and the client, parse the IO request to obtain the identification information of the target server and the version information of the IO request;

[0013] According to the identification information, obtain the version information of the IO request in the target server at the current moment;

[0014] According to the version information of the IO request and the version information of the IO request in the target server at the current moment, determine whether the IO request meets the discard condition.

[0015] In this embodiment, by parsing the IO request sent by the target server, the identification information of the target server and the version information of the IO request are obtained, and according to the identification information of the target server, the version information of the IO request in the target server at the current moment is obtained, and according to the version information of the IO request and the version information of the IO request in the target server at the current moment, it can be determined whether the IO request needs to be discarded, providing a basis for discarding the IO request that needs to be discarded subsequently, so as to avoid the server from continuing to execute the IO request that meets the discard condition, and prevent the situation where the expectation of the client is inconsistent with the data actually executed by the server.

[0016] In one embodiment, the above determination of whether the IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment includes:

[0017] If the version information of the IO request is the same as the version information of the IO request in the target server at the current moment, it is determined that the IO request does not meet the discard condition;

[0018] If the version information of the IO request is different from the version information of the IO request in the target server at the current moment, according to the identification information, obtain the data structure information of the target server, and according to the data structure information and the sequence number of the IO request, determine whether the IO request meets the discard condition.

[0019] In this embodiment, by using the version information of the IO request and the version information of the IO request in the target server at the current moment, it is determined whether the IO request meets the discard condition. And when the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, it is further determined whether the IO request meets the discard condition by using the data structure information and the sequence number of the IO request, providing a basis for discarding the IO requests that need to be discarded subsequently, so as to avoid the server continuing to execute the IO requests that meet the discard condition, and preventing the situation where the expectations of the client are inconsistent with the data actually executed by the server.

[0020] In one embodiment, the determining whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request includes:

[0021] Performing a hash algorithm process on the sequence number of the IO request to obtain a hash value corresponding to the sequence number;

[0022] If the hash value is included in the data structure information, it is determined that the IO request meets the discard condition.

[0023] In this embodiment, by determining whether the hash value corresponding to the sequence number of the IO request is in the data structure of the target server, it is determined whether the IO request meets the discard condition, providing a basis for discarding the IO requests that need to be discarded subsequently, so as to avoid the server continuing to execute the IO requests that meet the discard condition, and preventing the situation where the expectations of the client are inconsistent with the data actually executed by the server.

[0024] In one embodiment, the above method further includes:

[0025] Updating the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0026] In this embodiment, by updating the structure information of the target server and the version information of the IO request in the target server, it provides a data basis for subsequently determining whether the IO request needs to be discarded according to the structure information of the target server and the version information of the IO request in the target server, and promptly discarding the IO requests that need to be discarded, ensuring that the expectations of the client are consistent with the data actually executed by the server.

[0027] In one embodiment, the above method further includes:

[0028] When discarding the IO request, sending a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded;

[0029] Receive a retransmission request for an I / O request sent by the target server; the retransmission request is an I / O request that the target server retransmits in response to a prompt message.

[0030] Respond to the retransmitted I / O request.

[0031] In this embodiment, when discarding the I / O request, the target server can determine whether there is a misjudgment of the I / O request, and in the case of misjudging the I / O request, retransmit the I / O request to avoid the situation of missed transmission of the I / O request.

[0032] In one embodiment, the above method further includes:

[0033] When the fault type is a target server fault, parse the I / O request to obtain the identification information of the target server;

[0034] According to the identification information, obtain the current version information of the target server from a preset correspondence table; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server;

[0035] If the current version information is inconsistent with the version information of the target server carried in the I / O request, determine that the I / O request meets the discard condition.

[0036] In this embodiment, by parsing the I / O request sent by the target server, the identification information of the target server is obtained, and according to the identification information of the target server, the current version information of the target server is obtained, and based on the version information of the target server carried in the I / O request and the current version information, it can be determined whether the I / O request needs to be discarded, providing a basis for discarding the I / O request that needs to be discarded subsequently, so as to avoid the situation where the server continues to execute the I / O request that meets the discard condition and causes the inconsistency between the client's expectation and the data actually executed by the server.

[0037] In one embodiment, the above method further includes:

[0038] Update the version information of the target server to obtain the current version information of the target server.

[0039] In this embodiment, by updating the version information of the target server, it provides a data basis for subsequently determining whether the I / O request needs to be discarded according to the version information of the target server and timely discarding the I / O request that needs to be discarded, ensuring the consistency between the client's expectation and the data actually executed by the server.

[0040] In a second aspect, the present application further provides a request processing device, including:

[0041] A receiving module, configured to receive an input / output (I / O) request sent by a target server;

[0042] A determination module, configured to determine the fault type of a target server according to the detection information of the target server; the fault of the target server occurs after an I / O request is sent.

[0043] A discarding module, configured to discard the I / O request when it is determined that the I / O request meets the discarding condition according to the fault type and the I / O request.

[0044] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0045] Receiving an input / output (I / O) request sent by a target server;

[0046] Determining the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after the I / O request is sent.

[0047] Discarding the I / O request when it is determined that the I / O request meets the discarding condition according to the fault type and the I / O request.

[0048] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0049] Receiving an input / output (I / O) request sent by a target server;

[0050] Determining the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after the I / O request is sent.

[0051] Discarding the I / O request when it is determined that the I / O request meets the discarding condition according to the fault type and the I / O request.

[0052] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0053] Receiving an input / output (I / O) request sent by a target server;

[0054] Determining the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after the I / O request is sent.

[0055] Discarding the I / O request when it is determined that the I / O request meets the discarding condition according to the fault type and the I / O request.

[0056] The method, apparatus, device, and readable storage medium for processing the above request determine the fault type of the target server according to the detection information of the target server, and determine whether the IO request meets the discard condition according to the fault type of the target server and the received IO request, and discard the IO request that meets the discard condition. Compared with the existing method of processing all received IO requests, the present application first screens the IO requests that meet the discard condition according to the parsing information and discards the IO requests that meet the discard condition, avoiding the server from continuing to execute the IO requests that meet the discard condition, and preventing the situation where the expectation of the client is inconsistent with the data actually executed by the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0058] Figure 1 Schematic diagram of the background introduction of the method for processing requests in an embodiment;

[0059] Figure 2 Application environment diagram of the method for processing requests in an embodiment;

[0060] Figure 3 Schematic flowchart of the method for processing requests in an embodiment;

[0061] Figure 4 Schematic flowchart of the method for processing requests in another embodiment;

[0062] Figure 5 Schematic flowchart of the method for processing requests in another embodiment;

[0063] Figure 6 Schematic flowchart of the method for processing requests in another embodiment;

[0064] Figure 7 Schematic flowchart of the process for updating the IO version number in an embodiment;

[0065] Figure 8 Schematic flowchart of the process for processing requests when the server fails in an embodiment;

[0066] Figure 9 Schematic flowchart of the method for processing requests in another embodiment;

[0067] Figure 10Schematic flowchart of the processing method requested in another embodiment;

[0068] Figure 11 Schematic flowchart of the version number update process of the server in one embodiment;

[0069] Figure 12 Schematic flowchart of the processing process of the request when a network failure occurs in one embodiment;

[0070] Figure 13 Schematic flowchart of the processing method of the request in another embodiment;

[0071] Figure 14 Schematic flowchart of the processing method of the request in another embodiment;

[0072] Figure 15 Schematic flowchart of the processing method of the request in another embodiment;

[0073] Figure 16 Structural block diagram of the processing device of the request in one embodiment;

[0074] Figure 17 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners

[0075] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] Generally, a centralized storage system includes multiple servers. When the slave execution module of any one of the servers receives an IO request sent by a client, it will forward the IO request to the master execution module of other servers in the centralized storage system, so that the master execution module of other servers processes this IO request.

[0077] Exemplarily, such as Figure 1As shown in the figure, the client sends a write request W1 to server A in the centralized storage system via a network device. Server A determines the location of its corresponding main execution module. If the location of the main execution module corresponding to server A is on server N, then server A can forward the write request W1 to server N for processing. During this process, server A failure or network failure between the client and server A may occur. After the client senses the failure, it will resend a new write request W1 to server N. After server N receives the new write request W1 sent by the client, it actually executes the new write request W1 and feeds back the execution result of the new write request W1 to the client. After the client receives the execution result corresponding to the new write request W1, it can send a write request W2 to server N. After server N receives the write request W2 sent by the client, it actually executes the write request W2 and feeds back the execution result of the write request W2 to the client. For the write request W1, due to server A failure or network failure between server A and the client, the response message cannot be normally sent to the client after the write request W1 is executed. In this case, what the client expects is the data corresponding to the write request W2, while on other servers, it is actually the data corresponding to the write request W1.

[0078] Therefore, the traditional technology may cause the problem of data inconsistency between the client and the server in the centralized storage system. The present application aims to provide a method for processing requests to solve the problem of data inconsistency between the client and the server in the centralized storage system in the traditional technology.

[0079] The method for processing requests provided in the embodiments of the present application can be applied to, for example Figure 2 the application environment shown in the figure. Among them, the target server 102 and the server 101 form a centralized storage system 10. The target server 102 and the server 101 communicate with each other through a network. The client 103 can communicate with the target server 102 and the server 101 through a network. Among them, the client 103 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.

[0080] In one embodiment, as Figure 3 shown, a method for processing requests is provided. Taking the server 101 in Figure 2 as an example for illustration, the method includes the following steps:

[0081] S201, receive an input / output (IO) request sent by a target server.

[0082] Among them, the input / output (IO) request in this embodiment can be a write request or a read request. In this embodiment, when the target server in the centralized storage system receives an IO request, the target server can forward the IO request to other servers in the centralized system.

[0083] Generally, the sent IO request may carry information such as the identification information of the target server, the request type of the IO request, the version information of the target server, the version information of the IO request, and the sequence number of the IO request.

[0084] S202, determine the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after the IO request is sent.

[0085] Among them, the fault type of the target server includes the target server fault and the communication network fault between the target server and the client.

[0086] S203, discard the IO request if it is determined that the IO request meets the discard condition according to the fault type and the IO request.

[0087] In some scenarios, when the target server forwards an IO request, the network between the target server and the client may fail, or the target server itself may fail, resulting in the situation that the IO request times out and is not processed. If the received IO request is continued to be processed after the failure, it will cause the problem of data inconsistency between the client and the target server. Therefore, in this embodiment, it is necessary to determine whether the IO request meets the discard condition according to the fault type and the IO request to avoid the problem of inconsistency between the client and the server. Among them, the IO request meets the discard condition may be that the current version information of the target server is inconsistent with the version information of the target server carried in the IO request, or the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, and the hash value corresponding to the sequence number of the IO request is located in the data structure of the target server; or the current version information of the target server is inconsistent with the version information of the target server carried in the IO request, and the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, and the hash value corresponding to the sequence number of the IO request is located in the data structure of the target server.

[0088] In this embodiment, after obtaining the fault type of the target server, it is possible to determine whether the IO request meets the discard condition based on the fault type of the target server and the IO request, and discard the IO request when the IO request meets the discard condition.

[0089] Optionally, if the fault type of the target server is a target server fault, the IO request is parsed to obtain the parsing information of the IO request and the identification information of the target server, and the current information of the target server is obtained according to the identification information of the target server. If the current information of the target server is consistent with the parsing information of the IO request, it is determined that the IO request does not meet the discard condition, and at this time, the IO request is continued to be executed. If the parsing information of the IO request is inconsistent with the current information of the target server, it is determined that the IO request meets the discard condition, and the IO request is discarded.

[0090] For example, when the parsing information of the IO request is the version information of the target server carried in the IO request, and the current information of the target server is the current version information of the target server, if the current version information of the target server is consistent with the version information of the target server carried in the IO request, it is determined that the IO request does not meet the discard condition, and at this time, the IO request is continued to be executed. If the current version information of the target server is inconsistent with the version information of the target server carried in the IO request, it is determined that the IO request meets the discard condition, and the IO request is discarded.

[0091] For the above request processing method, the fault type of the target server is determined according to the detection information of the target server, and it is determined whether the IO request meets the discard condition according to the fault type of the target server and the received IO request, and the IO request that meets the discard condition is discarded. Compared with the existing method of processing all received IO requests, the present application first screens the IO requests that meet the discard condition according to the parsing information and discards the IO requests that meet the discard condition, avoiding the server from continuing to execute the IO requests that meet the discard condition, and making the situation where the expectation of the client is inconsistent with the data actually executed by the server.

[0092] In some scenarios, it is also necessary to further elaborate on the process of determining whether the IO request meets the discard condition according to the fault type of the target server and the IO request. In an exemplary embodiment, as Figure 4 shown, the above method further includes:

[0093] S301, in the case where the fault type is a communication network fault between the target server and the client, the IO request is parsed to obtain the identification information of the target server and the version information of the IO request.

[0094] In this embodiment, when the fault type is a communication network fault between the target server and the client, the IO request is parsed to obtain the identification information of the target server and the version information of the IO request.

[0095] In an exemplary embodiment, when the content of the IO request is in text format (e.g., Hyper Text Transfer Protocol (HTTP) request, log file, etc.), the request content can be parsed by means of string processing; for IO requests in binary format (e.g., Transmission Control Protocol (TCP) packets, file transfer, etc.), the IO requests can be parsed according to the protocol specifications; for IO requests that follow specific protocol specifications (e.g., File Transfer Protocol (FTP) and Simple Mail Transfer Protocol (SMTP)), the requests can be parsed according to the syntax rules of the protocols.

[0096] S302. Obtain the version information of the IO request in the target server at the current moment according to the identification information.

[0097] Among them, the identification information of the target server is used to uniquely identify and manage the target server. It should be noted that each server in the centralized storage system has an independent identification information; the version information of the IO request refers to the IO version number corresponding to the identification information of the target server carried in the IO request; the version information of the IO request in the target server at the current moment refers to the IO version number obtained by the monitoring module of this server at the current moment according to the identification information of the target server.

[0098] In this embodiment, after parsing the IO request to obtain the identification information of the target server carried in the IO request, the version information of the IO request in the target server at the current moment can be obtained from the preset correspondence table according to the identification information of the target server; it should be noted that the preset correspondence table includes the correspondence between the identification information and the current version information of the IO request in the target server.

[0099] S303. Determine whether the IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment.

[0100] In this embodiment, after parsing the version information of the IO request and obtaining the version information of the IO request in the target server at the current moment, the version information of the IO request can be compared with the version information of the IO request in the target server at the current moment to obtain a comparison result, and based on the comparison result, it is determined whether the IO request meets the discard condition.

[0101] For example, if the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, it is necessary to further determine whether the IO request meets the discard condition according to the data structure information of the target server. If the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, it is determined that the IO request does not meet the discard condition.

[0102] In this embodiment, by the identification information of the target server, the version information of the IO request in the target server at the current moment is obtained, and based on the version information of the IO request and the version information of the IO request in the target server at the current moment, it can be determined whether the IO request needs to be discarded, providing a basis for discarding the IO requests that need to be discarded subsequently, so as to avoid the server from continuing to execute the IO requests that meet the discard condition, and preventing the situation where the client's expectations are inconsistent with the data actually executed by the server.

[0103] The detailed process of determining whether the IO request meets the discard condition will be explained in this embodiment. In an exemplary embodiment, as Figure 5 shown, the above S302 includes:

[0104] S401, if the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, it is determined that the IO request does not meet the discard condition.

[0105] In this embodiment, when the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, it indicates that no network failure occurred during the process of the target server sending the IO request to this server, that is, during the process of the target server sending the IO request to this server, the version information of the IO request did not change. Therefore, it is determined that the IO request is normal and does not meet the discard condition.

[0106] S402, if the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, the data structure information of the target server is obtained according to the identification information, and it is determined whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request.

[0107] Among them, the data structure information includes a bitmap (Bitmap).

[0108] In this embodiment, when the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, according to the identified information of the target server obtained by parsing, the data structure information of the target server is obtained from the monitoring module of this server, and the sequence number of the IO request is obtained by parsing the IO request. Then, it is determined whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request.

[0109] In this embodiment, it is determined whether the IO request meets the discard condition through the version information of the IO request and the version information of the IO request in the target server at the current moment. When the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, it is further determined whether the IO request meets the discard condition through the data structure information and the sequence number of the IO request, providing a basis for discarding the IO requests that need to be discarded subsequently, so as to avoid the server from continuing to execute the IO requests that meet the discard condition, and prevent the situation where the expectations of the client are inconsistent with the data actually executed by the server.

[0110] The detailed process of determining whether the IO request meets the discard condition in this embodiment will be explained. In an exemplary embodiment, as Figure 6 shown, the above S402 includes:

[0111] S501, perform a hashing algorithm process on the sequence number of the IO request to obtain the hash value corresponding to the sequence number.

[0112] In this embodiment, after receiving the IO request sent by the target server, the sequence number of the IO request can also be obtained by parsing, and a hashing algorithm process is performed on the sequence number of the IO request to obtain the hash value corresponding to the sequence number.

[0113] Optionally, two different types of hashing algorithm processes can be performed on the sequence number of the IO request respectively to obtain two hash values corresponding to the sequence number. Different types of hashing algorithms include non-cryptographic hashing algorithms, cryptographic hashing algorithms, dedicated hashing algorithms, etc.

[0114] S502, if the hash value is included in the data structure information, determine that the IO request meets the discard condition.

[0115] In this embodiment, after determining the hash value corresponding to the sequence number, it is determined whether the hash value is included in the data structure information of the target server. If the hash value is not included in the data structure information of the target server, it is determined that the IO request does not meet the discard condition. If the hash value is included in the data structure information of the target server, it is determined that the IO request meets the discard condition.

[0116] It should be noted that if the data structure information of the target server does not include a hash value, it indicates that no network failure occurred during the process of the target server sending an IO request to this server. Therefore, the IO request is executed normally. If the data structure information of the target server includes a hash value, it indicates that a network failure may have occurred during the process of the target server sending an IO request to this server. Therefore, the IO request meets the discard condition and needs to be discarded. It should be noted that if the data structure information of the target server includes a hash value, there may also be a misjudgment of the network failure. If a misjudgment of the network failure occurs, the target server will send the IO request to the server again for retry to ensure that the IO request is executed normally.

[0117] The following will provide a complete description of the fault handling processes of the target server and the primary server when a network failure occurs: Refer to Figure 7 , when the front-end module of server A monitors a network failure, it can issue a termination instruction for the IO requests in the IO transmission channel of server A to indicate the termination of the execution of the IO requests. During this process, the IO version number of server A is updated, and two hash values corresponding to the sequence number of the IO request are calculated through different calculation methods. The data structure of server A is updated based on these two hash values, and the IO version number and the data structure of server A are synchronized to the monitoring modules of each server. After all the IO requests before the current time point are completed, the data structure of server A is cleared.

[0118] Furthermore, please refer to Figure 8 , the following will describe the entire process of discarding IO requests in the case of a network failure:

[0119] 1. The client sends a write IO request to the front-end module of the target server;

[0120] 2. After the front-end module of the target server receives the write IO request, it obtains the IO version number of the target server from the monitoring module of the target server, and generates an IO request carrying the identifier of the target server and the IO version number of the target server based on the IO version number of the target server and the identifier of the target server, and sends the IO request to the slave execution module of the target server;

[0121] 3. The slave execution module of the target server delivers the IO request to the primary execution module of this server;

[0122] 4. The primary execution module of this server obtains the version information of the IO request in the target server at the current moment;

[0123] 5. Compare the version information of the IO request in the target server at the current moment with the IO version number carried in the IO request;

[0124] 6. If the IO version number carried in the IO request is less than the version information of the IO request in the target server at the current moment, and the data structure information of target server A includes the hash value corresponding to the sequence number of the IO request, then discard the IO request and return an error prompt message to the front-end module of the target server;

[0125] 7. When the front-end module of the target server determines that it is a false alarm for terminating the IO request, return to step 2 and resend the IO request.

[0126] In this embodiment, by determining whether the hash value corresponding to the sequence number of the IO request is located in the data structure of the target server, it is determined whether the IO request meets the discard condition, providing a basis for subsequently discarding the IO requests that need to be discarded, so as to avoid the server from continuing to execute the IO requests that meet the discard condition, and prevent the situation where the expectations of the client are inconsistent with the data actually executed by the server.

[0127] In this embodiment, the data structure information of the target server and the version information of the IO request in the target server can also be updated when a network failure occurs between the target server and the client. In an exemplary embodiment, as Figure 9 shown, the above method further includes:

[0128] S304. Update the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0129] Among them, the data structure information of the target server may be the bitmap information of the target server.

[0130] In this embodiment, when a network failure occurs between the target server and the client, the server can update the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0131] Exemplarily, when a network failure occurs between the target server and the client, the version information of the IO request in the target server can be incremented by 1 to obtain the new version information of the IO request in the target server.

[0132] In this embodiment, by updating the structure information of the target server and the version information of the IO request in the target server, it provides a data basis for subsequently determining whether the IO request needs to be discarded according to the structure information of the target server and the version information of the IO request in the target server, and promptly discarding the IO requests that need to be discarded, ensuring that the expectations of the client are consistent with the data actually executed by the server.

[0133] In this embodiment, when an IO request is misjudged, the target server may also resend the IO request to the server, as Figure 10 shown. In an exemplary embodiment, the above method further includes:

[0134] S305, when discarding the IO request, sending a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded.

[0135] Among them, the prompt message includes information such as the discard occurrence time of the IO request and the relevant information of the IO request. In this embodiment, when the IO request is discarded, the server may also send a prompt message indicating that the IO request has been discarded to the target server.

[0136] In the embodiment of the present application, when it is determined that the IO request meets the discard condition, the IO request may be discarded, a prompt message related to the discard of the IO request may be generated, and the prompt message may be sent to the target server.

[0137] S306, receiving a resend request for the IO request sent by the target server; the resend request is an IO request that the target server resends in response to the prompt message.

[0138] In this embodiment, after the above prompt message is sent to the target server, the target server may perform self-check on the IO request terminated by itself to obtain a self-check result. If the self-check result indicates that the target server has not sent a termination request to the server, a resend request for the IO request may be sent to the target server. If the self-check result indicates that the target server has sent a termination request to the server, a resend request for the IO request is not sent to the target server.

[0139] S307, responding to the resend request.

[0140] In this embodiment, after receiving the resend request for the IO request sent by the target server, respond to the resend request for the IO request and execute the resend request corresponding to the IO request.

[0141] In this embodiment, when discarding the IO request, the target server may determine whether the IO request is misjudged, and in the case of misjudging the IO request, resend the IO request to avoid missed sending of the IO request.

[0142] In some scenarios, it is also necessary to elaborate on the process of determining whether the IO request meets the discard condition according to the fault type of the target server and the IO request. In an exemplary embodiment, as Figure 11 shown, the above method further includes:

[0143] S601. When the fault type is the target server fault, parse the IO request to obtain the identification information of the target server.

[0144] In this embodiment, when the fault type is the target server fault, parse the IO request to obtain the identification information of the target server.

[0145] In an exemplary embodiment, when the content of the IO request is in text format (e.g., Hyper Text Transfer Protocol (HTTP) request, log file, etc.), the request content can be parsed by means of string processing; for the IO request in binary format (e.g., Transmission Control Protocol (TCP) packet, file transfer, etc.), the IO request can be parsed according to the protocol specification; for the IO request that follows a specific protocol specification (e.g., File Transfer Protocol (FTP) and Simple Mail Transfer Protocol (SMTP)), it can be parsed according to the syntax rules of the protocol.

[0146] S602. According to the identification information, obtain the current version information of the target server from the preset corresponding relationship table; the preset corresponding relationship table includes the corresponding relationship between the identification information and the current version information of the target server.

[0147] Among them, the current version information of the target server is the server version number obtained from the monitoring module of this server according to the identification information of the target server.

[0148] In this embodiment, after parsing the IO request to obtain the identification information of the target server carried by the IO request, the current version information of the target server can be obtained from the preset corresponding relationship table according to the identification information of the target server.

[0149] S603. If the current version information is inconsistent with the version information of the target server carried in the IO request, it is determined that the IO request meets the discard condition.

[0150] Among them, the version information of the target server carried in the IO request refers to the version number of the target server carried in the IO request.

[0151] In this embodiment, the version information of the target server carried in the IO request can be obtained by parsing the IO request. After obtaining the current version information of the target server, the current version information of the target server is compared with the version information of the target server carried in the IO request. If the current version information is inconsistent with the version information of the target server carried in the IO request, it is determined that the IO request meets the discard condition. If the current version information is consistent with the version information of the target server carried in the IO request, it is determined that the IO request does not meet the discard condition.

[0152] The reasons for the inconsistency between the current version information and the version information of the target server carried in the IO request will be described below: Each server in the centralized storage system corresponds to a monitoring module. Among these monitoring modules, there is a main monitoring module, and the other monitoring modules are slave monitoring modules. The monitoring module will monitor the status of the corresponding server in real time, and in the case of monitoring that the corresponding server fails, the failure information will be fed back to the main monitoring module. The main monitoring module will synchronize the failure information to each slave monitoring module. For example, see Figure 12 , after the main monitoring module obtains that server A fails, it will update the version number of server A (that is, on the basis of the original version number of server A, add the value 1 to obtain the new version number of server A), and send the new version number of server A to each slave monitoring module. Therefore, the version number corresponding to the server before the server fails is different from the version number corresponding to the server after the server fails, that is, the current version information and the version information of the target server carried in the IO request will be inconsistent.

[0153] Furthermore, please see Figure 13 , the following will describe the entire process of discarding the IO request in the case of server failure:

[0154] 1. The client sends a write IO request to the front-end module of the target server;

[0155] 2. After the front-end module of the target server receives the write IO request, it obtains the version number of the target server from the monitoring module of the target server, and generates an IO request carrying the identifier and version number of the target server according to the version number and identifier of the target server, and sends the IO request to the slave execution module of the target server;

[0156] 3. The slave execution module of the target server delivers the IO request to the main execution module of this server;

[0157] 4. The main execution module of this server obtains the current version number of the target server;

[0158] 5. Compare the current version number of the target server with the version number of the target server carried in the IO request;

[0159] 6. If the version number of the target server carried in the IO request is less than the current version number of the target server, discard the IO request and return an error prompt message to the front-end module of the target server;

[0160] 7. If the version number of the target server carried in the IO request is the same as the current version number of the target server, continue to execute the IO request.

[0161] In this embodiment, through the identification information of the target server, the current version information of the target server is obtained, and based on the version information of the target server carried in the IO request and the current version information, it can be determined whether the IO request needs to be discarded, providing a basis for discarding the IO requests that need to be discarded subsequently, thereby avoiding the server from continuing to execute the IO requests that meet the discard conditions and making the client's expectations inconsistent with the data actually executed by the server.

[0162] In this embodiment, the version information of the target server can also be updated in the case of a target server failure. In an exemplary embodiment, as Figure 14 shown, the above method further includes:

[0163] S604. Update the version information of the target server to obtain the current version information of the target server.

[0164] In this embodiment, in the case of a target server failure, the server can update the version information of the target server to obtain the updated current version information of the target server.

[0165] Exemplarily, in the case of a target server failure, the version information of the target server can be incremented by 1 to obtain the new version information of the target server.

[0166] In this embodiment, by updating the version information of the target server, it provides a data basis for subsequently determining whether the IO request needs to be discarded according to the version information of the target server and promptly discarding the IO requests that need to be discarded, ensuring that the client's expectations are consistent with the data actually executed by the server.

[0167] For the convenience of those skilled in the art to understand, see Figure 15 , the following provides a detailed introduction to the request processing method provided by this application, and this method may include:

[0168] S1. Receive an input / output (IO) request sent by the target server;

[0169] S2. Determine the type of failure of the target server according to the detection information of the target server; the failure of the target server occurs after an IO request is sent.

[0170] S3. In the case where the type of failure is a communication network failure between the target server and the client, parse the IO request to obtain the identification information of the target server and the version information of the IO request.

[0171] S4. According to the identification information, obtain the version information of the IO request in the target server at the current moment.

[0172] S5. Determine whether the version information of the IO request in the target server at the current moment is consistent with the version information of the IO request. If they are consistent, execute S6; if they are inconsistent, execute S7 - S8.

[0173] S6. Determine that the IO request does not meet the discard condition.

[0174] S7. According to the identification information, obtain the data structure information of the target server, and perform a hashing algorithm on the serial number of the IO request to obtain the hash value corresponding to the serial number.

[0175] S8. If the hash value is included in the data structure information, determine that the IO request meets the discard condition.

[0176] S9. In the case where the type of failure is a target server failure, parse the IO request to obtain the identification information of the target server.

[0177] S10. According to the identification information, obtain the current version information of the target server from the preset correspondence table; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server.

[0178] S11. If the current version information is inconsistent with the version information of the target server carried in the IO request, determine that the IO request meets the discard condition.

[0179] S12. In the case where the IO request meets the discard condition, discard the IO request.

[0180] It should be noted that for the descriptions in S1 - S12 above, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar. Therefore, they will not be elaborated in this embodiment.

[0181] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0182] Based on the same inventive concept, an embodiment of the present application also provides a request processing device for implementing the request processing method involved above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the request processing device provided below can refer to the limitations on the request processing method in the above text, and will not be repeated here.

[0183] In an exemplary embodiment, as Figure 16 shown, a request processing device is provided, including: a receiving module, a parsing module, and a discarding module, where:

[0184] The receiving module is used to receive an input / output IO request sent by a target server;

[0185] The determining module is used to determine the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after sending the IO request;

[0186] The discarding module is used to discard the IO request when it is determined that the IO request meets the discarding condition according to the fault type and the IO request.

[0187] In an exemplary embodiment, the above parsing information includes the identification information of the target server and the version information of the IO request. The device further includes:

[0188] The first parsing module is used to parse the IO request to obtain the identification information of the target server and the version information of the IO request when the fault type is a communication network fault between the target server and the client;

[0189] The first obtaining module is used to obtain the version information of the IO request in the target server at the current moment according to the identification information;

[0190] The first determination module is configured to determine whether an IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment.

[0191] In an exemplary embodiment, the above determination module includes: a first determination unit and a second determination unit, where:

[0192] The first determination unit is specifically configured to determine that the IO request does not meet the discard condition when the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment;

[0193] The second determination unit is specifically configured to, when the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, obtain the data structure information of the target server according to the identification information, and determine whether the IO request meets the discard condition according to the data structure information and the serial number of the IO request.

[0194] In an exemplary embodiment, the above second determination unit is further specifically configured to perform a hash algorithm process on the serial number of the IO request to obtain a hash value corresponding to the serial number; and determine that the IO request meets the discard condition when the hash value is included in the data structure information.

[0195] In an exemplary embodiment, the above device further includes: an update module, configured to update the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0196] In an exemplary embodiment, the above determination module further includes: a sending unit, a receiving unit, and a response unit, where:

[0197] The sending unit is specifically configured to send a prompt message to the target server when discarding the IO request; the prompt message is used to indicate that the IO request has been discarded;

[0198] The receiving unit is specifically configured to receive a retransmission request of the IO request sent by the target server; the retransmission request is an IO request re-sent by the target server in response to the prompt message;

[0199] The response unit is specifically configured to respond to the retransmission request.

[0200] In an exemplary embodiment, the above device further includes:

[0201] A second parsing module, configured to parse the IO request to obtain the identification information of the target server when the fault type is a target server fault;

[0202] A second acquisition module, configured to acquire the current version information of the target server from a preset correspondence table according to the identification information; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server;

[0203] A second determination module, configured to determine that the IO request meets the discard condition when the current version information is inconsistent with the version information of the target server carried in the IO request.

[0204] In an exemplary embodiment, the above device further includes:

[0205] A second update module, configured to update the version information of the target server to obtain the current version information of the target server.

[0206] Each module in the above request processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0207] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 17 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the parsing information of the IO request. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. The computer program, when executed by the processor, implements a request processing method.

[0208] Those skilled in the art can understand that Figure 17 the structure shown in

[0209] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0210] Receive an input / output (IO) request sent by a target server;

[0211] Determine the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after sending the IO request;

[0212] If it is determined that the IO request meets the discard condition according to the fault type and the IO request, discard the IO request.

[0213] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0214] In the case where the fault type is a communication network fault between the target server and the client, parse the IO request to obtain the identification information of the target server and the version information of the IO request;

[0215] Obtain the version information of the IO request in the target server at the current moment according to the identification information;

[0216] Determine whether the IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment.

[0217] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0218] If the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, determine that the IO request does not meet the discard condition;

[0219] If the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, obtain the data structure information of the target server according to the identification information, and determine whether the IO request meets the discard condition according to the data structure information and the serial number of the IO request.

[0220] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0221] Perform a hashing algorithm process on the serial number of the IO request to obtain the hash value corresponding to the serial number;

[0222] If the hash value is included in the data structure information, determine that the IO request meets the discard condition.

[0223] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0224] Update the data structure information of the target server and the version information of the IO requests in the target server to obtain the updated data structure information of the target server and the version information of the IO requests in the target server at the current moment.

[0225] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0226] In the case of discarding the IO request, send a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded;

[0227] Receive a retransmission request for the IO request sent by the target server; the retransmission request is an IO request re-sent by the target server in response to the prompt message;

[0228] Respond to the retransmission request.

[0229] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0230] In the case where the fault type is a target server fault, parse the IO request to obtain the identification information of the target server;

[0231] According to the identification information, obtain the current version information of the target server from the preset correspondence table; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server;

[0232] If the current version information is inconsistent with the version information of the target server carried in the IO request, determine that the IO request meets the discard condition.

[0233] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0234] Update the version information of the target server to obtain the current version information of the target server.

[0235] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0236] Receive an input / output (IO) request sent by the target server;

[0237] According to the detection information of the target server, determine the fault type of the target server; the fault of the target server occurs after the IO request is sent;

[0238] In the case where it is determined that the IO request meets the discard condition according to the fault type and the IO request, discard the IO request.

[0239] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented:

[0240] In the case where the fault type is a communication network fault between the target server and the client, parse the IO request to obtain the identification information of the target server and the version information of the IO request;

[0241] According to the identification information, obtain the version information of the IO request in the target server at the current moment;

[0242] According to the version information of the IO request and the version information of the IO request in the target server at the current moment, determine whether the IO request meets the discard condition.

[0243] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0244] If the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, determine that the IO request does not meet the discard condition;

[0245] If the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, according to the identification information, obtain the data structure information of the target server, and determine whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request.

[0246] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0247] Perform a hashing algorithm process on the sequence number of the IO request to obtain the hash value corresponding to the sequence number;

[0248] If the hash value is included in the data structure information, determine that the IO request meets the discard condition.

[0249] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0250] Update the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0251] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0252] In the case of discarding the IO request, send a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded;

[0253] Receive the retransmission request of the IO request sent by the target server; the retransmission request is the IO request re-sent by the target server in response to the prompt message;

[0254] Respond to the retransmission request.

[0255] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0256] In the case where the fault type is a target server fault, parse the IO request to obtain the identification information of the target server;

[0257] According to the identification information, obtain the current version information of the target server from the preset correspondence table; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server;

[0258] If the current version information is inconsistent with the version information of the target server carried in the IO request, determine that the IO request meets the discard condition.

[0259] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0260] Update the version information of the target server to obtain the current version information of the target server.

[0261] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor implements the following steps:

[0262] Receive an input / output (IO) request sent by a target server;

[0263] According to the detection information of the target server, determine the fault type of the target server; the fault of the target server occurs after sending the IO request;

[0264] In the case where it is determined that the IO request meets the discard condition according to the fault type and the IO request, discard the IO request.

[0265] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0266] In the case where the fault type is a communication network fault between the target server and the client, parse the IO request to obtain the identification information of the target server and the version information of the IO request;

[0267] According to the identification information, obtain the version information of the IO request in the target server at the current moment;

[0268] According to the version information of the IO request and the version information of the IO request in the target server at the current moment, determine whether the IO request meets the discard condition.

[0269] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0270] If the version information of the IO request is consistent with the version information of the IO request in the target server at the current moment, it is determined that the IO request does not meet the discard condition;

[0271] If the version information of the IO request is inconsistent with the version information of the IO request in the target server at the current moment, the data structure information of the target server is obtained according to the identification information, and it is determined whether the IO request meets the discard condition according to the data structure information and the serial number of the IO request.

[0272] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0273] Perform a hashing algorithm process on the serial number of the IO request to obtain the hash value corresponding to the serial number;

[0274] If the hash value is included in the data structure information, it is determined that the IO request meets the discard condition.

[0275] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0276] Update the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

[0277] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0278] In the case of discarding the IO request, send a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded;

[0279] Receive the retransmission request of the IO request sent by the target server; the retransmission request is the IO request retransmitted by the target server in response to the prompt message;

[0280] Respond to the retransmission request.

[0281] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0282] In the case where the fault type is a target server fault, parse the IO request to obtain the identification information of the target server;

[0283] Obtain the current version information of the target server from the preset correspondence table according to the identification information; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server;

[0284] If the current version information is inconsistent with the version information of the target server carried in the IO request, it is determined that the IO request meets the discard condition.

[0285] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0286] Update the version information of the target server to obtain the current version information of the target server.

[0287] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0288] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.

[0289] The embodiments described above merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for processing a request, characterized in that, The method includes: Receiving an input / output (IO) request sent by a target server; Determining the fault type of the target server according to the detection information of the target server; the fault of the target server occurs after sending the IO request; Discarding the IO request if it is determined that the IO request meets the discard condition according to the fault type and the IO request.

2. The method according to claim 1, wherein The method further includes: When the fault type is a communication network fault between the target server and the client, parsing the IO request to obtain the identification information of the target server and the version information of the IO request; Obtaining the version information of the IO request in the target server at the current moment according to the identification information; Determining whether the IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment.

3. The method according to claim 2, wherein The determining whether the IO request meets the discard condition according to the version information of the IO request and the version information of the IO request in the target server at the current moment includes: If the version information of the IO request is the same as the version information of the IO request in the target server at the current moment, determining that the IO request does not meet the discard condition; If the version information of the IO request is different from the version information of the IO request in the target server at the current moment, obtaining the data structure information of the target server according to the identification information, and determining whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request.

4. The method according to claim 3, wherein The determining whether the IO request meets the discard condition according to the data structure information and the sequence number of the IO request includes: Performing a hash algorithm process on the sequence number of the IO request to obtain a hash value corresponding to the sequence number; If the hash value is included in the data structure information, determining that the IO request meets the discard condition.

5. The method according to any one of claims 2-4, characterized in that, The method further includes: Updating the data structure information of the target server and the version information of the IO request in the target server to obtain the updated data structure information of the target server and the version information of the IO request in the target server at the current moment.

6. The method according to any one of claims 2-4, characterized in that The method further includes: When discarding the IO request, sending a prompt message to the target server; the prompt message is used to indicate that the IO request has been discarded; Receiving a retransmission request of the IO request sent by the target server; the retransmission request is the IO request re-sent by the target server in response to the prompt message; Responding to the retransmission request.

7. The method according to claim 1, characterized in that, The method further includes: When the fault type is a target server fault, parsing the IO request to obtain the identification information of the target server; Obtaining the current version information of the target server from a preset correspondence table according to the identification information; the preset correspondence table includes the correspondence between the identification information and the current version information of the target server; If the current version information is inconsistent with the version information of the target server carried in the IO request, it is determined that the IO request meets the discard condition.

8. The method according to claim 7, wherein The method further includes: Updating the version information of the target server to obtain the current version information of the target server.

9. A request processing device, characterized in that, The device includes: A receiving module, configured to receive an input / output (IO) request sent by a target server; A determining module, configured to determine a fault type of the target server according to detection information of the target server; the fault of the target server occurs after the IO request is sent; A discarding module, configured to discard the IO request when it is determined that the IO request meets the discard condition according to the fault type and the IO request.

10. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.