Message processing method and related apparatus

By using the serial number management mechanism in network devices, the problem of lack of reliability mechanism in anycast message transmission is solved, and the system's high reliability and performance improvement is achieved.

WO2025060879A1PCT designated stage expired Publication Date: 2025-03-27HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/116463
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-20
Filing Date
2024-09-03
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

In the transmission process of any broadcast messages, the lack of reliability mechanism of the connectionless transmission protocol leads to packet loss problems, which leads to abnormal system behavior or performance degradation.

Method used

By introducing a serial number management mechanism in the network equipment, it is ensured that each anycast message carries a unique serial number during transmission. The receiver determines whether packet loss occurs based on the serial number and takes appropriate measures to retransmit it.

Benefits of technology

It effectively improves the reliability and performance of the system, prevents system exceptions caused by packet loss, and ensures reliable transmission of any broadcast messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116463_27032025_PF_FP_ABST
    Figure CN2024116463_27032025_PF_FP_ABST
Patent Text Reader

Abstract

A message processing method and a related apparatus. The method comprises: when receiving a first anycast message, a network device copies and forwards the first anycast message. A first original packet corresponding to the first anycast message carries a first sequence number, the first sequence number corresponds to a first controller, and the destination address of the first anycast message points to the first controller. The first anycast message is copied to obtain a first duplicate packet, the first duplicate packet carries a second sequence number, the second sequence number corresponds to a second controller, and the second controller is a home location determined on the basis of semantics of the first anycast message. The first sequence number carried by the first original packet is the same as the second sequence number carried by the first duplicate packet. The first sequence number is incremented as the network device sends the first original packet, the second sequence number is incremented as the network device sends the first duplicate packet, and the increment of the first sequence number is the same as the increment of the second sequence number.
Need to check novelty before this filing date? Find Prior Art

Description

A message processing method and related device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on September 20, 2023, with application number CN202311220847.6 and application name “A message processing method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a message processing method and related devices. Background Art

[0003] Anycast, also known as anycast, floodcast, or anycast, is a new communication service defined in Internet Protocol Version 6 (IPv6). Specifically, anycast refers to a messaging method in which any node in a cluster can act as a receiver. Unlike unicast, which is a point-to-point messaging method, anycast is a point-to-multipoint messaging method.

[0004] Currently, network devices such as switches are usually used to perform the load balancing function of the cluster. Specifically, the network device will copy and process the received anycast message, and then calculate the destination of the copied message according to certain rules and forward the copied message. The existing commonly used transport layer protocol is point-to-point reliable transmission, such as the Traffic Conditioning Profile (TCP) protocol or the Remote Direct Memory Access reliable connection (RDMA RC). The above-mentioned transport layer protocol stipulates that the anycast message carries a sequence number in the original transmission path, resulting in the anycast message cannot be directly forwarded. Therefore, it is necessary to use a connectionless transmission protocol such as the User Datagram Protocol (UDP) or the Remote Direct Memory Access unreliable connection (RDMA UD) to copy and process the anycast message before forwarding it.

[0005] The applicant has found that the above-mentioned connectionless transmission protocol has no reliability mechanism, and anycast messages may be lost due to packet loss or error during the transmission process, which may lead to abnormal system behavior or degradation of system performance.

[0006] Summary of the Invention

[0007] This application proposes a message processing method and related apparatus. A controller determines whether packet loss has occurred during the transmission of a received duplicate message based on the sequence number carried in the duplicate message. This prevents system misbehavior or performance degradation caused by lost anycast messages, effectively improving system reliability and performance.

[0008] In a first aspect, an embodiment of the present application provides a message processing method, which is applied to a network device and includes:

[0009] The network device receives a first anycast message, where the destination address of the first anycast message points to the first controller;

[0010] The network device sends a first original message to the first controller, wherein the first original message includes the first anycast message, the destination address of the first original message points to the first controller, the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller;

[0011] The network device sends a first copy message to the second controller, wherein the first copy message includes the first anycast message, the destination address of the first copy message points to the second controller, the first copy message includes a second sequence number, the second sequence number belongs to a second sequence number group, the second sequence number group has a corresponding relationship with the second controller, and the first sequence number carried in the first original message is the same as the second sequence number carried in the first copy message.

[0012] In an embodiment of the present application, after receiving the first anycast message, the network device copies and forwards the first anycast message. The first original message corresponding to the first anycast message carries a first sequence number, the first sequence number corresponds to the first controller, and the destination address of the first anycast message points to the first controller. The first copied message obtained by copying the first anycast message carries a second sequence number, the second sequence number corresponds to the second controller, and the second controller is the place of origin determined according to the semantics of the first anycast message. The first sequence number carried by the first original message is the same as the second sequence number carried by the first copied message. Through the above method, the second controller can determine whether packet loss occurs during the transmission of the copied message based on the sequence number carried by the received copied message. Avoid abnormal system behavior or degradation of system performance due to the loss of anycast messages. Effectively improve the reliability and system performance of the system.

[0013] In conjunction with the first aspect, in a possible implementation of the first aspect, the first sequence number increments as the network device sends the first original message; the second sequence number increments as the network device sends the first duplicate message. Furthermore, the increment of the first sequence number is the same as the increment of the second sequence number. Through the above method, it is ensured that the sequence number of the original message sent by the network device and the sequence number of the duplicate message increment in sequence with the number of times the network device sends the message, so that the second controller can determine whether packet loss has occurred based on the sequence number of the received duplicate message.

[0014] In combination with the first aspect, in a possible implementation of the first aspect, the network device determines that the destination of the first duplicate message is the second controller based on the semantics of the first anycast message. Specifically, the network device determines that the destination of the first duplicate message is the second controller based on the semantics of the first anycast message queried in the affiliation table, where the affiliation table includes one or more correspondences, and the correspondences include fields of the anycast message and address information of the controller. The destination address of the duplicate message is determined based on the semantics of the anycast message so that the controller responsible for processing the duplicate message can directly receive the duplicate message, avoiding re-forwarding, improving processing efficiency, and improving system reliability and system performance.

[0015] In combination with the first aspect, in a possible implementation manner of the first aspect, the network device allocates the first sequence number group to the first controller according to configuration information of the first controller.

[0016] In conjunction with the first aspect, in a possible implementation of the first aspect, the configuration information of the first controller includes: a queue pair context of the first controller, the queue pair context of the first controller including the address information of the first controller and the first sequence number group. Specifically, the network device obtains the queue pair context of the first controller, the queue pair context of the first controller including the address information of the first controller and the first sequence number group; the network device configures a communication connection with the first controller based on the queue pair context of the first controller; and the network device allocates the first sequence number group to the first controller based on the address information of the first controller.

[0017] Specifically, the first network device obtains the queue pair context (QPC) of the controller, and the queue pair context of the controller includes the address information of the controller and the first sequence number group. Regarding the queue pair context, a queue pair (QP) can be established between the source end and the destination end through the RDMA protocol, and the queue pair includes a queue pair identification number (QPN). Then, the QP of the destination end is associated with the QP of the source end, and the association includes the QPN and address information of the specified QP counterpart. Exemplarily, after the QP of the network device establishes an association relationship with the QP of the controller, a queue pair context is generated that associates the controller with the network device, and the queue pair context of the controller includes the corresponding QPN, the address information of the controller, and the starting packet sequence number (PSN). For the controller, the controller creates a queue pair context based on the network device connected to the controller. For example, in a dual-plane scenario, the controller is connected to network device #1 and network device #2. The controller creates QPC #1 for network device #1 and QPC #2 for network device #2 respectively. QPC #1 includes the address information of network device #1, and QPC #2 includes the address information of network device #2.

[0018] After receiving the queue pair context for the first controller from the controller, the network device configures a communication connection with the controller. For example, the controller assigns QPC#1 to network device #1, and the controller assigns QPC#2 to network device #2. After the network device receives the QPC information (information related to QPC#1 or QPC#2), the control plane of the network device sends the QPC to the data plane of the network device, completing the QPC configuration and establishing a communication connection with the controller.

[0019] Then, the network device uses the PSN in the context of the controller's queue as the corresponding sequence number group for the control. The network device assigns a sequence number group to the controller based on the controller's address information. Specifically, the network device assigns a sequence number in the sequence number group corresponding to the control to the original message whose destination address is the controller. The network device sends an original message carrying an anycast message to the controller, carrying the sequence number of the sequence number group. The sequence number of the original message increases in this order as the sending order increases. For example, the original message #1 sent by the network device to the controller carries sequence number 1, the original message #2 sent by the network device to the controller carries sequence number 2, and the original message #3 sent by the network device to the controller carries sequence number 3, wherein the sending order of original message #2 is later than the sending order of original message #1, and the sending order of original message #3 is later than the sending order of original message #2. The communication connection between the network device and the controller is established by the above method, which improves the implementation flexibility of the solution.

[0020] In combination with the first aspect, in a possible implementation manner of the first aspect, the method further includes: allocating, by the network device, the second sequence number group to the second controller according to configuration information of the second controller.

[0021] In combination with the first aspect, in a possible implementation of the first aspect, the configuration information of the second controller includes: the queue pair context of the second controller, the queue pair context of the second controller includes the address information of the second controller and the second serial number group. Specifically, the network device obtains the queue pair context of the second controller, the queue pair context of the second controller includes the address information of the second controller and the second serial number group; the network device configures the communication connection with the second controller based on the queue pair context of the second controller; the network device allocates the second serial number group to the second controller based on the address information of the second controller. Establishing a communication connection between the network device and the controller through the above method improves the implementation flexibility of the solution.

[0022] In combination with the first aspect, in a possible implementation of the first aspect, after the network device receives the first anycast message, the method further includes: the network device receives a second anycast message; the network device determines that the destination of the second copy message is the second controller based on the semantics of the second anycast message; the network device generates a second copy message based on the second anycast message, the second copy message includes the second anycast message, the second copy message includes a third sequence number, the third sequence number is the incremented second sequence number, and the third sequence number belongs to the second sequence number group; the network device sends the second copy message to the second controller. In an embodiment of the present application, the second controller can determine whether packet loss occurs during the transmission of the copy message based on the sequence number carried by the received copy message. Avoid abnormal system behavior or degradation of system performance due to the loss of anycast messages. Effectively improve the reliability and performance of the system. Ensure anycast reliability.

[0023] In combination with the first aspect, in a possible implementation of the first aspect, the second duplicate message also includes the destination address of the first anycast message. The destination address of the first anycast message is the address information of the first controller. Specifically, the duplicate message may also include the destination address of the previous anycast message, the duplicate message corresponding to the anycast message received by the current network device, and the previous anycast message corresponding to the anycast message received by the network device before receiving the current anycast message. The second controller obtains the address of the previous anycast message carried in the currently received duplicate message. If the second controller determines that there is a lost target message based on the sequence number #1 of the currently received duplicate message and the sequence number #2 of the previously received duplicate message cached locally (second controller), for example, the sequence number #1 and the sequence number #2 are not continuous. Then, the second controller uses the address of the previous anycast message carried by the currently received duplicate message as the address information of the anycast message corresponding to the target message. Taking the address information of the anycast message corresponding to the target message as the address information of the first controller as an example, after the second controller determines the address information of the first controller from the currently received duplicate message, the second controller sends the message acquisition request to the first controller.

[0024] In combination with the first aspect, in a possible implementation of the first aspect, the method further includes: the network device receives the first original message sent by the first controller; the network device determines the destination address of the first copy message based on the first anycast message carried by the first original message, and the destination address of the first copy message points to the second controller; the network device sends the destination address of the first copy message to the first controller. Specifically, the first controller can send the first original message to the network device, and the corresponding network device determines the destination address of the first copy message based on the first anycast message carried by the first original message. Then, the network device sends the destination address of the first copy message to the first controller. So that the first controller generates a first copy message based on the destination address of the first copy message and the first original message, and sends the first copy message to the second controller. Through the above method, the retransmission efficiency is improved.

[0025] In combination with the first aspect, in a possible implementation manner of the first aspect, the first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

[0026] In a second aspect, an embodiment of the present application provides a message processing method, which is applied to a first controller and includes:

[0027] The first controller receives a first original message, wherein the first original message includes the first anycast message, a destination address of the first original message points to the first controller, the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller;

[0028] The first controller lists the first original message in a cache queue, wherein the cache queue is used to cache messages. The first controller suspends processing of the message in the cache queue and removes the message from the cache queue in response to a notification that the message has been processed.

[0029] In an embodiment of the present application, after receiving the original message with a sequence number, the first controller places the original message in a cache queue and suspends it. After receiving a notification that the original message has been processed, the original message is removed from the cache queue. The original message is backed up by the above method to ensure that after the second controller discovers that a duplicate message has been lost, it can obtain the original message corresponding to the duplicate message from the first controller. Even in the event of packet loss, normal operation can still be achieved. This avoids abnormal system behavior or degradation of system performance due to the loss of anycast messages. This effectively improves system reliability and system performance.

[0030] In conjunction with the second aspect, in a possible implementation of the second aspect, the first controller receives a message acquisition request, the message acquisition request is used to request acquisition of a target message, and the message acquisition request carries a target sequence number included in the target message; the first controller determines the target message from the cache queue based on the target sequence number in the message acquisition request; and the first controller sends the target message. In an embodiment of the present application, the second controller can also request retransmission of the lost target message by sending a message acquisition request to ensure that the lost packet data can be successfully written to the disk. This ensures anycast reliability.

[0031] In conjunction with the second aspect, in a possible implementation of the second aspect, the first controller detects whether the cache time of the first original message in the cache queue has expired; if the cache time of the first original message has expired, the first controller determines the address information of the second controller based on the first anycast message included in the first original message; the first controller sends a first duplicate message to the second controller, the first duplicate message including the first anycast message, the destination address of the first duplicate message pointing to the second controller, the first duplicate message including a second sequence number, the second sequence number belonging to a second sequence number group, the second sequence number group having a corresponding relationship with the second controller, and the first sequence number carried in the first original message being the same as the second sequence number carried in the first duplicate message. Exemplarily, the first controller can determine whether the cache time of the original message has expired by periodically detecting the original message cached in the cache queue. For example, the first controller detects the original message cached in the cache queue at a frequency of once every second. If the first controller detects the same original message cached in the cache queue three times in a row, the first controller determines that the original message has timed out. In this embodiment of the present application, the cache queue of the first controller is configured with a cache timeout to prevent the long-term accumulation of original messages in the cache queue, which would otherwise occupy the first controller's cache space. Furthermore, by detecting whether the cache time of the original message has expired, the retransmission of the anycast message corresponding to the original message is triggered. If a duplicate message corresponding to the anycast message is lost, the first controller can proactively retransmit the anycast message to the second controller to ensure that the lost data is successfully written to the disk, thus ensuring anycast reliability.

[0032] In conjunction with the second aspect, in a possible implementation of the second aspect, the first controller detects whether the cache time of the first original message in the cache queue has expired; if the cache time of the first original message has expired, the first controller determines the address information of the second controller based on the first anycast message included in the first original message; the first controller detects whether the second controller is operating normally; if the second controller is abnormal, the first controller writes the first original message to the disk, wherein the disk is controlled by the second controller to perform the write operation before the second controller is abnormal. After the first controller determines the second controller, the first controller further detects whether the second controller is operating normally. Specifically, because the second controller fails to successfully write the first copy message within a long period of time (the cache time of the first original message has expired), the second controller does not send a notification that the first copy message has been processed, resulting in the cache time of the first original message in the cache queue of the first controller having expired. Therefore, the above-mentioned write failure may be caused by the abnormal operation of the second controller. In this embodiment of the present application, the cache queue of the first controller sets a cache timeout to avoid the long-term backlog of original messages in the cache queue occupying the cache space of the first controller. Furthermore, by detecting whether the original message's cache time has expired, the second controller is triggered to check whether it is functioning properly. If the second controller is malfunctioning, the first controller locally writes the anycast message to disk to ensure that lost packet data (the anycast message corresponding to the original message) is successfully written to disk, thus ensuring anycast reliability.

[0033] In the third aspect, an embodiment of the present application proposes a message processing method, which is applied to a second controller, and the method includes: the second controller receives a first replication message, wherein the first replication message includes a first anycast message, the destination address of the first replication message points to the second controller, and the first replication message includes a second sequence number, the second sequence number belongs to a second sequence number group, and the second sequence number group has a corresponding relationship with the second controller; the second controller detects whether the second sequence number and the fourth sequence number are continuous, wherein the fourth sequence number is the sequence number carried by the third replication message received by the second controller before receiving the first replication message, and the fourth sequence number belongs to the second sequence number group; if the second sequence number and the fourth sequence number are not continuous, there is a lost target message between the third replication message and the first replication message, and the second controller requests retransmission of the target message; if the second sequence number and the fourth sequence number are continuous, there is no lost target message between the third replication message and the first replication message, and the second controller writes the first replication message to the disk.

[0034] In this embodiment of the present application, a second controller receives a duplicate message carrying a sequentially increasing sequence number. Based on whether the sequence number in the received duplicate message increases sequentially, the second controller determines whether packet loss occurred during the reception of the duplicate message. If packet loss occurs, the second controller can request retransmission of the lost target message. This prevents system misbehavior or performance degradation caused by lost anycast messages, effectively improving system reliability and performance.

[0035] In combination with the third aspect, in a possible implementation of the third aspect, the second controller requests retransmission of the target message, including: the second controller determines the target sequence number based on the second sequence number and the fourth sequence number, and the target sequence number is the sequence number carried by the target message; the second controller sends a message acquisition request, and the message acquisition request is used to request to obtain the target message, and the message acquisition request carries the target sequence number included in the target message. In an embodiment of the present application, the second controller can determine whether packet loss occurs during the transmission of the duplicate message based on the sequence number carried by the received duplicate message. Avoid abnormal system behavior or degradation of system performance due to the loss of anycast messages. Effectively improve system reliability and system performance. Ensure anycast reliability.

[0036] In conjunction with the third aspect, in a possible implementation of the third aspect, the second controller obtains the destination address of the anycast message corresponding to the target message from the first duplicate message; the second controller sends the message acquisition request to the first controller based on the address information of the anycast message corresponding to the target message, where the address information of the anycast message corresponding to the target message points to the first controller. Specifically, the duplicate message may further include the destination address of a previous anycast message, where the duplicate message corresponds to the anycast message currently received by the network device, and the previous anycast message corresponds to the anycast message received by the network device before receiving the current anycast message. The second controller obtains the address of the previous anycast message carried in the currently received duplicate message. If the second controller determines that a target message is missing based on sequence number #1 of the currently received duplicate message and sequence number #2 of the previously received duplicate message cached locally (by the second controller), for example, that sequence numbers #1 and #2 are discontinuous, the second controller uses the address of the previous anycast message carried in the currently received duplicate message as the address information of the anycast message corresponding to the target message. Taking the address information of the anycast message corresponding to the target message as the address information of the first controller as an example, after the second controller determines the address information of the first controller from the currently received duplicate message, the second controller sends the message acquisition request to the first controller.

[0037] In combination with the third aspect, in a possible implementation of the third aspect, the second controller receives the first duplicate message from the first controller. In an embodiment of the present application, the cache queue of the first controller avoids the long-term backlog of original messages in the cache queue occupying the cache space of the first controller by setting a cache timeout. In addition, by detecting whether the cache time of the original message has timed out, the retransmission of the anycast message corresponding to the original message is triggered. When the duplicate message corresponding to the anycast message is lost, the first controller can actively retransmit the anycast message to the second controller to ensure that the lost data can be successfully written to the disk. Ensure anycast reliability.

[0038] In combination with the third aspect, in a possible implementation of the third aspect, after the second controller writes the first copy message to the disk, the method further includes: the second controller sends a processed notification of the first copy message, and the processed notification of the first copy message is used to indicate that the first copy message has been written to the disk. Specifically, after the second controller successfully writes the second copy message to the disk, the second controller sends a processed notification of the second copy message to the first controller, and the processed notification of the second copy message is used to indicate that the second copy message has been written to the disk. This allows the first controller to clean up the cache queue in a timely manner, for example, clear the second original message corresponding to the second copy message from the cache queue, saving storage space of the first controller.

[0039] In combination with the third aspect, in a possible implementation of the third aspect, the second controller receives the first duplicate message, including: the second controller receives the first duplicate message from the network device.

[0040] In combination with the third aspect, in a possible implementation manner of the third aspect, the first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

[0041] In a fourth aspect, an embodiment of the present application provides an electronic device, which is a network device in a storage system. The electronic device includes a transceiver module and a processing module, and is configured to execute any of the methods described in the first aspect.

[0042] In a fifth aspect, an embodiment of the present application proposes an electronic device, which is a first controller in a storage system. The electronic device includes: a transceiver module and a processing module. The electronic device is used to execute any method in the aforementioned second aspect.

[0043] In a sixth aspect, an embodiment of the present application proposes an electronic device, which is a second controller in a storage system. The electronic device includes: a transceiver module and a processing module. The electronic device is used to execute any method in the aforementioned third aspect.

[0044] The seventh aspect of the present application provides a storage system, including the electronic device as described in the fourth aspect or any implementation of the fourth aspect, the electronic device as described in the fifth aspect or any implementation of the fifth aspect, and the electronic device as described in the sixth aspect or any implementation of the sixth aspect.

[0045] In an eighth aspect, embodiments of the present application provide an electronic device comprising a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the electronic device performs the method described in any one of the above-mentioned aspects. For example, the electronic device may be a switch, a router, or other device with data exchange capabilities, although embodiments of the present application are not limited thereto.

[0046] In a ninth aspect, embodiments of the present application provide an electronic device comprising a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the electronic device performs the method described in any one of the above-mentioned aspects. For example, the electronic device may be a controller that manages the memory, a network card connected to the memory, or a device such as the memory, although embodiments of the present application are not limiting in this regard.

[0047] In a tenth aspect, embodiments of the present application provide an electronic device comprising a memory and a processor; the memory stores code, and the processor is configured to execute the code. When the code is executed, the electronic device performs the method described in any one of the above-mentioned aspects. For example, the electronic device may be a controller that manages the memory, a network card connected to the memory, or a device such as the memory, but embodiments of the present application are not limited thereto.

[0048] In an eleventh aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first, second or third aspect above.

[0049] The twelfth aspect of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first, second or third aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] FIG1 is a schematic structural diagram of a storage system according to an embodiment of the present application;

[0051] FIG2 is a schematic diagram of the structure of another storage system involved in an embodiment of the present application;

[0052] FIG3 is a schematic diagram of a storage cluster structure;

[0053] FIG4 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application;

[0054] FIG5 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application;

[0055] FIG6 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application;

[0056] FIG7 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application;

[0057] FIG8 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application;

[0058] FIG9 is a schematic diagram of an application scenario proposed in an embodiment of the present application;

[0059] FIG10 is a schematic diagram of another application scenario proposed in an embodiment of the present application;

[0060] FIG11 is a schematic diagram of another application scenario proposed in an embodiment of the present application;

[0061] FIG12 is a schematic diagram of another application scenario proposed in an embodiment of the present application;

[0062] FIG13 is a schematic diagram of another application scenario proposed in an embodiment of the present application;

[0063] FIG14 is a schematic diagram of the structure of a server 1401 provided in an embodiment of the present application;

[0064] FIG15 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0066] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0067] In a possible application scenario, the storage system involved in an embodiment of the present application is shown in Figure 1, which is a structural diagram of a storage system involved in an embodiment of the present application. In the application scenario shown in Figure 1, users access data through applications. The computer that runs these applications is called an "application server", and the application server can also be called a host, which is not limited in this application. The application server 100 can be a physical machine or a virtual machine. Physical application servers include but are not limited to desktop computers, servers, laptops, and mobile devices. The application server accesses the storage system through the switch 110 to access data. However, the switch 110 is only an optional device, and the application server 100 can also communicate directly with the storage system 120 through the network. Alternatively, the switch 110 can also be replaced with an Ethernet switch, an InfiniBand switch, a RoCE (RDMA over Converged Ethernet) switch, etc. The switch 110 can also be replaced with a network card or other network device that implements data forwarding, which is not limited in this embodiment of the present application.

[0068] The storage system 120 shown in Figure 1 is a centralized storage system. A centralized storage system is characterized by a unified entry point through which all data from external devices must pass. This entry point is the centralized storage system's engine 121. Engine 121 is the core component of the centralized storage system, implementing many of the system's advanced functions.

[0069] As shown in Figure 1, there are one or more controllers in the engine 121. Figure 1 uses the example of an engine containing two controllers for explanation. There is a mirror channel between controller 0 and controller 1. Then, after controller 0 writes a copy of data into its memory 124, it can send a copy of the data to controller 1 through the mirror channel, and controller 1 stores the copy in its own local memory 124. In this way, controller 0 and controller 1 back up each other. When controller 0 fails, controller 1 can take over the business of controller 0. When controller 1 fails, controller 0 can take over the business of controller 1, thereby avoiding the unavailability of the entire storage system 120 due to hardware failure. When there are 4 controllers deployed in the engine 121, there is a mirror channel between any two controllers, so any two controllers back up each other.

[0070] The engine 121 also includes a front-end interface 125 and a back-end interface 126. The front-end interface 125 is used to communicate with the application server 100, thereby providing storage services for the application server 100. The back-end interface 126 is used to communicate with the hard disk 134 to expand the storage system capacity. Through the back-end interface 126, the engine 121 can connect to more hard disks 134, thereby forming a very large storage resource pool.

[0071] In terms of hardware, as shown in Figure 1, the controller 0 includes at least a processor 123 and a memory 124. The processor 123 is a central processing unit (CPU) that is used to process data access requests from outside the storage system (servers or other storage systems), and is also used to process requests generated within the storage system. For example, when the processor 123 receives write data requests sent by the application server 100 through the front-end port 125, it temporarily stores the data in these write data requests in the memory 124. When the total amount of data in the memory 124 reaches a certain threshold, the processor 123 sends the data stored in the memory 124 to the hard disk 134 through the back-end port for persistent storage.

[0072] The hardware components and software structure of controller 1 (and other controllers not shown in FIG. 1 ) are similar to those of controller 0 and are not described in detail here.

[0073] Figure 1 illustrates a centralized storage system with separate disk and controller architectures. In this system, the engine 121 may not have a hard drive slot; the hard drive 134 must be placed in the hard drive enclosure 130, with the back-end interface 126 communicating with the hard drive enclosure 130. The back-end interface 126 exists in the form of an adapter card within the engine 121. Two or more back-end interfaces 126 can be used simultaneously on one engine 121 to connect to multiple hard drive enclosures. Alternatively, the adapter card can be integrated into the motherboard, in which case it can communicate with the processor 123 via the PCIE bus.

[0074] It should be noted that FIG1 only shows one engine 121 . However, in actual applications, the storage system may include two or more engines 121 , and redundancy or load balancing may be performed between the multiple engines 121 .

[0075] The disk enclosure 130 includes a control unit 131 and several hard disks 134. The control unit 131 can have various forms. In one case, the disk enclosure 130 is an intelligent disk enclosure, as shown in Figure 1. The control unit 131 includes a CPU and memory. The CPU is used to perform operations such as address translation and reading and writing data. The memory is used to temporarily store data to be written to the hard disk 134, or data read from the hard disk 134 to be sent to the controller. In another case, the control unit 131 is a programmable electronic component, such as a data processing unit (DPU). A DPU has the versatility and programmability of a CPU, but is more specialized and can efficiently operate on network data packets, storage requests, or analysis requests. A DPU is distinguished from a CPU by its high degree of parallelism (it needs to process a large number of requests). Optionally, the DPU can be replaced with a processing chip such as a graphics processing unit (GPU) or an embedded neural network processing unit (NPU). Typically, the number of control units 131 can be one, two, or more. When the disk enclosure 130 includes at least two control units 131, the hard disks 134 and the control units 131 may have an ownership relationship. If a hard disk 134 and a control unit 131 have an ownership relationship, each control unit can only access the hard disk that belongs to it. This often involves forwarding read / write data requests between the control units 131, resulting in a longer data access path. Furthermore, if storage space is insufficient, adding a new hard disk 134 to the disk enclosure 130 requires rebinding the ownership relationship between the hard disk 134 and the control unit 131, which is complex and results in poor storage space scalability. Therefore, in another embodiment, the functions of the control unit 131 can be offloaded to the network card 104. In other words, in this embodiment, the disk enclosure 130 does not have a control unit 131 internally, and instead the network card 104 performs data reading and writing, address translation, and other computing functions. In this case, the network card 104 is a smart network card. It may include a CPU and memory. In some application scenarios, the network card 104 may also have a persistent memory medium, such as persistent memory (PM), non-volatile random access memory (NVRAM), or phase change memory (PCM). The CPU is used to perform operations such as address translation and reading and writing data. The memory is used to temporarily store data to be written to the hard disk 134 or read from the hard disk 134 to be sent to the controller.It can also be a programmable electronic component, such as a data processing unit (DPU). The DPU has the versatility and programmability of the CPU, but is more specialized and can run efficiently on network data packets, storage requests or analysis requests. The DPU is distinguished from the CPU by a greater degree of parallelism (needing to process a large number of requests). Optionally, the DPU here can also be replaced with a processing chip such as a graphics processing unit (GPU) or an embedded neural-network processing unit (NPU). There is no ownership relationship between the network card 104 and the hard disk 134 in the hard disk frame 130. The network card 104 can access any hard disk 134 in the hard disk frame 130, so it is more convenient to expand the hard disk when storage space is insufficient.

[0076] Depending on the communication protocol between the engine 121 and the disk enclosure 130, the disk enclosure 130 can be a SAS disk enclosure, an NVMe disk enclosure, an IP disk enclosure, or other types of disk enclosures. SAS disk enclosures use the SAS 3.0 protocol, and each enclosure supports 25 SAS hard drives. The engine 121 connects to the disk enclosure 130 via an onboard SAS interface or a SAS interface module. An NVMe disk enclosure is more like a complete computer system, with NVMe hard drives plugged into the enclosure. The NVMe disk enclosure then connects to the engine 121 via an RDMA port.

[0077] In another possible application scenario, the storage system involved in the embodiment of the present application is shown in Figure 2, which is a structural diagram of another storage system involved in the embodiment of the present application. In the application scenario shown in Figure 2, users access data through applications. The computer that runs these applications is called an "application server." The application server 100 can be a physical machine or a virtual machine. Physical application servers include but are not limited to desktop computers, servers, laptops, and mobile devices. The application server 100 accesses the storage system 120 through the fiber optic switch 110 to access data. However, the switch 110 is only an optional device, and the application server 100 can also communicate directly with the storage system 120 through the network.

[0078] The storage system 120 shown in Figure 2 is a centralized storage system. A centralized storage system is characterized by a unified entry point through which all data from external devices must pass. This entry point is the engine of the centralized storage system. The engine 121 is the core component of the centralized storage system, implementing many of the system's advanced functions.

[0079] As shown in Figure 2, there are one or more controllers in the engine 121. Figure 2 uses the example of an engine 121 containing two controllers for explanation. There is a mirror channel between controller 0 and controller 1. Then, after controller 0 writes a copy of data into its memory 124, it can send a copy of the data to controller 1 through the mirror channel, and controller 1 stores the copy in its own local memory 124. In this way, controller 0 and controller 1 back up each other. When controller 0 fails, controller 1 can take over the business of controller 0. When controller 1 fails, controller 0 can take over the business of controller 1, thereby avoiding the unavailability of the entire storage system due to hardware failure. When there are 4 controllers deployed in the engine 121, there is a mirror channel between any two controllers, so any two controllers back up each other.

[0080] The engine 121 also includes a front-end interface 125 and a back-end interface 126. The front-end interface 125 is used to communicate with the application server 100, thereby providing storage services for the application server 100. The back-end interface 126 is used to communicate with the hard disk 134 to expand the storage system capacity. Through the back-end interface 126, the engine 121 can connect to more hard disks 134, thereby forming a very large storage resource pool.

[0081] In terms of hardware, as shown in FIG2 , the controller 0 includes at least a processor 123 (CPU 123) and a memory 124. The processor 123 is a central processing unit (CPU) that processes data access requests from outside the storage system (servers or other storage systems), and also processes requests generated within the storage system. For example, when the processor 123 receives write data requests from the application server 100 through the front-end port 125, it temporarily stores the data in these write data requests in the memory 124. When the total amount of data in the memory 124 reaches a certain threshold, the processor 123 sends the data stored in the memory 124 to the hard disk 134 through the back-end port for persistent storage.

[0082] Memory 124 refers to internal storage that directly exchanges data with the processor. It can read and write data at any time and at a high speed, serving as temporary data storage for the operating system or other running programs. Memory includes at least two types of memory. For example, memory can be either random access memory (RAM) or read-only memory (ROM). For example, ROM is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a type of semiconductor memory that, like most random access memory (RAM), is a volatile memory device. SCM is a hybrid storage technology that combines the characteristics of traditional storage devices and memory. Storage class memory can provide faster read and write speeds than hard drives, but has slower access speeds than DRAM and is also less expensive than DRAM. However, DRAM and SCM are merely exemplary in this embodiment; memory can also include other types of random access memory, such as static random access memory (SRAM). As for the read-only memory, for example, it can be a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), etc. In addition, the memory 124 can also be a dual in-line memory module or a dual-line memory module (DIMM), that is, a module composed of dynamic random access memory (DRAM), or a solid state disk (SSD). In actual applications, multiple memories 124 and different types of memories 124 can be configured in the controller 0. This embodiment does not limit the number and type of memory 124. In addition, the memory 124 can be configured to have a power-saving function. The power-saving function means that when the system loses power and then powers on again, the data stored in the memory 124 will not be lost. A memory with a power-saving function is called a non-volatile memory.

[0083] Memory 124 stores software programs, and processor 123 executes the software programs in memory 124 to manage the hard disks. For example, hard disks can be abstracted into a storage resource pool, which is then divided into LUNs for server use. The LUNs here are essentially the hard disks seen on the server. Of course, some centralized storage systems are also file servers, providing shared file services to servers.

[0084] The hardware components and software structure of controller 1 and other controllers not shown in FIG. 2 are similar to those of controller 0 and are not described in detail here.

[0085] It should be noted that FIG2 shows only one engine 121 . However, in actual applications, the storage system may include two or more engines 121 , and redundancy or load balancing may be performed between the multiple engines 121 .

[0086] Figure 2 shows a centralized storage system with integrated disk and controller. In this system, engine 121 has a hard drive slot, and hard drive 134 can be directly deployed in engine 121. Back-end interface 126 is an optional configuration. When the system storage space is insufficient, more hard drives or hard drive enclosures can be connected through back-end interface 126.

[0087] Currently, network devices such as switches are commonly used to perform cluster load balancing. For easier understanding, please refer to Figure 3, which shows a schematic diagram of a storage cluster structure. The storage cluster illustrated in Figure 3 includes a network device and controllers 1 and 2 connected to the network device. Controllers 1 and 2 are used to manage disks. Specifically, after receiving an anycast message from a host (e.g., an application server), the network device replicates the received anycast message, calculates the destination of the replicated message according to certain rules, and forwards the replicated message.

[0088] It should be noted that there are many possible implementations of the host in the embodiments of the present application, including but not limited to: a computing device, a computing unit, a cloud device, a virtual machine, or a physical machine. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone. The server may be a server cluster consisting of multiple servers, or a cloud computing service center. Among them, a large number of basic resources owned by the cloud service provider are deployed in the cloud computing service center. For example, a large number of basic resources such as computing resources, storage resources, and network resources are deployed in the cloud computing service center. The cloud computing service center can use this large amount of basic resources to implement the network operation and maintenance method provided in the embodiments of the present application, as well as to implement more services.

[0089] In one example, a host (virtual machine) needs to read data from address block #1 on the disk. The host sends Anycast message #1 to the network device, requesting to read the data from address block 1. After receiving Anycast message #1, the network device replicates it and forwards the replicated message to the corresponding controller. The controller then reads the data from address block 1 based on the replicated message.

[0090] The specific replication and forwarding process is as follows: Currently, commonly used transport layer protocols are point-to-point reliable transmission, such as the Traffic Conditioning Profile (TCP) protocol or Remote Direct Memory Access reliable connection (RDMA RC). These transport layer protocols stipulate that anycast messages carry sequence numbers in the original transmission path, making them impossible to forward directly. Therefore, network devices need to use connectionless transmission protocols such as the User Datagram Protocol (UDP) or Remote Direct Memory Access unreliable connection (RDMA UD) to replicate anycast messages before forwarding them. For example, in Figure 3, the network device forwards messages 1, 2, and 3 to controller 1. The network device replicates messages 1, 2, and 3 to obtain messages 1 (replication), 2 (replication), and 3 (replication). The network device then forwards messages 1 (replication), 2 (replication), and 3 (replication) to controller 2. However, during the transmission between the network device and controller 2, message 2 (copy) was lost. The applicant discovered that the above connectionless transmission protocol has no reliability mechanism, and anycast messages may be lost due to packet loss or error during the transmission process, which may lead to abnormal system behavior or degraded system performance.

[0091] Based on this, an embodiment of the present application proposes a message processing method. After receiving a first anycast message, a network device replicates and forwards the first anycast message. A first original message corresponding to the first anycast message carries a first sequence number, which corresponds to a first controller, and the destination address of the first anycast message points to the first controller. A first replicated message obtained by replicating the first anycast message carries a second sequence number, which corresponds to a second controller, which is a location determined based on the semantics of the first anycast message. The first sequence number carried by the first original message is the same as the second sequence number carried by the first replicated message. The first sequence number increments as the network device sends the first original message, and the second sequence number increments as the network device sends the first replicated message, and the increment of the first sequence number is the same as the increment of the second sequence number. Through the above method, the second controller can determine whether packet loss occurred during the transmission of the replicated message based on the sequence number carried by the received replicated message. This prevents system abnormality or performance degradation caused by lost anycast messages, effectively improving system reliability and performance.

[0092] The following describes an embodiment of the present application in conjunction with the accompanying drawings. First, refer to Figure 4, which is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application. A message processing method proposed in an embodiment of the present application includes:

[0093] S0. The network device sends a third duplicate message to the second controller. The first duplicate message includes a third anycast message. The third duplicate message includes a fourth sequence number. The fourth sequence number belongs to a second sequence number group. The second sequence number group corresponds to the second controller.

[0094] In step S0, after receiving an anycast message (e.g., the third anycast message), the network device generates a corresponding original message (e.g., the third original message) based on the destination address of the anycast message. The destination address of the original message is the same as the destination address of the anycast message, for example, pointing to the first controller. The original message includes the anycast message. The network device generates a duplicate message (e.g., the third duplicate message) based on the semantics of the anycast message. The destination address of the duplicate message points to the second controller. The destination of the duplicate message is determined by the network device based on the semantics of the anycast message.

[0095] Specifically, in step S0, the copy message sent by the network device is called the third copy message, the destination address of the third copy message is the second controller, the third copy message carries the fourth sequence number, the fourth sequence number belongs to the second sequence number group, and the second sequence number group has a corresponding relationship with the second controller.

[0096] S1. A network device receives a first anycast message, where the destination address of the first anycast message points to a first controller.

[0097] In step S1, a network device receives a first anycast message, which may be an anycast message sent by a host (or application server) to the network device. The destination address of the first anycast message points to a first controller, for example, the destination Internet Protocol (IP) address carried by the first anycast message points to the first controller.

[0098] Optionally, the first controller may be a controller on a reliable connection transmission (RC) side, and correspondingly, the second controller may be a controller on an unreliable connection (UD) side.

[0099] Exemplarily, the first anycast message may be a remote direct memory access (RDMA) message.

[0100] S2. The network device sends a first original message to the first controller. The first original message includes a first anycast message. The first original message includes a first sequence number. The first sequence number belongs to a first sequence number group. The first sequence number group corresponds to the first controller.

[0101] After step S1, in step S2, the network device generates a first original message based on the first anycast message, and the destination address of the first original message points to the first controller. In the embodiment of the present application, the message sent by the network device to the first controller based on the first anycast message is referred to as the first original message. The first original message includes the first anycast message, and the destination address of the first original message is the first controller. It is understandable that the first original message in the embodiment of the present application can also be implemented in other ways, including but not limited to data packets or messages. That is, the first original message is replaced with the first original data packet or the first original message, etc., and the embodiment of the present application does not limit this.

[0102] The first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller. Specifically, the network device manages one or more sequence number groups, and each sequence number group has a corresponding relationship with a controller. The message carrying the anycast message sent by the network device to the controller carries the sequence number in the sequence number group. For the message carrying the anycast message destined for the same controller, the sequence number carried by the message increases sequentially as the network device continues to send the message. For example, as shown in Table 1.

[0103] Table 1

[0104] As shown in Table 1, the first message carrying anycast message sent by the network device to controller #1 (the destination address of the anycast message is controller #1) carries the sequence number "0"; the second message carrying anycast message sent by the network device to controller #1 (the destination address of the anycast message is controller #1) carries the sequence number "1"; the third message carrying anycast message sent by the network device to controller #1 (the destination address of the anycast message is controller #1) carries the sequence number "2", and so on.

[0105] Optionally, the multiple sequence number groups managed by the network device may include the same sequence number or different sequence numbers. As shown in Table 1, controller #1 corresponds to sequence number group #1, and sequence number group #1 includes sequence numbers {0, 1, 2...}. Controller #2 corresponds to sequence number group #2, and sequence number group #2 includes sequence numbers {0, 1, 2...}. The sequence numbers included in sequence number group #1 and sequence number group #2 are the same. Controller #3 corresponds to sequence number group #3, and sequence number group #3 includes sequence numbers {10000, 10001, 10002...}. Controller #4 corresponds to sequence number group #4, and sequence number group #4 includes sequence numbers {100000, 100001, 100002...}. The sequence numbers included in sequence number group #3 and sequence number group #4 are different.

[0106] For example, taking the first controller as an example, the first sequence number group assigned by the network device to the first controller can be sequence number group #1 in Table 1. The first original message #1 sent by the network device to the first controller carries sequence number "0" in the first sequence number group; the first original message #2 sent by the network device to the first controller carries sequence number "1" in the first sequence number group; the first original message #3 sent by the network device to the first controller carries sequence number "2" in the first sequence number group; and the first original message #4 sent by the network device to the first controller carries sequence number "3" in the first sequence number group. The sending order of the first original message #2 is later than the sending order of the first original message #1, the sending order of the first original message #3 is later than the sending order of the first original message #2, and the sending order of the first original message #4 is later than the sending order of the first original message #3. And so on, as the sending order of the original messages increases, the sequence numbers carried by the original messages sent by the network device to the first controller increase successively.

[0107] Exemplarily, the first sequence number is carried in a newly added field of the first original message, and the newly added field may be an unreliable connection start packet sequence number (UDPSN).

[0108] Exemplarily, the newly added field is carried in the RDMA payload of the first original message. For example, the newly added field is carried in the non-volatile memory express (NVMe) field. Alternatively, the newly added field is carried in a custom field of the first original message. Alternatively, the newly added field is carried in an extended field of the payload of the first original message.

[0109] The following describes how network devices assign serial number groups to controllers.

[0110] In one possible implementation, the network device obtains the queue pair context (QPC) of the controller, and the queue pair context of the controller includes the address information of the controller and the first sequence number group. With respect to the queue pair context, a queue pair (QP) can be established between the source end and the destination end respectively through the RDMA protocol, and the queue pair includes a queue pair identification number (QPN). Then, the QP of the destination end is associated with the QP of the source end, and the association includes the QPN and address information of the specified QP counterpart. Exemplarily, after the QP of the network device establishes an association relationship with the QP of the controller, a queue pair context is generated that associates the controller with the network device, and the queue pair context of the controller includes the corresponding QPN, the address information of the controller, and the starting packet sequence number (PSN). For the controller, the controller creates a queue pair context based on the network device connected to the controller. For example, in a dual-plane scenario, the controller is connected to network device #1 and network device #2. The controller creates QPC #1 for network device #1 and QPC #2 for network device #2 respectively. QPC #1 includes the address information of network device #1, and QPC #2 includes the address information of network device #2.

[0111] After receiving the queue pair context for the first controller from the controller, the network device configures a communication connection with the controller. For example, the controller assigns QPC#1 to network device #1, and the controller assigns QPC#2 to network device #2. After the network device receives the QPC information (information related to QPC#1 or QPC#2), the control plane of the network device sends the QPC to the data plane of the network device, completing the QPC configuration and establishing a communication connection with the controller.

[0112] Then, the network device uses the PSN in the context of the controller's queue as the corresponding sequence number group for the control. The network device assigns a sequence number group to the controller based on the controller's address information. Specifically, the network device assigns a sequence number in the sequence number group corresponding to the control to the original message whose destination address is the controller. The network device sends an original message carrying an anycast message to the controller, carrying the sequence number of the sequence number group. The sequence number of the original message increases in this order as the sending order increases. For example, the original message #1 sent by the network device to the controller carries sequence number 1, the original message #2 sent by the network device to the controller carries sequence number 2, and the original message #3 sent by the network device to the controller carries sequence number 3, wherein the sending order of original message #2 is later than the sending order of original message #1, and the sending order of original message #3 is later than the sending order of original message #2.

[0113] Exemplarily, the first controller sends the queue pair context of the first controller to the network device, and the queue pair context of the first controller includes the address information of the first controller and the first sequence number group. After the network device obtains the queue pair context of the first controller, it configures the communication connection with the first controller according to the queue pair context of the first controller. Specifically, the network device configures the queue pair context of the first controller to the data plane of the network device. Then, the network device assigns the first sequence number group carried in the queue pair context of the first controller to the first controller based on the address information of the first controller. Specifically, the message carrying the anycast message sent by the network device to the first controller (such as the first original message) carries the sequence number in the first sequence number group.

[0114] S3. The network device sends a first duplicate message to the second controller. The first duplicate message includes a first anycast message and a second sequence number. The second sequence number belongs to a second sequence number group. The second sequence number group corresponds to the second controller.

[0115] After step S1, in step S3, the network device generates a first duplicate message based on the first anycast message. The first duplicate message includes the first anycast message, and the destination address of the first duplicate message is the second controller. In the embodiment of the present application, the message sent by the network device to the second controller based on the first anycast message is referred to as the first original message. The first original message includes the first anycast message, and the destination address of the first original message is the first controller. It is understandable that the first duplicate message in the embodiment of the present application can also be implemented in other ways, including but not limited to data packets or messages. That is, the first duplicate message is replaced with a first duplicate data packet or a first duplicate message, etc., and the embodiment of the present application does not limit this.

[0116] The network device can determine the destination address of the first replicated message in a variety of ways: In one possible implementation, the network device determines the second controller based on the semantics of the first anycast message. Specifically, the network device performs a table lookup in the attribution table based on one or more fields in the first anycast message to obtain the address information of the second controller corresponding to the first anycast message, and the second controller serves as the destination of the first replicated message. The attribution table includes one or more correspondences, which include the fields of the anycast message and the address information of the controller. Regarding the attribution table, for example, as shown in Table 2:

[0117] Table 2

[0118] As shown in Table 2, when the first anycast message carries the "CCC" field, the network device performs semantic analysis based on the "CCC" field and determines from the attribution table that the UD-side controller corresponding to the first anycast message is controller #2. The network device uses controller #2 as the secondary controller and configures the destination address of the first duplicate message as controller #2's address, "192.168.16.200." The network device then sends the first duplicate message to controller #2.

[0119] The first replicated message includes a second sequence number, the second sequence number belongs to a second sequence number group, and the second sequence number group has a corresponding relationship with the second controller. Specifically, the network device assigns the second sequence number group to the second controller, and the replicated message sent by the network device to the second controller (the replicated message carrying the anycast message) carries the sequence number of the second sequence number group.

[0120] The method for the network device to allocate the second serial number group to the second controller is similar to the method for the network device to allocate the first serial number group to the first controller in the aforementioned step S2, and is not described in detail here.

[0121] For example, taking the second controller as an example, the second sequence number group assigned by the network device to the second controller can be sequence number group #2 in Table 1. The first duplicate message #1 sent by the network device to the second controller carries sequence number "0" in the second sequence number group; the first duplicate message #2 sent by the network device to the second controller carries sequence number "1" in the second sequence number group; the first duplicate message #3 sent by the network device to the second controller carries sequence number "2" in the second sequence number group; and the first duplicate message #4 sent by the network device to the second controller carries sequence number "3" in the second sequence number group. The sending order of the first duplicate message #2 is later than the sending order of the first duplicate message #1, the sending order of the first duplicate message #3 is later than the sending order of the first duplicate message #2, and the sending order of the first duplicate message #4 is later than the sending order of the first duplicate message #3. Similarly, as the sending order of the duplicate messages increases, the sequence numbers carried in the duplicate messages sent by the network device to the second controller increase successively.

[0122] Exemplarily, the second controller sends the queue pair context of the second controller to the network device, and the queue pair context of the second controller includes the address information of the second controller and the second sequence number group. After the network device obtains the queue pair context of the second controller, it configures the communication connection with the second controller according to the queue pair context of the second controller. Specifically, the network device configures the queue pair context of the second controller to the data plane of the network device. Then, the network device assigns the second sequence number group carried in the queue pair context of the second controller to the second controller based on the address information of the second controller. Specifically, the message carrying the anycast message sent by the network device to the second controller (such as the first copy message) carries the sequence number in the second sequence number group.

[0123] Exemplarily, the second sequence number is carried in a newly added field of the first duplicate message, and the newly added field may be an unreliable connection start packet sequence number (UDPSN).

[0124] Exemplarily, the newly added field is carried in the RDMA payload of the first replicated message. For example, the newly added field is carried in the NVMe field. Alternatively, the newly added field is carried in a custom field of the first original message. Alternatively, the newly added field is carried in an extended field of the payload of the first original message.

[0125] It should be noted that the first sequence number increments as the network device sends the first original message, and the second sequence number increments as the network device sends the first duplicate message. The first sequence number and the second sequence number are identical, and the increment of the first sequence number and the increment of the second sequence number are identical. This ensures that the sequence number carried by the duplicate message sent by the network device for the same anycast message is the same as the sequence number carried by the original message. Furthermore, it ensures that the sequence numbers carried by the duplicate messages sent by the network device increment sequentially, and the sequence numbers carried by the original messages sent by the network device increment sequentially.

[0126] It should be noted that the execution order of step S2 and step S3 is not limited in the embodiment of the present application. For example, step S2 may be executed first and then step S3, or step S3 may be executed first and then step S2, or steps S2 and S3 may be executed simultaneously.

[0127] S4. The first controller adds the first original message to a cache queue, and suspends processing of messages in the cache queue.

[0128] After step S2, in step S4, after receiving the first original message, the first controller puts the first original message into the cache queue and suspends processing, that is, suspends the first original message and suspends processing of the first original message. For the message in the cache queue, the first controller suspends processing.

[0129] Exemplarily, the cache queue includes multiple implementation methods, such as a linked list, or a red-black tree, etc., which is not limited in the embodiments of the present application.

[0130] S5. The second controller detects whether the second serial number and the fourth serial number are continuous.

[0131] After step S3, in step S5, after receiving the first duplicate message, the second controller extracts the second sequence number from the first duplicate message and then detects whether the second sequence number is continuous with the fourth sequence number.

[0132] Regarding the fourth sequence number, after step S0, after the second controller receives the third duplicate message, the second controller extracts the fourth sequence number from the third duplicate message and then stores the fourth sequence number.

[0133] If the second sequence number and the fourth sequence number are consecutive, the second controller determines that no target message is lost between the third duplicate message and the first duplicate message, and executes step S6. For example, if the second sequence number is 3, the fourth sequence number is 2, and the second sequence number group is {0, 1, 2, 3, 4, ...}, then the second sequence number and the fourth sequence number are considered consecutive.

[0134] If the second sequence number and the fourth sequence number are not continuous, the second controller determines that a target message is lost between the third duplicate message and the first duplicate message, and executes step S7. For example, if the second sequence number is 4, the fourth sequence number is 2, and the second sequence number group is {0, 1, 2, 3, 4, ...}, then the second sequence number and the fourth sequence number are considered to be discontinuous.

[0135] S6. If the second sequence number and the fourth sequence number are continuous, the second controller determines that there is no lost target message between the third copy message and the first copy message, and the second controller writes the first copy message to the disk.

[0136] In step S6, the second controller determines, based on the detection result, that no target message is lost between the third copy message and the first copy message, meaning that the third copy message is continuous with the first copy message. The second controller writes the first copy message to the disk, and no write errors or other issues occur. Therefore, the second controller writes the first copy message to the disk.

[0137] After step S6, step S8 is executed.

[0138] S7. If the second sequence number and the fourth sequence number are not continuous, the second controller determines that there is a lost target message between the third duplicate message and the first duplicate message, and the second controller requests retransmission of the target message.

[0139] In step S7, the second controller determines, based on the detection result, that the third duplicate message is discontinuous with the first duplicate message and that a target message is lost between the third duplicate message and the first duplicate message, and then the second controller requests retransmission of the target message. Regarding the method for the second controller to request retransmission of the target message, please refer to the subsequent embodiments and will not be described in detail here.

[0140] In another possible implementation, the first controller triggers the retransmission of the target message. The specific method is similar to the above-mentioned step S4 and will not be described in detail here.

[0141] After receiving the target message, the second controller writes the target message to the disk. Furthermore, the second controller checks whether the target message is continuous with the first duplicate message. Specifically, it checks whether the sequence number carried by the target message and the second sequence number carried by the first duplicate message are continuous and increasing. If so, the second controller writes the first duplicate message to the disk.

[0142] S8. The second controller sends a notification to the first controller that the first duplicate message has been processed.

[0143] In step S8, if the second controller writes the first duplicate message to disk, the second controller sends a processing notification to the first controller. This processing notification indicates that the second controller has written the first duplicate message to disk. This allows the first controller to clear the cache queue promptly, saving storage space on the first controller.

[0144] In this embodiment of the present application, the second controller can determine whether packet loss occurred during the transmission of a received duplicate message based on the sequence number carried in the duplicate message. This prevents system abnormalities or performance degradation caused by lost anycast messages, effectively improving system reliability and performance and ensuring anycast reliability.

[0145] In conjunction with the aforementioned embodiments, the following describes the actions of a network device after receiving a second anycast message. The second anycast message is an anycast message that is later in time than the first anycast message. Please refer to Figure 5, which is a schematic diagram of an embodiment of a message processing method in accordance with an embodiment of the present application. The message processing method proposed in this embodiment of the present application further includes:

[0146] D1. The network device receives a second anycast message, where the destination address of the second anycast message points to the first controller.

[0147] In step D1, the network device receives a second anycast message sent by the host (or application server), where the destination address of the second anycast message points to the first controller. For example, the destination IP address carried by the second anycast message points to the first controller.

[0148] Exemplarily, the second anycast message may be an RDMA message.

[0149] D2. The network device sends a second original message to the first controller. The second original message includes a second anycast message. The second original message includes a fifth sequence number. The fifth sequence number belongs to the first sequence number group.

[0150] In step D2, the network device generates a second original message based on the second anycast message. The second original message includes the second anycast message. The second original message includes a sequence number in the first sequence number group. For ease of explanation, the sequence number included in the second original message is referred to as the fifth sequence number.

[0151] If the network device receives only the second anycast message destined for the first controller after receiving the first anycast message in step S1, the fifth sequence number is in an ascending relationship with the first sequence number. For example, the first sequence number is 0, the fifth sequence number is 1, and the first sequence number group includes: {0, 1, 2, 3, ...}.

[0152] D3. The network device sends a second duplicate message to the second controller. The second duplicate message includes a second anycast message and a third sequence number. The third sequence number belongs to the second sequence number group and is the incremented second sequence number.

[0153] In step D3, the network device generates a second duplicate message based on the second anycast message. The second duplicate message includes the second anycast message. Specifically, based on the semantics of the second anycast message, the destination address of the second duplicate message is determined to be the second controller. Because the destination address of the second duplicate message is the second controller, the second duplicate message is assigned a sequence number from the second sequence number group. For ease of explanation, the sequence number included in the second duplicate message is referred to as a third sequence number, and the third sequence number belongs to the second sequence number group.

[0154] Similar to step D2, if the network device, after receiving the first anycast message in step S1, has not sent a duplicate message to the second controller since sending the first duplicate message (the first duplicate message carries the second sequence number) to the second controller, then the third sequence number is in an ascending relationship with the second sequence number. For example, if the second sequence number is 0 and the third sequence number is 1, the second sequence number group includes: {0, 1, 2, 3, ...}.

[0155] Optionally, the duplicate message may also include the destination address of a previous anycast message. This duplicate message corresponds to the anycast message currently received by the network device, and the previous anycast message corresponds to the anycast message received by the network device before receiving the current anycast message. Taking the second anycast message as an example, the anycast message received by the network device before receiving the second anycast message is the first anycast message. The destination address of the first anycast message is the address information of the first controller. Therefore, the network device may also add the address information of the first controller to the second duplicate message. This allows the second controller to determine that the target message was lost before the current duplicate message after receiving the current duplicate message. The second controller can then determine the target controller corresponding to the target message based on the destination address of the anycast message carried in the current duplicate message. The second controller can then request the target controller to retransmit the lost target message. For example, after receiving the second duplicate message, the second controller determines that the target message was lost before the second duplicate message, meaning that the first duplicate message was not successfully received. Based on the address information of the first controller carried in the second duplicate message, the second controller requests the first controller to retransmit the first original message corresponding to the first duplicate message. The second controller writes the first anycast message carried in the first original message to the disk according to the first original message from the first controller, thereby retransmitting and writing the lost target message, effectively improving the reliability and performance of the system.

[0156] Exemplarily, the second field in the duplicate message carries the destination address of the previous anycast message, and the second field is a reserved field in the duplicate message or a newly added field in the duplicate message.

[0157] D4. The first controller adds the second original message to the cache queue, and the first controller suspends processing of the messages in the cache queue.

[0158] Step D4 is similar to the aforementioned step S4. After receiving the second original message, the first controller puts the second original message into the cache queue.

[0159] D5. The second controller detects whether the second serial number and the third serial number are continuous.

[0160] Step D5 is similar to the aforementioned step S5. After receiving the second duplicate message, the second controller extracts the third sequence number from the second duplicate message and then detects whether the third sequence number is continuous with the second sequence number.

[0161] If the third sequence number is continuous with the second sequence number, the third controller determines that no target message is lost between the second duplicate message and the first duplicate message, and executes step D6. For example, if the third sequence number is 4, the second sequence number is 3, and the second sequence number group is {0, 1, 2, 3, 4, ...}, then the third sequence number is considered continuous with the second sequence number.

[0162] If the third sequence number is discontinuous with the second sequence number, the third controller determines that a target message is lost between the second duplicate message and the first duplicate message, and executes step S7. For example, if the third sequence number is 5, the second sequence number is 2, and the second sequence number group is {0, 1, 2, 3, 4, ...}, the third sequence number is considered discontinuous with the second sequence number.

[0163] Optionally, if the third sequence number is in descending order with the second sequence number, for example, the third sequence number is 6, the second sequence number is 5, and the second sequence number group is {0, 1, 2, 3, 4, ...}, it is considered that the second controller receives the duplicated message sent by the network device out of order. The second controller performs error processing.

[0164] D6. If the second sequence number is continuous with the third sequence number, the second controller confirms that there is no lost target message between the second copy message and the first copy message, and writes the second copy message to the disk.

[0165] Step D6 is similar to step S6. Based on the detection result, the second controller determines that no target message is lost between the second copy message and the first copy message. In other words, the second copy message is continuous with the first copy message. The second controller writes the second copy message to the disk. No write errors or other issues will occur. Therefore, the second controller writes the second copy message to the disk.

[0166] Optionally, after the second controller successfully writes the second duplicate message to the disk, the second controller sends a processing notification of the second duplicate message to the first controller. The processing notification of the second duplicate message indicates that the second duplicate message has been written to the disk. This allows the first controller to promptly clear a cache queue, for example, by clearing the second original message corresponding to the second duplicate message from the cache queue, thereby saving storage space of the first controller.

[0167] D7. If the second sequence number is not continuous with the third sequence number, the second controller confirms that there is a lost target message between the second duplicate message and the first duplicate message, and the second controller requests retransmission of the target message.

[0168] Step D7 is similar to the aforementioned step S7. The second controller determines, based on the detection results, that the second copy message is discontinuous with the first copy message and that there is a lost target message. The second controller then requests retransmission of the target message. The target message in step D7 refers to the copy message lost between the second copy message and the first copy message.

[0169] In another possible implementation, the first controller triggers the retransmission of the target message.

[0170] Optionally, after the second controller successfully writes the second duplicate message to the disk, the second controller sends a processing notification of the second duplicate message to the first controller. The processing notification of the second duplicate message indicates that the second duplicate message has been written to the disk. This allows the first controller to promptly clear a cache queue, for example, by clearing the second original message corresponding to the second duplicate message from the cache queue, thereby saving storage space of the first controller.

[0171] In this embodiment of the present application, the second controller can determine whether packet loss occurred during the transmission of a received duplicate message based on the sequence number carried in the duplicate message. This prevents system abnormalities or performance degradation caused by lost anycast messages, effectively improving system reliability and performance and ensuring anycast reliability.

[0172] In conjunction with the above embodiment, the following describes how the second controller requests retransmission of the target message. Please refer to Figure 6, which is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application. A message processing method proposed in an embodiment of the present application also includes:

[0173] F1. The first controller receives a message acquisition request from the second controller.

[0174] In step F1, after the second controller determines that the target message is lost, the second controller initiates a retransmission process of the target message.

[0175] In a possible implementation, the second controller broadcasts the message acquisition request for the target message in a broadcast access manner, and one or more controllers managed by the network device receive the message acquisition request.

[0176] In another possible implementation, the duplicate message may also include the destination address of the previous anycast message, which corresponds to the anycast message received by the current network device, and the previous anycast message corresponds to the anycast message received by the network device before receiving the current anycast message. The second controller obtains the address of the previous anycast message carried in the currently received duplicate message. If the second controller determines that there is a lost target message based on the sequence number #1 of the currently received duplicate message and the sequence number #2 of the previously received duplicate message cached locally (second controller), for example, sequence number #1 and sequence number #2 are not continuous. Then, the second controller uses the address of the previous anycast message carried by the currently received duplicate message as the address information of the anycast message corresponding to the target message. Taking the example that the address information of the anycast message corresponding to the target message is the address information of the first controller, after the second controller determines the address information of the first controller from the currently received duplicate message, the second controller sends the message acquisition request to the first controller.

[0177] Specifically, the message acquisition request carries the target sequence number included in the target message, and the target sequence number is the sequence number carried by the target message. After the second controller determines that the target message is lost based on the sequence numbers carried by the two received duplicate messages, it determines the sequence number of the lost target message based on the sequence numbers of the two duplicate messages. For example, the second sequence number of the first duplicate message received by the second controller is 5, and the third sequence number of the second duplicate message most recently received by the second controller is 7. Since 5 and 7 are incremented but not continuous, packet loss is detected, and therefore the sequence number of the lost target message is determined to be 6. The message acquisition request sent by the second controller to the first controller carries the sequence number 6.

[0178] F2. The first controller determines the target message from the cache queue according to the message acquisition request.

[0179] In step F2, the first controller is taken as an example for explanation. After receiving the message acquisition request, the first controller finds the target message including the target sequence number from the cache queue according to the target sequence number in the message acquisition request.

[0180] F3. The first controller sends a target message to the second controller.

[0181] In step F3, after the first controller determines the target message from the cache queue, it determines the second controller based on the message acquisition request. The first controller then sends the target message to the second controller. In response, the second controller extracts the anycast message from the target message and writes it to disk.

[0182] Optionally, after the second controller writes the anycast message of the target message to the disk, the second controller sends a target message processing notification to the first controller, indicating that the anycast message corresponding to the target message has been written to the disk. Based on the target message processing notification, the first controller removes the target message from the cache queue, thereby conserving storage space of the first controller.

[0183] In the embodiment of the present application, the controller on the UD side, such as the second controller, can also request retransmission of lost target packets by sending a packet acquisition request to ensure that lost packet data can be successfully written to the disk, thereby ensuring anycast reliability.

[0184] In conjunction with the above embodiments, the following describes how the first controller triggers retransmission of a duplicate message in response to the buffering time of the buffer queue. Please refer to FIG7 , which is a schematic diagram of an embodiment of a message processing method in accordance with an embodiment of the present application. The message processing method proposed in this embodiment of the present application further includes:

[0185] G1. The first controller detects whether the cache time of the first original message in the cache queue has timed out.

[0186] In step G1, the first controller places the first original message in the cache queue and records the cache time for the first original message. Upon receiving a notification from the second controller that the first duplicate message has been processed, the first controller removes the first original message from the cache queue and resets the cache time for the first original message to zero. The first controller sets a cache timeout. When the cache time for an original message is greater than or equal to the timeout, retransmission of the original message is triggered.

[0187] Illustratively, the first controller may periodically detect original messages cached in the cache queue to determine whether the cache time of the original message has expired. For example, the first controller may detect the original messages cached in the cache queue at a scanning frequency of once every second. If the first controller detects the same original message cached in the cache queue three times in a row, the first controller determines that the original message has timed out and proceeds to step G2.

[0188] G2. If the timeout occurs, the first controller determines the address information of the second controller according to the first anycast message included in the first original message.

[0189] In step G2, in a possible implementation method, taking the cache time of the first original message being greater than or equal to the timeout time as an example, after the first controller determines that the cache time of the first original message has timed out, the first controller determines the address information of the second controller based on the first anycast message included in the first original message. The first controller can perform semantic analysis based on the first anycast message to determine the address information of the second controller. Alternatively, the first controller can also send a request to the network device, requesting to obtain the destination address of the copy message (i.e., the first copy message) corresponding to the first anycast message. Then, the first controller receives a response from the network device, which carries the address information of the second controller. After obtaining the address information of the second controller, the first controller generates a first copy message based on the first anycast message, and the destination address of the first copy message is the address information of the second controller. The first controller sends the first copy message to the second controller.

[0190] In another possible implementation, exemplarily, taking the case where the cache time of the first original message is greater than or equal to the timeout period, after the first controller determines that the cache time of the first original message has timed out, the first controller sends a timeout notification of the first original message to the network device. The timeout notification indicates that the cache time of the first original message in the cache queue of the first controller has timed out. Based on the timeout notification, the network device determines that an abnormality has occurred in the second controller's write operation of the first duplicate message to the disk, and the network device resends the first duplicate message to the second controller.

[0191] G3. The first controller sends a first copy message to the second controller.

[0192] In step G3, in a possible implementation, after the first controller generates the first duplicate message, the first controller sends the first duplicate message to the second controller.

[0193] In another possible implementation, after the first controller obtains the first anycast message from the first original message, the first controller forwards the first anycast message to the second controller.

[0194] In another possible implementation, the first controller notifies the network device to send the first duplicate message to the second controller.

[0195] In this embodiment of the present application, the cache queue of the first controller is configured with a cache timeout to prevent the long-term accumulation of original messages in the cache queue, which would otherwise occupy the first controller's cache space. Furthermore, by detecting whether the cache time of the original message has expired, the retransmission of the anycast message corresponding to the original message is triggered. If a duplicate message corresponding to the anycast message is lost, the first controller can proactively retransmit the anycast message to the second controller to ensure that the lost data is successfully written to the disk, thus ensuring anycast reliability.

[0196] In conjunction with the above embodiment, the following describes how the first controller writes the first original message to the disk in response to an abnormality in the second controller. Please refer to Figure 8, which is a schematic diagram of an embodiment of a message processing method in accordance with an embodiment of the present application. The message processing method proposed in this embodiment of the present application further includes:

[0197] H1. The first controller detects whether the cache time of the first original message in the cache queue has timed out.

[0198] H2. If the timeout is exceeded, the first controller determines the address information of the second controller according to the first anycast message included in the first original message.

[0199] Steps H1 and H2 are similar to the aforementioned steps G1 and G2 and are not described in detail here.

[0200] H3. The first controller detects whether the second controller operates normally.

[0201] In step H3, after the first controller determines the second controller, it further checks whether the second controller is functioning properly. Specifically, because the second controller failed to successfully write the first duplicate message within a relatively long period of time (the cache time of the first original message had expired), the second controller did not send a notification indicating that the first duplicate message had been processed. As a result, the cache time of the first original message in the first controller's cache queue has expired. Therefore, the write failure may be caused by an abnormal operation of the second controller.

[0202] In the embodiments of the present application, there is no limitation on how the first controller detects whether the second controller is operating normally. For example, the first controller may directly send an operating status query request to the second controller, and the first controller determines the operating status of the second controller based on the feedback from the second controller. In another example, the first controller may send an operating status query request to a network device or a network management device, and the network device or the network management device may determine the operating status of the second controller. The network management device is used to manage network devices and controllers in the current network.

[0203] Optionally, when the first controller determines that the second controller is operating normally, the first controller may trigger a retransmission process to the second controller. The specific retransmission method is similar to the aforementioned step G3 and is not described in detail here.

[0204] When the first controller determines that the second controller is abnormal, it goes to step H4.

[0205] H4. If the second controller is abnormal, the first original message is written to the disk.

[0206] In step H4, when the first controller determines that the working state of the second controller is abnormal, the second controller writes the first original message to the disk. Specifically, the second controller writes the first anycast message in the first original message to the disk.

[0207] It should be noted that in an embodiment of the present application, the controller writes the original message or the copied message to the disk, including but not limited to: the controller writes the original message or the copied message to the disk, or the controller writes the anycast message included in the original message or the copied message to the disk, or the controller performs a write operation on the disk in response to the anycast message, etc.

[0208] In an embodiment of the present application, the cache queue of the first controller sets a cache timeout to prevent a long-term backlog of original messages in the cache queue, which would otherwise occupy the cache space of the first controller. Furthermore, by detecting whether the cache time of the original message has expired, a trigger is used to detect whether the second controller is functioning properly. If the second controller malfunctions, the first controller locally writes the anycast message to disk to ensure that lost packet data, which refers to the anycast message corresponding to the original message, can be successfully written to disk. This ensures anycast reliability.

[0209] In combination with the foregoing embodiments, the application scenarios proposed in the embodiments of the present application are introduced below. Please refer to Figure 9, which is a schematic diagram of an application scenario proposed in the embodiments of the present application. In Figure 9, the network device manages controllers A0 to A3, and the network device is also used to manage controllers B0 to B3. The above-mentioned controllers A0 to A3 and controllers B0 to B3 belong to storage controllers. The storage controller is used to manage disks. Exemplarily, the storage controller can be a server, which includes a processor and a network card responsible for communication. The network device is used to forward anycast messages from the host to the storage controller in the form of original messages and copied messages. Exemplarily, the network device can be a switch.

[0210] Each of the aforementioned storage controllers (including controllers A0 through A3 and controllers B0 through B3) creates a queue pair context for that storage controller based on the number of network devices. The storage controller then configures the queue pair context for that storage controller to the network devices. Each storage controller's queue pair context includes the storage controller's address information and its serial number group. Each storage controller's serial number group uniquely corresponds to its address information. Optionally, the initial serial number of each storage controller's serial number group is 0.

[0211] For anycast message Msg I, the destination address is controller A0. Based on the semantics of anycast message Msg I, the network device calculates that the destination address of the duplicate message Msg I is controller B0. The network device forwards the anycast message Msg I to controller A0 as the original message Msg I. The original message Msg I carries a sequence number of UDPSN = 0. The network device replicates the original message Msg I to obtain a duplicate message Msg I. The destination address of the duplicate message Msg I is controller B0, and the sequence number of the duplicate message Msg I is UDPSN = 0. The network device then sends the original message Msg I to controller A0 and the duplicate message Msg I to controller B0. The sequence number for controller A0 in the network device increments from 0 to 1, and the sequence number for controller B0 in the network device increments from 0 to 1.

[0212] For anycast message Msg II, the destination address is controller A1. Based on the semantics of anycast message Msg II, the network device calculates that the destination address of the duplicate message Msg II is controller B0. The network device forwards the anycast message Msg II to controller A1 as the original message Msg II. The original message Msg II carries a sequence number of UDPSN = 0. The network device replicates the original message Msg II to obtain a duplicate message Msg II. The destination address of the duplicate message Msg II is controller B0, and the sequence number of the duplicate message Msg II is UDPSN = 1. The network device then sends the original message Msg II to controller A1 and the duplicate message Msg II to controller B0. The sequence number for controller A1 in the network device increments from 0 to 1, and the sequence number for controller B0 in the network device increments from 1 to 2.

[0213] For anycast message Msg III, the destination address is controller A2. Based on the semantics of anycast message Msg III, the network device calculates that the destination address of the duplicate message Msg III is controller B1. The network device forwards the anycast message Msg III to controller A2 as the original message Msg III. The original message Msg III carries a sequence number of UDPSN=0. The network device replicates the original message Msg III to obtain a duplicate message Msg III. The destination address of the duplicate message Msg III is controller B1, and the sequence number of the duplicate message Msg III is UDPSN=0. The network device then sends the original message Msg III to controller A2 and the duplicate message Msg III to controller B1. The sequence number for controller A2 in the network device increments from 0 to 1, and the sequence number for controller B1 in the network device increments from 0 to 1.

[0214] Packet loss detection in anycast messaging scenarios is achieved by adding an incrementing sequence number associated with the destination address in the message.

[0215] In conjunction with the foregoing embodiments, please refer to FIG10 , which is a schematic diagram of another application scenario proposed in an embodiment of the present application. The scenario illustrated in FIG10 is similar to the scenario illustrated in FIG9 . The network device sends an original message Msg I to the controller A0 according to the anycast message Msg I, and the sequence number carried by the original message Msg I is 100; the network device sends a duplicate message Msg I to the controller B0 according to the anycast message Msg I, and the sequence number carried by the duplicate message Msg I is 100. The network device sends an original message Msg II to the controller A1 according to the anycast message Msg II, and the sequence number carried by the original message Msg II is 101; the network device sends a duplicate message Msg II to the controller B0 according to the anycast message Msg II, and the sequence number carried by the duplicate message Msg II is 101. The network device sends an original message Msg III to controller A2 based on anycast message Msg III. The original message Msg III carries a sequence number of 102. The network device sends a duplicate message Msg III to controller B0 based on anycast message Msg III. The duplicate message Msg III carries a sequence number of 102. The network device sends an original message Msg IIII to controller A3 based on anycast message Msg IIII. The original message Msg IIII carries a sequence number of 103. The network device sends a duplicate message Msg IIII to controller B0 based on anycast message Msg IIII. The duplicate message Msg IIII carries a sequence number of 103.

[0216] During the transmission process, controller B0 determines, based on the sequence numbers of the duplicate messages, that duplicate messages Msg II and Msg III are lost. Controller B0 determines that the sequence number corresponding to duplicate message Msg II is 101, and that the sequence number corresponding to duplicate message Msg III is 102. The second controller then broadcasts a message retrieval request for duplicate message Msg II and a message retrieval request for duplicate message Msg III. The message retrieval request for duplicate message Msg II carries the sequence number 101 for duplicate message Msg II, and the message retrieval request for duplicate message Msg III carries the sequence number 102 for duplicate message Msg III. In response to the message retrieval request for duplicate message Msg II, controller A1 determines the original message Msg II and then forwards it to controller B0. Controller B0 retrieves anycast message Msg II from the original message Msg II and writes it to disk. Controller A2 responds to the message acquisition request for the duplicate message Msg III and determines the original message Msg III. Controller A2 then forwards the original message Msg III to controller B0. Controller B0 obtains the anycast message Msg III from the original message Msg III and writes the anycast message Msg III to the disk.

[0217] The above method can realize packet retransmission when multiple data packets are lost in anycast scenarios.

[0218] In conjunction with the foregoing embodiments, please refer to FIG11 , which is a schematic diagram of another application scenario proposed in an embodiment of the present application. The scenario illustrated in FIG11 is similar to the scenario illustrated in FIG9 . The duplicate message sent by the network device carries the destination address of the anycast message of the previous duplicate message. The network device sends a duplicate message Msg I to controller B0. Since duplicate message Msg I is the first duplicate message, it does not carry the destination address of the anycast message of the previous duplicate message. The network device sends a duplicate message Msg II to controller B0. The duplicate message Msg II carries the destination address of the anycast message Msg I corresponding to the duplicate message Msg I, and the destination address of the anycast message Msg I is the address of controller A0. Therefore, the duplicate message Msg II also includes the address information of controller A0. The network device sends a duplicate message Msg III to controller B0. The duplicate message Msg III carries the destination address of the anycast message Msg II corresponding to the duplicate message Msg II, and the destination address of the anycast message Msg II is the address of controller A1. Therefore, the duplicate message Msg III also includes the address information of the controller A1.

[0219] During the transmission process, after controller B0 receives duplicate message Msg III, it obtains the serial number of duplicate message Msg III as 102. However, the serial number carried by the previous duplicate message received by controller B0 is 100, and 102 and 100 are not continuous. Controller B0 determines that there is a lost duplicate message between duplicate message Msg III and duplicate message Msg I. This lost duplicate message is used as the target message, and the serial number of this target message is 101. Based on the address information of controller A1 carried in duplicate message Msg III, controller B0 sends a message acquisition request for the target message to controller A1. This message acquisition request for the target message carries the target serial number 101. Based on the target serial number in the message acquisition request for the target message, controller A1 determines the corresponding original message Msg II. The serial number of this original message Msg II is the same as the target serial number. Then, controller A1 sends the original message Msg II to controller B0, which includes the anycast message Msg II, to retransmit the anycast message Msg II. Controller B0 obtains the anycast message Msg II from the original message Msg II and writes the anycast message Msg II to the disk.

[0220] The above method can realize packet retransmission when a single data packet is lost in anycast scenario.

[0221] In conjunction with the aforementioned embodiments, please refer to FIG. 12 , which is a schematic diagram of another application scenario proposed in the embodiments of the present application. The scenario illustrated in FIG. 12 is similar to the scenario illustrated in FIG. 9 . After receiving anycast message Msg III, the network device sends the original message Msg III to controller A2 and a duplicate message Msg III to controller B0. Before controller B0 completes processing the duplicate message Msg III, controller B0 fails. Controller A0 scans the cache queue at a frequency of once per second. The original messages included in the cache queue can also be referred to as pending requests for the cache queue. If controller A0 finds the original message Msg III in the cache queue three times in a row, meaning that the duplicate message Msg III corresponding to the original message Msg III has not been processed, controller A0 triggers the retransmission of anycast message Msg III. That is, controller A0 determines, based on the semantics of anycast message Msg III, that the destination address of the duplicate message is controller B0. Controller A2 then sends the original message Msg III to controller B0, retransmitting the anycast message Msg III. The controller B0 obtains the anycast message Msg III in the original message Msg III, and writes the anycast message Msg III to the disk.

[0222] The above method can realize packet retransmission when the tail data packet is lost in anycast scenario.

[0223] In conjunction with the aforementioned embodiments, please refer to FIG. 13 , which is a schematic diagram of another application scenario proposed in the embodiments of the present application. The scenario illustrated in FIG. 13 is similar to the scenario illustrated in FIG. 9 . After receiving the anycast message Msg 1, the network device sends the original message Msg 1 to controller A2 and a duplicate message Msg 1 to controller B0. Before controller B0 completes processing the duplicate message Msg 1, controller B0 fails. Controller A0 scans the cache queue at a frequency of once per second. The original messages included in the cache queue can also be referred to as pending requests for the cache queue. If controller A0 finds the original message Msg 1 in the cache queue three times in a row, the duplicate message Msg 1 corresponding to the original message Msg 1 has not been processed. Based on the semantics of the anycast message Msg 1, controller A0 determines that the destination address of the duplicate message is controller B0. Controller A0 then checks whether controller B0 is operating normally. If controller B0 is operating abnormally, controller A0 locally writes the anycast message Msg 1 to disk.

[0224] The above method ensures anycast reliability and enables reliable data processing in the event of a controller failure.

[0225] It should be noted that, in addition to being applicable to anycast communication in RDMA scenarios, the embodiments of the present application can also be applied to anycast communication in TCP scenarios, and the embodiments of the present application are not limited to this.

[0226] On the basis of the embodiments corresponding to FIG. 1 to FIG. 13 , in order to better implement the above-mentioned solutions of the embodiments of the present application, related devices for implementing the above-mentioned solutions are also provided below.

[0227] In this embodiment, the network device, the first controller, or the second controller in the storage system may be, for example, a server.

[0228] Please refer to Figure 14, which is a schematic diagram of the structure of a server 1401 provided in an embodiment of the present application. As shown in Figure 14, server 1401 includes a processor 1403, which is coupled to a system bus 1405. Processor 1403 can be one or more processors, each of which can include one or more processor cores. A display adapter (video adapter) 1407 can drive a display 1409, which is coupled to system bus 1405. System bus 1405 is coupled to an input / output (I / O) bus via a bus bridge 1411. An I / O interface 1415 is coupled to the I / O bus. I / O interface 1415 communicates with various I / O devices, such as input device 1417 (e.g., a touch screen), external memory 1421 (e.g., a hard disk, floppy disk, optical disk, or USB flash drive), multimedia interface, etc., a transceiver 1423 (capable of sending and / or receiving radio communication signals), and an external USB port 1425. Optionally, the interface connected to the I / O interface 1415 may be a USB interface.

[0229] The processor 1403 may be any conventional processor, including a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, or a combination thereof. Alternatively, the processor may be a dedicated device such as an ASIC.

[0230] The hard drive interface 1431 is coupled to the system bus 1405. The hard drive interface is connected to the hard drive 1433. The internal memory 1435 is coupled to the system bus 1405. The data running in the internal memory 1435 may include the operating system (OS) 1437 of the server 1401, application programs 1436, and a scheduler.

[0231] The processor 1403 can communicate with the internal memory 1435 through the system bus 1405 and retrieve instructions and data in the application program 1436 from the internal memory 1435 to implement program execution.

[0232] The operating system consists of a shell 1439 and a kernel 1438. Shell 1439 is an interface between the user and the operating system's kernel. The shell is the outermost layer of the operating system. The shell manages the interaction between the user and the operating system: it waits for user input, interprets user input to the operating system, and processes various operating system output.

[0233] The kernel 1438 consists of the parts of the operating system that manage memory, files, peripherals, and system resources. The kernel 1438 interacts directly with the hardware. The operating system kernel typically runs processes and provides communication between processes, CPU time slice management, interrupts, memory management, I / O management, and so on.

[0234] Please refer to Figure 15, which is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server is a network device, a first controller, and / or a second controller in a storage system. The server includes a transceiver module 1501 and a processing module 1502, wherein the transceiver module 1501 may also include a receiving module and a sending module.

[0235] In one embodiment, the server is a network device in a storage system, and the server includes:

[0236] The transceiver module 1501 is configured to receive a first anycast message, where the destination address of the first anycast message points to the first controller;

[0237] The transceiver module 1501 is further configured to send a first original message to the first controller, where the first original message includes the first anycast message, the destination address of the first original message points to the first controller, and the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller;

[0238] The transceiver module 1501 is also used to send a first copy message to the second controller, wherein the first copy message includes the first anycast message, the destination address of the first copy message points to the second controller, the first copy message includes a second sequence number, the second sequence number belongs to a second sequence number group, the second sequence number group has a corresponding relationship with the second controller, and the first sequence number carried in the first original message is the same as the second sequence number carried in the first copy message.

[0239] In a possible implementation, the first sequence number increases as the network device sends the first original message; and the second sequence number increases as the network device sends the first duplicate message.

[0240] In a possible implementation, the processing module 1502 is configured to, by the network device, allocate the first sequence number group to the first controller according to configuration information of the first controller.

[0241] In a possible implementation, the configuration information of the first controller includes: a queue pair context of the first controller, where the queue pair context of the first controller includes address information of the first controller and the first sequence number group.

[0242] In a possible implementation, the processing module 1502 is further configured to allocate the second serial number group to the second controller according to configuration information of the second controller.

[0243] In a possible implementation, the configuration information of the second controller includes: a queue pair context of the second controller, where the queue pair context of the second controller includes address information of the second controller and the second sequence number group.

[0244] In one possible implementation,

[0245] The processing module 1502 is configured to determine, based on the semantics of the first anycast message, that the destination of the first replicated message is the second controller.

[0246] In one possible implementation,

[0247] The transceiver module 1501 is further configured to receive a second anycast message;

[0248] The processing module 1502 is further configured to determine, based on the semantics of the second anycast message, that the destination of the second replicated message is the second controller;

[0249] The processing module 1502 is further configured to generate a second duplicate message based on the second anycast message, where the second duplicate message includes the second anycast message, the second duplicate message includes a third sequence number, the third sequence number is the incremented second sequence number, and the third sequence number belongs to the second sequence number group;

[0250] The transceiver module 1501 is further configured to send the second copy message to the second controller.

[0251] In a possible implementation, the second copy message further includes the destination address of the first anycast message.

[0252] In a possible implementation, the transceiver module 1501 is further configured to receive the first original message sent by the first controller;

[0253] The processing module 1502 is further configured to determine a destination address of the first duplicate message based on the first anycast message carried by the first original message, where the destination address of the first duplicate message points to the second controller;

[0254] The transceiver module 1501 is further configured to send the destination address of the first copy message to the first controller.

[0255] In a possible implementation, the first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

[0256] In another embodiment, the server is a first controller in a storage system, and the server includes:

[0257] The transceiver module 1501 is configured to receive a first original message, where the first original message includes the first anycast message, the destination address of the first original message points to the first controller, and the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller;

[0258] The processing module 1502 is configured to include the first original message in a cache queue, wherein the cache queue is used to cache messages, the first controller suspends processing of the message in the cache queue, and removes the message from the cache queue in response to a notification that the message has been processed.

[0259] In one possible implementation,

[0260] The transceiver module 1501 is further configured to receive a message acquisition request, wherein the message acquisition request is used to request acquisition of a target message, and the message acquisition request carries a target sequence number included in the target message;

[0261] The processing module 1502 is further configured to determine the target message from the cache queue according to the target sequence number in the message acquisition request;

[0262] The transceiver module 1501 is further configured to send the target message.

[0263] In one possible implementation,

[0264] The processing module 1502 is further configured to detect whether the cache time of the first original message in the cache queue has timed out;

[0265] The processing module 1502 is further configured to determine address information of a second controller according to the first anycast message included in the first original message if the cache time of the first original message has timed out;

[0266] The transceiver module 1501 is also used to send a first copy message to the second controller, where the first copy message includes the first anycast message, the destination address of the first copy message points to the second controller, the first copy message includes a second sequence number, the second sequence number belongs to a second sequence number group, the second sequence number group has a corresponding relationship with the second controller, and the first sequence number carried in the first original message is the same as the second sequence number carried in the first copy message.

[0267] In one possible implementation,

[0268] The processing module 1502 is further configured to detect whether the cache time of the first original message in the cache queue has timed out;

[0269] The processing module 1502 is further configured to determine address information of a second controller according to the first anycast message included in the first original message if the cache time of the first original message has timed out;

[0270] The processing module 1502 is further configured to detect whether the second controller operates normally;

[0271] The processing module 1502 is further configured to write the first original message into a disk if the second controller is abnormal, wherein the disk is controlled by the second controller to perform a write operation before the second controller is abnormal.

[0272] In another embodiment, the server is a second controller in a storage system, and the server includes:

[0273] The transceiver module 1501 is configured to receive a first duplicate message, wherein the first duplicate message includes a first anycast message, the destination address of the first duplicate message points to the second controller, the first duplicate message includes a second sequence number, the second sequence number belongs to a second sequence number group, and the second sequence number group has a corresponding relationship with the second controller;

[0274] a processing module 1502 configured to detect whether the second sequence number and a fourth sequence number are consecutive, wherein the fourth sequence number is a sequence number carried in a third duplicate message received by the second controller before receiving the first duplicate message, and the fourth sequence number belongs to the second sequence number group;

[0275] The transceiver module 1501 is further configured to request retransmission of the target message if the second sequence number and the fourth sequence number are not continuous and the target message is lost between the third copy message and the first copy message;

[0276] The processing module 1502 is further configured to write the first duplicate message to a disk if the second sequence number is continuous with the fourth sequence number and no target message is lost between the third duplicate message and the first duplicate message.

[0277] In one possible implementation,

[0278] The processing module 1502 is further configured to determine a target sequence number based on the second sequence number and the fourth sequence number, where the target sequence number is a sequence number carried by the target message;

[0279] The transceiver module 1501 is further configured to send a message acquisition request, where the message acquisition request is used to request acquisition of the target message, and the message acquisition request carries the target sequence number included in the target message.

[0280] In one possible implementation,

[0281] The transceiver module 1501 is further configured to obtain a destination address of the anycast message corresponding to the target message from the first duplicate message;

[0282] The transceiver module 1501 is further configured to send the message acquisition request to the first controller according to the address information of the anycast message corresponding to the target message, where the address information of the anycast message corresponding to the target message points to the first controller.

[0283] In one possible implementation,

[0284] The transceiver module 1501 is further configured to receive the first duplicate message from the first controller.

[0285] In one possible implementation,

[0286] The transceiver module 1501 is further configured to send a notification indicating that the first copy message has been processed, where the notification indicating that the first copy message has been processed is used to indicate that the first copy message has been written into the disk.

[0287] In a possible implementation, the transceiver module 1501 is further configured to receive the first duplicate message from the network device.

[0288] In one possible implementation,

[0289] The first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

[0290] An embodiment of the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the steps executed by the aforementioned network device, the first controller, or the second controller.

[0291] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a program for signal processing. When the program is run on a computer, the computer executes the steps performed by the aforementioned network device, the first controller or the second controller.

[0292] The network device, the first controller, or the second controller provided in the embodiments of the present application may specifically be a chip, and the chip includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin, or a circuit. The processing unit may execute computer-executable instructions stored in the storage unit so that the chip in the execution device executes the message processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0293] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0294] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0295] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0296] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0297] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

Claims

1. A message processing method, characterized in that: The method is applied to a network device, and the method comprises: The network device receives a first anycast message, where a destination address of the first anycast message points to a first controller; The network device sends a first original message to the first controller, wherein the first original message includes the first anycast message, a destination address of the first original message points to the first controller, the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller; The network device sends a first copy message to the second controller, wherein the first copy message includes the first anycast message, the destination address of the first copy message points to the second controller, the first copy message includes a second sequence number, the second sequence number belongs to a second sequence number group, the second sequence number group has a corresponding relationship with the second controller, and the first sequence number carried in the first original message is the same as the second sequence number carried in the first copy message.

2. The method according to claim 1, characterized in that The first sequence number increases as the network device sends the first original message; The second sequence number increases as the network device sends the first copy message.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: The network device determines, according to the semantics of the first anycast message, that the destination of the first replicated message is the second controller.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The network device allocates the first sequence number group to the first controller according to configuration information of the first controller.

5. The method according to claim 4, characterized in that The configuration information of the first controller includes: a queue pair context of the first controller, and the queue pair context of the first controller includes address information of the first controller and the first sequence number group.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The network device allocates the second sequence number group to the second controller according to the configuration information of the second controller.

7. The method according to claim 6, characterized in that The configuration information of the second controller includes: a queue pair context of the second controller, and the queue pair context of the second controller includes address information of the second controller and the second sequence number group.

8. The method according to any one of claims 1 to 7, characterized in that After the network device receives the first anycast message, the method further includes: The network device receives a second anycast message; The network device determines, according to the semantics of the second anycast message, that the destination of the second replicated message is the second controller; The network device generates a second copy message according to the second anycast message, where the second copy message includes the second anycast message, the second copy message includes a third sequence number, the third sequence number is the incremented second sequence number, and the third sequence number belongs to the second sequence number group; The network device sends the second copy message to the second controller.

9. The method according to claim 8, characterized in that The second duplicate message also includes a destination address of the first anycast message.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: The network device receives the first original message sent by the first controller; The network device determines, according to the first anycast message carried by the first original message, a destination address of the first duplicate message, The destination address of the first copy message points to the second controller; The network device sends the destination address of the first copy message to the first controller.

11. The method according to any one of claims 1 to 10, characterized in that The first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

12. A message processing method, characterized in that: The method is applied to a first controller, and the method comprises: The first controller receives a first original message, wherein the first original message includes the first anycast message, a destination address of the first original message points to the first controller, the first original message includes a first sequence number, the first sequence number belongs to a first sequence number group, and the first sequence number group has a corresponding relationship with the first controller; The first controller lists the first original message in a cache queue, wherein the cache queue is used to cache messages. The first controller suspends processing of the message in the cache queue, and removes the message from the cache queue in response to a notification that the message has been processed.

13. The method according to claim 12, characterized in that The method further comprises: The first controller receives a message acquisition request, where the message acquisition request is used to request to acquire a target message, and the message acquisition request carries a target sequence number included in the target message; The first controller determines the target message from the cache queue according to the target sequence number in the message acquisition request; The first controller sends the target message.

14. The method according to any one of claims 12 or 13, characterized in that The method further comprises: The first controller detects whether the cache time of the first original message in the cache queue has timed out; If the cache time of the first original message has timed out, the first controller determines address information of the second controller according to the first anycast message included in the first original message; The first controller sends a first copy message to the second controller, the first copy message includes the first anycast message, the destination address of the first copy message points to the second controller, the first copy message includes a second sequence number, the second sequence number belongs to a second sequence number group, the second sequence number group has a corresponding relationship with the second controller, and the first sequence number carried in the first original message is the same as the second sequence number carried in the first copy message.

15. The method according to any one of claims 12 to 14, characterized in that: The method further comprises: The first controller detects whether the cache time of the first original message in the cache queue has timed out; If the cache time of the first original message has timed out, the first controller determines address information of the second controller according to the first anycast message included in the first original message; The first controller detects whether the second controller works normally; If the second controller is abnormal, the first controller writes the first original message into a disk, wherein the disk is controlled by the second controller to perform a write operation before the second controller is abnormal.

16. A message processing method, characterized in that: The method is applied to a second controller, and the method comprises: The second controller receives a first replication message, wherein the first replication message includes a first anycast message, a destination address of the first replication message points to the second controller, the first replication message includes a second sequence number, the second sequence number belongs to a second sequence number group, and the second sequence number group has a corresponding relationship with the second controller; The second controller detects whether the second sequence number is continuous with a fourth sequence number, wherein the fourth sequence number is a sequence number carried by a third copy message received by the second controller before receiving the first copy message, and the fourth sequence number belongs to the second sequence number group; If the second sequence number is not continuous with the fourth sequence number, the target message is lost between the third copy message and the first copy message, and the second controller requests to retransmit the target message; If the second sequence number is continuous with the fourth sequence number, there is no lost target message between the third copy message and the first copy message, and the second controller writes the first copy message to the disk.

17. The method according to claim 16, characterized in that The second controller requests retransmission of the target message, including: The second controller determines a target sequence number according to the second sequence number and the fourth sequence number, where the target sequence number is a sequence number carried by the target message; The second controller sends a message acquisition request, where the message acquisition request is used to request to acquire the target message, and the message acquisition request carries the target sequence number included in the target message.

18. The method according to claim 17, characterized in that The second controller requests retransmission of the target message, including: The second controller obtains the destination address of the anycast message corresponding to the target message from the first copy message; The second controller sends the message acquisition request to the first controller according to the address information of the anycast message corresponding to the target message, and the address information of the anycast message corresponding to the target message points to the first controller.

19. The method according to any one of claims 16 to 18, characterized in that: The second controller receives the first copy message, including: The second controller receives the first duplicate message from a network device.

20. The method according to any one of claims 16 to 19, characterized in that The method further comprises: The second controller receives the first duplicate message from the first controller.

21. The method according to any one of claims 16 to 20, characterized in that After the second controller writes the first copy message into the disk, the method further includes: The second controller sends a notification that the first copy message has been processed, where the notification that the first copy message has been processed is used to indicate that the first copy message has been written into the disk.

22. The method according to any one of claims 16 to 21, characterized in that The first copy message is an unreliable connection UD message, or a User Datagram Protocol UDP message.

23. An electronic device, characterized in that: The electronic device comprises a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the electronic device executes the method according to any one of claims 1 to 11.

24. An electronic device, characterized in that: The electronic device comprises a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the electronic device executes the method as claimed in any one of claims 12 to 15.

25. An electronic device, characterized in that: The electronic device comprises a memory and a processor; the memory stores codes, the processor is configured to execute the codes, and when the codes are executed, the electronic device executes the method according to any one of claims 16 to 22.

26. A storage system, characterized in that: include: The electronic device as claimed in claim 23, the electronic device as claimed in claim 24 and the electronic device as claimed in claim 25.

27. A computer storage medium, characterized in that The computer storage medium stores instructions, which, when executed by a computer, cause the computer to implement the method of any one of claims 1 to 22.

28. A computer program product, characterized in that The computer program product stores instructions, which, when executed by a computer, cause the computer to implement the method according to any one of claims 1 to 22.

Citation Information

Patent Citations

  • Packet processing method and apparatus

    CN105339934A

  • Multicast message detection method, network equipment and multicast message detection system

    CN113162855A

  • Providing services with guest vm mobility

    CN113454598A

  • Method and device for realizing reliable multicast of RDMA network, storage medium and equipment

    CN115442318A