Data processing method and device, electronic device and storage medium
By separating and segmenting the data packet header and payload, and marking the target port number for interleaved scheduling, the problem of large packet processing delay in the multi-port data scheduling method is solved, and the data processing efficiency of the smart network card DPU is improved.
Patent Information
- Application Number
- CN202410587393.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-13
AI Technical Summary
The existing multi-port data scheduling method needs to process each data packet in sequence according to the scheduling order, resulting in a large processing delay between data packets and a large processing delay for lower priority data packets, affecting the intelligence of FPGA-based design. The data processing efficiency of the network card DPU.
By separating the data packet header and payload, performing segmentation processing according to the preset interleaving data bit width and single port single scheduling time, and marking the target port number, uniform interleaving scheduling is performed to reduce the processing delay between data packets.
It greatly reduces the processing delay between data packets, improves data processing efficiency, and ensures the processing speed of lower priority data packets.
Smart Images

Figure CN118199810B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a data processing method and device, an electronic device, and a storage medium. Background Art
[0002] As network transmission bandwidth increases, the computing resources of data centers are occupied by increasingly complex data volumes and infrastructure operations, causing performance bottlenecks in business processing. In order to cope with the performance bottlenecks caused by the massive data and exponentially growing complexity of infrastructure operations in data centers, a smart network card data processor (Data Processing Unit, DPU) designed based on Field Programmable Gate Array (Field Programmable Gate Array, FPGA) can be used to solve the performance bottleneck and improve business processing efficiency.
[0003] The FPGA-based smart NIC DPU uses a multi-port data scheduling method. However, the commonly used multi-port data scheduling method is to schedule the entire data packet according to the preset priority of the data packet. The data packet includes a data packet header and a payload. The data packet header contains the destination, source address, port and other data and control information of the data packet. When the data packet arrives at the destination, the data packet header will be decapsulated according to the needs of the receiver. The payload is the original data that records the information.
[0004] During the data packet processing process, the smart network card DPU designed based on FPGA contains multiple data packet header processing modules. The data packet header processing module generally processes the information of the data packet header. However, since the data packets are continuous data packets when entering the smart network card, after the data packet header processing module processes a data packet header, it is necessary to complete the transmission of the payload corresponding to this data packet header before processing the subsequent data packet headers. The processing delay between data packets is large, resulting in a larger processing delay for data packets with lower priority than for data packets with higher priority, which in turn affects the data processing efficiency of the smart network card DPU designed based on FPGA. Summary of the invention
[0005] The present disclosure provides a data processing method and device, an electronic device and a storage medium. The main purpose is to solve the problem that the existing multi-port data scheduling method needs to process each data packet in turn according to the scheduling order, resulting in a large processing delay between data packets, resulting in a large delay in processing data packets with lower priority, thereby affecting the data processing efficiency of the smart network card DPU based on FPGA design.
[0006] According to a first aspect of the present disclosure, a data processing method is provided, comprising:
[0007] Separating a data packet header and a payload of a target data packet, and segmenting the data packet header and the payload according to a preset interleaved data bit width and a preset single-port single scheduling time, respectively, to obtain at least two sub-data packet headers and at least two sub-payloads;
[0008] Mark the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads;
[0009] The at least two marked sub-data packet headers and the at least two marked sub-payloads are evenly interleaved and scheduled in a preset order to obtain target data.
[0010] Optionally, the step of uniformly interleaving and scheduling the at least two marked sub-data packet headers and the at least two marked sub-payloads in a preset order to obtain target data includes:
[0011] Evenly interleaving and scheduling the at least two marked sub-data packet headers according to a preset order to obtain a first data sequence;
[0012] After the at least two marked sub-data packet headers are scheduled, the at least two marked sub-payloads are evenly interleaved and scheduled according to a preset order to obtain a second data sequence;
[0013] The first data sequence and the second data sequence are concatenated to obtain the target data.
[0014] Optionally, the segmenting of the data packet header and the payload to obtain at least two sub-data packet headers and at least two sub-payloads according to a preset interleaved data bit width and a preset single-port single scheduling time includes:
[0015] Comparing the data bit width of the data packet header and the payload with the preset interleaved data bit width;
[0016] If the data bit width of the data packet header and the payload is greater than the preset interleaved data bit width, segmenting the data packet header and the payload to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width;
[0017] If the data bit width of the data packet header and the payload is smaller than the preset interleaved data bit width, the data packet header and the payload are padded with zeros to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width.
[0018] Optionally, before separating the data packet header and the payload of the target data packet, the method includes:
[0019] Obtaining data packets to be processed inputted via different input ports;
[0020] Converting the data bit width of the data packet to be processed into a preset input data bit width to obtain a data packet to be processed with the same data bit width;
[0021] Converting the clock pulse of the data packet to be processed into a preset clock pulse to obtain a converted data packet to be processed;
[0022] Performing an abnormality check on the converted data packet to be processed, and if it is determined that the converted data packet to be processed is an abnormal data packet, discarding the abnormal data packet; or marking the abnormal data packet as an error according to the reference data packet;
[0023] A normal data packet that has passed the abnormality check or an abnormal data packet that has been marked with an error is determined as the target data packet.
[0024] Optionally, before obtaining the data packets to be processed input via different input ports, the method further includes:
[0025] Determine whether the input port corresponding to the to-be-processed data packet receives a back pressure signal, wherein the back pressure signal is a stop input signal of the input port;
[0026] If it is determined that the input port corresponding to the data packet to be processed receives the back pressure signal, input of the data packet to be processed from the input port is stopped.
[0027] Optionally, marking the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads comprises:
[0028] Determine the destination port corresponding to the destination data packet and its corresponding destination port number;
[0029] The target port number is marked in the at least two sub-data packet headers and the at least two sub-payloads corresponding to the target data packet, respectively, to obtain at least two marked sub-data packet headers and at least two marked sub-payloads.
[0030] According to a second aspect of the present disclosure, there is provided a data processing device, comprising:
[0031] A separation unit, used for separating a data packet header and a payload of a target data packet;
[0032] A segmentation unit, configured to segment the data packet header and the payload according to a preset interleaved data bit width and a preset single-port single scheduling time, to obtain at least two sub-data packet headers and at least two sub-payloads;
[0033] a marking unit, used to mark the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, so as to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads;
[0034] The scheduling unit is used to perform uniform interleaving scheduling on the at least two marked sub-data packet headers and the at least two marked sub-payloads in a preset order to obtain target data.
[0035] Optionally, the scheduling unit includes:
[0036] A first scheduling module, configured to perform uniform interleaving scheduling on the at least two marked sub-data packet headers according to a preset order to obtain a first data sequence;
[0037] A second scheduling module is used to perform uniform interleaving scheduling on the at least two marked sub-payloads according to a preset order after the at least two marked sub-data packet headers are scheduled to obtain a second data sequence;
[0038] A splicing module is used to splice the first data sequence and the second data sequence to obtain the target data.
[0039] Optionally, the segmentation unit includes:
[0040] A comparison module, used for comparing the data bit width of the data packet header and the payload with the preset interleaved data bit width;
[0041] A segmentation module, configured to segment the data packet header and the payload to obtain at least two sub-data packet headers and at least two sub-payloads consistent with the preset interleaved data bit width if the data bit width of the data packet header and the payload is greater than the preset interleaved data bit width;
[0042] A zero-padding module is used to pad the data packet header and the payload with zeros if the data bit width of the data packet header and the payload is smaller than the preset interleaved data bit width, so as to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width.
[0043] Optionally, the device further comprises a preprocessing unit, wherein the preprocessing unit comprises:
[0044] An acquisition module, used for acquiring data packets to be processed inputted via different input ports before separating the data packet header and the effective load of the target data packet;
[0045] A first conversion module, used for converting the data bit width of the data packet to be processed into a preset input data bit width to obtain a data packet to be processed with the same data bit width;
[0046] A second conversion module, used for converting the clock pulse of the data packet to be processed into a preset clock pulse to obtain a converted data packet to be processed;
[0047] A check module, used for performing an abnormality check on the converted data packet to be processed, and if it is determined that the converted data packet to be processed is an abnormal data packet, the abnormal data packet is discarded; or, the abnormal data packet is marked as an error according to the reference data packet;
[0048] The first determination module is used to determine a normal data packet that has passed the abnormality check or an abnormal data packet that has been error-marked as the target data packet.
[0049] Optionally, the device further includes a feedback unit, and the feedback unit includes:
[0050] A judgment module, used for judging whether the input port corresponding to the data packet to be processed receives a back pressure signal before acquiring the data packet to be processed inputted via different input ports, wherein the back pressure signal is a stop input signal of the input port;
[0051] The pausing module is used to suspend inputting the data packet to be processed from the input port if it is determined that the input port corresponding to the data packet to be processed receives the back pressure signal.
[0052] Optionally, the marking unit comprises:
[0053] A second determining module, used to determine a target port corresponding to the target data packet and its corresponding target port number;
[0054] The marking module is used to mark the target port number in the at least two sub-data packet headers and the at least two sub-payloads corresponding to the target data packet, respectively, to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads.
[0055] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0056] at least one processor; and
[0057] a memory communicatively connected to the at least one processor; wherein,
[0058] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0059] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0060] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0061] The data processing method and device, electronic device and storage medium provided by the present disclosure separate the data packet header and the payload of the target data packet, and segment the data packet header and the payload according to the preset interleaved data bit width and the preset single-port single scheduling time, respectively, to obtain at least two sub-data packet headers and at least two sub-payloads; the port numbers of the at least two sub-data packet headers and the at least two sub-payloads are marked as the target port numbers corresponding to the target data packet, to obtain at least two marked sub-data packet headers and at least two marked sub-payloads; the at least two marked sub-data packet headers and the at least two marked sub-payloads are uniformly interleaved and scheduled in a preset order to obtain the target data. The data processing method provided by the present disclosure greatly reduces the processing delay between data packets and effectively improves the data processing efficiency by separating the data packet header and the payload of the target data packet, performing segmentation processing, and marking the target port number before performing interleaving scheduling.
[0062] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0064] Figure 1 A flowchart of a data processing method provided by an embodiment of the present disclosure;
[0065] Figure 2 A schematic diagram of interleaving scheduling of data packets provided in an embodiment of the present disclosure;
[0066] Figure 3 A schematic diagram of another interleaving scheduling of data packets provided in an embodiment of the present disclosure;
[0067] Figure 4 A schematic diagram of a flow chart of rate conversion of a data packet provided in an embodiment of the present disclosure;
[0068] Figure 5 A rate conversion schematic diagram provided for an embodiment of the present disclosure;
[0069] Figure 6 A schematic diagram of a correct signal provided in an embodiment of the present disclosure;
[0070] Figure 7 A connection block diagram of a data processing method provided by an embodiment of the present disclosure;
[0071] Figure 8 A schematic diagram of another process of interleaving scheduling provided by an embodiment of the present disclosure;
[0072] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present disclosure;
[0073] Fig.10 A schematic diagram of the structure of another data processing device provided by an embodiment of the present disclosure;
[0074] Fig.11 A schematic block diagram of an exemplary electronic device 400 provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0075] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0076] The data processing method and apparatus, electronic device, and storage medium according to the embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0077] Figure 1 A flow chart of a data processing method provided by an embodiment of the present disclosure is provided. The method is applied in a computer. The data processing method can be executed by a control device or equipment of an information prompt. The device or equipment can be configured in a server, a processor or a main control chip. For example, it can be arranged in an intelligent network card based on FPGA design, etc. Figure 1 As shown, the method comprises the following steps:
[0078] Step 101, separate the data packet header and the payload of the target data packet, and segment the data packet header and the payload according to the preset interleaved data bit width and the preset single-port single scheduling time, to obtain at least two sub-data packet headers and at least two sub-payloads.
[0079] In order to better understand the target data packet structure, the embodiment of the present disclosure provides a schematic diagram of interleaving scheduling of data packets, such as Figure 2 As shown in the figure, in the computer field, a complete data packet used for data transmission usually consists of two parts, namely the data packet header and the payload, as shown in Figure 2 The header0 and payload0 in the figure represent the header and payload of the data packet, respectively. The header usually refers to the first part of the data packet, which contains the necessary metadata and control information to identify the destination, source address, port and other information of the data packet. In the Transmission Control Protocol / Internet Protocol (TCP / IP) network communication, the data packet is composed of the IP header (InternetProtocol header) of the network layer and possible other protocol headers. When the data packet is transmitted between these high-level protocols, its header will increase the corresponding protocol header with each network layer it passes through. When the data packet reaches the network layer of the destination, it will be decapsulated according to the needs of the receiver to obtain the data part. During the transmission of the data packet, a large data packet may need to be split into multiple small data packets due to network congestion and other reasons, so as to be more effectively processed and forwarded at the intermediate nodes. These small data packets each carry the IP header and other necessary information, but their payload only accounts for a small part of the payload of the large data packet. In the process of data packet reassembly, small data packets will not be allowed to be assembled and combined to ensure the integrity and correctness of the data packet. The payload is the raw data portion of the data packet.
[0080] In one embodiment provided in the present disclosure, in order to reduce the delay caused by the overall processing of the data packet, the data packet header and the payload of the target data packet may be separated, but not limited to, and then the separated data packet header and payload may be scheduled separately.
[0081] In practical applications, the lengths of data packet headers and payloads usually vary a lot. In order to adapt to the length changes of data packet headers and payloads, it is possible but not limited to segmenting the data packet headers and payloads separately according to a preset interleaved data bit width and a preset single-port single scheduling time before scheduling the data packet headers and payloads separately, so as to obtain at least two sub-data packet headers corresponding to the data packet header and at least two sub-payloads corresponding to the payload.
[0082] Step 102, marking the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, to obtain at least two marked sub-data packet headers and at least two marked sub-payloads.
[0083] In one embodiment provided in the present disclosure, the target port number is used as a basis for processing the two sub-data packet headers and the at least two sub-payloads. According to the target port number, the input port corresponding to the sub-data packet header or sub-payload can be found, and the preset order can be conveniently recorded to prevent errors in interleaving scheduling due to segmentation.
[0084] Step 103 , uniformly interleave and schedule the at least two marked sub-data packet headers and the at least two marked sub-payloads in a preset order to obtain target data.
[0085] In one embodiment provided in the present disclosure, the interleaving technology is a communication technology for improving the quality of data transmission. Its main principle is to disperse a series of data bits so that continuous bits will not be erroneous due to channel interference or other reasons during transmission. The specific operation includes breaking up and reorganizing the original bit sequence to form a new bit sequence, so that even if a bit error occurs during transmission, it can be corrected by subsequent channel coding and demodulation technology, and finally the original information content is restored. Taking mobile communication as an example, since the channel may be affected by factors such as deep fading, the bits may have long-term continuous errors. Traditional channel coding methods can only detect and correct single bits or shorter error strings, and the processing effect on long string errors is limited. In order to overcome this problem, it is necessary to adopt an interleaving technology, that is, to space out the bits that were originally close together, so that even if a longer string of errors occurs during transmission, these errors can be dispersed, so that they can be more easily repaired by the subsequent error correction mechanism.
[0086] In practical applications, interleaving can be achieved in different ways. For example, in a 4-bit message packet, the first two bits can be taken out to form a new 4-bit packet, called the first frame. Then, the remaining bits are divided into two groups, each containing the remaining two bits, forming the second frame and the third frame respectively. In this way, even if a packet (such as the second frame) is lost during transmission, it will not affect the content of other packets, and only the lost packet needs to be retransmitted. In this way, the overall data transmission interruption caused by burst errors can be reduced to a certain extent.
[0087] The data processing method provided by the present disclosure separates the data packet header and the payload of the target data packet, and performs segmentation processing on the data packet header and the payload respectively according to the preset interleaved data bit width and the preset single-port single scheduling time, so as to obtain at least two sub-data packet headers and at least two sub-payloads; the port numbers of the at least two sub-data packet headers and the at least two sub-payloads are all marked as the target port numbers corresponding to the target data packet, so as to obtain at least two marked sub-data packet headers and at least two marked sub-payloads; the at least two marked sub-data packet headers and the at least two marked sub-payloads are uniformly interleaved and scheduled in a preset order, so as to obtain the target data. The data processing method provided by the present disclosure greatly reduces the processing delay between data packets and effectively improves the data processing efficiency by separating the data packet header and the payload of the target data packet, performing segmentation processing, and marking the target port number before performing interleaving and scheduling.
[0088] In one embodiment provided by the present disclosure, in order to better understand the segmentation processing of the data packet header and the payload according to the preset interleaved data bit width and the preset single-port single scheduling time, the present disclosure embodiment provides another flow diagram of interleaved scheduling, such as Figure 3 As shown, the preset interleaved data width is set to 512 bits. Figure 3Four data packet headers obtained from four ports ABCD are shown, and the data bit width ranges are [511:0], [2047:0], [1023:0], and [4095:0], respectively. Since the data bit width of the data packet header with port number A is 512 bits, which is the same as the preset interleaved data bit width, segmentation processing is not required. The data bit width of the data packet header with port number B is 2048 bits, which is divided into four sub-data packet headers with data bit widths of [511:0] [1023:512] [1535:1024] [2047:1536], each of which has a data bit width of 512 bits. The data packet header with port number B and the data packet header with port number C are segmented in the same way. If the data bit width of the data packet header does not meet the preset interleaved data bit width, zero padding is adopted to pad zeros at the end of the data packet header to reach the preset interleaved data bit width.
[0089] By using the method provided in the above embodiment, all data packets are clock synchronized and data width consistency is adjusted before interleaving scheduling, which can reduce the impact of external port protocol upgrades on system functions and improve the versatility of subsequent processing.
[0090] In an embodiment provided by the present disclosure, in order to better understand the uniform interleaving scheduling of the at least two marked sub-data packet headers and the at least two marked sub-payloads in a preset order, the following method can be adopted but is not limited to: first, the at least two marked sub-data packet headers are uniformly interleaved to obtain a first data sequence; after completing the scheduling of the at least two marked sub-data packet headers, the at least two marked sub-payloads are uniformly interleaved in a preset order to obtain a second data sequence, and then the second data sequence is spliced after the first data sequence to obtain the target data.
[0091] To better explain the interleaving scheduling method provided in the above embodiment, please continue to refer to Figure 2 and Figure 3 , Figure 3 The Flag[] in the header of the sub-packet or the target port number of the sub-payload is used to indicate the target port number of the sub-packet header or the sub-payload. After segmentation, the sub-packets are sent to the sub-packet header according to the preset order. Figure 3 For example, the segmented sub-data packet headers are interleaved and scheduled in the order of ABCDABCD... Since the data packet header with port number A does not need to be segmented, the data packet header with port number A is scheduled only once and the scheduling is completed, and the other data packet headers are still evenly interleaved and scheduled, so the final scheduling order is ABCDBCD... After the data packet headers are interleaved and scheduled according to the final scheduling order, the first data sequence is obtained, such as Figure 2After completing the interleaving scheduling of the at least two sub-data packet headers after the marking, the at least two sub-payloads after the marking are interleaved in the same way to obtain a second data sequence, such as Figure 2 The scheduling part of the payload shown, and then splicing the first data sequence with the second data sequence to obtain the target data.
[0092] Through the data processing method provided by the embodiment of the present disclosure, after completing the processing of the first-ranked sub-data packet header, the second-ranked sub-data packet header can be directly processed without waiting for the transmission of the effective load part corresponding to the first-ranked sub-data packet header before processing the second-ranked sub-data packet header. It can be achieved that after processing all the data packet header parts, the effective load part can be transmitted, which effectively reduces the processing delay of multiple data packets.
[0093] In one embodiment provided by the present disclosure, in order to solve the problem that different input ports have different data rates, which leads to scheduling difficulties, before separating the data packet header and the payload of the target data packet, the following method may be used but is not limited to: Figure 4 The method shown is used to convert the rate, such as Figure 4 As shown, the method comprises the following steps:
[0094] Step 201: Obtain data packets to be processed input via different input ports.
[0095] In one embodiment provided by the present disclosure, the input port mainly includes a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) port for communicating with a central processing unit (CPU), and a Media Access Control Address (Media Access Control Address, MAC) interface for communicating with an external network. Different ports and different protocol versions have multiple communication rates, such as PCIe3.0 / 4.0, x4 / x8 / x16, SFP28 / QSFP28 and other network interfaces, and the rates are not the same.
[0096] Step 202: Convert the data bit width of the data packet to be processed into a preset input data bit width to obtain a data packet to be processed with the same data bit width.
[0097] In order to solve the problem that different input ports have different data rates, which leads to scheduling difficulties, before interleaving scheduling, the data bit width of the data packet to be processed is converted to a preset input data bit width, so as to obtain data packets to be processed with the same data bit width. In order to better understand the rate conversion method, the embodiment of the present disclosure provides a rate conversion schematic diagram, such as Figure 5 As shown in the figure, assuming that the data rate of the input port is 1ms × 200M / s × 256bit data, it is uniformly converted to a data rate of 0.4ms × 250M / s × 512bit.
[0098] Step 203, converting the clock pulse of the data packet to be processed into a preset clock pulse to obtain a converted data packet to be processed.
[0099] According to a processing method similar to the above step 202, the clock pulse of the data packet to be processed is converted to obtain the data packet to be processed with the same clock pulse.
[0100] Step 204, performing an abnormality check on the converted data packet to be processed. If it is determined that the converted data packet to be processed is an abnormal data packet, the abnormal data packet is discarded; or, the abnormal data packet is marked as an error according to the reference data packet.
[0101] In order to prevent scheduling errors caused by missing or too long data packets during the data scheduling process, before the data packets are scheduled, it is necessary to perform a data packet integrity check on the converted data packets to be processed, and discard the abnormal data packets; or, mark the abnormal data packets as errors according to the reference data packets.
[0102] In one embodiment provided by the present disclosure, the abnormal data packet and the corresponding processing method generally include:
[0103] 1. If the data packet lacks the start or end mark, it is confirmed that the data packet is incomplete. It can be adopted but is not limited to directly discarding the data packet, or marking the error mark and then waiting for subsequent modules to process. The error mark mainly includes: (1) Overlength interception error mark: If the subsequent processing module is an interception-sensitive processing method, for example, the common data check value is at the end of the data, if the intercepted data packet loses the data check result, there is no need to process the intercepted error data packet; (2) Head and tail missing error mark, if the subsequent module is a head and tail processing related module, the head and tail missing type data packet cannot be processed correctly, and this mark needs to be checked; (3) Simple correct / incorrect mark, if some modules must have a complete data packet to process, then the data packet with any error mark does not need to be processed.
[0104] 2. If the length of the data packet exceeds the processing capacity of the subsequent processing module, it can be intercepted and processed on demand: the data processing module has its maximum processing data length, which is commonly referred to as the Maximum Transmission Unit (MTU) parameter in the network. "On demand" means that according to the maximum data length capacity that the subsequent processing module can process, the intercepted data length can be set here to avoid errors caused by exceeding the maximum length of the subsequent processing module, and output an error mark at the same time.
[0105] In order to better understand the abnormality checking method, the present disclosure provides a correct signal schematic diagram, such as Figure 6 As shown, Figure 6 The non-compliant data packets are determined as abnormal data packets during the abnormality check.
[0106] Step 205: determine a normal data packet that has passed the abnormality check or an abnormal data packet that has been marked as an error as the target data packet.
[0107] Through the method provided in the above embodiment, it is possible to perform an exception check before data scheduling processing, prevent scheduling errors due to data missing, and solve the scheduling difficulty problem caused by different data rates input from different input ports.
[0108] In order to better understand the data processing method provided by the present disclosure, Figure 7 A connection block diagram of another data processing method provided by an embodiment of the present disclosure, such as Figure 7 As shown, in addition to the rate conversion, data packet anomaly checking and interleaving scheduling of the input port, the data processing method provided by the present disclosure also includes: before obtaining the data packets to be processed input via different input ports, determining whether the input port corresponding to the data packets to be processed receives a back pressure signal, wherein the back pressure signal is a stop input signal of the input port; if it is determined that the input port corresponding to the data packets to be processed receives the back pressure signal, pausing the input of the data packets to be processed from the input port.
[0109] In order to better understand the data processing method after receiving the back pressure signal provided in the above embodiment, Figure 8 Another flow chart of interleaving scheduling is also provided for the embodiment of the present disclosure, please refer to Figure 3 and Figure 8 When the data packet header with port number B receives a back pressure signal, no scheduling process is performed even if there is data input, and the final scheduling result is ACDCD..., which does not include the data packet header with port number B.
[0110] In summary, the embodiments of the present disclosure can achieve the following effects:
[0111] 1. By separating the data packet header and payload of the target data packet and performing segmented processing, and marking the target port number before performing interleaving scheduling, the processing delay between data packets is greatly reduced, effectively improving data processing efficiency.
[0112] 2. Before interleaving scheduling, all data packets are clock synchronized and data width consistency is adjusted to reduce the impact of external port protocol upgrades on system functions and improve the versatility of subsequent processing.
[0113] 3. It can realize abnormality check before data scheduling processing to prevent scheduling errors caused by data missing, and solve the scheduling difficulties caused by different data rates input from different input ports.
[0114] Corresponding to the above data processing method, the present invention also provides a data processing device. Since the device embodiment of the present invention corresponds to the above method embodiment, details not disclosed in the device embodiment can be referred to the above method embodiment, and will not be repeated in the present invention.
[0115] Fig. 9 A structural diagram of a data processing device provided in an embodiment of the present disclosure is shown in FIG. Fig. 9 As shown, it includes: a separation unit 31, a segmentation unit 32, a marking unit 33 and a scheduling unit 34.
[0116] A separation unit 31, used for separating a data packet header and a payload of a target data packet;
[0117] A segmentation unit 32, configured to segment the data packet header and the payload according to a preset interleaved data bit width and a preset single-port single scheduling time, to obtain at least two sub-data packet headers and at least two sub-payloads;
[0118] The marking unit 33 is used to mark the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, so as to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads;
[0119] The scheduling unit 34 is used to perform uniform interleaving scheduling on the at least two marked sub-data packet headers and the at least two marked sub-payloads in a preset order to obtain target data.
[0120] The data processing device provided by the present disclosure separates the data packet header and the payload of the target data packet, and performs segmentation processing on the data packet header and the payload respectively according to the preset interleaved data bit width and the preset single-port single scheduling time, so as to obtain at least two sub-data packet headers and at least two sub-payloads; the port numbers of the at least two sub-data packet headers and the at least two sub-payloads are all marked as the target port numbers corresponding to the target data packet, so as to obtain at least two marked sub-data packet headers and at least two marked sub-payloads; the at least two marked sub-data packet headers and the at least two marked sub-payloads are uniformly interleaved and scheduled respectively according to the preset order, so as to obtain the target data. The data processing method provided by the present disclosure greatly reduces the processing delay between data packets and effectively improves the data processing efficiency by separating the data packet header and the payload of the target data packet, performing segmentation processing, and marking the target port number before performing interleaving and scheduling.
[0121] Furthermore, in a possible implementation of this embodiment, as Fig.10 As shown, the scheduling unit 34 includes:
[0122] A first scheduling module 341 is used to perform uniform interleaving scheduling on the at least two marked sub-data packet headers according to a preset order to obtain a first data sequence;
[0123] A second scheduling module 342 is configured to perform uniform interleaving scheduling on the at least two marked sub-payloads according to a preset order after the at least two marked sub-data packet headers have been scheduled, so as to obtain a second data sequence;
[0124] The splicing module 343 is used to splice the first data sequence and the second data sequence to obtain the target data.
[0125] Furthermore, in a possible implementation of this embodiment, as Fig.10 As shown, the segmentation unit 32 includes:
[0126] A comparison module 321, configured to compare the data bit width of the data packet header and the payload with the preset interleaved data bit width;
[0127] A segmentation module 322 is used for segmenting the data packet header and the payload to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width if the data bit width of the data packet header and the payload is greater than the preset interleaved data bit width;
[0128] The zero-padding module 323 is used to pad the data packet header and the payload with zeros if the data bit width of the data packet header and the payload is smaller than the preset interleaved data bit width, so as to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width.
[0129] Furthermore, in a possible implementation of this embodiment, as Fig.10 As shown, the device further includes a preprocessing unit 35, and the preprocessing unit includes:
[0130] The acquisition module 351 is used to acquire the data packets to be processed inputted via different input ports before separating the data packet header and the payload of the target data packet;
[0131] A first conversion module 352, configured to convert the data bit width of the data packet to be processed into a preset input data bit width to obtain a data packet to be processed with the same data bit width;
[0132] A second conversion module 353, used for converting the clock pulse of the data packet to be processed into a preset clock pulse to obtain a converted data packet to be processed;
[0133] The verification module 354 is used to perform an abnormality check on the converted data packet to be processed. If it is determined that the converted data packet to be processed is an abnormal data packet, the abnormal data packet is discarded; or, the abnormal data packet is marked as an error according to the reference data packet;
[0134] The first determination module 355 is used to determine a normal data packet that has passed the abnormality check or an abnormal data packet that has been marked with an error as the target data packet.
[0135] Furthermore, in a possible implementation of this embodiment, as Fig.10 As shown, the device further includes a feedback unit 36, which includes:
[0136] The judging module 361 is used to judge whether the input port corresponding to the data packet to be processed receives a back pressure signal before obtaining the data packet to be processed inputted via different input ports, wherein the back pressure signal is a stop input signal of the input port;
[0137] The pause module 362 is configured to pause inputting the data packet to be processed from the input port if it is determined that the input port corresponding to the data packet to be processed has received the back pressure signal.
[0138] Furthermore, in a possible implementation of this embodiment, as Fig.10 As shown, the marking unit 33 includes:
[0139] The second determining module 331 is used to determine the target port corresponding to the target data packet and its corresponding target port number;
[0140] The marking module 332 is used to mark the target port number in the at least two sub-data packet headers and the at least two sub-payloads corresponding to the target data packet, respectively, to obtain at least two marked sub-data packet headers and at least two marked sub-payloads.
[0141] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.
[0142] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0143] Fig.11 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0144] like Fig.11 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 to a RAM (Random Access Memory) 403. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.
[0145] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0146] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the aforementioned data processing method in any other appropriate manner (for example, by means of firmware).
[0147] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0149] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0152] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0153] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0154] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0155] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data processing method, characterized in that: include: Separating a data packet header and a payload of a target data packet, and segmenting the data packet header and the payload according to a preset interleaved data bit width and a preset single-port single scheduling time, respectively, to obtain at least two sub-data packet headers and at least two sub-payloads; Mark the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads; According to a preset order, the at least two sub-data packet headers after the marking are respectively subjected to a first uniform interleaving scheduling, and the at least two sub-payloads after the marking are respectively subjected to a second uniform interleaving scheduling, so as to obtain target data.
2. The method according to claim 1, characterized in that The step of performing a first uniform interleaving scheduling on the at least two marked sub-data packet headers and a second uniform interleaving scheduling on the at least two marked sub-payloads in a preset order to obtain target data includes: Performing a first uniform interleaving scheduling on the at least two marked sub-data packet headers according to a preset order to obtain a first data sequence; After the at least two marked sub-data packet headers are scheduled, the at least two marked sub-payloads are evenly interleaved for a second time in a preset order to obtain a second data sequence; The first data sequence and the second data sequence are concatenated to obtain the target data.
3. The method according to claim 1, characterized in that The step of segmenting the data packet header and the payload according to the preset interleaved data bit width and the preset single-port single scheduling time to obtain at least two sub-data packet headers and at least two sub-payloads includes: Comparing the data bit width of the data packet header and the payload with the preset interleaved data bit width; If the data bit width of the data packet header and the payload is greater than the preset interleaved data bit width, segmenting the data packet header and the payload to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width; If the data bit width of the data packet header and the payload is smaller than the preset interleaved data bit width, the data packet header and the payload are padded with zeros to obtain at least two sub-data packet headers and at least two sub-payloads that are consistent with the preset interleaved data bit width.
4. The method according to claim 1, characterized in that: Before separating the data packet header and the payload of the target data packet, the method comprises: Obtaining data packets to be processed inputted via different input ports; Converting the data bit width of the data packet to be processed into a preset input data bit width to obtain a data packet to be processed with the same data bit width; Converting the clock pulse of the data packet to be processed into a preset clock pulse to obtain a converted data packet to be processed; Performing an abnormality check on the converted data packet to be processed, and if it is determined that the converted data packet to be processed is an abnormal data packet, discarding the abnormal data packet; or marking the abnormal data packet as an error according to the reference data packet; A normal data packet that has passed the abnormality check or an abnormal data packet that has been marked with an error is determined as the target data packet.
5. The method according to claim 4, characterized in that Before obtaining the data packets to be processed inputted via different input ports, the method further comprises: Determine whether the input port corresponding to the to-be-processed data packet receives a back pressure signal, wherein the back pressure signal is a stop input signal of the input port; If it is determined that the input port corresponding to the data packet to be processed receives the back pressure signal, input of the data packet to be processed from the input port is stopped.
6. The method according to claim 1, characterized in that The step of marking the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads comprises: Determine the destination port corresponding to the destination data packet and its corresponding destination port number; The target port number is marked in the at least two sub-data packet headers and the at least two sub-payloads corresponding to the target data packet, respectively, to obtain at least two marked sub-data packet headers and at least two marked sub-payloads.
7. A data processing device, characterized in that: include: A separation unit, used for separating a data packet header and a payload of a target data packet; A segmentation unit, configured to segment the data packet header and the payload according to a preset interleaved data bit width and a preset single-port single scheduling time, to obtain at least two sub-data packet headers and at least two sub-payloads; a marking unit, used to mark the port numbers of the at least two sub-data packet headers and the at least two sub-payloads as the target port number corresponding to the target data packet, so as to obtain the at least two marked sub-data packet headers and the at least two marked sub-payloads; The scheduling unit is used to perform a first uniform interleaving scheduling on the at least two marked sub-data packet headers and a second uniform interleaving scheduling on the at least two marked sub-payloads in a preset order to obtain target data.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1-6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Interlaken packet cutting and scheduling method and device
CN108011842A
Task scheduling method and device, equipment and storage medium
CN114780215A
Message generation method and device, electronic equipment and storage medium
CN117544587A
Coding concept allowing parallel processing, transport demultiplexer and video bitstream
IN201938012951A
Operations to copy portions of a packet
US20220303230A1
