Network data analysis method and device, electronic equipment and storage medium
By collecting and analyzing network logs and basic data in business systems, and using integer programming models and naive Bayes algorithms to calculate the proportion of IPv6 address data, it solves the shortcomings of IPv6 traffic monitoring in existing technologies and realizes IPv6 distribution Accurate analysis of traffic and security event monitoring improves network stability and security.
Patent Information
- Application Number
- CN202311034056.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2024-10-18
AI Technical Summary
Existing IPv6 traffic monitoring and analysis methods lack effectiveness and cannot effectively support network security and business maintenance, especially in environments with time-sensitive and high network link requirements.
Adopting network data analysis methods, by collecting network log data and basic data in the business system, using Netflow technology to monitor traffic, combined with integer programming model and naive Bayes algorithm, calculate the proportion of IPv6 address data in the total data, and realize the analysis Accurate analysis and monitoring of IPv6 distribution and traffic.
It provides detailed analysis of IPv6 distribution and traffic, which can effectively monitor security events, improve the stability and security of network operations, and meet the needs of time-sensitive and high link requirements.
Smart Images

Figure CN118802437A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a network data analysis method, device, electronic device and storage medium. Background Art
[0002] At present, the monitoring and analysis of IPv6 mainly relies on the traditional network management system based on Simple Network Management Protocol (SNMP) and logs. By monitoring hosts and network devices, it can monitor data such as faults, changes, and traffic, as well as manage topology and resource usage.
[0003] However, this method collects less traffic information, has weak traffic analysis methods, and cannot provide effective support for network security and business maintenance. In addition, most of the networks that currently deploy Internet Protocol Version 6 (IPv6) are key and critical networks, which have high requirements for time sensitivity and network link level. Therefore, there is a lack of effective means for analyzing and monitoring the distribution of IPv6 and traffic. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a network data analysis method, device, electronic device and storage medium to solve the problem of lack of evaluation of traffic suppression from the user's perspective.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] On the one hand, an embodiment of the present application provides a network data analysis method, comprising: collecting data in a business system to obtain first data, wherein the first data includes network log data and basic data, wherein the network log data includes flow data collected by a network monitoring function (Netflow) and log data in a domain name system, and the basic data includes identified feature library data, Internet Protocol (IP) address library data, and Internet Content Provider (ICP) library data;
[0007] Input the first data into a preset integer programming model, wherein the integer programming model is used to process and plan the first data, obtain a processing result, and output second data;
[0008] The second data is classified using a naive Bayes algorithm to obtain a first classification result of the second data, where the first classification result is third data, and the third data includes a proportion of IPv6 address data in the second data.
[0009] On the other hand, an embodiment of the present application provides a network data analysis device, including: a collection module, used to collect data in a business system to obtain first data, wherein the first data includes network log data and basic data, wherein the network log data includes flow data collected by Netflow and log data in a domain name system, and the basic data includes identified feature library data, IP address library data, and ICP library data;
[0010] A training module, used for inputting the first data into a preset integer programming model, wherein the integer programming model is used for processing and planning the first data, obtaining a processing result, and outputting second data;
[0011] The analysis module is used to classify the second data using a naive Bayes algorithm to obtain a first classification result for the second data, wherein the first classification result is third data, and the third data includes a proportion of IPv6 address data in the second data.
[0012] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory electrically connected to the processor, the memory storing a computer program, and the processor being used to call and execute the computer program from the memory to implement the above-mentioned network data analysis method.
[0013] On the other hand, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program can be executed by a processor to implement the above-mentioned network data analysis method.
[0014] The technical solution of the embodiment of the present application is adopted to collect the first data in the business system, and the first data includes network log data and basic data, wherein the network log data is the flow data collected by Netflow and the log data in the DNS domain name system, and the Netflow technology can monitor the direction of data flow and monitor the flow, and the basic data includes the identified feature library data, IP address library data, and ICP library data. The first data including the log data and the basic data is input into a preset integer programming model, and the model can process and plan the first data to obtain more accurate second data, and the second data is analyzed based on the naive Bayes algorithm, and the proportion of the address data containing IPv6 in the above five types of data is calculated to obtain the third data, and the distribution information of IPv6 included in the first data in the collection system is displayed through the third data, and the security incident is monitored according to the distribution status, which can solve the problem of lack of effective means for analyzing and monitoring the distribution and flow of IPv6. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate one or more embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 This is a schematic diagram of an application scenario of a network data analysis method according to an embodiment of the present application;
[0017] Figure 2 is a schematic flow chart of a network data analysis method according to an embodiment of the present application;
[0018] Figure 3 is a schematic flow chart of a network data analysis method according to another embodiment of the present application
[0019] Figure 4 is a schematic block diagram of a network data analysis device according to an embodiment of the present application;
[0020] Figure 5 It is a schematic diagram of the hardware structure of a network data device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The embodiments of the present application provide a network data analysis method, device, electronic device and storage medium to solve the problem of lack of effective means for analyzing and monitoring the distribution and traffic of IPv6.
[0022] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0023] The network data analysis method provided in the embodiment of the present application can be executed by an electronic device, or by software installed in the electronic device. Specifically, the electronic device can be a terminal device or a server device. Among them, the terminal device can include a smart phone, a laptop computer, a smart wearable device, a vehicle terminal, etc., and the server device can include an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
[0024] Figure 1Schematic diagram of an application scenario of a network data analysis method according to an embodiment of the present application. Figure 1 As shown, the application scenario of the network data analysis method involves a business system and a client, wherein the business system includes network log data and basic data. Through the operation of the client, the log data and basic data in the business system are collected, and the IPv6 in the data is analyzed.
[0025] Figure 2 is a schematic flow chart of a network data analysis method according to an embodiment of the present application, such as Figure 2 As shown, the method of network data analysis includes the following steps:
[0026] S202, collecting data in the business system to obtain first data, where the first data includes network log data and basic data.
[0027] Among them, network log data includes traffic data collected by Netflow and log data in the domain name system, and basic data includes identified feature library data, IP address library data, and ICP library data.
[0028] Netflow technology includes providing network data including user IP, port, protocol and type, which can be used to analyze the traffic of each IP, port and protocol. Among them, the traffic data collected by Netflow includes source IP address, destination IP address, source communication port number, destination communication port number, network layer protocol type, service type, logical network port of network device input or output, etc. Specifically, by associating the two types of data through IP address, the collected user IP and interactive IP and domain name can be recorded. The input or output logical network port is used to record network traffic, that is, where the traffic is from and to, and count it. These tuples can form a flow, which can indicate the direction of the current traffic from and to, that is, to monitor and record behavior.
[0029] The data of Domain Name System (DNS) provides resource data including user domain name, IP address, CNAME, A record deployment Internet Protocol Version 4 (IPv4), AAAA record IPv6, service type, DNS request information, etc. Specifically, the log data in DNS includes user IP|request domain name|resolution time|A record resolution address|resolution result code|request DNS record type|canonical name (CNAME)|AAAA record resolution address|service IP, and the DNS data is parsed and merged by using IP address as the unique identification content.
[0030] It should be noted that DNS data collection can be completed by extracting the logs of the DNS system, that is, by parsing and merging the DNS logs, the log field matching of the DNS system on the traffic analysis tool is completed. The collection of traffic data is carried out through Netflow technology. Netflow is a network data flow collection strategy configured on network devices. This strategy has no impact on the network during collection, and there is no need to install client or agent programs. Through the Netflow strategy deployed on each network device in the network, the traffic data is telemetered and transmitted to the central processing node through an encryption algorithm. Through the unified storage and analysis of the central processing node, the distributed analysis of traffic is realized.
[0031] Collecting the first data may include collecting network log data and filling basic information database data. The network log data can be used to effectively complete functions such as flow analysis tracing and flow monitoring through an open source flow analysis tool based on an operating system (linux), and the flow data provided by the Netflow technology can be used to monitor the flow direction of the log data provided by the DNS system, and monitor and record its network behavior, that is, based on the IP address, the IP belonging to the enterprise, the belonging place, the business type, the domain name, the CNAME domain name, the DNS request information, and the flow information containing various flow data, including the website name, the filing status, the unit information, the domain name, the click volume and other information, together constitute the network log data, combined with the identified feature library, IP address library, ICP library and other resource data, to complete the analysis of IPv6 traffic. For example, the user sends the domain name to the DNS server, and the DNS server resolves the domain name according to the user's domain name request, and returns the IP address to the user. The user's domain name can interact with the DNS IP. Through the Netflow technology, the interaction information between the user's IP and the IP returned to the user by the DNS system can be directly monitored, and the flow direction can be directly monitored.
[0032] S204, input the first data into a preset integer programming model, the integer programming model is used to process and plan the first data, obtain a processing result, and output second data.
[0033] The integer programming model includes performing integer programming processing on the input data. Specifically, the input first data is processed through a preset integer programming model to obtain a decision of discrete features and output an accurate complete solution. The output complete solution is also the second data. Processing the first data through the integer programming model can improve the accuracy and efficiency of IPv6 traffic processing and analysis. When a large amount of first data is collected, it can also provide effective support.
[0034] S206, classify the second data using a naive Bayes algorithm to obtain a first classification result for the second data, where the first classification result is third data, and the third data includes a proportion of the IPv6 address data in the second data.
[0035] Naive Bayes algorithm is one of the most widely used classification algorithms.
[0036] The second data obtained in step 204 is analyzed based on the naive Bayes algorithm, including classification processing of the second data. The third data can be obtained through classification, and the third data includes the proportion of IPv6 address data in each type of data in the second data. Specifically, the second data after the first data is processed includes the flow data collected by Netflow, the log data in the domain name system, the feature library data, the IP address library data, and the ICP library data, and the proportion of IPv6 address data in these five types of data. According to the proportion of IPv6 address data, the distribution information of IPv6 can be accurately grasped, and security events can be monitored according to the distribution status to monitor whether the behavior of accessing the IP is normal access. For example, if it is accessed multiple times in one minute, it is possible that the website is attacked and the responsible personnel need to check it.
[0037] The technical solution of the embodiment of the present application is adopted to collect the first data in the business system, and the first data includes network log data and basic data, wherein the network log data is the flow data collected by Netflow and the log data in the DNS domain name system, and the Netflow technology can monitor the direction of data flow and monitor the flow, and the basic data includes the identified feature library data, IP address library data, and ICP library data. The first data including the log data and the basic data is input into a preset integer programming model, and the model can process and plan the first data to obtain more accurate second data, and the second data is analyzed based on the naive Bayes algorithm, and the proportion of the address data containing IPv6 in the above five types of data is calculated to obtain the third data, and the distribution information of IPv6 included in the first data in the collection system is displayed through the third data, and the security incident is monitored according to the distribution status, which can solve the problem of lack of effective means for analyzing and monitoring the distribution and flow of IPv6.
[0038] In one embodiment, before the first data is input into the preset integer programming model (i.e., S204), the integer programming model is established, and the following step A may be performed:
[0039] Step A: The integer programming model includes a solver. Based on the first data, the solver processes the cutting plane through a branch and cut algorithm to obtain a feasible solution. The solver also calls the cutting plane algorithm to join the model.
[0040] The solver may include a mathematical programming optimizer (Gurobi), which is a commercial linear programming solver that is fast, efficient and stable.
[0041] In this embodiment, the integer programming model includes a solver, and the integer programming model is established based on the solver, wherein the solver uses a branch and cut algorithm framework. During the processing of each node of the branch and cut tree, the solver will call a heuristic algorithm to try to obtain a better feasible solution. In addition, various cutting plane algorithms will be called to generate effective cutting planes and added to the model. The solver uses the highest possible quality feasible solution as an initial solution and passes it into the solver for solving.
[0042] In one embodiment, after establishing the integer programming model (i.e., step A), including training the integer programming model, the following steps B1-B2 may be performed:
[0043] Step B1: Based on the integer programming model, set the initial values of the variables, use the solver to solve the initial values, and obtain the initial solution.
[0044] For the established integer programming model, the initial value of the variable is set by using the initial value attribute of the decision variable. By assigning the initial value of the decision variable, the solver can obtain an initial solution. One initial value corresponds to one initial solution, thereby setting the initial (Start) attribute for the decision variable.
[0045] Specifically, the initial value is set mainly by setting the Start attribute. The attributes related to Start are: Start, number of nodes (StartNodeLimit), multiple initial solutions (StartNumber), number of initial solutions (NumStart). The detailed attributes are described as follows:
[0046]
[0047]
[0048] Step B2: Based on the first parameter, the initial solution of the initial value is completed to obtain a complete solution.
[0049] Among them, the first parameter includes StartNodeLimit, which is set in the solver to complete the initial solution obtained in step B1. That is to say, the node content set by the first parameter can provide a more detailed supplementary description of the initial solution.
[0050] In this embodiment, the integer programming model is trained, initial values are set, an initial solution is obtained through the initial values, and the initial solution is supplemented by the first parameter to obtain a complete solution, which can input the initial values of the integer programming model and output a more accurate result.
[0051] In one embodiment, based on the first parameter, the initial solution of the initial value is completed (ie, step B2), and specifically, the following steps C1-C2 may be performed:
[0052] Step C1: According to the first parameter written in the solver, a search data node is set, and the target value corresponding to the initial solution is determined by searching the node.
[0053] According to the first parameter, the search node is set. For example, in the function StartNodeLimit, the number of search nodes is set to 10000, and the target value of the initial solution is 326.1. If the number of search nodes is not set, the corresponding target value of the initial solution is 329.16. In other words, the target value is the exact value in the completed solution that completes the initial solution. If the search node is not set, the target value of the initial solution needs to be calculated more times to obtain the target value corresponding to the initial solution. If the search node is set, it means that when the set search node is reached, the target value of the initial solution is accurate enough, and the initial solution of the initial value can be completed using the target value.
[0054] Step C2: Input the initial solution and the target value into the solver to obtain the complete solution.
[0055] The initial solution and the corresponding target value are input into the solver, and the model in the solver is used to obtain the complete solution corresponding to the initial value. That is, the initial solution and the target value are integrated to complete the extraction and integration of the initial value, and obtain a complete solution including the initial solution and the target value. For example, 5 divided by 2 equals 2 with a remainder of 1, so the initial solution is 2 and the target value is 1. The calculation of the target value is to obtain the closest target value. The complete solution is obtained after the initial solution and the target value are integrated.
[0056] In this embodiment, a search node is set according to the first parameter, and the target value corresponding to the initial solution is calculated using the search node. The target value and the initial solution are input into the solver, and integrated calculations are performed to obtain an accurate complete solution. The complete solution corresponding to the initial value input into the integer programming model can be accurately calculated, making the training of the integer programming model faster and more accurate.
[0057] In one embodiment, the first data is input into a preset integer programming model, and the integer programming model is used to process and plan the first data, obtain a processing result, and output the second data (i.e., step 204), and the following steps D1-D2 may be performed:
[0058] Step D1: input the first data into the integer programming model, perform integer programming processing on the first data according to the trained integer programming model, and obtain a complete solution corresponding to the first data.
[0059] According to the integer programming model trained above, the first data is input into the model, and the first data can be processed by integer programming. Specifically, the first data is input into the integer programming model as an initial value to obtain an initial solution and a target value, and the initial solution and the target value are integrated to obtain a complete solution corresponding to the first data. It should be noted that the first data includes traffic data, log data, and identified feature library data, IP address library data, and ICP library data, and the corresponding complete solutions are obtained for the five groups of data.
[0060] Step D2: The second data output by the solver.
[0061] According to step D1, a complete solution corresponding to the first data is obtained in the solver, and the solver outputs the complete solution to obtain second data.
[0062] In this embodiment, based on a pre-trained integer programming model, the first data is input into the model to obtain the second data corresponding to the first data. That is, the first data in the acquisition business system is trained with the integer programming model to obtain more complete and easy-to-represent second data, and the first data is processed and planned. When the collected first data is too much, the integer programming model can be used to effectively support the collected first data.
[0063] In one embodiment, the second data is classified using a naive Bayes algorithm to obtain a first classification result of the second data, the first classification result is third data, and the third data includes the proportion of IPv6 address data in the second data (ie, step 206), and the following steps E1-E2 may be performed:
[0064] Step E1: classify the second data to obtain a second classification result, the second classification result includes five types of data output by the integer programming model, the five types of data are traffic data, log data, identified feature library data, IP address library data, ICP library data, and IPv6 address data among the five types of data.
[0065] The second data output from the integer programming model is classified to obtain a second classification result, that is, after the first data is input into the preset integer programming model, the second data of the complete solution is obtained, and the second data is classified. The second classification result of the second data includes five categories of data and IPv6 address data in the five categories of data.
[0066] As an example, we obtain five types of data: traffic data, log data, feature library data, IP address library data, and ICP library data. According to the Bayesian algorithm, we specify five categories, namely:
[0067] Y1, Y2, Y3, Y4, Y5,
[0068] In the training samples, the observed counts of IPv6 address data in each category are:
[0069] X1, X2, X3, X4, X5,
[0070] In the given item to be classified X, the probability P(yk|X) of each IPv6 address data appearing is the largest, that is, the classification is completed, that is:
[0071] P(y k ∣X)=max{P(y1∣X),P(y2∣X),P(y3∣X),…,P(y n ∣X)},
[0072] According to the set of items to be classified with known classification, the training sample set is determined, and the conditional probability estimation of each feature attribute under each category is obtained by statistics, that is:
[0073] P(x1|y1),P(x2|y1),P(x3|y1),…,P(xn|y1)
[0074] P(x1|y2),P(x2|y2),P(x3|y2),…,P(xn|y2)
[0075] …
[0076] P(x1|yn),P(x2|yn),P(x3|yn),…,P(xn|yn)
[0077] Step E2: Based on the Naive Bayes algorithm, the proportion of the IPv6 address data in the second data in the five types of data is calculated to obtain the third data.
[0078] According to the classification obtained in step E1, the proportion of IPv6 address data in the five types of data is calculated. Since in the naive Bayes algorithm, each characteristic attribute of the item to be classified is conditionally independent, the Bayes formula is:
[0079]
[0080] That is, the denominator is equivalent to the probability that X exists in the database, so for any item to be classified, P(X) is a constant. To calculate the posterior probability P(yi|X), we only need to consider the numerator.
[0081] Therefore, since each eigenvalue is independent, we have:
[0082]
[0083] From this it follows that:
[0084] Through the above formula, the correlation information of the five types of data, such as traffic data, log data, various databases, and IPv6 address data, that is, the proportion, which is the third data, can be obtained according to the Naive Bayes algorithm.
[0085] It should be noted that in the actual application process, the IPv6 address data should account for 50% to 50% of the IPv4 address data in the above five types of data. If there is a problem with the ratio, the technicians need to process the data, and according to the ratio and the flow data obtained by Netflow technology, the flow direction of the flow can be monitored at all times. When a problem occurs, the source IP information can be found and processed according to the flow data monitored by Netflow. For example, according to the deployment progress, the user and the requested destination IP interacted 100 times, or interacted with 1G of traffic. How much of this traffic belongs to IPv4 address data and how much belongs to IPv6 address data will have a corresponding ratio in the above five types of data. Ideally, the IPv4 address data and IPv6 address data are divided in half. According to the information of the address data, behavior detection is performed, including whether the user has visited bad websites, visited bad domain names and other security events. If a problem event occurs, the corresponding source IP information can be found. Therefore, users can monitor security events and detect whether the behavior of accessing IP is normal access through IP address information and distribution.
[0086] In this embodiment, by classifying the second data, the proportion of IPv6 address data in the above five types of data is calculated to obtain the third data, which can monitor the proportion of IPV6, and at the same time detect whether the behavior of accessing the IP is normal access, monitor security events, and at the same time, based on the IP address information, check whether the place of ownership is legal, monitor the region and other information, and flexibly adjust the proportion of IPv6 address data according to the needs of the operator.
[0087] In one embodiment, the proportion of the IPv6 address data in the second data in the five types of data is calculated (ie, step E2), and the following step F may be performed:
[0088] Step F: Using the Laplace smoothing algorithm, add the number 1 to the IPv6 address data to calculate the proportion of the IPv6 address data in the third data.
[0089] Among them, the application of Laplace smoothing algorithm includes that after the classification of the above five types of data, the relevant data has been matched according to the IPv6 address data to obtain the third data, but because the IPv6 address data has not been fully covered, it is easy to have a probability of 0 for a certain instance, such as the imbalance of traffic between a pair of IP addresses, resulting in unilateral IP traffic of 0 in certain periods, or when the address is used as a business address, only the TCP protocol is opened, resulting in the probability of an instance being 0 when the classification is matched. Therefore, in order to solve the situation where the mathematical probability of an event is 0 when it is not observed, Laplace smoothing is used for training.
[0090] Specifically, for a random variable z, whose value range is {1,2,3…k}, for the observation results after m trials {z(1),z(2),z(3),…,z(m)), the maximum likelihood estimate is calculated as follows:
[0091]
[0092] After using Laplace smoothing, the calculation formula becomes:
[0093]
[0094] That is, add the size of the value range to the denominator and add 1 to the numerator.
[0095] Therefore, the above classification formula can be modified as follows:
[0096]
[0097] By continuously training using input instances of IPv6 traffic data (traffic value, link utilization, bandwidth, routing hops, etc.) and log data (domain names, CNAMEs, AAAA records, subdomain names, etc.), we can obtain training results that are basically consistent with the actual values, that is, the output error is small.
[0098] It should be noted that due to the lag of ICP household registration, the relevant IP, domain name or other user-side information needs to be synchronized after the user updates before data information can be collected, and since the update depends on manual methods when the record expires, it is easy to have the instance be 0. For this problem, through the Laplace smoothing strategy of continuous training, the result that is basically consistent with the example can be obtained.
[0099] In this embodiment, by performing supplementary calculation on the third data obtained by the naive Bayes algorithm, the Laplace smoothing algorithm is used to prevent the occurrence of 0 in the calculation process, which leads to inaccurate calculation results, and the problem of 0 probability can be conveniently and effectively avoided.
[0100] In summary, the first data in the business system is collected, and the first data includes network log data and basic data. The network log data is the traffic data collected by Netflow and the log data in the DNS domain name system. The basic data includes the identified feature library data, IP address library data, and ICP library data. Through Netflow technology, the interaction between IP and domain name can be converted into interaction between IP and IP. The first data including log data and basic data are input into a preset integer programming model, which can process and plan the first data to obtain more precise and accurate second data. Based on the naive Bayes algorithm, the second data is analyzed, and the proportion of address data containing IPv6 in the above five types of data is calculated to obtain the third data. Through the Laplace smoothing algorithm, the proportion of the above calculated IPv6 address data is made not 0. The distribution information of IPv6 included in the first data in the collected business system is displayed through the third data. According to the distribution status, security events are monitored, and the distribution status of IPv6 is flexibly adjusted according to the needs of the operator, so as to improve the stability, efficiency and security of network operation. Through the combined application of the above various technologies, the problem of lack of effective means for analyzing and monitoring the distribution and traffic of IPv6 can be solved.
[0101] Figure 3 is a schematic flow chart of a network data analysis method according to another embodiment of the present application, such as Figure 3 As shown, the method comprises the following steps:
[0102] S301, establish an integer programming model.
[0103] Use the solver, that is, Gurobi, based on Gurobi, to process the cutting plane through the branch and cut algorithm to obtain a feasible solution. The solver will also call the cutting plane algorithm to join the model.
[0104] S302, training an integer programming model.
[0105] The initial value is input into the integer programming model to obtain an initial solution. Based on the first parameter, wherein the first parameter includes StartNodeLimit, the search data node is set, and the complete solution is determined by the target value calculated by the initial solution and the first parameter. The integer programming model outputs the complete solution.
[0106] S303, collecting first data in the business system.
[0107] Among them, the first data includes the traffic data collected by Netflow and the log data in the domain name system, and the basic data includes the identified feature library data, IP address library data, and ICP library data.
[0108] The collection method can be to collect data through a standardized multi-segment analysis tool (Network Time MachineTM, NTM). The standardized NTM method is an open source Linux-based traffic analysis tool that can effectively complete traffic analysis tracing, traffic monitoring and other functions.
[0109] S304, inputting the first data into the trained integer programming model.
[0110] S305, performing integer programming processing on the first data input into the integer programming model.
[0111] After the five types of data in the first data are input into the integer programming model as initial values, integer programming is performed on the data to obtain a complete solution of the corresponding initial solution and target value combination, that is, the second data.
[0112] S306, outputting the second data processed by the integer programming through the solver.
[0113] S307, classify the second data using a naive Bayes algorithm.
[0114] The second data is classified according to the above five categories of data, and the IPv6 address data in each category is calculated.
[0115] S308, using a naive Bayes algorithm to calculate the proportion of IPv6 address data in the second data.
[0116] According to the five types of data after classification and the IPv6 address data, based on the naive Bayes algorithm, the proportion of IPv6 address data in each type of data is calculated. It should be noted that in the calculation process, in order to prevent the probability of 0, that is, the IPv6 address data does not exist in this type of data, the Laplace smoothing algorithm is used to add the number 1 to the IPv6 address data to avoid the situation of 0.
[0117] The technical solution of the embodiment of the present application is adopted to collect the first data in the business system, and the first data includes network log data and basic data, wherein the network log data is the flow data collected by Netflow and the log data in the DNS domain name system, and the Netflow technology can monitor the direction of data flow and monitor the flow, and the basic data includes the identified feature library data, IP address library data, and ICP library data. The first data including the log data and the basic data is input into a preset integer programming model, and the model can process and plan the first data to obtain more accurate second data, and the second data is analyzed based on the naive Bayes algorithm, and the proportion of the address data containing IPv6 in the above five types of data is calculated to obtain the third data, and the distribution information of IPv6 included in the first data in the collection system is displayed through the third data, and the security incident is monitored according to the distribution status, which can solve the problem of lack of effective means for analyzing and monitoring the distribution and flow of IPv6.
[0118] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recorded in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing can be advantageous.
[0119] The above is a network data analysis method provided in an embodiment of the present application. Based on the same idea, an embodiment of the present application also provides a network data analysis device.
[0120] Figure 4 is a schematic block diagram of a network data analysis device according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0121] The collection module 41 is used to collect data in the business system to obtain first data, wherein the first data includes network log data and basic data, wherein the network log data includes flow data collected by Netflow and log data in the domain name system, and the basic data includes identified feature library data, IP address library data, and ICP library data;
[0122] The training module 42 is used to input the first data into a preset integer programming model, and the integer programming model is used to process and plan the first data, obtain a processing result, and output second data;
[0123] The analysis module 43 is used to classify the second data using a naive Bayes algorithm to obtain a first classification result of the second data, where the first classification result is third data, and the third data includes a proportion of IPv6 address data in the second data.
[0124] In one embodiment, the training module 42 includes establishing the integer programming model,
[0125] The integer programming model includes a solver. Based on the first data, the solver processes the cutting plane through a branch and cut algorithm to obtain a feasible solution. The solver also calls the cutting plane algorithm to join the model.
[0126] In one embodiment, the training module 42 further includes:
[0127] The integer programming model is trained. Based on the integer programming model, initial values of the variables are set. The initial values are solved by a solver to obtain an initial solution. Based on the first parameter, the initial solution of the initial value is completed to obtain a complete solution.
[0128] In one embodiment, based on the first parameter, the initial solution of the initial value is completed, including:
[0129] According to the first parameter written in the solver, a search data node is set, and the target value corresponding to the initial solution is determined through the search node; the initial solution and the target value are input into the solver to obtain a complete solution.
[0130] In one embodiment, obtaining the trained second data includes: inputting the first data into an integer programming model, performing integer programming processing on the first data according to the trained integer programming model, and obtaining a complete solution corresponding to the first data; and obtaining the second data output by the solver.
[0131] In one embodiment, the above analysis module includes:
[0132] The second data is classified to obtain a second classification result, which includes five types of data output by the integer programming model, and the five types of data are traffic data, log data, identified feature library data, IP address library data, ICP library data, and IPv6 address data in the five types of data; based on the naive Bayes algorithm, the proportion of IPv6 address data in the second data in the five types of data is calculated to obtain the third data.
[0133] In one embodiment, the proportion of the IPv6 address data in the second data in the five types of data is calculated, including:
[0134] The number 1 is added to the IPv6 address data through the Laplace smoothing algorithm to calculate the proportion of the IPv6 address data in the third data.
[0135] The technical solution of the embodiment of the present application is adopted to collect the first data in the business system, and the first data includes network log data and basic data, wherein the network log data is the flow data collected by Netflow and the log data in the DNS domain name system, and the Netflow technology can monitor the direction of data flow and monitor the flow, and the basic data includes the identified feature library data, IP address library data, and ICP library data. The first data including the log data and the basic data is input into a preset integer programming model, and the model can process and plan the first data to obtain more accurate second data, and the second data is analyzed based on the naive Bayes algorithm, and the proportion of the address data containing IPv6 in the above five types of data is calculated to obtain the third data, and the distribution information of IPv6 included in the first data in the collection system is displayed through the third data, and the security incident is monitored according to the distribution status, which can solve the problem of lack of effective means for analyzing and monitoring the distribution and flow of IPv6.
[0136] Those skilled in the art should understand that Figure 4 The network data analysis device in can be used to implement the network data analysis method described above, and the detailed description thereof should be similar to the description of the method part above. To avoid tediousness, it will not be repeated here.
[0137] Based on the same idea, the present application also provides a network data analysis device, such as Figure 5 As shown. The network data analysis device may have relatively large differences due to different configurations or performances, and may include one or more processors 501 and memory 502, and the memory 502 may store one or more storage applications or data. Among them, the memory 502 can be short-term storage or persistent storage. The application stored in the memory 502 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the traffic policy recommendation device. Furthermore, the processor 501 can be configured to communicate with the memory 502, and execute a series of computer executable instructions in the memory 502 on the traffic policy recommendation device. The traffic policy recommendation device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input and output interfaces 505, and one or more keyboards 506.
[0138] Specifically in this embodiment, the traffic strategy recommendation device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the traffic strategy recommendation device, and the one or more programs are configured to be executed by one or more processors, including the following computer executable instructions:
[0139] Collecting data in the business system to obtain first data, the first data including network log data and basic data, wherein the network log data includes flow data collected by Netflow and log data in the domain name system, and the basic data includes identified feature library data, IP address library data, and ICP library data;
[0140] Input the first data into a preset integer programming model, the integer programming model is used to process and plan the first data, obtain a processing result, and output second data;
[0141] The second data is classified by using a naive Bayes algorithm to obtain a first classification result of the second data, the first classification result is third data, and the third data includes a proportion of the IPv6 address data in the second data.
[0142] The technical solution of the embodiment of the present application is adopted to collect the first data in the business system, and the first data includes network log data and basic data, wherein the network log data is the flow data collected by Netflow and the log data in the DNS domain name system, and the Netflow technology can monitor the direction of data flow and monitor the flow, and the basic data includes the identified feature library data, IP address library data, and ICP library data. The first data including the log data and the basic data is input into a preset integer programming model, and the model can process and plan the first data to obtain more accurate second data, and the second data is analyzed based on the naive Bayes algorithm, and the proportion of the address data containing IPv6 in the above five types of data is calculated to obtain the third data, and the distribution information of IPv6 included in the first data in the collection system is displayed through the third data, and the security incident is monitored according to the distribution status, which can solve the problem of lack of effective means for analyzing and monitoring the distribution and flow of IPv6.
[0143] The embodiment of the present application further proposes a computer-readable storage medium, which stores one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by an electronic device including multiple application programs, the electronic device can execute each process of the above-mentioned traffic policy recommendation method embodiment, and is specifically used to execute:
[0144] Collecting data in the business system to obtain first data, the first data including network log data and basic data, wherein the network log data includes flow data collected by Netflow and log data in the domain name system, and the basic data includes identified feature library data, IP address library data, and ICP library data;
[0145] Input the first data into a preset integer programming model, the integer programming model is used to process and plan the first data, obtain a processing result, and output second data;
[0146] The second data is classified by using a naive Bayes algorithm to obtain a first classification result of the second data, the first classification result is third data, and the third data includes a proportion of the IPv6 address data in the second data.
[0147] The technical solution of the embodiment of the present application is adopted to collect the first data in the system, and the first data includes network log data and basic data, wherein the network log data is Netflow traffic data and DNS domain name system log data, Netflow technology can monitor the direction of data traffic and monitor the traffic, and the basic data includes resource data of the identified feature library, IP address library, and ICP library. The first data including log data and basic data is input into a preset neat planning model, and the model can process and plan the first data to obtain more accurate second data. Based on the naive Bayes algorithm, the second data is analyzed, and the proportion of IPv6 contained in the above five data is calculated to obtain the third data. The distribution information of IPv6 included in the first data in the collection system is displayed by the third data, which can solve the problem of lack of effective means for analyzing and monitoring the distribution of IPv6 and traffic.
[0148] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0149] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0150] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0151] 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.
[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0154] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0155] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0156] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0157] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0158] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0159] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0160] The above is only an embodiment of the present application and is 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 in the scope of the claims of the present application.
Claims
1. A network data analysis method, characterized in that: include: Collecting data in the business system to obtain first data, wherein the first data includes network log data and basic data, wherein the network log data includes flow data collected by a network monitoring function Netflow and log data in a domain name system, and the basic data includes identified feature library data, Internet Protocol IP address library data, and network content service provider ICP library data; Input the first data into a preset integer programming model, wherein the integer programming model is used to process and plan the first data, obtain a processing result, and output second data; The second data is classified using a naive Bayes algorithm to obtain a first classification result for the second data, where the first classification result is third data, and the third data includes a proportion of address data of Internet Protocol version 6 IPv6 in the second data.
2. The method according to claim 1, characterized in that Before inputting the first data into the integer programming model, the method includes establishing the integer programming model. The integer programming model includes a solver. Based on the first data, the solver is used to process the cutting plane through a branch and cut algorithm to obtain a feasible solution. The solver will also call the cutting plane algorithm to add it to the model.
3. The method according to claim 2, characterized in that After the integer programming model is established, the method further comprises: training the integer programming model, Based on the integer programming model, initial values of variables are set, and the initial values are solved by a solver to obtain an initial solution; Based on the first parameter, the initial solution of the initial value is completed to obtain a complete solution.
4. The method according to claim 3, characterized in that The step of completing the initial solution of the initial value based on the first parameter includes: According to the first parameter written in the solver, a search data node is set, and a target value corresponding to the initial solution is determined through the search node; The initial solution and the target value are input into the solver to obtain the complete solution.
5. The method according to claim 4, characterized in that The step of obtaining the trained second data includes: Inputting the first data into the integer programming model, and performing integer programming processing on the first data according to the trained integer programming model to obtain a complete solution corresponding to the first data; The second data is output by the solver.
6. The method according to claim 5, characterized in that The classifying the second data by using the naive Bayes algorithm includes: Classifying the second data to obtain a second classification result, wherein the second classification result includes five types of data output by the integer programming model, the five types of data being the traffic data, the log data, the identified feature library data, the IP address library data, the ICP library data, and the IPv6 address data among the five types of data; Based on the Naive Bayes algorithm, the proportion of the IPv6 address data in the second data in the five types of data is calculated to obtain the third data.
7. The method according to claim 1, characterized in that The calculating the proportion of the IPv6 address data in the second data in the five types of data includes: The number 1 is added to the IPv6 address data through the Laplace smoothing algorithm to calculate the proportion of the IPv6 address data in the third data.
8. A network data analysis device, characterized in that: include: A collection module, used to collect data in the business system to obtain first data, wherein the first data includes network log data and basic data, wherein the network log data includes flow data collected by Netflow and log data in the domain name system, and the basic data includes identified feature library data, IP address library data, and ICP library data; A training module, used for inputting the first data into a preset integer programming model, wherein the integer programming model is used for processing and planning the first data, obtaining a processing result, and outputting second data; The analysis module is used to classify the second data using a naive Bayes algorithm to obtain a first classification result for the second data, wherein the first classification result is third data, and the third data includes a proportion of IPv6 address data in the second data.
9. An electronic device, characterized in that: It comprises a processor and a memory electrically connected to the processor, the memory stores a computer program, and the processor is used to call and execute the computer program from the memory to implement the network data analysis method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium is used to store a computer program, and the computer program can be executed by a processor to implement the network data analysis method according to any one of claims 1 to 7.
