Linux network flow control method and device, equipment and storage medium
By queue cache and filter allocation of received data packets in the Linux kernel, precise control of received traffic is achieved, and the problem of inability to accurately control the network card receiving data packets in the prior art is solved.
Patent Information
- Application Number
- CN202411871404.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-14
AI Technical Summary
The existing Linux kernel traffic control methods can only limit the data packets sent by the network card, and cannot accurately control the data packets received by the network card, resulting in the inability to accurately control the received traffic.
By queued cache of received data packets, in response to the presence of filters, the packets in the data queue are allocated to the corresponding class, and the packets are secondary precisely controlled through the class, thereby achieving precise control of the received traffic.
It realizes the first and second precise control of the received data packets, ensures the precise control of the received traffic, and enriches the way the system receives data packets.
Smart Images

Figure CN119629121A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a Linux network traffic control method, device, equipment and storage medium. Background Art
[0002] The Linux operating system is widely used in bank computers. The Linux operating system is equipped with a flow controller, which is used for flow control of the Linux kernel. The specific method of the flow controller for flow control is: obtain the data packets input from the input interface, limit the flow of the obtained data packets to discard the data packets that do not meet the regulations, and then judge and select the remaining data packets through the input multiplexer, so as to transmit the arranged data packets to the output interface.
[0003] However, in the current Linux kernel flow control, generally only the data packets sent by the network card can be restricted, but the data packets received by the network card cannot be restricted, resulting in the inability to accurately control the received flow. Summary of the invention
[0004] In order to facilitate accurate control of received traffic, the present application provides a Linux network traffic control method, apparatus, device and storage medium.
[0005] In a first aspect, the present application provides a Linux network traffic control method, comprising:
[0006] The received data packets are queued and cached to obtain a data queue;
[0007] In response to the existence of the filter, allocating the data packets in the data queue to corresponding classes based on the filter;
[0008] The packet in the class is received.
[0009] Through the above implementation, the received data packets can be first processed into a queue form, and then the data packets in the queue form can be allocated through the filter to achieve a precise control of the data packets. Furthermore, the data packets allocated to the class can be secondarily precisely controlled through the class, which facilitates the precise control of the received traffic.
[0010] Preferably, the Linux network traffic control method provided by the present application further includes:
[0011] In response to the absence of a filter, the data packet in the data queue is directly obtained.
[0012] Through the above implementation, a datagram receiving solution without a filter is provided, which makes it easy to enrich the way of receiving data packets by the system.
[0013] Preferably, the Linux network traffic control method provided by the present application further includes:
[0014] In response to the existence of a filter, allocating the data packets in the data queue to a corresponding post-filter queue based on the filter;
[0015] The data packet in the post-filtering queue is received.
[0016] Through the above implementation, a method for allocating data packets for filters is provided, that is, directly allocating data packets to data queues, which facilitates improving the richness of the methods for allocating data packets for filters.
[0017] Preferably, the Linux network traffic control method provided by the present application further includes:
[0018] Acquire the data packet in the class as a new received data packet;
[0019] Acquire the data packet in the class as a new received data packet;
[0020] The steps of queuing and caching the received data packets to obtain a data queue are executed cyclically; in response to the existence of a filter, allocating the data packets in the data queue to a corresponding class based on the filter until a preset loop stop condition is met;
[0021] A new data packet in the class corresponding to when the loop stop condition is met is received.
[0022] Through the above implementation, the received data is cycled through the data queue, filter and class process, which facilitates further improving the accuracy of receiving and controlling data packets.
[0023] Preferably, the filter is provided with allocation rules, and the allocation rules are used to allocate the data packets in the data queue to corresponding classes or post-filter queues.
[0024] Through the above implementation, a distribution rule set in the filter is provided, which facilitates the filter to achieve accurate distribution of data packets.
[0025] Preferably, a traffic configuration rule is provided in the class, and the traffic configuration rule is used to control the transmission bandwidth and network rate of the data packets allocated to the class.
[0026] Through the above implementation, a traffic configuration rule set in a class is provided, which facilitates the class to control data transmission, thereby achieving precise control of the received traffic.
[0027] In a second aspect, the present application provides a Linux network traffic control device, comprising:
[0028] A queue buffer module is used to buffer received data packets into a queue to obtain a data queue;
[0029] a data allocation module, configured to allocate the data packets in the data queue to corresponding classes based on the filter in response to the existence of the filter;
[0030] A data receiving module is used to receive the data packet in the class.
[0031] Through the above implementation, the received data packets can be first processed into a queue form, and then the data packets in the queue form can be allocated through the filter to achieve a precise control of the data packets. Furthermore, the data packets allocated to the class can be secondarily precisely controlled through the class, which facilitates the precise control of the received traffic.
[0032] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.
[0034] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0035] The above Linux network traffic control method, device, equipment and storage medium obtain a data queue by queuing and caching the received data packets; in response to the existence of a filter, the data packets in the data queue are allocated to the corresponding class based on the filter; and the data packets in the class are received. Through the above implementation, the received data packets can be first processed into a queue form, and then the data packets in the queue form are allocated through the filter to achieve a precise control of the data packets once, and further, the data packets allocated to the class are also accurately controlled twice through the class, so as to facilitate the precise control of the received traffic.
[0036] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flow chart of a Linux network traffic control method provided in an embodiment of the present application;
[0039] Figure 2 A schematic diagram of the structure of a Linux network traffic control device provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0041] Figure 4 This is a diagram of the internal structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0044] In this article, the term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.
[0045] Embodiment 1
[0046] Figure 1 A flow chart of a Linux network traffic control method provided in Example 1 of the present application is provided in reference Figure 1 The method may be performed by a device for performing the method, and the device may be implemented by software and / or hardware. The method includes:
[0047] S110 , buffering the received data packets into a queue to obtain a data queue.
[0048] Among them, the computer using Linux operating system in the bank is equipped with a network card. The Linux operating system communicates data with the network through the network card. The Linux operating system can receive data packets sent by the network through the network card. In order to facilitate the management of received data packets, the Linux operating system generates a queue in a temporary cache. The queue cache is a queue in which the Linux operating system caches received data packets. The data queue is a queue composed of data packets cached in the queue. The data queue contains multiple data packets.
[0049] Specifically, after receiving a data packet, the Linux operating system caches the data packet in a queue in a temporary cache, thereby obtaining a data queue.
[0050] S120: In response to the existence of a filter, allocating the data packets in the data queue to corresponding classes based on the filter.
[0051] Among them, the filter is set for the data queue by the Linux operating system according to the flow control requirements. It should be noted that the Linux operating system may have this filter set for the data queue, or may not have set the filter for the data queue; the filter is used to assign each data packet in the data queue input therein to the corresponding class, and the class is a collection of data packets of corresponding types, and the class is used to control the data transmission parameters of the data packets therein; each data packet in the data queue has its corresponding class.
[0052] Specifically, if the Linux operating system sets a corresponding filter for the data queue, the data queue is input into the filter, and the filter assigns each data packet to a corresponding class according to the type of each data packet in the data queue, and then each class sets the data transmission parameters of the data packets assigned thereto.
[0053] S130: Receive the data packet in the class.
[0054] After the data packets in the class complete the setting of the data transmission parameters, each data packet is further transmitted to the Linux operating system with the corresponding data transmission parameters, and the Linux operating system is used to receive the data packets in each class.
[0055] Specifically, taking one of the classes as an example, after the data packets in the class complete the setting of the corresponding data transmission parameters, the class further transmits the data packets to the Linux operating system with the set data transmission parameters, and the Linux operating system receives each data packet.
[0056] It should be noted that, in this embodiment, the received data packets are queued and cached to obtain a data queue; in response to the existence of a filter, the data packets in the data queue are allocated to the corresponding class based on the filter; and the data packets in the class are received. Through the above implementation, the received data packets can be processed into a queue form first, and then the data packets in the queue form are allocated through the filter to achieve a precise control of the data packets. Furthermore, the data packets allocated to the class are also controlled twice precisely through the class, so that it is convenient to accurately control the received traffic.
[0057] Embodiment 2
[0058] Embodiment 2 of the present application provides a Linux network traffic control method. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0059] S210 , buffering the received data packets into a queue to obtain a data queue.
[0060] S220: In response to the existence of a filter, allocating the data packets in the data queue to corresponding classes based on the filter.
[0061] S230: Receive the data packet in the class.
[0062] S240: In response to the absence of a filter, directly obtain the data packet in the data queue.
[0063] Wherein, when the Linux operating system does not set a filter for the data queue, each data packet in the data queue can be directly transmitted to the Linux operating system.
[0064] Specifically, when it is determined that no filter exists, each data packet in the data queue is directly transmitted to the Linux operating system, and the Linux operating system directly receives each data packet.
[0065] Embodiment 3
[0066] Embodiment 3 of the present application provides a Linux network traffic control method. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0067] S310 , buffering the received data packets into a queue to obtain a data queue.
[0068] S320: In response to the existence of a filter, the data packets in the data queue are allocated to corresponding classes based on the filter.
[0069] S330: Receive the data packet in the class.
[0070] S340: In response to the existence of a filter, allocating the data packets in the data queue to a corresponding post-filter queue based on the filter.
[0071] Among them, when there is a filter, the filter can also allocate data packets in the data queue to the corresponding post-filter queue. The post-filter queue is a collection of multiple data packets allocated by the filter. It should be noted that the post-filter queue does not have the function of class data transmission parameters.
[0072] Specifically, the filter allocates some data packets in the data queue to the post-filter queue.
[0073] S350: Receive the data packet in the filtered queue.
[0074] After the post-filter queue is generated, it needs to be further sent to the Linux operating system, and the Linux operating system acquires each data packet in the post-filter queue.
[0075] Embodiment 4
[0076] Embodiment 4 of the present application provides a Linux network traffic control method. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0077] S410 , buffering the received data packets into a queue to obtain a data queue.
[0078] S420: In response to the existence of a filter, allocating the data packets in the data queue to corresponding classes based on the filter.
[0079] S430: Receive the data packet in the class.
[0080] S440: Acquire the data packet in the class as a new received data packet.
[0081] Among them, in S410-S430, the data packets received by the computer from the network first become the data queue of the network card, and then are assigned to the corresponding class through the filter. The data packet receiving process can be simply recorded as "queue-filter-class". It should be noted that in order to facilitate further realization of more precise control over the received traffic, the data packets in the received class can also be used as new received data packets, and then the "queue-filter-class" process is repeated to assign the data packets to a new class with more fine divisions. The new class resets the data transmission parameters of the data packets, and then transmits the data packets under the corresponding new class to the Linux operating system according to the new data transmission parameters, thereby enabling the Linux operating system to achieve precise control over the received traffic.
[0082] Specifically, the data packet in the class in step S430 is obtained, and the data packet is used as a new received data packet.
[0083] S450, looping the steps of queuing and caching the received data packets to obtain a data queue; and in response to the existence of a filter, allocating the data packets in the data queue to corresponding classes based on the filter until a preset loop stop condition is met.
[0084] It should be noted that, in each loop execution of the step of queuing and caching the received data packets to obtain a data queue; in response to the existence of a filter, assigning the data packets in the data queue to the corresponding class based on the filter, the data queue formed based on the newly received data packets is a new data queue, and the filter used is also a new filter, and the class assigned by the filter is also a new class. The preset loop stop condition in this embodiment can be that the number of loops meets the preset loop number threshold, and in other embodiments, it is not specifically limited.
[0085] Specifically, after obtaining the data packets in the class through step S430, further, the obtained data packets are taken as new data packets, the received new data packets are queued and cached to obtain a new data queue, and in response to the existence of a new filter, the data packets in the new data queue are allocated to the corresponding new class based on the new filter; if the preset loop stop condition is not met, the process of "taking the obtained data packets as new data packets, the received new data packets are queued and cached to obtain a new data queue, and in response to the existence of a new filter, the data packets in the new data queue are allocated to the corresponding new class based on the new filter" is continued to loop until the preset loop stop condition is met.
[0086] S460, receiving a new data packet in the class corresponding to when the loop stop condition is met.
[0087] Among them, when the loop stop condition is met, there is at least one data packet in the corresponding new class, the new class sets new data transmission parameters for the data packet therein, and further transmits the data packet to the Linux operating system according to the new data transmission parameters; the Linux operating system receives the data packet.
[0088] Embodiment 5
[0089] Embodiment 5 of the present application provides a Linux network traffic control method. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0090] S510 , buffering the received data packets into a queue to obtain a data queue.
[0091] S520: In response to the existence of a filter, the data packets in the data queue are allocated to corresponding classes based on the filter.
[0092] S530: Receive the data packet in the class.
[0093] S540: In response to the existence of a filter, allocating the data packets in the data queue to a corresponding post-filter queue based on the filter.
[0094] It should be noted that the filter is provided with allocation rules, and the allocation rules are used to allocate the data packets in the data queue to the corresponding class or post-filter queue.
[0095] The allocation rule is pre-configured in the corresponding filter, so that when the filter receives the data queue, it can further allocate the data packets in the data queue to the corresponding class or post-filter queue according to the allocation rule.
[0096] S550: Receive the data packet in the filtered queue.
[0097] Embodiment 6
[0098] Embodiment 6 of the present application provides a Linux network traffic control method. It should be noted that for the parts not described in detail in this embodiment, reference may be made to the descriptions of other embodiments. The method includes:
[0099] S610: Buffer the received data packets into a queue to obtain a data queue.
[0100] S620: In response to the existence of a filter, allocating the data packets in the data queue to a corresponding class based on the filter.
[0101] It should be noted that a traffic configuration rule is set in the class, and the traffic configuration rule is used to control the transmission bandwidth and network rate of the data packets allocated to the class.
[0102] Each class has its preset traffic configuration rules, and the transmission bandwidth and network rate are used to control the transmission process of a group of data packets in the corresponding class.
[0103] S630: Receive the data packet in the class.
[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] Embodiment 7
[0106] Based on the same inventive concept, this embodiment also provides a Linux network traffic control device for implementing the above-mentioned Linux network traffic control method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more Linux network traffic control device embodiments provided below can refer to the limitations of the Linux network traffic control method above, and will not be repeated here.
[0107] In this embodiment, Figure 2 As shown, a Linux network traffic control device is provided, comprising:
[0108] A queue buffer module is used to buffer received data packets into a queue to obtain a data queue;
[0109] a data allocation module, configured to allocate the data packets in the data queue to corresponding classes based on the filter in response to the existence of the filter;
[0110] A data receiving module is used to receive the data packet in the class.
[0111] Each module in the above Linux network traffic control device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0112] It should be noted that, in this embodiment, the received data packets are queued and cached to obtain a data queue; in response to the existence of a filter, the data packets in the data queue are allocated to the corresponding class based on the filter; and the data packets in the class are received. Through the above implementation, the received data packets can be processed into a queue form first, and then the data packets in the queue form are allocated through the filter to achieve a precise control of the data packets. Furthermore, the data packets allocated to the class are also controlled twice precisely through the class, so that it is convenient to accurately control the received traffic.
[0113] In one embodiment, the Linux network traffic control device further includes:
[0114] The direct acquisition module is used for directly acquiring the data packet in the data queue in response to the absence of the filter.
[0115] In one embodiment, the Linux network traffic control device further includes:
[0116] a queue allocation module, configured to allocate the data packets in the data queue to a corresponding post-filter queue based on the filter in response to the existence of the filter;
[0117] The post-filter receiving module is used to receive the data packets in the post-filter queue.
[0118] In one embodiment, the Linux network traffic control device further includes:
[0119] A cyclic acquisition module, used for acquiring the data packets in the class as new received data packets;
[0120] A loop execution module, configured to loop execute the steps of queuing and caching the received data packets to obtain a data queue; and in response to the existence of a filter, allocating the data packets in the data queue to a corresponding class based on the filter until a preset loop stop condition is met;
[0121] The final receiving module is used to receive a new data packet in the class corresponding to the condition that the cycle stops.
[0122] Embodiment 8
[0123] Figure 3A schematic diagram of the structure of a computer device 10 in an embodiment that can be used to implement the present application is shown. The device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0124] like Figure 3 As shown, the device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0125] A number of components in the device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0126] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a load balancing method for a multi-camera system.
[0127] In some embodiments, the load balancing method for a multi-camera system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the load balancing method for a multi-camera system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the load balancing method for a multi-camera system in any other appropriate manner (e.g., by means of firmware).
[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow charts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0130] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0133] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0135] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
[0136] Embodiment 9
[0137] In this embodiment, a computer readable storage medium is provided. Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0138] Embodiment 10
[0139] In this embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A Linux network traffic control method, characterized in that: include: The received data packets are queued and cached to obtain a data queue; In response to the existence of the filter, allocating the data packets in the data queue to corresponding classes based on the filter; The packet in the class is received.
2. The method according to claim 1, characterized in that Also includes: In response to the absence of a filter, the data packet in the data queue is directly obtained.
3. The method according to claim 1, characterized in that Also includes: In response to the existence of a filter, allocating the data packets in the data queue to a corresponding post-filter queue based on the filter; The data packet in the post-filtering queue is received.
4. The method according to claim 1, characterized in that Also includes: Acquire the data packet in the class as a new received data packet; The steps of queuing and caching the received data packets to obtain a data queue are executed cyclically; in response to the existence of a filter, allocating the data packets in the data queue to a corresponding class based on the filter until a preset loop stop condition is met; A new data packet in the class corresponding to when the loop stop condition is met is received.
5. The method according to claim 3, characterized in that: The filter is provided with allocation rules, and the allocation rules are used to allocate the data packets in the data queue to the corresponding class or post-filter queue.
6. The method according to claim 1, characterized in that The class is provided with a flow configuration rule, and the flow configuration rule is used to control the transmission bandwidth and network rate of the data packets allocated to the class.
7. A Linux network traffic control device, characterized in that: The device comprises: A queue buffer module is used to buffer received data packets into a queue to obtain a data queue; a data allocation module, configured to allocate the data packets in the data queue to corresponding classes based on the filter in response to the existence of the filter; A data receiving module is used to receive the data packet in the class.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.