Method, system and device for carrying out flow analysis in computing power network by using DPId, and storage medium

The DPId and libnDPI libraries are used to capture, parse and process traffic data in the computing network, solving the problems of poor performance and high overhead of traditional methods, achieving accurate traffic analysis and network security monitoring, and optimizing network performance and security prevention.

CN118764284APending Publication Date: 2024-10-11SI-TECH INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410989017.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Traditional traffic analysis methods have poor performance and high overhead in computing networks, cannot meet the needs of complex traffic analysis, and are difficult to detect potential security threats and attacks in a timely manner.

Method used

Use DPId to capture the data packets of the network interface, and perform parsing and feature extraction through the libnDPI library, perform matching and parallel processing based on the classification database, and store the results to achieve accurate traffic analysis.

Benefits of technology

It achieves accurate traffic analysis in the computing network, optimizes network performance, promptly discovers security threats, protects the network from malicious attacks and data leaks, and reduces system overhead and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764284A_ABST
    Figure CN118764284A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system and equipment for carrying out flow analysis in a computing power network by using a DPId, and a storage medium. The method comprises the following steps: capturing a data packet of a network interface through the DPId; analyzing the data packet by using a libnDPI library, and extracting features; matching is carried out on the basis of the features and rules in a classification database, and the data packets are distributed to different processing threads for parallel processing; and after the processing is finished, storing a result into a log file. According to the method, the problems that a traditional flow analysis method is poor in performance in the computing power network, high in overhead and incapable of meeting the complex flow analysis requirement of the computing power network are solved, so that accurate and good-effect flow analysis can be carried out in the computing power network, and the flow analysis efficiency is improved. Therefore, the purposes of optimizing network performance, ensuring reasonable distribution of computing power resources, timely finding potential security threats and attack behaviors, taking corresponding precautionary measures, and protecting the network from risks such as hostile attacks and data leakage are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic analysis technology, and in particular to a method, system, device and storage medium for performing traffic analysis in a computing network using DPId. Background Art

[0002] In the context of the digital age, with the rapid development of technologies such as cloud computing, big data and artificial intelligence, computing power has become the core driving force for social progress. This has led to the rise of a new type of infrastructure - computing power network. By deeply integrating technologies such as cloud computing, edge computing and artificial intelligence, computing power networks provide efficient and reliable computing and data processing capabilities for various applications. In this process, in order to have a deep understanding of the operation status of the computing power network, it is necessary to monitor and analyze the traffic data in real time so that bottlenecks and problems in the network can be discovered in time, thereby optimizing network performance and ensuring the reasonable allocation of computing power resources. At the same time, by analyzing network traffic data, potential security threats and attack behaviors can be discovered in time, so that corresponding preventive measures can be taken to protect the network from malicious attacks and data leakage risks. Based on the above needs, the need for traffic analysis of computing power networks has been raised.

[0003] Traffic analysis methods for computing power networks Traffic analysis methods represented by port monitoring, traffic mirroring, message parsing and traffic sampling are commonly used methods in the industry to solve the complex and critical problem of computing power network traffic analysis. They collect, process and analyze network traffic data through different means to optimize network performance.

[0004] Port monitoring: Port monitoring records the traffic data of each port by monitoring the ports of network devices at key locations, thereby providing the overall network traffic distribution. Port monitoring has shortcomings: it can only obtain the total traffic of each port, and cannot conduct in-depth analysis of specific applications or protocols, making it difficult to meet complex computing power statistics requirements. In addition, this method requires monitoring of each port, which will generate large system overhead and network burden.

[0005] Traffic mirroring: Traffic mirroring is to copy the traffic of network devices and send it to monitoring devices, so as to fully capture and analyze the entire network traffic. Disadvantages of traffic mirroring: For large networks, especially computing power networks that are distributed and physically far away, professional hardware support is required, which is costly. Moreover, when the processing capacity of the mirroring device reaches a bottleneck, traffic loss or delay will occur. In addition, depending on the mirroring method, some privacy data may be leaked, resulting in data compliance issues.

[0006] Message parsing: Message parsing extracts key information for traffic analysis by deeply analyzing data packets, and understands traffic characteristics and behavior patterns by identifying various applications and protocols. Message parsing defects: Traditional message parsing requires a high level of understanding of network protocols, and decoding and processing messages consumes a lot of system resources. In addition, when faced with encrypted traffic (common in computing networks), this method cannot correctly parse and analyze the data therein.

[0007] Traffic sampling: Traffic sampling collects network traffic data by randomly selecting traffic samples on network devices, thereby balancing analysis accuracy and obtaining system resource consumption. Disadvantages of traffic sampling: This method will introduce certain sampling errors, which may affect the accuracy and completeness of statistics. In addition, the selected sampling rules may introduce deviations. For example, time-based sampling may ignore the time period when important events occur. In addition, when dealing with high-speed networks (such as computing power networks), traffic overload problems may occur, which cannot meet the needs of accurate statistics.

[0008] Traditional network traffic processing methods are often inadequate when faced with the large-scale, high-concurrency, and heterogeneous characteristics of computing networks. Therefore, a solution specifically for computing network traffic analysis is needed. Summary of the invention

[0009] In view of the shortcomings existing in the above problems, the present invention provides a method, system, device and storage medium for performing traffic analysis in a computing network using DPId.

[0010] To achieve the above object, the present invention provides a method for performing traffic analysis in a computing network using DPId, comprising:

[0011] Capture packets of network interfaces via DPId;

[0012] Use libnDPI library to parse the data packet and extract features;

[0013] Matching the features with rules in a classification database and distributing the data packets to different processing threads for parallel processing;

[0014] After processing is completed, the results are stored in a log file;

[0015] The data packet is parsed using the libnDPI library, and features are extracted including:

[0016] Verifying the integrity of the data packet;

[0017] Use the libnDPI library to perform in-depth analysis on the data packet and extract key features, wherein the key features include protocol type, port number and load characteristics;

[0018] Based on the key features, using the libnDPI library to identify the application layer protocol to which the data packet belongs;

[0019] Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

[0020] Preferably, the write buffer management structure defined by DPId includes a buffer buf of type nDPIsrvd_buffer, a field written indicating the size of written data, a pointer buffers pointing to a write buffer array, and two integer fields, the two integer fields including the total number of buffers total_buffers and the number of buffers currently in use used_buffers.

[0021] Preferably, the remote descriptor structure defined by DPId includes a socket type socket_type, a file descriptor fd, and specific fields according to different socket types.

[0022] Preferably, DPId loads configuration information from a configuration file and command line parameters, the configuration file including the socket type, remote file descriptor, maximum buffer size, UNIX domain socket path, TCP / IP address, user and group, maximum number of remote descriptors, and maximum number of write buffers; the command line parameters include the path of the process ID file and whether to enable additional features.

[0023] Preferably, encapsulating configuration information, DPId creates and initializes a socket, the steps comprising:

[0024] Create a corresponding socket according to the socket type specified in the configuration information structure;

[0025] Use the bind() system call to bind the socket to the configured local address;

[0026] Call the listen() system call to enter the listening state and wait for the client's connection request. When a connection request is received, use the accept() system call to accept the connection and create a new socket for communicating with the client.

[0027] Initialize the write buffer using the write buffer structure, allocate memory for the buffers array, and set the total_buffers and used_buffers fields;

[0028] When the socket has data to send, an available write buffer is obtained from the write buffer structure. After the data is written to the buffer, the written field is updated to record the amount of data written.

[0029] Use the send() or write() system call to send the data in the buffer. After the transmission is completed, update the status of the buffer as needed and possibly return it to the free list.

[0030] When the write buffer is no longer needed, its memory space is released back to the system or kept in the free list for subsequent use according to the memory release policy;

[0031] When the system is shut down or the socket is no longer in use, the socket is closed and any allocated write buffer memory is released.

[0032] The present invention also provides a system for performing traffic analysis in a computing network using DPId, comprising:

[0033] Capture module, used to capture data packets of network interface through DPId;

[0034] A parsing module, used to parse the data packet using the libnDPI library and extract features;

[0035] A matching module, used for matching the features with the rules in the classification database and distributing the data packets to different processing threads for parallel processing;

[0036] The storage module is used to store the results in log files after the processing is completed;

[0037] The data packet is parsed using the libnDPI library, and features are extracted including:

[0038] Verifying the integrity of the data packet;

[0039] Use the libnDPI library to perform in-depth analysis on the data packet and extract key features, wherein the key features include protocol type, port number and load characteristics;

[0040] Based on the key features, using the libnDPI library to identify the application layer protocol to which the data packet belongs;

[0041] Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

[0042] The present invention also provides a device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the above method.

[0043] The present invention also provides a storage medium storing a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the above method.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The present invention solves the problems that traditional traffic analysis methods have poor performance, high overhead, and cannot meet the complex traffic analysis needs of computing power networks in computing power networks. It makes it possible to perform accurate and effective traffic analysis in computing power networks, thereby optimizing network performance, ensuring the reasonable allocation of computing power resources, and timely discovering potential security threats and attack behaviors, taking corresponding preventive measures, and protecting the network from malicious attacks and risks such as data leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of the method of using DPId to perform traffic analysis in a computing power network in the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] Reference Figure 1 The present invention provides a method for performing traffic analysis in a computing network using DPId, comprising:

[0049] Capture packets of network interfaces via DPId;

[0050] Use libnDPI library to parse data packets and extract features;

[0051] Match the features with the rules in the classification database and distribute the data packets to different processing threads for parallel processing;

[0052] After processing is completed, the results are stored in a log file;

[0053] The libnDPI library is used to parse the data packet and extract the following features:

[0054] Verify the integrity of the data packet;

[0055] Use libnDPI library to analyze data packets in depth and extract key features, including protocol type, port number and load characteristics;

[0056] Based on key features, the libnDPI library is used to identify the application layer protocol to which the data packet belongs;

[0057] Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

[0058] In this embodiment, Deep Packet Inspection daemon, referred to as DPId, is a daemon software program based on deep packet inspection (DPI) technology, which is designed for computing network traffic analysis. It can run smoothly on Linux / Unix platforms, and its core functions cover the capture, processing and classification of network traffic. Through multi-threaded processing and packet distribution mechanism, the software can realize synchronous processing of data packets, thereby greatly improving processing efficiency. In the computing network environment, the application scenarios of the DPId of the present invention are very wide. It can not only be used for network traffic management, network optimization and resource utilization improvement, but also can be used in important fields such as network security and network monitoring. It is worth mentioning that DPId mainly relies on two commonly used open source libraries: libnDPI and libpcap, which ensures that it has a stable and reliable infrastructure. In addition, DPId shows efficient performance when processing a large amount of computing network traffic data. And it has good adaptability, can be customized and expanded according to actual needs, and can meet the needs of various application scenarios of computing network. The steps of the DPId operation process include:

[0059] Step 1: Initialize core data structures: When DPId is started, a series of initialization operations are required, including the initialization of core data structures, such as the write buffer structure, write buffer management structure, and remote descriptor structure.

[0060] Among them, the write buffer structure is used for actual data storage. The write buffer structure defined by the DPId of the present invention includes a buffer buf of the nDPIsrvd_buffer type for storing data to be sent, and a field written indicating the size of the written data. In order to efficiently manage the memory allocation and release of the write buffer, the write buffer management structure defined by the DPId of the present invention includes a pointer buffers pointing to the write buffer array, and two integer fields total_buffers (indicating the total number of buffers) and used_buffers (indicating the number of buffers currently used). The remote descriptor structure defined by the DPId of the present invention includes a socket type socket_type, a file descriptor fd, and specific fields that may exist according to different socket types. For UNIX domain sockets, event_collector_un and event_distributor_un fields are defined, including information such as the peer address, JSON data size, process ID, user name, and read-write buffer; for TCP / IP sockets, event_distributor_in fields are defined, including information such as the peer address and write buffer. Initialize global variables and states: Global variables and states need to be initialized to control the operation of DPId. These global variables include nDPIsrvd_main_thread_shutdown, which indicates whether the main thread needs to be shut down, and collector_un_sockfd, distributor_un_sockfd, and distributor_in_sockfd, which record the file descriptors of UNIX domain sockets and TCP / IP sockets. These initialization operations lay a solid foundation for subsequent packet processing, socket creation, and buffer management.

[0061] Step 2: After initialization, DPId will load configuration information from the configuration file and command line parameters. This configuration information includes key parameters such as socket type, remote file descriptor, and maximum buffer size. After loading, DPId will encapsulate this configuration information into a dedicated structure for subsequent socket creation and initialization operations.

[0062] The configuration file mainly contains the following parameters:

[0063] Socket type: defines the type of network communication protocol used by the system, such as TCP, UDP, or UNIX domain sockets.

[0064] Remote file descriptor: A file descriptor used to identify and manage remote connections.

[0065] Maximum buffer size: Set the maximum memory space allocated by the system for network packets.

[0066] UNIX domain socket path: The file system path of the UNIX domain socket.

[0067] TCP / IP address: The network address and port number that the system uses to listen or connect.

[0068] User and Group: The system user and user group that runs the DPI service.

[0069] Maximum number of remote descriptors: The maximum number of remote connections that the system can handle simultaneously.

[0070] Maximum number of write buffers: The maximum number of write buffers that the system can allocate.

[0071] The command line parameters mainly include the path to the process ID file and whether to enable additional features such as bufferbloat_fallback_to_blocking.

[0072] The special structure that encapsulates configuration information mainly includes the process ID file (pidfile), UNIX domain socket path (collector_un_sockpath), UNIX domain socket path (distributor_un_sockpath), TCP / IP address (distributor_in_address), user (user), group (group), maximum number of remote descriptors (max_remote_descriptors), maximum number of write buffers (max_write_buffers), and whether bufferbloat_fallback_to_blocking is enabled.

[0073] Step 3: Based on the encapsulated configuration information structure, DPId starts to create and initialize the socket. The specific steps are as follows:

[0074] Socket type setting: Create a corresponding socket according to the socket type (e.g. UNIX domain socket) specified in the configuration information structure. For UNIX domain sockets, the socket() system call is used and the AF_UNIX address family is specified; for TCP / IP sockets, the AF_INET or AF_INET6 address family is specified.

[0075] Bind address: For a listening socket (such as a server), use the bind() system call to bind the socket to the configured local address. This includes the UNIX domain socket path or TCP / IP address and port number specified in the configuration file.

[0076] Listening and accepting connections: For the server-side socket, call the listen() system call to enter the listening state and wait for the client's connection request. When a connection request is received, use the accept() system call to accept the connection and create a new socket for communication with the client.

[0077] Write buffer initialization: Use the write buffer structure to initialize the write buffer. Allocate memory for the buffers array and set the total_buffers and used_buffers fields.

[0078] Buffer management: When the socket has data to send, an available write buffer is obtained from the write buffer structure. After the data is written to the buffer, the written field is updated to record the amount of data written.

[0079] Data transmission: Use the send() or write() system call to send the data in the buffer. After the transmission is completed, the status of the buffer is updated as needed and it may be returned to the free list.

[0080] Buffer release: When the write buffer is no longer needed, its memory space is released back to the system or retained in the free list for subsequent use, depending on the memory release policy.

[0081] Resource cleanup: Ensure that all resources are properly cleaned up when the system is shut down or the socket is no longer in use, including closing the socket, releasing all allocated write buffer memory, etc.

[0082] Through the above steps, the DPI system can efficiently create and manage sockets while ensuring smooth data transmission and rational use of memory resources. At the same time, DPId also uses the write buffer management structure to efficiently manage multiple write buffers.

[0083] Step 4: After the socket is created and the buffer is managed, DPId starts to enter the packet processing phase. It uses the libpcap library to capture packets from the network interface and uses the libnDPI library to parse and extract features from the captured packets.

[0084] The detailed steps for parsing and feature extraction of captured data packets are as follows:

[0085] First, the captured data packets are preprocessed, including checking and verifying the integrity of the data packets.

[0086] Use the libnDPI library to perform in-depth analysis of data packets and extract key features, including protocol type, port number, load characteristics, etc.

[0087] Based on the extracted features, the libnDPI library identifies the protocol to which the packet belongs, such as HTTP, FTP, SMTP, etc.

[0088] For the identified application layer protocol, the libnDPI library will further parse the application layer content of the data packet to extract more detailed information.

[0089] The parsed data packets are then matched with the rules in the classification database for subsequent processing. Based on the matching results, DPId distributes the data packets to different processing threads for parallel processing. This can fully utilize the performance advantages of multi-core processors and improve data processing efficiency. After processing, DPId outputs the results to the user interface or stores them in log files for subsequent analysis.

[0090] Step 5: During the packet processing, DPId also needs to continuously monitor and process various events. These events may come from sockets, signals, or timers. DPId will perform corresponding processing logic according to the event type to ensure the stable operation of the application. For example, when a signal is received, DPId may perform some cleanup operations or reload configuration files.

[0091] Step 6: To facilitate subsequent troubleshooting and performance analysis, DPId also provides a logging function. It uses a dedicated logging function to record the application's log information. This log information includes various states, error information, and debugging information during program runtime. In addition, DPId also supports setting log levels and formats to meet the needs of different users. At the same time, it will also output log information to different output sources such as files or consoles for users to view.

[0092] Step 7: After processing the data packet and generating the corresponding processing results, DPId needs to send these results to the remote end. It will select the appropriate sending method according to the type and status of the remote descriptor. During the sending process, DPId will also check the usage of the main buffer and the additional write buffer to ensure that the data can be sent correctly. If the sending fails, DPId will handle the error accordingly and output the corresponding log information according to different error conditions. If the sending is successful, DPId will check whether all data has been sent and return the corresponding results to the caller. In addition, if the blocking mode needs to be set, DPId will also set the file descriptor of the remote connection to the blocking mode to send the data. After the sending is completed, it will be reset to non-blocking mode to continue to receive new data requests. At the same time, in order to ensure that the data can be sent to the target end correctly, DPId will also process the association between the epoll file descriptor and the remote descriptor and perform necessary flag operations. Finally, in order to meet the needs of remote descriptors in different scenarios, DPId also provides the function of obtaining available remote descriptors and performs corresponding optimization processing.

[0093] Through the above seven steps, DPId successfully realizes efficient and accurate network traffic processing in the computing power network. And DPId provides users with in-depth insights into network behavior and powerful traffic management capabilities by capturing, parsing, classifying and processing network traffic. At the same time, through event processing and logging functions, users can monitor and troubleshoot network status in real time to ensure the stable operation of the network. The optimization of the data sending function ensures the rapid transmission and accurate arrival of data. In short, the DPId of the present invention, with its excellent performance and flexible configuration options, meets the needs of different users for network traffic processing and provides strong support for the development of computing power networks.

[0094] Using DPId technology to analyze the traffic of the computing network can achieve the following effects: Network performance optimization: By analyzing the computing network traffic information, we can understand the usage of various protocols and applications in the network, find computing network bottlenecks and performance problems, and then optimize them in a targeted manner. For example, we can improve network transmission efficiency and reduce latency by increasing bandwidth and priority queuing. Bill management: Using DPId technology can accurately collect computing network traffic information, which is convenient for bill management and cost control. For example, we can charge according to different users and computing applications to achieve refined bill management to achieve the best cost-effectiveness. Network monitoring: By monitoring the traffic of the computing network in real time, we can promptly detect abnormal situations, such as network congestion, DDoS attacks, etc., so that we can respond and solve problems quickly. QoS guarantee: DPId can classify computing network traffic and allocate different bandwidths and priorities to it according to different applications, users, and service requirements to ensure network quality and improve user experience. Decision support: By analyzing and counting the traffic of the computing network through DPId technology, we can provide data support and visual charts to assist management decisions. For example, you can analyze application usage and usage trends to facilitate resource planning and adjustments.

[0095] Example 1

[0096] Assume that a computing power network platform uses the computing resources of each node of its own computing power to mainly provide users with the following computing services: data processing, machine learning training, and large-scale simulation. Then in this computing power network platform, the present invention (DPId) can be used to analyze the user's task type and then determine the billing basis. The analysis steps of using the present invention (DPId) in this computing power network platform are as follows:

[0097] Packet parsing: DPId will parse the user's network traffic and extract key information from the packet, such as source IP address, destination IP address, port number, protocol type, etc.

[0098] Protocol Identification: By analyzing the protocol header information in the data packet, DPId can identify the type of protocol being used, such as HTTP, FTP, SSH, etc. Because different tasks usually use specific protocols, this can determine the user's task type.

[0099] Application layer analysis: DPId can further analyze the application layer protocol, such as the URL of the HTTP request, the domain name of the DNS query, etc. With this information, DPId can more accurately determine the type of task the user is performing.

[0100] Traffic analysis: DPId will collect statistics on each user's traffic, including total traffic, upload traffic, and download traffic. These statistics can be used to calculate fees.

[0101] Example 2

[0102] In the computing network platform, the DPId technology of the present invention can be used to check when more users are running machine learning training tasks or data processing tasks. During such peak periods, the platform operators can dynamically adjust network resources by providing more bandwidth for such tasks to ensure service quality. During non-peak periods, the platform operators can timely reduce the allocation of these resources to avoid resource waste.

[0103] Specifically, the DPId of the present invention can be analyzed from the following aspects to dynamically adjust network resources:

[0104] Task type identification: DPId can be used to parse network traffic and identify protocols to determine the type of task the user is performing, thereby distinguishing traffic of different task types and allocating appropriate resources to each task type.

[0105] Traffic analysis: DPId can count and analyze user traffic, including total traffic, upload traffic, and download traffic, etc. And through real-time monitoring and analysis of traffic, traffic trends and peak information of different task types can be obtained, so as to determine when more users are performing a certain task type.

[0106] Bandwidth requirement assessment: Based on the task type and traffic analysis results, the bandwidth required for the task type can be assessed. For example, machine learning training may require higher bandwidth to transmit large amounts of data, while data processing tasks may focus more on computing resources and less on bandwidth.

[0107] Resource allocation strategy: Based on task type identification and bandwidth demand assessment, operators can dynamically adjust network resource allocation according to real-time traffic conditions and task type priorities. During peak hours, more bandwidth resources can be provided for machine learning training tasks or data processing tasks to ensure service quality and response speed. During non-peak hours, the allocation of these resources can be reduced in a timely manner to avoid resource waste.

[0108] Based on the above identification, analysis, evaluation and generated strategies, computing network providers and computing network administrators can dynamically adjust the allocation of network resources based on factors such as task type, traffic trend, resource utilization and user needs. Through real-time monitoring and analysis, the computing network platform can obtain task type and priority, traffic trend and peak value, and resource utilization, so as to optimize service quality, improve resource utilization and meet the needs of computing users by flexibly configuring bandwidth and computing resources.

[0109]

Example 3

[0110] In the computing power network platform, the use of the DPId of the present invention can also optimize the computing power network cost, thereby providing a more efficient use plan for computing power resources. The specific method is as follows:

[0111] Traffic identification and classification: The present invention (DPId) can perform deep packet inspection on computing network traffic, thereby identifying and classifying different types of traffic. For example, protocols such as HTTP, HTTPS, ICMP, as well as common applications and services can be identified. By identifying and classifying traffic, the resource requirements and usage of different types of computing tasks can be understood, thereby providing a basis for cost control and resource optimization of the entire computing network.

[0112] Load balancing analysis: Based on the identification and classification of traffic, the present invention (DPId) can distribute different types of computing task traffic to appropriate nodes to achieve load balancing. This can avoid excessive load on certain computing nodes, thereby improving overall resource utilization efficiency. For example, the load of the computing node can be inferred based on the traffic and number of connections, thereby achieving load balancing.

[0113] Cost optimization: By analyzing traffic and optimizing load balancing, the present invention (DPId) can reduce the operating costs of the computing network platform. For example, by reasonably allocating resources and avoiding resource waste, additional hardware investment and energy consumption can be reduced. In other words, in terms of cost control, the present invention can provide traffic analysis and monitoring of node load conditions, thereby providing a basis for cost optimization.

[0114] Resource optimization: Through traffic analysis and load balancing optimization, the present invention (DPId) can achieve efficient use of resources. For example, tasks can be assigned to appropriate nodes according to task types and requirements to avoid resource waste and inefficient use. In other words, in terms of resource optimization, the present invention (DPId) can provide traffic analysis and node load monitoring, thereby providing a basis for resource optimization.

[0115] The present invention also provides a system for performing traffic analysis in a computing network using DPId, comprising:

[0116] Capture module, used to capture data packets of network interface through DPId;

[0117] The parsing module is used to parse the data packet and extract features using the libnDPI library;

[0118] A matching module is used to match the features with the rules in the classification database and distribute the data packets to different processing threads for parallel processing;

[0119] The storage module is used to store the results in log files after the processing is completed;

[0120] The libnDPI library is used to parse the data packet and extract the following features:

[0121] Verify the integrity of the data packet;

[0122] Use libnDPI library to analyze data packets in depth and extract key features, including protocol type, port number and load characteristics;

[0123] Based on key features, the libnDPI library is used to identify the application layer protocol to which the data packet belongs;

[0124] Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

[0125] The present invention also provides a device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the above method.

[0126] The present invention also provides a storage medium storing a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the above method.

[0127] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for traffic analysis in a computing network using DPId. It is characterized in that include: Capture packets of network interfaces via DPId; Use libnDPI library to parse the data packet and extract features; Matching the features with rules in a classification database and distributing the data packets to different processing threads for parallel processing; After processing is completed, the results are stored in a log file; The data packet is parsed using the libnDPI library, and features are extracted including: Verifying the integrity of the data packet; Use the libnDPI library to perform in-depth analysis on the data packet and extract key features, wherein the key features include protocol type, port number and load characteristics; Based on the key features, using the libnDPI library to identify the application layer protocol to which the data packet belongs; Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

2. According to the method for performing traffic analysis in a computing network using DPId according to claim 1, It is characterized in that The write buffer management structure defined by the DPId includes a buffer buf of type nDPIsrvd_buffer, a field written indicating the size of written data, a pointer buffers pointing to a write buffer array, and two integer fields, wherein the two integer fields include the total number of buffers total_buffers and the number of buffers currently in use used_buffers.

3. According to claim 2, the method for performing traffic analysis in a computing network using DPId, It is characterized in that The remote descriptor structure defined by the DPId includes a socket type socket_type, a file descriptor fd, and specific fields according to different socket types.

4. According to claim 3, the method for using DPId to perform traffic analysis in a computing network, It is characterized in that The DPId loads configuration information from a configuration file and command line parameters. The configuration file includes the socket type, remote file descriptor, maximum buffer size, UNIX domain socket path, TCP / IP address, user and group, maximum number of remote descriptors, and maximum number of write buffers. The command line parameters include the path of the process ID file and whether to enable additional functions.

5. According to claim 4, the method for using DPId to perform traffic analysis in a computing network, It is characterized in that Encapsulating the configuration information, the DPId creates and initializes a socket, the steps comprising: According to the socket type specified in the configuration information structure, create the corresponding socket; Use the bind() system call to bind the socket to the configured local address; Call the listen() system call to enter the listening state and wait for the client's connection request. When a connection request is received, use the accept() system call to accept the connection and create a new socket for communicating with the client. Initialize the write buffer using the write buffer structure, allocate memory for the buffers array, and set the total_buffers and used_buffers fields; When the socket has data to be sent, an available write buffer is obtained from the write buffer structure, and after the data is written into the buffer, the written field is updated to record the amount of data written; Use the send() or write() system call to send the data in the buffer. After the transmission is completed, the state of the buffer is updated as needed and it may be returned to the free list. When the write buffer is no longer needed, its memory space is released back to the system according to a memory release policy, or retained in a free list for subsequent use; When the system is shut down or the socket is no longer in use, the socket is closed and all allocated write buffer memory is released.

6. A traffic analysis system using DPId in a computing network, It is characterized in that include: Capture module, used to capture data packets of network interface through DPId; A parsing module, used to parse the data packet using the libnDPI library and extract features; A matching module, used for matching the features with the rules in the classification database and distributing the data packets to different processing threads for parallel processing; The storage module is used to store the results in log files after the processing is completed; The data packet is parsed using the libnDPI library, and features are extracted including: Verifying the integrity of the data packet; Use the libnDPI library to perform in-depth analysis on the data packet and extract key features, wherein the key features include protocol type, port number and load characteristics; Based on the key features, using the libnDPI library to identify the application layer protocol to which the data packet belongs; Based on the application layer protocol, the libnDPI library parses the application layer content of the data packet.

7. A device, It is characterized in that The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method according to any one of claims 1 to 5.

8. A storage medium, It is characterized in that It stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the method described in any one of claims 1 to 5.