Network data packet processing method, device, equipment and medium

By subcontracting the data packets and prioritizing control in the network link controller pre-level device, the problem of the inability to process data according to priority in the prior art is solved, and real-time and efficient data transmission and reception are achieved.

CN119892744APending Publication Date: 2025-04-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510115594.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art cannot process data according to priority in network transmission between the host and the target network card, resulting in data with high real-time requirements and high priority cannot be sent in time, affecting the real-time nature of data transmission and reception.

Method used

In the predecessor device of the network link controller, subcontract parameters and network data packets sent by the host, subcontract large-capacity data packets according to priority information, and add priority and sorting information to each subcontract data to realize priority-based packet transmission and reception control.

Benefits of technology

The subcontracting process reduces the time when large-capacity data packets occupy the network link layer, realizes the real-time requirement of data transmission and reception, and avoids error retransmission caused by interrupt mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892744A_ABST
    Figure CN119892744A_ABST
Patent Text Reader

Abstract

The invention discloses a network data packet processing method and device, equipment and a medium, relates to the technical field of computers, is applied to a preceding stage device of a network link controller, and comprises the following steps: carrying out subpackaging operation on a network data packet according to priority information and subpackaging parameters carried by the network data packet; adding field information to each piece of subpackage data based on a target protocol; the field information comprises sorting information and priority information of the subpackage data in the corresponding network data packets, and the priority information of the subpackage data divided by the same network data packet is the same; sending the subpackaged data to a network link controller according to the field information, so that the network link controller processes the subpackaged data; and according to the field information, carrying out packaging operation on the processed sub-packaged data to obtain packaged data, so that the host can read the packaged data. According to the invention, the time of occupying a network link layer by a high-capacity network data packet is effectively reduced, and the real-time requirement of data receiving and transmitting is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a network data packet processing method, device, equipment and medium. Background Art

[0002] Network transmission refers to the process of using a series of transmission media to communicate through circuit adjustments and changes based on network transmission protocols. Commonly used transmission media include twisted pair, coaxial cable, etc. Network protocols include the OSI (Open Systems Interconnection) seven-layer model, etc.

[0003] For network transmission between the host and the target network card, the next data can often be processed only after one data is processed. Data cannot be processed according to priority. Even if the software can process data according to priority, during the process of sending the current data, the currently arriving data with high real-time requirements and high priority must wait until the above current data is sent before it can be sent. At this time, the real-time nature of the currently arriving data cannot be guaranteed. Even if the software or hardware can send data with high priority or high real-time requirements based on interrupts, the interrupted transmission needs to be retransmitted with errors.

[0004] Therefore, the above technical problems need to be solved by those skilled in the art urgently. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a network data packet processing method, device, equipment and medium, which effectively reduces the time that large-capacity network data packets occupy the network link layer and ensures the real-time requirements of data transmission and reception. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a network data packet processing method, which is applied to a front-end device of a network link controller, comprising:

[0007] Obtaining the packetization parameters and at least one network data packet sent by the host;

[0008] Performing a packetization operation on the network data packets whose length is greater than a preset length threshold according to the priority information carried by the network data packets and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets;

[0009] Adding field information to each of the sub-packet data based on the target protocol; wherein the field information includes the sorting information and the priority information of the sub-packet data in the corresponding network data packet, and the priority information of each of the sub-packet data divided from the same network data packet is the same;

[0010] Sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data;

[0011] Acquire the processed subpacketized data sent by the network link controller;

[0012] The processed sub-packetized data is packaged according to the field information to obtain packaged data, so that the host can read the packaged data.

[0013] Optionally, obtaining the packetization parameters and at least one network data packet sent by the host includes:

[0014] Acquire the packetization parameters and at least one network data packet sent by the host, and store at least one network data packet using a first cache;

[0015] Correspondingly, performing a packet segmentation operation on the network data packet whose length is greater than a preset length threshold according to the priority information carried by the network data packet and the packet segmentation parameter includes:

[0016] Performing a packet splitting operation on the network data packet in the first cache whose data packet length is greater than a preset length threshold according to the priority information and the packet splitting parameter carried by the network data packet;

[0017] Correspondingly, the process of adding field information to each of the sub-package data further includes:

[0018] Determine the number of the network data packets in the first cache to obtain a first number.

[0019] Optionally, sending the subpacketized data to a network link controller according to the field information includes:

[0020] Using a second cache to store the sub-packet data, and determining whether the first number is 1;

[0021] If the first number is 1, the sub-packet data in the second cache is directly sent to the network link controller; if the first number is not 1, the sub-packet data is sent to the network link controller according to the field information.

[0022] Optionally, the field information includes the priority information, a subpacket data identifier, a total number of subpacket data and a subpacket data number; wherein the subpacket data identifiers of the subpacket data divided from the same network data packet are the same, the total number of subpacket data represents the number of the subpacket data split from the same network data packet, and the subpacket data number represents the order of the subpacket data in the corresponding network data packet.

[0023] Optionally, if the first number is not 1, sending the subpacketized data to the network link controller according to the field information includes:

[0024] If the number of subpackets is not 1, sorting the subpacket data in the second cache in descending order according to the priority information, and for the subpacket data with the same priority information, sorting the subpacket data in ascending order according to the subpacket data numbers to obtain a current sorting result;

[0025] Sending the sub-packet data in the second cache to the network link controller according to the current sorting result, and determining in real time whether new sub-packet data is stored in the second cache;

[0026] If no new sub-packet data is stored in the second cache, continue to send the sub-packet data in the second cache to the network link controller according to the current sorting result;

[0027] If new sub-packet data is stored in the second cache, all the current sub-packet data in the second cache are re-sorted according to the priority information and the sub-packet data serial number to obtain an updated sorting result;

[0028] The current packet data in the second cache is sent to the network link controller according to the updated sorting result, so that the network link controller processes the packet data.

[0029] Optionally, the processed subpacketized data sent by the network link controller includes:

[0030] The processed sub-packet data sent by the network link controller is obtained, and the processed sub-packet data is stored in a third cache.

[0031] Optionally, performing a package operation on the processed subpackaged data according to the field information to obtain packaged data includes:

[0032] A packetization operation is performed on the processed sub-packetized data according to the field information to obtain packetized data, and the packetized data is written into a fourth cache so that the host can read the packetized data.

[0033] In a second aspect, the present application discloses a network data packet processing device, which is applied to a front-end device of a network link controller, comprising:

[0034] A data packet acquisition module, used to acquire the packetization parameters and at least one network data packet sent by the host;

[0035] A packetization module is used to perform packetization operations on the network data packets whose data packet length is greater than a preset length threshold according to the priority information carried by the network data packets and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; and to add field information to each of the packetized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the packetized data in the corresponding network data packet, and the priority information of each of the packetized data divided from the same network data packet is the same;

[0036] A sending module, used for sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data;

[0037] A receiving module, used for acquiring the processed sub-packetized data sent by the network link controller;

[0038] The package assembly module is used to perform a package assembly operation on the processed sub-package data according to the field information to obtain package assembly data so that the host can read the package assembly data.

[0039] In a third aspect, the present application discloses an electronic device, the electronic device comprising a front-stage device of a network link controller, the front-stage device comprising:

[0040] Memory, used to store computer programs;

[0041] The processor is used to execute the computer program to implement the aforementioned disclosed network data packet processing method.

[0042] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the network data packet processing method disclosed above is implemented.

[0043] It can be seen that the present application proposes a network data packet processing method, which is applied to the front-stage device of a network link controller, including: obtaining the packetization parameters and at least one network data packet sent by the host; performing a packetization operation on the network data packet whose packet length is greater than a preset length threshold according to the priority information carried by the network data packet and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; adding field information to each of the packetized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the packetized data in the corresponding network data packet, and the priority information of each of the packetized data divided from the same network data packet is the same; sending the packetized data to the network link controller according to the field information, so that the network link controller processes the packetized data to obtain processed packetized data; obtaining the processed packetized data sent by the network link controller; performing a packetization operation on the processed packetized data according to the field information to obtain packetized data, so that the host can read the packetized data. In summary, the present application adds a front-end hardware device to the network link controller, through which the large-capacity network data packets are processed by packetization, which effectively reduces the time that the large-capacity network data packets occupy the network link layer, and realizes the uniformity of the length of the packetized data, so that the time that all the packetized data occupy the network link layer is consistent, and because the present application does not need to use an interrupt mechanism to interrupt the data being sent, the present application does not need to perform error retransmission. Furthermore, the present application implements the control of the reception and transmission of network data packets based on the priority of the network data packets, so that the network data packets with high priority and high real-time performance are sent and processed first, ensuring the real-time requirements of data reception and transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0045] Figure 1 A flow chart of a network data packet processing method disclosed in this application;

[0046] Figure 2 A schematic diagram of an OSI model disclosed in this application;

[0047] Figure 3 A schematic diagram of a traditional Ethernet network card disclosed in this application;

[0048] Figure 4A schematic diagram of a front-stage device of a network link controller disclosed in the present application;

[0049] Figure 5 A schematic diagram of a data packet segmentation operation disclosed in the present application;

[0050] Figure 6 A schematic diagram of a protocol field disclosed in this application;

[0051] Figure 7 A schematic diagram of adding fields to sub-packaged data disclosed in this application;

[0052] Figure 8 A schematic diagram of adding fields to sub-packaged data disclosed in this application;

[0053] Fig. 9 A schematic diagram of the structure of a network data packet processing device disclosed in this application;

[0054] Fig.10 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] For network transmission between the host and the target network card, the next data can often be processed only after one data is processed. Data cannot be processed according to priority. Even if the software can process data according to priority, during the process of sending the current data, the currently arriving data with high real-time requirements and high priority must wait until the above current data is sent before it can be sent, and the real-time nature of the currently arriving data cannot be guaranteed. Even if the software or hardware can send data with high priority or high real-time requirements based on interrupts, the interrupted transmission needs to be retransmitted with errors.

[0057] To this end, the embodiment of the present application proposes a network data packet processing solution, which can effectively reduce the time that large-capacity network data packets occupy the network link layer, thereby ensuring the real-time requirements of data transmission and reception.

[0058] The present application embodiment discloses a network data packet processing method, which is applied to a front-end device of a network link controller, see Figure 1 As shown, the method includes:

[0059] Step S11: Obtaining the packetization parameters and at least one network data packet sent by the host.

[0060] The protocol specifies the data format, transmission method, operation process and other details to ensure that the sender and receiver can understand and interpret the data. Take the OSI (Open Systems Interconnection) model as an example. The OSI model is a conceptual model used to describe the architecture of computer network protocols. It was proposed and defined by the International Organization for Standardization (ISO) in the 1980s. Figure 2 As shown in Figure 1, it divides the computer network communication process into seven different levels, namely: 1. Physical Layer; 2. Data Link Layer; 3. Network Layer; 4. Transport Layer; 5. Session Layer; 6. Presentation Layer; 7. Application Layer. Usually, data from the network layer (including the network layer) to the application layer are processed by software programs according to the protocol specifications of each layer. The data transmission and reception of the data link layer and the physical layer need to be processed by related hardware modules, such as the Ethernet network card, which is a hardware module that integrates data link layer and physical layer data processing.

[0061] Taking Ethernet network card as an example, the network card consists of three parts: the interface between the physical layer of the network card and the transmission medium (RJ45), the Ethernet data link controller, and the interface between the network card and the host. ( , ) interface, where the Ethernet data link controller is used to implement the transmission data encoding, reception data decoding, CRC (Cyclic Redundancy Check, cyclic redundancy check) generation and verification, etc. Figure 3 As shown in the figure, it can be seen that the process of Ethernet network card sending data is as follows: 1. The host sends the data to be sent through The interface writes it to the sending buffer; 2. The link controller chip will add the frame header information and generate a CRC check code to form an Ethernet data frame; 3. The physical layer interface controller controls the physical layer chip to convert the data into an electrical signal and send it out through the medium. The process of receiving data in the Ethernet network card: 1. The physical layer chip converts the valid electrical signal received by the medium into a digital signal and sends it to the Ethernet link controller chip; 2. The link controller chip checks whether the destination address of the frame is its own MAC address. If not, the data is discarded. If it is, it continues to receive data; 3. According to the frame header information, the full length data is received, and then the CRC check is performed. If everything is normal, the host is notified to take the data from the receiving buffer.

[0062] It can be seen from this that the traditional solution can only process the next sending request after one data sending request is processed, that is, after one Ethernet data frame is sent. It is impossible to process the high-priority sending request first when a high-priority sending request comes. Even if the software can process data according to priority, during the current data sending process, the currently arriving data with high real-time requirements and high priority must wait until the above-mentioned current data is sent before it can be sent. At this time, the real-time performance of the currently arriving data cannot be guaranteed. Even if the software or hardware can send data with high priority or high real-time requirements based on interrupts, the interrupted transmission needs to be retransmitted with errors.

[0063] To this end, this application adds a front-end hardware device in front of the Ethernet link controller chip. This device can be built-in or embedded in various embedded systems or host systems, and designs a protocol for the device to perform packet grouping processing on the sent and received data, realize the priority-based network data packet transmission and reception, and ensure the real-time requirements of data transmission and reception. Figure 4 As shown, the device includes a packet controller, a data packet sending buffer, a packet processing module, a sending module, a packet sending data buffer, a receiving module, a packet receiving data buffer, and a packet assembly processing module.

[0064] In this embodiment, the packetization parameters of the host are received by the packetization controller, and the packetization parameters are passed to the packetization processing module, wherein the packetization parameters include whether to packetize, the packetization length, etc.

[0065] Step S12: performing a packetization operation on the network data packets whose length is greater than a preset length threshold according to the priority information carried by the network data packets and the packetization parameters, so as to obtain a plurality of packetization data corresponding to each of the network data packets.

[0066] In this embodiment, at least one network data packet sent by the host is stored in a sending data packet buffer (ie, a first cache); each network data packet carries corresponding priority information.

[0067] Further, the packet processing module performs packet operations on the network data packets in the first cache whose length is greater than a preset length threshold according to the priority information and packet parameters carried by the network data packets. Figure 5 As shown in the figure, the priority of network data packet A is 5, and the priority of network data packet B is 3. The priority of network data packet B is higher than that of network data packet B, so network data packet B is first sub-packetized. It should be pointed out that a high priority indicates a high real-time performance. Assuming that the sub-packet length is 200 bytes, Figure 5 As shown, network data packet B and network data packet A are packetized in sequence. Specifically, network data packet A is packetized to obtain 200 a's, 200 b's, 200 c's and 148 d's, and network data packet B is packetized to obtain 200 1's, 200 2's and 10 3's.

[0068] Step S13: adding field information to each of the sub-packet data based on the target protocol; the field information includes the sorting information and the priority information of the sub-packet data in the corresponding network data packet, and the priority information of each of the sub-packet data divided from the same network data packet is the same.

[0069] In this embodiment, the sub-packet processing module adds field information to each sub-packet data based on the target protocol. The structural diagram of the target protocol is shown in Figure 6 As shown, it includes field 1: priority information, field 2: sub-packet data identifier, field 3: total number of sub-packet data, and field 4: sub-packet data number, wherein the sub-packet data identifiers of the sub-packet data divided from the same network data packet are the same, the total number of sub-packet data represents the number of sub-packet data divided from the same network data packet, and the sub-packet data number represents the order of the sub-packet data in the corresponding network data packet. Further, the number of the network data packets in the first cache is determined to obtain a first number.

[0070] Step S14: sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data.

[0071] In this embodiment, the packet data sent by the subpacket data buffer (second cache) is first stored to add the field information, and the sending module is used to determine whether the first quantity is 1. Further, if the first quantity is 1, the packet data in the second cache is directly sent to the network link controller. If the first quantity is not 1, the packet data is sent to the network link controller according to the field information.

[0072] Specifically, if the number of subpackets is not 1, the subpacket data in the second cache are sorted in order from high to low according to the priority information, and for the subpacket data with the same priority information, the subpacket data are sorted in order from small to large according to the subpacket data number to obtain the current sorting result. Further, the subpacket data in the second cache is sent to the network link controller according to the current sorting result, and it is determined in real time whether new subpacket data is stored in the second cache. If no new subpacket data is stored in the second cache, the subpacket data in the second cache continues to be sent to the network link controller according to the current sorting result. If new subpacket data is stored in the second cache, all current subpacket data in the second cache are re-sorted according to the priority information and the subpacket data number to obtain an updated sorting result. Finally, the current subpacket data in the second cache is sent to the network link controller according to the updated sorting result so that the network link controller processes the subpacket data.

[0073] That is to say, if the number of subpackets is not 1, each subpacket data is sorted in the order of priority information from high to low and the subpacket data number from small to large to obtain the current sorting result, and the subpacket data in the second cache is sent to the network link controller according to the current sorting result. During this process, this embodiment will continue to determine whether new subpacket data is stored in the second cache. If new subpacket data is stored in the second cache, the updated sorting result is obtained again, and the current subpacket data in the second cache is sent to the network link controller according to the updated sorting result.

[0074] See also Figure 5 , Figure 7 and Figure 8 As shown, different network data packets have different data packet identifiers. For example, the data packet identifier of network data packet A is 4567abcd, and the data packet identifier of network data packet B is 1234cdef. The packet processing module packets data packets A and B according to the set parameters and the packet protocol. Since the priority of data packet B is higher than that of A, data packet B is packetized first, and the packetized data is written into the sending packetized data buffer in sequence. After the sending module detects that there is packetized data in the sending packetized data buffer, it will traverse the priority fields of all the packetized data and give priority to sending the packetized data with high priority, such as the packetized data above. It will be sent to the link controller chip first. When the sending module sends the sub-packet data to the link control chip, the sub-packet processing module is also sub-packetizing the data packets in the sending data buffer. When the packet processing module writes the new higher priority packet data into the sending packet data buffer, at this time, based on the protocol priority, the sending module will send the packet data first. , Then send the sub-packet data .

[0075] Step S15: Acquire the processed subpacketized data sent by the network link controller.

[0076] In this embodiment, the receiving module The bus receives the processed data packet carrying the field information sent by the link controller chip, writes the processed data packet into the received subpacket data buffer (third cache), and notifies the packet assembly processing module of the number of received subpackets.

[0077] Step S16: performing a packetization operation on the processed sub-packetized data according to the field information to obtain packetized data so that the host can read the packetized data.

[0078] In this embodiment, when the packet assembly processing module detects that there is data in the received subpacket data buffer, it will traverse the "priority" field of all data packets and assemble the subpacket data with high priority first. Specifically, the packet assembly processing module assembles packets according to the "data packet identifier", "total number of data packets" and "current data packet number" fields of the protocol. After a complete data packet is assembled, it is written to the received data packet buffer (the fourth cache) so that the host can read the assembled data.

[0079] It should be pointed out that the present device and the packetization protocol are applied to the front stage of the network link controller, and can send large-capacity data packets in packets, effectively reducing the long-term occupation of the network link layer by large-capacity data transmission, and can achieve uniform length of packetized data, so that all data packets occupy the network link layer uniformly, and add priority-based sending and receiving control, so that data packets with high priority and high real-time requirements can be sent first, and can meet and be applied to various control fields with high real-time requirements, such as server management control, industrial control, etc. Further, the function of the receiver and the sender negotiating the length of the packetized data according to the real-time requirements can be added to the present device. Specifically, the sender and the receiver can calculate the delay time from the sender sending data to the receiver receiving data by sending a certain amount of test data, and the length of the packetized data can be inversely deduced according to the required minimum delay time, that is, setting the length of the packetized data can meet the requirements of the delay time for various data packets of both the sender and the receiver.

[0080] It can be seen that the present application proposes a network data packet processing method, which is applied to the front-stage device of a network link controller, including: obtaining the packetization parameters and at least one network data packet sent by the host; performing a packetization operation on the network data packet whose packet length is greater than a preset length threshold according to the priority information carried by the network data packet and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; adding field information to each of the packetized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the packetized data in the corresponding network data packet, and the priority information of each of the packetized data divided from the same network data packet is the same; sending the packetized data to the network link controller according to the field information, so that the network link controller processes the packetized data to obtain processed packetized data; obtaining the processed packetized data sent by the network link controller; performing a packetization operation on the processed packetized data according to the field information to obtain packetized data, so that the host can read the packetized data. In summary, the present application adds a front-end hardware device to the network link controller, through which the large-capacity network data packets are processed by packetization, which effectively reduces the time that the large-capacity network data packets occupy the network link layer, and realizes the uniformity of the length of the packetized data, so that the time that all the packetized data occupy the network link layer is consistent, and because the present application does not need to use an interrupt mechanism to interrupt the data being sent, the present application does not need to perform error retransmission. Furthermore, the present application implements the control of the reception and transmission of network data packets based on the priority of the network data packets, so that the network data packets with high priority and high real-time performance are sent and processed first, ensuring the real-time requirements of data reception and transmission.

[0081] Correspondingly, the embodiment of the present application also discloses a network data packet processing device, which is applied to a front-end device of a network link controller, see Fig. 9 As shown, the device comprises:

[0082] The data packet acquisition module 11 is used to acquire the packetization parameters and at least one network data packet sent by the host;

[0083] The subpacketization module 12 is used to perform a subpacketization operation on the network data packets whose data packet length is greater than a preset length threshold according to the priority information carried by the network data packets and the subpacketization parameters, so as to obtain a plurality of subpacketized data corresponding to each of the network data packets; and to add field information to each of the subpacketized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the subpacketized data in the corresponding network data packet, and the priority information of each of the subpacketized data divided from the same network data packet is the same;

[0084] A sending module 13, used for sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data;

[0085] A receiving module 14, configured to obtain the processed sub-packetized data sent by the network link controller;

[0086] The packaging module 15 is used to perform a packaging operation on the processed sub-packetized data according to the field information to obtain packaged data so that the host can read the packaged data.

[0087] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0088] It can be seen that the present application proposes a network data packet processing method, which is applied to the front-stage device of a network link controller, including: obtaining the packetization parameters and at least one network data packet sent by the host; performing a packetization operation on the network data packet whose packet length is greater than a preset length threshold according to the priority information carried by the network data packet and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; adding field information to each of the packetized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the packetized data in the corresponding network data packet, and the priority information of each of the packetized data divided from the same network data packet is the same; sending the packetized data to the network link controller according to the field information, so that the network link controller processes the packetized data to obtain processed packetized data; obtaining the processed packetized data sent by the network link controller; performing a packetization operation on the processed packetized data according to the field information to obtain packetized data, so that the host can read the packetized data. In summary, the present application adds a front-end hardware device to the network link controller, through which the large-capacity network data packets are processed by packetization, which effectively reduces the time that the large-capacity network data packets occupy the network link layer, and realizes the uniformity of the length of the packetized data, so that the time that all the packetized data occupy the network link layer is consistent, and because the present application does not need to use an interrupt mechanism to interrupt the data being sent, the present application does not need to perform error retransmission. Furthermore, the present application implements the control of the reception and transmission of network data packets based on the priority of the network data packets, so that the network data packets with high priority and high real-time performance are sent and processed first, ensuring the real-time requirements of data reception and transmission.

[0089] Furthermore, an embodiment of the present application also provides an electronic device, Fig.10This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0090] Fig.10 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 includes a front-stage device of a network link controller, wherein the front-stage device includes at least one processor 21 and at least one memory 22, wherein the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the network data packet processing method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 also includes a display screen 23, an input and output interface 24, a communication interface 25, a power supply 26 and a communication bus 27. In addition, the electronic device 20 in this embodiment can specifically be an electronic computer.

[0091] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0092] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the network data packet processing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.

[0093] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed network data packet processing method is implemented.

[0094] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0095] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0096] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0097] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0098] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0099] The above is a detailed introduction to a network data packet processing method, device, equipment, and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A network data packet processing method, characterized in that: The front-end device used in the network link controller includes: Obtaining the packetization parameters and at least one network data packet sent by the host; Performing a packetization operation on the network data packets whose length is greater than a preset length threshold according to the priority information carried by the network data packets and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; Adding field information to each of the sub-packet data based on the target protocol; wherein the field information includes the sorting information and the priority information of the sub-packet data in the corresponding network data packet, and the priority information of each of the sub-packet data divided from the same network data packet is the same; Sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data; Acquire the processed subpacketized data sent by the network link controller; The processed sub-packetized data is packaged according to the field information to obtain packaged data, so that the host can read the packaged data.

2. The network data packet processing method according to claim 1, characterized in that: The step of obtaining the packetization parameters and at least one network data packet sent by the host comprises: Acquire the packetization parameters and at least one network data packet sent by the host, and store at least one network data packet using a first cache; Correspondingly, performing a packet segmentation operation on the network data packet whose length is greater than a preset length threshold according to the priority information carried by the network data packet and the packet segmentation parameter includes: Performing a packet splitting operation on the network data packet in the first cache whose data packet length is greater than a preset length threshold according to the priority information and the packet splitting parameter carried by the network data packet; Correspondingly, the process of adding field information to each of the sub-package data further includes: Determine the number of the network data packets in the first cache to obtain a first number.

3. The network data packet processing method according to claim 2, characterized in that: The step of sending the packetized data to a network link controller according to the field information comprises: Using a second cache to store the sub-packet data, and determining whether the first number is 1; If the first number is 1, the sub-packet data in the second cache is directly sent to the network link controller; if the first number is not 1, the sub-packet data is sent to the network link controller according to the field information.

4. The network data packet processing method according to claim 3, characterized in that: The field information includes the priority information, the subpacket data identifier, the total number of subpacket data and the subpacket data number; wherein, the subpacket data identifiers of the subpacket data divided from the same network data packet are the same, the total number of subpacket data represents the number of the subpacket data split from the same network data packet, and the subpacket data number represents the order of the subpacket data in the corresponding network data packet.

5. The network data packet processing method according to claim 4, characterized in that: If the first number is not 1, sending the subpacketized data to the network link controller according to the field information includes: If the number of subpackets is not 1, sorting the subpacket data in the second cache in descending order according to the priority information, and for the subpacket data with the same priority information, sorting the subpacket data in ascending order according to the subpacket data numbers to obtain a current sorting result; Sending the sub-packet data in the second cache to the network link controller according to the current sorting result, and determining in real time whether new sub-packet data is stored in the second cache; If no new sub-packet data is stored in the second cache, continue to send the sub-packet data in the second cache to the network link controller according to the current sorting result; If new sub-packet data is stored in the second cache, all the current sub-packet data in the second cache are re-sorted according to the priority information and the sub-packet data serial number to obtain an updated sorting result; The current packet data in the second cache is sent to the network link controller according to the updated sorting result, so that the network link controller processes the packet data.

6. The network data packet processing method according to claim 1, characterized in that: The obtaining of the processed sub-packetized data sent by the network link controller comprises: The processed sub-packet data sent by the network link controller is obtained, and the processed sub-packet data is stored in a third cache.

7. The network data packet processing method according to claim 6, characterized in that: The step of performing a package operation on the processed sub-packaged data according to the field information to obtain packaged data includes: A packetization operation is performed on the processed sub-packetized data according to the field information to obtain packetized data, and the packetized data is written into a fourth cache so that the host can read the packetized data.

8. A network data packet processing device, characterized in that: The front-end device used in the network link controller includes: A data packet acquisition module, used to acquire the packetization parameters and at least one network data packet sent by the host; A packetization module is used to perform packetization operations on the network data packets whose data packet length is greater than a preset length threshold according to the priority information carried by the network data packets and the packetization parameters, so as to obtain a plurality of packetized data corresponding to each of the network data packets; and to add field information to each of the packetized data based on the target protocol; wherein the field information includes the sorting information and the priority information of the packetized data in the corresponding network data packet, and the priority information of each of the packetized data divided from the same network data packet is the same; A sending module, used for sending the sub-packet data to a network link controller according to the field information, so that the network link controller processes the sub-packet data to obtain processed sub-packet data; A receiving module, used for acquiring the processed sub-packetized data sent by the network link controller; The package assembly module is used to perform a package assembly operation on the processed sub-package data according to the field information to obtain package assembly data so that the host can read the package assembly data.

9. An electronic device, characterized in that: The electronic device comprises a front-stage device of a network link controller, the front-stage device comprising: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the network data packet processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the network data packet processing method according to any one of claims 1 to 7 is implemented.