WO2023151329A1 - Packet forwarding method, computer device, storage medium, program product and chip - Google Patents

Packet forwarding method, computer device, storage medium, program product and chip Download PDF

Info

Publication number
WO2023151329A1
WO2023151329A1 PCT/CN2022/131220 CN2022131220W WO2023151329A1 WO 2023151329 A1 WO2023151329 A1 WO 2023151329A1 CN 2022131220 W CN2022131220 W CN 2022131220W WO 2023151329 A1 WO2023151329 A1 WO 2023151329A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
target
sending
message
receiving device
Prior art date
Application number
PCT/CN2022/131220
Other languages
French (fr)
Chinese (zh)
Inventor
于德雷
徐安民
李凤凯
王闯
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023151329A1 publication Critical patent/WO2023151329A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • H04L47/286Time to live
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2408Traffic characterised by specific attributes, e.g. priority or QoS for supporting different services, e.g. a differentiated services [DiffServ] type of service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • H04L47/564Attaching a deadline to packets, e.g. earliest due date first
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6235Variable service order
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the technical field of communications, and in particular to a message forwarding method, computer equipment, storage media, program products and chips.
  • the forwarding device in the network will forward the data message until the data is transmitted to the receiving device.
  • the forwarding device will receive multiple data packets from different sources. Specifically, the forwarding device will sequentially add multiple data packets to the data queue according to the order in which the multiple data packets arrive. And sequentially forward multiple data packets in the queue in a first-in-first-out manner. In this method, the arrival time of the data message is used as the basis for message forwarding, and the time-limited transmission of the data message is not considered, so it is very easy to cause the data message to reach the receiving device overtime.
  • an existing solution is that the sending device calculates the sending rate of the data message storing the data according to the time-limited information of the data (such as the limited time point or the limited transmission duration), and sends the bandwidth generated by the sending rate Request message, the network device between the sending device and the receiving device will receive the bandwidth request message, determine the bandwidth allocated to the data message, write the bandwidth into the bandwidth message and transmit it to the receiving device, and the receiving device will send the request message to the sending device Send a message containing bandwidth information, the sending device adjusts the sending rate of the data message according to the bandwidth, and sends the data message according to the adjusted sending rate, so that the data message is received by the receiving device before the limited time point.
  • the sending device calculates the sending rate of the data message storing the data according to the time-limited information of the data (such as the limited time point or the limited transmission duration), and sends the bandwidth generated by the sending rate Request message
  • the network device between the sending device and the receiving device will receive the bandwidth request message, determine the bandwidth allocated to the data message, write the bandwidth into
  • This method requires a round of information interaction between the sending device and the receiving device, and requires the sending device to calculate and adjust the sending rate for each data packet, resulting in more resources and more time for data transmission.
  • the sending device determines the sending rate of data packets in sequence according to the sequence of received data, which still cannot completely solve the problem of time-limited transmission of data packets, and it is very easy for some data packets to reach the receiving device overtime .
  • the first aspect of the present application provides a message forwarding method, which is applied to a message forwarding device in a target network, where the target network further includes a sending device and a receiving device, the message forwarding device, the sending device and the
  • the clock synchronization message forwarding method of the receiving device includes:
  • Receiving a data packet sent by a sending device the data packet including address information of the receiving device of the data packet, and the receiving deadline of the receiving device for the data packet; based on the receiving device's Address information, determining the target transmission time required for the message forwarding device to transmit the data message to the receiving device; according to the target transmission time and the receiving cut-off time point, determine the data message at The sending deadline of the message forwarding device; the data message is added to the target data queue to which the sending deadline belongs, the target data queue corresponds to a target sending time period, and the target data queue includes At least one message to be sent including the data message, the sending deadline of each message to be sent is within the target sending time period; within the target sending time period, send the The target data queue includes at least one message to be sent.
  • the sending deadline of the data packet on the forwarding device can be determined according to the information carried in the data packet, and the data packet can be added to the target data queue to which the sending deadline belongs, so that During the corresponding target sending time period, at least one message to be sent in the target data queue, including the data message, is sequentially sent.
  • the adding the data packet to the target data queue to which the sending deadline belongs includes:
  • each of the data queues corresponds to a sending time period; from the sending time periods corresponding to each data queue, determine the target sending time period to which the sending deadline of the data message belongs; Add the data packet to the target data queue corresponding to the target sending time period.
  • each data message can be stored in different data queues according to the time limit information (sending deadline) of the data message in the forwarding device, and each data queue corresponds to a sending time period.
  • the priority is set for each data queue according to the length of time between the sending time period corresponding to each data queue and the current time point;
  • the sending out at least one message to be sent in sequence including the data message in the target data queue within the target sending time period includes: when the current time point is within the target sending time period , determining that the priority of the target data queue is the highest, and sequentially sending at least one message to be sent in the target data queue including the data message.
  • the priority can be set for each data queue.
  • the packet forwarding method further includes:
  • the sending time period corresponding to the data queue can be adaptively updated as time progresses, and the priority of the data queue can be updated, so that the packet forwarding device can forward the data packets received later
  • the files are correspondingly assigned to the data queues to which they belong.
  • the data packet is sent by the sending device at a target sending rate, where the target sending rate includes a maximum sending rate.
  • the packet forwarding method further includes:
  • the receiving device can flexibly process the first data in the data message and the target transmission data to which the first data belongs according to the receiving deadline in the received data message.
  • the determining the target transmission duration required for the packet forwarding device to transmit the data packet to the receiving device based on the address information of the receiving device includes:
  • the preset relationship table including the transmission duration corresponding to the address information of each device in the target network; determining the target transmission time corresponding to the address information of the receiving device from the preset relationship table duration, where the target transmission duration is the duration required for the packet forwarding device to transmit the data packet to the receiving device.
  • the target transmission time required for the message forwarding device to transmit the data message to the receiving device can be determined according to the preset relationship table in the message forwarding device.
  • the determining the target transmission duration required for the packet forwarding device to transmit the data packet to the receiving device based on the address information of the receiving device includes:
  • the receiving device Based on the address information of the receiving device, determine a transmission path between the packet forwarding device and the received data, where the transmission path includes at least one intermediate device; obtain the transmission path between the packet forwarding device and the intermediate device The first transmission duration required for the data message, and the second transmission duration required for the intermediate device and the receiving device to transmit the data message; according to the first transmission duration and the second transmission duration, Calculate the target transmission time required for the packet forwarding device to transmit the data packet to the receiving device.
  • the present application provides a computer device, which includes at least one processor, a memory, and a communication module;
  • At least one processor is connected to the memory and the communication module; the memory is used to store instructions, the processor is used to execute the instructions, and the communication module is used to communicate with the device under the control of at least one processor; when the instructions are executed by the at least one processor, Make at least one processor execute the packet forwarding method of the first aspect.
  • the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program causes a computer device to execute the message forwarding method in the first aspect.
  • the present application provides a computer program product, the computer program product includes computer readable instructions, and when the computer readable instructions are executed by one or more processors, the message forwarding method of the first aspect is implemented.
  • the present application provides a chip coupled with a memory in a computer device, and the chip is used to control the computer device to implement the message forwarding method in the first aspect.
  • the computer device provided by the second aspect above, the computer-readable storage medium provided by the third aspect, the computer program product provided by the fourth aspect, and the chip provided by the fifth aspect correspond to the method provided by the first aspect above , therefore, reference may be made to the above for the beneficial effects or various implementation manners it can achieve, and details will not be repeated here.
  • FIG. 1 is a schematic diagram of an application scenario of a message forwarding method provided in an embodiment of the present application
  • FIG. 2 is a schematic flow diagram of a message forwarding method provided in an embodiment of the present application
  • FIG. 3 is an interactive schematic diagram of a message forwarding method provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a scheme comparison of the message forwarding method provided by the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the target network may include multiple devices, and the devices may include sending devices, receiving devices, etc., and the sending devices may include devices that send data.
  • the receiving device can include a device that receives data, and the sending device and receiving device can be computer devices, such as personal computers, smart phones, smart wearable devices, smart homes, smart TVs, etc.
  • the devices can also include message forwarding devices, message
  • the forwarding device may include a device for forwarding data packets transmitted in the target network, and the packet forwarding device may be a network device, such as a computer device, a switch, a routing device, a hub, a bridge, and the like. Multiple devices in the target network can be connected by wire or wirelessly.
  • Clock synchronization of multiple devices in the target network of the present application may include setting a high-precision clock synchronization chip on each device, or based on a clock synchronization protocol, such as a high-precision time synchronization protocol (Precision Time Protocol, PTP), Network Time Protocol (Network Time Protocol, NTP), etc., can be flexibly selected according to actual application scenarios, and there is no limitation here.
  • a high-precision time synchronization protocol Precision Time Protocol, PTP
  • Network Time Protocol Network Time Protocol
  • NTP Network Time Protocol
  • the message forwarding device can receive the data message sent by the sending device.
  • the data message includes the address information of the receiving device of the data message and the receiving deadline of the receiving device for the data message; based on the address information of the receiving device, determine the The target transmission time required for the message forwarding device to transmit the data message to the receiving device; according to the target transmission time and the receiving deadline, determine the sending deadline of the data message at the message forwarding device; add the data message to the sending deadline In the target data queue to which the time point belongs, the target data queue corresponds to a target sending time period, the target data queue includes at least one message to be sent, and the sending deadline of each message to be sent is within the target sending time period; During the sending time period, at least one message to be sent including the data message in the target data queue is sent in sequence.
  • the message forwarding device can determine the target transmission time required for the message forwarding device to transmit the data message from the receiving device according to the address information of the receiving device carried in the data message, and then combine the data message
  • the carrying receiving device determines the sending deadline of the data message on the message forwarding device according to the receiving deadline of the data message, so that the message forwarding device can send the data message before the sending deadline, thereby ensuring The data packet is received by the receiving device before the receiving deadline.
  • FIG. 1 is a schematic diagram of an application scenario of the message forwarding method of the present application.
  • the message forwarding method of the present application can be applied to a target network including a sending device, a message forwarding device, and a receiving device.
  • the clock synchronization between the file forwarding device and the receiving device can be performed based on hardware and/or protocols.
  • the data message sent by the sending device can carry time-limited information.
  • the time-limited information can be such as the limited transmission time of the data message, or the receiving deadline (limited time point) of the message at the receiving device.
  • the message forwarding device can be based on The time limit information determines the sending deadline of the data message at the message forwarding device, and sends the data message before the sending deadline.
  • the receiving device can receive the data message and determine the data message according to the time limit information carried in the data message. Whether the message arrives at the receiving device overtime, if the timeout occurs, the data message is discarded, and if the data message is not overtime, the data included in the data message is reported. Thus, the time-limited transmission of the data message in the target network can be realized through the time-limited information carried in the data message.
  • FIG. 2 is a schematic flow chart of a message forwarding method applied to a message forwarding device, specifically including:
  • the sending device can divide the data to be transmitted into at least one data message according to the data to be transmitted and its time limit information, and carry the time limit information and the address information of the receiving device of the data to be transmitted in each data message, and the time limit information It can include the time-limited transmission duration of the data to be transmitted, or the limited arrival time point of the data to be transmitted (that is, the receiving cut-off time point of the receiving device).
  • the limited transmission time length and the limited arrival time point are essentially the same, such as data 1
  • the limited transmission duration of is 200 microseconds, that is, data 1 is transmitted within 200 microseconds, and the current time point is known to be 100 microseconds, so it can be known that the limited arrival time point is 300 microseconds.
  • the sending device can send a data message
  • the message forwarding device can receive the data message, and analyze the data message to determine the address information of the receiving device contained in it, and the reception deadline of the receiving device for the data message.
  • the sending device can send the message based on the target sending rate, which can include the maximum sending rate, so as to complete the sending process of the data message faster and reduce the time-consuming of sending the data message.
  • the target sending rate which can include the maximum sending rate
  • the target sending rate can also include a pre-set default value.
  • the target sending rate can also be calculated through the feedback information returned by the device including the message forwarding device/receiving device in the target network. In actual application, it can be flexibly determined in combination with the application scenario Target send rate.
  • the message forwarding device can obtain a preset relationship table, and the preset relationship table can include the transmission time corresponding to the address information of each device in the target network, and the transmission time can include data transmission from the message forwarding device to the device
  • the target transmission duration corresponding to the address information of the receiving device can be determined from the preset relationship table, and the target transmission duration is the duration required for the message forwarding device to transmit the data message to the receiving device .
  • the transmission time 1 corresponding to the address information of the receiving device of the data message 1 is searched, and the transmission time 1 is the time required to transmit the data message from the switch to the receiving device.
  • the message forwarding device may determine the transmission path of the data message from the message forwarding device to the receiving device according to the address information of the receiving device, and the transmission path may include transferring the data message from the data forwarding device to the receiving device in the target network.
  • a transmission path to a receiving device, the transmission path may include at least one intermediate device in the target network.
  • the devices in the target network can periodically broadcast the transmission time required to transmit data packets between itself and other devices in the target network, and the packet forwarding device stores the first transmission time required for data transmission between the packet forwarding device and the intermediate device. Duration, the second transmission time required for the intermediate device and the receiving device to transmit the data message, the message forwarding device can determine the time required for the message forwarding device to transmit the data message to the receiving device based on the first transmission time and the second transmission time For the target transmission duration, for example, the packet forwarding device may add the first transmission duration, the second transmission duration, and the preset duration to obtain the target transmission duration.
  • the target transmission duration can be the minimum transmission duration, maximum transmission duration, average transmission duration, etc. required to transmit data packets from the message forwarding device to the receiving device, and can be flexibly selected according to actual scenarios. For example, if the target transmission duration is the maximum The transmission time can make the data message arrive at the receiving device as early as possible.
  • the process of determining the sending deadline according to the target transmission duration and the receiving deadline can be, for example, subtracting the target transmission duration from the receiving deadline to obtain the sending deadline of the data message at the message forwarding device.
  • the target data queue corresponds to a target sending time period
  • the target data queue includes at least one message to be sent
  • the sending deadline of each message to be sent The point is within the target emission time period.
  • the message forwarding device can determine the target transmission time required for the message forwarding device to transmit the data message from the receiving device according to the address information of the receiving device carried in the data message, and then combine the data message
  • the carrying receiving device determines the sending deadline of the data message on the message forwarding device according to the receiving deadline of the data message, so that the message forwarding device can send the data message before the sending deadline, thereby ensuring The data packet is received by the receiving device before the receiving deadline.
  • the sending device may be a sending end
  • the receiving device may be a receiving end
  • the forwarding device may be a receiving end
  • the packet forwarding device may be a forwarding device.
  • the message forwarding method of the present application may include the following steps:
  • the sender obtains the data submitted by the application and the limited transmission time of the data.
  • the application submits data to the sender, as well as time-limited information DLO of the data.
  • the time-limited information DLO may limit the transmission time to 200 microseconds.
  • the sending end divides the data into packets to obtain at least one data message, the data message includes part or all of the data, and the address information of the receiving end of the data and the receiving deadline.
  • the receiving deadline is the sending end starting from the current time point Add the limited transmission time to get.
  • the sender subpackages the data submitted by the application to obtain multiple data packets, and adds time-limited information DL1 in each data packet.
  • the time-limited information DL1 can be used by the receiving device to receive data packets.
  • the cut-off time point is 300 microseconds, and 300 microseconds is obtained by adding 100 microseconds to the current time plus a limited transmission time of 200 microseconds.
  • the forwarding device receives and parses the data packet transmitted by the sending end, and determines a receiving device of the data packet and a deadline for receiving the data packet by the receiving device.
  • the forwarding device calculates the sending deadline of the data packet at the forwarding device according to the stored transmission duration of the path from the forwarding device to the receiving device and the receiving deadline.
  • the forwarding device can calculate or determine the time limit information DL2 of the data message on the forwarding device according to the time limit information DL1. It is obtained by subtracting 100 microseconds from the forwarding device to the receiving device from the receiving cut-off time point of 300 microseconds.
  • the transmission path from the forwarding device to different devices is different, so the transmission time will be different.
  • the data packets transmitted to different devices have different sending deadlines at the forwarding device.
  • the forwarding device receives the data packet at the same time. 1 and data message 2, data message 1 is the data message transmitted to receiving device 1, data message 2 is the data message transmitted to receiving device 2, and the receiving deadline of data message 1 and data message 2
  • the points are all 100 microseconds, the minimum transmission time from the forwarding device to the receiving device 1 is 20 microseconds, and the minimum transmission time from the forwarding device to the receiving device 2 is 30 microseconds, then it can be calculated that the data packet 1 is sent by the forwarding device
  • the deadline is 80 microseconds, and the deadline for sending the data packet 2 at the forwarding device is 70 microseconds.
  • the forwarding device determines and adds the data message to the target data queue according to the sending deadline of the data message.
  • the target data queue corresponds to a target sending time period, and the sending deadline is within the target sending time period.
  • the forwarding device is provided with a queue 1, a queue 2, and a queue 3, and the three queues correspond to a sending time period respectively, and the forwarding device determines the queue 2 corresponding to the sending time period to which the time limit information DL2 of the data message belongs, And add the data packet to queue 2.
  • the forwarding device sequentially sends out the messages to be sent including the data messages in the target data queue.
  • the forwarding device can perform queue scheduling and data packet forwarding according to the sending time period corresponding to each data queue and the current time, and send the data packets in the corresponding queue sequentially during the sending time period.
  • the forwarding device is equipped with multiple data queues, each data queue corresponds to a sending time period, all sending time periods are continuous with each other, the length of the sending time period can be set arbitrarily, and the sending time periods of different data queues can be the same or different , for example, the duration of the sending time period may be 2 microseconds, and the duration of all sending time periods is the same.
  • the priority of each data queue can be set. For example, the priority of the sending time period closer to the current time point is higher, and as time goes by, each sending time
  • the priority of the segment can be dynamically updated, and for the data queue that has timed out the sending time period, the sending time period corresponding to the data queue can also be updated.
  • Table 1 shows the priorities of different queues and the corresponding sending time periods at different times.
  • the sending period of queue 1 times out, at this time the priority of queue 1 becomes 3 (lowest), and the sending time period of queue 1 is updated to 20-25us. After the priority of queue 1 becomes the lowest, the priorities of queue 2, queue 3, and queue 4 increase accordingly, but their sending time periods remain unchanged.
  • each queue will time out in turn, and the priority and sending time period of the queue will also change in turn.
  • the receiving end receives and parses the data packet, and determines to discard or submit the data in the data packet to the application according to the receiving deadline of the data packet.
  • the receiving end may parse the data packet, and process the data packet based on the parsed receiving deadline. If the current time has passed the receiving deadline, the data packet and other data packets that carry different parts of the same data as the data packet can be discarded, or other parts of the data and part of the data in the data packet can be reported Scope description information for .
  • the data forwarding method of the present application can to a greater extent enable data packets that need to be transmitted within a limited time period to complete data transmission within a limited time period.
  • FIG. 4 the abscissa of FIG. It can be seen from FIG. 4 that when the message is forwarded through the prior art (FIFO), the number of overtime data blocks increases gradually as the number of concurrent data blocks increases, and when the message is forwarded through the solution (Deadline) of the present application, As the number of concurrent data blocks increases, the number of overtime data blocks remains at a low level, effectively ensuring the effectiveness of data transmission within the network.
  • a computer device 100 may include a screen 1001 , a processor 1002 , a memory 1003 and a communication bus 1004 .
  • the memory 1003 is used to store one or more computer programs 1005 .
  • One or more computer programs 1005 are configured to be executed by the processor 1002 .
  • the one or more computer programs 1005 include instructions, and the above instructions may be used to implement all or part of the steps of the method for forwarding the message in the computer device 100 .
  • computer device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • computer device 100 may also include a camera.
  • the processor 1002 may include one or more processing units, for example: the processor 1002 may include an application processor (application processor, AP), a modem, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem graphics processing unit
  • GPU graphics processing unit
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the processor 1002 may also be provided with a memory for storing instructions and data.
  • the memory in processor 1002 is a cache memory.
  • the memory may hold instructions or data that the processor 1002 has just used or recycled. If the processor 1002 needs to use the instruction or data again, it can be directly recalled from the memory. Repeated access is avoided, and the waiting time of the processor 1002 is reduced, thus improving the efficiency of the system.
  • processor 1002 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, SIM interface, and/or USB interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM interface SIM interface
  • USB interface etc.
  • the memory 1003 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, internal memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital (SD) card, flash card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
  • a non-volatile memory such as a hard disk, internal memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital (SD) card, flash card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
  • This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to implement the message forwarding method in the above-mentioned embodiment .
  • This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the message forwarding method in the above embodiment.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the message forwarding methods in the above method embodiments.
  • the computer equipment, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are schematic.
  • the division of the modules or units is a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or may be integrated into another device, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and a component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a packet forwarding method, a computer device, a storage medium, a program product and a chip, which are applied in a packet forwarding device in a target network, the target network further comprising a transmitting device and a receiving device, and clocks of the packet forwarding device, the transmitting device and the receiving device being synchronous. The method comprises: receiving a data packet, the data packet comprising address information of a receiving device of the data packet, and a receiving cut-off time point of the receiving device for the data packet; on the basis of the address information of the receiving device, determining a target transmission duration required for transmitting the data packet; according to the transmission duration and the receiving cut-off time point, determining a transmitting cut-off time point of the data packet in the packet forwarding device; adding the data packet to a target data queue to which the transmitting cut-off time point belongs; and within a target transmitting time period, sequentially transmitting at least one packet to be transmitted in the target data queue, including the data packet. According to the application, a data packet needing to be transmitted within a limited period of time can arrive at the receiving device in time.

Description

报文转发方法、计算机设备、存储介质、程序产品及芯片Message forwarding method, computer equipment, storage medium, program product and chip
相关申请的交叉引用Cross References to Related Applications
本申请主张于2022年02月09日提交中国专利局,申请号为202210122762.3、申请名称为“报文转发方法、计算机设备、存储介质、程序产品及芯片”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210122762.3 and the application name "Message forwarding method, computer equipment, storage medium, program product and chip" submitted to the China Patent Office on February 09, 2022, all of which The contents are incorporated by reference in this application.
技术领域technical field
本申请涉及通信技术领域,尤其涉及了报文转发方法、计算机设备、存储介质、程序产品及芯片。The present application relates to the technical field of communications, and in particular to a message forwarding method, computer equipment, storage media, program products and chips.
背景技术Background technique
由于业务需求等原因,网络中的一些数据报文需要在限定传输时长内传输到接收设备,也即数据报文需要在限定时间点前被接收设备接收到,否则这些数据报文将被接收设备丢弃。在将数据报文从发送设备传输到接收设备的过程中,网络中的转发设备会转发数据报文,直至将数据传输到接收设备。在此过程中,转发设备会接收不同来源的多个数据报文,具体地,转发设备会按照多个数据报文到达时间点的先后顺序,依次将多个数据报文添加到数据队列中,并按照先进先出的方式依次转发队列内的多个数据报文。此种方式将数据报文的到达时间点作为报文转发的先后依据,并未考虑到数据报文的限时传输问题,因此极易导致数据报文超时到达接收设备。Due to business requirements and other reasons, some data packets in the network need to be transmitted to the receiving device within a limited transmission time, that is, the data packets need to be received by the receiving device before the limited time point, otherwise these data packets will be received by the receiving device throw away. During the process of transmitting the data message from the sending device to the receiving device, the forwarding device in the network will forward the data message until the data is transmitted to the receiving device. During this process, the forwarding device will receive multiple data packets from different sources. Specifically, the forwarding device will sequentially add multiple data packets to the data queue according to the order in which the multiple data packets arrive. And sequentially forward multiple data packets in the queue in a first-in-first-out manner. In this method, the arrival time of the data message is used as the basis for message forwarding, and the time-limited transmission of the data message is not considered, so it is very easy to cause the data message to reach the receiving device overtime.
为了缓解超时问题,现有的一种方案是,发送设备根据数据的限时信息(如限定时间点或限定传输时长)计算保存该数据的数据报文的发送速率,并发送由发送速率生成的带宽请求报文,发送设备和接收设备之间的网络设备会接收到带宽请求报文,确定分配给数据报文的带宽,并将该带宽写入带宽报文传输至接收设备,接收设备向发送设备发送包含带宽信息的报文,发送设备根据此带宽调整数据报文的发送速率,并依据调整后的发送速率发送数据报文,以使数据报文在限定时间点前被接收设备接收到。此种方式需要发送设备与接收设备之间进行一轮信息交互,且需要发送设备针对每个数据报文计算和调整发送速率,导致实现数据传输需要耗费更多资源,花费更多时间。此外在此方案中,发送设备是根据接收到数据的先后顺序依次确定数据报文的发送速率,依然无法完全解决数据报文的限时传输问题,极易出现部分数据报文超时到达接收设备的情况。In order to alleviate the timeout problem, an existing solution is that the sending device calculates the sending rate of the data message storing the data according to the time-limited information of the data (such as the limited time point or the limited transmission duration), and sends the bandwidth generated by the sending rate Request message, the network device between the sending device and the receiving device will receive the bandwidth request message, determine the bandwidth allocated to the data message, write the bandwidth into the bandwidth message and transmit it to the receiving device, and the receiving device will send the request message to the sending device Send a message containing bandwidth information, the sending device adjusts the sending rate of the data message according to the bandwidth, and sends the data message according to the adjusted sending rate, so that the data message is received by the receiving device before the limited time point. This method requires a round of information interaction between the sending device and the receiving device, and requires the sending device to calculate and adjust the sending rate for each data packet, resulting in more resources and more time for data transmission. In addition, in this solution, the sending device determines the sending rate of data packets in sequence according to the sequence of received data, which still cannot completely solve the problem of time-limited transmission of data packets, and it is very easy for some data packets to reach the receiving device overtime .
发明内容Contents of the invention
有鉴于此,有必要提供一种报文转发方法、计算机设备、存储介质、程序产品及芯片,可以使得需要限时传输的数据报文及时到达接收设备。In view of this, it is necessary to provide a message forwarding method, a computer device, a storage medium, a program product and a chip, which can make the data message that needs to be transmitted within a limited time reach the receiving device in time.
本申请第一方面提供了一种报文转发方法,应用于目标网络中的报文转发设备,所述目标网络还包括发送设备及接收设备,所述报文转发设备,所述发送设备及所述接收设备时钟同步报文转发方法包括:The first aspect of the present application provides a message forwarding method, which is applied to a message forwarding device in a target network, where the target network further includes a sending device and a receiving device, the message forwarding device, the sending device and the The clock synchronization message forwarding method of the receiving device includes:
接收发送设备发送的数据报文,所述数据报文包括所述数据报文的接收设备的地址信息、以及所述接收设备针对所述数据报文的接收截止时间点;基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长;根据所述目标 传输时长和所述接收截止时间点,确定所述数据报文在所述报文转发设备的发出截止时间点;将所述数据报文添加到所述发出截止时间点所属的目标数据队列中,所述目标数据队列对应一个目标发出时间段,所述目标数据队列包括所述数据报文在内的至少一个待发送报文,每个所述待发送报文的发出截止时间点处于所述目标发出时间段内;在所述目标发出时间段内,依次发出所述目标数据队列中包括至少一个待发送报文。Receiving a data packet sent by a sending device, the data packet including address information of the receiving device of the data packet, and the receiving deadline of the receiving device for the data packet; based on the receiving device's Address information, determining the target transmission time required for the message forwarding device to transmit the data message to the receiving device; according to the target transmission time and the receiving cut-off time point, determine the data message at The sending deadline of the message forwarding device; the data message is added to the target data queue to which the sending deadline belongs, the target data queue corresponds to a target sending time period, and the target data queue includes At least one message to be sent including the data message, the sending deadline of each message to be sent is within the target sending time period; within the target sending time period, send the The target data queue includes at least one message to be sent.
采用此方案,可以根据数据报文携带的信息,确定数据报文在转发设备上的发出截止时间点,并将数据报文添加到发出截止时间点所属的目标数据队列中,从而在目标数据队列对应的目标发出时间段内,将目标数据队列中包括数据报文在内的至少一个待发送报文依次发出。With this scheme, the sending deadline of the data packet on the forwarding device can be determined according to the information carried in the data packet, and the data packet can be added to the target data queue to which the sending deadline belongs, so that During the corresponding target sending time period, at least one message to be sent in the target data queue, including the data message, is sequentially sent.
在一种可能的实现方式中,所述将所述数据报文添加到所述发出截止时间点所属的目标数据队列中,包括:In a possible implementation manner, the adding the data packet to the target data queue to which the sending deadline belongs includes:
设置多个数据队列,每个所述数据队列对应一个发出时间段;从所述每个数据队列对应的发出时间段中,确定所述数据报文的发出截止时间点所属的目标发出时间段;将所述数据报文添加到所述目标发出时间段对应的目标数据队列中。Setting multiple data queues, each of the data queues corresponds to a sending time period; from the sending time periods corresponding to each data queue, determine the target sending time period to which the sending deadline of the data message belongs; Add the data packet to the target data queue corresponding to the target sending time period.
采用此方案,可以按照转发设备中数据报文的限时信息(发出截止时间点),将各个数据报文保存在不同的数据队列中,每个数据队列对应一个发出时间段。With this solution, each data message can be stored in different data queues according to the time limit information (sending deadline) of the data message in the forwarding device, and each data queue corresponds to a sending time period.
在一种可能的实现方式中,根据每个数据队列对应的发出时间段距离当前时间点的时长,为每个数据队列设置优先级;In a possible implementation, the priority is set for each data queue according to the length of time between the sending time period corresponding to each data queue and the current time point;
所述在所述目标发出时间段内,依次发出所述目标数据队列中包括所述数据报文在内的至少一个待发送报文,包括:在当前时间点处于所述目标发出时间段内时,确定所述目标数据队列的优先级最高,并依次发出所述目标数据队列中包括所述数据报文在内的至少一个待发送报文。The sending out at least one message to be sent in sequence including the data message in the target data queue within the target sending time period includes: when the current time point is within the target sending time period , determining that the priority of the target data queue is the highest, and sequentially sending at least one message to be sent in the target data queue including the data message.
采用此方案,可以为每个数据队列设置优先级,数据队列对应的发出时间段距离当前时间点越近,则优先级越高,所以当处于目标发出时间段内时,目标数据队列的优先级最高,可以将目标数据队列内的至少一个待发送报文依次发出。With this scheme, the priority can be set for each data queue. The closer the sending time period corresponding to the data queue is to the current time point, the higher the priority. Therefore, when it is within the target sending time period, the priority of the target data queue At the highest, at least one message to be sent in the target data queue can be sent out in sequence.
在一种可能的实现方式中,报文转发方法还包括:In a possible implementation manner, the packet forwarding method further includes:
当每个数据队列的对应的发出时间段中存在超过当前时间点的超时发出时间段时,确定所述超时发出时间段对应的超时数据队列;更新所述超时数据队列对应的发出时间段,得到所述超时数据队列的更新后发出时间段,所述更新后发出时间段距离当时时间点的时长为所有数据队列对应的发出时间段距离当前时间点的时长中最长的;更新所述超时数据队列的优先级,所述超时数据队列的更新后优先级为所有数据队列的优先级中最低的。When there is an overtime sending time period exceeding the current time point in the corresponding sending time period of each data queue, determine the timeout data queue corresponding to the timeout sending time period; update the sending time period corresponding to the timeout data queue to obtain The time period after the update of the overtime data queue, the time period between the time period after the update and the current time point is the longest among the time periods corresponding to the time period for all data queues and the current time point; update the timeout data The priority of the queue, the updated priority of the timeout data queue is the lowest among the priorities of all data queues.
采用此方案,可以随着时间的向前推进,适应性地对数据队列对应的发出时间段进行更新,以及对数据队列的优先级进行更新,使得报文转发设备可以将后来接收到的数据报文对应分配到其所属的数据队列中。With this scheme, the sending time period corresponding to the data queue can be adaptively updated as time progresses, and the priority of the data queue can be updated, so that the packet forwarding device can forward the data packets received later The files are correspondingly assigned to the data queues to which they belong.
在一种可能的实现方式中,所述数据报文为所述发送设备以目标发送速率发出,所述目标发送速率包括最大发送速率。In a possible implementation manner, the data packet is sent by the sending device at a target sending rate, where the target sending rate includes a maximum sending rate.
在一种可能的实现方式中,报文转发方法还包括:In a possible implementation manner, the packet forwarding method further includes:
触发所述接收设备解析接收到的所述数据报文,得到所述数据报文的所述接收截止时间点和第一数据,所述第一数据为目标传输数据的一部分,所述目标传输数据还包括所述接收设备解析得到的第二数据;若当前时间点未到达所述接收截止时间点,触发所述接收设备上 报所述目标传输数据包括的所述第一数据和所述第二数据;若当前时间点超过所述接收截止时间点,触发所述接收设备确定所述第一数据在所述目标传输数据内的范围信息、以及上报所述第二数据和所述范围信息。Triggering the receiving device to parse the received data message to obtain the receiving cut-off time point and first data of the data message, the first data is a part of the target transmission data, and the target transmission data It also includes the second data analyzed by the receiving device; if the current time point has not reached the receiving deadline time point, triggering the receiving device to report the first data and the second data included in the target transmission data ; If the current time point exceeds the receiving cut-off time point, triggering the receiving device to determine range information of the first data within the target transmission data, and report the second data and the range information.
采用此方案,接收设备可以根据接收到的数据报文中的接收截止时间点,灵活处理该数据报文中的第一数据,以及第一数据所属的目标传输数据。With this solution, the receiving device can flexibly process the first data in the data message and the target transmission data to which the first data belongs according to the receiving deadline in the received data message.
在一种可能的实现方式中,所述基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长,包括:In a possible implementation manner, the determining the target transmission duration required for the packet forwarding device to transmit the data packet to the receiving device based on the address information of the receiving device includes:
获取预设关系表,所述预设关系表包括所述目标网络中各个设备的地址信息分别对应的传输时长;从所述预设关系表中,确定所述接收设备的地址信息对应的目标传输时长,所述目标传输时长为所述报文转发设备向所述接收设备传输所述数据报文所需的时长。Obtaining a preset relationship table, the preset relationship table including the transmission duration corresponding to the address information of each device in the target network; determining the target transmission time corresponding to the address information of the receiving device from the preset relationship table duration, where the target transmission duration is the duration required for the packet forwarding device to transmit the data packet to the receiving device.
采用此方案,可以根据报文转发设备中的预设关系表,确定报文转发设备向接收设备传输数据报文所需的目标传输时长。With this solution, the target transmission time required for the message forwarding device to transmit the data message to the receiving device can be determined according to the preset relationship table in the message forwarding device.
在一种可能的实现方式中,所述基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长,包括:In a possible implementation manner, the determining the target transmission duration required for the packet forwarding device to transmit the data packet to the receiving device based on the address information of the receiving device includes:
基于所述接收设备的地址信息,确定所述报文转发设备与所述接收数据的传输路径,所述传输路径包括至少一个中间设备;获取所述报文转发设备与所述中间设备传输所述数据报文所需的第一传输时长、以及所述中间设备与所述接收设备传输所述数据报文所需的第二传输时长;根据所述第一传输时长和所述第二传输时长,计算所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长。Based on the address information of the receiving device, determine a transmission path between the packet forwarding device and the received data, where the transmission path includes at least one intermediate device; obtain the transmission path between the packet forwarding device and the intermediate device The first transmission duration required for the data message, and the second transmission duration required for the intermediate device and the receiving device to transmit the data message; according to the first transmission duration and the second transmission duration, Calculate the target transmission time required for the packet forwarding device to transmit the data packet to the receiving device.
第二方面,本申请提供了一种计算机设备,计算机设备包括至少一个处理器、存储器和通信模块;In a second aspect, the present application provides a computer device, which includes at least one processor, a memory, and a communication module;
至少一个处理器与存储器和通信模块连接;存储器用于存储指令,处理器用于执行指令,通信模块用于在至少一个处理器的控制下与装置进行通信;指令在被至少一个处理器执行时,使至少一个处理器执行第一方面的报文转发方法。At least one processor is connected to the memory and the communication module; the memory is used to store instructions, the processor is used to execute the instructions, and the communication module is used to communicate with the device under the control of at least one processor; when the instructions are executed by the at least one processor, Make at least one processor execute the packet forwarding method of the first aspect.
第三方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有程序,程序使得计算机设备执行第一方面的报文转发方法。In a third aspect, the present application provides a computer-readable storage medium, where a program is stored in the computer-readable storage medium, and the program causes a computer device to execute the message forwarding method in the first aspect.
第四方面,本申请提供了一种计算机程序产品,计算机程序产品包括计算机可读指令,当计算机可读指令被一个或多个处理器执行时实现第一方面的报文转发方法。In a fourth aspect, the present application provides a computer program product, the computer program product includes computer readable instructions, and when the computer readable instructions are executed by one or more processors, the message forwarding method of the first aspect is implemented.
第五方面,本申请提供了一种芯片,与计算机设备中的存储器耦合,芯片用于控制计算机设备执行实现第一方面的报文转发方法。In a fifth aspect, the present application provides a chip coupled with a memory in a computer device, and the chip is used to control the computer device to implement the message forwarding method in the first aspect.
可以理解地,上述第二方面提供的计算机设备、第三方面提供的计算机可读存储介质、第四方面提供的计算机程序产品、以及第五方面提供的芯片,与上述第一方面提供的方法对应,因此,其所能达到的有益效果或各种实现方式可参考上文,此处不再赘述。It can be understood that the computer device provided by the second aspect above, the computer-readable storage medium provided by the third aspect, the computer program product provided by the fourth aspect, and the chip provided by the fifth aspect correspond to the method provided by the first aspect above , therefore, reference may be made to the above for the beneficial effects or various implementation manners it can achieve, and details will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的报文转发方法的一个应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a message forwarding method provided in an embodiment of the present application;
图2为本申请实施例提供的报文转发方法的一个流程示意图;FIG. 2 is a schematic flow diagram of a message forwarding method provided in an embodiment of the present application;
图3为本申请实施例提供的报文转发方法的一个交互示意图;FIG. 3 is an interactive schematic diagram of a message forwarding method provided in an embodiment of the present application;
图4为本申请实施例提供的报文转发方法的一个方案对比示意图;FIG. 4 is a schematic diagram of a scheme comparison of the message forwarding method provided by the embodiment of the present application;
图5为本申请实施例提供的计算机设备的结构示意图。FIG. 5 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
需要说明的是,本申请中“至少一个”是指一个或者多个,“多个”是指两个或多于两个。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。本申请的说明书和权利要求书及附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不是用于描述特定的顺序或先后次序。It should be noted that in this application, "at least one" means one or more, and "multiple" means two or more than two. "And/or" describes the association relationship of associated objects, indicating that there can be three types of relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B Can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the drawings are used to distinguish similar objects, not to Describe a specific order or sequence.
本申请提出了一种报文转发方法,可以应用于目标网络中的报文转发设备,目标网络可以包括多个设备,设备可以包括发送设备、接收设备等,发送设备可以包括发送数据的设备,接收设备可以包括接收数据的设备,发送设备和接收设备可以为计算机设备,计算机设备如个人电脑、智能手机、智能穿戴设备、智能家居、智能电视等,设备还可以包括报文转发设备,报文转发设备可以包括转发目标网络中传输的数据报文的设备,报文转发设备可以为网路设备,网路设备如计算机设备、交换机、路由设备、集线器、网桥等。目标网络中的多个设备之间可以通过有线或无线的方式连接。This application proposes a message forwarding method, which can be applied to message forwarding devices in the target network. The target network may include multiple devices, and the devices may include sending devices, receiving devices, etc., and the sending devices may include devices that send data. The receiving device can include a device that receives data, and the sending device and receiving device can be computer devices, such as personal computers, smart phones, smart wearable devices, smart homes, smart TVs, etc. The devices can also include message forwarding devices, message The forwarding device may include a device for forwarding data packets transmitted in the target network, and the packet forwarding device may be a network device, such as a computer device, a switch, a routing device, a hub, a bridge, and the like. Multiple devices in the target network can be connected by wire or wirelessly.
本申请的目标网络中的多个设备时钟同步,时钟同步的方式可以包括在各个设备上设置高精度的时钟同步芯片,还可以基于时钟同步协议进行,时钟同步协议如高精度时间同步协议(Precision Time Protocol,PTP)、网络时间协议(Network Time Protocol,NTP)等等,具体地可以根据实际应用场景灵活选择,在此不做限制。Clock synchronization of multiple devices in the target network of the present application may include setting a high-precision clock synchronization chip on each device, or based on a clock synchronization protocol, such as a high-precision time synchronization protocol (Precision Time Protocol, PTP), Network Time Protocol (Network Time Protocol, NTP), etc., can be flexibly selected according to actual application scenarios, and there is no limitation here.
报文转发设备可以接收发送设备发送的数据报文,数据报文包括数据报文的接收设备的地址信息、以及接收设备针对数据报文的接收截止时间点;基于接收设备的地址信息,确定报文转发设备向接收设备传输数据报文所需的目标传输时长;根据目标传输时长和接收截止时间点,确定数据报文在报文转发设备的发出截止时间点;将数据报文添加到发出截止时间点所属的目标数据队列中,目标数据队列对应一个目标发出时间段,目标数据队列包括至少一个待发送报文,每个待发送报文的发出截止时间点处于目标发出时间段内;在目标发出时间段内,依次发出目标数据队列中包括数据报文在内的至少一个待发送报文。The message forwarding device can receive the data message sent by the sending device. The data message includes the address information of the receiving device of the data message and the receiving deadline of the receiving device for the data message; based on the address information of the receiving device, determine the The target transmission time required for the message forwarding device to transmit the data message to the receiving device; according to the target transmission time and the receiving deadline, determine the sending deadline of the data message at the message forwarding device; add the data message to the sending deadline In the target data queue to which the time point belongs, the target data queue corresponds to a target sending time period, the target data queue includes at least one message to be sent, and the sending deadline of each message to be sent is within the target sending time period; During the sending time period, at least one message to be sent including the data message in the target data queue is sent in sequence.
本申请的报文转发方法,可以由报文转发设备根据数据报文携带的接收设备的地址信息,确定报文转发设备到接收设备传输数据报文所需的目标传输时长,再结合数据报文携带的接收设备针对数据报文的接收截止时间点,确定在报文转发设备上数据报文的发出截止时间点,使得报文转发设备可以在发出截止时间点前发送该数据报文,进而保证数据报文在接收截止时间点前被接收设备接收到。In the message forwarding method of the present application, the message forwarding device can determine the target transmission time required for the message forwarding device to transmit the data message from the receiving device according to the address information of the receiving device carried in the data message, and then combine the data message The carrying receiving device determines the sending deadline of the data message on the message forwarding device according to the receiving deadline of the data message, so that the message forwarding device can send the data message before the sending deadline, thereby ensuring The data packet is received by the receiving device before the receiving deadline.
下面将结合实施例对本申请的报文转发方法进行详细介绍。The message forwarding method of the present application will be described in detail below in combination with embodiments.
参见图1,图1为本申请的报文转发方法的应用场景示意图,本申请的报文转发方法可以应用于包括发送设备、报文转发设备和接收设备在内的目标网络,发送设备,报文转发设备和接收设备可以基于硬件和/或协议进行时钟同步。发送设备发出的数据报文可以携带限时信息,限时信息可以如该数据报文的限定传输时长、又如该报文在接收设备的接收截止时间点(限定时间点),报文转发设备可以依据限时信息确定数据报文在报文转发设备的发出截止时间点,并在发出截止时间点之前发出数据报文,接收设备可以接收数据报文,并根据数据报文中携带的限时信息,确定数据报文是否为超时到达接收设备,若超时则丢弃该数据报文,若未超时则上报该数据报文所包括的数据。由此,可以通过数据报文携带的限时信息,实现数据报文在目标网络中的限时传输。Referring to FIG. 1, FIG. 1 is a schematic diagram of an application scenario of the message forwarding method of the present application. The message forwarding method of the present application can be applied to a target network including a sending device, a message forwarding device, and a receiving device. The clock synchronization between the file forwarding device and the receiving device can be performed based on hardware and/or protocols. The data message sent by the sending device can carry time-limited information. The time-limited information can be such as the limited transmission time of the data message, or the receiving deadline (limited time point) of the message at the receiving device. The message forwarding device can be based on The time limit information determines the sending deadline of the data message at the message forwarding device, and sends the data message before the sending deadline. The receiving device can receive the data message and determine the data message according to the time limit information carried in the data message. Whether the message arrives at the receiving device overtime, if the timeout occurs, the data message is discarded, and if the data message is not overtime, the data included in the data message is reported. Thus, the time-limited transmission of the data message in the target network can be realized through the time-limited information carried in the data message.
参见图2,图2为应用于报文转发设备的报文转发方法的流程示意图,具体包括:Referring to FIG. 2, FIG. 2 is a schematic flow chart of a message forwarding method applied to a message forwarding device, specifically including:
101、接收发送设备发送的数据报文,数据报文包括数据报文的接收设备的地址信息、以及接收设备针对数据报文的接收截止时间点。101. Receive a data packet sent by a sending device, where the data packet includes address information of a receiving device of the data packet, and a receiving deadline of the receiving device for the data packet.
发送设备可以根据待传输数据及其限时信息,将待传输数据分包到至少一个数据报文中,并在每一个数据报文中携带限时信息以及待传输数据的接收设备的地址信息,限时信息可以包括待传输数据的限时传输时长,也可以是待传输数据的限定到达时间点(即接收设备的接收截止时间点),限定传输时长和限定到达时间点在本质上是相同的,如数据1的限定传输时长为200微秒,即数据1在200微秒内完成传输,已知当前时间点为100微秒,则可知限定到达时间点为300微秒。The sending device can divide the data to be transmitted into at least one data message according to the data to be transmitted and its time limit information, and carry the time limit information and the address information of the receiving device of the data to be transmitted in each data message, and the time limit information It can include the time-limited transmission duration of the data to be transmitted, or the limited arrival time point of the data to be transmitted (that is, the receiving cut-off time point of the receiving device). The limited transmission time length and the limited arrival time point are essentially the same, such as data 1 The limited transmission duration of is 200 microseconds, that is, data 1 is transmitted within 200 microseconds, and the current time point is known to be 100 microseconds, so it can be known that the limited arrival time point is 300 microseconds.
发送设备可以发出数据报文,报文转发设备可以接收该数据报文,并对数据报文进行解析,确定其包含的接收设备的地址信息、接收设备针对该数据报文的接收截止时间点。The sending device can send a data message, and the message forwarding device can receive the data message, and analyze the data message to determine the address information of the receiving device contained in it, and the reception deadline of the receiving device for the data message.
发送设备在发出数据报文时,可以基于目标发送速率进行报文发送,目标发送速率可以包括最大发送速率,从而更快地完成数据报文的发送过程,降低发送数据报文的耗时,相比于现有技术计算和调整针对每个数据报文的发送速率的方式,本申请可以显著降低发送数据报文的耗时,简化发送数据报文的流程。When sending a data message, the sending device can send the message based on the target sending rate, which can include the maximum sending rate, so as to complete the sending process of the data message faster and reduce the time-consuming of sending the data message. Compared with the way of calculating and adjusting the sending rate for each data message in the prior art, the present application can significantly reduce the time consumption of sending data messages and simplify the process of sending data messages.
目标发送速率还可以包括预先设置的默认值,目标发送速率还可以通过目标网络中的报文转发设备/接收设备在内的设备返回的反馈信息进行计算得到,实际应用时可以结合应用场景灵活确定目标发送速率。The target sending rate can also include a pre-set default value. The target sending rate can also be calculated through the feedback information returned by the device including the message forwarding device/receiving device in the target network. In actual application, it can be flexibly determined in combination with the application scenario Target send rate.
102、基于接收设备的地址信息,确定报文转发设备向接收设备传输数据报文所需的目标传输时长。102. Based on the address information of the receiving device, determine the target transmission time required for the packet forwarding device to transmit the data packet to the receiving device.
在一些实施例中,报文转发设备可以获取预设关系表,预设关系表可以包括目标网络中各个设备的地址信息分别对应的传输时长,传输时长可以包括从报文转发设备向设备传输数据报文的所需的时长,则可以从预设关系表中,确定接收设备的地址信息对应的目标传输时长,该目标传输时长即为报文转发设备向接收设备传输数据报文所需的时长。比如,从交换机保存的传输时长表中,查找数据报文1的接收设备的地址信息对应的传输时长1,传输时长1即为从交换机传输数据报文到接收设备所需的时长。In some embodiments, the message forwarding device can obtain a preset relationship table, and the preset relationship table can include the transmission time corresponding to the address information of each device in the target network, and the transmission time can include data transmission from the message forwarding device to the device For the required duration of the message, the target transmission duration corresponding to the address information of the receiving device can be determined from the preset relationship table, and the target transmission duration is the duration required for the message forwarding device to transmit the data message to the receiving device . For example, from the transmission time table saved by the switch, the transmission time 1 corresponding to the address information of the receiving device of the data message 1 is searched, and the transmission time 1 is the time required to transmit the data message from the switch to the receiving device.
在一些实施例中,报文转发设备可以根据接收设备的地址信息,确定数据报文从报文转发设备到接收设备的传输路径,传输路径可以包括在目标网络中将数据报文从数据转发设备传输到接收设备的路径,传输路径可以包括目标网络中的至少一个中间设备。In some embodiments, the message forwarding device may determine the transmission path of the data message from the message forwarding device to the receiving device according to the address information of the receiving device, and the transmission path may include transferring the data message from the data forwarding device to the receiving device in the target network. A transmission path to a receiving device, the transmission path may include at least one intermediate device in the target network.
目标网络中的设备可以定期在目标网络中广播自身与其他设备传输数据报文所需的传输时长,则报文转发设备存储了报文转发设备与中间设备之间传输数据所需的第一传输时长,中间设备与接收设备传输数据报文所需的第二传输时长,报文转发设备可以基于第一传输时长和第二传输时长,确定报文转发设备向接收设备传输数据报文所需的目标传输时长,如,报文转发设备可以将第一传输时长、第二传输时长以及预设时长相加,得到目标传输时长。The devices in the target network can periodically broadcast the transmission time required to transmit data packets between itself and other devices in the target network, and the packet forwarding device stores the first transmission time required for data transmission between the packet forwarding device and the intermediate device. Duration, the second transmission time required for the intermediate device and the receiving device to transmit the data message, the message forwarding device can determine the time required for the message forwarding device to transmit the data message to the receiving device based on the first transmission time and the second transmission time For the target transmission duration, for example, the packet forwarding device may add the first transmission duration, the second transmission duration, and the preset duration to obtain the target transmission duration.
103、根据目标传输时长和接收截止时间点,确定数据报文在报文转发设备的发出截止时间点。103. Determine a sending deadline of the data message at the packet forwarding device according to the target transmission duration and the receiving deadline.
目标传输时长可以为从报文转发设备到接收设备传输数据报文所需的最小传输时长、最大传输时长、平均传输时长等,具体地可以根据实际场景灵活选择,如,若目标传输时长为最大传输时长,可以使得数据报文尽可能早地的到达接收设备。The target transmission duration can be the minimum transmission duration, maximum transmission duration, average transmission duration, etc. required to transmit data packets from the message forwarding device to the receiving device, and can be flexibly selected according to actual scenarios. For example, if the target transmission duration is the maximum The transmission time can make the data message arrive at the receiving device as early as possible.
根据目标传输时长和接收截止时间点确定发出截止时长点的过程可以比如,用接收截止 时间点减去目标传输时长,得到数据报文在报文转发设备的发出截止时间点。The process of determining the sending deadline according to the target transmission duration and the receiving deadline can be, for example, subtracting the target transmission duration from the receiving deadline to obtain the sending deadline of the data message at the message forwarding device.
104、将数据报文添加到发出截止时间点所属的目标数据队列中,目标数据队列对应一个目标发出时间段,目标数据队列包括至少一个待发送报文,每个待发送报文的发出截止时间点处于目标发出时间段内。104. Add the data message to the target data queue to which the sending deadline belongs, the target data queue corresponds to a target sending time period, the target data queue includes at least one message to be sent, and the sending deadline of each message to be sent The point is within the target emission time period.
105、在目标发出时间段内,依次发出目标数据队列中包括数据报文在内的至少一个待发送报文。105. Within the target sending time period, sequentially send at least one message to be sent including the data message in the target data queue.
本申请的报文转发方法,可以由报文转发设备根据数据报文携带的接收设备的地址信息,确定报文转发设备到接收设备传输数据报文所需的目标传输时长,再结合数据报文携带的接收设备针对数据报文的接收截止时间点,确定在报文转发设备上数据报文的发出截止时间点,使得报文转发设备可以在发出截止时间点前发送该数据报文,进而保证数据报文在接收截止时间点前被接收设备接收到。In the message forwarding method of the present application, the message forwarding device can determine the target transmission time required for the message forwarding device to transmit the data message from the receiving device according to the address information of the receiving device carried in the data message, and then combine the data message The carrying receiving device determines the sending deadline of the data message on the message forwarding device according to the receiving deadline of the data message, so that the message forwarding device can send the data message before the sending deadline, thereby ensuring The data packet is received by the receiving device before the receiving deadline.
下面将结合实施例对本申请的报文转发方法进行进一步介绍。在实施例中,发送设备可以如发送端,接收设备可以如接收端,转发设备可以接收端,报文转发设备可以如转发设备。The message forwarding method of the present application will be further introduced below in combination with embodiments. In an embodiment, the sending device may be a sending end, the receiving device may be a receiving end, the forwarding device may be a receiving end, and the packet forwarding device may be a forwarding device.
本申请的报文转发方法可以包括如下步骤:The message forwarding method of the present application may include the following steps:
201、对目标网络内的所有设备进行时钟同步。201. Perform clock synchronization on all devices in the target network.
202、发送端获取应用提交的数据、以及数据的限定传输时长。202. The sender obtains the data submitted by the application and the limited transmission time of the data.
比如,参见图3,应用向发送端提交数据,以及数据的限时信息DL0,限时信息DL0可以为限定传输时长200微秒。For example, referring to FIG. 3 , the application submits data to the sender, as well as time-limited information DLO of the data. The time-limited information DLO may limit the transmission time to 200 microseconds.
203、发送端将数据进行分包,得到至少一个数据报文,数据报文包括部分或全部数据、以及数据的接收端的地址信息和接收截止时间点,接收截止时间点为发送端由当前时间点加上限定传输时长得到。203. The sending end divides the data into packets to obtain at least one data message, the data message includes part or all of the data, and the address information of the receiving end of the data and the receiving deadline. The receiving deadline is the sending end starting from the current time point Add the limited transmission time to get.
比如,参见图3,发送端对应用提交的数据进行分包,得到多个数据报文,且在每个数据报文内添加限时信息DL1,限时信息DL1可以为接收设备针对数据报文的接收截止时间点300微秒,300微秒为当前时刻100微秒加上限定传输时长200微秒得到。For example, as shown in Figure 3, the sender subpackages the data submitted by the application to obtain multiple data packets, and adds time-limited information DL1 in each data packet. The time-limited information DL1 can be used by the receiving device to receive data packets. The cut-off time point is 300 microseconds, and 300 microseconds is obtained by adding 100 microseconds to the current time plus a limited transmission time of 200 microseconds.
204、转发设备接收并解析发送端传输的数据报文,确定数据报文的接收设备、以及接收设备针对数据报文的接收截止时间点。204. The forwarding device receives and parses the data packet transmitted by the sending end, and determines a receiving device of the data packet and a deadline for receiving the data packet by the receiving device.
205、转发设备根据保存的从转发设备到接收设备的路径传输时长、以及接收截止时间点,计算得到数据报文在转发设备的发出截止时间点。205. The forwarding device calculates the sending deadline of the data packet at the forwarding device according to the stored transmission duration of the path from the forwarding device to the receiving device and the receiving deadline.
比如,参见图3,转发设备可以根据限时信息DL1计算或确定数据报文在转发设备上的限时信息DL2,DL2可以为数据报文在转发设备的发出截止时间点200微秒,200微秒为接收截止时间点300微秒减去从转发设备到接收设备的传输时长100微秒得到。For example, referring to FIG. 3, the forwarding device can calculate or determine the time limit information DL2 of the data message on the forwarding device according to the time limit information DL1. It is obtained by subtracting 100 microseconds from the forwarding device to the receiving device from the receiving cut-off time point of 300 microseconds.
转发设备到不同设备的传输路径不同,则传输时长也会对应不同,对应地,向不同设备传输的数据报文在转发设备的发出截止时间点也不同,比如,转发设备同时接收到数据报文1和数据报文2,数据报文1为向接收设备1传输的数据报文,数据报文2为向接收设备2传输的数据报文,数据报文1和数据报文2的接收截止时间点均为100微秒,转发设备到接收设备1的最小传输时长为20微秒,转发设备到接收设备2的最小传输时长为30微秒,则可计算得数据报文1在转发设备的发出截止时间点为80微秒,数据报文2在转发设备的发出截止时间点为70微秒。The transmission path from the forwarding device to different devices is different, so the transmission time will be different. Correspondingly, the data packets transmitted to different devices have different sending deadlines at the forwarding device. For example, the forwarding device receives the data packet at the same time. 1 and data message 2, data message 1 is the data message transmitted to receiving device 1, data message 2 is the data message transmitted to receiving device 2, and the receiving deadline of data message 1 and data message 2 The points are all 100 microseconds, the minimum transmission time from the forwarding device to the receiving device 1 is 20 microseconds, and the minimum transmission time from the forwarding device to the receiving device 2 is 30 microseconds, then it can be calculated that the data packet 1 is sent by the forwarding device The deadline is 80 microseconds, and the deadline for sending the data packet 2 at the forwarding device is 70 microseconds.
206、转发设备根据数据报文的发出截止时间点,确定并将数据报文添加到目标数据队列,目标数据队列对应一个目标发出时间段,发出截止时间处于该目标发出时间段内。206. The forwarding device determines and adds the data message to the target data queue according to the sending deadline of the data message. The target data queue corresponds to a target sending time period, and the sending deadline is within the target sending time period.
比如,参见图3,转发设备设置有队列1、队列2和队列3,且三个队列分别对应一个发出时间段,转发设备确定数据报文的限时信息DL2所属的发出时间段对应的队列2,并将数据报文添加到队列2中。For example, referring to FIG. 3, the forwarding device is provided with a queue 1, a queue 2, and a queue 3, and the three queues correspond to a sending time period respectively, and the forwarding device determines the queue 2 corresponding to the sending time period to which the time limit information DL2 of the data message belongs, And add the data packet to queue 2.
207、转发设备在达到目标发出时间段时,依次发出目标数据队列中包括数据报文在内的待发送报文。207. When the target sending time period is reached, the forwarding device sequentially sends out the messages to be sent including the data messages in the target data queue.
比如,参见表1,转发设备可以根据每个数据队列对应的发出时间段以及当前时刻,进行队列调度和数据报文转发,在发出时间段期间将其对应队列中的数据报文依次发出。For example, referring to Table 1, the forwarding device can perform queue scheduling and data packet forwarding according to the sending time period corresponding to each data queue and the current time, and send the data packets in the corresponding queue sequentially during the sending time period.
转发设备设置有多个数据队列,每一个数据队列对应一个发出时间段,所有发出时间段彼此是连续的,发出时间段的时长可以随意设置,不同数据队列的发出时间段的时长可以相同或不同,比如,发出时间段的时长可以为2微秒,所有发出时间段的时长相同。The forwarding device is equipped with multiple data queues, each data queue corresponds to a sending time period, all sending time periods are continuous with each other, the length of the sending time period can be set arbitrarily, and the sending time periods of different data queues can be the same or different , for example, the duration of the sending time period may be 2 microseconds, and the duration of all sending time periods is the same.
根据每个发出时间段距离当前时间点的距离,可以为各个数据队列设置优先级,比如,距离当前时间点越近的发出时间段的优先级越大,而随着时间的流逝,各个发出时间段的优先级可以进行动态更新,且对于已经超时的发出时间段的数据队列,也可以对该数据队列对应的发出时间段进行更新。According to the distance between each sending time period and the current time point, the priority of each data queue can be set. For example, the priority of the sending time period closer to the current time point is higher, and as time goes by, each sending time The priority of the segment can be dynamically updated, and for the data queue that has timed out the sending time period, the sending time period corresponding to the data queue can also be updated.
比如,参见表1,表1为不同时刻时,不同队列的优先级和对应的发出时间段。For example, see Table 1. Table 1 shows the priorities of different queues and the corresponding sending time periods at different times.
表1Table 1
Figure PCTCN2022131220-appb-000001
Figure PCTCN2022131220-appb-000001
由表1可知,随着时刻(时间点)的变化,各个队列的优先级(Pr)与发出时间段(DL)的变化。由表1第1行可知,0us时刻,队列1优先级为0(最高),则数据转发设备中数据报文的发出截止时间点小于5us的都进入队列1;队列2优先级为1,发出截止时间点大于5us且小于10us的数据报文可进入队列2;队列3的优先级为2,发出截止时间点大于10us且小于15us的数据报文可进入队列3;队列4的优先级为3,发出截止时间点大于15us且小于20us的数据报文可进入队列4。It can be known from Table 1 that, with the change of time (time point), the priority (Pr) and delivery time period (DL) of each queue change. It can be seen from the first row of Table 1 that at the time of 0us, the priority of queue 1 is 0 (the highest), and the sending deadline of data packets in the data forwarding device is less than 5us will enter queue 1; the priority of queue 2 is 1, and the priority Data packets with a deadline greater than 5us and less than 10us can enter queue 2; queue 3 has a priority of 2, and data packets with a deadline greater than 10us and less than 15us can enter queue 3; queue 4 has a priority of 3 , the data packets whose deadline is greater than 15us and less than 20us can enter queue 4.
然后当时间为5us时,队列1的发出时间段超时,此时队列1的优先级变为3(最低),将队列1的发出时间段更新为20-25us。队列1的优先级变为最低后,队列2、队列3和队列4的优先级相应上升,但是各自的发出时间段不变。Then when the time is 5us, the sending period of queue 1 times out, at this time the priority of queue 1 becomes 3 (lowest), and the sending time period of queue 1 is updated to 20-25us. After the priority of queue 1 becomes the lowest, the priorities of queue 2, queue 3, and queue 4 increase accordingly, but their sending time periods remain unchanged.
随着时间的变化,各个队列也会依次超时,队列的优先级和发出时间段也会依次产生变化。As time changes, each queue will time out in turn, and the priority and sending time period of the queue will also change in turn.
208、接收端接收并解析数据报文,根据数据报文的接收截止时间段确定丢弃或向应用提交数据报文中的数据。208. The receiving end receives and parses the data packet, and determines to discard or submit the data in the data packet to the application according to the receiving deadline of the data packet.
比如,参见图3,接收端可以解析数据报文,并基于解析到的接收截止时间点处理该数据报文。如果当前时刻已经超过接收截止时间点,可以丢弃该数据报文、以及与该数 据报文携带同一数据不同部分的其他数据报文,也可以上报数据的其他部分、以及该数据报文中部分数据的范围说明信息。For example, referring to FIG. 3 , the receiving end may parse the data packet, and process the data packet based on the parsed receiving deadline. If the current time has passed the receiving deadline, the data packet and other data packets that carry different parts of the same data as the data packet can be discarded, or other parts of the data and part of the data in the data packet can be reported Scope description information for .
本申请的数据转发方法可以更大程度地使得需要限时传输的数据报文在限定时间段内完成数据传输,参考图4,图4横坐标为并发数据块数量,纵坐标为超时数据块数量,由图4可知,通过现有技术(FIFO)进行报文转发时,随着并发数据块数量的上升超时数据块数量也逐渐升高,而通过本申请的方案(Deadline)进行报文转发时,随着并发数据块数量的上升,超时数据块数量依然维持在低水平,有效保证了网络内数据传输的有效性。The data forwarding method of the present application can to a greater extent enable data packets that need to be transmitted within a limited time period to complete data transmission within a limited time period. Referring to FIG. 4, the abscissa of FIG. It can be seen from FIG. 4 that when the message is forwarded through the prior art (FIFO), the number of overtime data blocks increases gradually as the number of concurrent data blocks increases, and when the message is forwarded through the solution (Deadline) of the present application, As the number of concurrent data blocks increases, the number of overtime data blocks remains at a low level, effectively ensuring the effectiveness of data transmission within the network.
参考图5,为本申请实施例提供的计算机设备100的硬件结构示意图。如图5所示,计算机设备100可以包括屏幕1001、处理器1002、存储器1003及通信总线1004。存储器1003用于存储一个或多个计算机程序1005。一个或多个计算机程序1005被配置为被该处理器1002执行。该一个或多个计算机程序1005包括指令,上述指令可以用于实现在计算机设备100中执行报文转发方法的全部或部分步骤。Referring to FIG. 5 , it is a schematic diagram of a hardware structure of a computer device 100 provided in an embodiment of the present application. As shown in FIG. 5 , a computer device 100 may include a screen 1001 , a processor 1002 , a memory 1003 and a communication bus 1004 . The memory 1003 is used to store one or more computer programs 1005 . One or more computer programs 1005 are configured to be executed by the processor 1002 . The one or more computer programs 1005 include instructions, and the above instructions may be used to implement all or part of the steps of the method for forwarding the message in the computer device 100 .
可以理解的是,本实施例示意的结构并不构成对计算机设备100的具体限定。在另一些实施例中,计算机设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。例如,计算机设备100还可以包括摄像头。It should be understood that the structure shown in this embodiment does not constitute a specific limitation on the computer device 100 . In other embodiments, computer device 100 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components. For example, computer device 100 may also include a camera.
处理器1002与可以包括一个或多个处理单元,例如:处理器1002可以包括应用处理器(application processor,AP),调制解调器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 1002 may include one or more processing units, for example: the processor 1002 may include an application processor (application processor, AP), a modem, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
处理器1002还可以设置有存储器,用于存储指令和数据。在一些实施例中,处理器1002中的存储器为高速缓冲存储器。该存储器可以保存处理器1002刚用过或循环使用的指令或数据。如果处理器1002需要再次使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器1002的等待时间,因而提高了系统的效率。The processor 1002 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 1002 is a cache memory. The memory may hold instructions or data that the processor 1002 has just used or recycled. If the processor 1002 needs to use the instruction or data again, it can be directly recalled from the memory. Repeated access is avoided, and the waiting time of the processor 1002 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器1002可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM接口,和/或USB接口等。In some embodiments, processor 1002 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, SIM interface, and/or USB interface, etc.
在一些实施例中,存储器1003可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。In some embodiments, the memory 1003 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, internal memory, plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital (Secure Digital (SD) card, flash card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的报文转发方法。This embodiment also provides a computer storage medium, where computer instructions are stored in the computer storage medium, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned related method steps to implement the message forwarding method in the above-mentioned embodiment .
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的报文转发方法。This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the message forwarding method in the above embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的报文转发方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the message forwarding methods in the above method embodiments.
其中,本实施例提供的计算机设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the computer equipment, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated as needed It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例是示意性的,例如,该模块或单元的划分,为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or may be integrated into another device, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and a component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。The above is only a specific implementation of the application, but the protection scope of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application should be covered within the protection scope of the application .

Claims (12)

  1. 一种报文转发方法,应用于目标网络中的报文转发设备,所述目标网络还包括发送设备及接收设备,所述报文转发设备,所述发送设备及所述接收设备时钟同步,其特征在于,所述方法包括:A message forwarding method, applied to a message forwarding device in a target network, the target network also includes a sending device and a receiving device, the message forwarding device, the sending device and the receiving device are clock synchronized, and It is characterized in that the method comprises:
    接收所述发送设备发送的数据报文,所述数据报文包括所述数据报文的接收设备的地址信息、以及所述接收设备针对所述数据报文的接收截止时间点;receiving a data message sent by the sending device, the data message including address information of the receiving device of the data message and a deadline for receiving the data message by the receiving device;
    基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长;Based on the address information of the receiving device, determine a target transmission duration required for the packet forwarding device to transmit the data packet to the receiving device;
    根据所述目标传输时长和所述接收截止时间点,确定所述数据报文在所述报文转发设备的发出截止时间点;Determine the sending deadline of the data message at the packet forwarding device according to the target transmission duration and the receiving deadline;
    将所述数据报文添加到所述发出截止时间点所属的目标数据队列中,所述目标数据队列对应一个目标发出时间段,所述目标数据队列包括所述数据报文在内的至少一个待发送报文,每个所述待发送报文的发出截止时间点处于所述目标发出时间段内;Adding the data message to the target data queue to which the sending deadline time point belongs, the target data queue corresponds to a target sending time period, and the target data queue includes at least one waiting period including the data message Sending a message, the sending deadline of each message to be sent is within the target sending time period;
    在所述目标发出时间段内,依次发出所述目标数据队列中的至少一个待发送报文。During the target sending time period, at least one message to be sent in the target data queue is sequentially sent.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述数据报文添加到所述发出截止时间点所属的目标数据队列中,包括:The method according to claim 1, wherein the adding the data message to the target data queue to which the sending deadline time point belongs comprises:
    设置多个数据队列,每个所述数据队列对应一个发出时间段;Setting up multiple data queues, each of which corresponds to a sending time period;
    从所述每个数据队列对应的发出时间段中,确定所述数据报文的发出截止时间点所属的目标发出时间段;From the sending time period corresponding to each data queue, determine the target sending time period to which the sending deadline of the data message belongs;
    将所述数据报文添加到所述目标发出时间段对应的目标数据队列中。Add the data packet to the target data queue corresponding to the target sending time period.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, further comprising:
    根据每个数据队列对应的发出时间段距离当前时间点的时长,为每个数据队列设置优先级;Set the priority for each data queue according to the length of time between the sending time period corresponding to each data queue and the current time point;
    所述在所述目标发出时间段内,依次发出所述目标数据队列中包括所述数据报文在内的至少一个待发送报文,包括:The step of sequentially sending out at least one message to be sent including the data message in the target data queue within the target sending time period includes:
    在当前时间点处于所述目标发出时间段内时,确定所述目标数据队列的优先级最高,并依次发出所述目标数据队列中包括所述数据报文在内的至少一个待发送报文。When the current time point is within the target sending time period, determine that the priority of the target data queue is the highest, and sequentially send at least one message to be sent including the data message in the target data queue.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, characterized in that the method further comprises:
    当每个数据队列的对应的发出时间段中存在超过当前时间点的超时发出时间段时,确定所述超时发出时间段对应的超时数据队列;When there is a timeout sending time period exceeding the current time point in the corresponding sending time period of each data queue, determine the timeout data queue corresponding to the timeout sending time period;
    更新所述超时数据队列对应的发出时间段,得到所述超时数据队列的更新后发出时间段,所述更新后发出时间段距离当时时间点的时长为所有数据队列对应的发出时间段距离当前时间点的时长中最长的;Update the sending time period corresponding to the overtime data queue to obtain the updated sending time period of the overtime data queue, the time between the updated sending time period and the current time point is the distance between the sending time period corresponding to all data queues and the current time The longest of the point durations;
    更新所述超时数据队列的优先级,所述超时数据队列的更新后优先级为所有数据队列的优先级中最低的。Updating the priority of the overtime data queue, the updated priority of the overtime data queue is the lowest among the priorities of all data queues.
  5. 根据权利要求1所述的方法,其特征在于,所述数据报文为所述发送设备以目标发送速率发出,所述目标发送速率包括最大发送速率。The method according to claim 1, wherein the data message is sent by the sending device at a target sending rate, and the target sending rate includes a maximum sending rate.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    触发所述接收设备解析接收到的所述数据报文,得到所述数据报文的所述接收截止时间 点和第一数据,所述第一数据为目标传输数据的一部分,所述目标传输数据还包括所述接收设备解析得到的第二数据;Triggering the receiving device to parse the received data message to obtain the receiving cut-off time point and first data of the data message, the first data is a part of the target transmission data, and the target transmission data It also includes the second data obtained by parsing by the receiving device;
    若当前时间点未到达所述接收截止时间点,触发所述接收设备上报所述目标传输数据包括的所述第一数据和所述第二数据;If the current time point has not reached the receiving deadline time point, triggering the receiving device to report the first data and the second data included in the target transmission data;
    若当前时间点超过所述接收截止时间点,触发所述接收设备确定所述第一数据在所述目标传输数据内的范围信息、以及上报所述第二数据和所述范围信息。If the current time point exceeds the receiving cut-off time point, trigger the receiving device to determine range information of the first data within the target transmission data, and report the second data and the range information.
  7. 根据权利要求1所述的方法,其特征在于,所述基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长,包括:The method according to claim 1, wherein, based on the address information of the receiving device, determining the target transmission time required for the packet forwarding device to transmit the data message to the receiving device includes :
    获取预设关系表,所述预设关系表包括所述目标网络中各个设备的地址信息分别对应的传输时长;Obtaining a preset relationship table, the preset relationship table including the transmission duration corresponding to the address information of each device in the target network;
    从所述预设关系表中,确定所述接收设备的地址信息对应的目标传输时长,所述目标传输时长为所述报文转发设备向所述接收设备传输所述数据报文所需的时长。From the preset relationship table, determine a target transmission duration corresponding to the address information of the receiving device, where the target transmission duration is the duration required for the packet forwarding device to transmit the data message to the receiving device .
  8. 根据权利要求1所述的方法,其特征在于,所述基于所述接收设备的地址信息,确定所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长,包括:The method according to claim 1, wherein, based on the address information of the receiving device, determining the target transmission time required for the packet forwarding device to transmit the data message to the receiving device includes :
    基于所述接收设备的地址信息,确定所述报文转发设备与所述接收数据的传输路径,所述传输路径包括至少一个中间设备;determining a transmission path between the message forwarding device and the received data based on the address information of the receiving device, where the transmission path includes at least one intermediate device;
    获取所述报文转发设备与所述中间设备传输所述数据报文所需的第一传输时长、以及所述中间设备与所述接收设备传输所述数据报文所需的第二传输时长;Obtaining a first transmission duration required for the packet forwarding device and the intermediate device to transmit the data packet, and a second transmission duration required for the intermediate device to transmit the data packet with the receiving device;
    根据所述第一传输时长和所述第二传输时长,计算所述报文转发设备向所述接收设备传输所述数据报文所需的目标传输时长。Calculate a target transmission time required for the packet forwarding device to transmit the data packet to the receiving device according to the first transmission time length and the second transmission time length.
  9. 一种计算机设备,其特征在于,所述计算机设备包括至少一个处理器、存储器和通信模块;A kind of computer equipment, it is characterized in that, described computer equipment comprises at least one processor, memory and communication module;
    所述至少一个处理器与所述存储器和所述通信模块连接;said at least one processor is coupled to said memory and said communications module;
    所述存储器用于存储指令,所述处理器用于执行所述指令,所述通信模块用于在所述至少一个处理器的控制下与装置进行通信;The memory is used to store instructions, the processor is used to execute the instructions, and the communication module is used to communicate with the device under the control of the at least one processor;
    所述指令在被所述至少一个处理器执行时,使所述至少一个处理器执行如权利要求1至8中任一项所述的方法。The instructions, when executed by the at least one processor, cause the at least one processor to perform the method of any one of claims 1-8.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序,所述程序使得计算机设备执行如权利要求1至8中任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores a program, and the program causes a computer device to execute the method according to any one of claims 1-8.
  11. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机可读指令,当所述计算机可读指令被一个或多个处理器执行时实现如权利要求1至8中任一项所述的方法。A computer program product, characterized in that the computer program product includes computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the implementation of any one of claims 1 to 8 Methods.
  12. 一种芯片,与计算机设备中的存储器耦合,其特征在于,所述芯片用于控制所述计算机设备执行实现如权利要求1至8中任一项所述的方法。A chip coupled with a memory in a computer device, characterized in that the chip is used to control the computer device to execute the method as claimed in any one of claims 1 to 8.
PCT/CN2022/131220 2022-02-09 2022-11-10 Packet forwarding method, computer device, storage medium, program product and chip WO2023151329A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210122762.3A CN116614450A (en) 2022-02-09 2022-02-09 Message forwarding method, computer device, storage medium, program product and chip
CN202210122762.3 2022-02-09

Publications (1)

Publication Number Publication Date
WO2023151329A1 true WO2023151329A1 (en) 2023-08-17

Family

ID=87563580

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/131220 WO2023151329A1 (en) 2022-02-09 2022-11-10 Packet forwarding method, computer device, storage medium, program product and chip

Country Status (2)

Country Link
CN (1) CN116614450A (en)
WO (1) WO2023151329A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341205A (en) * 2016-08-31 2017-01-18 上海交通大学 Low time-delay time triggering network system and optimization method
CN107231660A (en) * 2017-05-27 2017-10-03 努比亚技术有限公司 Data packet transmission system and method
CN110166380A (en) * 2018-02-14 2019-08-23 华为技术有限公司 Method, first network equipment and the computer readable storage medium of schedules message

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341205A (en) * 2016-08-31 2017-01-18 上海交通大学 Low time-delay time triggering network system and optimization method
CN107231660A (en) * 2017-05-27 2017-10-03 努比亚技术有限公司 Data packet transmission system and method
CN110166380A (en) * 2018-02-14 2019-08-23 华为技术有限公司 Method, first network equipment and the computer readable storage medium of schedules message

Also Published As

Publication number Publication date
CN116614450A (en) 2023-08-18

Similar Documents

Publication Publication Date Title
US20220231962A1 (en) System and method for facilitating data request management in a network interface controller (nic)
US11432193B2 (en) Method and apparatus for receiving CPRI data stream, method and apparatus for receiving ethernet frame, and system
US7751404B2 (en) Method, system, and computer program product for high performance bonding resequencing
JP5275466B2 (en) Method and apparatus for providing a modified timestamp in a communication system
WO2021254330A1 (en) Memory management method and system, client, server and storage medium
US20080291937A1 (en) Transmission control protocol queue sorting
KR100619720B1 (en) Communication apparatus for multi processor and method thereof
EP3930266A1 (en) Packet scheduling system with desired physical transmission time for packets
CN103975569A (en) Method and apparatus for arbitration of time-sensitive data transmissions
WO2022111329A1 (en) Message processing method and device
EP4264892A2 (en) Guaranteed latency based forwarding
US8199648B2 (en) Flow control in a variable latency system
WO2023151329A1 (en) Packet forwarding method, computer device, storage medium, program product and chip
US10536393B2 (en) Mail obtaining method, terminal, and system
CN111740922B (en) Data transmission method, device, electronic equipment and medium
WO2012163395A1 (en) An apparatus and a method of parallel receipt, forwarding and time stamping data packets using synchronized clocks
CN110750486A (en) RDMA data stream control method, system, electronic device and readable storage medium
CN113641213B (en) ELS frame-based time synchronization device and method
US20030026256A1 (en) Broadcasting communications system
US7508813B2 (en) Local area network contention avoidance
US20230224140A1 (en) Synchronized Control of Sensors in an Ethernet Network
EP4210288A1 (en) Synchronized control of sensors in an ethernet network
US20240146662A1 (en) Signal processing equipment, signal processing methods, signal processing programs, and satellite communication systems
CN109413485B (en) Data caching method and device
CN116155843B (en) PYNQ-based pulse neural network chip data communication method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22925680

Country of ref document: EP

Kind code of ref document: A1