Method, device, equipment, storage medium, and program product for sending data packets
By adjusting priority according to the channel's clearance and sending data packets in the smooth channel first, the problem of inefficient packet transmission in multi-channel packet transmission method is solved, and the overall packet transmission efficiency is improved.
Patent Information
- Application Number
- CN202110384104.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-09
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-04-09
AI Technical Summary
In the multi-channel packet transmission method, the packet transmission speeds of different channels are inconsistent, resulting in channel blockage and uneven access, reducing the overall packet transmission efficiency.
Priority is determined based on the degree of clearance of each channel, first send data packets from the unblocked channel, then send data packets from the poor channel, and use random storage space and first-in-first-out memory to process the packets, and adjust the order of sending data packets.
It improves the overall packet transmission efficiency, increases the number of packets sent per unit time, and avoids blockage caused by excessive packets in low-priority channel.
Smart Images

Figure CN115208845B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to computer technology, and in particular to a method, apparatus, device, storage medium, and program product for sending a data packet. Background Art
[0002] At present, in some application scenarios that have high requirements on data packet sending performance, a multi-channel packet sending method can be used to improve the efficiency of data packet sending.
[0003] The multi-channel packet sending method in the prior art processes the data packets of each channel in a first-in-first-out order. If the channel is blocked, the first data packet at the exit of the blocked channel is read and put back into the channel, and then the next data packet is processed.
[0004] However, when using multi-channel packet sending, the sending speeds of data packets in different channels are different, some channels are blocked, and some channels are unobstructed, resulting in low overall data packet sending efficiency. Summary of the invention
[0005] The present invention provides a method, device, equipment, storage medium, and program product for sending data packets to solve the problem in the prior art that when multi-channel packet sending is adopted, the sending speed of data packets in different channels is different, some channels are blocked, and some channels are unobstructed, resulting in low overall data packet sending efficiency.
[0006] According to a first aspect of the present application, a method for sending a data packet is provided, comprising:
[0007] Acquire a data packet to be sent, and write the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs;
[0008] According to the priority of each channel, the data packets to be sent are read from each random storage space, and the read data packets to be sent are written into the first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness of sending the data packets to be sent belonging to each channel;
[0009] Sending processing is performed on each data packet to be sent stored in the first-in-first-out memory.
[0010] According to a second aspect of the present application, a device for sending a data packet is provided, including:
[0011] An acquisition unit, used for acquiring a data packet to be sent, and writing the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs;
[0012] A processing unit, configured to read the data packets to be sent from the random storage spaces according to the priorities of the channels, and write the read data packets to be sent into the first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness of sending the data packets to be sent belonging to each channel;
[0013] The sending unit is used to send each data packet to be sent stored in the first-in-first-out memory.
[0014] According to a third aspect of the present application, an electronic device is provided, including a memory and a processor; wherein:
[0015] The memory is used to store computer programs;
[0016] The processor is used to read the computer program stored in the memory and execute the method for sending a data packet as described in the first aspect according to the computer program in the memory.
[0017] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method for sending a data packet as described in the first aspect is implemented.
[0018] According to a fifth aspect of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for sending a data packet as described in the first aspect.
[0019] The method, device, equipment, storage medium, and program product for sending data packets provided by the present disclosure include: obtaining a data packet to be sent, and writing the data packet to be sent into a random storage space corresponding to the channel to which the data packet to be sent belongs; reading the data packet to be sent from each random storage space according to the priority of each channel, and writing the read data packet to be sent into a first-in-first-out memory; wherein the priority of each channel is determined according to the degree of smoothness when sending the data packet to be sent belonging to each channel; and sending processing is performed on each data packet to be sent stored in the first-in-first-out memory. In the method, device, equipment, storage medium, and program product for sending data packets provided by the present solution, the order of sending data packets of each channel can be determined by the priority of each channel, and the data packets of the smooth channel can be sent first, and then the data packets of the blocked channel can be sent. In the same time, the overall number of data packets sent can be increased, thereby improving the overall data packet sending efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic flow chart of a method for sending a data packet according to an exemplary embodiment of the present application;
[0021] Figure 2 A schematic flow chart of a method for sending a data packet according to another exemplary embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of a data packet sending process shown in an exemplary embodiment of the present application;
[0023] Figure 4 A structural diagram of a device for sending a data packet shown as an exemplary embodiment of the present application;
[0024] Figure 5 A structural diagram of a device for sending a data packet shown in another exemplary embodiment of the present application;
[0025] Figure 6 The figure is a structural diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0026] At present, in some application scenarios that require high performance in sending data packets, a multi-channel packet sending method can be used. Specifically, this multi-channel packet sending method processes the data packets of each channel in a first-in-first-out order. If a channel is blocked, the first data packet at the exit of the blocked channel is read and put back into the channel, and then the next data packet is processed.
[0027] However, when this multi-channel packet sending method is used, the data packets of each channel are processed in turn, and all channels are equal. The sending speed of data packets in different channels is different, some channels are blocked, and some channels are unobstructed, resulting in low overall data packet sending efficiency.
[0028] In order to solve the above technical problems, in the solution provided by the present application, the priority of each channel is adjusted according to the smoothness of sending data packets, and the data packets to be sent on each channel are sent and processed based on the priority. The method provided by the present application can determine the order of sending data packets of each channel according to the priority of each channel, first send the data packets of the smooth channel, and then send the data packets of the blocked channel. In the same time, the number of overall data packets sent can be increased, that is, the overall data packet sending efficiency can be improved.
[0029] Figure 1 The figure is a flowchart of a method for sending a data packet according to an exemplary embodiment of the present application.
[0030] like Figure 1 As shown, the method for sending a data packet provided in this embodiment includes:
[0031] Step 101, obtaining a data packet to be sent, and writing the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs.
[0032] The method provided in the present application can be performed by an electronic device with computing capability, such as a computer, etc. The electronic device can obtain a data packet to be sent, and write the data packet to be sent into a random storage space corresponding to the channel to which the data packet belongs.
[0033] For example, in the financial field, it is necessary to send notification information to the user terminal. Assuming that the notification information is sent through channel 1, the data packet containing the notification communication that needs to be sent is called the data packet to be sent. The electronic device can obtain the data packet to be sent and write the data packet to be sent into the random storage space corresponding to channel 1.
[0034] Among them, the random storage space is the space obtained by dividing the random access memory (RAM). RAM is the internal memory that directly exchanges data with the CPU, also called main memory (memory). It can be read and written at any time, and the speed is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. Electronic devices can store the acquired data packets to be sent in the random storage space.
[0035] Specifically, in a computer system, data can be transmitted through a network transmission channel. In this case, multiple channels are used to transmit each data packet to be sent. Different types of data packets can be transmitted through different channels. For example, a voice signal can be transmitted through one channel, and an image signal can be transmitted through another channel.
[0036] Each channel can be named, such as channel 1, channel 2, channel 3, etc., and the corresponding relationship between the channel and the random storage space can also be set. For example, a space can be allocated to each channel in the RAM, such as RAM1 for channel 1, RAM2 for channel 2, RAM3 for channel 3, etc. The electronic device can write the data packet to be sent in the corresponding channel into the corresponding random storage space.
[0037] Step 102, according to the priority of each channel, read the data packets to be sent from each random storage space, and write the read data packets to be sent into the first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness when sending the data packets to be sent belonging to each channel.
[0038] Among them, the first in first out (FIFO) memory is a first in first out data buffer that can write data sequentially and read data sequentially, and the data written first will be read out first.
[0039] Specifically, the priority of each channel can be determined by monitoring the smoothness of packet sending of each channel; the channel with higher smoothness can be set as high priority, and the channel with lower smoothness can be set as low priority. Therefore, the priority level of each channel in this solution is not fixed and can be adjusted according to the actual situation of packet sending.
[0040] In actual application, an external environment detector can be set up, which can monitor the smoothness of packet sending of each channel, and then adjust the priority of each channel based on the monitoring results of the external environment detector. Among them, the detector can adjust the priority of the channel with smooth packet sending to a high priority and the priority of the channel with blocked packet sending to a low priority according to the monitoring results. If the external environment changes dynamically, this detector will also adjust the priority of each channel accordingly.
[0041] In the present application, the priority of each channel can also be stored in a register. When the data packet to be sent in the random storage space is written into the FIFO memory, the priority of the channel can be obtained from the register to determine which specific data packet to be sent is stored in the FIFO memory.
[0042] Specifically, when writing the data packets to be sent in the random storage space into the FIFO, the data packets to be sent in the random storage space corresponding to the high-priority channel can be read out and written into the FIFO first according to the priority of each channel. If there is extra space in the FIFO, the data packets to be sent in the random storage space corresponding to the low-priority channel can be read out and written into the FIFO.
[0043] In this implementation, since data packets are sent more smoothly when using a channel with a high priority level, and the smoothness is lower when using a channel with a low priority level, the number of packets sent through a high priority channel, i.e., a high smoothness channel, can be increased to a certain extent, and the number of packets sent through a low priority channel, i.e., a low smoothness channel, can be reduced, thereby avoiding congestion due to excessive packets from a low priority channel sent through the FIFO, and thus improving the total number of packets sent per unit time, i.e., improving the overall packet sending efficiency to a certain extent.
[0044] Step 103, performing sending processing on each data packet to be sent stored in the first-in-first-out memory.
[0045] Specifically, each data packet to be sent in the FIFO is sent out in a manner that the first written data packet to be sent is read out first and sent out. Each data packet to be sent is transmitted through the corresponding channel.
[0046] For example, the first data packet and the second data packet are written into the FIFO in sequence, the first data packet belongs to channel 1, and the second data packet belongs to channel 2; then the first data packet can be read first and transmitted through channel 1, and then the second data packet can be read and transmitted through channel 2.
[0047] The method for sending data packets provided in the present application includes: obtaining data packets to be sent, and writing the data packets to be sent into a random storage space corresponding to the channel according to the channel to which the data packets to be sent belong; reading the data packets to be sent from each random storage space according to the priority of each channel, and writing the read data packets to be sent into a first-in-first-out memory; wherein the priority of each channel is determined according to the degree of smoothness when sending the data packets to be sent belonging to each channel; and sending processing is performed on each data packet to be sent stored in the first-in-first-out memory. In the method adopted in the present application, the priority of each channel can be adjusted according to the degree of smoothness when sending the data packets to be sent belonging to each channel, and the data packets to be sent are sent based on the priority of each channel, so that the data packets to be sent corresponding to the channels that are relatively smooth when sending can be processed first, thereby improving the overall sending efficiency of the data packets.
[0048] The methods provided in this application are all executed by a device equipped with the methods provided in this application, and the device is usually implemented in hardware and / or software.
[0049] Figure 2 The figure is a flowchart of a method for sending a data packet according to another exemplary embodiment of the present application.
[0050] like Figure 2 As shown, the method for sending a data packet provided in this embodiment includes:
[0051] Step 201, obtaining a data packet to be sent, and writing the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs.
[0052] The implementation method and principle of step 201 are similar to those of step 101 and will not be described in detail.
[0053] Step 202: Determine the target random storage space according to the priority of each channel.
[0054] Among them, there is a corresponding relationship between the channel and the random storage space, for example, channel 1 has a corresponding relationship with the first random storage space, and channel 2 has a corresponding relationship with the second random storage space. Therefore, the target random storage space can be determined in each random storage space according to the priority of each channel.
[0055] If the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent include multiple priorities, the random storage spaces corresponding to the channels with high priorities in the random storage spaces storing the data packets to be sent are determined as the target random storage spaces in turn.
[0056] In one implementation, the priority levels in the present application can be divided into two types, for example, high priority and low priority. For example, the high priority channels include channel 1 and channel 2, the random storage space corresponding to channel 1 is RAM1, and the random storage space corresponding to channel 2 is RAM2; the low priority channels include channel 4 and channel 5, the random storage space corresponding to channel 4 is RAM4, and the random storage space corresponding to channel 5 is RAM5.
[0057] When there are data packets to be sent in RAM1, RAM2, RAM4, and RAM5, that is, the priority of each channel corresponding to each random storage space storing the data packets to be sent includes multiple priorities, then RAM1 and RAM2 corresponding to the high priority channel will be set as the target random storage space in turn. For example, RAM1 can be used as the target random storage space first, and a packet can be read from RAM1. Then RAM2 can be used as the target random storage space and a packet can be read from RAM2. Then RAM1 can be used as the target random storage space and a packet can be read from RAM1. In this way, RAM1 and RAM2 corresponding to the high priority channel can be set as the target random storage space in turn. If all the data packets to be sent in RAM1 are read away and there are no data packets to be sent in RAM1, RAM2 will be determined as the target random storage space.
[0058] When all the data packets to be sent in the random storage spaces RAM1 and RAM2 corresponding to the high priority channel are read, if there are data packets to be sent in the random storage spaces RAM4 and RAM5 corresponding to the low priority channel, the priorities of the channels corresponding to the random storage spaces currently storing the data packets to be sent are the same, then the random storage spaces storing the data packets to be sent will be determined as the target random storage spaces in turn.
[0059] Specifically, RAM4 and RAM5 corresponding to the low priority channel can be set as the target random access storage space in turn. For example, RAM4 can be used as the target random access storage space first, and a packet can be read from RAM4. Then, RAM5 can be used as the target random access storage space and a packet can be read from RAM5. Then, RAM4 can be used as the target random access storage space and a packet can be read from RAM4. In this way, RAM4 and RAM5 corresponding to the high priority channel can be set as the target random access storage space in turn. If all the data packets to be sent in RAM5 are read away and there are no data packets to be sent in RAM5, RAM4 will be determined as the target random access storage space.
[0060] For another example, when only RAM1 and RAM2 have data packets to be sent, that is, the priorities of the channels corresponding to the random access storage spaces storing the data packets to be sent are the same, RAM1 and RAM2 are set as the target random access storage spaces in turn.
[0061] Regardless of the number of high-priority and low-priority channels, the above logic applies. In addition, when there are multiple priorities, the above logic can also be used for processing.
[0062] Step 203, reading the data packet to be sent from the target random storage space, and writing the read data packet to be sent into the first-in-first-out memory.
[0063] The implementation method and principle of step 203 are similar to those of step 102 and are not described in detail.
[0064] Step 204 , performing sending processing on each data packet to be sent according to the order in which each data packet to be sent is stored in the first-in-first-out memory.
[0065] The data written first in the FIFO will be read out first and then sent out. For example, if the first data packet, the second data packet, and the third data packet are written into the FIFO in sequence, the first data packet can be read first and sent out. The FIFO memory is a first-in-first-out dual-port buffer. The first data to enter it is the first to be removed. The memory has two transmission ports, one is the memory entrance and the other is the memory exit.
[0066] Specifically, the state of the channel to which the data packet to be sent in the FIFO output belongs can be obtained. If the channel is not blocked, the data packet to be sent can be sent directly. Specifically, the data packet to be sent can be sent through the channel to which the data packet to be sent belongs.
[0067] The first data packet to be sent that is arranged at the exit of the FIFO may be sent and processed. During the sending process, the state of the channel to which the data packet to be sent belongs may be obtained.
[0068] If the channel to which the data packet to be sent that is arranged at the exit of the FIFO memory belongs is blocked, the data packet to be sent is read; and the blocked data packet to be sent is written into the random storage space corresponding to the channel to which the blocked data packet to be sent belongs.
[0069] If the channel to which the first data packet to be sent, which is queued at the exit of the FIFO, belongs to is blocked during the sending process, it can be rewritten into the random storage space to reduce the data transmission pressure of the blocked channel.
[0070] Specifically, for example, the first data packet to be sent in the FIFO is packet 1 of RAM1, and its corresponding channel is channel 1, and its corresponding random access memory space is RAM1; if channel 1 is blocked when sending packet 1, packet 1 will be read and rewritten into RAM1. Then, according to the above processing method, the next data packet to be sent in the FIFO is processed in the first-in-first-out order.
[0071] Step 205, obtaining data transmission information corresponding to each channel; determining a blocked channel and / or an unblocked channel in each channel according to the data transmission information of each channel; lowering the priority of the blocked channel and / or raising the priority of the unblocked channel.
[0072] There is no restriction on the execution sequence of step 205 and steps 201 - 204 .
[0073] Specifically, an external environment detector can be set up to obtain data transmission information corresponding to each channel. The external environment detector can monitor the smoothness of packet sending of each channel in real time. The electronic device can adjust the priority of the channel with smooth packet sending to a high priority and / or adjust the priority of the blocked channel to a low priority based on the detection result of the external environment detector. Therefore, when the external environment changes dynamically, the priority of each channel can be adjusted accordingly, the priority of the blocked channel can be lowered, and / or the priority of the unobstructed channel can be increased.
[0074] In one implementation, an external environment detector and a packet sender may be provided in the electronic device. The packet sender is used to execute steps 201-204, and the external environment detector may execute step 205. The external environment detector may obtain data transmission information corresponding to each channel and adjust the priority level of the channel.
[0075] Among them, the priority of each channel determined by the external environment detector is transmitted to the packet sender in real time for use by the packet sender. The packet sender determines the target random storage space based on this priority, reads the data packet to be sent from the target random storage space, and writes the read data packet to be sent into the FIFO. If the priority of each channel changes, the packet sender will make corresponding adjustments.
[0076] Furthermore, the priority of each channel can be preset according to the importance of the data packets to be sent through each channel, and the priority level of the channel can be adjusted according to the demand, and the level of the channel can be written into the packet sender.
[0077] In addition, if the unobstructedness of each channel has a certain regularity, then the priority of each channel can be determined in advance and written into the packet sender.
[0078] Figure 3 The figure is a schematic diagram of a data packet sending process shown in an exemplary embodiment of the present application.
[0079] This embodiment is described by taking three channels as an example.
[0080] like Figure 3 As shown, it is assumed that there are three channels 31, namely channel 1, channel 2, and channel 3, and the random storage spaces 32 corresponding to the three channels are RAM1, RAM2, and RAM3 respectively; the data packets to be sent in channel 31 are written into the corresponding random storage spaces 32 respectively, specifically, the data packets to be sent in channel 1 are written into RAM1, the data packets to be sent in channel 2 are written into RAM2, and the data packets to be sent in channel 3 are written into RAM3; the target random storage space is determined according to the priority determined by the external environment detector 34, and the data packets to be sent are read from the target random storage space and written into the first-in-first-out memory 33; it is determined whether the channel to which the first data packet to be sent entering the first-in-first-out memory 33 belongs is blocked, and if not, the data packet is directly sent; if blocked, the data packet is read out and rewritten into the corresponding RAM.
[0081] Figure 4 The structure diagram of a device for sending a data packet is shown as an exemplary embodiment of the present application.
[0082] like Figure 4 As shown, the data packet sending device 400 provided in the present application includes:
[0083] The acquisition unit 410 is used to acquire the data packet to be sent, and write the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs;
[0084] The processing unit 420 is used to read the data packets to be sent from each random storage space according to the priority of each channel, and write the read data packets to be sent into the first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness of sending the data packets to be sent belonging to each channel;
[0085] The sending unit 430 is used to send each data packet to be sent stored in the first-in-first-out memory.
[0086] The principle, implementation method, technical effect and other aspects of the device for sending data packets provided by this application are Figure 1 Similar, no further elaboration.
[0087] Figure 5 This is a structural diagram of a device for sending data packets showing another exemplary embodiment of the present application.
[0088] like Figure 5 As shown, based on the above embodiment, in the data packet sending device 500 provided by the present application, the processing unit 420 includes:
[0089] The target space determination module 421 is used to determine the target random storage space according to the priority of each channel;
[0090] The reading module 422 is used to read the data packet to be sent from the target random storage space.
[0091] If the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent include multiple priorities, the target space determination module 421 is specifically used to determine the random storage spaces corresponding to the channels with high priority levels as the target random storage spaces in turn among the random storage spaces storing the data packets to be sent.
[0092] If the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent are the same, the target space determination module 421 is specifically configured to determine the random storage spaces storing the data packets to be sent as the target random storage spaces in turn.
[0093] like Figure 5 As shown, based on the above embodiment, in the data packet sending device 500 provided by the present application, the sending unit 430 is specifically used for:
[0094] According to the order in which the data packets to be sent are stored in the first-in-first-out memory, the data packets to be sent are sent.
[0095] The sending unit 430 is specifically configured to read the data packet to be sent if the channel to which the data packet to be sent arranged at the exit of the first-in-first-out memory belongs is blocked;
[0096] The read data packet to be sent is written into the random storage space corresponding to the blocked channel.
[0097] The sending unit 430 is specifically configured to send the data packet to be sent through the channel to which the data packet to be sent belongs if the channel to which the data packet to be sent that is arranged at the exit of the FIFO memory belongs is not blocked.
[0098] like Figure 5 As shown, based on the above embodiment, the data packet sending device 500 provided by the present application further includes an adjustment unit 440, which is used to:
[0099] Obtain data transmission information corresponding to each channel;
[0100] Determine blocked channels and / or unblocked channels in each channel according to data transmission information of each channel;
[0101] Lower the priority of blocked channels, and / or increase the priority of clear channels.
[0102] Figure 6 The figure is a structural diagram of an electronic device according to an exemplary embodiment of the present application.
[0103] like Figure 6 As shown, the electronic device provided in this embodiment includes:
[0104] Memory 601;
[0105] Processor 602; and
[0106] Computer programs;
[0107] The computer program is stored in the memory 601 and is configured to be executed by the processor 602 to implement any of the above methods for sending data packets.
[0108] This embodiment also provides a computer-readable storage medium having a computer program stored thereon.
[0109] The computer program is executed by the processor to implement any of the above methods for sending data packets.
[0110] This embodiment also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any of the above-mentioned methods for sending a data packet is implemented.
[0111] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for sending a data packet, characterized in that: include: Acquire a data packet to be sent, and write the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs; If the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent include multiple priorities, then among the random storage spaces storing the data packets to be sent, the random storage spaces corresponding to the channels with higher priorities are determined as target random storage spaces in turn; and / or, if the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent are the same, then the random storage spaces storing the data packets to be sent are determined as target random storage spaces in turn; Read the data packets to be sent from the target random storage space, and write the read data packets to be sent into a first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness when sending the data packets to be sent belonging to each channel, and the priority is positively correlated with the smoothness; Performing sending processing on each of the data packets to be sent according to the order in which the data packets to be sent are stored in the first-in-first-out memory; If the channel to which the data packets to be sent arranged at the exit of the FIFO memory belong is blocked, the sending process of each data packet to be sent includes: reading the data packets to be sent, and writing the read data packets to be sent into the random storage space corresponding to the blocked channel; The method further comprises: Obtain data transmission information corresponding to each channel; Determine blocked channels and / or unblocked channels in each of the channels according to data transmission information of each channel; Lower the priority of the blocked channel, and / or increase the priority of the unblocked channel.
2. The method according to claim 1, characterized in that If the channel to which the data packets to be sent arranged at the exit of the FIFO memory belong is not blocked, the sending process of each data packet to be sent includes: The data packet to be sent is sent through the channel to which the data packet to be sent belongs.
3. A device for sending a data packet, characterized in that: include: An acquisition unit, used for acquiring a data packet to be sent, and writing the data packet to be sent into a random storage space corresponding to the channel according to the channel to which the data packet to be sent belongs; A processing unit, configured to, if the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent include multiple priorities, determine the random storage spaces corresponding to the channels with higher priorities in turn as target random storage spaces among the random storage spaces storing the data packets to be sent; and / or, if the priorities of the channels corresponding to the random storage spaces storing the data packets to be sent are the same, determine the random storage spaces storing the data packets to be sent as target random storage spaces in turn; Read the data packets to be sent from the target random storage space, and write the read data packets to be sent into a first-in-first-out memory; wherein the priority of each channel is determined according to the smoothness when sending the data packets to be sent belonging to each channel, and the priority is positively correlated with the smoothness; A sending unit, configured to send each data packet to be sent according to the order in which each data packet to be sent is stored in the first-in-first-out memory; If the channel to which the data packets to be sent arranged at the exit of the FIFO memory belong is blocked, the sending unit, when performing the sending process on each data packet to be sent, is specifically used to read the data packet to be sent and write the read data packet to be sent into the random storage space corresponding to the blocked channel; The adjustment unit is used to obtain data transmission information corresponding to each channel; determine the blocked channel and / or the unblocked channel in each channel according to the data transmission information of each channel; reduce the priority of the blocked channel and / or increase the priority of the unblocked channel.
4. An electronic device, characterized in that: comprising a memory and a processor; wherein, The memory is used to store computer programs; The processor is used to read the computer program stored in the memory and execute the method according to any one of claims 1 to 2 above according to the computer program in the memory.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method described in any one of claims 1 to 2 is implemented.
6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Data transmission scheduling method, system and device for IP SAN storage
CN101459611A
Data transmission method and data transmission equipment
CN103678199A
Multi-channel data memory and access method and apparatus thereof
CN107391023A
Artificial neural network processing device
CN107679620A
Data transmission system and method based on FPGA
CN108259368A
