Network card data packet processing method and device, equipment and medium

By analyzing user network behavior and dynamically adjusting packet processing priorities and storage locations, the server network card cannot meet the user experience in large-scale clusters and high-traffic environments, and achieves more efficient packet processing and optimized user experience .

CN119182734AInactive Publication Date: 2024-12-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411331701.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The server network card cannot meet the user experience requirements when processing data packets, especially when the cluster size is large and the data transmission traffic is large, the network transmission performance is insufficient.

Method used

By obtaining the user's network behavior, determining the data header type and its priority order, and storing the data in the priority queue, processing data packets in the priority order, considering the remaining amount of the entire machine resource and the capacity of the cache waiting area, dynamically adjusting the priority Levels and storage locations ensure efficient processing.

Benefits of technology

Improve user experience, reduce latency, ensure that data with low priority will not be lost, and optimize cache waiting area occupancy through the timeout mechanism, achieving more efficient packet processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182734A_ABST
    Figure CN119182734A_ABST
Patent Text Reader

Abstract

The invention discloses a network card data packet processing method and device, equipment and a medium, and relates to the technical field of data processing. Obtaining various types of data headers in the data packet, distinguishing various types of data according to the data headers, and processing the various types of data according to the priority sequence of the data headers; when the priority sequence of each type of data headers is set, the network behavior of the user is considered to analyze the type of the data headers concerned by the user and determine the priority sequence corresponding to each data header, that is, the use habits of different users are analyzed to set a priority mechanism; therefore, when various types of data in the data packet are processed according to the priority sequence, the user experience is improved; according to various network behaviors of the user, the priority sequence of various types of data headers concerned by the user can be accurately determined, and due to the fact that the network behaviors of different users are different, the set priority has pertinence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of information technology, servers play an important role in data centers and other platforms. Among them, server network cards are key components for achieving network communication.

[0003] When the server network card receives and processes data packets, it polls the network interface to check whether a data packet has arrived, or does not poll when waiting for a data packet, but waits for the data packet to arrive and triggers an interrupt before processing the data packet. However, as the cluster scale becomes larger and the data transmission flow becomes larger, users have higher and higher requirements for network transmission performance.

[0004] How to process network card data packets to improve user experience is a technical problem that needs to be solved urgently by people in this field. Summary of the invention

[0005] The purpose of the present invention is to provide a method, device, equipment and medium for processing network card data packets to solve the technical problem that the server network card cannot satisfy the user experience when processing data packets.

[0006] In order to solve the above technical problems, the present invention provides a method for processing a network card data packet, comprising:

[0007] Acquire the network behavior of the current user and determine the data header types that the current user is concerned about and the priority order of each type of data header according to the network behavior; wherein the network behavior of the user at least includes the programs frequently used by the user, the waiting time and operation behavior of the user in response to network freezes;

[0008] Acquire a data packet within a first preset time length and acquire each data header from the data packet;

[0009] Differentiate the data in the data packet according to each data header to obtain data of different types;

[0010] The various types of data in the data packet are processed in sequence according to the priority order of the data headers of the various types.

[0011] On the one hand, before processing the data of each type in the data packet in sequence according to the priority order of the data headers of each type, the method further includes:

[0012] Store each type of data in a priority queue;

[0013] Each type of data stored in the priority queue is processed in sequence according to the priority order of each type of data header.

[0014] On the other hand, storing each type of data in the priority queue includes:

[0015] Get the remaining amount of the whole machine resources;

[0016] Determine whether the remaining amount of the whole machine resources is greater than the preset amount of resources;

[0017] If so, store each type of data in a priority queue;

[0018] If not, the priority queue length is determined based on the remaining amount of resources on the entire machine;

[0019] Obtaining data of a target type from data of various types in the data packet; wherein the value of the priority is negatively correlated with the order of the priority, and the data of the target type is data corresponding to a data header whose priority of the data header is less than a preset value among all types of data in the data packet;

[0020] Store the target type of data in a priority queue;

[0021] Set the cache waiting area;

[0022] Acquire the remaining types of data from the data of each type in the data packet according to the priority order of the data headers of each type; wherein the remaining types of data are data of each type in the data packet except the data of the target type;

[0023] storing the remaining types of data in the cache waiting area;

[0024] When it is detected that the remaining amount of the whole machine resources is greater than the preset amount of resources, extracting the remaining type of data from the cache waiting area;

[0025] The remaining types of data are stored in the priority queue.

[0026] On the other hand, after storing the remaining types of data in the cache waiting area, the method further includes:

[0027] Starting from storing the remaining type of data in the cache waiting area, determining whether there is remaining type of data in the cache waiting area within a second preset time period;

[0028] If yes, deleting the remaining type of data in the cache waiting area;

[0029] If not, return to the step of obtaining the data packet within the first preset time length and obtaining each data header from the data packet.

[0030] On the other hand, before storing the remaining types of data in the cache waiting area, the method further includes:

[0031] Obtaining the size of the remaining type of data and the capacity of the cache waiting area;

[0032] Determine whether the capacity of the cache waiting area is greater than or equal to the size of the remaining type of data;

[0033] If yes, then entering the step of storing the remaining types of data in the cache waiting area;

[0034] If not, then in order of the priorities of the data headers corresponding to the remaining types of data from high to low, select data of a preset type from the remaining types of data, eliminate data other than the preset type from the remaining types of data, and use the data of the preset type as new data of the remaining type, and proceed to the step of storing the data of the remaining type in the cache waiting area; wherein the priority of the data of the preset type is greater than the priority of data other than the preset type eliminated from the remaining types of data.

[0035] On the other hand, storing each type of data in a priority queue includes:

[0036] Store each type of data in the priority queue in sequence according to the priority order of the data header corresponding to each type of data;

[0037] The processing of each type of data in the data packet in sequence according to the priority order of each type of data header includes:

[0038] The various types of data in the data packet are processed in sequence according to the priority order of the data headers of the various types and the first-in-first-out order.

[0039] On the other hand, after acquiring the network behavior of the current user and determining the data header types that the current user is concerned about and the priority order of each type of data header according to the network behavior, the method further includes:

[0040] Starting from obtaining the priority order of each type of data header corresponding to the current user, return within a third preset time period to the step of obtaining the current user's network behavior and determining the data header type that the current user is concerned about and the priority order of each type of data header based on the network behavior.

[0041] In order to solve the above technical problems, the present invention further provides a network card data packet processing device, comprising:

[0042] A first acquisition module is used to acquire the network behavior of the current user and determine the data header type that the current user is concerned about and the priority order of each type of data header according to the network behavior; wherein the user's network behavior at least includes the user's frequently used programs, the user's waiting time and operation behavior when dealing with network freezes;

[0043] A second acquisition module, used to acquire data packets within a first preset time length and to acquire each data header from the data packets;

[0044] A distinguishing module, used for distinguishing the data in the data packet according to each data header to obtain data of different types;

[0045] The processing module is used to process the various types of data in the data packet in sequence according to the priority order of the data headers of the various types.

[0046] In order to solve the above technical problems, the present invention further provides a network card data packet processing device, comprising:

[0047] Memory for storing computer programs;

[0048] The processor is used to implement the steps of the above-mentioned method for processing network card data packets when executing the computer program.

[0049] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for processing network card data packets are implemented.

[0050] The beneficial effect of the present invention is that, in the method for processing network card data packets, the priority order is first set for each type of data header, and then the data header of each type in the data packet is obtained, and the data of each type is distinguished according to the data header, so that the data of each type is processed according to the priority order of each data header; and when setting the priority order of each type of data header, the type of data header concerned by the user is analyzed and the priority order corresponding to each data header is determined taking into account the user's network behavior, that is, the priority mechanism is set by analyzing the usage habits of different users, so that when processing the various types of data in the data packet according to the priority order, the user's experience is improved; secondly, the user's network behavior at least includes the user's commonly used programs, the user's waiting time and operation behavior when dealing with network freezes, so that the user's network behavior can be more accurately reflected, so that the priority order of each type of data header concerned by the user can be accurately determined, and because the network behavior of different users is different, the set priority is targeted, so that when processing the data packet, the user's experience is further improved.

[0051] In addition, each type of data is stored in a priority queue, and each type of data is stored in the priority queue in sequence according to the priority order of the data header corresponding to each type of data, so that each type of data can be processed in priority order, reducing latency.

[0052] When storing various types of data in the priority queue, first determine whether the remaining amount of the whole machine resources is greater than the preset amount of resources. When the remaining amount of the whole machine resources is greater than the preset amount of resources, each type of data is stored in the priority queue; if the remaining amount of the whole machine resources is less than or equal to the preset amount of resources, the priority queue length is determined according to the remaining amount of the whole machine resources, and the data corresponding to the high-priority data header is stored in the priority queue. This method takes into account the remaining amount of the whole machine resources, so that the set priority queue is more appropriate; and the data corresponding to the low-priority data header is stored in the cache waiting area. Only when the remaining amount of the whole machine resources is greater than the preset amount of resources, the data is extracted from the cache waiting area and placed in the priority queue. It ensures that low-priority data will not be lost and can be processed.

[0053] After the remaining types of data are stored in the cache waiting area, a timeout mechanism is set to delete the data in the cache waiting area that has not been processed before the timeout, thereby reducing the space occupied by the data in the cache waiting area.

[0054] Before storing the remaining types of data in the cache waiting area, if it is detected that the capacity of the cache waiting area is less than the size of the remaining types of data, the low-priority data is removed from the remaining types of data, and only the high-priority data is retained, and the high-priority data is stored in the waiting cache area. The size of the cache waiting area is taken into account in this method, so that appropriate data is stored in the cache waiting area.

[0055] Starting from obtaining the priority order of each type of data header corresponding to the current user, the network behavior of the current user is obtained within the third preset time period, and the data header type concerned by the current user and the priority order of each type of data header are determined according to the network behavior. That is, the priority order is updated according to the user's network behavior, so that a reasonable priority order can be set, thereby further improving the user experience when processing data according to the priority order.

[0056] In addition, the present invention also provides a network card data packet processing device, a network card data packet processing equipment and a computer-readable storage medium, which have the same or corresponding technical features as the above-mentioned network card data packet processing method and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 A flowchart of a method for processing a network card data packet is provided for an embodiment of the present invention;

[0059] Figure 2 A structural diagram of a device for improving the serviceability of a server network card provided by an embodiment of the present invention;

[0060] Figure 3 A flow chart of a method for improving the serviceability of a server network card provided by an embodiment of the present invention;

[0061] Figure 4 A flow chart of a data header classification method provided by an embodiment of the present invention;

[0062] Figure 5 A structural diagram of a network card data packet processing device provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0063] 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.

[0064] The core of the present invention is to provide a method, device, equipment and medium for processing network card data packets to solve the technical problem that the server network card cannot meet the user experience when processing data packets.

[0065] When the server network card receives and processes data packets, it polls the network interface to check whether a data packet has arrived, or does not poll when waiting for a data packet, but waits for the data packet to arrive before triggering an interrupt and then processing the data packet. However, as the cluster scale becomes larger and larger, the data transmission flow is also increasing, and users have higher and higher requirements for network transmission performance. Therefore, an embodiment of the present invention provides a method for processing network card data packets to improve user experience.

[0066] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0067] Figure 1 A flowchart of a method for processing a network card data packet is provided for an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0068] S10: Acquire the network behavior of the current user and determine the data header type that the current user is concerned about and the priority order of each type of data header according to the network behavior;

[0069] S11: Obtain a data packet within a first preset time length and obtain each data header from the data packet;

[0070] S12: differentiating the data in the data packet according to each datagram header to obtain data of different types;

[0071] S13: Processing each type of data in the data packet in sequence according to the priority order of each type of data header.

[0072] The user's network behavior at least includes the user's frequently used programs, the user's waiting time and operation behavior when the network freezes. For example, the user's frequently used programs include games, downloading files, etc. The user's operation behavior and exit behavior when the network freezes, etc. After obtaining the user's network behavior, the data header type that the current user is concerned about and the priority order of each type of data header can be determined according to the network behavior. For example, according to the user's network behavior, it is determined that the data header type that the user is concerned about is the game header type and the download file header type, and the user's attention to the game is greater than the user's attention to the download file. Therefore, the priority of the game header type can be set to be greater than the priority of the download file header type. In order to indicate the priority, the priority can be assigned. For example, starting from 1, assign values ​​to each priority in turn, and the smaller the priority value, the higher the priority. Since different users have different network behaviors, the priority order of each type of data header is determined to be different.

[0073] The network behavior of the same user may also change. Therefore, after obtaining the network behavior of the current user and determining the data header type that the current user is concerned about and the priority order of each type of data header according to the network behavior, it also includes:

[0074] Starting from obtaining the priority order of each type of data header corresponding to the current user, the step of obtaining the network behavior of the current user and determining the data header type that the current user is concerned about and the priority order of each type of data header is returned within a third preset time length.

[0075] The third preset time length is not limited and is determined according to actual conditions. By continuously analyzing the user's network behavior, the data header concerned by the user and the corresponding priority are updated, so that the set priority is more consistent with the user's network behavior and the set priority order is more reasonable.

[0076] After determining the priority order of each type of data header, obtain the data packet within the first preset time length and obtain each data header from the data packet (the header carries a feature code, and the data header can be determined by identifying the feature code), and distinguish the data in the data packet according to each data header to obtain each type of data.

[0077] After obtaining each type of data, each type of data in the data packet may be processed in sequence according to the priority order of each type of data header determined previously.

[0078] In the method for processing network card data packets provided in this embodiment, priority orders are first set for various types of data headers, and then various types of data headers in the data packet are obtained, and various types of data are distinguished according to the data headers, so that various types of data are processed according to the priority order of each data header; and when setting the priority order of each type of data header, the type of data header concerned by the user is analyzed and the priority order corresponding to each data header is determined taking into account the user's network behavior, that is, the priority mechanism is set by analyzing the usage habits of different users, so that when processing various types of data in the data packet according to the priority order, the user's experience is improved; secondly, the user's network behavior at least includes the user's frequently used programs, the user's waiting time and operation behavior when dealing with network freezes, so that the user's network behavior can be more accurately reflected, so that the priority order of various types of data headers concerned by the user can be accurately determined, and because different users have different network behaviors, the set priority is targeted, so that when processing the data packet, the user's experience is further improved.

[0079] In order to reduce the delay, in implementation, before processing the various types of data in the data packet in sequence according to the priority order of the various types of data headers, it also includes:

[0080] Store each type of data in a priority queue;

[0081] Each type of data stored in the priority queue is processed in sequence according to the priority order of each type of data header.

[0082] In order to set the priority queue reasonably, various types of data are stored in the priority queue including:

[0083] Get the remaining amount of the whole machine resources;

[0084] Determine whether the remaining amount of the whole machine resources is greater than the preset amount of resources;

[0085] If so, store each type of data in a priority queue;

[0086] If not, the priority queue length is determined based on the remaining amount of resources on the entire machine;

[0087] Obtaining data of a target type from data of various types in a data packet; wherein the value of the priority is negatively correlated with the order of the priority, and the data of the target type is data corresponding to a data header whose priority of the data header is less than a preset value among all types of data in the data packet;

[0088] Store the target type of data in a priority queue;

[0089] Set the cache waiting area;

[0090] Obtaining remaining types of data from each type of data in the data packet according to the priority order of each type of data header; wherein the remaining types of data are data of each type of data in the data packet except for the target type of data;

[0091] The remaining types of data are stored in the cache waiting area;

[0092] When it is detected that the remaining amount of the whole machine resources is greater than the preset amount of resources, extracting the remaining type of data from the cache waiting area;

[0093] Store the remaining types of data in the priority queue.

[0094] There is no limit on the preset resource quantity and preset value, which are determined based on actual conditions.

[0095] In the method provided in this embodiment, when storing various types of data in the priority queue, first determine whether the remaining amount of the whole machine resources is greater than the preset amount of resources. When the remaining amount of the whole machine resources is greater than the preset amount of resources, each type of data is stored in the priority queue; if the remaining amount of the whole machine resources is less than or equal to the preset amount of resources, the priority queue length is determined according to the remaining amount of the whole machine resources, and the data corresponding to the high-priority data header is stored in the priority queue. This method takes into account the remaining amount of the whole machine resources, so that the set priority queue is more appropriate; and the data corresponding to the low-priority data header is stored in the cache waiting area. Only when the remaining amount of the whole machine resources is greater than the preset amount of resources, the data is extracted from the cache waiting area and placed in the priority queue. It is ensured that low-priority data will not be lost and can be processed.

[0096] Before processing each type of data in the data packet in order of priority, obtain the number of data headers in the priority queue before data processing; when processing each type of data in the data packet in order of priority, if it is detected that the data corresponding to the data header of the current type is processed, delete the data header of the current type in the priority queue; obtain the number of data headers in the priority queue after data processing; determine whether the difference between the number of data headers in the priority queue after data processing and the number of data headers in the priority queue before data processing is 1, and if so, determine that the data header of the current type is deleted from the priority queue; if not, return to the step of deleting the data header of the current type in the priority queue.

[0097] In this method, after the data corresponding to the data header of the current type is processed, the data header of the current type in the priority queue is deleted, thereby avoiding the space occupied by the header corresponding to the processed data in the queue, and at the same time avoiding the interference of the processed data on the data processing; and by comparing the number of data headers in the priority queue before and after processing, it is ensured as much as possible that the header corresponding to the processed data can be deleted from the queue.

[0098] In order to prevent data from occupying the cache waiting area for a long time, in implementation, after storing the remaining types of data in the cache waiting area, the following steps are further included:

[0099] Starting from storing the remaining type of data in the cache waiting area, determining whether there is remaining type of data in the cache waiting area within a second preset time period;

[0100] If yes, delete the remaining types of data in the cache waiting area;

[0101] If not, return to the step of obtaining a data packet within the first preset time length and obtaining each data header from the data packet.

[0102] In this method, after the remaining types of data are stored in the cache waiting area, the data in the cache waiting area that has not been processed before the timeout is deleted by setting a timeout mechanism, thereby reducing the space occupied by the data in the cache waiting area.

[0103] Since the capacity of the cache waiting area is limited, in order to ensure that the data cache area can effectively store data, before storing the remaining types of data in the cache waiting area, the following steps are also included:

[0104] Get the size of the remaining data types and the capacity of the cache waiting area;

[0105] Determine whether the capacity of the cache waiting area is greater than or equal to the size of the remaining type of data;

[0106] If yes, then enter the step of storing the remaining types of data in the cache waiting area;

[0107] If not, then according to the order of the priorities of the data headers corresponding to the remaining types of data from high to low, select data of the preset type from the remaining types of data, eliminate data other than the preset type from the remaining types of data, and use the data of the preset type as new data of the remaining type, and proceed to the step of storing the remaining type of data in the cache waiting area; wherein, the priority of the preset type of data is greater than the priority of the data other than the preset type eliminated from the remaining types of data.

[0108] In the method provided in this embodiment, before storing the remaining types of data in the cache waiting area, if it is detected that the capacity of the cache waiting area is smaller than the size of the remaining types of data, the data with low priority is removed from the remaining types of data, and only the data with high priority is retained, and the data with high priority is stored in the waiting cache area. The size of the cache waiting area is taken into consideration in this method, so that appropriate data is stored in the cache waiting area.

[0109] In order to ensure that the first data to enter the queue can be processed first, in practice, each type of data is stored in a priority queue including:

[0110] Store each type of data in the priority queue in sequence according to the priority order of the data header corresponding to each type of data;

[0111] Processing each type of data in the data packet in sequence according to the priority order of each type of data header includes:

[0112] Each type of data in the data packet is processed in sequence according to the priority order of each type of data header and the first-in-first-out order.

[0113] In order to enable those skilled in the art to better understand the solution of the present invention, the overall technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 2 A structural diagram of a device for improving the serviceability of a server network card provided by an embodiment of the present invention, such as Figure 2 As shown, the device includes: a data header collection module within a time period, a data header classification mark construction module, a classification mark priority value assignment module, a queue correction formation module, a low priority buffer module and a queue exit module.

[0114] Specifically, the data header collection module in the time period: firstly, according to the data model, statistics on the user's frequently used application data, the expected waiting time when the user encounters a freeze, and the frequent operation behavior when encountering a freeze are analyzed to find out the application layer data header types that the user is more concerned about, and divide them into N levels. And the module data header priority is regularly updated.

[0115] Data header classification marking construction module: distinguishes and marks the data header type according to the analysis result of the data header collection module within the time period, and records the unique priority mark for the user.

[0116] Classification tag priority value module: the marked data packet header is assigned a priority value of 1, 2, etc. as the priority for subsequent data processing. The functions of the classification tag include the function of being a category code, being able to uniquely represent a category, and the function of fixing the order of categories. The purpose of the classification tag is to convert the subject concept into a classification retrieval language, and to form a classification retrieval identifier by assigning the results of the subject analysis to the corresponding category number and related auxiliary number of the information resource.

[0117] Queue correction module: sort out the resource ratio occupied by forwarding priority according to the remaining amount of existing machine resources, so as to make full use of resources. You can use the put() method to add elements to the queue. Each element can be assigned a priority, and PriorityQueue will dequeue according to the priority. Use the get() method to obtain elements with higher priority and remove them from the queue. PriorityQueue also provides other methods, such as the qsize() method to obtain the queue length and the empty() method to determine whether the queue is empty.

[0118] Cache low priority module: Set a cache waiting area for low priority data, process it when resources are sufficient, and discard it after the set time or cache space is exceeded.

[0119] Dequeue module: The order of entering and exiting the queue follows the First-In First-Out (FIFO) principle according to the priority. The element that enters the queue earliest will be processed first.

[0120] Figure 3 A flowchart of a method for improving the serviceability of a server network card provided by an embodiment of the present invention, such as Figure 3 As shown, the method includes:

[0121] S14: The server network card receives the data packet;

[0122] S15: Start the data header collection module within the time period;

[0123] S16: Start the data header classification mark construction module;

[0124] S17: Start the classification mark priority value assignment module;

[0125] S18: Start the cache low priority module;

[0126] S19: Determine whether the resources are sufficient; if so, proceed to step S20; if not, proceed to step S22;

[0127] S20: Start the queue correction formation module;

[0128] S21: Start the queue-out module;

[0129] S22: Discard.

[0130] In addition to the above modules, the device for improving the serviceability of the server network card also includes a datagram header classification tag construction module.

[0131] The data packet header classification marking construction module is used to mark the data packet according to the specific service category received in the network application. Data packet marking involves assigning a value to the data packet header stage in a standard manner, and distinguishing and marking the session connection layer data header type based on the results of the data packet header collection module analysis within the time period.

[0132] Figure 4 A flowchart of a data header classification method provided by an embodiment of the present invention, such as Figure 4 As shown, the method includes:

[0133] S23: receiving data packets;

[0134] S24: Start the data header collection module within the time period;

[0135] S25: Data header is divided into multiple levels;

[0136] S26: Start the datagram header classification tag construction module.

[0137] In the processing method for improving the serviceability of the server network card provided by the embodiment of the present invention, the mechanism of the network card packet receiving and sending processing performance is to set the priority according to the usage habits of different users and intelligently analyze the data types that users are concerned about, so that different users can have a better experience.

[0138] In the above embodiments, the method for processing a network card data packet is described in detail, and the present invention also provides a network card data packet processing device and a network card data packet processing device corresponding to the embodiments. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0139] An embodiment of the present invention provides a network card data packet processing device, based on the perspective of functional modules, including:

[0140] The first acquisition module is used to acquire the network behavior of the current user and determine the data header type that the current user is concerned about and the priority order of each type of data header according to the network behavior; wherein the user's network behavior at least includes the user's frequently used program data, the user's waiting time and operation behavior when dealing with network freezes;

[0141] A second acquisition module, used to acquire data packets within a first preset time length and acquire each data header from the data packets;

[0142] A distinguishing module, used for distinguishing data in a data packet according to each data packet header to obtain data of different types;

[0143] The processing module is used to process the various types of data in the data packet in sequence according to the priority order of the various types of data headers.

[0144] In some embodiments, the network card data packet processing device further includes:

[0145] A first storage module, used for storing various types of data in a priority queue;

[0146] The first processing submodule is used to process the data of each type stored in the priority queue in sequence according to the priority order of the data header of each type.

[0147] In some embodiments, the storage module specifically includes:

[0148] The third acquisition module is used to obtain the remaining amount of the whole machine resources;

[0149] The first judgment module is used to judge whether the remaining amount of the whole machine resources is greater than the preset resource amount; if so, the second processing submodule is triggered; and the determination module is triggered;

[0150] A second storage module, used for storing various types of data in a priority queue;

[0151] A determination module, used to determine the priority queue length according to the remaining amount of the whole machine resources;

[0152] A fourth acquisition module is used to acquire data of a target type from data of various types in the data packet; wherein the value of the priority is negatively correlated with the order of the priority, and the data of the target type is data corresponding to a data header whose priority of the data header is less than a preset value among all types of data in the data packet;

[0153] A third storage module, used for storing data of the target type in a priority queue;

[0154] A setting module, used to set a cache waiting area;

[0155] A fifth acquisition module, used to acquire the remaining types of data from the data of each type in the data packet according to the priority order of the data headers of each type; wherein the remaining types of data are the data of each type in the data packet except the data of the target type;

[0156] A fourth storage module, used for storing the remaining types of data in the cache waiting area;

[0157] The extraction module is used to extract the remaining type of data from the cache waiting area when it is detected that the remaining amount of the whole machine resources is greater than the preset amount of resources;

[0158] The storage module is used to store the remaining types of data in the priority queue.

[0159] In some embodiments, the method and apparatus for processing a network card data packet further includes:

[0160] A second judgment module is used to judge whether there is any remaining data of the type in the cache waiting area within a second preset time period starting from storing the remaining data of the type in the cache waiting area; if so, trigger the deletion module; if not, return to trigger the second acquisition module;

[0161] The deletion module is used to delete the remaining types of data in the cache waiting area.

[0162] In some embodiments, the network card data packet processing device further includes:

[0163] A sixth acquisition module, used to acquire the size of the remaining types of data and the capacity of the cache waiting area;

[0164] The third judgment module is used to judge whether the capacity of the cache waiting area is greater than or equal to the size of the remaining type of data; if so, the fourth storage module is triggered; if not, the selection module is triggered;

[0165] A selection module is used to select data of a preset type from the remaining data in order from high to low priority of the data headers corresponding to the remaining data, eliminate data other than the preset type from the remaining data, and use the data of the preset type as new remaining data to trigger the fourth storage module; wherein the priority of the data of the preset type is greater than the priority of the data other than the preset type eliminated from the remaining data.

[0166] In some embodiments, the network card data packet processing device further includes:

[0167] The return module is used to return and trigger the first acquisition module within a third preset time period starting from the priority order of each type of data header corresponding to the current user.

[0168] Since the embodiments of the device part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the device part, and they will not be repeated here. The effects are the same as above.

[0169] Figure 5 This is a structural diagram of a network card data packet processing device provided by another embodiment of the present invention. This embodiment is based on the hardware perspective, such as Figure 5 As shown, the network card data packet processing device includes:

[0170] A memory 20, used for storing computer programs;

[0171] The processor 21 is used to implement the steps of the method for processing the network card data packet mentioned in the above embodiment when executing the computer program.

[0172] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0173] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the method for processing the network card data packet disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the method for processing the network card data packet mentioned above.

[0174] In some embodiments, the network card data packet processing device may also include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0175] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the network card data packet processing device, and may include more or fewer components than those shown in the figure.

[0176] The network card data packet processing device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the network card data packet processing method has the same effect as above.

[0177] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned method for processing network card data packets when executed by a processor.

[0178] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0179] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.

[0180] The computer-readable storage medium provided by the present invention includes the above-mentioned method for processing network card data packets, and the effect is the same as above.

[0181] The above is a detailed introduction to a method, device, equipment and medium for processing a network card data packet provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred 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. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0182] It should also be noted that, in this specification, 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 "comprise", "include" 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for processing a network card data packet, characterized in that: include: Acquire the network behavior of the current user and determine the data header types that the current user is concerned about and the priority order of each type of data header according to the network behavior; wherein the network behavior of the user at least includes the programs frequently used by the user, the waiting time and operation behavior of the user in response to network freezes; Acquire a data packet within a first preset time length and acquire each data header from the data packet; Differentiate the data in the data packet according to each data header to obtain data of different types; The various types of data in the data packet are processed in sequence according to the priority order of the data headers of the various types.

2. The method for processing a network card data packet according to claim 1, characterized in that: Before processing the data of each type in the data packet in sequence according to the priority order of the data headers of each type, the method further includes: Store each type of data in a priority queue; Each type of data stored in the priority queue is processed in sequence according to the priority order of each type of data header.

3. The method for processing a network card data packet according to claim 1, characterized in that: The storing of each type of data in the priority queue includes: Get the remaining amount of the whole machine resources; Determine whether the remaining amount of the whole machine resources is greater than the preset amount of resources; If so, store each type of data in a priority queue; If not, the priority queue length is determined based on the remaining amount of resources on the entire machine; Obtaining data of a target type from data of various types in the data packet; wherein the value of the priority is negatively correlated with the order of the priority, and the data of the target type is data corresponding to a data header whose priority of the data header is less than a preset value among all types of data in the data packet; Store the target type of data in a priority queue; Set the cache waiting area; Acquire the remaining types of data from the data of each type in the data packet according to the priority order of the data headers of each type; wherein the remaining types of data are data of each type in the data packet except the data of the target type; storing the remaining types of data in the cache waiting area; When it is detected that the remaining amount of the whole machine resources is greater than the preset amount of resources, extracting the remaining type of data from the cache waiting area; The remaining types of data are stored in the priority queue.

4. The method for processing a network card data packet according to claim 3, characterized in that: After storing the remaining types of data in the cache waiting area, the method further includes: Starting from storing the remaining type of data in the cache waiting area, determining whether there is remaining type of data in the cache waiting area within a second preset time period; If yes, deleting the remaining type of data in the cache waiting area; If not, return to the step of obtaining the data packet within the first preset time length and obtaining each data header from the data packet.

5. The method for processing network card data packets according to claim 3, characterized in that: Before storing the remaining types of data in the cache waiting area, the method further includes: Obtaining the size of the remaining type of data and the capacity of the cache waiting area; Determine whether the capacity of the cache waiting area is greater than or equal to the size of the remaining type of data; If yes, then entering the step of storing the remaining types of data in the cache waiting area; If not, then in order of the priorities of the data headers corresponding to the remaining types of data from high to low, select data of a preset type from the remaining types of data, eliminate data other than the preset type from the remaining types of data, and use the data of the preset type as new data of the remaining type, and proceed to the step of storing the data of the remaining type in the cache waiting area; wherein the priority of the data of the preset type is greater than the priority of data other than the preset type eliminated from the remaining types of data.

6. The method for processing a network card data packet according to any one of claims 2 to 5, characterized in that: The storing of each type of data in the priority queue comprises: Store each type of data in the priority queue in sequence according to the priority order of the data header corresponding to each type of data; The processing of each type of data in the data packet in sequence according to the priority order of each type of data header includes: The various types of data in the data packet are processed in sequence according to the priority order of the data headers of the various types and the first-in-first-out order.

7. The method for processing a network card data packet according to claim 6, characterized in that: After acquiring the network behavior of the current user and determining the data header types that the current user is concerned about and the priority order of each type of data header according to the network behavior, the method further includes: Starting from obtaining the priority order of each type of data header corresponding to the current user, return within a third preset time period to the step of obtaining the current user's network behavior and determining the data header type that the current user is concerned about and the priority order of each type of data header based on the network behavior.

8. A network card data packet processing device, characterized in that: include: A first acquisition module is used to acquire the network behavior of the current user and determine the data header type that the current user is concerned about and the priority order of each type of data header according to the network behavior; wherein the user's network behavior at least includes the user's frequently used programs, the user's waiting time and operation behavior when dealing with network freezes; A second acquisition module, used to acquire data packets within a first preset time length and to acquire each data header from the data packets; A distinguishing module, used for distinguishing the data in the data packet according to each data header to obtain data of different types; The processing module is used to process the various types of data in the data packet in sequence according to the priority order of the data headers of the various types.

9. A network card data packet processing device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for processing a network card data packet as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for processing a network card data packet as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Message processing method and device

    CN102195885A

  • Application cache cleaning method and device, equipment and storage medium

    CN113392041A

  • Data processing method and device, server and storage medium

    CN115048572A

  • Business processing method and device, electronic equipment and storage medium

    CN117592685A

  • Internet of Things card service batch processing method and system, electronic equipment and storage medium

    CN118034873A