A data transmission method and device, electronic equipment and storage medium
By dividing transaction layer data packet groups and processing packet header duplication in the PCIE transmission protocol, the problem of increased overhead caused by non-data content is solved and efficient data transmission is achieved.
Patent Information
- Application Number
- CN202011380696.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2040-11-30
AI Technical Summary
The non-data transmission content in the existing PCIE transmission protocol adds additional overhead, resulting in a decrease in transmission efficiency and a bottleneck in the improvement of the physical interface rate, making it difficult to further increase the transmission speed.
By determining the transaction layer data packet group with the same information in the preset header field, processing the header according to the load limit to reduce the number of repetitions, and dividing the transaction layer data packet group into splicing packet groups, only retaining the first header field, and gradually sending data packets and verification information.
It achieves fast data transmission, reduces the proportion of non-data content transmission, reduces additional transmission overhead, and improves data transmission efficiency.
Smart Images

Figure CN114579490B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a data transmission method and device, electronic equipment and storage medium. BACKGROUND
[0002] The Peripheral Component Interconnect Express (PCIE) standard is a widely used high-reliability high-speed communication protocol. PCIE belongs to high-speed serial point-to-point dual-channel high-bandwidth transmission. In the PCIE transmission protocol, each transmission of data contains a load and part of non-data transmission content. These non-data transmission contents increase the additional overhead of transmission, resulting in a decrease in transmission efficiency. In order to improve the transmission speed of the PCIE protocol, the PCIE improves the system bus throughput compared to the original standard, uses a lower number of input / output pins and a smaller physical size, so that the data transmission speed is greatly upgraded. However, the current way to improve the communication bandwidth of PCIE is mainly to improve the rate of the physical interface, but as the rate of the physical interface increases, it becomes more and more difficult to improve the rate of the physical interface, and the improvement of the PCIE transmission rate enters the bottleneck period. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a data transmission method, device, electronic equipment and storage medium, which aims to realize high transmission speed data transmission, effectively reduce the transmission proportion of non-data content, reduce additional transmission overhead, and improve the transmission efficiency of data.
[0004] In order to achieve the above purpose, the present application provides a data transmission method, which is applied to a sending end, and the method comprises the following steps: determining at least one transaction layer data packet group with the same information in a preset packet header field, wherein the transaction layer data packet group comprises at least one transaction layer data packet; processing the packet header corresponding to each transaction layer data packet group according to load limitation to reduce the repetition number of the preset packet header field; and sequentially transmitting the transaction layer data packets in each transaction layer data packet group to a receiving end.
[0005] In order to achieve the above purpose, the present application also provides a data transmission method, which is applied to a receiving end, and the method comprises the following steps:
[0006] receiving the transaction layer data packets transmitted by the sending end; determining, according to the packet header, that the transaction layer data packets belong to a splicing packet group, and processing the transaction layer data packets according to the information of the preset packet header field corresponding to the splicing packet group.
[0007] In order to achieve the above purpose, the present application also provides a data transmission device, which is applied to a sending end, and the device comprises:
[0008] an information packet module, configured to determine at least one transaction layer packet group with the same information in the preset header field, wherein the transaction layer packet group comprises at least one transaction layer packet;
[0009] an information compression module, configured to process the header corresponding to each transaction layer packet group according to the load limit, so as to reduce the repetition of the preset header field;
[0010] an information transmission module, configured to sequentially transmit the transaction layer packets in each transaction layer packet group to a receiving end.
[0011] To achieve the above object, the embodiment of the present application further provides a data transmission device, which is applied to a receiving end, and the device comprises:
[0012] an information receiving module, configured to receive the transaction layer packets transmitted by a sending end;
[0013] an information processing module, configured to determine, according to the header, that the transaction layer packet belongs to a spliced packet group, and process the transaction layer packet according to the information of the preset header field corresponding to the spliced packet group.
[0014] To achieve the above object, the embodiment of the present application further provides an electronic device, which comprises:
[0015] one or more processors;
[0016] a memory, configured to store one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method as any of the embodiments of the present application.
[0018] To achieve the above object, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the data transmission method as any of the embodiments of the present application.
[0019] According to the embodiment of the present application, the received transaction layer packets are respectively divided into different transaction layer packet groups according to the information of the preset header field, the headers corresponding to the transaction layer packet groups are processed based on the load limit, the repetition of the preset header field in each transaction layer packet group is reduced, and the processed transaction layer packet groups are sequentially transmitted to the receiving end, so that the fast transmission of data is realized, the transmission proportion of non-data content is reduced, the additional transmission cost is reduced, and the transmission efficiency of data is improved. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1is a flow chart of a data transmission method provided by an embodiment of the present application;
[0021] Figure 2a is a structural schematic diagram of a transaction layer data packet provided by an embodiment of the present application;
[0022] Figure 2b is a structural schematic diagram of a transaction layer data packet provided by an embodiment of the present application;
[0023] Figure 3 is a flow chart of a data transmission method provided by an embodiment of the present application;
[0024] Figure 4 is an example diagram of transaction layer data packet sending provided by an embodiment of the present application;
[0025] Figure 5a is a structural schematic diagram of a transaction layer data packet header provided by an embodiment of the present application;
[0026] Figure 5b is a structural schematic diagram of a transaction layer data packet header provided by an embodiment of the present application;
[0027] Figure 6a is a structural schematic diagram of a transaction layer data packet header provided by an embodiment of the present application;
[0028] Figure 6b is a structural schematic diagram of a transaction layer data packet header provided by an embodiment of the present application
[0029] Figure 7 is an example diagram of transaction layer data packet sending provided by an embodiment of the present application;
[0030] Figure 8 is an example diagram of transaction layer data packet sending provided by another embodiment of the present application;
[0031] Figure 9 is a flow chart of a data transmission method provided by an embodiment of the present application;
[0032] Figure 10 is a structural schematic diagram of a data transmission device provided by an embodiment of the present application;
[0033] Figure 11 is a structural schematic diagram of another data transmission device provided by an embodiment of the present application;
[0034] Figure 12 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0035] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application in any manner.
[0036] In the following description, the suffixes such as "module", "part", or "unit" used for an element are used only for facilitating the explanation of the present application, and have no particular meaning by itself. Thus, "module", "part", or "unit" can be mixedly used.
[0037] In the data transmission process of PCIE, each batch of data transmission includes a transaction layer packet (TLP) header, a payload, a check bit, and the like. The contents of the TLP header are different in different data transmissions, but most of the contents of the TLP header are repeatedly transmitted in the data transmission. According to the characteristics of PCIE transmission, the repeated contents of the PCIE transaction layer data packet can be compressed, which can effectively reduce the proportion of non-data contents, reduce the additional overhead, and thus achieve the purpose of improving the PCIE transmission efficiency.
[0038] Figure 1 is a flowchart of a data transmission method provided by an embodiment of the present application. The embodiment of the present application can be used in the case of PCIE data transmission. The method can be executed by a data transmission device in the embodiment of the present application. The device can be realized by a software and / or hardware method, and can be generally integrated in a sending end. The method provided by the embodiment of the present application specifically includes the following steps:
[0039] In step 110, at least one transaction layer data packet group having a preset header field with the same information is determined. The transaction layer data packet group includes at least one transaction layer data packet.
[0040] The preset header field can be a data packet field that is repeatedly transmitted in the data transmission process. For example, there is a fixed field for indicating transmission attributes in the TLP header of PCIE. The transaction layer data packet group can include at least one transaction layer data packet. The information in the pre-header field corresponding to different transaction layer data packets can be different. The transaction layer data packet can be a data packet encapsulated by a transaction layer when a processor or other PCIE device accesses a PCIE device. The transaction layer data packet can be transmitted at each level of the PCIE bus.
[0041] Specifically, for the generated transaction layer data packets, information in preset header fields of each transaction layer data packet can be compared, and transaction layer data packets with same information can be allocated into a transaction layer data packet group, each transaction layer data packet group includes transaction layer data packets with same information in preset header fields. It can be understood that the transaction layer data packet group can be a physical grouping or a logical grouping, for example, the transaction layer data packets can be stored in the same storage area, or the transaction layer data packets with same information in preset header fields belong to the transaction layer data packet group.
[0042] Step 120, processing the header corresponding to each transaction layer data packet group according to the load limit to reduce the repetition number of the preset header field.
[0043] The load limit can be a load limit of the transaction layer data packet, and can include the size of the payload or the number of transaction layer data packets sent, for example, the maximum number of spliced packets and the size of the payload in the PCIE data transmission process, etc. The header can be the header of the transaction layer data packet, and can be a special reserved field attached to the carrier and transmission of control information. In the embodiment of the present application, the transaction layer data packets in the transaction layer data packet group have respective headers, and the information in the preset header field of the header of the same transaction layer data packet group is the same. The repetition number can be the number of repetitions of the preset header field in a transaction layer data packet group. The greater the repetition number, the more repeated data can be transmitted when transmitting the transaction layer data packet.
[0044] Specifically, the number of headers that need to include complete header information can be determined in each transaction layer data packet group by the load limit. Since the information in the preset header field in the same transaction layer data packet group is the same, the number of headers of the transaction layer data packet can be processed according to the number determined by the load limit, and the preset header field can be deleted, so that the repetition number of the preset header field in each transaction layer data packet is reduced, and the redundant data in the data transmission process is reduced.
[0045] Step 130, transmitting the transaction layer data packets in each transaction layer data packet group to the receiving end in sequence.
[0046] In the embodiment of the present application, after processing each transaction layer data packet group, the transaction layer data packets in each transaction layer data packet group can be transmitted to the corresponding receiving end respectively. It can be understood that the receiving ends corresponding to each transaction layer data packet group can be the same or different.
[0047] The embodiments of the present application divide the received transaction layer data packets into different transaction layer data packet groups according to the information of the preset header field, process the header of the transaction layer data packet group based on load limitation, reduce the repetition number of the preset header field in each transaction layer data packet group, and sequentially send the processed transaction layer data packet groups to the receiving end, thereby realizing fast data transmission, reducing the transmission proportion of non-data content, reducing additional transmission overhead, and improving data transmission efficiency.
[0048] Further, on the basis of the above-mentioned embodiments, the preset header field at least includes one of a version Format field, a type Type field, a reserved Reserved field, a transmission priority Traffic Class field, a TD field, an EP field, and a length Length field.
[0049] In the embodiments of the present application, the transaction layer data packet can be specifically a 3DW format PCIE TLP or a 4DW format PCIE TLP. Figure 2a and Figure 2b respectively are a structure diagram of a transaction layer data packet provided by the embodiments of the present application, and in the TLP of PCIE, the O~3 byte positions of each TLP header contain Fmt, Type, TC, Attr, Length and other information, which changes very little during PCIE transmission, and the preset header field can be set as one or multiple of a version Format field, a type Type field, a reserved Reserved field, a transmission priority Traffic Class field, a TD field, an EP field, and a length Length field, and the transmission proportion of non-data content can be reduced by processing the preset header field.
[0050] Figure 3 is a flowchart of a data transmission method provided by the embodiments of the present application, and the embodiments of the present application are the embodiment of the above-mentioned embodiments, and refer to Figure 3 The method provided by the embodiments of the present application specifically includes the following steps:
[0051] Step 210, extracting the field information in the header of each transaction layer data packet according to the preset header field.
[0052] The field information can be the specific value in the preset header field.
[0053] In the embodiments of the present application, when the transaction layer data packet is acquired, the field information in the header of the transaction layer data packet can be extracted, and it can be understood that when data is sent, the sending end can generate multiple transaction layer data packets at the same time, and the field information of the preset header field in the batch of transaction layer data packets can be extracted.
[0054] Step 220, according to the value of each field information, the corresponding transaction layer data packet is divided into different transaction layer data packet groups.
[0055] Specifically, each transaction layer data packet has its own corresponding field information, and the transaction layer data packets can be divided into multiple groups according to the value of the field information. The value of the field information in each group can be the same, and the transaction layer data packets with the same field information value can be grouped as a transaction layer data packet group. It can be understood that the transaction layer data packet group can be a physical grouping, for example, each group of transaction layer data packets with the same field information value can be stored in the same location. The transaction layer data packet group can also be a logical grouping. Once it is determined that the transaction data packets have the same field information value, it can be considered that the transaction data packets belong to the same transaction layer data packet group.
[0056] Step 230, for each transaction layer data packet group, the transaction layer data packets in the transaction layer data packet group are divided into at least one splicing packet group according to the load limit.
[0057] In the embodiments of the present application, since the transmission of the transaction layer data packet needs to comply with the requirements of the load limit, for example, the requirements of credit and Max payload size need to be met in the process of splicing and transmitting the transaction layer data packet in PCIE, each transaction layer data packet group can be processed according to the load limit. If the size or number of the transaction layer data packets included in the transaction layer data packet group exceeds the load limit, the transaction layer data packet group can be divided into multiple splicing packet groups, and the size or number of the transaction layer data packets in each splicing packet group meets the requirements of the load limit. If the size or number of the transaction layer data packets meets the requirements of the load limit, the transaction layer data packet group can be directly used as a splicing packet group.
[0058] Step 240, in each splicing packet group, the preset header field of the transaction layer data packet located at the first sending position is retained and the preset header fields of other transaction layer data packets are deleted.
[0059] Specifically, the field information of the preset header field in the transaction layer data packet in the splicing packet group is the same, and the preset header field has repeated information. The preset header field in the transaction layer data packet in the splicing packet group can be processed, the repeated preset header field can be deleted, and the preset header field of the transaction layer data packet at the first sending position in the splicing packet group can be retained. The preset header fields of other transaction layer data packets in the splicing packet are deleted.
[0060] Step 250, for each transaction layer data packet group, the header and load of the transaction layer data packets included in the splicing packet group are respectively transmitted to the corresponding receiving end according to the splicing packet group.
[0061] In the embodiments of the present application, the packet header and the payload of the transaction layer data packet in each transaction layer data packet group can be sent to the receiving end respectively, and the packet header and the payload can be sent respectively in the sending process. For example, the packet headers of multiple transaction layer data packets can be sent first, and then the corresponding payloads are sent. Figure 4 is an example diagram of transaction layer data packet sending provided by the embodiments of the present application, referring to Figure 4 The packet headers of the transaction layer data packets can be sent in batches first, and then the corresponding payloads are sent. The packet header of the first sent transaction layer data packet includes a preset packet header field, and the packet headers of the subsequently sent transaction layer data packets can share the field information of the preset packet header field. The packet header does not include the preset packet header field in the same splicing packet group.
[0062] In step 260, the check mode information of the preset reserved field in the transaction layer data packet is extracted, the check information of the packet header and the payload is generated according to the check mode information, and the check information is sent to the corresponding receiving end.
[0063] The preset reserved field can be an unoccupied field in the transaction layer data packet, and the preset reserved field can be used to identify the check mode of the transaction layer data packet. The check mode can include different check modes of the transaction layer data packet, such as checking each transaction layer data packet or checking the entire splicing packet group. The check information can be check code information generated by the packet header and the payload of one or more transaction layer data packets, such as check code generated by link cyclic redundancy check (LCRC).
[0064] In the embodiments of the present application, different check modes can correspond to different transaction layer data packet sending efficiency. For example, based on the check of the transaction layer data packet, when the check is wrong, the additional time overhead of retransmission is small, but the data storage overhead of the transaction layer data packet is large. Based on the check of the splicing packet group, when the check is wrong, the additional time overhead of retransmission is large, but the data storage overhead of the transaction layer data packet is small. The preset reserved field can be used to identify the check mode of the transaction layer data packet. The user or administrator can select the corresponding check mode according to the need, and identify the check mode in the preset reserved field of the transaction layer data packet to generate the corresponding check mode information. When the check information is generated at the sending end, the check mode information of the preset reserved field in the transaction layer data packet can be extracted, the packet header and the payload of the transaction layer data packet are processed according to the check mode information, and the corresponding check information is generated. The sending end can send the check information to the receiving end corresponding to the transaction layer data packet.
[0065] In the embodiment of the application, the field information in the preset header field of the extracted transaction layer data packet is divided into different transaction layer data packet groups, each transaction layer data packet group is divided into a splicing packet group according to the load limit, the pre-header field in the transaction layer data packet other than the first transaction layer data packet to be sent is deleted, the header and load of the transaction layer data packet in the transaction layer data packet group are respectively sent to the receiving end after processing, the corresponding check information is generated according to the check mode of the pre-reserved field in each transaction layer data packet and is sent, the transaction layer data packet is quickly sent, the transmission proportion of non-data content in the data packet is reduced, the transmission cost is reduced, and the transmission efficiency of the transaction layer data packet is improved.
[0066] Further, on the basis of the above-mentioned application embodiment, the device addresses of the receiving end corresponding to the transaction layer data packets in the splicing packet group are the same.
[0067] Specifically, in the embodiment of the application, the transaction layer data packets processed can correspond to the same device address of the receiving end, and after the repeated preset header fields are deleted, the transaction layer data packets in the splicing packet group can still be sent to the corresponding receiving end. It can be understood that, since the transaction layer data packet is a data packet generated by a data message in the transaction layer, the transaction layer data packet to be sent corresponds to the same data message, and the device address of the corresponding receiving end is the same.
[0068] Further, on the basis of the above-mentioned application embodiment, the transaction layer data packets in the splicing packet group are divided into at least one splicing packet group according to the load limit, including: obtaining the maximum splicing packet quantity corresponding to the load limit; dividing the transaction layer data packets in each transaction layer data packet group into at least one splicing packet group according to the maximum splicing packet quantity; and identifying the preset reserved field of the transaction layer data packets belonging to each splicing packet group to distinguish the sending position of the transaction layer data packet in the corresponding splicing packet group.
[0069] The maximum splicing packet quantity can be the maximum number of transaction layer data packets included in one splicing packet group, and the maximum splicing packet quantity can be associated with the size of the transaction layer data packet and the size corresponding to the load limit.
[0070] In the embodiments of the present application, the maximum number of transaction layer data packets that can be contained in a splicing packet group can be determined according to the data size corresponding to the load limit and the size of each transaction layer data packet, and the transaction layer data packets in each transaction layer data packet group can be arranged in sequence according to the sending order, and the maximum number of transaction layer data packets can be selected as splicing packets in sequence according to the order. It can be understood that when the number of transaction layer data packets in the transaction layer data packet group is less than the maximum number, the transaction layer data packet group as a whole can be used as a splicing packet group. Since the same field information of the preset packet header field needs to be used in the splicing packet group, the sending position of each transaction layer data packet group in the splicing packet group needs to be determined, and the position of each transaction layer data packet in the splicing packet group can be distinguished by marking the reserved field in the transaction layer data packet header, Figure 5a and Figure 5b are respectively a structure diagram of a transaction layer data packet header provided by the embodiments of the present application, referring to Figure 5a and Figure 5b , a C identification bit is added in the preset reserved field of the packet header, and the C identification bit is 1 when indicating the beginning of a new splicing packet, and the C identification bit is 0 when indicating not the beginning of a new splicing packet.
[0071] Further, on the basis of the above-mentioned application embodiments, the generation of the check information according to the check mode information in the preset check field in the transaction layer data packet according to the packet header and the load and the sending of the corresponding receiving end include:
[0072] The check information of the preset check field in the transaction layer data packet is extracted, wherein the preset check field is located in the reserved field of the packet header; if the check information identifies a first check mode, the check information is generated based on the transaction layer data packet corresponding to the splicing packet group and sent to the corresponding receiving end; if the check information identifies a second check mode, the check information is generated based on the transaction layer data packet and sent to the corresponding receiving end.
[0073] In the embodiments of the present application, the reserved field in the transaction layer data packet can be used as a preset check field, referring to Figure 6a and Figure 6b When the check information in the preset check field L is 0, it can be determined that the check mode is a first check mode, and the check information can be generated according to the splicing packet group corresponding to each transaction layer data packet, for example, referring to Figure 7 , an LCRC check bit can be generated for the transaction layer data packets contained in the splicing packet group, and sent with the last transaction layer data packet sent in the splicing packet. When the check information in the preset check field L is 1, it can be determined that the check mode is a second check mode, and the check information can be generated for each transaction layer data packet, for example, referring to Figure 8LCRC check bits can be generated for each transaction layer data packet, and the check bits are sent with the corresponding transaction layer data packet. Further, the two check methods can facilitate users to flexibly select a strategy and find an optimal balance point between maximum latency, access efficiency, and reliability. For example, in terms of latency, compared with the single-packet payload+LCRC transmission method, the multi-packet payload+LCRC transmission method uses only one LCRC check bit, and when there is no LCRC problem, the efficiency is higher than that of the former. However, if the LCRC problem occurs, the multi-packet transmission method will cause additional time overhead, resulting in a decrease in the latency of accessing this transmission. However, from the system level, if the probability of the LCRC check problem is very low, the access efficiency is still better than that of the transmission with a smaller payload.
[0074] Figure 9 is a flowchart of a data transmission method provided by an embodiment of the present application. The embodiment of the present application can be used in the case of PCIE data transmission. The method can be executed by a data transmission device in the embodiment of the present application. The device can be realized by a software and / or hardware method, and generally can be integrated in a receiving end. The method provided by the embodiment of the present application specifically includes the following steps:
[0075] Step 310: receiving a transaction layer data packet transmitted by a sending end.
[0076] In the embodiment of the present application, the receiving end can obtain the transaction layer data packet transmitted by the sending end. The number of received transaction layer data packets can be one or more.
[0077] Step 320: determining, according to a packet header, that the transaction layer data packet belongs to a spliced packet group, and processing the transaction layer data packet according to information of a preset packet header field corresponding to the spliced packet group.
[0078] Specifically, the packet header of the received transaction layer data packet can be processed. If the packet header contains identification information or has a complete packet header structure, it can be determined that the transaction layer data packet is located in a spliced packet group. For the transaction layer data packets belonging to the same spliced packet group, the information of the corresponding preset packet header field can be used to process the transaction layer data packet. It can be understood that the information of the preset packet header field of the same spliced packet group can come from the transaction layer data packet in the spliced packet group, for example, the first transaction layer data packet transmitted to the receiving end. In the embodiment of the present application, by obtaining the transaction layer data packet transmitted by the sending end, determining the spliced packet group to which the transaction layer data packet belongs according to the packet header of the transaction layer data packet, and processing the corresponding transaction layer data packet according to the preset packet header field of the spliced packet group, efficient transmission of the transaction layer data packet is realized, the proportion of non-data content in the transmission process is reduced, and the data transmission efficiency is improved.
[0079] Further, on the basis of the application examples described above, if it is determined according to the packet header that the transaction layer data packet belongs to the splicing packet group, the transaction layer data packet is processed according to the information of the preset packet header field corresponding to the splicing packet group, which includes:
[0080] According to the identification information of the preset reserved field in the packet header of the transaction layer data packet, the sending position of the transaction layer data packet in the splicing packet group is determined. If the sending position of the transaction layer data packet is the first position, the information of the preset packet header field in the packet header is extracted as the information of the preset packet header field corresponding to the splicing packet group, and the transaction layer data packet is processed according to the information. If the sending position of the transaction layer data packet is not the first position, the information of the preset packet header field corresponding to the splicing packet group is obtained to process the transaction layer data packet. Further, if it is determined according to the packet header that the transaction layer data packet does not belong to the splicing packet group, the existing transaction layer data packet processing method is used for processing. For example, if the mark bit C in the packet header is 0, it is determined that the data packet does not belong to the splicing packet group, and the corresponding transaction layer data packet can be directly processed according to the packet header information. If the mark bit C in the packet header is 1, it is determined that the transaction layer data packet belongs to the splicing packet group, and the transaction layer data packet needs to be processed using the information of the preset packet header field corresponding to the splicing packet group.
[0081] In the embodiments of the present application, the corresponding identification information can be obtained by extracting the preset reserved field in the packet header. The sending position of the corresponding transaction layer data packet in the splicing packet group can be determined through the identification information. For example, if the identification information L is 1, it is determined that the transaction layer data packet is the first position in the splicing packet group. If the identification information L is 0, it is determined that the transaction layer data packet is not the first position in the splicing packet group. For the transaction layer data packet in the first position, the information in the preset packet header field of the packet header can be the information in the preset packet header field of the corresponding splicing packet group, and the transaction layer data packet can be directly processed using the information of the packet header to obtain the data content. For the transaction layer data packet in the non-first position, the transaction layer data packet lacks the preset packet header field, and the transaction layer data packet can be processed using the information in the preset packet header field corresponding to the splicing packet group to obtain the data content. It can be understood that the information in the preset packet header field of the splicing packet group can come from the transaction layer data packet in the first position.
[0082] Further, on the basis of the application examples described above, the information of the preset packet header field corresponding to the splicing packet group is stored in a preset storage position.
[0083] In the embodiment of the present application, when processing the transaction layer data packet, the information of the preset header field of the transaction layer data packet group at the first sending position in the packet group is stored in a preset storage position, and the subsequent transaction layer data packet of the packet group can be directly processed using the information of the preset storage position. It can be understood that the preset storage position can be a storage area of a random access memory.
[0084] Figure 10 is a structural schematic diagram of a data transmission device provided by an embodiment of the present application, which can execute the data transmission method provided by any embodiment of the present application, has a function module and beneficial effect corresponding to the execution method. The device can be realized by software and / or hardware, and is generally integrated in a sending end. The device provided by the embodiment of the present application specifically includes an information grouping module 410, an information compression module 420 and an information transmission module 430.
[0085] The information grouping module 410 is configured to determine at least one transaction layer data packet group with the same information of a preset header field, wherein the transaction layer data packet group includes at least one transaction layer data packet.
[0086] The information compression module 420 is configured to process the header corresponding to each transaction layer data packet group according to a load limit, so as to reduce the repetition number of the preset header field.
[0087] The information transmission module 430 is configured to sequentially transmit the transaction layer data packets in each transaction layer data packet group to a receiving end.
[0088] In the embodiment of the present application, the information grouping module divides the received transaction layer data packets into different transaction layer data packet groups according to the information of the preset header field, the information compression module processes the header corresponding to the transaction layer data packet group based on the load limit, reduces the repetition number of the preset header field in each transaction layer data packet group, and the information transmission module sequentially transmits each processed transaction layer data packet group to the receiving end, so as to realize the fast transmission of data, reduce the transmission proportion of non-data content, reduce the additional transmission cost, and improve the transmission efficiency of data.
[0089] Further, on the basis of the above-mentioned application embodiment, the preset header field in the information grouping module 410 includes at least one of a version Format field, a type Type field, a reserved Reserved field, a transmission priority Traffic Class field, a TD field, an EP field and a length Length field.
[0090] Further, on the basis of the above-mentioned application embodiment, the information grouping module 410 includes:
[0091] An information extraction unit is configured to extract field information in a header of each transaction layer data packet according to the preset header field.
[0092] A grouping unit is configured to divide the corresponding transaction layer data packet into different transaction layer data packet groups according to the value of each field information.
[0093] Further, on the basis of the above application embodiments, the transaction layer data packets in the splicing packet group have the same device address of the receiving end.
[0094] Further, on the basis of the above application embodiments, the information compression module 420 comprises:
[0095] A number determination unit is configured to obtain the maximum number of splicing packets corresponding to the load limit.
[0096] A grouping execution unit is configured to divide the transaction layer data packets in each transaction layer data packet group into at least one splicing packet group according to the maximum number of splicing packets.
[0097] A position identification unit is configured to identify a preset reserved field of the transaction layer data packets belonging to each splicing packet group to distinguish the sending position of the transaction layer data packets in the corresponding splicing packet group.
[0098] Further, on the basis of the above application embodiments, the information transmission module 430 comprises:
[0099] A data packet sending unit is configured to send the header and the load of the transaction layer data packets included in each splicing packet group to the corresponding receiving end according to the transaction layer data packets in the splicing packet group.
[0100] A verification sending unit is configured to extract the verification mode information of a preset reserved field in the transaction layer data packet, generate verification information of the header and the load according to the verification mode information, and send the verification information to the corresponding receiving end.
[0101] Further, on the basis of the above application embodiments, the verification sending unit comprises:
[0102] A verification extraction unit is configured to extract the verification information of a preset verification field in the transaction layer data packet, wherein the preset verification field is located in the reserved field of the header.
[0103] A first verification unit is configured to generate verification information based on the splicing packet group corresponding to the transaction layer data packet and send the verification information to the corresponding receiving end if the verification information identifies a first verification mode.
[0104] A second verification unit is configured to generate verification information based on the transaction layer data packet and send the verification information to the corresponding receiving end if the verification information identifies a second verification mode.
[0105] Figure 11 is another data transmission device provided by the embodiment of the application, which can execute the data transmission method provided by any embodiment of the application, has the function modules and beneficial effects corresponding to the execution method. The device can be realized by software and / or hardware, and is generally integrated in the receiving end. The device provided by the embodiment of the application specifically includes an information receiving module 510 and an information processing module 520.
[0106] The information receiving module 510 is configured to receive the transaction layer data packet transmitted by the sending end.
[0107] The information processing module 520 is configured to determine, according to the packet header, that the transaction layer data packet belongs to a splicing packet group, and process the transaction layer data packet according to the information of the preset packet header field corresponding to the splicing packet group.
[0108] In the embodiment of the application, the information receiving module obtains the transaction layer data packet transmitted by the sending end, the information processing module determines the splicing packet group to which the transaction layer data packet belongs according to the packet header of the transaction layer data packet, and processes the corresponding transaction layer data packet according to the pre-packet header field of the splicing packet group, thereby realizing efficient transmission of the transaction layer data packet, reducing the non-data content ratio in the transmission process, and improving the data transmission efficiency.
[0109] Further, on the basis of the above-mentioned application embodiment, the information processing module 520 includes:
[0110] The position determining unit is configured to determine the sending position of the transaction layer data packet in the splicing packet group according to the identification information of the preset reserved field in the packet header of the transaction layer data packet.
[0111] The first processing unit is configured to determine that the sending position of the transaction layer data packet is the first position, extract the information of the preset packet header field of the packet header as the information of the preset packet header field corresponding to the splicing packet group, and process the transaction layer data packet according to the information.
[0112] The second processing unit is configured to determine that the sending position of the transaction layer data packet is a non-first position, obtain the information of the preset packet header field corresponding to the splicing packet group, and process the transaction layer data packet.
[0113] Further, on the basis of the above-mentioned application embodiment, the information of the preset packet header field corresponding to the splicing packet group in the information processing module 520 is stored in a preset storage position.
[0114] Figure 12 is a structural schematic diagram of an electronic device provided by an embodiment of the application, as Figure 12As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 12 In the figure, a processor 60 is used as an example; the device processor 60, the memory 61, the input device 62 and the output device 63 can be connected by a bus or other means. Figure 12 The bus connection is taken as an example.
[0115] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the modules corresponding to the data transmission device in the embodiments of the present application (information grouping module 410, information compression module 420, and information transmission module 430, or information receiving module 510 and information processing module 520). The processor 60 executes the software programs, instructions, and modules stored in the memory 61 to execute various functional applications and data processing of the device, thereby implementing the above-mentioned data transmission method.
[0116] The memory 61 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal. Furthermore, the memory 61 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 61 may further include memory remotely located relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0118] An embodiment of the present application further provides a storage medium containing computer-executable instructions, wherein the computer-executable instructions, when executed by a computer processor, are used to perform a data transmission method, the method comprising:
[0119] Determining at least one transaction layer data packet group having the same information in a preset packet header field, wherein the transaction layer data packet group includes at least one transaction layer data packet;
[0120] Processing the packet header corresponding to each of the transaction layer data packet groups according to the load limit to reduce the number of repetitions of the preset packet header field;
[0121] Transmitting the transaction layer data packets in each transaction layer data packet group to the receiving end in sequence. And / or,
[0122] receiving the transaction layer data packet transmitted by the sending end;
[0123] determining, according to the packet header, that the transaction layer data packet belongs to a splicing packet group, and processing the transaction layer data packet according to information of a preset packet header field corresponding to the splicing packet group.
[0124] Of course, the storage medium provided by the embodiment of the present application contains computer executable instructions, which are not limited to the method operations described above, and can also perform related operations in the data transmission method provided by any embodiment of the present application.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk or an optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments of the present application.
[0126] It is worth noting that the embodiments of the above data transmission device include various units and modules only according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual distinction, and do not limit the protection scope of the present application.
[0127] Those skilled in the art can understand that all or some steps in the above disclosed method, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0128] In hardware implementations, the division of functionality between the functional modules / units referred to in the above description does not necessarily correspond to a division of physical components; for example, one physical component can have multiple functionalities, or one functionality or step can be performed by several physical components in cooperation. Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, it should be appreciated by those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
[0129] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not intended to limit the scope of the present application. Any modification, equivalent replacement and improvement made by those of ordinary skill in the art without departing from the scope and spirit of the present application shall fall within the scope of the present application.
Claims
1. A data transmission method, characterized in that: Applied to the sending end, the method includes: Determining at least one transaction layer data packet group having the same information in a preset packet header field, wherein the transaction layer data packet group includes at least one transaction layer data packet; Processing the packet header corresponding to each of the transaction layer data packet groups according to the load limit to reduce the number of repetitions of the preset packet header field; Transmitting the transaction layer data packets in each of the transaction layer data packet groups to the receiving end in sequence; The processing of the packet header corresponding to each of the transaction layer data packet groups according to the load limit to reduce the number of repetitions of the preset packet header field includes: For each of the transaction layer data packet groups, dividing the transaction layer data packets in the transaction layer data packet group into at least one spliced packet group according to the load limit; In each concatenated packet group, the preset packet header field of the transaction layer data packet located at the first transmission is retained and the preset packet header fields of other transaction layer data packets are deleted.
2. The method according to claim 1, characterized in that The preset packet header field includes at least one of: a version Format field, a type Type field, a reserved field, a transmission priority Traffic Class field, a TD field, an EP field, and a length Length field.
3. The method according to claim 1, characterized in that The determining of at least one transaction layer data packet group having the same information in the preset packet header field includes: Extracting field information from the header of each transaction layer data packet according to the preset header field; According to the value of each field information, the corresponding transaction layer data packets are divided into different transaction layer data packet groups.
4. The method according to claim 1, wherein The transaction layer data packets in the spliced packet group correspond to the same device address of the receiving end.
5. The method according to claim 1, wherein The dividing the transaction layer data packets in the transaction layer data packet group into at least one spliced packet group according to the load limit includes: Get the maximum number of splicing packages corresponding to the load limit; Dividing the transaction layer data packets in each transaction layer data packet group into at least one splicing packet group according to the maximum number of splicing packets; The preset reserved fields of the transaction layer data packets belonging to each of the spliced packet groups are marked to distinguish the sending positions of the transaction layer data packets in the corresponding spliced packet groups.
6. The method according to claim 1, characterized in that The sequentially transmitting the transaction layer data packets in each of the transaction layer data packet groups to the receiving end includes: For each of the transaction layer data packet groups, sending the header and payload of the transaction layer data packet included in the spliced packet group to the corresponding receiving end respectively; Extract verification mode information of a preset reserved field in the transaction layer data packet, generate verification information of the packet header and the payload according to the verification mode information, and send the verification information to a corresponding receiving end.
7. The method according to claim 6, characterized in that The extracting verification mode information of a preset reserved field in the transaction layer data packet, generating verification information of the packet header and the payload according to the verification mode information, and sending the verification information to a corresponding receiving end includes: Extracting verification information of a preset verification field in the transaction layer data packet, wherein the preset verification field is located in a reserved field of the packet header; If the verification information identifies the first verification mode, generating verification information based on the concatenated packet group corresponding to the transaction layer data packet and sending the verification information to the corresponding receiving end; If the verification information identifies the second verification mode, verification information is generated based on the transaction layer data packet and sent to the corresponding receiving end.
8. A data transmission method, characterized in that: At the application receiving end, the method includes: Receive transaction layer data packets transmitted by the sender; Determining, based on the packet header, that the transaction layer data packet belongs to a spliced packet group, and processing the transaction layer data packet based on information in a preset packet header field corresponding to the spliced packet group; The transaction layer data packet belongs to a transaction layer data packet group; the transmitting end is configured to process a packet header corresponding to each transaction layer data packet group according to a load limit to reduce a number of repetitions of the preset packet header field, including: For each of the transaction layer data packet groups, dividing the transaction layer data packets in the transaction layer data packet group into at least one spliced packet group according to the load limit; In each concatenated packet group, the preset packet header field of the transaction layer data packet located at the first transmission is retained and the preset packet header fields of other transaction layer data packets are deleted.
9. The method according to claim 8, characterized in that Determining, based on the packet header, that the transaction layer data packet belongs to a spliced packet group, and processing the transaction layer data packet based on information of a preset packet header field corresponding to the spliced packet group, includes: Determining a sending position of the transaction layer data packet in the spliced packet group according to identification information of a preset reserved field in a packet header of the transaction layer data packet; Determining that the sending position of the transaction layer data packet is the first, extracting information of a preset header field of the packet header as information of a preset header field corresponding to the splicing packet group, and processing the transaction layer data packet according to the information; It is determined that the sending position of the transaction layer data packet is not the first position, and information of a preset packet header field corresponding to the splicing packet group is obtained to process the transaction layer data packet.
10. The method according to claim 8, characterized in that The information of the preset packet header field corresponding to the spliced packet group is stored in a preset storage location.
11. A data transmission device, characterized in that: Applied to the transmitting end, the device includes: an information grouping module, configured to determine at least one transaction layer data packet group having the same information in a preset packet header field, wherein the transaction layer data packet group includes at least one transaction layer data packet; an information compression module, configured to process the packet header corresponding to each of the transaction layer data packet groups according to the load limit, so as to reduce the number of repetitions of the preset packet header field; An information transmission module, configured to sequentially transmit transaction layer data packets in each transaction layer data packet group to a receiving end; The information compression module is specifically used to: For each of the transaction layer data packet groups, dividing the transaction layer data packets in the transaction layer data packet group into at least one spliced packet group according to the load limit; In each concatenated packet group, the preset packet header field of the transaction layer data packet located at the first transmission is retained and the preset packet header fields of other transaction layer data packets are deleted.
12. A data transmission device, characterized in that: Applied to the receiving end, the device includes: An information receiving module is used to receive transaction layer data packets transmitted by the sending end; an information processing module, configured to determine, based on a packet header, that the transaction layer data packet belongs to a spliced packet group, and process the transaction layer data packet based on information in a preset packet header field corresponding to the spliced packet group; The transaction layer data packet belongs to a transaction layer data packet group; the transmitting end is configured to process a packet header corresponding to each transaction layer data packet group according to a load limit to reduce a number of repetitions of the preset packet header field, including: For each of the transaction layer data packet groups, dividing the transaction layer data packets in the transaction layer data packet group into at least one spliced packet group according to the load limit; In each concatenated packet group, the preset packet header field of the transaction layer data packet located at the first transmission is retained and the preset packet header fields of other transaction layer data packets are deleted.
13. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method according to any one of claims 1 to 7 or 8 to 10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 7 or 8 to 10 is implemented.
Citation Information
Patent Citations
Message transmission method and apparatus based on PCIE bus
CN104038450A