Traffic delay processing method and device based on time wheel and storage medium

Through the time-wheel-based traffic delay processing method, the connections in the DPI server are released and processed slot-by-point, which solves the congestion problem caused by the traffic exceeding the upper limit of processing capacity when processing parallel traffic, and improves the stability of the system.

CN119583449APending Publication Date: 2025-03-07BEIJING HENGAN JIAXIN SAFETY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411697521.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

When processing parallel traffic, DPI servers are prone to congestion due to traffic exceeding the processing capacity limit, affecting stable operation.

Method used

The time-wheel-based traffic delay processing method is adopted to determine the connection table to be released by obtaining the traffic acquisition time, and the slots are determined according to the pre-configured time wheel, and the connections are released in each release cycle by slot until all are released, and the connections for each release cycle are processed by the deep packet detection server.

Benefits of technology

Ensure that the DPI server only processes connections that do not exceed the preset number threshold during each release cycle, avoid traffic congestion, and improve the stability of the DPI server when processing parallel traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583449A_ABST
    Figure CN119583449A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic delay processing method and device based on a time wheel and a storage medium. The method comprises the following steps: determining a to-be-released connection table according to a flow obtained at a first flow obtaining time, wherein the to-be-released connection table is used for storing connections contained in the flow; a first slot position corresponding to the first flow acquisition time is determined according to a pre-configured time wheel, the time wheel comprises a plurality of slot positions, and each slot position is used for processing connection of a preset number threshold value; starting from the first slot position, sequentially releasing the connections in the to-be-released connection table through one slot position in each release period until all the connections in the to-be-released connection table are released; and processing the connection released in each release period through the deep data packet detection server. According to the technical scheme of the invention, the DPI server can be released through a plurality of release periods through slot positions of a plurality of time wheels, so that in each release period, the DPI server can perform connection processing in the processing capability, and the stability of the DPI server during parallel traffic processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of Internet communication technology, and in particular relates to a flow delay processing method, device and storage medium based on a time wheel. Background Art

[0002] With the development of network technology, deep packet inspection (DPI) has become an indispensable part of the network.

[0003] As a traffic collection and processing device, DPI servers may encounter congestion when processing parallel traffic due to traffic exceeding the upper limit of DPI server processing capacity. How to keep DPI servers running stably when processing parallel traffic has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to provide a flow delay processing method, device and storage medium based on a time wheel, which can improve the stability of a DPI server when processing parallel flows.

[0005] According to a first aspect of the present invention, a method for processing flow delay based on a time wheel is provided, comprising:

[0006] Determine a connection table to be released according to the traffic acquired at the first traffic acquisition time, where the connection table to be released is used to store connections included in the traffic;

[0007] Determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, the time wheel comprising a plurality of slots, each slot being used to process a preset number of connections;

[0008] Starting from the first slot, the connections in the connection list to be released are released in sequence through one slot in each release cycle until all the connections in the connection list to be released are released;

[0009] Connections released during each release cycle are processed by a deep packet inspection server.

[0010] According to a second aspect of the present invention, a flow delay processing device based on a time wheel is provided, comprising:

[0011] A connection table determination module, used to determine a connection table to be released according to the traffic acquired at the first traffic acquisition time, wherein the connection table to be released is used to store connections included in the traffic;

[0012] a slot determination module, configured to determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, wherein the time wheel includes a plurality of slots, each slot being configured to process a preset number of connections;

[0013] a delayed release module, used to release the connections in the to-be-released connection table through one slot in each release cycle, starting from the first slot, until all the connections in the to-be-released connection table are released;

[0014] The processing module is used to process the connection released in each release cycle through the deep data packet inspection server.

[0015] According to a third aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the traffic delay processing method based on the time wheel described in any embodiment.

[0019] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the time wheel-based traffic delay processing method described in any embodiment of the present invention when executed.

[0020] The technical solution provided by the present invention determines a connection table to be released according to the traffic obtained at the first traffic acquisition time, and the connection table to be released is used to store the connections contained in the traffic; determines the first slot corresponding to the first traffic acquisition time according to the pre-configured time wheel, and the time wheel includes multiple slots, each slot is used to process the connection of the preset number threshold; starting from the first slot, the connection in the connection table to be released is released through a slot in each release cycle in turn until all the connections in the connection table to be released are released; and the connection released in each release cycle is processed by a deep data packet inspection server. Compared with the current situation where concurrent traffic exceeds the upper limit of the DPI server processing capacity, the present invention can realize the release of only the connections in the slot in each release cycle based on the time wheel, and the number of connections released in each release cycle does not exceed the preset number threshold processed by the slot, thereby ensuring that the DPI server only processes the connections that do not exceed the preset number threshold in each release cycle. For the connections that are not processed in the current release cycle in the parallel traffic, they can be released through multiple release cycles through the slots of multiple time wheels, and then in each release cycle, the DPI server can process the connection within the processing capacity, thereby improving the stability of the DPI server when processing parallel traffic.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.

[0023] Figure 1 is a schematic diagram of normal traffic data provided by an embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of abnormal traffic data provided by an embodiment of the present invention;

[0025] Figure 3 It is a flow chart of a flow delay processing method based on a time wheel provided in an embodiment of the present invention;

[0026] Figure 4 It is a structural schematic diagram of a flow delay processing device based on a time wheel provided in an embodiment of the present invention;

[0027] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] With the development of network technology, deep packet inspection (DPI) has become an indispensable part of the network. As a traffic collection and processing device, DPI servers may encounter congestion when processing parallel traffic due to traffic exceeding the upper limit of the DPI server's processing capacity. How to keep the DPI server running stably when processing parallel traffic has become an urgent problem to be solved.

[0031] As a traffic collection and processing device, the DPI server considers the speed of establishing new connections, the speed of releasing connections, and the number of concurrent connections as important consideration indicators. The speed of establishing new connections and releasing connections is a test of the computing power of the DPI server, because a lot of calculations are required when establishing and releasing connections. The number of concurrent connections is a test of the memory of the DPI server. The larger the number of concurrent connections, the more memory is occupied. Each type of DPI server has a different rated processing power limit depending on the computing power of its processor and the size of its memory capacity. For example, the processing power of a certain DPI server is 300w / s of establishment and release, and 6000w concurrent connections.

[0032] like Figure 1 As shown, it is assumed that the traffic generates connections at a rate of 3 million / second, reaches the concurrency peak after the ramp-up phase, and then starts to release traffic. The traffic is released at a rate of 3 million / second. Specifically, the ramp-up phase: with a new creation rate of 3 million / s, the ramp-up time is 20 seconds, reaching 60 million concurrency. The stable phase: with a new creation rate of 3 million / s and a release rate of 3 million / s, maintain 6 million concurrency. The downhill phase: with a release rate of 3 million / s, the ramp-down time is 20 seconds, and all 6 million concurrency is released.

[0033] However, when traffic anomalies occur, such as Figure 2As shown in the figure, in the climbing stage, the system climbs for 20 seconds at a new creation speed of 300w / s to reach 6000w concurrency. In the stable stage, the system maintains 6000w concurrency at a new creation speed of 300w / s and a release speed of 300w / s. In the downhill stage, the system releases 600w / s at a release speed of 600w / s for 10 seconds, and all 6000w concurrency is released.

[0034] Traffic is connected to the DPI server and processed by the DPI server. When the rated processing capacity of a DPI server is 3 million / s of creation and release, and 6 million concurrent, the normal traffic model can be processed, but the release speed of the abnormal traffic model exceeds the rated processing capacity of the DPI server, resulting in the DPI server being unable to process it correctly.

[0035] Figure 3 This is a flow chart of a flow delay processing method based on a time wheel provided by an embodiment of the present invention. This embodiment can be applied to assist a DPI server in processing abnormal concurrent flows. The method can be executed by a flow delay processing device based on a time wheel. The flow delay processing device based on a time wheel can be implemented in the form of hardware and / or software. The method includes:

[0036] S101. Determine a to-be-released connection table according to traffic acquired at a first traffic acquisition time, where the to-be-released connection table is used to store connections included in the traffic.

[0037] Optionally, the traffic is traffic based on the TCP protocol or traffic based on the UDP protocol.

[0038] The traffic based on the TCP protocol includes handshake traffic, transceiver traffic or wave traffic. The TCP protocol includes a handshake phase, a transceiver phase and a wave phase. The handshake phase is used to establish a connection according to a three-way handshake mechanism. The transceiver phase is used to transmit data through the TCP protocol after the connection is established. The wave phase is used to release the connection according to the four-wave mechanism.

[0039] In the above three phases, especially in the handshake phase and the wave phase, abnormal concurrent traffic may occur, for example, a large number of handshake operations are generated in a traffic acquisition cycle or a large number of wave operations are generated in a traffic acquisition time cycle.

[0040] Optionally, the traffic acquisition cycle may be 1 second, and traffic is acquired once per second. When traffic is received, the current first traffic acquisition time is acquired. The traffic received at the first traffic acquisition time is written into the connection table to be released.

[0041] S102: Determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, where the time wheel includes a plurality of slots, and each slot is used to process connections of a preset number threshold.

[0042] Create a time wheel in advance. There are multiple slots on the time wheel, each slot corresponds to 1 second. A slot release list can be created for each slot, and the slot release list includes the connections to be released in the slot. A release counter can be created for each slot. By reading the system time, determine the current time wheel slot, that is, the first slot.

[0043] S103: Starting from the first slot, release the connections in the to-be-released connection table through one slot in each release cycle, until all the connections in the to-be-released connection table are released.

[0044] Optionally, starting from the first slot, the connections in the connection list to be released are released in sequence through one slot in each release cycle until all the connections in the connection list to be released are released, which can be implemented in the following manner:

[0045] In the first release cycle, a connection is released in the first slot according to the table of connections to be released; if the number of released connections reaches a preset release speed threshold, the connection release in the first release cycle is stopped; the released connection is deleted from the table of connections to be released; the first release cycle is a release cycle determined according to the first traffic acquisition time;

[0046] Rotate the time wheel to determine a second slot, where the second slot is a slot next to the first slot in the time wheel;

[0047] In a second release cycle, a connection is released in the second slot according to the connection table to be released; if the number of released connections reaches a preset release speed threshold, connection release at the current time is stopped; the released connection is deleted from the connection table to be released; the second release cycle is the next release cycle of the first release cycle; until all connections in the connection table to be released are released.

[0048] Optionally, the release period is 1 second and the traffic acquisition period is 1 second.

[0049] When the release torrent arrives and lasts for several seconds, first, read the system time to determine the first slot of the time wheel corresponding to the first traffic acquisition time. Clear the release counter of the first slot in the current time wheel. The release torrent of the first traffic acquisition time is saved in the slot release list of the current time wheel slot. At the same time, speed-limited release is performed, and each time a connection is released from the table of connections to be released, the release counter is incremented by one. When the release counter value reaches the preset release speed threshold, stop releasing the connections to be released on the time wheel slot. Then, when the system time drives the time wheel to enter the next second, the remaining connections to be released on the first slot are placed in the slot release list of the next time wheel slot. The above steps are repeated, and the release speed reduction is achieved through delayed release, thereby ensuring that all released connections are correctly processed by the DPI server.

[0050] Further, after releasing the connections in the to-be-released connection table through one slot in each release cycle starting from the first slot, the method further includes:

[0051] If new traffic is acquired at the second traffic acquisition time, the new traffic is written into the to-be-released connection table, and the to-be-released connection table also includes connections in the new traffic.

[0052] If traffic is received again in the second traffic acquisition time after the first traffic acquisition time, the new traffic is written into the connection table to be released, and the connection in the connection table to be released is written into the slot release list corresponding to the slot of the current rotation time wheel.

[0053] For example, the capacity of the slot release list corresponding to the slot is 3 million, and 3 million connections in the slot release list are released in each release cycle. The connection table to be released is used to store all unreleased connections to be released, and its capacity is greater than the capacity of the slot release list, and can be updated according to the new traffic obtained at the second traffic acquisition time.

[0054] S104: Process the connection released in each release period through the deep data packet inspection server.

[0055] The capacity of the slot release list for each slot matches the upper limit of the processing capacity of the deep packet inspection server. The data corresponding to the released connection is sent to the deep packet inspection server for packet inspection to ensure that the deep packet inspection server can handle the connection within the processing capacity.

[0056] The method for processing flow delay based on a time wheel provided by the present invention determines a connection table to be released according to the flow obtained at the first flow acquisition time, wherein the connection table to be released is used to store the connections contained in the flow; determines the first slot corresponding to the first flow acquisition time according to the pre-configured time wheel, wherein the time wheel includes a plurality of slots, each slot being used to process connections of a preset number threshold; starting from the first slot, sequentially releasing the connections in the connection table to be released through one slot in each release cycle until all the connections in the connection table to be released are released; and processing the connections released in each release cycle by a deep data packet inspection server. Compared with the current situation where concurrent flow exceeds the upper limit of the processing capacity of the DPI server and traffic congestion occurs, the present invention can realize the release of only the connections in the slot in each release cycle based on the time wheel, and the number of connections released in each release cycle does not exceed the preset number threshold processed by the slot, thereby ensuring that the DPI server only processes the connections that do not exceed the preset number threshold in each release cycle. For connections in parallel traffic that are not processed in the current release cycle, they can be released through multiple release cycles through slots in multiple time wheels. In each release cycle, the DPI server can process the connections within its processing capacity, thereby improving the stability of the DPI server when processing parallel traffic.

[0057] Figure 4 A structural schematic diagram of a flow delay processing device based on a timing wheel is provided for an embodiment of the present invention. The flow delay processing device based on a timing wheel is used to implement the above-mentioned flow delay processing method based on a timing wheel, including: a connection table determination module 21, a slot determination module 22, a delayed release module 23 and a processing module 24.

[0058] A connection table determination module 21, configured to determine a connection table to be released according to the flow acquired at the first flow acquisition time, wherein the connection table to be released is used to store connections included in the flow;

[0059] A slot determination module 22, configured to determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, wherein the time wheel includes a plurality of slots, each slot being configured to process a preset number of connections;

[0060] The delayed release module 23 is used to release the connections in the connection list to be released through one slot in each release cycle starting from the first slot, until all the connections in the connection list to be released are released;

[0061] The processing module 24 is used to process the connection released in each release period through the deep data packet inspection server.

[0062] On the basis of the above implementation, optionally, the delayed release module 23 is used to:

[0063] In the first release cycle, a connection is released in the first slot according to the table of connections to be released; if the number of released connections reaches a preset release speed threshold, the connection release in the first release cycle is stopped; the released connection is deleted from the table of connections to be released; the first release cycle is a release cycle determined according to the first traffic acquisition time;

[0064] Rotate the time wheel to determine a second slot, where the second slot is a slot next to the first slot in the time wheel;

[0065] In a second release cycle, a connection is released in the second slot according to the connection table to be released; if the number of released connections reaches a preset release speed threshold, connection release at the current time is stopped; the released connection is deleted from the connection table to be released; the second release cycle is the next release cycle of the first release cycle; until all connections in the connection table to be released are released.

[0066] Based on the above implementation, optionally, a connection table supplement module is further included, and the connection table supplement module is used to:

[0067] If new traffic is acquired at the second traffic acquisition time, the new traffic is written into the to-be-released connection table, and the to-be-released connection table also stores connections in the new traffic that are supplemented multiple times.

[0068] Based on the above implementation, optionally, the release period is 1 second and the traffic acquisition period is 1 second.

[0069] Based on the above implementation, optionally, the traffic is traffic based on the TCP protocol, and the traffic based on the TCP protocol includes handshake traffic, transceiver traffic, or wave traffic.

[0070] The flow delay processing device based on the time wheel provided by the present invention comprises a connection table determination module 21, which is used to determine the connection table to be released according to the flow obtained at the first flow acquisition time, and the connection table to be released is used to store the connections contained in the flow; a slot determination module 22, which is used to determine the first slot corresponding to the first flow acquisition time according to the pre-configured time wheel, and the time wheel includes multiple slots, each slot is used to process the connections of the preset number threshold; a delayed release module 23, which is used to release the connections in the connection table to be released through one slot in each release cycle starting from the first slot, until all the connections in the connection table to be released are released; a processing module 24, which is used to process the connections released in each release cycle through a deep data packet inspection server. Compared with the current situation where concurrent flow exceeds the upper limit of the processing capacity of the DPI server, traffic congestion occurs, the present invention can realize the release of only the connections in the slot in each release cycle based on the time wheel, and the number of connections released in each release cycle does not exceed the preset number threshold processed by the slot, thereby ensuring that the DPI server only processes the connections that do not exceed the preset number threshold in each release cycle. For connections in parallel traffic that are not processed in the current release cycle, they can be released through multiple release cycles through slots in multiple time wheels. In each release cycle, the DPI server can process the connections within its processing capacity, thereby improving the stability of the DPI server when processing parallel traffic.

[0071] The time wheel-based flow delay processing device provided in the embodiment of the present invention can execute the time wheel-based flow delay processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0072] Figure 5 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, 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 invention described and / or required herein.

[0073] like Figure 5As shown, the electronic 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 electronic device 10 can also be stored. The processor 11, the ROM 12, and the 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.

[0074] A number of components in the electronic 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 electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0075] 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 dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a traffic delay processing method based on a time wheel.

[0076] In some embodiments, the time-wheel-based traffic delay processing method 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 electronic 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 time-wheel-based traffic delay processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the time-wheel-based traffic delay processing method by any other appropriate means (e.g., by means of firmware).

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

[0078] The computer program for implementing the time wheel-based flow delay processing method of the present invention can be written in any combination of one or more programming languages. These computer programs can 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 program is executed by the processor, the functions / operations specified in the flow chart and / or the block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or completely on a remote machine or server.

[0079] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions can be used to enable a processor to execute a flow delay processing method based on a time wheel, the method comprising:

[0080] Determine a connection table to be released according to the traffic acquired at the first traffic acquisition time, where the connection table to be released is used to store connections included in the traffic;

[0081] Determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, the time wheel comprising a plurality of slots, each slot being used to process a preset number of connections;

[0082] Starting from the first slot, the connections in the connection list to be released are released in sequence through one slot in each release cycle until all the connections in the connection list to be released are released;

[0083] Connections released during each release cycle are processed by a deep packet inspection server.

[0084] Based on the above implementation, starting from the first slot, the connections in the connection table to be released are released in sequence through one slot in each release cycle until all the connections in the connection table to be released are released, including:

[0085] In the first release cycle, a connection is released in the first slot according to the table of connections to be released; if the number of released connections reaches a preset release speed threshold, the connection release in the first release cycle is stopped; the released connection is deleted from the table of connections to be released; the first release cycle is a release cycle determined according to the first traffic acquisition time;

[0086] Rotate the time wheel to determine a second slot, where the second slot is a slot next to the first slot in the time wheel;

[0087] In a second release cycle, a connection is released in the second slot according to the connection table to be released; if the number of released connections reaches a preset release speed threshold, connection release at the current time is stopped; the released connection is deleted from the connection table to be released; the second release cycle is the next release cycle of the first release cycle; until all connections in the connection table to be released are released.

[0088] Based on the above implementation, after releasing the connections in the connection table to be released through one slot in each release cycle starting from the first slot, the method further includes:

[0089] If new traffic is acquired at the second traffic acquisition time, the new traffic is written into the to-be-released connection table, and the to-be-released connection table also includes connections in the new traffic.

[0090] Based on the above implementation, the release period is 1 second and the traffic acquisition period is 1 second.

[0091] On the basis of the above implementation mode, the traffic is traffic based on the TCP protocol, and the traffic based on the TCP protocol includes handshake traffic, transceiver traffic or wave traffic.

[0092] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination 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.

[0093] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic 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 electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

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

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

[0096] 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 described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0097] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A flow delay processing method based on a time wheel, characterized in that: The method comprises: Determine a connection table to be released according to the traffic acquired at the first traffic acquisition time, where the connection table to be released is used to store connections included in the traffic; Determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, the time wheel comprising a plurality of slots, each slot being used to process a preset number of connections; Starting from the first slot, the connections in the connection list to be released are released in sequence through one slot in each release cycle until all the connections in the connection list to be released are released; Connections released during each release cycle are processed by a deep packet inspection server.

2. The method according to claim 1, characterized in that Starting from the first slot, releasing the connections in the to-be-released connection table through one slot in each release cycle, until all the connections in the to-be-released connection table are released, including: In the first release cycle, a connection is released in the first slot according to the table of connections to be released; if the number of released connections reaches a preset release speed threshold, the connection release in the first release cycle is stopped; the released connection is deleted from the table of connections to be released; the first release cycle is a release cycle determined according to the first traffic acquisition time; Rotate the time wheel to determine a second slot, where the second slot is a slot next to the first slot in the time wheel; In a second release cycle, a connection is released in the second slot according to the connection table to be released; if the number of released connections reaches a preset release speed threshold, connection release at the current time is stopped; the released connection is deleted from the connection table to be released; the second release cycle is the next release cycle of the first release cycle; until all connections in the connection table to be released are released.

3. The method according to claim 2, characterized in that After releasing the connections in the to-be-released connection table through one slot in each release cycle starting from the first slot, the method further includes: If new traffic is acquired at the second traffic acquisition time, the new traffic is written into the to-be-released connection table, and the to-be-released connection table also includes connections in the new traffic.

4. The method according to claim 3, characterized in that The release period is 1 second, and the flow acquisition period is 1 second.

5. The method according to claim 3, characterized in that: The traffic is traffic based on the TCP protocol, and the traffic based on the TCP protocol includes handshake traffic, transceiver traffic, or wave traffic.

6. A flow delay processing device based on a time wheel, characterized in that: The device comprises: A connection table determination module, used to determine a connection table to be released according to the traffic acquired at the first traffic acquisition time, wherein the connection table to be released is used to store connections included in the traffic; a slot determination module, configured to determine a first slot corresponding to the first traffic acquisition time according to a preconfigured time wheel, wherein the time wheel includes a plurality of slots, each slot being configured to process a preset number of connections; a delayed release module, used to release the connections in the to-be-released connection table through one slot in each release cycle, starting from the first slot, until all the connections in the to-be-released connection table are released; The processing module is used to process the connection released in each release cycle through the deep data packet inspection server.

7. The device according to claim 6, characterized in that The delayed release module is used for: In the first release cycle, a connection is released in the first slot according to the table of connections to be released; if the number of released connections reaches a preset release speed threshold, the connection release in the first release cycle is stopped; the released connection is deleted from the table of connections to be released; the first release cycle is a release cycle determined according to the first traffic acquisition time; Rotate the time wheel to determine a second slot, where the second slot is a slot next to the first slot in the time wheel; In a second release cycle, releasing a connection in the second slot according to the to-be-released connection table; If the number of released connections reaches a preset release speed threshold, the connection release of the current time is stopped; the released connections are deleted from the connection table to be released; the second release cycle is the next release cycle of the first release cycle; until all connections in the connection table to be released are released.

8. The device according to claim 7, characterized in that It also includes a connection table supplement module, which is used to: If new traffic is acquired at the second traffic acquisition time, the new traffic is written into the to-be-released connection table, and the to-be-released connection table also stores connections in the new traffic that are supplemented multiple times.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the traffic delay processing method based on the time wheel as described in any one of claims 1-5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flow delay processing method based on the time wheel according to any one of claims 1 to 5 when executed.