Network acquisition processing method and system based on data flow analysis
By preprocessing and anomaly analyzing the network data stream, and combining Hurst analysis and K-means clustering algorithm to construct an anomaly verification set, the problem of low processing efficiency and low accuracy of the K-means clustering algorithm in the network data stream is solved, and the Efficient anomaly detection and real-time alarm functions improve the ability to respond to network security threats.
Patent Information
- Application Number
- CN202411005864.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the K-means clustering algorithm has problems of low processing efficiency and low accuracy in abnormal analysis of network data flows, especially when massive data processing and initial point selection have a great impact.
Adopt a network collection and processing method based on data flow analysis to obtain and preprocess network data flows, divide the data time series, use the Hurst analysis algorithm and K-means clustering algorithm to build a normal data model, generate an abnormal verification set, and verify the abnormal sequence , improve the accuracy and efficiency of anomaly detection.
It realizes real-time anomaly analysis of network data flows, improves the efficiency and accuracy of anomaly detection, and provides real-time network data processing and alarm functions to help network administrators discover and respond to network security threats in a timely manner.
Smart Images

Figure CN118784497A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network data analysis, and in particular relates to a network acquisition processing method and system based on data flow analysis. Background Art
[0002] Network data flow refers to the process of data transmission between various nodes (such as computers, servers, routers, etc.) in a computer network. This data transmission can be real-time or according to a certain schedule.
[0003] With the expansion of the Internet and the increasing richness of network applications, there are more and more methods of network attacks. Network attack software can be easily downloaded and used on the Internet. Attackers do not need to have strong professional knowledge to launch attacks. The Internet is essentially open, and the security hazards it causes are constantly emerging. Network security issues have become complicated. Various attacks, viruses, Trojans, etc. in the network seriously threaten users' normal use of computers and networks, and seriously threaten information and network security. Therefore, it is particularly important to collect and analyze network data in real time.
[0004] In the prior art, the K-means clustering algorithm is used to perform cluster analysis on network data streams. The distance between each data point and the center of its cluster is calculated as an anomaly score. The greater the distance, the greater the possibility of anomaly, so as to achieve anomaly analysis of network data streams. However, the K-means clustering algorithm has the following disadvantages in the abnormal process: 1. The amount of network data flow is massive. The K-means clustering algorithm processes all network data flows, and the processing efficiency of abnormal analysis is low; 2. K-means clustering is easily affected by the selection of initial points when performing cluster analysis, and has poor resolution in classified data, resulting in low accuracy of anomaly analysis. Summary of the invention
[0005] The purpose of the present invention is to provide a network acquisition processing method and system based on data flow analysis, so as to solve the problems of low analysis and processing efficiency and low accuracy in existing analysis methods.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a network acquisition and processing method based on data flow analysis, the method comprising: Acquire network data streams, preprocess the network data streams, and obtain several groups of data time series, each group of data time series includes several network data; Performing anomaly analysis on each group of data time series to obtain an abnormal sequence, wherein the abnormal sequence is a data time series with an abnormal mark; Generate anomaly verification sets based on anomaly sequences and pre-built normal data models; Verify the abnormal sequence based on the abnormal verification set to obtain the actual state of each network data in the abnormal sequence, where the actual state includes: abnormal or normal; When the actual state of any network data in the abnormal sequence is abnormal, abnormal warning information is generated.
[0007] Preferably, an abnormal analysis is performed on each group of data time series to obtain an abnormal sequence, including: Divide each group of data time series into multiple subsequences, analyze and process each subsequence based on a preset analysis algorithm, and obtain multiple analysis values of each group of data time series; Based on multiple analysis values of each set of data time series, calculate the abnormal evaluation value of each set of data time series; Based on the preset evaluation value, the data time series corresponding to the abnormal evaluation value exceeding the preset evaluation value is marked as abnormal, or the data time series corresponding to the abnormal evaluation value not exceeding the preset evaluation value is marked as normal.
[0008] Preferably, the preset analysis algorithm is a Hurst analysis algorithm, and the multiple analysis values of each group of data time series are Hurst values of each group of data time series.
[0009] Preferably, based on multiple analysis values of each set of data time series, calculating the abnormal evaluation value of each set of data time series includes: According to multiple analysis values of each set of data time series, the variance value of each set of data time series is determined; Based on the variance value of each group of data time series, the variance change rate of each group of data time series is determined, and the variance change rate of each group of data time series is used as the abnormal evaluation value of each group of data time series.
[0010] Preferably, the method further comprises: constructing a normal data model, comprising: Acquire network historical sample data, pre-process the network historical sample data, and obtain a sample data set, wherein the sample data set includes a plurality of network historical sample data; The sample data set is clustered based on a preset clustering algorithm to obtain several data clusters, and a normal data model is constructed with the several data clusters.
[0011] Preferably, the preset clustering algorithm is a K-means clustering algorithm. Clustering is performed on the sample data set based on the preset clustering algorithm to obtain a number of data clusters, including: Building a cluster set based on the sample data set, the cluster set includes at least one sub-cluster, calculating the sum of squared errors of at least one sub-cluster, and selecting a sub-cluster corresponding to the maximum sum of squared errors from the cluster set as the cluster to be clustered; Find the two center points of the cluster to be clustered, where the two center points are the two data points with the largest distance between them; one data point corresponds to one network history sample data; Based on the K-means clustering algorithm, the clusters to be clustered are locally clustered with two center points as cluster centers to obtain two new clusters, which are then added to the cluster set as new sub-clusters. Repeat the calculation of the sum of squared errors of at least one sub-cluster, select a sub-cluster corresponding to the maximum sum of squared errors from the cluster set as the cluster to be clustered, find two center points of the cluster to be clustered, the two center points are the two data points with the largest distance between them, cluster the cluster to be clustered based on the K-means clustering algorithm with the two center points as clustering centers, obtain two new clusters, and add the two new clusters to the cluster set as new sub-clusters; until the number of sub-clusters in the cluster set reaches a preset number; Based on the K-means clustering algorithm, a preset number of center points are used as the initial centers to perform global clustering on the sample data set to obtain several data clusters and the cluster center corresponding to each data cluster.
[0012] Preferably, based on the abnormal sequence and the pre-built normal data model, an abnormal verification set is generated, including: For any network data in the abnormal sequence, calculate the first distance between the network data and the cluster center of each data cluster to obtain a first distance set; The minimum first distance is selected from the first distance set, and the data cluster corresponding to the minimum first distance is used as the abnormality verification set of the network data.
[0013] Preferably, the abnormal sequence is verified based on the abnormal verification set to obtain the actual status of each network data in the abnormal sequence, including: For any network data in the abnormal sequence, calculate the second distance between the network data and each network historical sample data in the abnormal verification set corresponding to the network data to obtain a second distance set; Calculate a first singular value of the network data based on a second distance set; Calculate the second singular value of each network historical sample data in the anomaly verification set; Calculate the confidence of the network data according to the first singular value of the network data and the second singular value of each network historical sample data in the anomaly verification set; When the confidence of the network data is greater than or equal to the preset confidence, the network data is marked as normal; when the confidence of the network data is less than the preset confidence, the network data is marked as abnormal.
[0014] Preferably, the first distance and the second distance are both calculated using a cosine similarity distance function.
[0015] In a second aspect, the present invention provides a network acquisition and processing system based on data flow analysis, the system is used to implement the above-mentioned network acquisition and processing method based on data flow analysis, the system comprising: A data acquisition module is used to acquire network data streams, pre-process the network data streams, and obtain several groups of data time series, each group of data time series includes several network data; An abnormality analysis module is used to perform abnormality analysis on each group of data time series to obtain an abnormal sequence, where the abnormal sequence is a data time series with abnormal marks; A set building module is used to generate anomaly verification sets based on anomaly sequences and pre-built normal data models; An abnormality verification module, used to verify the abnormal sequence based on the abnormality verification set, and obtain the actual state of each network data in the abnormal sequence, wherein the actual state includes abnormality or normality; The abnormal warning module is used to generate abnormal warning information when the actual state of any network data in the abnormal sequence is abnormal.
[0016] Beneficial effects: 1. The present invention collects network data streams in real time, performs abnormal analysis on each group of data time series, and obtains abnormal sequences. At this time, the abnormal sequences contain abnormal data and normal data. Compared with the network data stream, the abnormal sequence has a smaller data volume, which is conducive to the subsequent analysis of each data in the abnormal sequence to improve the efficiency of data analysis; 2. The present invention can improve the accuracy of abnormality analysis by first analyzing the network data flow and then verifying the abnormality; 3. The present invention pre-builds a normal data model and uses two abnormal analyses as abnormality detection rules to monitor and analyze network data. It can provide real-time network data processing and alarm functions, provide timely decision support for network administrators, help discover and respond to network security threats, and maintain the safe and stable operation of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a flow chart of a network acquisition and processing method based on data flow analysis provided by an embodiment of the present invention; Figure 2 It is a block diagram of a network acquisition and processing system based on data flow analysis provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is 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. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0019] Embodiment 1 Figure 1 is a flow chart of a network acquisition and processing method based on data flow analysis provided by an embodiment of the present invention, such as Figure 1 As shown, this embodiment provides a network acquisition processing method based on data flow analysis, the method comprising: Step S10: Acquire a network data stream, pre-process the network data stream, and obtain several groups of data time series, each group of data time series includes several network data.
[0020] In this embodiment, preprocessing includes data cleaning and standardization to eliminate the influence of noise and dimension; then the network data flow is divided according to the timestamp, or divided according to the category of the data flow, and several groups of data time series can be formed, each group of data time series has multiple network data.
[0021] Step S20: performing anomaly analysis on each group of data time series to obtain an abnormal sequence, wherein the abnormal sequence is a data time series with an abnormal mark; Specifically, anomaly analysis is performed on each group of data time series to obtain abnormal series, including: Step S201: Divide each group of data time series into multiple subsequences, analyze and process each subsequence based on a preset analysis algorithm, and obtain multiple analysis values of each group of data time series.
[0022] In this embodiment, the preset analysis algorithm is a Hurst analysis algorithm. The Hurst analysis algorithm is a method for detecting long-range dependence in time series data. The core of the Hurst analysis algorithm is to calculate the Hurst index. The Hurst index can be determined by using a rescaled range (R / S) analysis method and a wavelet analysis method. The Hurst analysis algorithm can be used to detect long-term dependence or self-similarity in time series data. According to the long-term dependence or self-similarity, it can be quickly determined whether the data time series is abnormal. Then, the multiple analysis values of each group of data time series are the Hurst values of each group of data time series, that is, the Hurst index.
[0023] Step S202: Calculate the abnormal evaluation value of each set of data time series based on multiple analysis values of each set of data time series.
[0024] In this embodiment, during the anomaly analysis of the network data flow by the Hurst analysis algorithm, the algorithm will be affected by the fluctuation of the network environment, which will reduce the accuracy of the anomaly judgment of the Hurst analysis algorithm; therefore, based on the multiple analysis values of each group of data time series, the anomaly evaluation value of each group of data time series is calculated, including: determining the variance value of each group of data time series according to the multiple analysis values of each group of data time series; determining the variance change rate of each group of data time series based on the variance value of each group of data time series, and using the variance change rate of each group of data time series as the anomaly evaluation value of each group of data time series.
[0025] Among them, the calculation expression of the variance change rate of each set of data time series is: ; In the formula, For the i The rate of change of variance of the group data time series, For the i +1 group of data time series variance value, For the i The variance value of the group data time series, where i =1,2,3,…,I-1, where I is the total number of groups in the data time series.
[0026] Step S203: Based on the preset evaluation value, the data time series corresponding to the abnormal evaluation value exceeding the preset evaluation value is marked as abnormal, or the data time series corresponding to the abnormal evaluation value not exceeding the preset evaluation value is marked as normal.
[0027] In this embodiment, the preset evaluation value is a variance change rate reference value. The variance change rate of each group of data time series is used as a basis for judging whether the group of data time series is abnormal, which can reduce the impact of network fluctuations and improve analysis accuracy. The variance change rate of each group of data time series reflects the overall change of a group of data time series. It can be judged that a group of data time series is abnormal, but it is impossible to accurately judge which data in the data time series is abnormal. Therefore, it is necessary to perform further analysis on the abnormal sequence to judge which data in the data time series is abnormal.
[0028] The present invention performs anomaly analysis on each group of data time series to obtain an abnormal sequence. At this time, the abnormal sequence contains abnormal data and normal data. Compared with the network data stream, the abnormal sequence has a smaller data volume, which is conducive to the subsequent analysis of each data in the abnormal sequence to improve the efficiency of data analysis.
[0029] Step S30: Generate an abnormality verification set based on the abnormal sequence and the pre-built normal data model.
[0030] In this embodiment, when performing a second abnormality analysis on the abnormal sequence, it is necessary to establish an accurate normal data set, use the normal data set as a reference, and perform a comparative analysis with the network data in the abnormal sequence. When the deviation between the network data in the abnormal sequence and the normal data set is too large, it indicates that the network data is abnormal.
[0031] Specifically, the method further includes: constructing a normal data model, including: Step a10: obtaining network history sample data, preprocessing the network history sample data, and obtaining a sample data set, wherein the sample data set includes a plurality of network history sample data; wherein the preprocessing of the network history sample data includes: data cleaning and standardization processing; Step a20: clustering the sample data set based on a preset clustering algorithm to obtain a number of data clusters, and constructing a normal data model with the data clusters.
[0032] In this embodiment, the preset clustering algorithm is the K-means clustering algorithm. The K-means clustering algorithm is a classic machine learning algorithm used to divide a set of data points into K clusters, where each cluster is characterized by the mean of the data points within the cluster. K-means clustering aims to minimize the within-cluster sum of square errors, that is, to minimize the sum of the squares of the distances from each data point to its cluster center. The K-means clustering algorithm is overly dependent on initial conditions, such as the determination of the number of clusters K, the selection of the initial cluster centers, and changes in the order of data input, which will affect the clustering results.
[0033] In this embodiment, clustering is performed on the sample data set based on a preset clustering algorithm to obtain several data clusters, including: Step a201: construct a cluster set based on the sample data set, the cluster set includes at least one sub-cluster, calculate the sum of squared errors of at least one sub-cluster, and select a sub-cluster corresponding to the maximum sum of squared errors from the cluster set as the cluster to be clustered; Step a202: Find two center points of the clusters to be clustered, where the two center points are the two data points with the largest distance between them; wherein one data point corresponds to one network history sample data.
[0034] Select any point in the cluster to be clustered as the initial point, find the point farthest from the point, use the farthest point as the new initial point, and continue to find the next point until two points with maximum distances in the cluster to be clustered are found, and use the two points with maximum distances as the center points; therefore, dividing the cluster to be clustered into two parts along the longest distribution direction can obtain a higher convergence speed, and at the same time, the sample points after division are closer to the center point, which can produce higher clustering quality.
[0035] Step a203: Based on the K-means clustering algorithm, the clusters to be clustered are locally clustered with two center points as cluster centers to obtain two new clusters, and the two new clusters are added to the cluster set as new sub-clusters; Step a204: Repeat steps a201 to a203 until the total number of subclusters reaches a preset number after a new subcluster is added to the cluster. The preset number is a set value based on actual conditions, and the preset number can be the K value in the K-means clustering algorithm.
[0036] Step a205: Based on the K-means clustering algorithm, a preset number of center points are used as initial centers to perform global clustering on the sample data set to obtain a number of data clusters and a cluster center corresponding to each data cluster.
[0037] In this embodiment, through steps a201 to a204, a preset number of initial centers can be found, and the initial centers are used as the initial clustering centers of the K-means clustering algorithm, which can avoid randomly generating centroids and obtaining local optimization results, thereby improving the accuracy of normal data model construction.
[0038] As a further optimization of this embodiment, an abnormality verification set is generated based on the abnormal sequence and the pre-built normal data model, including: Step S301: for any network data in the abnormal sequence, calculate the first distance between the network data and the cluster center of each data cluster to obtain a first distance set; wherein the first distance is calculated by a cosine similarity function; Step S302: Filter out the minimum first distance from the first distance set, and use the data cluster corresponding to the minimum first distance as the anomaly verification set of the network data.
[0039] In this embodiment, for each network data in the abnormal sequence, the first distance between each network data and the cluster center of each data cluster is calculated, and the data cluster corresponding to the smallest first distance is selected. Since the first distance between the network data and the data cluster is small, it means that the similarity between the network data and the data in the data cluster is high. All normal data in the data cluster is used as the abnormal verification set of the network data, and the network data is verified with the abnormal verification set to determine whether the network data is abnormal.
[0040] Step S40: verifying the abnormal sequence based on the abnormal verification set to obtain the actual status of each network data in the abnormal sequence, where the actual status includes: abnormal or normal.
[0041] Specifically, the abnormal sequence is verified based on the abnormal verification set to obtain the actual status of each network data in the abnormal sequence, including: Step S401: For any network data in the abnormal sequence, calculate the second distance between the network data and each network historical sample data in the abnormal verification set corresponding to the network data to obtain a second distance set; wherein the second distance is calculated by a cosine similarity function.
[0042] Step S401: Calculate a first singular value of the network data based on a second distance set.
[0043] Specifically, for each network data, the second distance between the network data and all network historical sample data in the anomaly verification set is calculated, the second distances are sorted from large to small to obtain a first distance sequence, and the smallest m second distances in the first distance sequence are taken to sum up, and the first singular value of the network data can be obtained.
[0044] Then the calculation expression of the first singular value is: ; In the formula, is the first singular value of the ith network data, is the mth second distance from the end in the first distance sequence corresponding to the i network data, where M is the total number of selected second distances.
[0045] Step S402: Calculate the second singular value of each network historical sample data in the anomaly verification set.
[0046] Specifically, a network history sample data is selected from the anomaly verification set as the selected data, and the remaining unselected data is calculated using the cosine similarity function to calculate the third distance between the selected data and all the unselected data, and the third distances are sorted from large to small to obtain a second distance sequence, and the smallest m third distances in the second distance sequence are taken to sum up to obtain the second singular value of the network history sample data; then the above method is used to calculate each network history sample data to obtain the second singular value of all network history sample data.
[0047] Then, the calculation expression of the second singular value is: ; In the formula, is the second singular value of the jth network historical sample data, The nth last third distance in the second distance sequence corresponding to j network historical sample data is obtained, and N is the total number of selected third distances.
[0048] Step S403: Calculate the confidence of the network data according to the first singular value of the network data and the second singular value of each network historical sample data in the anomaly verification set.
[0049] In this embodiment, the calculation expression of the confidence of the network data is: ; In the formula, is the confidence of the i-th network data, The number of the second singular value of the network history sample data in the anomaly verification set that is greater than the first singular value of the i-th network data is q, J is the total number of network history sample data in the anomaly verification set, It is used to characterize the similarity between the ith network data and the abnormal verification set. When is larger, the degree of similarity between the ith network data and the abnormal verification set is higher, and the possibility that the ith network data is abnormal is lower.
[0050] Step S404: when the confidence of the network data is greater than or equal to the preset confidence, the network data is marked as normal; when the confidence of the network data is less than the preset confidence, the network data is marked as abnormal.
[0051] In this embodiment, the preset confidence can be flexibly set according to actual needs, and the method of step S401 to step S404 can reduce time complexity, improve calculation efficiency, and improve the accuracy of abnormal and normal judgment of network data.
[0052] Step S50: when the actual state of any network data in the abnormal sequence is abnormal, abnormal warning information is generated.
[0053] In this embodiment, the generated abnormal warning information is sent to the terminal device of the manager to inform the manager that the network data is abnormal.
[0054] The present invention collects network data streams in real time, performs anomaly analysis on each group of data time series, and obtains anomaly sequences. At this time, the anomaly sequences contain abnormal data and normal data. Compared with the network data stream, the data volume of the anomaly sequence is smaller, which is conducive to the subsequent analysis of each data in the anomaly sequence to improve the efficiency of data analysis; by first performing anomaly analysis on the network data stream and then performing anomaly verification analysis, the accuracy of the anomaly analysis can also be improved; secondly, by pre-constructing a normal data model and then using two anomaly analyses as anomaly detection rules, the monitoring and analysis of network data can be realized, and real-time network data processing and alarm functions can be provided, providing timely decision support for network administrators, helping to discover and respond to network security threats, and maintaining the safe and stable operation of the network.
[0055] Embodiment 2 Figure 2 is a block diagram of a network acquisition and processing system based on data flow analysis provided by an embodiment of the present invention, such as Figure 2 As shown, this embodiment provides a network acquisition and processing system based on data flow analysis, the system is used to implement the network acquisition and processing method based on data flow analysis of embodiment 1, and the system includes: A data acquisition module is used to acquire network data streams, pre-process the network data streams, and obtain several groups of data time series, each group of data time series includes several network data; An abnormality analysis module is used to perform abnormality analysis on each group of data time series to obtain an abnormal sequence, where the abnormal sequence is a data time series with abnormal marks; A set building module is used to generate anomaly verification sets based on anomaly sequences and pre-built normal data models; An abnormality verification module, used to verify the abnormal sequence based on the abnormality verification set, and obtain the actual state of each network data in the abnormal sequence, wherein the actual state includes abnormality or normality; The abnormal warning module is used to generate abnormal warning information when the actual state of any network data in the abnormal sequence is abnormal.
[0056] The present invention collects network data streams in real time, performs anomaly analysis on each group of data time series, and obtains anomaly sequences. At this time, the anomaly sequences contain abnormal data and normal data. Compared with the network data stream, the data volume of the anomaly sequence is smaller, which is conducive to the subsequent analysis of each data in the anomaly sequence to improve the efficiency of data analysis; by first performing anomaly analysis on the network data stream and then performing anomaly verification analysis, the accuracy of the anomaly analysis can also be improved; secondly, by pre-constructing a normal data model and then using two anomaly analyses as anomaly detection rules, the monitoring and analysis of network data can be realized, and real-time network data processing and alarm functions can be provided, providing timely decision support for network administrators, helping to discover and respond to network security threats, and maintaining the safe and stable operation of the network.
[0057] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0058] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0059] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A network acquisition and processing method based on data flow analysis, It is characterized in that The method comprises: Acquire network data streams, preprocess the network data streams, and obtain several groups of data time series, each group of data time series includes several network data; Performing anomaly analysis on each group of data time series to obtain an abnormal sequence, wherein the abnormal sequence is a data time series with an abnormal mark; Generate anomaly verification sets based on anomaly sequences and pre-built normal data models; Verify the abnormal sequence based on the abnormal verification set to obtain the actual state of each network data in the abnormal sequence, where the actual state includes abnormality or normality; When the actual state of any network data in the abnormal sequence is abnormal, abnormal warning information is generated.
2. The network acquisition and processing method based on data flow analysis according to claim 1, It is characterized in that Perform anomaly analysis on each group of data time series to obtain abnormal series, including: Divide each group of data time series into multiple subsequences, analyze and process each subsequence based on a preset analysis algorithm, and obtain multiple analysis values of each group of data time series; Based on multiple analysis values of each set of data time series, calculate the abnormal evaluation value of each set of data time series; Based on the preset evaluation value, the data time series corresponding to the abnormal evaluation value exceeding the preset evaluation value is marked as abnormal, or the data time series corresponding to the abnormal evaluation value not exceeding the preset evaluation value is marked as normal.
3. The network acquisition and processing method based on data flow analysis according to claim 2, It is characterized in that The preset analysis algorithm is a Hurst analysis algorithm, and the multiple analysis values of each group of data time series are Hurst values of each group of data time series.
4. The network acquisition and processing method based on data flow analysis according to claim 3, It is characterized in that Based on multiple analysis values of each set of data time series, calculate the abnormal evaluation value of each set of data time series, including: According to multiple analysis values of each set of data time series, the variance value of each set of data time series is determined; Based on the variance value of each group of data time series, the variance change rate of each group of data time series is determined, and the variance change rate of each group of data time series is used as the abnormal evaluation value of each group of data time series.
5. The network acquisition and processing method based on data flow analysis according to claim 1, It is characterized in that The method further comprises: constructing a normal data model, comprising: Acquire network historical sample data, pre-process the network historical sample data, and obtain a sample data set, wherein the sample data set includes a plurality of network historical sample data; The sample data set is clustered based on a preset clustering algorithm to obtain several data clusters, and a normal data model is constructed with the several data clusters.
6. The network acquisition and processing method based on data flow analysis according to claim 5, It is characterized in that The preset clustering algorithm is a K-means clustering algorithm. Based on the preset clustering algorithm, the sample data set is clustered to obtain several data clusters, including: Building a cluster set based on the sample data set, the cluster set includes at least one sub-cluster, calculating the sum of squared errors of at least one sub-cluster, and selecting a sub-cluster corresponding to the maximum sum of squared errors from the cluster set as the cluster to be clustered; Find the two center points of the cluster to be clustered, where the two center points are the two data points with the largest distance between them; one data point corresponds to one network history sample data; Based on the K-means clustering algorithm, the clusters to be clustered are locally clustered with two center points as cluster centers to obtain two new clusters, which are then added to the cluster set as new sub-clusters. Repeat the calculation of the sum of squared errors of at least one sub-cluster, select a sub-cluster corresponding to the maximum sum of squared errors from the cluster set as the cluster to be clustered, find two center points of the cluster to be clustered, the two center points are the two data points with the largest distance between them, cluster the cluster to be clustered based on the K-means clustering algorithm with the two center points as clustering centers, obtain two new clusters, and add the two new clusters to the cluster set as new sub-clusters; until the number of sub-clusters in the cluster set reaches a preset number; Based on the K-means clustering algorithm, a preset number of center points are used as the initial centers to perform global clustering on the sample data set to obtain several data clusters and the cluster center corresponding to each data cluster.
7. The network acquisition and processing method based on data flow analysis according to claim 6, It is characterized in that Generate anomaly verification sets based on anomaly sequences and pre-built normal data models, including: For any network data in the abnormal sequence, calculate the first distance between the network data and the cluster center of each data cluster to obtain a first distance set; The minimum first distance is selected from the first distance set, and the data cluster corresponding to the minimum first distance is used as the abnormality verification set of the network data.
8. The network acquisition and processing method based on data flow analysis according to claim 7, It is characterized in that The abnormal sequence is verified based on the abnormal verification set to obtain the actual status of each network data in the abnormal sequence, including: For any network data in the abnormal sequence, calculate the second distance between the network data and each network historical sample data in the abnormal verification set corresponding to the network data to obtain a second distance set; Calculate a first singular value of the network data based on a second distance set; Calculate the second singular value of each network historical sample data in the anomaly verification set; Calculate the confidence of the network data according to the first singular value of the network data and the second singular value of each network historical sample data in the anomaly verification set; When the confidence of the network data is greater than or equal to the preset confidence, the network data is marked as normal; when the confidence of the network data is less than the preset confidence, the network data is marked as abnormal.
9. The network acquisition and processing method based on data flow analysis according to claim 8, It is characterized in that The first distance and the second distance are both calculated using a cosine similarity distance function.
10. A network acquisition and processing system based on data flow analysis, the system being used to implement the network acquisition and processing method based on data flow analysis according to any one of claims 1 to 9, It is characterized in that The system comprises: A data acquisition module is used to acquire network data streams, pre-process the network data streams, and obtain several groups of data time series, each group of data time series includes several network data; An abnormality analysis module is used to perform abnormality analysis on each group of data time series to obtain an abnormal sequence, where the abnormal sequence is a data time series with abnormal marks; A set building module is used to generate anomaly verification sets based on anomaly sequences and pre-built normal data models; An abnormality verification module, used to verify the abnormal sequence based on the abnormality verification set, and obtain the actual state of each network data in the abnormal sequence, wherein the actual state includes abnormality or normality; The abnormal warning module is used to generate abnormal warning information when the actual state of any network data in the abnormal sequence is abnormal.
Citation Information
Patent Citations
Network traffic abnormity judgment and device
CN104796301A
Method and device for detecting time sequence abnormity in wireless sensor network
CN114861729A
Computer network security intelligent analysis system and method based on big data
CN117896137A
Method and system for detecting a network anomaly in a network
US20060047807A1
