Message sending and receiving method, related device and medium
By obtaining the number of unconfirmed fragments at the source node and updating the sliding window start position and reallocating the path fragment sequence number, the problem of data transmission stagnation caused by path failure is solved, and the continuity of data transmission is achieved.
Patent Information
- Application Number
- CN202410585102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-05-11
AI Technical Summary
In data center networks, when path failures lead to fragment loss, existing technologies' overall sliding window and path sliding window cannot slide backward, causing the entire connection transmission to stall and disrupting the continuity of data transmission.
On the source node side, by obtaining the number of unacknowledged fragments and maintaining the first sliding window at the transaction layer, fragments are added when the number of unacknowledged fragments is less than the preset count. When an acknowledgment message is received from a non-starting position, the starting position of the sliding window and the fragment sequence number of the reassigned path are updated, and the unacknowledged fragments are retransmitted.
In the event of a path failure, packet loss is prevented from affecting the transmission of other paths, thus preventing the entire connection from failing and improving the continuity of data transmission.
Smart Images

Figure CN118869708A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data communications, and in particular to a message sending and receiving method, a related device and a medium. Background Art
[0002] Current data center networks often need to transmit data between two nodes. There are usually multiple paths between the source node and the destination node. The target message that the source node wants to send to the destination node is generally divided into multiple message fragments and transmitted on different paths, thereby making full use of the transmission capacity of different paths, avoiding delays caused by network congestion, and improving communication real-time performance.
[0003] Usually, the transaction layer on the source node side maintains the overall sliding window of multiple paths, indicating the shards that are assigned to the multiple paths to be sent to the destination node and to be observed whether they have received confirmation from the destination node. The overall sliding window has a fixed length. When the first shard of the overall sliding window receives confirmation from the destination node, the overall sliding window is moved back by one shard. The second shard behind the first shard becomes the starting shard of the overall sliding window and becomes the object to be observed whether it has received confirmation from the destination node. When the overall sliding window is moved back by one shard, a new shard can be allocated to one of the multiple paths. The length of the overall sliding window remains fixed, which means that the number of shards that are assigned to the path to be sent but have not received confirmation is kept relatively fixed, so as to avoid too many shards being sent to the destination node and bursting the cache of the destination node. The path sliding window is also maintained on each path. The shards of the overall sliding window are actually the union of the shards of each path sliding window. Each path sliding window is similar to the overall sliding window. When the first shard receives confirmation from the destination node, the path sliding window is moved back by one shard. The second fragment following the first fragment now becomes the starting fragment of the path sliding window and becomes the object to be observed whether the confirmation of the destination node is received.
[0004] In this technology, if some paths fail, resulting in the loss of a certain fragment on the path, the fragment cannot receive confirmation from the destination node. At this time, whether it is the overall sliding window or the path sliding window, when the fragment is at the starting position of the sliding window and becomes the object to be observed whether it has received confirmation, since no confirmation is received, the overall sliding window and the path sliding window will no longer slide backward, causing not only the transmission of the path to stagnate, but also the connection transmission of the entire transaction layer (multiple paths form a connection) to stagnate, and the continuity of data transmission is destroyed. Summary of the invention
[0005] The disclosed embodiments provide a method for sending and receiving messages, related devices and media, which ensure that when a path fails, packet loss on the path will not affect the transmission of the path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0006] According to one aspect of the present disclosure, a message sending method is provided, which is performed by a source node, and the message sending method includes:
[0007] Split the target message into multiple message fragments and distribute them to multiple paths leading to the destination node for transmission;
[0008] Acquire the number of unconfirmed fragments, where the number of unconfirmed fragments is the number of message fragments that have not received a confirmation message from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to the multiple paths for transmission,
[0009] In response to the number of unconfirmed fragments being less than a preset first count, additionally allocating the message fragments to the multiple paths until the number of unconfirmed fragments reaches the first count;
[0010] For each path in the plurality of paths, arrange the message fragments sent on the path into a first queue according to the path fragment sequence number, and maintain a first sliding window on the first queue, wherein the first sliding window indicates a first number of the message fragments for which the confirmation message of the destination node has not been received;
[0011] Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0012] Retransmit the message fragment before the first message fragment for which the confirmation message has not been received.
[0013] According to one aspect of the present disclosure, a method for receiving a message is provided, which is performed by a destination node. The method for receiving a message includes:
[0014] Receiving a plurality of message fragments sent by a source node through a plurality of paths, wherein the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number;
[0015] Transferring the message fragment to the path corresponding to the path identifier;
[0016] Through the path, a second queue is set in the order of the path fragment sequence number, and the position of the path fragment sequence number of the received message fragment in the second queue is set to a first value, and a third sliding window is maintained on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value;
[0017] Execute a first process, the first process comprising: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with the next position set to the first value, and repeating the first process.
[0018] According to one aspect of the present disclosure, a message sending device is provided, which is arranged at a source node, and the message sending device includes:
[0019] A first allocation unit, configured to split a target message into a plurality of message fragments, and allocate the fragments to a plurality of paths leading to a destination node for transmission;
[0020] a first acquisition unit, configured to acquire the number of unconfirmed fragments, wherein the number of unconfirmed fragments is the number of message fragments for which a confirmation message from the destination node has not been received, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to the multiple paths for transmission,
[0021] A first responding unit, configured to allocate additional message fragments to the plurality of paths in response to the number of unconfirmed fragments being less than a preset first count, until the number of unconfirmed fragments reaches the first count;
[0022] a first maintenance unit, configured to arrange, for each path in the plurality of paths, the message fragments sent on the path into a first queue according to a path fragment sequence number, and maintain a first sliding window on the first queue, wherein the first sliding window indicates a first number of the message fragments for which the confirmation message of the destination node has not been received;
[0023] a first updating unit, configured to, upon receiving the confirmation message for the first message fragment located at a non-starting position of the first sliding window on the path, update the starting position of the first sliding window with the next message fragment position of the first message fragment, and reallocate the path fragment sequence number to the message fragment before the first message fragment for which the confirmation message has not been received, and connect it to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0024] A retransmission unit is used to retransmit the message fragment before the first message fragment for which the confirmation message has not been received.
[0025] Optionally, the first allocation unit is specifically configured to:
[0026] Splitting the target message into multiple message fragments, and assigning a connection fragment sequence number to each of the message fragments;
[0027] Distributing the message fragments to the paths;
[0028] Allocating the path fragment sequence number to the message fragment through the path, and storing the mapping relationship between the path fragment sequence number and the connection fragment sequence number in a first mapping table;
[0029] The message fragment is sent based on the path fragment sequence number.
[0030] Optionally, the first allocation unit is further configured to: set a first bitmap for the target message, the first bitmap storing a reception confirmation mark of each of the message fragments according to the order of the message fragments in the target message;
[0031] The message sending device also includes:
[0032] A second receiving unit, configured to receive the confirmation message of the message fragment from the destination node, wherein the confirmation message includes the path fragment sequence number of the message fragment;
[0033] A first forwarding unit, configured to forward the confirmation message to the path;
[0034] A search unit, configured to search the first mapping table through the path to obtain the connection fragment sequence number corresponding to the path fragment sequence number;
[0035] A first marking unit, configured to set the reception confirmation mark corresponding to the connection fragment sequence number to a first value in the first bitmap;
[0036] The first generating unit is configured to generate a successful sending message of the target message if all the receiving confirmation marks of the target message in the first bitmap are the first value.
[0037] Optionally, the confirmation message also includes a path identifier.
[0038] The first forwarding unit is specifically configured to:
[0039] Obtaining the path identifier from the confirmation message;
[0040] The confirmation message is forwarded to the path corresponding to the path identifier.
[0041] Optionally, the confirmation message also includes a source application identifier.
[0042] The message sending device also includes:
[0043] A second acquiring unit, configured to acquire the source application identifier from the confirmation message;
[0044] The first sending unit is configured to send the successful sending message to a source application corresponding to the source application identifier.
[0045] Optionally, the message sending device further includes:
[0046] The counting processing unit is used to reduce the number of unconfirmed fragments by 1.
[0047] Optionally, the first allocation unit is further configured to:
[0048] Obtaining the number of fragments allowed to be sent for each of the paths;
[0049] sorting the multiple paths based on the number of fragments allowed to be sent;
[0050] The paths are sorted and taken out in sequence, and the message fragments are allocated to the taken out paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to be transmitted in a single time of the taken out paths.
[0051] Optionally, the first allocation unit is further configured to:
[0052] Obtaining the first number of the message fragments in the first sliding window of the path;
[0053] Obtaining the number of congestion control slices of the path;
[0054] The minimum value of the first number and the number of congestion control fragments is determined as the number of fragments allowed to be sent.
[0055] Optionally, the source node has a plurality of source queuing areas corresponding to a plurality of source applications;
[0056] The first allocation unit is further specifically configured to:
[0057] Based on the source application to which the target message to which the message fragments are split belongs, placing the message fragments in the source queue area corresponding to the source application;
[0058] Determining a fragment acquisition order for each source queuing area based on a quality of service requirement of each source application;
[0059] Based on the fragment acquisition order, the message fragments are acquired from each of the source queuing areas and distributed to the path.
[0060] Optionally, the first allocation unit is further configured to:
[0061] Reading an application message operation instruction of a source application from the target message;
[0062] Converting the application message operation instruction into a transaction layer operation instruction;
[0063] The target message is split into the message fragments, and the transaction layer operation instructions are added to the message fragments.
[0064] Optionally, the first allocation unit is further configured to:
[0065] Based on the path fragment sequence number, obtaining the message fragment;
[0066] Acquire a message identifier of the target message to which the message fragment belongs, and a fragmentation position of the message fragment in the target message;
[0067] The message identifier and the fragmentation order are added to the message fragment and sent.
[0068] Optionally, the retransmission unit is specifically used to:
[0069] Maintaining a second sliding window on the first queue, the second sliding window indicating a range of candidate message fragments to be considered for retransmission, and a message fragment position set to a first value on the second sliding window corresponds to the message fragment determined to be retransmitted;
[0070] Setting the position of the message fragment before the first message fragment and not receiving the confirmation message in the second sliding window to the first value;
[0071] The message fragments at the message fragment positions set to the first value in the second sliding window are sequentially retransmitted, and each time a message fragment is retransmitted, the starting position of the second sliding window is positioned to the message fragment at the next message fragment position set to the first value.
[0072] Optionally, the message sending device further includes:
[0073] The second updating unit is configured to update the starting position of the first sliding window with the next message fragment position of the second message fragment once the confirmation message for the second message fragment located at the starting position of the first sliding window is received on the path.
[0074] Optionally, the first updating unit is specifically configured to:
[0075] If the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field of the confirmation message indicates a non-aggregation confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and the message fragment is connected to the back of the message fragment after the first message fragment and for which the confirmation message has not been received;
[0076] If the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregate confirmation field indicates an aggregate confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment.
[0077] Optionally, the message fragment further includes a retransmission times field,
[0078] The first updating unit is further configured to:
[0079] Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission number field of the message fragment before the first message fragment and for which the confirmation message has not been received has not reached the upper limit of the retransmission number, the retransmission number field is increased by 1, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and the path fragment sequence number is connected to the back of the message fragment after the first message fragment and for which the confirmation message has not been received;
[0080] Once the confirmation message for the first message fragment located at the non-starting position of the first sliding window is received on the path, and the retransmission number field of the message fragment before the first message fragment and for which the confirmation message has not been received reaches the retransmission number upper limit, the message fragment before the first message fragment and for which the confirmation message has not been received is forwarded to other paths for sending, and the retransmission number field is reset to zero.
[0081] According to one aspect of the present disclosure, there is provided a message receiving device, which is arranged at a destination node, and the message sending device comprises:
[0082] A first receiving unit, configured to receive a plurality of message fragments sent by a source node through a plurality of paths, wherein the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number;
[0083] A handover unit, configured to hand over the message fragment to the path corresponding to the path identifier;
[0084] a second maintenance unit, configured to set a second queue according to the order of the path fragment sequence numbers through the path, set the position of the path fragment sequence number of the received message fragment in the second queue to a first value, and maintain a third sliding window on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value;
[0085] An execution unit is used to execute a first process, wherein the first process includes: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with a next position set to the first value, and repeating the first process.
[0086] Optionally, the destination node is provided with a second bitmap, wherein the second bitmap stores each of the message fragments according to the order of the received message fragments in the target message to which the message fragments belong; the message fragments further have a message identifier and a fragment rank, wherein the fragment rank indicates the rank of the message fragment in the target message;
[0087] The message receiving device also includes:
[0088] A third acquiring unit, configured to acquire the message identifier and the fragmentation order from the received message fragment;
[0089] A storage unit, used for storing the message fragment in the second bitmap at a position corresponding to the message identifier and the fragment position;
[0090] The second forwarding unit is configured to forward the target message to a destination application once the positions of the message fragments of the target message in the second bitmap are filled.
[0091] Optionally, the message fragment further has a destination application identifier;
[0092] The second forwarding unit is specifically configured to:
[0093] Once the positions of the message fragments of the target message in the second bitmap are filled, obtaining the destination application identifier from the message fragment;
[0094] The target message is forwarded to the destination application corresponding to the destination application identifier.
[0095] Optionally, the second maintenance unit is specifically used to:
[0096] If the position of the path fragment sequence number of the received message fragment in the second queue is already the first value, the message fragment is discarded.
[0097] According to one aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the message sending method or the message receiving method as described above when executing the computer program.
[0098] According to one aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the message sending method or the message receiving method as described above is implemented.
[0099] According to one aspect of the present disclosure, a computer program product is provided, which includes a computer program, and the computer program is read and executed by a processor of a computer device, so that the computer device executes the message sending method or the message receiving method as described above.
[0100] In the disclosed embodiment, the transaction layer of the source node does not maintain the overall sliding window, and only obtains the number of unconfirmed fragments. The number of confirmed fragments is the number of message fragments that have not received the confirmation message of the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to multiple paths for transmission. The number of unconfirmed fragments is initially the first count. When a confirmation message from the destination node is received, the number of unconfirmed fragments is reduced by 1. At this time, the number of unconfirmed fragments is less than the first count, and message fragments are additionally allocated to multiple paths until the number of unconfirmed fragments reaches the first count. Therefore, by obtaining the number of unconfirmed fragments at the transaction layer of the source node without setting the overall sliding window, the effect of determining the number of fragments sent by the additional path according to the number of fragments that have received the confirmation message can still be achieved. At the same time, if the confirmation message corresponding to the starting position of the overall sliding window is not received, the overall sliding window will not slide backward, thereby affecting the transmission of subsequent message fragments. However, the embodiment of the present disclosure does not set up an overall sliding window, so the fragments lost due to the path failure will not occupy the starting position of the overall sliding window, and therefore, the overall sliding window will not be unable to slide backward and the entire connection will not be stalled. On the path side of the embodiment of the present disclosure, a first sliding window is set. In normal transmission, a confirmation message for the first message fragment located at the starting position of the first sliding window should be received first. However, if a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received, since the default network is sequence-preserving transmission, it can be considered that one or more message fragments before the first message fragment in the first sliding window are lost, so the confirmation message is not received. In order to prevent these message fragments from staying at the starting position of the first sliding window and hindering the first sliding window from continuing to slide backward, the embodiment of the present disclosure forces the first sliding window to slide, and changes the starting position of the first sliding window to the next message fragment position of the first message fragment, so that the sliding window will not stop sliding and the path transmission will not stagnate. However, these message fragments have not received confirmation messages, so these message fragments are reassigned path fragment sequence numbers and are sent again after the message fragments that have not received confirmation messages after the first message fragment. In this way, when a path fails, packet loss on the path will not affect the transmission of this path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0101] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] The accompanying drawings are used to provide further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.
[0103] Figure 1A and Figure 1B It is a system architecture diagram of a method for sending and receiving messages according to an embodiment of the present disclosure;
[0104] Figure 2A and a schematic diagram of the software form of a server applied by the message sending and receiving method according to an embodiment of the present disclosure;
[0105] Figure 2B It is a schematic diagram of the hardware form of a server applied by the message sending and receiving method according to an embodiment of the present disclosure;
[0106] Figure 3A and Figure 3B It is a schematic diagram of the interface of the message sending and receiving method provided by the embodiment of the present disclosure in the batch file transmission scenario;
[0107] Figure 3C It is a schematic diagram of a message sending and receiving method provided by an embodiment of the present disclosure in a large memory file transmission scenario;
[0108] Figure 3D It is a schematic diagram of applying the message sending and receiving method provided by an embodiment of the present disclosure in a shared connection scenario;
[0109] Figure 4 It is an overall flow chart of the message sending method provided by the embodiment of the present disclosure;
[0110] Figure 5A and Figure 5B It is a transmission schematic diagram of a message sending method in the related art;
[0111] FIG. 6A to FIG. 6C It is a transmission schematic diagram of the message sending method provided in an embodiment of the present disclosure;
[0112] Figure 7 is a structural diagram of a source node of the message sending method according to an embodiment of the present disclosure;
[0113] Fig. 8A It is a schematic diagram of the overall flow of the message sending and receiving method provided by the embodiment of the present disclosure;
[0114] Figure 8B It is a structural diagram of a message sending and receiving method provided by an embodiment of the present disclosure at a source node;
[0115] Fig. 9 yes Figure 4A flow chart of sending message fragments in step 410;
[0116] Fig.10 is a schematic diagram of a first mapping table provided in an embodiment of the present disclosure;
[0117] Fig.11 yes Fig. 9 A flow chart of splitting the target message into message fragments in step 910;
[0118] Fig.12 yes Fig.11 A schematic diagram of converting application message operation instructions into transaction layer operation instructions;
[0119] Fig.13 yes Fig. 9 Step 920 distributes the message fragments to a flow chart in the path;
[0120] Fig.14A It is a schematic diagram of the message sending and receiving method provided by the embodiment of the present disclosure at the transaction layer;
[0121] Fig. 14B yes Fig.13 A schematic diagram of allocating message fragments to paths;
[0122] Fig.15 yes Fig.13 Step 1310 is a flow chart of obtaining the number of fragments allowed to be sent for each path;
[0123] Fig.16 yes Fig. 9 Another flow chart of assigning message fragments to paths in step 920;
[0124] Fig.17 yes Fig. 9 A flow chart of sending message fragments based on the path fragment sequence number in step 940;
[0125] Fig.18 It is a schematic diagram of the data message format of message fragmentation and confirmation message provided by the embodiment of the present disclosure;
[0126] Fig.19 yes Figure 4 A flow chart of step 450 updating the first sliding window and reallocating the path fragment sequence numbers;
[0127] Fig. 20A yes Fig.19 A schematic diagram of updating the first sliding window and reallocating the path fragment sequence numbers when the aggregation confirmation field of the confirmation message indicates non-aggregation confirmation;
[0128] Fig. 20B yes Fig.19 A schematic diagram of updating the first sliding window and reallocating the path fragment sequence numbers when the aggregation confirmation field of the confirmation message indicates aggregation confirmation;
[0129] Fig.21 yes Figure 4 Another flow chart of updating the first sliding window and reallocating the path fragment sequence numbers in step 450;
[0130] Fig. 22 yes Figure 4 A flow chart of the retransmission of the message in step 460;
[0131] Fig.23A is a structural schematic diagram of a path of a source node and a destination node provided by an embodiment of the present disclosure;
[0132] Fig. 23B yes Fig. 22 A schematic diagram of a retransmitted message;
[0133] Fig.24 is a flow chart of a first sliding window sliding normally on a first queue provided by an embodiment of the present disclosure;
[0134] Fig.25 yes Fig.24 A schematic diagram of the first sliding window sliding normally on the first queue;
[0135] Fig.26 is a flow chart of the first bitmap setting provided by the embodiment of the present disclosure;
[0136] Fig.27A is a schematic diagram of a first bitmap provided by an embodiment of the present disclosure;
[0137] Fig.27B It is a schematic diagram of setting the receiving confirmation mark corresponding to the connection fragment sequence number in the first bit map to a first value provided by an embodiment of the present disclosure;
[0138] Fig.28 yes Fig.26 A flowchart of the first bitmap setting in ;
[0139] Fig.29 yes Fig.26 Step 2630 of the process forwards the confirmation message to a flow chart of the path;
[0140] Fig.30 is a flow chart of sending a successfully sent message to a source application corresponding to a source application identifier provided by an embodiment of the present disclosure;
[0141] Fig.31 is a flow chart of maintaining the number of unconfirmed fragments provided by an embodiment of the present disclosure;
[0142] Fig.32 It is an overall flow chart of the message receiving method provided by the embodiment of the present disclosure;
[0143] Fig.33 yes Fig.32 A schematic diagram of performing the first process in FIG.
[0144] Fig.34 It is a structural diagram of a message sending and receiving method provided by an embodiment of the present disclosure at a destination node;
[0145] Fig.35 yes Fig.32 A flowchart of setting the position of the path fragment sequence number of the message fragment received in the second queue to the first value in step 3230;
[0146] Fig.36 is a flow chart of second bitmap setting provided by an embodiment of the present disclosure;
[0147] Fig.37 yes Fig.36 A schematic diagram of the second bitmap setting in ;
[0148] Fig.38 yes Fig.36 A flow chart of forwarding the target message to the destination application;
[0149] Fig.39 It is a performance comparison diagram of the message sending and receiving method and related methods provided by the embodiment of the present disclosure;
[0150] Fig.40 It is an implementation detail of the message sending and receiving method according to an embodiment of the present disclosure;
[0151] Fig.41 is a module diagram of a message sending device according to an embodiment of the present disclosure;
[0152] Fig.42 is a module diagram of a message receiving device according to an embodiment of the present disclosure;
[0153] Fig.43 is a terminal structure diagram for executing a message sending and receiving method according to an embodiment of the present disclosure;
[0154] Fig.44 It is a server structure diagram for executing the message sending and receiving method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0155] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0156] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:
[0157] Message: It is the unit of data exchanged and transmitted in the network, that is, the data block that a node wants to send at one time. Message is also the unit of network transmission. During the transmission process, it will be continuously encapsulated into groups, packets, and frames for transmission. The way of encapsulation is to add some information segments, which are the data organized in a certain format by the message header. The message contains the complete data information to be sent, and its length is very inconsistent, and the length is unlimited and variable.
[0158] Multipath transmission: refers to a technology that uses multiple paths to transmit data in the network at the same time. Traditional network transmission methods only use a single path to transmit data. Once the path fails or is congested, it will cause data transmission failure or increased delay. Multipath transmission technology can use multiple paths to transmit data at the same time, improve network bandwidth utilization and data transmission reliability, and reduce transmission delay.
[0159] Data center network: It is a complex arrangement of network devices such as routers, switches, interfaces, etc., which cooperate and work together to provide faster and more reliable network services.
[0160] Current data center networks often need to transmit data between two nodes. There are usually multiple paths between the source node and the destination node. The target message that the source node wants to send to the destination node is generally divided into multiple message fragments and transmitted on different paths, thereby making full use of the transmission capacity of different paths, avoiding delays caused by network congestion, and improving communication real-time performance.
[0161] Usually, the transaction layer on the source node side maintains the overall sliding window of multiple paths, indicating the shards that are assigned to the multiple paths to be sent to the destination node and to be observed whether they have received confirmation from the destination node. The overall sliding window has a fixed length. When the first shard of the overall sliding window receives confirmation from the destination node, the overall sliding window is moved back by one shard. The second shard behind the first shard becomes the starting shard of the overall sliding window and becomes the object to be observed whether it has received confirmation from the destination node. When the overall sliding window is moved back by one shard, a new shard can be allocated to one of the multiple paths. The length of the overall sliding window remains fixed, which means that the number of shards that are assigned to the path to be sent but have not received confirmation is kept relatively fixed, so as to avoid too many shards being sent to the destination node and bursting the cache of the destination node. The path sliding window is also maintained on each path. The shards of the overall sliding window are actually the union of the shards of each path sliding window. Each path sliding window is similar to the overall sliding window. When the first shard receives confirmation from the destination node, the path sliding window is moved back by one shard. The second fragment following the first fragment now becomes the starting fragment of the path sliding window and becomes the object to be observed whether the confirmation of the destination node is received.
[0162] In this technology, if some paths fail, resulting in the loss of a certain fragment on the path, the fragment cannot receive confirmation from the destination node. At this time, whether it is the overall sliding window or the path sliding window, when the fragment is at the starting position of the sliding window and becomes the object to be observed whether it has received confirmation, since no confirmation is received, the overall sliding window and the path sliding window will no longer slide backward, causing not only the transmission of the path to stagnate, but also the connection transmission of the entire transaction layer (multiple paths form a connection) to stagnate, and the continuity of data transmission is destroyed.
[0163] Based on this, the embodiments of the present disclosure provide a method for sending and receiving messages, related devices and media, which ensure that when a path fails, packet loss on the path will not affect the transmission of this path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0164] System architecture and scenario description of the application of the embodiments of the present disclosure
[0165] Figure 1A and Figure 1B The system architecture diagram of the message sending and receiving method according to the embodiment of the present disclosure includes: an object terminal 110, the Internet 120, a gateway 130, and a server 140.
[0166] The object terminal 110 is a device used by the object to send or receive messages corresponding to the target message. It includes desktop computers, laptop computers, PDAs (personal digital assistants), mobile phones, vehicle-mounted terminals, home theater terminals, dedicated terminals, and other forms. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network and share a display device to work together, forming a terminal. The object terminal 110 can also communicate with the Internet 120 in a wired or wireless manner to exchange data.
[0167] The gateway 130 is also called an internetwork connector or a protocol converter. The gateway 130 realizes network interconnection at the transport layer and is a computer system or device that acts as a converter. The gateway 130 is a translator between two systems that use different communication protocols, data formats or languages, or even have completely different architectures. At the same time, the gateway 130 can also provide filtering and security functions. The message sent by the object terminal 110 to the message sending processor 140 is sent to the corresponding message sending processor 140 through the gateway 130. The message sent by the message sending processor 140 to the object terminal 110 is also sent to the corresponding object terminal 110 through the gateway 130.
[0168] The server 140 refers to a computer system that can provide message sending services or message receiving services. Compared with the object terminal 110, the message sending processor 140 has higher requirements in terms of stability, security, performance, etc. The message sending processor 140 can be a high-performance computer in the network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. In addition, the server 140 includes a message sending server and a message receiving server. The message sending server and the message receiving server can communicate with the Internet of Things 120 in a wired or wireless manner to exchange data, thereby realizing communication between the message sending server and the message receiving server.
[0169] Figure 2A It is a schematic diagram of the software form of the server applied by the message sending and receiving method according to the embodiment of the present disclosure. Figure 2BIt is a schematic diagram of the hardware form of the server applied by the message sending and receiving method according to the embodiment of the present disclosure. The message sending and receiving method provided by the embodiment of the present disclosure is mainly used in the transport layer. As the underlying transmission technology, the embodiment of the present disclosure can provide data transmission services for upper-layer applications through a unified transmission interface. For example, through the traditional socket interface, it can provide applications with transmission similar to the Transmission Control Protocol (TCP), and can also provide high-performance remote direct data access (RDMA) with high throughput and low latency network transmission through the IB Verbs interface. Figure 2A As shown, the embodiment of the present disclosure can be implemented as a software process of the server 120, using a standard network card to send and receive data packets. Figure 2B As shown, the embodiment of the present disclosure can be implemented as a hardware process of the server 120, namely, the transmission core of the smart network card, to improve the throughput and delay performance.
[0170] In addition, refer to Figure 2A and Figure 2B The message sending and receiving method provided in the embodiments of the present disclosure can provide data transmission services for artificial intelligence (AI) training, cloud storage, virtual cloud network (VPC), remote dictionary service (Remote Dictionary Server, Redis) database, etc.
[0171] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 3A and Figure 3B Batch file transfer as shown, Figure 3C Large memory file transfers shown, Figure 3D The shared connection scenario shown, etc.
[0172] Figure 3A and Figure 3B 2 is a schematic diagram of an interface in which the message sending and receiving method provided in the embodiment of the present disclosure is applied in the XX application. Object A and object B send messages and transfer files through the XX application. Figure 3A , object A sends files in batches to object B. The multiple files sent are file A, file B, and file C. The interface diagram of object B in XX application is as follows: Figure 3B As shown, the order of files received by file B is file B, file A and file C. The message sending and receiving method provided by the embodiment of the present disclosure is applicable to scenarios where order-preserving delivery is not required, such as batch file transmission.
[0173] Figure 3C This is a schematic diagram of large memory file transmission based on the message sending and receiving method provided by the embodiment of the present disclosure. Figure 3C In the embodiment, the application message is a large memory file that needs to be transmitted from the source node to the destination node. The source node divides the application message with a large memory into multiple smaller messages for transmission. The related technology requires that message A, message B, message C and message D be transmitted to the destination node in sequence, and the transmission speed is slow. However, before the destination node in the embodiment of the present disclosure forwards the complete application message, the received messages A, message B, message C and message D can be out of order, and the transmission speed is faster. The message sending and receiving method provided in the embodiment of the present disclosure is suitable for scenarios where order-preserving delivery is not required, such as large memory file transmission.
[0174] Figure 3D Schematic diagram of the method for sending and receiving a message provided by an embodiment of the present disclosure applied in a shared connection scenario. In a shared connection scenario, multiple applications between a source node and a destination node will reuse a connection to transmit data, such as Figure 3D As shown, application 1, application 2, application 3, application 4 and application 5 all share the same connection, where application 1 and application 3 send messages to application 4 through the connection, and application 2 sends messages to application 5 through the connection. In a shared connection scenario, there is no need to guarantee the order in which all messages are completed, that is, the order in which the destination node forwards the received messages to the applications. It is only necessary to ensure that when delivering messages to the same application, these messages are in order. For example, message 1 and message 3 need to be delivered to application 4, and message 1 is sent first. Therefore, message 3 can only be delivered to application 4 after message 1 is delivered. The only message delivered to application 5 is message 2, so the destination node can immediately forward message 2 to application 5 after receiving message 2.
[0175] It should be understood that the above content only illustrates some application scenarios of the present disclosure. The business scenarios to which the present disclosure can be applied may include but are not limited to the specific embodiments listed above.
[0176] General description of the disclosed embodiments
[0177] It should be emphasized that the embodiments of the present disclosure can be applied to a variety of application scenarios, such as batch file transfer, large memory file transfer, contribution connection and other scenarios. In the case of a path failure, not only the transmission of the path will be stagnant, but the connection transmission of the entire transaction layer will also be stagnant, and the continuity of data transmission will be destroyed. Some embodiments of the present disclosure provide a message sending and receiving method, related devices and media, which ensure that when a path fails, packet loss on the path will not affect the transmission of the path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0178] The message sending and receiving method is a process of transmitting a target message between a source node and a target node, wherein the message sending method is a process in which the source node sends a target message to the destination node, and the message receiving method is a process in which the destination node receives the target message from the source node. The message sending and receiving method ensures that when a path fails, packet loss on the path will not affect the transmission of the path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0179] The message sending and receiving method of the embodiment of the present disclosure is executed on the server 140 of the source node and the destination node. The server 140 of the source node transmits the message from the object terminal 110 to the server 140 of the destination node. After the transmission is completed, the destination node transmits the received message to the object terminal 110 through the gateway 130 and the Internet 120, and the object terminal 110 displays the information corresponding to the message to the target object.
[0180] like Figure 4 As shown, according to an embodiment of the present disclosure, the message sending method is executed by a source node, and the message sending method includes:
[0181] Step 410: split the target message into multiple message fragments, and distribute them to multiple paths leading to the destination node for transmission;
[0182] Step 420: Obtain the number of unconfirmed fragments, where the number of unconfirmed fragments is the number of message fragments that have not received confirmation messages from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to multiple paths for transmission;
[0183] Step 430: In response to the number of unconfirmed fragments being less than a preset first count, additionally allocating message fragments to multiple paths until the number of unconfirmed fragments reaches the first count;
[0184] Step 440: for each path in the plurality of paths, arrange the message fragments sent on the path into a first queue according to the path fragment sequence number, and maintain a first sliding window on the first queue, where the first sliding window indicates a first number of message fragments for which confirmation messages from the destination node have not been received;
[0185] Step 450: Once a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and a path fragment sequence number is reallocated to the message fragment before the first message fragment for which no confirmation message has been received, and the path fragment sequence number is connected to the message fragment after the first message fragment for which no confirmation message has been received;
[0186] Step 460: Retransmit the message fragments before the first message fragment for which no confirmation message has been received.
[0187] Steps 410 to 460 are described in detail below.
[0188] In step 410, the target message is split into multiple message fragments, which are distributed to multiple paths leading to the destination node for transmission.
[0189] The source node corresponds to the destination node. A connection is set between the source node and the destination node, and the message transmission mode between the source node and the destination node is multi-path transmission, which can make full use of the transmission capacity of different paths, avoid delays caused by network congestion, and improve communication real-time performance.
[0190] The source node is the sending node of the target message, and the destination node is the receiving node of the target message. The target message refers to the message that needs to be transmitted from the source node to the destination node.
[0191] Message fragmentation is the result of fragmenting the target message. The target message is usually long. In order to ensure that the target message can be sent smoothly from the source node to the destination node, the target message needs to be split into smaller fragments, namely message fragmentation. Figure 2A As shown, the source node splits message 1 into message fragment g, message fragment h, message fragment h and message fragment j.
[0192] It should be noted that the length of the message fragment does not exceed the maximum transmission unit (MTU) of the path. In order to increase the transmission rate, the target message is usually split into multiple message fragments of the same size as the MTU.
[0193] After the target message is split, the multiple message fragments obtained by the split are distributed to multiple paths, so as to send the message fragments to the destination node through the multiple paths. Fig. 6A , for multiple message fragments corresponding to message 1, message fragments g and h have been transmitted, while message fragment i is allocated to path 0 for sending, and message fragment j is allocated to path 1 for sending.
[0194] Reference Figure 7 The source node of the embodiment of the present disclosure is provided with a transaction layer and a reliable transport layer, and the reliable transport layer is provided with multiple paths. The embodiment of the present disclosure splits the target message into multiple message fragments through the transaction layer, and distributes the multiple message fragments to multiple paths, so as to send the message fragments to the destination node through the multiple paths.
[0195] In step 420, the number of unconfirmed fragments is obtained, where the number of unconfirmed fragments is the number of message fragments that have not received confirmation messages from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to multiple paths for transmission.
[0196] The confirmation message corresponds to the message fragment, and the confirmation message is used to indicate that the destination node has correctly received the message fragment corresponding to the confirmation message. Fig. 8A and Figure 8B After the source node sends the message fragments to the destination node through multiple paths, the destination node processes the received message fragments to send confirmation messages corresponding to the message fragments to the source node.
[0197] The number of unconfirmed fragments is the number of message fragments for which the source node has not received confirmation messages from the destination node. The number of unconfirmed fragments corresponding to the number of unconfirmed fragments has been allocated to multiple paths for transmission.
[0198] In step 430, in response to the number of unconfirmed fragments being less than a preset first count, additional message fragments are allocated to multiple paths until the number of unconfirmed fragments reaches the first count.
[0199] The first count is set corresponding to the number of unconfirmed fragments. If the number of unconfirmed fragments is less than the first count, there is a path that can send new message fragments. Therefore, it is necessary to allocate additional message fragments to multiple paths. In addition, when adding message fragments to multiple paths, the source node has not sent the message fragments to the destination node, so the source node will not receive confirmation information corresponding to the additional message fragments. Therefore, the number of unconfirmed fragments increases until the number of unconfirmed fragments reaches the first count. It can be seen that the value range of the number of unconfirmed fragments is 0 to the first count.
[0200] In one embodiment, assuming that the first count is set to 12, for Figure 2A For the source node shown, the current value of the number of unconfirmed fragments is 12. If a confirmation message for message fragment i is received, the number of unconfirmed fragments is updated to 11. Then message u can be additionally allocated to path 0, and the value of the number of unconfirmed fragments reaches the first count 12 again.
[0201] It should be noted that the setting of the number of unconfirmed fragments limits the number of message fragments sent to the destination node by multiple paths, which can prevent the cache of the destination node from being blown up and improve the security of transmission. In addition, by setting the number of unconfirmed fragments at the transaction layer of the source node without setting the overall sliding window, the effect of determining the number of fragments sent by the additional path according to the number of fragments that have received confirmation messages can still be achieved. At the same time, since the overall sliding window is not set, the fragments lost due to path failure will not occupy the starting position of the overall sliding window. Therefore, the overall sliding window will not be unable to slide backwards and the entire connection will not be stalled.
[0202] In step 440, for each path in the multiple paths, the message fragments sent on the path are arranged into a first queue according to the path fragment sequence number, and a first sliding window is maintained on the first queue, the first sliding window indicating a first number of message fragments for which confirmation messages from the destination node have not yet been received.
[0203] The path fragment number is the result of the path numbering the message fragments that need to be transmitted. The path fragment number corresponds to the path, so different paths may have the same path fragment number. Fig. 6A , on path 0, the path fragment number of message fragment i is 3, the path fragment number of message fragment m is 4, and the path fragment number of message fragment q is 5. On path 1, the path fragment number of message fragment j is 4, the path fragment number of message fragment n is 5, and the path fragment number of message fragment r is 5.
[0204] The path fragment sequence number can be specifically numbered according to the order of each message fragment received by the path. For example, refer to Fig. 6A , Path 0 receives message fragment i, message fragment m, and message fragment q in sequence, and path fragment number 2 has been assigned to path 0. Afterwards, the received message fragments are numbered from path fragment number 3, so the path fragment number of message fragment i is 3, the path fragment number of message fragment m is 4, and the path fragment number of message fragment q is 5.
[0205] The first queue refers to the queue determined by arranging multiple message fragments according to the path fragment sequence number. The first queue corresponds to the path, and each path is set with a first queue. For each path, the first queue refers to the result of arranging multiple message fragments according to the path fragment sequence number from small to large. For example, refer to Fig. 6A , the first queue on path 0 is [packet fragment i, packet fragment m, packet fragment q].
[0206] The first sliding window is used to indicate the first number of message fragments for which the path corresponding to the first sliding window has not received the confirmation message of the destination node. The first number of message fragments in the first sliding window are message fragments that have been sent but not received by the path. The first number refers to the size of the first sliding window. Fig. 6A The first number corresponding to the first sliding window of multiple paths in is 3, and for Figure 6B The first sliding window in , the first number is 12.
[0207] It should be noted that the first sliding window limits the number of message fragments sent to the destination node along the path corresponding to the first sliding window, which can burst the cache of the destination node and improve the security of transmission.
[0208] In step 450, once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0209] The first sliding window includes a first number of message fragments, and the position of the first message fragment in the first sliding window can be considered as the first message fragment of the first number of message fragments. Figure 6B In the upper part, the path fragment sequence number of the message fragment located at the starting position of the first sliding window is 2, and the path fragment sequence number of the message fragment located at the second position of the first sliding window is 3.
[0210] The network between the source node and the destination node is sequence-preserving by default. If the confirmation message received on the path is located at a non-starting position of the first sliding window, it can be considered that one or more message fragments before the first message fragment corresponding to the confirmation message in the first sliding window are lost. Therefore, it is necessary to update the starting position of the first sliding window with the next message fragment position of the first message fragment to ensure that the first sliding window can slide normally, and the message fragments before the first message fragment for which the confirmation message has not been received are reallocated with the path fragment sequence number, and connected to the message fragment after the first message fragment for which the confirmation message has not been received, so as to reduce the occurrence of message fragment loss.
[0211] Reference Figure 6B, the path fragment number of the message fragment at the starting position of the first sliding window on the current path is 2, and the path fragment number of the last message fragment is 13. If the path fragment number of the message fragment corresponding to the confirmation message received on the path is 5, then it is necessary to move the starting position of the first sliding window to the message fragment with the path fragment number 6, and reallocate the path fragment numbers to the message fragments with the path fragment numbers 2 to 4, and continue to the message fragment with the path fragment number 13, that is, the path fragment number 14 is consistent with the message fragment corresponding to the path fragment number 2, the path fragment number 15 is consistent with the message fragment corresponding to the path fragment number 3, and the path fragment number 16 is consistent with the message fragment corresponding to the path fragment number 4.
[0212] It should be noted that, since the starting position of the first sliding window is updated to the next message fragment of the first message fragment, the path messages to which the path fragment numbers are reallocated are all located in the updated first sliding window.
[0213] In step 460, the message fragments before the first message fragment for which no confirmation message has been received are retransmitted.
[0214] After the first sliding window is updated, the newly added message fragments in the first sliding window are sent. Since the message before the first message fragment for which no confirmation message has been received is connected to the message fragment after the first message fragment for which no confirmation message has been received, the message with the reallocated path fragment sequence number is sent to the destination node, that is, the message fragment before the first message fragment for which no confirmation message has been received is retransmitted to ensure that multiple message fragments corresponding to the target message can be correctly sent to the destination node.
[0215] Reference Figure 6B , the path fragment number of the first message fragment that receives the confirmation message is 5, then the path fragment numbers corresponding to the multiple message fragments before the first message fragment that have not received the confirmation message are 2, 3, and 4, and the path fragment numbers of these message fragments are reallocated to 14, 15, and 16. Figure 6B In the first sliding window in the lower half, the message fragments with path fragment numbers 14, 15, 16 and 17 need to be sent to the destination node, that is, the message fragments with path fragment numbers 14, 15, 16 are retransmitted, and the message fragment number 17 is sent for the first time.
[0216] Figure 5A and Figure 5BIt is a schematic diagram of the message sending and receiving method in the related art. Assuming that a roadblock occurs on path 0 of the source node, the confirmation message corresponding to message fragment i, message fragment m and message fragment q cannot be received. Since both the path sliding window and the overall sliding window can only move backward after receiving the confirmation message of the first message fragment, when path 0 fails, the overall sliding window and the path sliding window will no longer slide backward, causing not only the transmission of path 0 to stagnate, but also the connection transmission of the entire transaction layer to stagnate, and the continuity of data transmission is destroyed.
[0217] Figure 6B The sliding diagram of the first sliding window of the embodiment of the present disclosure. If a confirmation message is received for the first message fragment located at a non-starting position of the first sliding window, in order to prevent these message fragments from staying at the starting position of the first sliding window and preventing the first sliding window from continuing to slide backward, the embodiment of the present disclosure forces the first sliding window to slide, changes the starting position of the first sliding window to the next message fragment position of the first message fragment, and reallocates the path fragment sequence number to the message fragments before the first message fragment for which the confirmation message has not been received, and connects them to the back of the message fragments after the first message fragment for which the confirmation message has not been received, for retransmission. If Fig. 6A If a roadblock occurs on path 0 of the source node in the transmission path, the confirmation message corresponding to message fragment i, message fragment m and message fragment q cannot be received. However, unlike the related art, the first sliding window in the embodiment of the present disclosure will not stagnate, and the setting of the number of unconfirmed fragments does not cause the entire connection to fall into a stagnation state. The transmission diagram of multiple messages is shown in FIG. Figure 6C It can be clearly seen that even if the confirmation messages corresponding to message fragments i, m and q are not received, the subsequent message fragments u, v and so on can be sent to the destination node normally.
[0218] Reference Fig. 8A and Figure 8B, the transaction layer of the source node splits the target message into multiple message fragments and distributes them to multiple paths to send to the destination node. The destination node processes the received message fragments to generate confirmation messages corresponding to the message fragments. The confirmation message is used to indicate that the destination node has correctly received the message fragments. In addition, on each path of the reliable transport layer, the message fragments sent by the path are arranged according to the path fragment sequence number to obtain a first queue, and a first sliding window is maintained on the first queue. The first sliding window is used to indicate the first number of message fragments for which the confirmation message of the destination node has not yet been received. The source node forwards the received confirmation message to the corresponding path and determines the position of the corresponding first message fragment. If the first message fragment corresponding to the confirmation message is located at a non-starting position of the first sliding window, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment to control the forced sliding of the first sliding window. Afterwards, path numbers are reallocated to the message fragments before the first message fragment for which no confirmation message has been received, and the update positions of one or more message fragments to which the path fragment numbers are reallocated are located behind the message fragments after the first message fragment for which no confirmation message has been received, so as to facilitate the retransmission of these message fragments.
[0219] In the above-mentioned embodiment of steps 410 to 460, the transaction layer of the source node does not maintain the overall sliding window, but only obtains the number of unconfirmed fragments. The number of confirmed fragments is the number of message fragments that have not received the confirmation message of the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to multiple paths for transmission. The number of unconfirmed fragments is initially the first count. When a confirmation message of the destination node is received, the number of unconfirmed fragments is reduced by 1. At this time, the number of unconfirmed fragments is less than the first count, and message fragments are additionally allocated to multiple paths until the number of unconfirmed fragments reaches the first count. Therefore, by obtaining the number of unconfirmed fragments at the transaction layer of the source node without setting the overall sliding window, the effect of determining the number of fragments sent by the additional path according to the number of fragments that have received the confirmation message can still be achieved. At the same time, if the confirmation message corresponding to the starting position of the overall sliding window is not received, the overall sliding window will not slide backward, thereby affecting the transmission of subsequent message fragments. However, the embodiment of the present disclosure does not set up an overall sliding window, so the fragments lost due to the path failure will not occupy the starting position of the overall sliding window, and therefore, the overall sliding window will not be unable to slide backward and the entire connection will not be stalled. On the path side of the embodiment of the present disclosure, a first sliding window is set. In normal transmission, a confirmation message for the first message fragment located at the starting position of the first sliding window should be received first. However, if a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received, since the default network is sequence-preserving transmission, it can be considered that one or more message fragments before the first message fragment in the first sliding window are lost, so the confirmation message is not received. In order to prevent these message fragments from staying at the starting position of the first sliding window and hindering the first sliding window from continuing to slide backward, the embodiment of the present disclosure forces the first sliding window to slide, and changes the starting position of the first sliding window to the next message fragment position of the first message fragment, so that the sliding window will not stop sliding and the path transmission will not stagnate. However, these message fragments have not received confirmation messages, so these message fragments are reassigned path fragment sequence numbers and are sent again after the message fragments that have not received confirmation messages after the first message fragment. In this way, when a path fails, packet loss on the path will not affect the transmission of this path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission.
[0220] The above is a general description of step 410 to step 460. Since step 420 to step 40 have been described in sufficient detail above, only the specific implementation process of step 410, step 450 and step 460 will be described in detail below.
[0221] Detailed description of step 410
[0222] In step 410, the target message fragment is split into multiple message fragments, which are distributed to multiple paths leading to the destination node for transmission.
[0223] In one embodiment, referring to Fig. 9 , step 410 includes:
[0224] Step 910: split the target message into multiple message fragments, and assign a connection fragment sequence number to each message fragment;
[0225] Step 920: distribute the message fragments to the paths;
[0226] Step 930: assign path fragment numbers to message fragments according to the paths, and store the mapping relationship between the path fragment numbers and the connection fragment numbers in a first mapping table;
[0227] Step 940: Send the message fragment based on the path fragment sequence number.
[0228] Steps 910 to 940 are described in detail below.
[0229] In step 910, the target message is split into multiple message fragments, and a connection fragment sequence number is assigned to each message fragment.
[0230] The connection fragment sequence number refers to the sequence number of the target message at the transaction layer, which is also the result of the transaction layer numbering multiple message fragments. Based on the connection fragment sequence number, the position of the message fragment at the transaction layer can be determined. Fig. 6A , g, h, i, j can be regarded as the connection fragment sequence numbers of multiple message fragments corresponding to message 1.
[0231] In step 920, the message fragments are distributed to the paths.
[0232] Distribute message fragments to multiple paths to send the message fragments to the destination node through multiple paths. Fig. 6A For multiple message fragments of message 2, message fragment k is allocated to path 0, message fragment l is allocated to path 1, message fragment m is allocated to path 2, and message fragment n is allocated to path 3.
[0233] In step 930, path fragment numbers are allocated to message fragments through paths, and a mapping relationship between the path fragment numbers and the connection fragment numbers is stored in a first mapping table.
[0234] The first mapping table is a storage table of the mapping relationship between the path fragment sequence number and the connection fragment sequence number. The first mapping table is set corresponding to the path, and a corresponding first mapping table is set on each path. Based on the path fragment sequence number, the connection fragment sequence number corresponding to the path fragment sequence number can be obtained by searching in the first mapping table.
[0235] Fig.10 for Fig. 6ASchematic diagram of the first mapping table of each path in . In the first mapping table of path 0, path fragment sequence number 3 corresponds to continuous fragment sequence number i, path fragment sequence number 4 corresponds to continuous fragment sequence number m, and path fragment sequence number 5 corresponds to continuous fragment sequence number q. In the first mapping table of path 1, path fragment sequence number 3 corresponds to continuous fragment sequence number j, path fragment sequence number 4 corresponds to continuous fragment sequence number n, and path fragment sequence number 5 corresponds to continuous fragment sequence number r. In the first mapping table of path 2, path fragment sequence number 3 corresponds to continuous fragment sequence number k, path fragment sequence number 4 corresponds to continuous fragment sequence number o, and path fragment sequence number 5 corresponds to continuous fragment sequence number s. In the first mapping table of path 3, path fragment sequence number 3 corresponds to continuous fragment sequence number l, path fragment sequence number 4 corresponds to continuous fragment sequence number p, and path fragment sequence number 5 corresponds to continuous fragment sequence number t.
[0236] In step 940, the message fragments are sent based on the path fragment sequence number.
[0237] Based on the path fragment sequence number, the message fragments are sent to the destination node in sequence. Fig. 6A Path 0 in the example sends message fragment i, message fragment m, and message fragment q to the destination node in the order of the path fragment numbers.
[0238] It should be noted that the message fragment includes a destination node identifier, and based on the destination node identifier, the path can send the message fragment to the corresponding destination node.
[0239] Reference Figure 8B The source node of the embodiment of the present disclosure allocates connection fragment sequence numbers to multiple message fragments of the target message at the transaction layer, and stores the mapping relationship between the path fragment sequence number and the connection fragment sequence number through the first mapping table at the reliable transport layer.
[0240] It should be noted that, for the message fragments to which the path fragment numbers are reallocated, the mapping relationship between the reallocated path fragment numbers and the connection fragment numbers also needs to be stored in the first mapping table.
[0241] The embodiments of the above steps 910 to 940 split the target message into message fragments at the transaction layer, and assign a connection fragment sequence number to each message fragment. At the reliable transport layer, path sequence numbers are assigned to message fragments through paths, and a first mapping table is established based on the mapping relationship between the path fragment sequence numbers and the connection fragment sequence numbers of the message fragments. The embodiment of the present disclosure stores the mapping relationship between the path fragment sequence numbers and the connection fragment sequence numbers through the first mapping table, so that the position of the message fragments at the transaction layer can be determined based on the first mapping table and the path fragment sequence numbers, which facilitates the transmission of message fragments and their corresponding confirmation messages between the transaction layer and the path, thereby improving the accuracy of message sending and receiving.
[0242] The above is a general description of step 910 to step 940. Since step 930 has been described in sufficient detail above, only the specific implementation process of step 910, step 920 and step 940 will be described in detail below.
[0243] In step 910, the target message is split into multiple message fragments, and a connection fragment sequence number is assigned to each message fragment.
[0244] In one embodiment, referring to Fig.11 , step 910 includes:
[0245] Step 1110: Read the application message operation instruction of the source application from the target message;
[0246] Step 1120: convert the application message operation instruction into a transaction layer operation instruction;
[0247] Step 1130: split the target message into message fragments, and add the transaction layer operation instructions to the message fragments.
[0248] Steps 1110 to 1130 are described in detail below.
[0249] In step 1110, the application message operation instruction of the source application is read from the target message.
[0250] Source applications refer to applications that have established communication connections with source nodes, such as Figure 3D Application 1, Application 2, and Application 3 are all source applications.
[0251] Application message operation instructions refer to the operation instructions of the source application carried in the target message. Application message operation instructions support multiple different semantics, such as send operation, read operation, write operation, etc.
[0252] In step 1120, the application message operation instruction is converted into a transaction layer operation instruction.
[0253] The transaction layer operation instruction refers to an operation instruction corresponding to the application message operation instruction and supported by the transaction layer of the source node. In order to improve the applicability of the message sending and receiving method, the embodiment of the present disclosure provides a variety of semantic interfaces for the upper layer application, that is, the source application. However, in order to send and receive messages simply and efficiently, the source node of the embodiment of the present disclosure only supports partial semantics in the semantics of the transaction layer. Therefore, it is necessary to convert the application message operation instruction into a transaction layer operation instruction.
[0254] In one embodiment, the source node and the destination node only support sending and writing in the basic semantics of the transaction layer. Therefore, the embodiment of the present disclosure needs to convert the application message operation instructions of other semantics into transaction layer operation instructions of the two basic semantics of sending and writing in the transaction layer. Fig.12 , the application message operation instruction of the source application is a read operation, and then, the application message operation instruction is converted into two transaction layer operation instructions, which are a send operation and a write operation. Specifically, the source node first uses the send operation instruction to send the memory receiving address of the source node to the destination node, so that the destination node initiates a write operation.
[0255] In step 1130, the target message is split into message fragments, and the transaction layer operation instructions are added to the message fragments.
[0256] The transaction layer operation instructions are added to the message fragments, and the message fragments are sent to the destination node through multiple paths, so that the destination node and the source node cooperate to execute the application message operation instructions. Fig.12 The transaction layer operation instructions are sending operation instructions and writing operation instructions. The transaction layer operation instructions are added to the message fragment. First, the message fragment is reported to the destination node through the sending operation instruction to send the memory receiving address of the source node to the destination node. After the destination node receives the complete message fragment, the destination node executes the write operation instruction, which specifically needs to be written to the memory receiving address of the source node.
[0257] The source node of the above-mentioned embodiment of steps 1110 to 1130 provides multiple semantic interfaces for upper-layer applications, so the application message operation instructions of the source application read by the source node from the target message can be other semantics, and are not limited to the semantic restrictions of the transaction layer, thereby improving the scope of application of the message sending and receiving method. In addition, the embodiment of the present disclosure converts the application message operation instructions into transaction layer operation instructions so that the operations corresponding to the application message operation instructions are executed normally, and the transaction layer operation instructions only support basic semantics, which can simply and efficiently send and receive messages.
[0258] In step 920, the message fragments are distributed to the paths.
[0259] In one embodiment, referring to Fig.13 , step 920 includes:
[0260] Step 1310: Obtain the number of fragments allowed to be sent for each path;
[0261] Step 1320: sort the multiple paths based on the number of fragments allowed to be sent;
[0262] Step 1330: sort the paths, sequentially extract the paths, and allocate message fragments to the extracted paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to be transmitted at a single time for the extracted paths.
[0263] Steps 1310 to 1330 are described in detail below.
[0264] In step 1310, the number of fragments allowed to be sent on each path is obtained.
[0265] The number of fragments allowed to be sent refers to the number of message fragments that the path can send. Fig. 6A For the source node in , if it receives the confirmation message of message fragment i, then the number of fragments allowed to be sent on path 0 is 1; if it receives the confirmation messages of message fragment i and message fragment m, then the number of fragments allowed to be sent on path 0 is 2.
[0266] In step 1320, the multiple paths are sorted based on the number of fragments allowed to be sent.
[0267] Based on the number of fragments allowed to be sent by each path, multiple paths are sorted so that the multiple paths are sorted in ascending order of the number of fragments allowed to be sent. If the number of fragments allowed to be sent by multiple paths is the same, the multiple paths can be sorted arbitrarily.
[0268] It should be noted that the multiple paths may also be arranged in descending order of the number of fragments allowed to be sent.
[0269] In step 1330, the paths are sorted and sequentially extracted, and message fragments are allocated to the extracted paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited for a single transmission of the extracted paths.
[0270] The single transmission limit fragment number is the number of message fragments that the transaction layer limits each transmission to the path. The single transmission limit fragment number corresponds to the path, and the single transmission limit fragment number of multiple paths can be set as needed, but in order to ensure the efficiency of multi-path transmission, the single transmission limit fragment number of multiple paths is usually equal.
[0271] According to the path sorting, the paths are sequentially taken out, that is, the path with the largest number of fragments allowed to be sent at the current moment is taken out. For this path, the minimum value between the number of fragments allowed to be sent and the number of fragments limited for a single transmission is determined, and the minimum number of message fragments is allocated to the path.
[0272] It should be noted that the number of fragments limited for a single transmission may be less than the number of fragments allowed to be sent. In this case, after allocating message fragments to the retrieved path, the path can still send messages. At this time, it is necessary to re-acquire the number of fragments allowed to be sent for multiple paths and re-sort the multiple paths to perform a new round of message fragment allocation.
[0273] Reference Fig.14A After the transaction layer of the source node splits the target message into message fragments, it needs to select a path to send the message fragments. That is, the transaction layer of the source node selects the path through path scheduling. Specifically, based on the number of fragments allowed to be sent, multiple paths are sorted and messages are allocated to multiple paths in order. Fig. 14B For each path, the number of message fragments allocated to it is the minimum value of its corresponding allowed number of fragments to be sent and the number of fragments limited to be transmitted at a single time.
[0274] The embodiments of steps 1310 to 1330 above determine the paths to which the message fragments are assigned based on the number of fragments allowed to be sent, and use the minimum value of the number of fragments allowed to be sent and the number of fragments limited for a single transmission as the number of message fragments assigned to the path. The embodiments of the present disclosure perform path scheduling by using the number of fragments allowed to be sent and the number of fragments limited for a single transmission to ensure that multiple paths can orderly send message fragments to the destination node, thereby ensuring orderly message sending.
[0275] The above is a general description of step 1310 to step 1330. Since step 1320 and step 1330 have been described in sufficient detail above, only the specific implementation process of step 1310 will be described in detail below.
[0276] In step 1310, the number of fragments allowed to be sent on each path is obtained.
[0277] In one embodiment, referring to Fig.15 , step 1310 includes:
[0278] Step 1510: Obtain a first number of message fragments in a first sliding window of a path;
[0279] Step 1520: Obtain the number of congestion control fragments of the path;
[0280] Step 1530: Determine the minimum value of the first number and the number of congestion control fragments as the number of fragments allowed to be sent.
[0281] Steps 1510 to 1530 are described in detail below.
[0282] In step 1510, a first number of message fragments in a first sliding window of a path is obtained.
[0283] The first number refers to the size of the first sliding window of the path, and is also the maximum number of message fragments that can be sent by the path. For example, Fig. 6A The first number corresponding to the first sliding window of multiple paths in is 3, and for Figure 6B The first sliding window in , the first number is 12.
[0284] In step 1520, the number of congestion control slices of the path is obtained.
[0285] The number of congestion control fragments refers to the number of message fragments that can be sent by the path, which can also be understood as the idle length of the first sliding window. The number of congestion control fragments of the path is less than or equal to the first number. When the path is not congested, the number of congestion control fragments is equal to the first number. For example, for Fig. 6A For path 0 in FIG, when there is no congestion, that is, when there is no message fragment to be sent, the number of congestion control fragments of path 0 is 3. When the first sliding window of path 0 has allocated message fragments i, m and q for sending and has received the confirmation message of message fragment i, the number of congestion control fragments of path 0 is 1.
[0286] In step 1530, the minimum value of the first number and the number of congestion control fragments is determined as the number of fragments allowed to be sent.
[0287] The number of fragments allowed to be sent is the minimum value of the first number of the path and the number of congestion control fragments. When there is no congestion, the number of fragments allowed to be sent is equal to the first number and equal to the number of congestion control fragments. In other cases, the number of fragments allowed to be sent for the path is the number of congestion control fragments.
[0288] Reference Fig. 14B First, the first number and the number of congestion control fragments of multiple paths of the reliable transport layer are obtained, and the minimum value of the first number and the number of congestion control fragments is used as the number of fragments allowed to be sent for each path. The multiple paths are sorted in descending order according to the number of fragments allowed to be sent. After that, the paths are taken out in order, and according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to a single transmission of the taken out paths, message fragments are allocated to the taken out paths.
[0289] The implementation framework of the above steps 1510 to 1530 determines the minimum value of the first number of paths and the number of congestion control fragments as the number of fragments allowed to be sent, so as to reduce the occurrence of path congestion, ensure that each path of the source node can send messages normally, and improve the efficiency of message sending.
[0290] In another embodiment, the source node has multiple source queuing areas corresponding to multiple source applications, referring to Fig.16 , step 920 includes:
[0291] Step 1610: Based on the source application to which the target message belongs, the message fragments are placed in the source queue area corresponding to the source application;
[0292] Step 1620: Determine the order of obtaining shards in each source queue area based on the service quality requirements of each source application;
[0293] Step 1630: Based on the fragment acquisition order, obtain the message fragments from each source queue area and distribute them to the path.
[0294] Steps 1610 to 1630 are described in detail below.
[0295] In step 1610, based on the source application to which the target message to which the split message fragments belong belongs, the message fragments are placed in the source queue area corresponding to the source application.
[0296] The source application refers to the application connected to the source node, and the source queue area corresponds to the source queue area. The multiple message fragments corresponding to the target message of the source application are placed in the corresponding source queue area. For example, if the source application includes application 1, application 2 and application 3, then there are also three source queue areas, and the three source queue areas correspond to application 1, application 2 and application 3 respectively, and the multiple message fragments corresponding to the target message of application 1 are placed in source queue area 1.
[0297] In step 1620, based on the quality of service requirements of each source application, the order of obtaining the fragments of each source queue area is determined.
[0298] The quality of service requirement refers to the quality of service that the source application needs to provide to the target. For example, Figure 3A and 3B The service quality requirement of the XX application shown refers to the quality requirement of file transmission between object A and object B, and the quality requirement includes file transmission speed, file transmission integrity, etc. Different source applications have different service quality requirements.
[0299] The fragment acquisition order refers to the order in which the message fragments in each source queue area are acquired. The fragment acquisition order of the source queue area is related to the service quality requirements of the source application. The higher the service quality of the source application, the higher the fragment acquisition order of the source queue area. For example, assuming that the source applications include application 1, application 2, and application 3, where the service quality requirement of application 1 is 75 points, the service quality requirement of application 2 is 88 points, and the service quality requirement of application 3 is 83 points, then the fragment acquisition order of each source queue area is source queue area 2 corresponding to source application 2, source queue area 3 corresponding to source application 3, and source queue area 1 corresponding to source application 1.
[0300] In step 1630, based on the fragment acquisition order, the message fragments are acquired from each source queue area and distributed to the path.
[0301] After determining the fragment acquisition sequence of each source queue area, based on the fragment acquisition sequence, message fragments are acquired from each source queue area and distributed to the path.
[0302] Reference Fig.14A, the source queue area corresponds to the source application one by one. Multiple message fragments of the target message corresponding to the same source application are placed in the same source queue area. Based on the service quality requirements of each source application, the fragment acquisition order of the message fragments in the source queue area corresponding to each source application is determined, and the message fragments are obtained from each source queue area according to the fragment acquisition order to be allocated to the path.
[0303] The embodiment of the above steps 1610 to 1630 sets up a source queue area, and the message fragments are placed in the source queue area corresponding to the source application to which the target message to which the message fragments belong belongs, and the fragment acquisition order of each source queue area is determined based on the service quality requirements of the source application, thereby meeting the needs of source applications with different service quality requirements and realizing hierarchical services for source applications.
[0304] In one embodiment, the source queue area can also place target messages. Based on the source application to which the target message belongs, the target message is placed in the source queue area corresponding to the source application. Then, based on the service quality requirements of each source application, the message acquisition order of each source queue area is determined, so that multiple target messages are taken out from each source queue area according to the message acquisition order. The message fragments corresponding to the multiple target messages are arranged according to the order in which the target messages are taken out, which can also meet the needs of source applications with different service quality requirements and realize hierarchical services for source applications.
[0305] In one embodiment, a target message of a source application is obtained. When the target message is smaller than a preset size, a target message is determined based on the target message. When the target message is larger than a preset size, the target message is split to obtain multiple target messages.
[0306] It should be noted that the preset size can be set as needed, and is usually determined based on an average value of the sizes of messages of multiple source applications, or a trimmed average value, etc.
[0307] It should be noted that splitting messages larger than a preset size can ensure fairness in message sending among multiple source applications and reduce the impact of a large message from a source application on small messages from other source applications.
[0308] In step 940, the message fragments are sent based on the path fragment sequence number.
[0309] In one embodiment, referring to Fig.17 , step 940 includes:
[0310] Step 1710: Obtain message fragments based on the path fragment sequence number;
[0311] Step 1720: Obtain the message identifier of the target message to which the message fragment belongs, and the fragment position of the message fragment in the target message;
[0312] Step 1730: Add the message identifier and fragmentation position to the message fragment and send it.
[0313] Steps 1710 to 1730 are described in detail below.
[0314] In step 1710, the message fragment is obtained based on the path fragment sequence number.
[0315] The path fragment sequence number corresponds to the message fragment. Based on the path fragment sequence number, the message fragment with the path fragment sequence number can be determined. For example, referring to Fig. 6A , in path 0, it is known that the path fragment number is 3, so get the message fragment m.
[0316] In step 1720, the message identifier of the target message to which the message fragment belongs and the fragment position of the message fragment in the target message are obtained.
[0317] The message identifier is the identifier of the message, which is used to distinguish the message. The message identifier corresponds to the target message. For example, refer to Fig. 6A , the message ID of the target message to which message fragment i belongs is 1, and the message ID of the target message to which message fragment k belongs is 2.
[0318] The fragmentation rank refers to the rank of a message fragment among the multiple fragments corresponding to the message fragmentation. Fig. 6A , the fragmentation position of message fragment i in message 1 is 3, and the fragmentation position of message fragment l in message 2 is 2.
[0319] In step 1730, the message identifier and the fragmentation rank are added to the message fragment and sent.
[0320] The message identifier and the fragmentation rank are added to the message fragmentation so that the message fragmentation sent to the destination node by the path includes the message identifier and the fragmentation corresponding to the message fragmentation. Then the destination node can determine whether the target message is received based on the message identifier and the fragmentation rank.
[0321] Fig.18 The schematic diagram of the data message format of the message fragmentation and confirmation message of the embodiment of the present disclosure. The message fragmentation includes a transaction layer (TL) header, and the TL header specifically includes a message identifier (Message ID) and a fragmentation position (Offset). Based on the message identifier, the message to which the message fragmentation belongs can be determined. Based on the fragmentation position, the position of the message fragmentation in the multiple fragments corresponding to the target message is determined.
[0322] The embodiment of the above steps 1710 to 1730 adds the message identifier of the target message to which the message fragment belongs, and the fragment position of the message fragment in the target message to the message fragment for sending. Then, the destination node can determine whether the target message has been received based on the message identifier and fragment position corresponding to the received target message, so as to ensure the integrity of the target message received by the destination node.
[0323] In one embodiment, referring to Figure 7 and Fig.14A , the node provided by the embodiment of the present disclosure includes a transaction layer and a reliable transport layer, and the transaction layer includes functions such as application management, message scheduling, semantic conversion, message delivery, flow control, and path scheduling, wherein application management means that the source node can receive messages from multiple source applications. Message scheduling is implemented through a pre-queue area, and the importance of multiple messages is determined according to the service quality requirements of the source application to which the message belongs, thereby determining the fragment acquisition order of multiple pre-queue areas. Semantic conversion means that the transaction layer can convert application message operation instructions into transaction layer operation instructions. Message delivery corresponds to the destination node, which means that the received message, that is, the target message, can be sent to the destination application. Flow control and path scheduling are determined by the number of unconfirmed fragments, the number of fragments allowed to be sent for each path, and the number of fragments limited for a single transmission. In addition, the reliable transport layer can allocate path fragment sequence numbers through the path, and maintain the first sliding window based on the allocated path fragment sequence numbers. The reliable transport layer implements congestion control by allowing the number of fragments to be sent, and the path between the source node and the destination node can achieve reliable transmission.
[0324] Detailed description of step 450
[0325] In step 450, once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0326] In one embodiment, referring to Fig.19 , step 450 comprises:
[0327] Step 1910: If a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field of the confirmation message indicates a non-aggregation confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the message fragment before the first message fragment for which the confirmation message has not been received is reallocated with a path fragment sequence number, and connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0328] Step 1920: If a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field indicates aggregation confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment.
[0329] Step 1910 and step 1920 are described in detail below.
[0330] In step 1910, if a confirmation message is received on the path for the first message fragment located at a non-starting position of the first sliding window, and the aggregation confirmation field of the confirmation message indicates a non-aggregate confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0331] The Aggregate Acknowledge field is used to indicate whether the acknowledgement message is an aggregate acknowledgement or a non-aggregate acknowledgement. When the Aggregate Acknowledge field is 1, the Aggregate Acknowledge field indicates an aggregate acknowledgement. When the Aggregate Acknowledge field is 0, the Aggregate Acknowledge field indicates a non-aggregate acknowledgement.
[0332] Non-aggregate confirmation means that the destination node receives the first message fragment corresponding to the confirmation message. On the path, the destination node does not receive any message fragment that has not received the confirmation message before the first message fragment. Therefore, after the first sliding window is updated, it is necessary to reallocate the path fragment sequence number for the message fragment that has not received the confirmation message before the first message fragment.
[0333] Reference Fig. 20A , the path receives a confirmation message for the message fragment with the path fragment number 5, and the aggregation confirmation field of the confirmation message indicates non-aggregation confirmation, then the destination node has not received the message fragments before message fragment 5 in the first sliding window, that is, the message fragments with path fragment numbers 2, 3, and 4. Therefore, the path fragment number of the message fragment at the starting position of the updated first sliding window is 6, and the message fragments 2, 3, and 4 for which the confirmation message has not been received are connected to after the message fragment 13, wherein the path fragment number of message fragment 2 is 14, the path fragment number of message fragment 3 is 15, and the path fragment number of message fragment 4 is 16.
[0334] It should be noted that, refer to Fig.18 The aggregation confirmation field is stored in the tag field (F l ags) of the fragment message, and the tag field is in the reliable transport layer (Reli ab le Transport, RT) header. In addition, the tag field can also carry other special tag information, such as the protocol version number, etc.
[0335] In step 1920, if a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field indicates aggregation confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment.
[0336] Aggregate confirmation means that the destination node receives the first message fragment corresponding to the confirmation message and multiple message fragments between the first message fragments. Therefore, if the aggregate confirmation field of the confirmation message of the first message fragment indicates aggregate confirmation, the target message is transmitted normally, and only the starting position of the first sliding window needs to be updated with the next message fragment position of the first message fragment, without reallocating the path fragment sequence number.
[0337] Reference Fig. 20B , assuming that the path receives a confirmation message with a path fragment number of 5, and the aggregate confirmation field of the confirmation message indicates an aggregate confirmation, then the destination node receives the message fragments before message fragment 5, that is, the message fragments with path fragment numbers of 2, 3, and 4. Therefore, the path fragment number of the message fragment at the starting position of the updated first sliding window is 6, and there is no need to reallocate the path fragment number.
[0338] The embodiment of the above step 1910 and step 1920 is provided with an aggregate confirmation field. When the aggregate confirmation field indicates non-aggregate confirmation, it is necessary not only to update the first sliding window, but also to reallocate the path fragment sequence number to the message fragment before the first message fragment that has not received the confirmation message. When the aggregate confirmation field indicates aggregate confirmation, the target message is transmitted normally, and only the first sliding window needs to be updated. The setting of the aggregate confirmation field enables the destination node to send only one confirmation message, which reduces the occupation of the confirmation message on the network, thereby enabling more efficient message sending and receiving.
[0339] In another embodiment, the message fragment also has a retransmission count field, see Fig.21 , step 450 comprises:
[0340] Step 2110: Once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received has not reached the upper limit of the retransmission count, the retransmission count field is increased by 1, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and the path fragment sequence number is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0341] Step 2120: Once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received reaches the upper limit of the retransmission count, the message fragment before the first message fragment for which the confirmation message has not been received is forwarded to other paths for sending, and the retransmission count field is reset to zero.
[0342] It should be noted that the retransmission count field records the number of retransmissions of the message fragments, that is, the number of times the source node retransmits the message fragments before the first message for which no confirmation message has been received.
[0343] Step 2110 and step 2120 are described in detail below.
[0344] In step 2110, once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received has not reached the upper limit of the retransmission count, the retransmission count field is increased by 1, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0345] The upper limit of retransmission times refers to the upper limit of the number of times the source node retransmits the message fragments before the first message fragment for which no confirmation message has been received. The upper limit of retransmission times can be set as needed, and the upper limits of retransmission times corresponding to different source nodes and destination nodes may also be different.
[0346] When the retransmission count field of the message fragment does not reach the retransmission count upper limit, the value of the retransmission count field is increased by 1, the first sliding window is updated, and the path fragment sequence number is reallocated for the message fragment before the first message fragment for which no confirmation message has been received.
[0347] In step 2120, once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received reaches the upper limit of the retransmission count, the message fragment before the first message fragment for which the confirmation message has not been received is forwarded to other paths for sending, and the retransmission count field is reset to zero.
[0348] If the retransmission count field of the message fragment before the first message fragment that has not received the confirmation message reaches the retransmission count limit, the current path fails to transmit the message fragment multiple times, and the path may be faulty. Therefore, it is necessary to deactivate the path, and forward the message fragment before the first message fragment that has not received the confirmation message to other paths for transmission, and reset the retransmission count field to zero.
[0349] It should be noted that the failed path forwards the successfully transmitted message fragments, that is, the message fragments before the first message fragment for which no confirmation message has been received, to the transaction layer, and the transaction layer reallocates them to other paths for sending.
[0350] It should be noted that before the transmission between the faulty path and the destination node returns to normal, the transaction layer will no longer allocate message fragments to the path.
[0351] Reference Fig. 6A On path 0, assuming that the upper limit of the number of retransmissions is 5, if the retransmission word number field of the message fragments with path fragment sequence numbers 3 and 4 reaches the upper limit of the number of retransmissions, then path 0 fails. The message fragments that have not received confirmation messages on path 0 can be forwarded to path 1, path 2 or path 3 for sending, and the retransmission number fields of message fragments 2 and 3 are reset to zero.
[0352] The embodiments of the above-mentioned steps 2110 and 2120 are provided with a retransmission count field. When the retransmission count field of the message fragment before the first message fragment for which no confirmation message has been received reaches the upper limit of the retransmission count, the message fragment before the first message fragment for which no confirmation message has been received is forwarded to other paths for sending, and the retransmission count field is reset to zero to ensure that the message fragment can be transmitted to the destination node, thereby ensuring the integrity of the message transmission.
[0353] Detailed description of step 460
[0354] In step 460, the message fragments before the first message fragment for which no confirmation message has been received are retransmitted.
[0355] In one embodiment, referring to Fig. 22 , step 460 includes:
[0356] Step 2210: Maintain a second sliding window on the first queue, the second sliding window indicating a range of candidate message fragments to be considered for retransmission, and the message fragment position set to the first value on the second sliding window corresponds to the message fragment determined to be retransmitted;
[0357] Step 2220: Set the position of the message fragment before the first message fragment and for which no confirmation message has been received in the second sliding window to the first value;
[0358] Step 2230: sequentially retransmit the message fragments at the message fragment positions set to the first value in the second sliding window, and each time a message fragment is retransmitted, locate the starting position of the second sliding window to the message fragment at the next message fragment position set to the first value.
[0359] Steps 2210 to 2230 are described in detail below.
[0360] In step 2210, a second sliding window is maintained on the first queue, the second sliding window indicates a range of candidate message fragments to be considered for retransmission, and the message fragment position set to the first value on the second sliding window corresponds to the message fragment determined to be retransmitted.
[0361] The second sliding window is used to indicate the candidate message fragment range to be considered for retransmission. Specifically, the message fragments within the second sliding window need to be judged whether they need to be retransmitted.
[0362] If the message fragment is located in the second sliding window and has the first value, it means that the message fragment needs to be retransmitted.
[0363] Reference Fig. 23B , within the second sliding window, the message fragments with path fragment numbers 2, 3, and 4 are the first value, so message fragment 2, message fragment 3, and message fragment 4 need to be retransmitted.
[0364] In step 2220, the position of the message fragment before the first message fragment and for which no confirmation message has been received in the second sliding window is set to the first value.
[0365] The message fragments before the first message fragment for which no confirmation message has been received need to be retransmitted, and therefore, the positions of these message fragments in the second sliding window are set to the first value.
[0366] Reference Figure 8B After receiving the confirmation message, a packet loss detection is performed to determine whether the message fragment before the first message fragment and before receiving the confirmation message is lost, and accordingly, the second sliding window is updated. Fig. 23B If the path fragment number of the first message fragment is 5, then the message fragments before path fragment 5 that have not received the confirmation message, that is, the message fragments with path fragment numbers 2, 3, and 4, have the first value in the second sliding window.
[0367] In step 2230, the message fragments at the message fragment positions set to the first value in the second sliding window are sequentially retransmitted, and each time a message fragment is retransmitted, the starting position of the second sliding window is positioned to the next message fragment at the message fragment position set to the first value.
[0368] After determining the message fragments that need to be retransmitted, the message fragments at the message fragment positions set to the first value in the second sliding window are sequentially retransmitted. In addition, each time a message fragment is retransmitted, the starting position of the second sliding window is updated to the message fragment at the message fragment position set to the first value next to the currently retransmitted message fragment.
[0369] It should be noted that, after retransmission of a plurality of message fragments currently set to the first value is completed, the starting position of the second sliding window is located based on the starting position of the first sliding window.
[0370] Fig. 23B is with Figure 6B Schematic diagram of the second sliding window corresponding to the first sliding window in FIG. After receiving the confirmation message of message fragment 5, the message fragments with path fragment sequence numbers 2, 3, and 4 in the first sliding window need to be retransmitted. Therefore, their positions in the second sliding window are set to the first value. Message fragment 2, message fragment 3, and message fragment 4 are retransmitted in sequence. After the retransmission is completed, there is currently no message fragment that needs to be retransmitted in the second sliding window. In addition, the starting position of the first sliding window is the message fragment with path fragment sequence number 6, so the starting position of the second sliding window is set to message fragment 6.
[0371] Reference Fig.23A The reliable transmission layer of the source node usually includes a first sliding window and a second sliding window, wherein the first sliding window is used to control the fragmentation of each message in the first queue on the path for transmission. The second sliding window is set corresponding to the first sliding window, and is used to control the retransmission of each message in the first queue.
[0372] The embodiment of the above steps 2210 to 2230 is provided with a second sliding window, and the message fragments are controlled to be retransmitted through the second sliding window, so as to accurately control the retransmission of the message fragments and ensure that each message fragment can be correctly sent to the destination node.
[0373] Steps 410 to 460 have been explained in detail above. Some specific points or derived contents involved therein will be described in detail below by topic. These topics include the normal sliding of the first sliding window on the first queue, the setting of the first bitmap, etc.
[0374] The first sliding window slides normally on the first queue
[0375] In one embodiment, referring to Fig.24 After step 440, the message sending method further includes:
[0376] Step 2410: Once a confirmation message for the second message fragment located at the starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the second message fragment.
[0377] It should be noted that if a confirmation message of the second message fragment located at the starting position of the first sliding window is received on the path, the second message fragment is transmitted to the destination node normally. Therefore, the starting position of the first sliding window is updated with the next message fragment position of the second message fragment.
[0378] Reference Fig.25 , the message fragment with path fragment sequence number 2 is located at the starting position of the first sliding window. If the confirmation message of message fragment 2 is received, the first sliding window is moved back one position, and then the path fragment sequence number of the message fragment at the starting position of the updated first sliding window is 3.
[0379] When the embodiment of the above-mentioned step 2410 receives a confirmation message for the second message fragment located at the starting position of the first sliding window on the path, the starting position of the first sliding window is updated with the next message fragment position of the second message fragment to control the first sliding window to slide normally on the first queue, thereby ensuring that the message fragment can be controlled to be sent normally to the destination node based on the first sliding window.
[0380] First bitmap settings
[0381] In the embodiment of steps 910 to 940 above, the target message is split into message fragments, and a connection fragment sequence number is assigned to each message fragment to distribute the message fragments to the path. Afterwards, the path fragment sequence number is assigned to the message fragment by the path, and the mapping relationship between the path fragment sequence number and the connection fragment sequence number is stored in the first mapping table to send the message fragment based on the path fragment sequence number.
[0382] In this case, in one embodiment, reference Fig.26 Before step 920, the message sending method further includes:
[0383] Step 2610: Set a first bitmap for the target message. The first bitmap stores the reception confirmation mark of each message fragment according to the order of the message fragments in the target message.
[0384] Corresponding to step 2610, after step 440, the message sending method further includes:
[0385] Step 2620: Receive a confirmation message of the message fragment from the destination node, where the confirmation message includes a path fragment sequence number of the message fragment;
[0386] Step 2630, forward the confirmation message to the path;
[0387] Step 2640: search the first mapping table through the path to obtain the connection fragment number corresponding to the path fragment number;
[0388] Step 2650: In the first bitmap, set the reception confirmation mark corresponding to the connection fragment sequence number to the first value;
[0389] Step 2660: If all reception confirmation marks of the target message in the first bitmap are the first value, a successful sending message of the target message is generated.
[0390] The following is a detailed description of an embodiment of step 2610 to step 2660.
[0391] In step 2610, a first bitmap is set for the target message, and the first bitmap stores the reception confirmation mark of each message fragment according to the order of the message fragments in the target message.
[0392] The first bitmap refers to a bitmap storing the reception confirmation marks of each message fragment corresponding to the target message, and the multiple reception confirmation marks are arranged in the order of the message fragments corresponding to the reception confirmation marks in the target message. In addition, the first bitmap corresponds to the target message, and each message is provided with a corresponding first bitmap. Specifically, Fig.27A A plurality of first bitmaps corresponding to the message are arranged in the first bitmap, and a plurality of confirmation messages in the first bitmap are arranged in the order of the message fragments in the target message.
[0393] In step 2620, a confirmation message of the message fragment is received from the destination node, and the confirmation message includes the path fragment sequence number of the message fragment.
[0394] Receive a confirmation message of the message fragment from the destination node, and then parse the confirmation message to obtain the path fragment sequence number of the message fragment.
[0395] Reference Fig.27B , the RT header in the confirmation message includes the path fragment number (PSN) of the message fragment.
[0396] In step 2630, the confirmation message is forwarded to the path.
[0397] The confirmation message is forwarded to the path where the message fragment corresponding to the confirmation message is located.
[0398] In step 2640, the first mapping table is searched through the path to obtain the connection fragment number corresponding to the path fragment number.
[0399] The first mapping table stores the mapping relationship between the path fragment number of the message fragment and the connection fragment number. Based on the path fragment number, the first mapping table is searched to obtain the connection fragment number. Fig. 6A If the path fragment number is 3, search for path 0. Fig.10 The first mapping table shown determines that the connection fragment number is i.
[0400] In step 2650, in the first bitmap, the receiving confirmation mark corresponding to the connection fragment sequence number is set to the first value.
[0401] The reception confirmation mark corresponds to the confirmation message. When the reception confirmation mark is a first value, the source node receives the confirmation message of the message segment corresponding to the reception confirmation mark. If the reception confirmation mark is not the first value, the source node does not receive the confirmation message of the message segment corresponding to the reception confirmation mark.
[0402] Reference Fig.27B , in the path of the reliable transport layer of the source node, the first mapping table is searched based on the path fragment sequence number to determine the connection fragment sequence number. The transaction layer sets the position corresponding to the first bitmap to the first value based on the connection fragment sequence number. If path 0 receives a confirmation message of the message fragment with the path fragment sequence number of 3, the position of the message fragment i in the first bitmap is set to the first value.
[0403] In step 2660, if all reception confirmation marks of the target message in the first bitmap are the first value, a successful sending message of the target message is generated.
[0404] If all the receiving confirmation marks of the target message in the first bit map are the first value, the source node receives the confirmation message of the multiple message fragments corresponding to the target message, and then determines that the destination node correctly receives the multiple message fragments corresponding to the target message, then the target message is successfully sent from the source node to the destination node, and a successful sending message of the target message is generated.
[0405] A successfully sent message is a message that the target message is successfully sent from the source node to the destination node.
[0406] It should be noted that the source node may send a successful sending message to the source application corresponding to the target message to display it to the object.
[0407] Reference Fig.28 , the source node sets the first bitmap for the target message at the transaction layer, and then the source node sends the message fragments to the destination node through multiple paths. The destination node processes the message fragments and returns a confirmation message. The source node forwards the confirmation message to the path, and searches the first mapping table through the path to obtain the connection fragment sequence number corresponding to the path fragment sequence number in the confirmation message. The transaction layer sets the reception confirmation mark corresponding to the connection fragment sequence number in the first bitmap to the first value. If all the reception confirmation marks in the first bitmap of the target message are the first value, it means that the target message is successfully sent from the source node to the destination node, and then generates a successful sending message of the target message.
[0408] The embodiment of the above steps 2610 to 2660 is provided with a first bitmap, and the first bitmap stores the reception confirmation mark of each message fragment according to the order of the message fragments in the target message. If a confirmation message is received, the connection fragment sequence number of the target message corresponding to the confirmation message is obtained, and then the reception confirmation mark in the first bitmap is set to the first value. Based on the first bitmap, the sending status of the target message can be confirmed, thereby ensuring that the target message can be sent to the destination node normally. In addition, when each reception confirmation mark of the target message in the first bitmap is the first value, a successful sending message of the target message is generated, and the visibility of the successful message sending is realized.
[0409] The above is a general description of step 2610 to step 2660. The specific implementation process of step 2630 is described in detail below.
[0410] In step 2630, the confirmation message is forwarded to the path.
[0411] In one embodiment, the confirmation message also includes a path identifier, see Fig.29 , step 2630 includes:
[0412] Step 2910: Obtain a path identifier from the confirmation message;
[0413] Step 2920: Forward the confirmation message to the path corresponding to the path identifier.
[0414] Step 2910 and step 2920 are described in detail below.
[0415] In step 2910, a path identifier is obtained from the confirmation message.
[0416] The path identifier refers to the identifier of the path. Different paths are set with different identifiers. The path identifier is used to distinguish multiple paths of the reliable transport layer.
[0417] Reference Fig. 6A , the path identifier of path 0 can be considered as 0, the path identifier of path 1 can be considered as 1, the path identifier of path 2 can be considered as 2, and the path identifier of path 3 can be considered as 3.
[0418] Reference Fig.18 The RT header in the confirmation message includes a path identifier (Path ID). Based on the path identifier, it can be confirmed on which path the message fragment corresponding to the confirmation message is located.
[0419] In step 2920, the confirmation message is forwarded to the path corresponding to the path identifier.
[0420] After confirming the path identifier, the confirmation message is forwarded to the path corresponding to the path identifier. For example, refer to Fig. 6A, if the path identifier in the confirmation message is 2, then the confirmation message is forwarded to path 2.
[0421] Reference Figure 8B ,The source node parses the confirmation message and determines the path identifier.,Afterwards, based on the path identifier, the confirmation message is forwarded to the path corresponding to the path identifier.
[0422] The embodiments of the above steps 2910 and 2920 are provided with a path identifier, and based on the path identifier, the confirmation message can be accurately forwarded to the corresponding path, thereby ensuring the accurate execution of the message sending process.
[0423] In one embodiment, the confirmation message also includes a source application identifier, see Fig.30 After step 2660, the message sending method further includes:
[0424] Step 3010: Obtain a source application identifier from the confirmation message;
[0425] Step 3020: Send a successful sending message to the source application corresponding to the source application identifier.
[0426] Steps 3010 to 3020 are described in detail below.
[0427] In step 3010, the source application identifier is obtained from the confirmation message.
[0428] The source application identifier refers to the identifier of the source application to which the target message corresponding to the confirmation message belongs.
[0429] In step 3020, a successful sending message is sent to the source application corresponding to the source application identifier.
[0430] After the source application identifier is determined, a successful sending message is sent to the source application corresponding to the source application identifier for the object to view.
[0431] Reference Fig.18 , the TL header of the confirmation message includes the source application identifier (Source APP.ID), refer to Figure 8B , based on the source application identifier, the successfully sent message can be sent to the source application corresponding to the source application identifier.
[0432] The embodiments of the above steps 3010 and 3020 are provided with a source application identifier. Based on the source application identifier, the successfully sent message can be sent to the source application corresponding to the source application identifier, thereby realizing visualization of successful message sending.
[0433] In one embodiment, referring to Fig.31 After step 2650, the message sending method further includes:
[0434] Step 3110: reduce the number of unconfirmed fragments by 1.
[0435] It should be noted that after the receiving confirmation flag corresponding to the connection fragment sequence number in the first bitmap is set to the first value, it indicates that the destination node has successfully received the message fragment. Therefore, the number of unconfirmed fragments is reduced by 1, thereby adding a message fragment to the path, avoiding the occurrence of data transmission interruption and improving the continuity of message transmission.
[0436] Description of the message receiving method at the destination node according to the embodiment of the present disclosure
[0437] In addition, if Fig.32 As shown, the message receiving method provided in the embodiment of the present disclosure is executed by the destination node, and the message receiving method includes:
[0438] Step 3210: receiving a plurality of message fragments sent by a source node through a plurality of paths, wherein the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number;
[0439] Step 3220: Transfer the message fragment to the path corresponding to the path identifier;
[0440] Step 3230: Set a second queue according to the order of the path fragment sequence numbers by path, set the position of the path fragment sequence number of the received message fragment in the second queue to the first value, and maintain a third sliding window on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value;
[0441] Step 3240, execute the first process, the first process includes: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with the next position set to the first value, and repeating the first process.
[0442] Steps 3210 to 3240 are described in detail below.
[0443] In step 3210, multiple message fragments sent by a source node through multiple paths are received, the multiple message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number.
[0444] The source node is connected to the destination node. After the source node sends multiple message fragments through multiple paths, the destination node can receive the message fragments from the multiple paths of the source node.
[0445] The target message is the message that needs to be transmitted from the source node to the destination node. Message fragmentation is the result of fragmenting the target message.
[0446] Reference Fig. 8A , the source node splits the target message into multiple message fragments and distributes them to multiple paths leading to the destination node for transmission. Therefore, at the destination node, multiple message fragments sent by the source node through multiple paths can be received.
[0447] The path identifier refers to the sending path of the message fragment at the source node, and may also refer to the receiving path of the message fragment at the destination node. The multiple paths of the source node and the destination node correspond to each other.
[0448] The path fragment sequence number refers to the sequence number of the message fragment on the source node path. Since multiple paths between the source node and the destination node correspond to each other, the path fragment sequence number may also refer to the sequence number of the message fragment on the destination node path.
[0449] Reference Fig. 6A , the path identifier of message fragment i at the source node is 0, and the path fragment sequence number is 3. Then the destination node parses the message fragment and obtains a path identifier of 0 and a path fragment sequence number of 3.
[0450] In step 3220, the message fragment is transferred to the path corresponding to the path identifier.
[0451] Based on the path identifier, the message fragment is forwarded to the path corresponding to the path identifier. For example, if the path identifier of the message fragment is 3, then the destination node transfers the message fragment to path 3.
[0452] In step 3230, a second queue is set according to the path and the order of the path fragment number, and the position of the path fragment number of the received message fragment in the second queue is set to the first value, and a third sliding window is maintained on the second queue, wherein the starting position of the third sliding window is the first position in the second queue set to the first value.
[0453] The second queue is a queue set based on the path fragment sequence number. The length of the second queue is the same as that of the first queue. For the received message fragment, based on the path fragment sequence number corresponding to the message fragment, its position in the second queue is set to the first value. For example, refer to Fig.33 , the path fragment number of the received message fragment is 2, then the position of the path fragment number 2 in the second queue is set to the first value.
[0454] In the second queue, for the position that is not the first value, the destination node has not received the corresponding message fragment.
[0455] The third sliding window is used to indicate the range of message fragments to be considered for sending confirmation messages to the source node. In the second queue, the starting position of the third sliding window is the first position set to the first value. For example, referring to Fig.33, path fragment number 2 is the first position in the second queue that is set to the first value, so the starting position of the third sliding window is 2.
[0456] In step 3240, the first process is executed, which includes: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with the next position set to the first value, and repeating the first process.
[0457] The first process refers to the process of sending a confirmation message to the source node based on the third sliding window. Specifically, the starting position of the third sliding window is the first value, and for this position, a confirmation message of the corresponding message fragment is sent to the source node. Since the message transmission between the source node and the destination node is order-preserving, after each confirmation message is sent, the starting position of the third sliding window is updated with the next position set to the first value. If the position of the first value does not currently exist, the starting position of the third sliding window is set to the next position of the position where the confirmation message is sent, until the position of the first value appears, at this time, the starting position of the third sliding window is updated with the newly appeared next position set to the first value. Repeating this process can continuously send confirmation messages to the source node.
[0458] Reference Fig.33 , path fragment number 2 is the first position in the second queue set to the first value, then the starting position of the third sliding window is 2. First, a confirmation message of the message fragment with path fragment number 2 is sent, and then the starting position of the third sliding window is updated to the position with path fragment number 5.
[0459] Reference Fig.23A , the path of the reliable transport layer of the node is usually provided with a first sliding window, a second sliding window and a third sliding window, wherein the first sliding window is used to send message fragments, the second sliding window is used to retransmit message fragments, and the third sliding window is used to receive message fragments. Then, in the process of sending and receiving messages, the path of the reliable transport layer of the source node is provided with a first sliding window and a second sliding window, and the path of the reliable transport layer of the destination node is provided with a third sliding window.
[0460] Reference Fig. 8A and Fig.34, the destination node receives the message fragments sent by the source node through multiple paths, and first obtains the path identifier of the message fragment to transfer the message fragment to the path corresponding to the path identifier. A second queue is set through the path, and the position of the received message fragment in the second queue is confirmed based on the path fragment sequence number to set the position to the first value. A third sliding window is maintained on the second queue, and the third sliding window is used to indicate the range of message fragments to be considered for sending confirmation messages to the source node. For the starting position of the third sliding window, a confirmation message of the message fragment corresponding to the position is sent to the source node. The source node can maintain the first sliding window based on the confirmation message. After the confirmation message is sent, the path of the destination node updates the starting position of the third sliding window with the next position set to the first value, and repeats the above process to send multiple consecutive confirmation messages to the source node.
[0461] In the above-mentioned embodiment of step 3210 to step 3240, a second queue is set on the path of the destination node in the order of the path fragment sequence number, wherein the position of the path fragment sequence number of the received message fragment in the second queue is set to the first value. In addition, a third sliding window is set on the second queue, and the path can execute the first process according to the third sliding window to send a confirmation message to the source node. The setting of the third sliding window and the first process enables the destination node to send a confirmation message to the source node, so that the source node can perform packet loss detection and retransmission, reduce the loss of messages during transmission, and ensure the normal transmission and reception of messages.
[0462] The above is a general description of step 3210 to step 3240. Step 3210, step 3220 and step 3240 have been described in sufficient detail above, and only the specific implementation process of step 3230 will be described in detail below.
[0463] In step 3230, the position of the path fragment sequence number of the received message fragment in the second queue is set to the first value.
[0464] In one embodiment, referring to Fig.35 , step 3230 includes:
[0465] Step 3510: If the position of the path fragment sequence number of the received message fragment in the second queue is already the first value, the message fragment is discarded.
[0466] It should be noted that if the position of the path fragment number of the received message fragment in the second queue is already the first value, it means that the destination node has received the message fragment, and the message fragment received at the current moment is a message fragment repeatedly sent by the source node and needs to be discarded. The discard operation ensures that the target message received by the destination node is correct and error-free, that is, there is no duplicate message fragment, thereby ensuring the correct execution of the message sending and receiving method.
[0467] In one embodiment, the destination node is provided with a second bitmap, which stores each message fragment according to the order of the received message fragments in the target message to which the message fragments belong. The message fragment also has a message identifier and a fragment rank, and the fragment rank indicates the rank of the message fragment in the target message.
[0468] Reference Fig.36 After step 3230, the message receiving method further includes:
[0469] Step 3610: Obtain a message identifier and a fragmentation rank from the received message fragments;
[0470] Step 3620: Store the message fragments in the second bitmap at positions corresponding to the message identifier and the fragment positions;
[0471] Step 3630: Once the positions of each message fragment of the target message in the second bitmap are filled, the target message is forwarded to the destination application.
[0472] It should be noted that the destination node is also provided with a second bitmap, which refers to a bitmap storing each message fragment of the target message in the order in which it is received. The message identifier refers to the identifier of the target message to which the message fragment belongs, and the fragment rank refers to the rank of the message fragment in the target message.
[0473] Steps 3610 to 3630 are described in detail below.
[0474] In step 3610, a message identifier and a fragment rank are obtained from the received message fragment.
[0475] Reference Fig.37 The TL header of the message fragment includes a message identifier and a fragment position. The destination node parses the TL header of the received message fragment to determine the message identifier and fragment position corresponding to the message fragment.
[0476] In step 3620, the message fragments are stored in the second bitmap at positions corresponding to the message identifier and the fragment order.
[0477] Based on the message identifier, the second bitmap corresponding to the target message to which the message fragment belongs is determined. Then, based on the fragment position, the specific position of the message segment in the second bitmap is determined.
[0478] Referring to 37, the message identifier of the message fragment is 1, and the fragmentation position is 3 or i, then the second bitmap corresponding to the target message 1 is first determined, and then the message segment is stored in the third position of the second bitmap.
[0479] In step 3630, once the positions of each message fragment of the target message in the second bitmap are filled, the target message is forwarded to the destination application.
[0480] If the positions of each message fragment of the target message in the current second bitmap are not filled, it means that the destination has received multiple message fragments corresponding to the target message, that is, the target message is received. Therefore, the target message is forwarded to the destination application.
[0481] Reference Fig.34 The embodiment of the present disclosure determines the second bitmap corresponding to the message fragment and the position in the second bitmap based on the message identifier and the fragmentation order, and stores the message fragment in the corresponding position. If the positions of each message fragment of the target message in the second bitmap are filled, the target message is forwarded to the destination application.
[0482] The embodiments of steps 3610 to 3630 above store message fragments based on the second bitmap and determine the destination node's reception progress for the target message, thereby ensuring that the destination node can receive the complete target message and ensuring the correct execution of the message reception process.
[0483] The above is a general description of step 3610 to step 3630. The specific implementation process of step 3610 and step 3620 is described in detail above, and only the specific implementation process of step 3630 is described in detail below.
[0484] In step 3630, once the positions of each message fragment of the target message in the second bitmap are filled, the target message is forwarded to the destination application.
[0485] In one embodiment, the message fragment also has a destination application identifier, see Fig.38 , step 3630 includes:
[0486] Step 3810: Once the positions of each message fragment of the target message in the second bitmap are filled, obtain the destination application identifier from the message fragment;
[0487] Step 3820: Forward the target message to the destination application corresponding to the destination application identifier.
[0488] The specific implementation process of step 3810 and step 3820 is described below.
[0489] In step 3810, once the positions of each message fragment of the target message in the second bitmap are filled, the destination application identifier is obtained from the message fragment.
[0490] The destination application identifier is the application identifier of the destination corresponding to the target message corresponding to the message fragment, that is, the identifier of the application from which the source application sends the target message. Figure 3D When the source application is application 1 or application 3, the destination application is application 4, and its corresponding destination application identifier is 4. When the source application is application 2, the destination application is application 5, and its corresponding destination application identifier is 5.
[0491] In step 3820, the target message is forwarded to the destination application corresponding to the destination application identifier.
[0492] After determining the destination application identifier, the destination node forwards the target message to the destination application corresponding to the destination application identifier to display the content corresponding to the target message to the object.
[0493] The embodiments of the above-mentioned steps 3810 and 3820 are provided with a destination application identifier. When the positions of each message fragment of the target message in the second bitmap are filled, the target message is forwarded to the destination application corresponding to the destination application identifier. The setting of the destination application identifier enables the target message to be accurately forwarded to the destination application, thereby improving the accuracy of message transmission.
[0494] In one embodiment, referring to Fig.14A In the embodiment of the present disclosure, the received message fragments are combined to obtain the target message, and the message corresponding to the target message is delivered to the destination application. The semantics of the destination node and the semantics of the destination application are different, so it is necessary to convert the transaction layer operation instructions into application message operation instructions. In addition, the transaction layer of the destination node is provided with a receive message queue, and the receive message queue corresponds to the destination application, such as Figure 3C ,When a large message corresponds to multiple small messages, that is the target message, the message corresponding to the target message needs to be placed in the receiving message queue. When the corresponding large message is received, it is forwarded to the destination application.
[0495] In one embodiment, referring to Fig.39 , Fig.39 : is a performance comparison diagram of the message sending and receiving method and related methods provided by the embodiment of the present disclosure. When a path fails, the failure will not spread to other normal paths. Packet loss on a path will not affect the transmission of this path and other paths, and will not cause the entire connection to fail, thereby improving the continuity of data transmission. Fig.39As shown in the figure, at 500ms, a network failure occurred. The disclosed embodiment can maintain high throughput, i.e., 200Gbps bandwidth, without being noticed. However, in the related technology, the failure spreads to the transaction layer, causing other paths to be unable to send, resulting in zero throughput. When there is no network failure, the impact of occasional network congestion or packet loss will be limited to a single path, and will not cause performance fluctuations in the transaction layer or other paths. Fig.24 As shown, in a fault-free scenario, the related technology may cause a brief transmission stop due to occasional packet loss and other reasons, resulting in a decrease in throughput, while the embodiment of the present disclosure can stably maintain full throughput and improve the continuity of data transmission.
[0496] Detailed diagram of the implementation of the message sending and receiving method of the disclosed embodiment
[0497] Refer to the following Fig.40 , the implementation details of the message sending and receiving method of the embodiment of the present disclosure are explained in detail and by way of example.
[0498] In step 4001, the transaction layer of the source node receives a target message from a source application.
[0499] In step 4002, the transaction layer of the source node splits the target message to the destination node into multiple message fragments and assigns connection fragment sequence numbers to the message fragments.
[0500] In one embodiment, semantic conversion is performed on the target message. Specifically, the application message operation instruction of the source application is read from the target message. The application message operation instruction is converted into a transaction layer operation instruction. The target message is split into message segments, and the transaction layer operation instruction is added to the message segments.
[0501] In step 4003, the transaction layer of the source node sets a first bitmap for the target message, and the first bitmap stores the reception confirmation mark of each message fragment according to the order of the message fragments in the target message.
[0502] In step 4004, the transaction layer of the source node distributes the message fragments to the paths.
[0503] In one embodiment, the number of fragments allowed to be sent for each path is obtained. Based on the number of fragments allowed to be sent, multiple paths are sorted. Then, the paths are sequentially retrieved according to the path sorting, and message fragments are allocated to the retrieved paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to be transmitted at a single time.
[0504] In one embodiment, based on the source application to which the target message belongs, the message fragments are placed in the source queue area corresponding to the source application. Based on the service quality requirements of each source application, the fragment acquisition order of each source queue area is determined. Based on the fragment acquisition order, the message fragments are acquired from each source queue area and allocated to the path.
[0505] In step 4005, the source node assigns path fragment numbers to the message fragments through the paths, and stores the mapping relationship between the path fragment numbers and the connection fragment numbers in the first mapping table.
[0506] In step 4006, the reliable transport layer of the source node sends the message fragment based on the path fragment sequence number.
[0507] In one embodiment, based on the path fragment sequence number, the message fragment is obtained, and the message identifier of the target message to which the message fragment belongs and the fragment position of the message fragment in the target message are obtained. Then, the message identifier and the fragment position are added to the message fragment and sent.
[0508] In step 4011, the number of unconfirmed fragments is maintained at the transaction layer of the source node. The number of unconfirmed fragments is used to indicate the number of message fragments that have been allocated to multiple paths for transmission but have not received confirmation messages from the destination node. Once the number of unconfirmed fragments is less than the first count, additional message fragments are allocated to the multiple paths until the number of unconfirmed fragments reaches the first count.
[0509] In step 4012, on each path of the source node, the message fragments sent on the path are arranged into a first queue according to the path fragment sequence number, and a first sliding window is maintained on the first queue, and the first sliding window indicates a first number of message fragments for which confirmation messages from the destination node have not yet been received.
[0510] In step 4021, the destination node receives multiple message fragments sent by the source node through multiple paths, and transfers the message fragments to the path corresponding to the path identifier.
[0511] In step 4022, the destination node sets up a second queue on the path in the order of the path fragment number, sets the position of the path fragment number of the received message fragment in the second queue to the first value, and maintains a third sliding window on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value.
[0512] In step 4023, if the position of the path fragment sequence number of the received message fragment in the second queue is already the first value, the message fragment is discarded.
[0513] In step 4024, the destination node obtains the message identifier and the fragment rank from the received message fragment, and stores the message fragment in the second bitmap at a position corresponding to the message identifier and the fragment rank.
[0514] In step 4025, for the starting position of the third sliding window, the destination node sends a confirmation message of the message fragment corresponding to the starting position to the source node.
[0515] In step 4026, after each confirmation message is sent, the destination node updates the starting position of the third sliding window with the next position set to the first value, and repeats the above process.
[0516] In step 4031, the source node forwards the confirmation message to the path based on the path identifier in the confirmation message.
[0517] In step 4032, the source node searches the first mapping table through the path to obtain the connection fragment number corresponding to the path fragment number.
[0518] In step 4033, the path sends the connection shard sequence number to the transaction layer of the source node.
[0519] In step 4034, the transaction layer of the source node sets the receiving confirmation mark corresponding to the connection fragment sequence number to the first value in the first bitmap.
[0520] In step 4035, the source node reduces the number of unconfirmed fragments by 1 to append message fragments for multiple paths.
[0521] In step 4036, once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which no confirmation message has been received, and is connected to the back of the message fragment after the first message fragment for which no confirmation message has been received.
[0522] In one embodiment, if a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field of the confirmation message indicates a non-aggregate confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0523] If a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field indicates an aggregation confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment
[0524] In one embodiment, once a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received has not reached the upper limit of the retransmission count, the retransmission count field is increased by 1, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received.
[0525] Once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received reaches the retransmission count upper limit, the message fragment before the first message fragment for which the confirmation message has not been received is forwarded to other paths for transmission, and the retransmission count field is reset to zero.
[0526] In step 4037, the message fragments before the first message fragment for which no confirmation message has been received are retransmitted.
[0527] In one embodiment, a second sliding window is maintained on the first queue, the second sliding window indicates a range of candidate message fragments to be considered for retransmission, and the message fragment position set to the first value on the second sliding window corresponds to the message fragment determined to be retransmitted. The position of the message fragment before the first message fragment and for which no confirmation message has been received in the second sliding window is set to the first value. The message fragments at the message fragment position set to the first value in the second sliding window are sequentially retransmitted, and each time a message fragment is retransmitted, the starting position of the second sliding window is positioned to the message fragment at the next message fragment position set to the first value.
[0528] Repeat the above steps.
[0529] In step 4040, once the positions of each message fragment of the target message in the second bitmap of the destination node are filled, the target message is forwarded to the destination application.
[0530] In step 4050, if all reception confirmation marks of the target message in the first bitmap are the first value, a successful sending message of the target message is generated.
[0531] Description of the apparatus and device of the present disclosure
[0532] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0533] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to object characteristics such as object attribute information or attribute information sets, the permission or consent of the object will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain object attribute information, the object's separate permission or separate consent will be obtained through a pop-up window or jump to a confirmation page. After clearly obtaining the object's separate permission or separate consent, the necessary object-related data used to enable the normal operation of the embodiment of the present application will be obtained.
[0534] Fig.41 A schematic diagram of the structure of a message sending device provided in an embodiment of the present disclosure. The message sending device is used in a source node, and the message sending device includes:
[0535] A first allocating unit 4110 is used to split the target message into multiple message fragments and allocate them to multiple paths leading to the destination node for transmission;
[0536] A first obtaining unit 4120 is configured to obtain the number of unconfirmed fragments, where the number of unconfirmed fragments is the number of message fragments that have not received confirmation messages from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to multiple paths for transmission;
[0537] A first responding unit 4130, configured to allocate additional message fragments to multiple paths in response to the number of unconfirmed fragments being less than a preset first count, until the number of unconfirmed fragments reaches the first count;
[0538] A first maintenance unit 4140 is configured to arrange, for each path in the plurality of paths, message fragments sent on the path into a first queue according to the path fragment sequence number, and maintain a first sliding window on the first queue, the first sliding window indicating a first number of message fragments for which confirmation messages from the destination node have not yet been received;
[0539] The first updating unit 4140 is configured to, upon receiving a confirmation message for a first message fragment located at a non-starting position of the first sliding window on the path, update the starting position of the first sliding window with the next message fragment position of the first message fragment, and reallocate a path fragment sequence number to the message fragment before the first message fragment for which the confirmation message has not been received, and connect it to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0540] The retransmission unit 4150 is configured to retransmit the message fragments before the first message fragment for which no confirmation message has been received.
[0541] Optionally, the first allocation unit 4110 is specifically configured to:
[0542] Split the target message into multiple message fragments, and assign a connection fragment sequence number to each message fragment;
[0543] Distribute message fragments to paths;
[0544] Assign path fragment numbers to message fragments through the path, and store the mapping relationship between the path fragment numbers and the connection fragment numbers in a first mapping table;
[0545] Send message fragments based on the path fragment sequence number.
[0546] Optionally, the first allocation unit 4110 is further configured to: set a first bitmap for the target message, wherein the first bitmap stores a reception confirmation mark of each message fragment according to the order of the message fragments in the target message;
[0547] The message sending device 4100 further includes:
[0548] A second receiving unit, configured to receive a confirmation message of the message fragment from the destination node, the confirmation message including a path fragment sequence number of the message fragment;
[0549] A first forwarding unit, configured to forward the confirmation message to a path;
[0550] A search unit, configured to search the first mapping table through the path to obtain a connection fragment sequence number corresponding to the path fragment sequence number;
[0551] A first marking unit, used to set a reception confirmation mark corresponding to the connection fragment sequence number to a first value in the first bitmap;
[0552] The first generating unit is configured to generate a successful sending message of the target message if all receiving confirmation marks of the target message in the first bitmap are the first value.
[0553] Optionally, the confirmation message also includes a path identifier,
[0554] The first forwarding unit is specifically used for:
[0555] Get the path identifier from the confirmation message;
[0556] The confirmation message is forwarded to the path corresponding to the path identifier.
[0557] Optionally, the confirmation message also includes a source application identifier.
[0558] The message sending device 4100 further includes:
[0559] A second acquisition unit, configured to acquire a source application identifier from the confirmation message;
[0560] The first sending unit is used to send a successful sending message to a source application corresponding to the source application identifier.
[0561] Optionally, the message sending device further includes:
[0562] The counting processing unit is used to reduce the number of unconfirmed fragments by 1.
[0563] Optionally, the first allocation unit 4110 is further configured to:
[0564] Get the number of fragments allowed to be sent for each path;
[0565] Sort multiple paths based on the number of fragments allowed to be sent;
[0566] The paths are sorted and taken out in order, and message fragments are allocated to the taken out paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to be transmitted at a single time of the taken out paths.
[0567] Optionally, the first allocation unit 4110 is further configured to:
[0568] Acquire a first number of message fragments in a first sliding window of the path;
[0569] Get the number of congestion control fragments of the path;
[0570] The minimum value of the first number and the number of congestion control fragments is determined as the number of fragments allowed to be sent.
[0571] Optionally, the source node has multiple source queuing areas corresponding to multiple source applications;
[0572] The first allocation unit 4110 is further specifically configured to:
[0573] Based on the source application to which the target message to which the message fragments are split belongs, the message fragments are placed in the source queue area corresponding to the source application;
[0574] Based on the service quality requirements of each source application, determine the order in which the shards are obtained from each source queue area;
[0575] Based on the fragment acquisition order, the message fragments are obtained from each source queue area and distributed to the path.
[0576] Optionally, the first allocation unit 4110 is further configured to:
[0577] Reading the application message operation instruction of the source application from the target message;
[0578] Convert application message operation instructions into transaction layer operation instructions;
[0579] The target message is split into message fragments, and the transaction layer operation instructions are added to the message fragments.
[0580] Optionally, the first allocation unit 4110 is further configured to:
[0581] Obtain message fragments based on the path fragment sequence number;
[0582] Obtaining a message identifier of a target message to which the message fragment belongs, and a fragment position of the message fragment in the target message;
[0583] The message identifier and fragment position are added to the message fragment and sent.
[0584] Optionally, the retransmission unit 4160 is specifically configured to:
[0585] Maintaining a second sliding window on the first queue, the second sliding window indicating a range of candidate message fragments to be considered for retransmission, and a message fragment position set to a first value on the second sliding window corresponds to a message fragment determined to be retransmitted;
[0586] Setting the position of the message fragment before the first message fragment and for which no confirmation message has been received in the second sliding window to a first value;
[0587] The message fragments at the message fragment positions set to the first value in the second sliding window are sequentially retransmitted, and each time a message fragment is retransmitted, the starting position of the second sliding window is positioned to the message fragment at the next message fragment position set to the first value.
[0588] Optionally, the message sending device 4100 further includes:
[0589] The second updating unit is used to update the starting position of the first sliding window with the next message fragment position of the second message fragment once a confirmation message for the second message fragment located at the starting position of the first sliding window is received on the path.
[0590] Optionally, the first updating unit 4150 is specifically configured to:
[0591] If a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field of the confirmation message indicates a non-aggregation confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the message fragment before the first message fragment for which the confirmation message has not been received is reallocated with a path fragment sequence number, and is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0592] If a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field indicates aggregation confirmation, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment.
[0593] Optionally, the message fragment also includes a retransmission count field.
[0594] The first updating unit 4150 is further specifically configured to:
[0595] Once a confirmation message for a first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received has not reached the upper limit of the retransmission count, the retransmission count field is increased by 1, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and the message fragment is connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received;
[0596] Once a confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission count field of the message fragment before the first message fragment for which the confirmation message has not been received reaches the retransmission count upper limit, the message fragment before the first message fragment for which the confirmation message has not been received is forwarded to other paths for sending, and the retransmission count field is reset to zero.
[0597] Fig.42 A schematic diagram of the structure of a message receiving device provided in an embodiment of the present disclosure. The message receiving device is arranged at a destination node, and the message sending device comprises:
[0598] A first receiving unit 4210 is used to receive a plurality of message fragments sent by a source node through a plurality of paths, where the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number;
[0599] A handover unit 4220, configured to hand over the message fragment to a path corresponding to the path identifier;
[0600] The second maintenance unit 4230 is used to set the second queue according to the order of the path fragment sequence number through the path, set the position of the path fragment sequence number of the received message fragment in the second queue to the first value, and maintain a third sliding window on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value;
[0601] The execution unit 4240 is used to execute the first process, which includes: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with the next position set to the first value, and repeating the first process.
[0602] Optionally, the destination node is provided with a second bitmap, the second bitmap stores each message fragment according to the order of the received message fragments in the target message to which the message fragments belong; the message fragment further has a message identifier and a fragment rank, the fragment rank indicating the rank of the message fragment in the target message;
[0603] The message receiving device 4200 further includes:
[0604] A third acquisition unit, used to acquire a message identifier and a fragmentation order from the received message fragment;
[0605] A storage unit, used for storing the message fragments in a second bitmap at a position corresponding to the message identifier and the fragment position;
[0606] The second forwarding unit is configured to forward the target message to a destination application once the positions of the message fragments of the target message in the second bitmap are filled.
[0607] Optionally, the message fragment also has a destination application identifier;
[0608] The second forwarding unit is specifically configured to:
[0609] Once the positions of each message fragment of the target message in the second bitmap are filled, the destination application identifier is obtained from the message fragment;
[0610] Forward the target message to the destination application corresponding to the destination application identifier.
[0611] Optionally, the second maintenance unit 4230 is specifically used for:
[0612] If the position of the path fragment sequence number of the received message fragment in the second queue is already the first value, the message fragment is discarded.
[0613] Reference Fig.43 , Fig.43The structural block diagram of the terminal part for implementing the message sending and receiving method of the embodiment of the present disclosure includes: a radio frequency (RF) circuit 4310, a memory 4315, an input unit 4330, a display unit 4340, a sensor 4350, an audio circuit 4360, a wireless fidelity (WiFi) module 4370, a processor 4380, and a power supply 4390. Those skilled in the art can understand that Fig.43 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0614] RF circuit 4310 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to processor 4380 for processing; in addition, the designed uplink data is sent to the base station.
[0615] The memory 4315 may be used to store software programs and modules. The processor 4380 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 4315 .
[0616] The input unit 4330 may be used to receive input digital or character information and generate key signal input related to the setting and function control of the content terminal. Specifically, the input unit 4330 may include a touch panel 4331 and other input devices 4332.
[0617] The display unit 4340 may be used to display input information or provided information and various menus of the content terminal. The display unit 4340 may include a display panel 4341.
[0618] The audio circuit 4360, the speaker 4361, and the microphone 4362 may provide an audio interface.
[0619] In this embodiment, the processor 4380 included in the terminal can execute the message sending and receiving method of the previous embodiment.
[0620] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to content recommendation, data screening, etc.
[0621] Fig.44A block diagram of the structure of a portion of a server for implementing the message sending and receiving method of an embodiment of the present disclosure. The server may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 4422 (for example, one or more processors) and a memory 4432, and one or more storage media 4430 (for example, one or more mass storage devices) storing application programs 4442 or data 4444. Among them, the memory 4432 and the storage medium 4430 can be short-term storage or permanent storage. The program stored in the storage medium 4430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 4422 can be configured to communicate with the storage medium 4430 and execute a series of instruction operations in the storage medium 4430 on the server.
[0622] The server may also include one or more power supplies 4426, one or more wired or wireless network interfaces 4450, one or more input and output interfaces 4458, and / or, one or more operating systems 4441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0623] The central processor 4422 in the server can be used to execute the message sending and receiving method of the embodiment of the present disclosure.
[0624] The embodiments of the present disclosure also provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the message sending and receiving methods of the aforementioned embodiments.
[0625] The embodiment of the present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned message sending and receiving method.
[0626] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar contents, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0627] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated content, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the associated content before and after is in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0628] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.
[0629] In the several embodiments provided in the present disclosure, 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 only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. 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.
[0630] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0631] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0632] 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 disclosure 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 to enable a computer device (which can be a personal computer, server 130, or network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0633] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.
[0634] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A message sending method, characterized in that: Executed by the source node, the message sending method includes: Split the target message into multiple message fragments and distribute them to multiple paths leading to the destination node for transmission; Acquire the number of unconfirmed fragments, where the number of unconfirmed fragments is the number of message fragments that have not received a confirmation message from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to the multiple paths for sending; In response to the number of unconfirmed fragments being less than a preset first count, additionally allocating the message fragments to the multiple paths until the number of unconfirmed fragments reaches the first count; For each path in the plurality of paths, arrange the message fragments sent on the path into a first queue according to the path fragment sequence number, and maintain a first sliding window on the first queue, wherein the first sliding window indicates a first number of the message fragments for which the confirmation message of the destination node has not been received; Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment for which the confirmation message has not been received, and connected to the back of the message fragment after the first message fragment for which the confirmation message has not been received; Retransmit the message fragment before the first message fragment for which the confirmation message has not been received.
2. The message sending method according to claim 1, characterized in that: The step of splitting the target message into a plurality of message fragments and allocating the fragments to a plurality of paths leading to the destination node for transmission includes: Splitting the target message into multiple message fragments, and assigning a connection fragment sequence number to each of the message fragments; Distributing the message fragments to the paths; Allocating the path fragment sequence number to the message fragment through the path, and storing the mapping relationship between the path fragment sequence number and the connection fragment sequence number in a first mapping table; The message fragment is sent based on the path fragment sequence number.
3. The message sending method according to claim 2, characterized in that: Before allocating the message fragments to the path, the message sending method further includes: setting a first bitmap for the target message, the first bitmap storing a reception confirmation mark of each of the message fragments according to the order of the message fragments in the target message; After arranging the message fragments sent on each path of the multiple paths into a first queue according to the path fragment sequence number and maintaining a first sliding window on the first queue, the message sending method further includes: receiving the confirmation message of the message fragment from the destination node, the confirmation message including the path fragment sequence number of the message fragment; forwarding the confirmation message to the path; Searching the first mapping table through the path to obtain the connection fragment sequence number corresponding to the path fragment sequence number; In the first bitmap, the reception confirmation mark corresponding to the connection fragment sequence number is set to a first value; If all the reception confirmation marks of the target message in the first bitmap are the first value, a successful sending message of the target message is generated.
4. The message sending method according to claim 3, characterized in that: The confirmation message also includes a path identifier; The forwarding the confirmation message to the path includes: Obtaining the path identifier from the confirmation message; The confirmation message is forwarded to the path corresponding to the path identifier.
5. The message sending method according to claim 3 or 4, characterized in that: The confirmation message also includes a source application identifier; If all the reception confirmation marks of the target message in the first bitmap are the first value, after generating a successful sending message of the target message, the message sending method further includes: Acquire the source application identifier from the confirmation message; The successful sending message is sent to the source application corresponding to the source application identifier.
6. The message sending method according to any one of claims 2 to 5, characterized in that: The allocating the message fragments to the paths includes: Obtaining the number of fragments allowed to be sent for each of the paths; sorting the multiple paths based on the number of fragments allowed to be sent; The paths are sorted and taken out in sequence, and the message fragments are allocated to the taken out paths according to the minimum value of the number of fragments allowed to be sent and the number of fragments limited to be transmitted in a single time of the taken out paths.
7. The message sending method according to any one of claims 2 to 6, characterized in that: The source node has a plurality of source queuing areas corresponding to a plurality of source applications; The allocating the message fragments to the paths includes: Based on the source application to which the target message to which the message fragments are split belongs, placing the message fragments in the source queue area corresponding to the source application; Determining a fragment acquisition order for each source queuing area based on a quality of service requirement of each source application; Based on the fragment acquisition order, the message fragments are acquired from each of the source queuing areas and distributed to the path.
8. The message sending method according to any one of claims 2 to 7, characterized in that: The step of splitting the target message into the message fragments comprises: Reading an application message operation instruction of a source application from the target message; Converting the application message operation instruction into a transaction layer operation instruction; The target message is split into the message fragments, and the transaction layer operation instructions are added to the message fragments.
9. The message sending method according to any one of claims 2 to 8, characterized in that: The sending of the message fragment based on the path fragment sequence number includes: Based on the path fragment sequence number, obtaining the message fragment; Acquire a message identifier of the target message to which the message fragment belongs, and a fragmentation position of the message fragment in the target message; The message identifier and the fragmentation order are added to the message fragment and sent.
10. The message sending method according to any one of claims 1 to 9, characterized in that: The retransmitting the message fragment before the first message fragment and for which the confirmation message has not been received comprises: Maintaining a second sliding window on the first queue, the second sliding window indicating a range of candidate message fragments to be considered for retransmission, and a message fragment position set to a first value on the second sliding window corresponds to the message fragment determined to be retransmitted; Setting the position of the message fragment before the first message fragment and not receiving the confirmation message in the second sliding window to the first value; The message fragments at the message fragment positions set to the first value in the second sliding window are sequentially retransmitted, and each time a message fragment is retransmitted, the starting position of the second sliding window is positioned to the message fragment at the next message fragment position set to the first value.
11. The message sending method according to any one of claims 1 to 10, characterized in that: Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and connected to the message fragment after the first message fragment and for which the confirmation message has not been received, including: If the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregation confirmation field of the confirmation message indicates a non-aggregation confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and the message fragment is connected to the back of the message fragment after the first message fragment and for which the confirmation message has not been received; If the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the aggregate confirmation field indicates an aggregate confirmation, the start position of the first sliding window is updated with the next message fragment position of the first message fragment.
12. The message sending method according to any one of claims 1 to 11, characterized in that: The message fragment also has a retransmission times field; Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and connected to the message fragment after the first message fragment and for which the confirmation message has not been received, including: Once the confirmation message for the first message fragment located at a non-starting position of the first sliding window is received on the path, and the retransmission number field of the message fragment before the first message fragment and for which the confirmation message has not been received has not reached the upper limit of the retransmission number, the retransmission number field is increased by 1, the starting position of the first sliding window is updated with the next message fragment position of the first message fragment, and the path fragment sequence number is reallocated to the message fragment before the first message fragment and for which the confirmation message has not been received, and the path fragment sequence number is connected to the back of the message fragment after the first message fragment and for which the confirmation message has not been received; Once the confirmation message for the first message fragment located at the non-starting position of the first sliding window is received on the path, and the retransmission number field of the message fragment before the first message fragment and for which the confirmation message has not been received reaches the retransmission number upper limit, the message fragment before the first message fragment and for which the confirmation message has not been received is forwarded to other paths for sending, and the retransmission number field is reset to zero.
13. A message receiving method, characterized in that: Executed by the destination node, the message receiving method includes: Receiving a plurality of message fragments sent by a source node through a plurality of paths, wherein the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number; Transferring the message fragment to the path corresponding to the path identifier; Through the path, a second queue is set in the order of the path fragment sequence number, and the position of the path fragment sequence number of the received message fragment in the second queue is set to a first value, and a third sliding window is maintained on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value; Execute a first process, the first process comprising: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with the next position set to the first value, and repeating the first process.
14. The message receiving method according to claim 13, characterized in that: The destination node is provided with a second bitmap, wherein the second bitmap stores each of the message fragments according to the order of the received message fragments in the target message to which the message fragments belong; the message fragments also have a message identifier and a fragment rank, wherein the fragment rank indicates the rank of the message fragment in the target message; After setting a second queue in the order of the path fragment sequence number through the path, and setting the position of the path fragment sequence number of the received message fragment in the second queue to the first value, the message receiving method further includes: Acquire the message identifier and the fragmentation order from the received message fragment; storing the message fragments in the second bitmap at positions corresponding to the message identifiers and the fragment positions; Once the positions of the message fragments of the target message in the second bitmap are filled, the target message is forwarded to a destination application.
15. The message receiving method according to claim 13 or 14, characterized in that: The message fragment also has a destination application identifier; Once the positions of the message fragments of the target message in the second bitmap are filled, forwarding the target message to a destination application includes: Once the positions of the message fragments of the target message in the second bitmap are filled, obtaining the destination application identifier from the message fragment; The target message is forwarded to the destination application corresponding to the destination application identifier.
16. A message sending device, characterized in that: Set at the source node, the message sending device includes: A first allocation unit is used to split the target message into multiple message fragments and allocate them to multiple paths leading to the destination node for transmission; A first acquisition unit is used to acquire the number of unconfirmed fragments, where the number of unconfirmed fragments is the number of message fragments that have not received a confirmation message from the destination node, and the message fragments corresponding to the number of unconfirmed fragments have been allocated to the multiple paths for sending; A first responding unit, configured to allocate additional message fragments to the plurality of paths in response to the number of unconfirmed fragments being less than a preset first count, until the number of unconfirmed fragments reaches the first count; a first maintenance unit, configured to arrange, for each path in the plurality of paths, the message fragments sent on the path into a first queue according to a path fragment sequence number, and maintain a first sliding window on the first queue, wherein the first sliding window indicates a first number of the message fragments for which the confirmation message of the destination node has not been received; a first updating unit, configured to, upon receiving the confirmation message for the first message fragment located at a non-starting position of the first sliding window on the path, update the starting position of the first sliding window with the next message fragment position of the first message fragment, and reallocate the path fragment sequence number to the message fragment before the first message fragment for which the confirmation message has not been received, and connect it to the back of the message fragment after the first message fragment for which the confirmation message has not been received; A retransmission unit is used to retransmit the message fragment before the first message fragment for which the confirmation message has not been received.
17. A message receiving device, characterized in that: Set at the destination node, the message receiving device includes: A first receiving unit, configured to receive a plurality of message fragments sent by a source node through a plurality of paths, wherein the plurality of message fragments are divided by a target message, and the message fragments have a path identifier and a path fragment sequence number; A handover unit, configured to hand over the message fragment to the path corresponding to the path identifier; a second maintenance unit, configured to set a second queue according to the order of the path fragment sequence numbers through the path, set the position of the path fragment sequence number of the received message fragment in the second queue to a first value, and maintain a third sliding window on the second queue, wherein the starting position of the third sliding window is the first position in the second queue that is set to the first value; An execution unit is used to execute a first process, wherein the first process includes: for the starting position of the third sliding window, sending a confirmation message of the message fragment corresponding to the starting position to the source node, and after each confirmation message is sent, updating the starting position of the third sliding window with a next position set to the first value, and repeating the first process.
18. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the message sending method according to any one of claims 1 to 12 or the message receiving method according to any one of claims 13 to 15 is implemented.
19. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the message sending method according to any one of claims 1 to 12 or the message receiving method according to any one of claims 13 to 15 is implemented.
20. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the message sending method according to any one of claims 1 to 12, or the message receiving method according to any one of claims 13 to 15.
Citation Information
Patent Citations
Real-time video transmission method and apparatus
CN108696773A
Radio link control status report optimized transmission method and system
CN113473532A
File transmission method and device, computer equipment and storage medium
CN116827672A
Network layer protocol data transmission method and device
CN116896567A
Data transmission method, device and system, electronic equipment and storage medium
CN117978787A
Cited By
Secure file downloading method and system
CN121333588A
Packet sending method and apparatus, packet receiving method and apparatus, electronic device, computer-readable storage medium, and computer program product
WO2025236920A1
