Data message transmission method and apparatus, node device and readable storage medium
By identifying and combining data packets with the same destination node address when the node device's port is blocked, the problem of low transmission efficiency in industrial wired communication is solved, and more efficient data transmission is achieved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2026-03-26
AI Technical Summary
In industrial wired communication, port congestion of node devices leads to low data transmission efficiency. Existing technologies extend transmission time through store-and-forward schemes, increasing communication resource overhead for inter-frame gaps, message headers, and checksums.
When a port is blocked, it determines whether the destination node addresses of two data packets are the same, and combines them into a single data packet for transmission if the length allows, skipping the sending of the packet header and checksum, thus optimizing the transmission order of the data segments.
This reduces the time consumed by message headers, check segments, and inter-frame gaps, thus improving data transmission efficiency.
Smart Images

Figure CN2025115671_26032026_PF_FP_ABST
Abstract
Description
Data packet transmission method and device, node device and readable storage medium
[0001] Related applications
[0002] The present application claims priority to Chinese Patent Application No. 202411317972.3, filed on September 20, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD
[0003] The present application relates to the field of communication technology, in particular to a data packet transmission method and device, a node device and a computer readable storage medium. BACKGROUND
[0004] In the field of industrial wired communication, there may be a port blocking problem when each node device communicates with each other. The port blocking refers to that while a port of a node device is sending a certain data, another data packet also needs to be sent through the port. When the port blocking problem is encountered, the technical means usually adopted is to store the data packet to be sent later, and wait for the transmission of the previous data packet to be completed, and then transmit the data frame later. However, since each data packet includes a packet header, a data segment, a check segment and the like, when multiple data packets are sent, the frame gap of the data frame and the communication resource overhead of the packet header and the check segment are involved, which leads to a long data transmission time and affects the data transmission efficiency. SUMMARY
[0005] The main purpose of the present application is to provide a data packet transmission method and device, a node device and a computer readable storage medium, which aims to solve the technical problem of low efficiency of the current data transmission scheme for node device port blocking.
[0006] To achieve the above-mentioned purpose, the present application provides a data packet transmission method, which comprises:
[0007] When a first data packet is sent, if the node device receives at least one second data packet to the port that is sending the first data packet, it is determined whether the second destination node address of the second data packet is consistent with the first destination node address of the first data packet.
[0008] If they are consistent, if the sum of the data length of the second data packet and the cumulative data packet length of the port sending the first data packet is not greater than a preset data length threshold, the first data packet and the second data packet are combined and transmitted to form a third data packet.
[0009] In an embodiment, the step of combining and transmitting the first data packet and the second data packet comprises:
[0010] sending the data segment of the second data packet after the sending of the data segment of the first data packet is completed;
[0011] calculating a check segment corresponding to the sent continuous data segments based on the sent data segments of the second data packet after the sending of the data segment of the second data packet is completed, and sending the check segment after the sent data packet;
[0012] The third data packet comprises at least the packet header and the data segment of the first data packet, the data segment of the second data packet, and the check segment.
[0013] In an embodiment, when the second destination node address is consistent with the first destination node address and the first data packet is a packet sent by the current sending port alone, the method further comprises:
[0014] acquiring the data packet lengths corresponding to the first data packet and the second data packet respectively;
[0015] calculating the sum of the data packet lengths to obtain a total data packet length;
[0016] If the total data packet length is greater than the preset data length threshold, the second data packet is sent after the first data packet is completely sent.
[0017] In an embodiment, the second data packet comprises a plurality of sub data packets, and after the second destination node address is determined to be consistent with the first destination node address, the data packet transmission method further comprises:
[0018] determining the sum of the data length of each sub data packet in the second data packet and the cumulative data packet length sent by the port in sequence;
[0019] If the sum of the data length of the sub data packet and the cumulative data packet length sent by the port does not exceed the preset data length threshold, the sub data packet is sent in combination with the first data packet.
[0020] In an embodiment, after the second destination node address is determined to be consistent with the first destination node address, the data packet transmission method further comprises:
[0021] If the sum of the data length of the sub data packet and the cumulative data packet length sent by the port exceeds the preset data length threshold, the sub data packet is sent in the form of a new data packet;
[0022] clearing the cumulative data packet length sent by the port.
[0023] In an embodiment, after the step of judging whether the second destination node address of the second data packet is consistent with the first destination node address of the first data packet, the method further comprises:
[0024] If the second destination node address is not consistent with the first destination node address, waiting until the first data packet is completely sent, and then sending the second data packet.
[0025] In an embodiment, the second data packet comprises at least a third data packet and a fourth data packet, and the receiving time point of the third data packet is earlier than that of the fourth data packet; the data packet transmission method further comprises:
[0026] Before the data segment of the third data packet is completely sent, if a fourth data packet to be sent is received, the fourth data packet is combined with the third data packet for transmission if the sum of the data length of the fourth data packet and the cumulative data packet length of the port is not greater than the preset data length threshold and the fourth destination node of the fourth data packet is consistent with the second destination node.
[0027] In an embodiment, after the step of receiving the fourth data packet to be sent, the method further comprises:
[0028] If the sum of the length of the received fourth data packet and the cumulative data packet length of the port is greater than the preset data length threshold or the fourth destination node address of the fourth data packet is not consistent with the second destination node address, a corresponding check segment is calculated based on the first data packet and the third data packet after the data segment of the third data packet is completely sent, and the check segment is sent to the node device corresponding to the second destination node address.
[0029] A corresponding fourth destination node address is obtained from the packet header of the fourth data packet, and the fourth data packet is sent to the node device corresponding to the fourth destination node address.
[0030] In an embodiment, the number of the second data packet is 1, and the data packet transmission method further comprises:
[0031] If no new data packet is received before the data segment of the second data packet is completely sent, a corresponding check segment is calculated based on the continuous data segment sent by the port after the data segment of the second data packet is completely sent, and the check segment is sent after the sent data packet.
[0032] In an embodiment, the second data packet comprises at least a third data packet and a fourth data packet, and the third data packet has the same receiving time point as the fourth data packet;
[0033] The step of combining and transmitting the first data packet and the second data packet comprises:
[0034] After the data segment of the first data packet is completely sent, a data segment of the third data packet or the fourth data packet is sent;
[0035] After the data segment of the third data packet is completely sent, a data segment of the fourth data packet is sent; or,
[0036] After the data segment of the fourth data packet is completely sent, a data segment of the third data packet is sent.
[0037] In an embodiment, the data packet transmission method further comprises:
[0038] After the data segments of the third data packet and the fourth data packet are completely sent, a corresponding check segment is calculated based on the continuous data segments sent by the port, and the check segment is attached to the sent data packet and then sent;
[0039] The third data packet comprises at least a packet header and a data segment of the first data packet, data segments corresponding to the third data packet and the fourth data packet respectively, and the check segment.
[0040] In an embodiment, the data packet transmission method further comprises:
[0041] If the port is not in a packet sending state when the second data packet to be sent is received, a second destination node address is obtained from a packet header of the second data packet;
[0042] The second data packet is sent to a node device corresponding to the second destination node address.
[0043] In addition, the application also provides a data packet transmission device, which comprises:
[0044] An address judging module is configured to, when a first data packet is sent, if the node device receives at least one second data packet to a port where the first data packet is being sent, judge whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet;
[0045] The combination transmission module is configured to, if consistent, combine and transmit the first data packet and the second data packet to form a third data packet, in a case where a sum of a data length of the second data packet and a cumulative data packet length of the port transmitting the first data packet is not greater than a preset data length threshold.
[0046] The application also provides a node device, which is a physical device, and comprises at least one processor and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the data packet transmission method applied to the node device.
[0047] The application also provides a readable storage medium, which is a computer readable storage medium, and stores a program for implementing a data packet transmission method, and the program is executed by a processor to implement the steps of the data packet transmission method.
[0048] The application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the data packet transmission method.
[0049] The application provides a data packet transmission method. First, when a first data packet is transmitted, if the node device receives at least one second data packet to a port that is transmitting the first data packet, it is determined whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet; if consistent, the first data packet and the second data packet are combined and transmitted to form a third data packet, in a case where a sum of a data length of the second data packet and a cumulative data packet length of the port transmitting the first data packet is not greater than a preset data length threshold. The technical solution of the application can combine and transmit two independent data packets in the form of a third data packet when a port is currently transmitting a data packet and the port encounters a new data packet that needs to be transmitted, in a case where the destination node address and the data packet length are allowed. Compared with the traditional technical solution of transmitting two independent data packets separately, the technical solution of the application can reduce the additional time consumption caused by the packet header, the check section and the interframe gap of the data packet, save the data transmission time and improve the data transmission efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0050] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the application and, together with the description, further serve to explain the principles of the application.
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, the other drawings can be obtained based on these drawings without any creative effort.
[0052] Fig. 1 is a flow diagram of the data packet transmission method according to an embodiment of the present application;
[0053] Fig. 2 is a diagram of data packet forwarding under port blocking according to an embodiment of the present application;
[0054] Fig. 3 is a diagram of an independent data packet structure according to an embodiment of the present application;
[0055] Fig. 4 is a diagram of a combined data packet structure according to an embodiment of the present application;
[0056] Fig. 5 is a diagram of processing the first data packet and the second data packet inside a node device according to an embodiment of the present application;
[0057] Fig. 6 is a flow diagram of a feasible data packet transmission execution step according to an embodiment of the present application;
[0058] Fig. 7 is a diagram of the component structure of a data packet transmission device according to an embodiment of the present application;
[0059] Fig. 8 is a diagram of the device structure of a hardware running environment involved by a terminal station according to an embodiment of the present application.
[0060] The purposes, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0061] In order to make the above purposes, features and advantages of the present application more apparent and understandable, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those of ordinary skill in the art without any creative effort fall within the scope of the present application.
[0062] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.
[0063] In order to better understand the technical solutions of the present application, the drawings in the specification and the specific embodiments will be described in detail.
[0064] In the existing industrial wired communication scene, when the node devices interact with each other, there is a problem of port blocking, that is, when the port of a node device is sending a data frame, another data also needs to be forwarded out by the port. In order to deal with port blocking, the current main processing scheme is storage forwarding: the data frame arrived later is stored, and after the transmission of the previous data frame is completed, the transmission of the data frame behind is performed. However, the above scheme will make two data packets with the same destination address and length meet the requirements be sent independently, thereby introducing a certain inter-frame gap and the overhead of the packet header and the check section, making the transmission time longer and affecting the transmission efficiency of data.
[0065] In order to overcome the technical defects existing in the prior art, the embodiment of the present application provides a data packet transmission method. Referring to FIG. 1, FIG. 1 is a flowchart of a data packet transmission method applied to a node device. In embodiment one, the data packet transmission method comprises:
[0066] Step S10, when sending a first data packet, if the node device receives at least one second data packet to the port that is sending the first data packet, it is judged whether the second destination node address of the second data packet is consistent with the first destination node address of the first data packet.
[0067] It should be noted that the data packet transmission method in the embodiment of the present application is applied to a node device, and the node device establishes wired communication with other node devices. The node device can forward the received data packet to be forwarded to the corresponding node device, or send the data packet to be sent out by itself. That is, the first data packet can be a data packet to be forwarded sent by other node devices, or a data packet to be sent out generated or received by itself.
[0068] Specifically, when the node device is sending a first data packet to another node device through a current sending port, if one or more second data packets to be forwarded sent by other node devices or second data packets to be sent out by the node device itself are received at the same time, it can be considered that port blocking occurs at this time. In this case, step S10 mainly discloses a way of judging whether the destination node addresses of two data packets are consistent in the scenario of port blocking. The destination node address represents the destination node device to which the data packet is to be sent, and the consistent destination node is the basis for the combined transmission of the first data packet and the second data packet.
[0069] If the first destination node address and the second destination node address are consistent, the first data packet and the second data packet are combined and transmitted to form a third data packet in a case that the sum of the data length of the second data packet and the cumulative data packet length of the port transmitting the first data packet is not greater than a preset data length threshold.
[0070] In the case that the first destination node address and the second destination node address are consistent, the condition for data packet transmission can be further determined. It can be understood that in a wired communication network, the data packet length is usually limited by the communication protocol or system, so in step S20, the sum of the data packet length of the second data packet and the data packet length of the port transmitting the first data packet (including the data length of the first data packet) is further compared with a preset data length threshold, wherein the preset data length threshold is the maximum allowed data packet length in the communication system. When the sum of the data packet length of the second data packet and the data packet length of the port transmitting the first data packet is less than the preset data length threshold, it means that the combined transmission of the data segments of the first data packet and the second data packet will not cause the data packet length to exceed the limit, so the combined transmission can be performed.
[0071] The step of combining and transmitting the first data packet and the second data packet comprises:
[0072] Step S21, after the data segment of the first data packet is transmitted, the data segment of the second data packet is transmitted;
[0073] Step S22, after the data segment of the second data packet is transmitted, the corresponding check segment is calculated based on the transmitted continuous data segment, and the check segment is attached to the transmitted data packet and transmitted;
[0074] The third data packet at least includes the packet header and the data segment of the first data packet, the data segment of the second data packet and the check segment.
[0075] Further, in the process of combined transmission, the data segment of the second data packet is sent after the data segment of the first data packet is completely transmitted. Before the first data packet is sent, the packet header and the part of the data segment have been sent. During the process of sending the data segment, the second data packet to be sent is received. After it is determined that the second data packet can be combined with the first data packet for transmission and after the data segment of the first data packet is completely sent, the data segment of the second data packet is directly sent, which is equivalent to forming a third data packet. The first data packet and the second data packet are sent in the form of the third data packet. In this way, the sending process of the check segment of the first data packet and the packet header of the second data packet is skipped, and the interframe gap is also skipped, thereby saving the communication resource overhead and improving the data transmission efficiency. It should be noted that the packet header records the destination node address, the data segment records the data packet length information, and the check segment is used for checking the entire data packet to improve the reliability of packet transmission. In the case where the destination nodes of the first data packet and the second data packet are consistent, the second data packet shares the packet header of the first data packet. In addition, after the data segment of the second data packet is completely sent, a new check segment is generated again as the check segment of the combined data packet.
[0076] For example, as shown in FIG. 2, the execution subject of the embodiment of the present application can be a node device 2 located in an industrial communication network system including at least three industrial control node devices (1, 2, 3). The node device includes data sending and data receiving functions. In FIG. 2, the node device 2 is transmitting a data packet 200 with a destination node address of the node device 1 to the node device 1. A data packet 300 with a destination node address of the node device 1 sent by the node device 3 reaches the node device 2 and needs to be sent to the port in the direction of the node device 1. At this time, the sending port in the node device 2 is blocked. At this time, the method of steps S10 to S20 can be used to combine the data packets that meet the data combination transmission condition for transmission, so as to improve the transmission efficiency.
[0077] In addition, after the combined first data packet and the second data packet are sent to the destination node device corresponding to the destination node address, the destination node device can identify the node address information recorded in the data segment in the analysis of the data segment, so as to determine the source node device corresponding to each data segment.
[0078] In another embodiment, the first data packet can be an independent data packet or a combined data packet obtained by using the data packet transmission method of the embodiment of the present application, i.e., the first data packet can also include sub-data segments of multiple sub-data packets. In this case, when calculating the data length, the sub-data packet is taken as a unit, and the cumulative sending length of each sub-data packet in the second data packet and the sending port is summed up to determine whether the sub-data packet can be combined and transmitted.
[0079] The embodiment of the present application provides a data packet transmission method. First, when a first data packet is sent, if the node device receives at least one second data packet to the port that is sending the first data packet, it is determined whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet. If the second destination node address is consistent with the first destination node address, if the sum of the data length of the second data packet and the cumulative sending data packet length of the port sending the first data packet is not greater than a preset data length threshold, the first data packet and the second data packet are combined and transmitted to form a third data packet. The technical solution of the embodiment of the present application combines two independent data packets in the form of a third data packet when the current data packet is being sent at a certain port and a new data packet needs to be sent at the port, and the combination is allowed in terms of the destination node address and the data packet length. Compared with the traditional technical solution in which two independent data packets are sent separately, the technical solution of the present application can reduce the additional time consumption caused by the packet header, the check segment and the interframe gap of the data packet, save the data transmission time and improve the data transmission efficiency.
[0080] Further, in a feasible embodiment, when the second destination node address is consistent with the first destination node address and the first data packet is a packet sent by the port alone, the data packet transmission method further includes:
[0081] Step A10, obtaining the data packet lengths corresponding to the first data packet and the second data packet respectively;
[0082] Step A20, calculating the sum of the data packet lengths to obtain a total data packet length;
[0083] When the first data packet and the second data packet are both independent data packets, at least include a packet header, a data segment, a check segment, etc. As shown in FIG. 3, the first data packet 200 at least includes a packet header 201, a data segment 202, and a check segment 203. The packet header 201 at least includes destination node address information, and the data segment 202 at least includes data packet length and node address information. The node address information is used for analysis by a node device after being sent to a node device corresponding to the destination node address, so as to identify the source node device corresponding to the data segment.
[0084] In step A30, if the total data packet length is greater than the preset data length threshold, the second data packet is sent after the first data packet is completely sent.
[0085] It should be noted that the first data packet sent by the current sending port alone refers to that the first data packet is not sent in combination with other data packets before, and is a data packet sent after the FCS (Frame Check Sequence, check segment) of the previous data packet is completely sent. In this case, if it is determined that the total data packet length of the first data packet and the second data packet is greater than the preset data length threshold, it means that if the first data packet and the second data packet are combined, the data packet length will exceed the maximum data length allowed by the communication protocol or the communication system, and therefore the data packet is sent alone. After the data segment and the check segment of the first data packet are completely sent, the second data packet is sent. Specifically, the packet header of the second data packet is first sent to the node device corresponding to the second destination node address, then the data segment of the second data packet is sent, and finally the check segment of the second data packet is sent.
[0086] In another embodiment, after the total data packet length is calculated according to the data packet length of the first data packet and the data packet length of the second data packet, and compared with the preset data length threshold, if the total data packet length is not greater than the preset data length threshold, step S20 is performed to complete the combined transmission of the data packet. Referring to FIG. 4, in this case, the node device 2 combines the first data packet 200 and the second data packet 300 into a new data packet 100 for sending. For the data packet 100, the packet header comes from the data packet 200. Because the destination node addresses of the data packet 200 and the data packet 300 are the same, they can share one packet header. The data segment 102 is composed of the data segment 202 of the data packet 200 and the data segment 302 of the data packet 300. The final check segment 103 is generated by the newly composed data segment 102 (including the data segment 202 and the data segment 302) for data checking of the data packet 100.
[0087] Further, when the node device 2 faces port blocking, the specific steps of processing the message 200 and the message 300 are shown in FIG. 5. First, in the process of transmitting the message 200, the message header has been transmitted to the destination node device, and the data segment Tx is being transmitted, and the message 300 sent by the node device 3 is received at this time. At this time, the destination node addresses in the message 200 and the message 300 and the respective corresponding data segment length information are identified, and then data combination transmission judgment is performed to judge whether the data message transmission condition (including the same destination node address, the sum of the data lengths does not exceed the preset data length threshold) is met. Finally, under the data message transmission condition, data combination is performed. Specifically, the check segment of the message 200 and the message header and the check segment of the message 300 are abandoned, the data segment Tx of the message 200 and the data segment Rx of the message 300 are connected, and continuous transmission is performed in the process of message sending. It should be noted that the check segment of the combined message of the message 200 and the message 300 is recalculated by the combined data segment.
[0088] In another embodiment, the second data message includes a plurality of sub-data messages, after determining that the second destination node address is consistent with the first destination node address, each sub-data message is sequentially judged whether it meets the combination transmission condition in units of sub-data messages, and the data message transmission method further includes:
[0089] Step A40, sequentially determine the sum of the data length of each sub-data message in the second data message and the cumulative transmission data message length of the port;
[0090] Step A50, if the sum of the data length of the sub-data message and the cumulative transmission data message length of the port does not exceed the preset data length threshold, the sub-data message is combined and transmitted with the first data message;
[0091] Specifically, the length of the first sub-data message in the second data message can be obtained first, and then it is judged whether the sum of the first sub-data message and the cumulative transmission length of the sending port is greater than the preset data length threshold. If the sum of the first sub-data message and the cumulative transmission length of the sending port is not greater than the preset data length threshold, it means that the first sub-data message meets the combination transmission condition, and the sub-data message is combined and transmitted with the first data message.
[0092] Step A60, if the sum of the data length of the sub-data message and the cumulative transmission data message length of the port exceeds the preset data length threshold, the sub-data message is transmitted in the form of a new data message;
[0093] Step A70, clear the cumulative transmission data message length of the port.
[0094] If the sum of the first sub-packet and the accumulated sending length of the sending port is greater than the preset data length threshold, it indicates that the first sub-packet does not meet the condition of combined transmission, and then the sending of the new one data packet is started from the sub-packet, and the accumulated sending length of the port is cleared. According to the above steps, the remaining sub-packets in the second data packet are sequentially determined, until all the sub-packets in the second data packet are determined.
[0095] The embodiment of the application discloses a data packet transmission method in the case that the second data packet is composed of multiple sub-packets. Specifically, in the second data packet, the packet header, data segment and check segment corresponding to each sub-packet are included. The data packet length of each sub-packet is sequentially added to the accumulated sending data packet length of the current sending port, so that it can be determined how many sub-packets in the second data packet can be combined with the first data packet for sending, and the resource overhead of the packet header, check segment and interframe gap is reduced as much as possible, and the data transmission efficiency is improved.
[0096] In the process of sequentially adding the data packet length of each sub-packet to the data packet length of the first data packet, the total packet length is constantly increasing, and each time the total packet length is increased, it is compared with the preset data length threshold, and finally the sub-packets that have been added before the preset data length threshold is greater than the total packet length are determined to obtain the combined data packet that can be transmitted with the first data packet.
[0097] When the sum of the data length of the sub-packet and the accumulated sending data packet length of the current sending port exceeds the preset data length threshold, the sub-packet cannot be combined with the first data packet for sending, and a new packet header needs to be generated to send the sub-packet in the form of a new data packet, and the accumulated sending data packet length of the current sending port is cleared. After that, if the accumulated sending data packet length of the current sending port is to be obtained, the data length of the sub-packet is taken as the starting point for calculation.
[0098] In another embodiment, after the data packet length of each sub-packet is added, the total data packet length is compared with the preset data length threshold once. As long as the total data packet length after combination is not greater than the maximum data packet length allowed by the communication system, the sub-packet is combined with the first data packet. In this way, the combination of data packets is stopped when the total data packet length exceeds the preset data length threshold, or until all the sub-packets in the second data packet are combined.
[0099] In a feasible embodiment, after the step of judging whether the second destination node address of the second data packet is consistent with the first destination node address of the first data packet, the data packet transmission method further comprises:
[0100] Step B10, if the second destination node address is inconsistent with the first destination node address, then waiting for the first data packet to be completely sent, and then sending the second data packet.
[0101] In the case that the second destination node address of the second data packet is inconsistent with the first destination node address of the first data packet, the node device port to which the second data packet is to be sent is also inconsistent, and the combination transmission condition is not met, so in this case, the second data packet is sent in the manner of independent data packet transmission.
[0102] The first data packet is completely sent refers to that the packet header, data segment and check segment of the first data packet are all sent, and after that, when the second data packet is sent, it is first sent to the node device corresponding to the second destination node address according to the packet header, then the data segment is sent, and finally the check segment of the second data packet is sent, completing the whole transmission process of the second data packet.
[0103] In a feasible embodiment, the second data packet includes at least a third data packet and a fourth data packet, and the receiving time point of the third data packet is the same as that of the fourth data packet; the step of combining the first data packet and the second data packet for transmission includes:
[0104] Step C10, after the data segment of the first data packet is sent, the data segment of the third data packet or the fourth data packet is sent;
[0105] Step C20, after the data segment of the third data packet is sent, the data segment of the fourth data packet is sent; or,
[0106] Step C30, after the data segment of the fourth data packet is sent, the data segment of the third data packet is sent.
[0107] The embodiment of the application provides a combination transmission manner when more than one second data packet arrives at the node device at the same time. The third data packet and the fourth data packet have the same destination node address as the first data packet, and in this case, after the data segment of the first data packet is sent, the data segment of the third data packet can be sent first, or the data segment of the fourth data packet can be sent first, both of which can reduce the interframe overhead.
[0108] It should be noted that the sum of the data length of the third data packet and the fourth data packet and the cumulative length of the sent data packet is also not greater than the preset data length threshold.
[0109] Exemplarily, if the data segment of the third data packet is sent first, the step execution sequence is step C10 to step C20; if the data segment of the fourth data packet is sent first, the step execution sequence is step C10 to step C30.
[0110] Further, the data packet transmission method further comprises:
[0111] Step C40, after the data segments of the third data packet and the fourth data packet are sent, the corresponding check segment is calculated based on the continuous data segments sent by the port, and the check segment is attached to the sent data packet and sent;
[0112] The third data packet at least comprises the packet header and the data segment of the first data packet, the data segments corresponding to the third data packet and the fourth data packet respectively, and the check segment.
[0113] Step C40 is executed after step C20 or step C30 is executed, which aims to make the third data packet more complete, and generate the corresponding check segment as the packet tail. At this time, the third data packet formed by the combined transmission journey is equivalent to the combined transmission of the first data packet, the third data packet and the fourth data packet, which saves the interframe overhead between the first data packet and the third data packet and between the third data packet and the fourth data packet.
[0114] In another embodiment, the data packet transmission method further comprises:
[0115] Step D10, if the port is not in the packet sending state when the second data packet to be sent is received, the second destination node address is obtained from the packet header of the second data packet;
[0116] Step D20, sending the second data packet to the node device corresponding to the second destination node address.
[0117] Step D10 and step D20 provide a data packet transmission method in a non-port blocking state. When the second data packet is received, the sending port corresponding to the second data packet in the node device is not in the packet sending state, i.e. the idle state. In this case, no port blocking occurs, so the second destination node address in the packet header of the second data packet is directly obtained, and the packet header, data segment and check segment of the second data packet are sent to the node device corresponding to the second destination node address in turn.
[0118] Exemplarily, referring to the content of the foregoing embodiments, referring to FIG. 6, a feasible data message transmission method provided by the embodiment of the present application can include the following steps: first, receiving a data message by a node device through a receiving port, and then judging whether a sending port is sending data; if not, directly forwarding and recording the destination node address information and the data message length information of the data message; if yes, judging whether the node address information (of the data being sent) is the same; if not, waiting for the previous data message transmission to be completed and then forwarding and recording the destination node address information and the data message length information of the data message; if yes, judging whether the combined message length is too long; if too long, waiting for the previous data message transmission to be completed and then forwarding and recording the destination node address information and the data message length information of the data message; if not too long, transmitting the data message, thereby reducing the time consumption of the data message header, the check section and the interframe gap, and improving the data transmission efficiency and other beneficial effects.
[0119] Further, in another embodiment, the second data message at least includes a third data message and a fourth data message, the receiving time point of the third data message is earlier than the receiving time point of the fourth data message; the data message transmission method further includes:
[0120] Step E10, before the data section of the third data message is sent, if a fourth data message to be sent is received, in the case that the fourth data message length and the cumulative sending data message length of the port are not greater than the preset data length threshold and the fourth destination node of the fourth data message is consistent with the second destination node, the fourth data message and the third data message are combined and sent;
[0121] In the data section sending process of the second data message, the fourth data message which subsequently causes the port to be blocked can also be processed by using a method similar to the method of steps S10 and S20, thereby realizing the combined transmission of continuous multiple data messages.
[0122] Similarly, in the case that the fourth destination node address of the fourth data message is consistent with the second destination node address and the sum of the fourth data message and the cumulative sending data message length of the current sending port is not greater than the preset data length threshold, the data section of the fourth data message can be combined with the data sections of the first data message and the third data message, and after the data section of the third data message is sent, the data section of the fourth data message is continuously sent, thereby saving the resource consumption of the check section after the third data message, the data message header of the fourth data message and the interframe gap, and further improving the data transmission efficiency.
[0123] In a feasible embodiment, after the step of receiving the fourth data message to be sent, the method further includes:
[0124] Step E20, if the sum of the length of the fourth data packet and the cumulative length of the data packets sent by the port is greater than the preset data length threshold or the fourth destination node address of the fourth data packet is inconsistent with the second destination node address, the corresponding check segment is calculated based on the first data packet and the third data packet after the data segment of the third data packet is completely sent, and the check segment is sent to the node device corresponding to the second destination node address;
[0125] In the case that the sum of the length of the fourth data packet and the cumulative length of the data packets sent by the port is greater than the preset data length threshold or the fourth destination node address of the fourth data packet is inconsistent with the second destination node address, it is indicated that the length of the fourth data packet does not meet the combination transmission condition.
[0126] Step E30, the fourth destination node address corresponding to the fourth data packet is obtained from the packet header of the fourth data packet, and the fourth data packet is sent to the node device corresponding to the fourth destination node address.
[0127] In the case that the fourth data packet is received, if it is determined that the sum of the length of the fourth data packet and the cumulative length of the data packets sent by the current sending port is greater than the preset data length threshold, or the fourth destination node address of the fourth data packet is inconsistent with the second destination node address, it can be determined that the combination transmission condition is not met, so the fourth data packet needs to be sent in the form of a separate packet, i.e., the fourth data packet is sent to the node device corresponding to the fourth destination node address. In addition, the data segment of the third data packet is currently being sent, and after the data segment of the third data packet is completely sent, the check segment of the combined data packet is recalculated and generated based on the data segments corresponding to the first data packet and the third data packet, respectively, and finally the check segment is sent to the node device corresponding to the first destination node address (or the second destination node address), completing the entire sending process of the combined data packet.
[0128] It should be noted that the check segment is used to ensure that the data packet does not have errors in the transmission process. Specifically, the calculation method of the check segment is determined according to the specific communication protocol. In the embodiments of the present application, one of the check methods such as checksum, XOR checksum, cyclic redundancy check (CRC), longitudinal redundancy check (LRC), etc. can be used, which is not limited herein.
[0129] In addition, after the sending of the check section of the third data message is completed, the full text of the combined data message of the first data message and the third data message has been sent, and then the fourth data message is sent. The sending method of the fourth data message is the same as that of sending the second data message in the foregoing embodiment (for example, step B10), and the foregoing embodiment can be referred to, and thus the description is omitted here.
[0130] It should be noted that if a new data message is received during the sending of the fourth data message, the destination node address and the data message length of the new data message are determined, and it is determined whether the data message transmission can be performed, so that the data message transmission is performed in the case that the data message transmission can be performed, the communication resource overhead is saved, and the data transmission efficiency is improved.
[0131] In another embodiment, the number of the second data messages is 1, that is, there is only one second data message. In this case, the data message transmission method further includes the following steps.
[0132] In step F10, if no new data message is received before the sending of the data section of the second data message is completed, after the sending of the data section of the second data message is completed, the corresponding check section is calculated based on the continuous data sections that have been sent by the port, and the check section is sent after the data message that has been sent.
[0133] The embodiment of the present application provides a combination transmission method of the first data message and the second data message when the number of the second data messages is 1. Specifically, after the sending of the second data message is completed, the corresponding check section is calculated based on the continuous data sections that have been sent by the port, for example, the check section is calculated according to the data sections of the first data message and the second data message, and finally the check section is sent after the sending of the data section of the second data message is completed.
[0134] In this case, the third data message formed includes the message header and the data section of the first data message, the data section of the second data message, and the check section.
[0135] In addition, the embodiment of the present application further provides a data message transmission device. Referring to FIG. 7, the data message transmission device includes the following components.
[0136] The address judgment module 10 is configured to, when the first data message is sent, if the node device receives at least one second data message to the port that is sending the first data message, determine whether the second destination node address of the second data message is consistent with the first destination node address of the first data message.
[0137] The combination transmission module 20 is configured to, if consistent, combine and transmit the first data packet and the second data packet to form a third data packet, in a case where the sum of the data length of the second data packet and the cumulative data packet length of the port transmitting the first data packet is not greater than a preset data length threshold.
[0138] In an embodiment, the combination transmission module 20 is further configured to:
[0139] transmit the data segment of the second data packet after the data segment of the first data packet is completely transmitted;
[0140] calculate a corresponding check segment based on the continuously transmitted data segments after the data segment of the second data packet is completely transmitted, and transmit the check segment after the transmitted data packet;
[0141] The third data packet at least includes the packet header and the data segment of the first data packet, the data segment of the second data packet, and the check segment.
[0142] In an embodiment, the data packet transmission device further includes a data length judgment module configured to, in a case where the second destination node address is consistent with the first destination node address and the first data packet is a packet transmitted by the port alone:
[0143] obtain the data packet lengths corresponding to the first data packet and the second data packet respectively;
[0144] calculate the sum of the data packet lengths to obtain a total data packet length;
[0145] if the total data packet length is greater than the preset data length threshold, wait until the first data packet is completely transmitted before transmitting the second data packet.
[0146] In an embodiment, the second data packet includes a plurality of sub data packets, and after determining that the second destination node address is consistent with the first destination node address, the combination transmission module 20 is further configured to:
[0147] determine the sum of the data length of each sub data packet in the second data packet and the cumulative data packet length of the port in sequence;
[0148] if the sum of the data length of the sub data packet and the cumulative data packet length of the port does not exceed the preset data length threshold, combine and transmit the sub data packet and the first data packet;
[0149] In an embodiment, after determining that the second destination node address is consistent with the first destination node address, the combination transmission module 20 is further configured to:
[0150] If the sum of the data length of the sub-data packet and the cumulative sending data packet length of the port exceeds the preset data length threshold, the sub-data packet is sent in the form of a new data packet.
[0151] The cumulative sending data packet length of the port is cleared.
[0152] In an embodiment, the data packet transmission device further comprises a packet sending module, which is configured to:
[0153] If the second destination node address is inconsistent with the first destination node address, the second data packet is sent after the first data packet is completely sent.
[0154] In an embodiment, the second data packet comprises at least a third data packet and a fourth data packet, and the receiving time point of the third data packet is earlier than that of the fourth data packet; the combination transmission module 20 is further configured to:
[0155] Before the data segment of the third data packet is completely sent, if a to-be-sent fourth data packet is received, the fourth data packet is combined with the third data packet for transmission if the sum of the data length of the fourth data packet and the cumulative sending data packet length of the port is not greater than the preset data length threshold and the fourth destination node of the fourth data packet is consistent with the second destination node.
[0156] In an embodiment, the combination transmission module 20 is further configured to:
[0157] If the sum of the length of the received fourth data packet and the cumulative sending data packet length of the port is greater than the preset data length threshold or the fourth destination node address of the fourth data packet is inconsistent with the second destination node address, a corresponding check segment is calculated based on the first data packet and the third data packet after the data segment of the third data packet is completely sent, and the check segment is sent to the node device corresponding to the second destination node address.
[0158] The fourth destination node address corresponding to the fourth data packet is obtained from the packet header of the fourth data packet, and the fourth data packet is sent to the node device corresponding to the fourth destination node address.
[0159] In an embodiment, the combination transmission module 20 is further configured to:
[0160] If no new data packet is received before the data segment of the second data packet is sent, after the data segment of the second data packet is sent, a corresponding check segment is calculated based on the continuous data segments sent by the port, and the check segment is sent after the sent data packet.
[0161] In an embodiment, the second data packet comprises at least a third data packet and a fourth data packet, and the third data packet is received at the same time point as the fourth data packet; the combination transmission module 20 is further configured to:
[0162] After the data segment of the first data packet is sent, the data segment of the third data packet or the fourth data packet is sent.
[0163] After the data segment of the third data packet is sent, the data segment of the fourth data packet is sent; or
[0164] After the data segment of the fourth data packet is sent, the data segment of the third data packet is sent.
[0165] In an embodiment, the combination transmission module 20 is further configured to:
[0166] After the data segments of the third data packet and the fourth data packet are sent, a corresponding check segment is calculated based on the continuous data segments sent by the port, and the check segment is sent after the sent data packet.
[0167] The third data packet comprises at least the packet header and the data segment of the first data packet, the data segments corresponding to the third data packet and the fourth data packet, and the check segment.
[0168] In an embodiment, the packet sending module is further configured to:
[0169] If the port is not in the packet sending state when the second data packet to be sent is received, the second destination node address is obtained from the packet header of the second data packet.
[0170] The second data packet is sent to the node device corresponding to the second destination node address.
[0171] The data packet transmission device provided by the application adopts the data packet transmission method in the above embodiments, and can solve the technical problem of low efficiency of the current data transmission scheme for node device port blocking. Compared with the prior art, the data packet transmission device provided by the embodiments has the same beneficial effects as the data packet transmission method provided by the above embodiments, and other technical features in the data packet transmission device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0172] The embodiment of the present application also provides a node device, comprising: at least one processor; and a memory connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data packet transmission method in the above embodiment one.
[0173] Reference is made to Fig. 8, which shows a structural schematic diagram of a node device suitable for implementing the embodiments of the present disclosure. The node device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The node device shown in Fig. 8 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.
[0174] As shown in Fig. 8, the node device can include a processing apparatus 1001 (such as a central processor, a graphics processor, and the like), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or loaded from a storage apparatus 1003 to a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the node device are also stored. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, and the like; and a communication apparatus 1009. The communication apparatus 1009 can allow the node device to communicate with other devices wirelessly or by wire to exchange data. Although the node device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be alternatively implemented or provided.
[0175] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0176] The node device provided in the present application adopts the data message transmission method in the above-mentioned embodiments, and can solve the technical problem of low efficiency of the current data transmission scheme for port blocking of the node device. Compared with the prior art, the beneficial effects of the node device provided in the embodiments of the present application are the same as those of the data message transmission method provided in the above-mentioned embodiments, and other technical features in the node device are the same as those disclosed in the previous embodiment method, which will not be repeated here.
[0177] It should be understood that parts of the present disclosure can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0178] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0179] The embodiments of the present application also provide a computer readable storage medium having computer readable program instructions stored thereon, the computer readable program instructions being used to execute the data message transmission method in the above-mentioned embodiment one.
[0180] The computer readable storage medium provided by the embodiments of the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium may include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the embodiments, the computer readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), and the like, or any suitable combination thereof.
[0181] The computer readable storage medium described above may be contained in a node device or a terminal station, or may exist separately without being assembled into a node device or a terminal station.
[0182] The computer readable storage medium described above carries one or more programs, which, when executed by the node device, cause the node device to perform the following: when sending a first data packet, if the node device receives at least one second data packet to a port that is sending the first data packet, it is determined whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet; if consistent, if the sum of the data length of the second data packet and the cumulative transmission data packet length of the port sending the first data packet is not greater than a preset data length threshold, the first data packet and the second data packet are combined and transmitted to form a third data packet.
[0183] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0184] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may
[0185] The modules involved in the embodiments of the present disclosure can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0186] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions for executing the above-mentioned data message transmission method, and can solve the technical problem of low efficiency of the current data transmission scheme for node device port blocking. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiments of the present application are the same as those of the data message transmission method provided by the above-mentioned embodiments, which will not be repeated here.
[0187] The embodiment of the present application further provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the data packet transmission method as described above.
[0188] The computer program product provided by the present application can solve the technical problem of low efficiency of the current data transmission scheme for node device port blocking. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the data packet transmission method provided by the above-mentioned embodiment, and will not be repeated here.
[0189] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A data packet transmission method applied to a node device, the data packet transmission method comprising: when a first data packet is being sent, if the node device receives at least one second data packet to a port that is sending the first data packet, determining whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet; if consistent, combining and transmitting the first data packet and the second data packet to form a third data packet, under the condition that a sum of a data length of the second data packet and a cumulative transmission data packet length of the port sending the first data packet is not greater than a preset data length threshold.
2. The data packet transmission method of claim 1, wherein, the step of combining and transmitting the first data packet and the second data packet comprises: after a data segment of the first data packet is completely sent, sending a data segment of the second data packet; after a data segment of the second data packet is completely sent, calculating a corresponding check segment based on the continuously sent data segments, and sending the check segment after the sent data packet; wherein the third data packet at least includes a packet header and a data segment of the first data packet, a data segment of the second data packet, and the check segment.
3. The data packet transmission method of claim 1, wherein, in the case that the second destination node address is consistent with the first destination node address and the first data packet is a packet sent by the port alone, the method further comprises: obtaining data packet lengths corresponding to the first data packet and the second data packet respectively; calculating a sum of the data packet lengths to obtain a total data packet length; if the total data packet length is greater than the preset data length threshold, waiting for the first data packet to be completely sent before sending the second data packet.
4. The data packet transmission method of claim 1, wherein, the second data packet includes a plurality of sub data packets, after determining that the second destination node address is consistent with the first destination node address, the data packet transmission method further comprises: determining, in units of each sub data packet in the second data packet, a sum of a data length of each sub data packet and a cumulative transmission data packet length of the port; if the sum of the data length of the sub data packet and the cumulative transmission data packet length of the port does not exceed the preset data length threshold, combining and sending the sub data packet with the first data packet.
5. The data packet transmission method of claim 4, wherein, after determining that the second destination node address is consistent with the first destination node address, the data packet transmission method further comprises: if the sum of the data length of the sub data packet and the cumulative transmission data packet length of the port exceeds the preset data length threshold, sending the sub data packet in the form of a new data packet; clearing the cumulative transmission data packet length of the port.
6. The data packet transmission method of claim 1, wherein, after the step of determining whether the second destination node address of the second data packet is consistent with the first destination node address of the first data packet, the method further comprises: if the second destination node address is not consistent with the first destination node address, waiting for the first data packet to be completely sent before sending the second data packet.
7. The data packet transmission method of claim 1, wherein, The second data message comprises at least a third data message and a fourth data message, and a receiving time point of the third data message is earlier than a receiving time point of the fourth data message; The data message transmission method further comprises: Before the data segment of the third data message is completely sent, if a fourth data message to be sent is received, and a sum of a data length of the fourth data message and a cumulative data message length of the port is not greater than the preset data length threshold and a fourth destination node of the fourth data message is consistent with the second destination node, the fourth data message and the third data message are combined and transmitted.
8. The data packet transmission method of claim 7, wherein, After the step of receiving the fourth data message to be sent, the method further comprises: If a sum of a length of the received fourth data message and the cumulative data message length of the port is greater than the preset data length threshold or a fourth destination node address of the fourth data message is inconsistent with the second destination node address, after the data segment of the third data message is completely sent, a corresponding check segment is calculated based on the first data message and the third data message, and the check segment is sent to a node device corresponding to the second destination node address; A corresponding fourth destination node address is obtained from a message header of the fourth data message, and the fourth data message is sent to a node device corresponding to the fourth destination node address.
9. The data packet transmission method of claim 1, wherein, The number of the second data message is 1, and the data message transmission method further comprises: If no new data message is received before the data segment of the second data message is completely sent, after the data segment of the second data message is completely sent, a corresponding check segment is calculated based on continuous data segments that have been sent by the port, and the check segment is sent after the data message that has been sent.
10. The data packet transmission method of claim 1, wherein, The second data message comprises at least a third data message and a fourth data message, and a receiving time point of the third data message is the same as a receiving time point of the fourth data message; The step of combining and transmitting the first data message and the second data message comprises: After the data segment of the first data message is completely sent, a data segment of the third data message or the fourth data message is sent; After the data segment of the third data message is completely sent, a data segment of the fourth data message is sent; or After the data segment of the fourth data message is completely sent, a data segment of the third data message is sent.
11. The data packet transmission method of claim 10, wherein, The data message transmission method further comprises: After the data segments of the third data message and the fourth data message are completely sent, a corresponding check segment is calculated based on continuous data segments that have been sent by the port, and the check segment is sent after the data message that has been sent; The third data message comprises at least a message header and a data segment of the first data message, data segments corresponding to the third data message and the fourth data message, and the check segment.
12. The data packet transmission method of claim 1, wherein, The data message transmission method further comprises: If the port is not in a message sending state when the second data message to be sent is received, a second destination node address is obtained from a message header of the second data message; send the second data packet to a node device corresponding to the second destination node address.
13. A data packet transmission apparatus, wherein, The data packet transmission device comprises: an address judging module, configured to, when sending a first data packet, if the node device receives at least one second data packet to a port that is sending the first data packet, judge whether a second destination node address of the second data packet is consistent with a first destination node address of the first data packet; a combined transmission module, configured to, if consistent, if a sum of a data length of the second data packet and a cumulative data packet length of the port sending the first data packet is not greater than a preset data length threshold, perform combined transmission on the first data packet and the second data packet to form a third data packet.
14. A node device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the data packet transmission method according to any one of claims 1 to 12.
15. A readable storage medium, which is a computer readable storage medium, and the computer readable storage medium stores a program for implementing a data packet transmission method, and the program for implementing the data packet transmission method is executed by a processor to implement the steps of the data packet transmission method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Processing method for data message transmission, processing device for data message transmission, processing method and device for data message reception
CN106817726A
Message processing method and device
CN109819524A
Message aggregation method and device, network adapter and readable storage medium
CN113542148A
Multicast communication method, electronic equipment and computer readable storage medium
CN116095162A
Data transmission method and device, equipment and storage medium
CN117715110A