[go: up one dir, main page]

CN117544280A - Message transmission method, system, device, equipment and storage medium - Google Patents

Message transmission method, system, device, equipment and storage medium Download PDF

Info

Publication number
CN117544280A
CN117544280A CN202311364618.1A CN202311364618A CN117544280A CN 117544280 A CN117544280 A CN 117544280A CN 202311364618 A CN202311364618 A CN 202311364618A CN 117544280 A CN117544280 A CN 117544280A
Authority
CN
China
Prior art keywords
message
ethernet
communication node
ethernet message
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311364618.1A
Other languages
Chinese (zh)
Inventor
朱珂
钟丹
刘长江
刘雨秾
徐庆阳
王盼
杨晓龙
顾艳伍
刘颜鹏
朱婧瑀
李明秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingxin Microelectronics Technology Tianjin Co Ltd
Original Assignee
Jingxin Microelectronics Technology Tianjin Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingxin Microelectronics Technology Tianjin Co Ltd filed Critical Jingxin Microelectronics Technology Tianjin Co Ltd
Priority to CN202311364618.1A priority Critical patent/CN117544280A/en
Publication of CN117544280A publication Critical patent/CN117544280A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a message transmission method, a system, a device, equipment and a storage medium. The method is applied to a first communication node in the Ethernet and comprises the following steps: acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache; the first Ethernet message carries first identification information; storing a plurality of Ethernet messages for retransmission in a first cache; transmitting a first Ethernet message to a second communication node in the Ethernet; deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node; and stopping sending the new Ethernet message when receiving the non-acknowledgement message aiming at the first Ethernet message and sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node. By retransmitting the first ethernet message in the first buffer, the point-to-point transmission can be reliably and efficiently performed in the ethernet.

Description

Message transmission method, system, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of radar data processing technologies, and in particular, to a method, a system, an apparatus, a device, and a storage medium for transmitting a message.
Background
In applications such as network communications and bus transmission, transmission control protocol (Transmission Control Protocol, TCP) and user datagram protocol (User Datagram Protocol, UDP) are commonly employed to effect point-to-point transmission. Since the UDP protocol is not reliable, packet loss may occur during transmission, and thus, for applications requiring reliability, TCP protocol is generally used for transmission. However, the TCP protocol is a transport layer protocol that builds on top of the physical layer, link layer, and network layer. For ethernet media operating at the link layer, there is currently a lack of a simple, efficient transmission method that can achieve reliable point-to-point transmission.
Disclosure of Invention
The embodiment of the application provides a message transmission method, a system, a device, equipment and a storage medium, so as to realize simple and efficient point-to-point reliable transmission in an Ethernet.
In a first aspect, an embodiment of the present application provides a method for transmitting a message, which is applied to a first communication node in an ethernet network; the message transmission method comprises the following steps:
Acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache; the first Ethernet message carries first identification information; the first cache stores a plurality of Ethernet messages for retransmission;
transmitting the first Ethernet message to a second communication node in the Ethernet;
deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node;
and stopping sending a new Ethernet message when receiving a non-acknowledgement message for the first Ethernet message sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
Optionally, the sending the first ethernet packet to the second communication node includes:
when receiving a confirmation message aiming at a target Ethernet message and sent by the second communication node, sending the first Ethernet message to the second communication node; the target Ethernet message is an Ethernet message sent by the first communication node in the last time.
Optionally, the obtaining the first ethernet packet to be sent includes:
analyzing an initial message from a second cache through a preset interface; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
and adding the first identification information to the initial message to obtain the first Ethernet message.
Optionally, the adding the first identification information to the initial packet to obtain the first ethernet packet includes:
determining the first identification information based on the current message sending quantity;
and adding the first identification information to a preset position of the initial message, and updating a corresponding frame inspection sequence to obtain the first Ethernet message.
Optionally, the method further comprises:
receiving a second Ethernet message sent by the second communication node; the second Ethernet message carries second identification information, and the second Ethernet message is stored in a third cache; the third buffer is used for storing the Ethernet message sent and/or received by the second communication node;
deleting the second identification information in the second Ethernet message to obtain a third Ethernet message, and sending the third Ethernet message to a second cache; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
When the third Ethernet message is verified to be correct, sending a confirmation message aiming at the second Ethernet message to the second communication node, so that the second communication node deletes the second Ethernet message from the third cache based on the second identification information;
and when the third Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the second communication node so that the second communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the third cache based on the second identification information, and retransmitting the second Ethernet message to the first communication node.
In a second aspect, an embodiment of the present application provides a method for transmitting a message, which is applied to a second communication node in an ethernet; the message transmission method comprises the following steps:
receiving a first Ethernet message sent by a first communication node in the Ethernet; the Ethernet message carries first identification information and is stored in a first cache; the first cache stores a plurality of Ethernet messages for retransmission;
when the first Ethernet message is verified to be correct, a confirmation message aiming at the first Ethernet message is sent to the first communication node, so that the first communication node can delete the first Ethernet message from the first cache based on the first identification information;
And when the first Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the first communication node so that the first communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the first cache based on the second identification information, and retransmitting the second Ethernet message to the second communication node.
In a third aspect, an embodiment of the present application provides a packet transmission system, including a first communication node and a second communication node in an ethernet network;
the first communication node is configured to execute the step executed by the first communication node in any implementation manner of the above-mentioned packet transmission method;
the second communication node is configured to perform the step performed by the second communication node in any implementation manner of the above-mentioned message transmission method.
In a fourth aspect, an embodiment of the present application provides a packet transmission device, which is applied to a first communication node in an ethernet network; the transmission device includes:
the acquisition module is used for acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache; the first Ethernet message carries first identification information; the first cache stores a plurality of Ethernet messages for retransmission;
A first sending module, configured to send the first ethernet packet to a second communication node in the ethernet;
the first deleting module is used for deleting the first Ethernet message from the first cache based on the first identification information when receiving the confirmation message for the first Ethernet message sent by the second communication node;
and the second sending module is used for stopping sending a new Ethernet message when receiving the non-acknowledgement message for the first Ethernet message sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
In a fifth aspect, embodiments of the present application provide an electronic device, including: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is configured to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any implementation of the method for transmitting messages applied to a first communication node in ethernet or the method for transmitting messages applied to a second communication node in ethernet.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, where instructions are stored in the computer readable storage medium, where the instructions when executed on an electronic device cause the electronic device to execute any implementation manner of the foregoing packet transmission method applied to a first communication node in ethernet, or the foregoing packet transmission method applied to a second communication node in ethernet.
From the above technical solutions, the embodiments of the present application have the following advantages:
in this embodiment of the present application, a first communication node in the ethernet may first obtain a first ethernet packet to be sent and store the first ethernet packet in a first buffer, where the first ethernet packet carries first identification information, and multiple ethernet packets for retransmission are stored in the first buffer. And then, the first Ethernet message is sent to a second communication node in the Ethernet. Deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node; and stopping sending the new Ethernet message when receiving the non-acknowledgement message aiming at the first Ethernet message and sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node. In this way, in the ethernet, if the first communication node receives the acknowledgement message, it can be stated that the first ethernet message is correctly received by the second communication node, so that the first ethernet message in the first buffer can be deleted, and the message transmission is ended; if the first communication node receives the non-acknowledgement message, it can be stated that the first ethernet message is not correctly received by the second communication node, so that the point-to-point reliable transmission in the ethernet can be simply and efficiently implemented by retransmitting the first ethernet message in the first buffer.
Drawings
Fig. 1 is a schematic structural diagram of a message transmission system according to an embodiment of the present application;
fig. 2 is a flowchart of a message transmission method provided in an embodiment of the present application;
fig. 3a is a schematic diagram of a first ethernet packet according to an embodiment of the present application;
fig. 3b is a schematic diagram of a control message according to an embodiment of the present application;
fig. 4 is a flowchart of another method for transmitting a message according to an embodiment of the present application;
fig. 5 is a schematic diagram of an actual application framework of a message transmission method provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a message transmission device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another message transmission device according to an embodiment of the present application.
Detailed Description
As previously mentioned, the TCP protocol is a transport layer protocol that builds on top of the physical layer, link layer, and network layer. For ethernet media operating at the link layer, there is currently a lack of a simple, efficient transmission method that can achieve reliable point-to-point transmission.
In order to solve the above problem, an embodiment of the present application provides a method for transmitting a message, which may include: a first communication node in the ethernet firstly acquires a first ethernet message to be sent and stores the first ethernet message in a first buffer, wherein the first ethernet message carries first identification information, and a plurality of ethernet messages for retransmission are stored in the first buffer. And then, the first Ethernet message is sent to a second communication node in the Ethernet. Deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node; and stopping sending the new Ethernet message when receiving the non-acknowledgement message aiming at the first Ethernet message and sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
In this way, in the ethernet, if the first communication node receives the acknowledgement message, it can be stated that the first ethernet message is correctly received by the second communication node, so that the first ethernet message in the first buffer can be deleted, and the message transmission is ended; if the first communication node receives the non-acknowledgement message, it can be stated that the first ethernet message is not correctly received by the second communication node, so that the point-to-point reliable transmission in the ethernet can be simply and efficiently implemented by retransmitting the first ethernet message in the first buffer.
It should be noted that, the embodiment of the present application may not limit the execution body of the message transmission method, for example, the message transmission method of the embodiment of the present application may be applied to a data processing device such as a terminal device or a server. The terminal device may be an electronic device such as a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PDA), a tablet computer, etc. The servers may be stand alone servers, clustered servers, or cloud servers.
In order to facilitate understanding of the technical solution provided by the embodiments of the present application, an exemplary description of the message transmission system provided by the embodiments of the present application is first provided below with reference to fig. 1.
Fig. 1 is a schematic structural diagram of a message transmission system according to an embodiment of the present application. Referring to fig. 1, a message transmission system provided in an embodiment of the present application may include: a first communication node and a second communication node in an ethernet network. The two can simply and efficiently realize the point-to-point reliable transmission in the Ethernet through the communication between the specific messages, which is described in detail below.
As an example, the first communication node first obtains a first ethernet packet to be sent and stores the first ethernet packet in the first buffer, and then sends the first ethernet packet to the second communication node in the ethernet. The first Ethernet message carries first identification information, and a plurality of Ethernet messages for retransmission are stored in a first cache.
Correspondingly, the second communication node may feed back to the first communication node an acknowledgement message or a non-acknowledgement message for the first ethernet message. When the first communication node receives the confirmation message, the first communication node can indicate that the first Ethernet message is correctly received by the second communication node, so that the first Ethernet message can be deleted from the first cache based on the first identification information; when receiving the non-acknowledgement message for the first ethernet message sent by the second communication node, it may be indicated that the first ethernet message is not received correctly by the second communication node, so that the first communication node may stop sending the new ethernet message, query the first ethernet message from the first cache based on the first identification information, and resend the first ethernet message to the second communication node. In this way, the point-to-point reliable transmission in the ethernet can be simply and efficiently realized.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Fig. 2 is a flowchart of a message transmission method provided in an embodiment of the present application. Referring to fig. 2, in the packet transmission method provided in the embodiment of the present application, a first communication node in ethernet is used as an implementation of an implementation main description scheme. Specifically, the message transmission may include:
s201: and acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache.
The first buffer stores a plurality of Ethernet messages for retransmission. The first Ethernet message carries first identification information. The first identification information may be represented by an application identifier Frame ID, which may be 16 bits. The implementation process for obtaining the first ethernet packet, that is, step S101, may not be limited in particular, and for convenience of understanding, the following description is provided in connection with one possible implementation manner.
As a possible implementation manner, S201 may include: analyzing an initial message from a second cache through a preset interface; the second cache is used for storing the Ethernet message sent and/or received by the first communication node; the first ethernet packet is obtained as the first identification information of the initial packet Wen Tianjia. In practical applications, the preset interface may be AXI4-stream (a transmission interface for high-speed streaming data). By adding the first identification information, the first Ethernet message stored in the first cache can be quickly found out, so that subsequent operation can be conveniently executed on the first Ethernet message, and the point-to-point reliable transmission in the Ethernet can be simply and efficiently realized.
Further, the process of obtaining the first ethernet packet for the first identification information of the initial packet Wen Tianjia may include: determining first identification information based on the current message sending quantity; and adding the first identification information to a preset position of the initial message, and updating a corresponding frame inspection sequence to obtain a first Ethernet message. Specifically, every time an ethernet packet is sent, the first identification information, that is, the Frame Id, may be increased by 1, so that the first identification information may be quickly determined based on the current number of packets sent. In addition, since the Frame ID field is added to the first ethernet packet, the Frame check sequence corresponding to the first ethernet packet needs to be recalculated. The method for calculating the frame detection sequence is not limited, and may be implemented by any method that can calculate the frame detection sequence, existing or future.
Further, the predetermined location is, for example, a header of the initial message, or other predetermined locations with the receiving party. For ease of understanding, the following description is provided in connection with the accompanying drawings. Fig. 3a is a schematic diagram of a first ethernet packet according to an embodiment of the present application. In fig. 3a, (a) represents an initial packet including a source address (denoted SA in the figure), a destination address (denoted DA in the figure), a Type of the initial packet (denoted Type in the figure), data of the initial packet (denoted Data in the figure), and a frame check sequence (denoted FCS in the figure). (b) The first ethernet packet is represented, and includes a source address (SA in the figure), a destination address (DA in the figure), a Type of the first ethernet packet (Type in the figure), identification information of the first ethernet packet (Frame ID in the figure), data of the first ethernet packet (Data in the figure), and a Frame check sequence (FCS in the figure). Wherein the Frame ID field is located between the Type field and the Data field.
S202: and sending the first Ethernet message to a second communication node in the Ethernet.
Here, the second communication node is a message receiving end of the first ethernet message. In the embodiment of the present application, in order to simply and efficiently implement the point-to-point reliable transmission in the ethernet, a procedure of the first communication node sending the first ethernet packet to the second communication node, that is, step S202, is described below in connection with one possible implementation.
As a possible implementation manner, step S202 may include: when receiving a confirmation message aiming at a target Ethernet message and sent by a second communication node, sending a first Ethernet message to the second communication node; the target ethernet message is an ethernet message sent by the first communication node last time. In this way, in the ethernet, if the first communication node receives the acknowledgement packet for the target ethernet packet, it can be stated that the target ethernet packet sent previously has been received correctly by the second communication node, so that the first ethernet packet can be directly sent to the second communication node without retransmitting the target ethernet packet.
Based on this, it should be noted that, when the first communication node receives the non-acknowledgement message for the target ethernet message sent by the second communication node, it may suspend sending the first ethernet message, query the target ethernet message from the first buffer, resend the target ethernet message to the second communication node, until receiving the acknowledgement message for the target ethernet message sent by the second communication node, and send the first ethernet message to the second communication node. In addition, in addition to receiving the non-acknowledgement message for the target ethernet message sent by the second communication node, if the communication between the first communication node and the second communication node fails, the second communication node may not receive any control message, and at this time, retransmission of the message is also required.
In the embodiment of the application, the confirmation message and the non-confirmation message are both subordinate to the control message. For ease of understanding, the control messages are described below in connection with the accompanying drawings. Fig. 3b is a schematic diagram of a control message according to an embodiment of the present application. In fig. 3b, the Control message may include a source address (denoted SA in the figure), a destination address (denoted DA in the figure), a Type of the Control message (denoted Type in the figure), a Control code (denoted Control Opcode in the figure), identification information of the Control message, a retransmission cause (denoted as retransmission in the middle), and a frame check sequence (denoted FCS in the figure). The unacknowledged message is at least one of an unacknowledged message, a retransmission message, and a retransmission message from a retransmission initiation. In fig. 3b, the control code of the control message corresponds to the type of the control message, and the control code 02-01 is denoted as a confirmation message; the control code 02-02 is expressed as a retransmission message; the control code 02-03 is expressed as a non-acknowledgement message; the control code 02-04 is denoted as retransmission of the message from the retransmission site. The following details each unacknowledged message:
the unacknowledged message is used for indicating that the ethernet message is not successfully received because the ethernet message does not meet the transmission requirement, and therefore needs to be retransmitted, and the reasons of the unacknowledged message are, for example, frame ID error or Frame inspection sequence error of the ethernet message. If the received Ethernet message does not meet the transmission requirement, any field in the Ethernet message at the moment may have an error. Therefore, if the second communication node sends a non-acknowledgement message to the first communication node, the Frame ID of the ethernet message for which the non-acknowledgement message is intended should not be directly extracted from the non-acknowledgement message, but should be a value of 1 plus the Frame ID of the ethernet message that was successfully received before. Taking the communication process between the first communication node and the second communication node as an example, when the first communication node receives the unacknowledged message, the first communication node enters a retransmission state of the transmitting end, the retransmission message from the retransmission position needs to be sent to the second communication node to indicate that the message which is subsequently sent is a retransmitted Ethernet message, and a new Ethernet message is not sent any more, and only the new Ethernet message is stored in the first buffer memory so as to avoid the loss of the new Ethernet message. Correspondingly, when the second communication node sends a non-acknowledgement message to the first communication node, the receiving end retransmission state is entered, a new Ethernet message is not received any more, the receiving end retransmission state is exited until the retransmission message from the retransmission position sent by the first communication node is received, the Ethernet message is received, and the retransmitted Ethernet message is received.
And retransmitting the message, wherein the retransmission message is used for indicating that the message needs to be retransmitted due to insufficient resources. And when the first communication node receives the unacknowledged message, the first communication node enters a transmitting end retransmission state, and needs to firstly transmit the retransmission message from the retransmission position to the second communication node to indicate that the subsequently transmitted message is a retransmitted Ethernet message, and does not transmit a new Ethernet message any more, and only stores the new Ethernet message in the first buffer memory so as to avoid the loss of the new Ethernet message. Correspondingly, when the second communication node sends a non-acknowledgement message to the first communication node, the receiving end retransmission state is entered, a new Ethernet message is not received any more, the receiving end retransmission state is exited until the retransmission message from the retransmission position sent by the first communication node is received, the Ethernet message is received, and the retransmitted Ethernet message is received.
And the message is retransmitted from the retransmission initiation, is used for indicating that the message which is transmitted subsequently is a retransmitted Ethernet message, and can enable the leopard receiving end to exit the retransmission state of the receiving end in response to the retransmission message from the retransmission.
S203: and deleting the first Ethernet message from the first cache based on the first identification information when receiving the confirmation message for the first Ethernet message sent by the second communication node.
The first communication node having received the acknowledgement message for the first ethernet message may indicate that the first ethernet message was received correctly by the second communication node. Accordingly, the first ethernet message is deleted from the first buffer memory, the space of the first buffer memory is released, and the message transmission is ended, because the first ethernet message is correctly received without retransmission.
S204: and stopping sending the new Ethernet message when receiving the non-acknowledgement message aiming at the first Ethernet message and sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
The first communication node receiving the unacknowledged message may indicate that the first ethernet message was not received correctly by the second communication node. Therefore, by retransmitting the first ethernet message in the first buffer, the point-to-point reliable transmission in the ethernet can be simply and efficiently realized.
In addition, in the embodiment of the present application, when the first communication node is used as a message receiving end, the message transmission method may further include the following steps 1 to 4:
step 1: and receiving a second Ethernet message sent by the second communication node.
Here, the second ethernet packet carries second identification information, and the second ethernet packet is stored in the third buffer; the third buffer is used for storing the Ethernet message sent and/or received by the second communication node. For a detailed description of the second ethernet packet and the second identification information, reference may be made to the description of the first ethernet packet and the first identification information in step S101, which is not repeated herein.
Step 2: deleting the second identification information in the second Ethernet message to obtain a third Ethernet message, and sending the third Ethernet message to a second cache.
The second buffer may be used to store ethernet messages sent and/or received by the first communication node. In this embodiment of the present application, after receiving the second ethernet packet, the first communication node may extract the second identification information from the second ethernet packet and delete the second identification information.
Step 3: and when the third Ethernet message is verified to be correct, sending a confirmation message aiming at the second Ethernet message to the second communication node so that the second communication node deletes the second Ethernet message from the third buffer memory based on the second identification information.
Here, the check for the third ethernet packet may include an integrity check and a correctness check. The third ethernet packet verification method is not specifically limited, and the embodiment of the present application may be implemented by any existing or future packet verification method, for example, verification by checksum. Thus, when the verification is correct, it can be stated that the first communication node receives the correct second ethernet message, so that the confirmation message can be fed back to the second communication node serving as the message sending end, so that the second ethernet message can be deleted from the third buffer memory, the space of the third buffer memory is released, and the message transmission is ended.
Step 4: and when the third Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the second communication node so that the second communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the third cache based on the second identification information, and resending the second Ethernet message to the first communication node.
When the check is wrong, it can be stated that the first communication node does not receive the correct second ethernet message, so that the unacknowledged message can be fed back to the second communication node to trigger the second communication node to resend the second ethernet message. For a detailed description of the unacknowledged message, refer to the description of the unacknowledged message in step S102, and the detailed description is omitted herein.
Based on the above content related to steps S201 to S204, in this embodiment of the present application, a first communication node in the ethernet may first obtain a first ethernet packet to be sent and store the first ethernet packet in a first buffer, where the first ethernet packet carries first identification information, and the first buffer stores a plurality of ethernet packets for retransmission. And then, the first Ethernet message is sent to a second communication node in the Ethernet. Deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node; and stopping sending the new Ethernet message when receiving the non-acknowledgement message aiming at the first Ethernet message and sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node. In this way, in the ethernet, if the first communication node receives the acknowledgement message, it can be stated that the first ethernet message is correctly received by the second communication node, so that the first ethernet message in the first buffer can be deleted, and the message transmission is ended; if the first communication node receives the non-acknowledgement message, it can be stated that the first ethernet message is not correctly received by the second communication node, so that the point-to-point reliable transmission in the ethernet can be simply and efficiently implemented by retransmitting the first ethernet message in the first buffer.
Based on the message transmission method provided in the above embodiment, another message transmission method may also be provided in the embodiments of the present application. The message transmission method is described below with reference to the embodiments and the drawings, respectively.
Fig. 4 is a flowchart of another method for transmitting a message according to an embodiment of the present application. Referring to fig. 4, in the message transmission method provided in the embodiment of the present application, a second communication node in ethernet is used as an implementation of the implementation main description scheme. Specifically, the message transmission may include:
s401: and receiving a first Ethernet message sent by a first communication node in the Ethernet.
The Ethernet message carries first identification information and is stored in a first cache. The first buffer stores a plurality of ethernet messages for retransmission.
S402: when the first Ethernet message is checked to be correct, a confirmation message aiming at the first Ethernet message is sent to the first communication node, so that the first communication node deletes the first Ethernet message from the first cache based on the first identification information.
S403: and when the first Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the first communication node so that the first communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the first cache based on the second identification information, and retransmitting the second Ethernet message to the second communication node.
For the specific implementation of step S401 to step S403, reference may be made to the description of step S201 to step S204 in the above embodiment, which is not repeated here.
Based on the above content related to step S401 to step S403, in the embodiment of the present application, the second communication node in the ethernet may receive the first ethernet packet sent by the first communication node in the ethernet; the Ethernet message carries first identification information and is stored in a first cache; the first buffer stores a plurality of ethernet messages for retransmission. When the first Ethernet message is checked to be correct, the second communication node can send a confirmation message aiming at the first Ethernet message to the first communication node so that the first communication node deletes the first Ethernet message from the first cache based on the first identification information; when the first ethernet message is checked for errors, the second communication node may send a non-acknowledgement message for the second ethernet message to the first communication node, so that the first communication node stops sending the new ethernet message, queries the second ethernet message from the first buffer based on the second identification information, and resends the second ethernet message to the second communication node. In this way, in the ethernet, if the first communication node receives the acknowledgement message, it can be stated that the first ethernet message is correctly received by the second communication node, so that the first ethernet message in the first buffer can be deleted, and the message transmission is ended; if the first communication node receives the non-acknowledgement message, it can be stated that the first ethernet message is not correctly received by the second communication node, so that the point-to-point reliable transmission in the ethernet can be simply and efficiently implemented by retransmitting the first ethernet message in the first buffer.
In order to facilitate understanding of the implementation process of the overall scheme, a practical application framework of the scheme is described below with reference to the corresponding drawings. Fig. 5 is a schematic diagram of an actual application framework of a message transmission method provided in an embodiment of the present application. Referring to fig. 5, the method for transmitting a message is applied to an ethernet network, and specifically, a link layer transmission module may be disposed between a conventional link layer and a second buffer. For clarity of transmission of the schematic message, the conventional link layer may be divided into a transmit path and a receive path, and the second buffer may be divided into a transmit buffer and a receive buffer. The link layer transmission module may include a first buffer, an identification information encapsulation module, a message generation module, a transmission selection module, a reception selection module, and an identification information processing module. The first buffer may store a plurality of ethernet packets for retransmission; the identification information encapsulation module can add identification information for the Ethernet message; the message generating module can generate a corresponding confirmation message or non-confirmation message according to the received Ethernet message; the sending selection module can select the Ethernet message in the first cache, the Ethernet message processed by the identification information encapsulation module or the message generated by the message generation module, and send the Ethernet message to a sending passage of the traditional link layer; the receiving selection module can receive the message from the receiving path of the traditional link layer and select to send the message to the message generation module or the identification information processing module; the identification information processing module may delete the identification information of the ethernet message.
Based on the message transmission method provided in the foregoing embodiment, the embodiment of the present application may also provide a message transmission device. The message transmission device is described below with reference to the embodiments and the drawings, respectively.
Fig. 6 is a schematic structural diagram of a message transmission device according to an embodiment of the present application. Referring to fig. 6, a message transmission apparatus 600 provided in an embodiment of the present application is applied to a first communication node in ethernet; the message transmission apparatus 600 includes:
the acquiring module 601 is configured to acquire a first ethernet packet to be sent and store the first ethernet packet in a first cache; the first Ethernet message carries first identification information; the first cache stores a plurality of Ethernet messages for retransmission;
a first sending module 602, configured to send the first ethernet packet to a second communication node in the ethernet;
a first deleting module 603, configured to delete, when receiving a confirmation packet for the first ethernet packet sent by the second communication node, the first ethernet packet from the first cache based on the first identification information;
and the second sending module 604 is configured to stop sending a new ethernet packet when receiving a non-acknowledgement packet for the first ethernet packet sent by the second communication node, query the first ethernet packet from the first cache based on the first identification information, and resend the first ethernet packet to the second communication node.
As an embodiment, the first sending module 602 includes:
a first sending sub-module, configured to send, when receiving a confirmation packet for a target ethernet packet sent by the second communication node, the first ethernet packet to the second communication node; the target Ethernet message is an Ethernet message sent by the first communication node in the last time.
As an embodiment, the obtaining module 601 includes:
the analysis module is used for analyzing the initial message from the second cache through a preset interface; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
and the adding module is used for adding the first identification information to the initial message to obtain the first Ethernet message.
As an embodiment, the adding module includes:
the determining module is used for determining the first identification information based on the current message sending quantity;
and the adding sub-module is used for adding the first identification information to the preset position of the initial message, and updating the corresponding frame inspection sequence to obtain the first Ethernet message.
As an embodiment, the message transmission apparatus 600 further includes:
The first receiving module is used for receiving a second Ethernet message sent by the second communication node; the second Ethernet message carries second identification information, and the second Ethernet message is stored in a third cache; the third buffer is used for storing the Ethernet message sent and/or received by the second communication node;
the second deleting module is used for deleting the second identification information in the second Ethernet message to obtain a third Ethernet message and sending the third Ethernet message to a second cache; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
a third sending module, configured to send, when the third ethernet packet is verified to be correct, a confirmation packet for the second ethernet packet to the second communication node, so that the second communication node deletes the second ethernet packet from the third buffer based on the second identification information;
and the fourth sending module is used for sending a non-acknowledgement message aiming at the second Ethernet message to the second communication node when the third Ethernet message is checked to be wrong, so that the second communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the third cache based on the second identification information, and resending the second Ethernet message to the first communication node.
Fig. 7 is a schematic structural diagram of another message transmission device according to an embodiment of the present application. Referring to fig. 7, a message transmission apparatus 700 provided in an embodiment of the present application is applied to a second communication node in ethernet; the message transmission device 700 includes:
a second receiving module 701, configured to receive a first ethernet packet sent by a first communication node in the ethernet; the Ethernet message carries first identification information and is stored in a first cache; the first cache stores a plurality of Ethernet messages for retransmission;
a fifth sending module 702, configured to send, when the first ethernet packet is verified to be correct, a confirmation packet for the first ethernet packet to the first communication node, so that the first communication node deletes the first ethernet packet from the first cache based on the first identification information;
a sixth sending module 703, configured to send, when the first ethernet packet checks for an error, a non-acknowledgement packet for the second ethernet packet to the first communication node, so that the first communication node stops sending a new ethernet packet, queries, based on the second identification information, the second ethernet packet from the first cache, and resends the second ethernet packet to the second communication node.
Further, the embodiment of the application also provides an electronic device, which comprises: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is configured to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform any implementation of the method for transmitting messages applied to a first communication node in ethernet or the method for transmitting messages applied to a second communication node in ethernet.
Further, the embodiment of the application further provides a computer readable storage medium, in which instructions are stored, when the instructions run on the electronic device, the terminal device is caused to execute any implementation manner of the message transmission method applied to the first communication node in the ethernet, or the message transmission method applied to the second communication node in the ethernet.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus necessary general purpose hardware platforms. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application. It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The message transmission method is characterized by being applied to a first communication node in the Ethernet; the message transmission method comprises the following steps:
acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache; the first Ethernet message carries first identification information; the first cache stores a plurality of Ethernet messages for retransmission;
transmitting the first Ethernet message to a second communication node in the Ethernet;
deleting the first Ethernet message from the first cache based on the first identification information when receiving a confirmation message for the first Ethernet message sent by the second communication node;
and stopping sending a new Ethernet message when receiving a non-acknowledgement message for the first Ethernet message sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
2. The method for transmitting a message according to claim 1, wherein the sending the first ethernet message to the second communication node includes:
when receiving a confirmation message aiming at a target Ethernet message and sent by the second communication node, sending the first Ethernet message to the second communication node; the target Ethernet message is an Ethernet message sent by the first communication node in the last time.
3. The method for transmitting a message according to claim 1, wherein the obtaining a first ethernet message to be transmitted includes:
analyzing an initial message from a second cache through a preset interface; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
and adding the first identification information to the initial message to obtain the first Ethernet message.
4. The method for transmitting a message according to claim 3, wherein said adding the first identification information to the initial message to obtain the first ethernet message includes:
determining the first identification information based on the current message sending quantity;
and adding the first identification information to a preset position of the initial message, and updating a corresponding frame inspection sequence to obtain the first Ethernet message.
5. The method for transmitting a message according to any one of claims 1 to 4, further comprising:
receiving a second Ethernet message sent by the second communication node; the second Ethernet message carries second identification information, and the second Ethernet message is stored in a third cache; the third buffer is used for storing the Ethernet message sent and/or received by the second communication node;
Deleting the second identification information in the second Ethernet message to obtain a third Ethernet message, and sending the third Ethernet message to a second cache; the second cache is used for storing the Ethernet message sent and/or received by the first communication node;
when the third Ethernet message is verified to be correct, sending a confirmation message aiming at the second Ethernet message to the second communication node, so that the second communication node deletes the second Ethernet message from the third cache based on the second identification information;
and when the third Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the second communication node so that the second communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the third cache based on the second identification information, and retransmitting the second Ethernet message to the first communication node.
6. The message transmission method is characterized by being applied to a second communication node in the Ethernet; the message transmission method comprises the following steps:
receiving a first Ethernet message sent by a first communication node in the Ethernet; the Ethernet message carries first identification information and is stored in a first cache; the first cache stores a plurality of Ethernet messages for retransmission;
When the first Ethernet message is verified to be correct, a confirmation message aiming at the first Ethernet message is sent to the first communication node, so that the first communication node can delete the first Ethernet message from the first cache based on the first identification information;
and when the first Ethernet message is checked to be wrong, sending a non-acknowledgement message aiming at the second Ethernet message to the first communication node so that the first communication node stops sending the new Ethernet message, inquiring the second Ethernet message from the first cache based on the second identification information, and retransmitting the second Ethernet message to the second communication node.
7. The message transmission system is characterized by comprising a first communication node and a second communication node in the Ethernet;
the first communication node being configured to perform the steps performed by the first communication node in the message transmission method according to any one of claims 1 to 5;
the second communication node is configured to perform the steps performed by the second communication node in the packet transmission method according to any one of claims 1 to 5.
8. The message transmission device is characterized by being applied to a first communication node in the Ethernet; the transmission device includes:
The acquisition module is used for acquiring a first Ethernet message to be sent and storing the first Ethernet message in a first cache; the first Ethernet message carries first identification information; the first cache stores a plurality of Ethernet messages for retransmission;
a first sending module, configured to send the first ethernet packet to a second communication node in the ethernet;
the first deleting module is used for deleting the first Ethernet message from the first cache based on the first identification information when receiving the confirmation message for the first Ethernet message sent by the second communication node;
and the second sending module is used for stopping sending a new Ethernet message when receiving the non-acknowledgement message for the first Ethernet message sent by the second communication node, inquiring the first Ethernet message from the first cache based on the first identification information, and resending the first Ethernet message to the second communication node.
9. An electronic device, the device comprising: a processor, memory, system bus;
the processor and the memory are connected through the system bus;
the memory is configured to store one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of message transmission of any of claims 1 to 5, or the method of message transmission of claim 6.
10. A computer readable storage medium having instructions stored therein which, when executed on an electronic device, cause the electronic device to perform the message transmission method of any one of claims 1 to 5 or the message transmission method of claim 6.
CN202311364618.1A 2023-10-20 2023-10-20 Message transmission method, system, device, equipment and storage medium Pending CN117544280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311364618.1A CN117544280A (en) 2023-10-20 2023-10-20 Message transmission method, system, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311364618.1A CN117544280A (en) 2023-10-20 2023-10-20 Message transmission method, system, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117544280A true CN117544280A (en) 2024-02-09

Family

ID=89794751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311364618.1A Pending CN117544280A (en) 2023-10-20 2023-10-20 Message transmission method, system, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117544280A (en)

Similar Documents

Publication Publication Date Title
US8976814B2 (en) Method of transporting data from sending node to destination node
CN103973421A (en) File transmitting method and device
CN110247736B (en) Data transmission method and device
CN105103500A (en) Communication method, communication device and communication program
CN108234087A (en) Data transmission method and transmitting terminal
CN111404872A (en) Message processing method, device and system
CN116896567B (en) Method and device for transmitting data by network layer protocol
US8009694B2 (en) Wireless services provider network system and method
WO2024169301A1 (en) Data retransmission method, electronic device, and computer readable storage medium
CN106506124A (en) Method and device for determining retransmission message
CN109120385B (en) Data transmission method, device and system based on data transmission system
CN103534973B (en) A kind of methods, devices and systems reducing transmission control layer confirmation message
EP3672189B1 (en) Data transmission method, device and system
US20240333437A1 (en) Direct Access To Storage Device Via Switch Data Plane
CN113259490B (en) Multi-level node network data transmission method based on UDP transmission protocol
CN109525374B (en) Data transmission method, wireless access point, user equipment and transmission equipment
CN109067503B (en) A data retransmission method and device
CN117544280A (en) Message transmission method, system, device, equipment and storage medium
CN117040692A (en) Method and device for transmitting service data, electronic equipment and storage medium
US7995517B2 (en) System and method for transmitting units of messages in a mobile communication system
CN116582826A (en) Message transmission method, electronic equipment and storage medium
CN111181628B (en) Method, terminal and storage medium for transmitting voice data through Beidou short message
CN106941398A (en) A kind of communication means based on SPI protocol, apparatus and system
JP2005286832A (en) Atm communication system and atm communication method
CN119583014B (en) Response frame error correction method, device, storage medium and WiFi device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination