Traffic data processing method and system based on mirror forwarding

Through the method of mirror replication and off-site encapsulation and encrypted transmission, combined with virtual switches and neural networks, the problem of multi-regional traffic data audit management is solved, and the efficiency and scalability of off-site auditing are improved.

CN117997778BActive Publication Date: 2024-09-10FOSHAN HONGHU INTERNET OF THINGS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311863983.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2024-09-10
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

Existing technology makes it difficult to implement unified audit management of traffic data in multiple areas, and forwarding multiple mirrors to remote areas will increase pressure on switches. Routing configuration is difficult, resulting in a lack of scalability and efficiency in traffic data auditing.

Method used

Using a traffic data processing method based on mirror forwarding, the traffic data to be audited is obtained through the switch for mirror copying, and encapsulated and encrypted for transmission in a remote location. Virtual switches and neural networks are used to eliminate illegal data and calculate security parameters, and finally perform auditing on the audit equipment. analyze.

Benefits of technology

While ensuring that local real-time traffic transmission is not affected, the efficiency and adequacy of off-site auditing are improved, and off-site legal auditing of real-time traffic is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117997778B
    Figure CN117997778B
Patent Text Reader

Abstract

The present invention discloses a flow data processing method and system based on mirror forwarding, the method comprising: a switch obtains flow data to be audited sent by a network device, mirrors the flow data to be audited, obtains mirror data, and sends the mirror data to a flow packaging server; the flow packaging server encapsulates and encrypts the mirror data according to a preset flow encapsulation and encryption rule, obtains encapsulated data, and sends the encapsulation device to a flow unpacking server; the flow unpacking server unpacks the encapsulated data according to a preset flow unpacking rule, obtains mirror data, and sends the mirror data to an audit device; the audit device audits the mirror data according to a preset audit rule to obtain an audit analysis result corresponding to the flow data to be audited. It can be seen that the present invention can improve the efficiency and adequacy of off-site auditing while ensuring that the transmission of local real-time flow is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic data processing, and in particular to a traffic data processing method and system based on mirror forwarding. Background Art

[0002] With the increasing emphasis on legal requirements for network security, more and more traffic auditing scenarios have begun to emerge. How to achieve efficient and legal auditing of traffic data has become an important technical challenge. In the existing technology, in order to achieve the audit of traffic information, business traffic is generally transmitted to local auditing equipment through local communication links for analysis and auditing. Since the cost of some traffic auditing equipment is too high, most companies can only purchase a small amount of auditing equipment for auditing, so it is more reasonable to deploy the audit system locally.

[0003] However, there is a need to uniformly audit and manage the traffic in multiple regions. The idea of ​​deploying the audit system locally in the existing technology is obviously not ideal. If multiple mirrors are forwarded to remote areas, it will increase the pressure on the switch and there will be a problem of difficult routing configuration. Therefore, it is obvious that the traffic data audit solution implemented by the existing technology is lacking in effect and scalability. It can be seen that the existing technology has defects and needs to be solved urgently. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a traffic data processing method and system based on mirror forwarding, which can realize remote legal audit of real-time traffic based on mirror replication and remote packaging transmission, and improve the efficiency and adequacy of remote audit while ensuring that the transmission of local real-time traffic is not affected.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a flow data processing method based on mirror forwarding, which is applied to a flow data processing system, wherein the flow data processing system includes a source data system in a first area and an audit end system in a second area; the source data system includes a network device and a flow packaging server connected by a switch; the audit end system includes a flow depacketization server and an audit device connected to each other; the flow packaging server is in communication connection with the flow depacketization server; the method includes:

[0006] The switch obtains the to-be-audited traffic data sent by the network device, performs mirror copying on the to-be-audited traffic data to obtain mirror data, and sends the mirror data to the traffic packaging server;

[0007] The traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule to obtain encapsulated data, and sends the encapsulation data to the traffic depacketization server;

[0008] The traffic unpacking server unpacks the encapsulated data according to a preset traffic unpacking rule to obtain the mirror data, and sends the mirror data to the audit device;

[0009] The audit device audits the mirror data according to preset audit rules to obtain audit analysis results corresponding to the flow data to be audited.

[0010] As an optional implementation, in the first aspect of the present invention, the source data system further includes a virtual switch connected to the switch and the traffic packaging server respectively; the specific manner in which the switch sends the mirror data to the traffic packaging server includes:

[0011] The switch sends the mirror data to the virtual switch;

[0012] The virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules, and sends the removed mirror data to the traffic packaging server.

[0013] As an optional implementation manner, in the first aspect of the present invention, the traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule to obtain a specific method of encapsulating the data, including:

[0014] According to a preset segmentation rule, the mirrored data is segmented and sliced ​​to obtain a plurality of sliced ​​data; the segmentation rule is a sequence segmentation rule or a data packet quantity segmentation rule;

[0015] Based on the nesting rules corresponding to the TCP protocol, each of the slice data is subjected to label encapsulation processing and encryption processing to obtain encapsulated data; the label encapsulation processing is VLAN labeling processing;

[0016] Furthermore, the traffic packaging server implements encapsulation and encryption of the mirror data based on VS / TUN technology;

[0017] And, the traffic unpacking server unpacks the encapsulated data according to the preset traffic unpacking rule to obtain the specific manner of the mirror data, including:

[0018] Decrypting the encapsulated data based on a preset decryption algorithm to obtain decrypted encapsulated data;

[0019] Based on a preset unpacking algorithm and de-labeling rule, the decrypted encapsulated data is unpacked and de-labeled to obtain the mirror data.

[0020] As an optional implementation, in the first aspect of the present invention, the data matching rule includes a data content matching rule and a data source matching rule; the specific manner in which the virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules includes:

[0021] Based on the ACL technology and the data content matching rule, the mirror data is matched to obtain a plurality of content-unmatched data corresponding to the mirror data;

[0022] Based on ACL technology and the data source matching rule, the mirror data is matched to obtain multiple illegal source data corresponding to the mirror data;

[0023] Calculating intersection data between the plurality of content-unmatched data and the plurality of illegal source data, and removing the intersection data;

[0024] Input each data that does not belong to the intersection data among the multiple content-unmatched data and the multiple illegal source data into a trained harmful data identification neural network to obtain the harmfulness probability corresponding to each data; the harmful data identification neural network is trained by a training data set including multiple training data and corresponding harmfulness labels;

[0025] All data whose harmfulness probability is greater than a preset probability threshold are eliminated.

[0026] As an optional implementation manner, in the first aspect of the present invention, the mirror data includes the mirror data and its transmission record data during the data transmission process; the audit device audits the mirror data according to the preset audit rules to obtain the audit analysis result corresponding to the audited traffic data. The specific manner includes:

[0027] Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data;

[0028] Determining device security parameters corresponding to the mirrored data according to the multiple transmission intermediate devices and preset device security rules;

[0029] Determining, according to the plurality of transmission intermediate processing operations and preset operation security rules, operation security parameters corresponding to the mirror data;

[0030] Auditing the content of the mirror data according to preset content audit rules to obtain content security parameters corresponding to the mirror data;

[0031] An audit analysis result corresponding to the flow data to be audited is determined according to the device security parameter, the operation security parameter and the content security parameter.

[0032] As an optional implementation manner, in the first aspect of the present invention, the audit device determines the specific manner of the device security parameter corresponding to the mirror data according to the multiple transmission intermediate devices and the preset device security rules, including:

[0033] Sending a request to the source data system and the audit end system to obtain a plurality of system processing devices in the source data system and the audit end system that have processed the mirror data;

[0034] Screening out at least one illegal device among the plurality of transmission intermediate devices that is not any of the system processing devices;

[0035] For each of the illegal devices, obtaining device information and device historical data processing records corresponding to the illegal device;

[0036] According to the device information, determining whether the illegal device is in a preset secure data processing system to obtain a first determination result;

[0037] Determine whether the proportion of the records in which the processed data in the historical data processing records of the device does not belong to the transmission data in the security data processing system exceeds a preset proportion threshold, and obtain a second determination result;

[0038] Calculate an illegal device parameter corresponding to the illegal device; the illegal device parameter is equal to the sum of a first parameter and a second parameter; the first parameter is equal to a first value when the first judgment result is yes; the first parameter is equal to a second value when the first judgment result is no; the second value is greater than the first value; the second parameter is equal to a third value when the second judgment result is yes; the second parameter is equal to a fourth value when the second judgment result is no; the fourth value is less than the third value;

[0039] The reciprocal of the sum of the illegal parameters of the devices corresponding to all the illegal devices is calculated to obtain the device security parameters corresponding to the mirror data.

[0040] As an optional implementation manner, in the first aspect of the present invention, the audit device determines the specific manner of the operation security parameter corresponding to the mirror data according to the multiple transmission intermediate processing operations and the preset operation security rules, including:

[0041] For each of the transmission intermediate processing operations, the operation record data corresponding to the transmission intermediate operation is input into the operation analysis neural network to obtain the operation type and operation object corresponding to the transmission intermediate operation; the operation analysis neural network is trained by a training data set including a plurality of training operation record data and corresponding operation type annotations and operation object annotations;

[0042] Determine whether the operation type belongs to a preset set of legal operation types, and obtain a third determination result;

[0043] Determine whether the operation object is a data content portion corresponding to the mirror data, and obtain a fourth determination result;

[0044] Calculate an illegal operation parameter corresponding to the transmission intermediate processing operation; the illegal operation parameter is equal to the sum of the third parameter and the fourth parameter; the third parameter is equal to the fifth value when the third judgment result is yes; the third parameter is equal to the sixth value when the third judgment result is no; the sixth value is greater than the fifth value; the fourth parameter is equal to the seventh value when the fourth judgment result is yes; the fourth parameter is equal to the eighth value when the fourth judgment result is no; the eighth value is less than the seventh value;

[0045] The reciprocal of the sum of the illegal operation parameters corresponding to all the transmission intermediate processing operations is calculated to obtain the operation safety parameter corresponding to the mirror data.

[0046] As an optional implementation manner, in the first aspect of the present invention, the audit device audits the content of the mirror data according to a preset content audit rule to obtain a specific manner of content security parameters corresponding to the mirror data, including:

[0047] Determine the traffic scenario corresponding to the mirrored data;

[0048] The data content portion of the mirror data is input into a content audit neural network corresponding to a corresponding traffic scenario to obtain content security parameters corresponding to the mirror data; the content audit neural network is trained using a training data set including multiple training data contents of corresponding traffic scenarios and corresponding content security annotations.

[0049] As an optional implementation manner, in the first aspect of the present invention, the audit device determines the specific manner of the audit analysis result corresponding to the to-be-audited traffic data according to the device security parameter, the operation security parameter and the content security parameter, including:

[0050] Determine whether the device safety parameter is lower than a preset device parameter threshold, and obtain a fifth determination result;

[0051] Determining whether the operation safety parameter is lower than a preset operation parameter threshold value to obtain a sixth determination result;

[0052] Determine whether the content security parameter is higher than a preset first content parameter threshold, and obtain a seventh determination result;

[0053] Determine whether the content security parameter is higher than a preset second content parameter threshold, and obtain an eighth determination result; the second content parameter threshold is lower than the first content parameter threshold;

[0054] When the fifth judgment result, the sixth judgment result and the seventh judgment result are all yes, it is determined that the audit analysis result corresponding to the flow data to be audited has been tampered with;

[0055] When the fifth judgment result and the sixth judgment result are both negative, and the seventh judgment result or the eighth judgment result is positive, determining that the audit analysis result corresponding to the flow data to be audited is legal;

[0056] When the fifth judgment result and the sixth judgment result are both negative, and the eighth judgment result is negative, determining that the audit analysis result corresponding to the to-be-audited traffic data is illegal;

[0057] When it is impossible to determine whether the audit analysis result corresponding to the flow data to be audited is tampered with, illegal or legal, the mirror data is sent to a manual audit terminal device.

[0058] The second aspect of the present invention discloses a flow data processing system based on mirror forwarding, the system comprising a source data system in a first area and an audit end system in a second area; the source data system comprises a network device and a flow packaging server connected via a switch; the audit end system comprises a flow depacketization server and an audit device connected to each other; the flow packaging server is in communication connection with the flow depacketization server;

[0059] The switch is used to obtain the flow data to be audited sent by the network device, mirror the flow data to be audited to obtain mirror data, and send the mirror data to the flow packaging server;

[0060] The traffic packaging server is used to encapsulate and encrypt the mirror data according to a preset traffic encapsulation and encryption rule to obtain encapsulated data, and send the encapsulation device to the traffic depacketization server;

[0061] The traffic unpacking server is used to unpack the encapsulated data according to a preset traffic unpacking rule to obtain the mirror data, and send the mirror data to the audit device;

[0062] The audit device is used to audit the mirror data according to preset audit rules to obtain audit analysis results corresponding to the flow data to be audited.

[0063] As an optional implementation, in the second aspect of the present invention, the source data system further includes a virtual switch connected to the switch and the traffic packaging server respectively; the specific manner in which the switch sends the mirror data to the traffic packaging server includes:

[0064] The switch sends the mirror data to the virtual switch;

[0065] The virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules, and sends the removed mirror data to the traffic packaging server.

[0066] As an optional implementation, in the second aspect of the present invention, the traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule, and obtains the specific manner of encapsulating the data, including:

[0067] According to a preset segmentation rule, the mirrored data is segmented and sliced ​​to obtain a plurality of sliced ​​data; the segmentation rule is a sequence segmentation rule or a data packet quantity segmentation rule;

[0068] Based on the nesting rules corresponding to the TCP protocol, each of the slice data is subjected to label encapsulation processing and encryption processing to obtain encapsulated data; the label encapsulation processing is VLAN labeling processing;

[0069] Furthermore, the traffic packaging server implements encapsulation and encryption of the mirror data based on VS / TUN technology;

[0070] And, the traffic unpacking server unpacks the encapsulated data according to the preset traffic unpacking rule to obtain the specific manner of the mirror data, including:

[0071] Decrypting the encapsulated data based on a preset decryption algorithm to obtain decrypted encapsulated data;

[0072] Based on a preset unpacking algorithm and de-labeling rule, the decrypted encapsulated data is unpacked and de-labeled to obtain the mirror data.

[0073] As an optional implementation, in the second aspect of the present invention, the data matching rule includes a data content matching rule and a data source matching rule; the specific manner in which the virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules includes:

[0074] Based on the ACL technology and the data content matching rule, the mirror data is matched to obtain a plurality of content-unmatched data corresponding to the mirror data;

[0075] Based on ACL technology and the data source matching rule, the mirror data is matched to obtain multiple illegal source data corresponding to the mirror data;

[0076] Calculating intersection data between the plurality of content-unmatched data and the plurality of illegal source data, and removing the intersection data;

[0077] Input each data that does not belong to the intersection data among the multiple content-unmatched data and the multiple illegal source data into a trained harmful data identification neural network to obtain the harmfulness probability corresponding to each data; the harmful data identification neural network is trained by a training data set including multiple training data and corresponding harmfulness labels;

[0078] All data whose harmfulness probability is greater than a preset probability threshold are eliminated.

[0079] As an optional implementation, in the second aspect of the present invention, the mirror data includes the mirror data and its transmission record data during the data transmission process; the audit device audits the mirror data according to the preset audit rules to obtain the audit analysis result corresponding to the audited traffic data. The specific method includes:

[0080] Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data;

[0081] Determining device security parameters corresponding to the mirrored data according to the multiple transmission intermediate devices and preset device security rules;

[0082] Determining, according to the plurality of transmission intermediate processing operations and preset operation security rules, operation security parameters corresponding to the mirror data;

[0083] Auditing the content of the mirror data according to preset content audit rules to obtain content security parameters corresponding to the mirror data;

[0084] An audit analysis result corresponding to the flow data to be audited is determined according to the device security parameter, the operation security parameter and the content security parameter.

[0085] As an optional implementation, in the second aspect of the present invention, the audit device determines the specific manner of the device security parameter corresponding to the mirror data according to the multiple transmission intermediate devices and the preset device security rules, including:

[0086] Sending a request to the source data system and the audit end system to obtain a plurality of system processing devices in the source data system and the audit end system that have processed the mirror data;

[0087] Screening out at least one illegal device among the plurality of transmission intermediate devices that is not any of the system processing devices;

[0088] For each of the illegal devices, obtaining device information and device historical data processing records corresponding to the illegal device;

[0089] According to the device information, determining whether the illegal device is in a preset secure data processing system to obtain a first determination result;

[0090] Determine whether the proportion of the records in which the processed data in the historical data processing records of the device does not belong to the transmission data in the security data processing system exceeds a preset proportion threshold, and obtain a second determination result;

[0091] Calculate an illegal device parameter corresponding to the illegal device; the illegal device parameter is equal to the sum of a first parameter and a second parameter; the first parameter is equal to a first value when the first judgment result is yes; the first parameter is equal to a second value when the first judgment result is no; the second value is greater than the first value; the second parameter is equal to a third value when the second judgment result is yes; the second parameter is equal to a fourth value when the second judgment result is no; the fourth value is less than the third value;

[0092] The reciprocal of the sum of the illegal parameters of the devices corresponding to all the illegal devices is calculated to obtain the device security parameters corresponding to the mirror data.

[0093] As an optional implementation, in the second aspect of the present invention, the audit device determines the specific manner of the operation security parameter corresponding to the mirror data according to the multiple transmission intermediate processing operations and the preset operation security rules, including:

[0094] For each of the transmission intermediate processing operations, the operation record data corresponding to the transmission intermediate operation is input into the operation analysis neural network to obtain the operation type and operation object corresponding to the transmission intermediate operation; the operation analysis neural network is trained by a training data set including a plurality of training operation record data and corresponding operation type annotations and operation object annotations;

[0095] Determine whether the operation type belongs to a preset set of legal operation types, and obtain a third determination result;

[0096] Determine whether the operation object is a data content portion corresponding to the mirror data, and obtain a fourth determination result;

[0097] Calculate an illegal operation parameter corresponding to the transmission intermediate processing operation; the illegal operation parameter is equal to the sum of the third parameter and the fourth parameter; the third parameter is equal to the fifth value when the third judgment result is yes; the third parameter is equal to the sixth value when the third judgment result is no; the sixth value is greater than the fifth value; the fourth parameter is equal to the seventh value when the fourth judgment result is yes; the fourth parameter is equal to the eighth value when the fourth judgment result is no; the eighth value is less than the seventh value;

[0098] The reciprocal of the sum of the illegal operation parameters corresponding to all the transmission intermediate processing operations is calculated to obtain the operation safety parameter corresponding to the mirror data.

[0099] As an optional implementation manner, in the second aspect of the present invention, the audit device audits the content of the mirror data according to a preset content audit rule to obtain a specific manner of a content security parameter corresponding to the mirror data, including:

[0100] Determine the traffic scenario corresponding to the mirrored data;

[0101] The data content portion of the mirror data is input into a content audit neural network corresponding to a corresponding traffic scenario to obtain content security parameters corresponding to the mirror data; the content audit neural network is trained using a training data set including multiple training data contents of corresponding traffic scenarios and corresponding content security annotations.

[0102] As an optional implementation manner, in the second aspect of the present invention, the audit device determines the specific manner of the audit analysis result corresponding to the flow data to be audited according to the device security parameter, the operation security parameter and the content security parameter, including:

[0103] Determine whether the device safety parameter is lower than a preset device parameter threshold, and obtain a fifth determination result;

[0104] Determining whether the operation safety parameter is lower than a preset operation parameter threshold value to obtain a sixth determination result;

[0105] Determine whether the content security parameter is higher than a preset first content parameter threshold, and obtain a seventh determination result;

[0106] Determine whether the content security parameter is higher than a preset second content parameter threshold, and obtain an eighth determination result; the second content parameter threshold is lower than the first content parameter threshold;

[0107] When the fifth judgment result, the sixth judgment result and the seventh judgment result are all yes, it is determined that the audit analysis result corresponding to the flow data to be audited has been tampered with;

[0108] When the fifth judgment result and the sixth judgment result are both negative, and the seventh judgment result or the eighth judgment result is positive, determining that the audit analysis result corresponding to the flow data to be audited is legal;

[0109] When the fifth judgment result and the sixth judgment result are both negative, and the eighth judgment result is negative, determining that the audit analysis result corresponding to the to-be-audited traffic data is illegal;

[0110] When it is impossible to determine whether the audit analysis result corresponding to the flow data to be audited is tampered with, illegal or legal, the mirror data is sent to a manual audit terminal device.

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

[0112] The present invention can mirror the audit traffic, encapsulate and encrypt the mirror data for transmission to a remote audit system, and unpack and audit it, thereby enabling remote legal audit of real-time traffic based on mirror replication and remote package transmission, thereby improving the efficiency and adequacy of remote auditing while ensuring that the transmission of local real-time traffic is not affected. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0114] Figure 1 It is a flow chart of a flow data processing method based on mirror forwarding disclosed in an embodiment of the present invention;

[0115] Figure 2 It is a structural schematic diagram of a traffic data processing system based on mirror forwarding disclosed in an embodiment of the present invention;

[0116] Figure 3 It is a structural diagram of a flow data processing system according to a specific implementation scheme disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0117] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0118] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or terminal including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or terminals.

[0119] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0120] The present invention discloses a flow data processing method and system based on mirror forwarding, which can mirror the audited flow, encapsulate and encrypt the mirror data, transmit it to a remote audit system, and unpack and audit it, so as to realize remote legal audit of real-time flow based on mirror replication and remote package transmission, and improve the efficiency and adequacy of remote audit while ensuring that the transmission of local real-time flow is not affected. The following are detailed descriptions.

[0121] Embodiment 1

[0122] See also Figure 1 , Figure 1 1 is a flow chart of a method for processing traffic data based on mirror forwarding disclosed in an embodiment of the present invention. Figure 1The described method can be applied to a traffic data processing system. Specifically, the traffic data processing system includes a source data system in a first area and an audit end system in a second area. Generally speaking, the first area and the second area should be far apart to achieve a remote unified audit of traffic. In some implementations, the audit segment system of the second area can also be used to uniformly audit the traffic data in multiple source data systems in the first area.

[0123] Specifically, the source data system includes network devices and traffic packaging servers connected through switches.

[0124] Specifically, the audit end system includes a traffic depacketization server and an audit device that are interconnected.

[0125] Specifically, the traffic packaging server and the traffic depacketization server are communicatively connected to achieve data transmission between the two systems.

[0126] like Figure 1 As shown, the traffic data processing method based on mirror forwarding may include the following operations:

[0127] 101. The switch obtains the to-be-audited traffic data sent by the network device, mirrors the to-be-audited traffic data to obtain mirrored data, and sends the mirrored data to the traffic packaging server.

[0128] 102. The traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule to obtain encapsulated data, and sends the encapsulated data to the traffic depacketization server.

[0129] 103. The traffic unpacking server unpacks the encapsulated data according to a preset traffic unpacking rule to obtain mirror data, and sends the mirror data to the audit device.

[0130] 104. The audit device audits the mirror data according to the preset audit rules to obtain the audit analysis results corresponding to the flow data to be audited.

[0131] It can be seen that the method described in the embodiment of the present invention can be implemented to mirror the audit traffic, encapsulate and encrypt the mirror data for transmission to a remote audit system, and unpack and audit it, thereby realizing remote legal audit of real-time traffic based on mirror replication and remote packaging transmission, thereby improving the efficiency and adequacy of remote auditing while ensuring that the transmission of local real-time traffic is not affected.

[0132] As an optional embodiment, the source data system further includes a virtual switch connected to the switch and the traffic packaging server respectively. Specifically, the specific manner in which the switch sends the mirror data to the traffic packaging server includes:

[0133] The switch sends the mirrored data to the virtual switch;

[0134] The virtual switch removes illegal data from the mirrored data based on ACL technology and preset data matching rules, and sends the removed mirrored data to the traffic packaging server.

[0135] Through the above embodiments, the virtual switch can eliminate illegal data in the mirror data based on ACL technology and preset data matching rules to prevent erroneous or dangerous data from being transmitted to the traffic packaging server, threatening system security or leaking illegal data to remote servers.

[0136] As an optional embodiment, the data matching rules include data content matching rules and data source matching rules. These matching rules can be pre-set by the operator based on experience or experimental data. The data content matching rules are used to limit the content type or content format in the data content part of the mirror data, and the data source rules are used to limit the content of the data tag used to identify the data source in the mirror data.

[0137] Specifically, the virtual switch removes illegal data from the mirrored data based on ACL technology and preset data matching rules, including:

[0138] Based on ACL technology and data content matching rules, the mirror data is matched to obtain multiple content-unmatched data corresponding to the mirror data;

[0139] Based on ACL technology and data source matching rules, the mirror data is matched to obtain multiple illegal source data corresponding to the mirror data;

[0140] Calculate the intersection data between multiple content-mismatched data and multiple illegal source data, and remove the intersection data;

[0141] Input each data that does not belong to the intersection data among the multiple content-unmatched data and the multiple illegal source data into the trained hazard data recognition neural network to obtain the hazard probability corresponding to each data; the hazard data recognition neural network is trained by a training data set including multiple training data and corresponding hazard labels;

[0142] All data with a probability of harmfulness greater than a preset probability threshold will be eliminated.

[0143] Optionally, the neural network model or prediction algorithm model in the present invention can be a neural network model with a CNN structure, an RNN structure or an LTSM structure, and is trained until convergence through a corresponding gradient descent algorithm and a loss function, which is not limited in the present invention.

[0144] Through the above embodiments, the virtual switch can eliminate data that is both illegal content and illegal source based on ACL technology and intersection calculation, and then eliminate harmful data based on a neural network algorithm, so as to fully eliminate illegal data in the mirror data, so as to prevent erroneous or dangerous data from being transmitted to the traffic packaging server, threatening the system security or leaking illegal data to remote servers.

[0145] As an optional embodiment, the traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule, and obtains the specific method of encapsulating the data, including:

[0146] According to a preset segmentation rule, the mirrored data is segmented and sliced ​​to obtain a plurality of sliced ​​data; the segmentation rule is a sequence segmentation rule or a data packet quantity segmentation rule;

[0147] Based on the nesting rules corresponding to the TCP protocol, label encapsulation and encryption are performed on each slice data to obtain encapsulated data.

[0148] Specifically, the tag encapsulation process is VLAN tagging process, such as dot1q tagging process.

[0149] Optionally, the traffic packaging server implements encapsulation and encryption of the mirrored data based on VS / TUN technology.

[0150] Through the above embodiments, it is possible to encapsulate and encrypt the mirrored data to obtain data that complies with the TCP protocol, thereby ensuring the security of the data during transmission.

[0151] As an optional embodiment, the traffic depacketizing server depackets the encapsulated data according to the preset traffic depacketizing rule to obtain the specific manner of the mirrored data, including:

[0152] Based on a preset decryption algorithm, the encapsulated data is decrypted to obtain decrypted encapsulated data;

[0153] Based on the preset unpacking algorithm and de-labeling rules, the decrypted encapsulated data is unpacked and de-labeled to obtain the mirrored data.

[0154] Specifically, the decryption algorithm should match the algorithm and key used in the above encryption process, which can be achieved through advance communication and negotiation between the traffic packaging server and the traffic depacketization server. Similarly, the de-labeling rules should also match the above label encapsulation rules.

[0155] Through the above embodiments, it is possible to unpack and remove labels from encapsulated data to obtain mirrored data.

[0156] As an optional embodiment, the mirror data includes the mirror data and its transmission record data during the data transmission process. Specifically, the devices in the source data system and the audit end system can add corresponding processing device identification content and processing operation identification content into the mirror data when processing the mirror data to realize the generation of the transmission record data.

[0157] Specifically, the audit device audits the mirror data according to the preset audit rules to obtain the audit analysis results corresponding to the audited traffic data, including:

[0158] Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data;

[0159] Determine the device security parameters corresponding to the mirrored data according to multiple transmission intermediate devices and preset device security rules;

[0160] Determine the operation security parameters corresponding to the mirror data according to multiple transmission intermediate processing operations and preset operation security rules;

[0161] Audit the content of the image data according to the preset content audit rules to obtain the content security parameters corresponding to the image data;

[0162] Based on the equipment security parameters, operation security parameters and content security parameters, the audit analysis results corresponding to the flow data to be audited are determined.

[0163] Through the above embodiments, the audit device can calculate the device security parameters, operation security parameters and content security parameters corresponding to the mirror data to obtain a comprehensive evaluation result of the mirror data, thereby being able to audit the audit traffic data more accurately and comprehensively and achieve a more in-depth audit effect.

[0164] As an optional embodiment, the audit device determines the specific manner of the device security parameter corresponding to the mirrored data according to multiple transmission intermediate devices and preset device security rules, including:

[0165] Sending a request to the source data system and the audit end system to obtain multiple system processing devices in the source data system and the audit end system that have processed the mirror data;

[0166] Screening out at least one illegal device that is not any system processing device from among the plurality of transmission intermediate devices;

[0167] For each illegal device, obtain the device information and device historical data processing record corresponding to the illegal device;

[0168] Determine, based on the device information, whether the illegal device is in a preset secure data processing system, and obtain a first determination result;

[0169] Determine whether the proportion of the records in which the processed data in the historical data processing records of the device does not belong to the transmission data in the security data processing system exceeds a preset proportion threshold, and obtain a second determination result;

[0170] Calculate the device illegal parameter corresponding to the illegal device; the device illegal parameter is equal to the sum of the first parameter and the second parameter; the first parameter is equal to the first value when the first judgment result is yes; the first parameter is equal to the second value when the first judgment result is no; the second value is greater than the first value; the second parameter is equal to the third value when the second judgment result is yes; the second parameter is equal to the fourth value when the second judgment result is no; the fourth value is less than the third value;

[0171] The reciprocal of the sum of the illegal parameters of all illegal devices is calculated to obtain the device security parameters corresponding to the mirrored data.

[0172] Through the above embodiments, the audit device can calculate the device security parameters corresponding to the mirror data through preset data screening rules and numerical calculation rules, so as to obtain a comprehensive evaluation result of the mirror data later, and can audit the audit traffic data more accurately and comprehensively to achieve a deeper audit effect.

[0173] As an optional embodiment, the audit device determines the specific manner of the operation security parameter corresponding to the mirror data according to multiple transmission intermediate processing operations and preset operation security rules, including:

[0174] For each transmission intermediate processing operation, the operation record data corresponding to the transmission intermediate operation is input into the operation analysis neural network to obtain the operation type and operation object corresponding to the transmission intermediate operation; the operation analysis neural network is trained by a training data set including a plurality of training operation record data and corresponding operation type annotations and operation object annotations;

[0175] Determine whether the operation type belongs to a preset set of legal operation types, and obtain a third determination result;

[0176] Determine whether the operation object is the data content portion corresponding to the mirror data, and obtain a fourth determination result;

[0177] Calculate the illegal operation parameter corresponding to the transmission intermediate processing operation; the illegal operation parameter is equal to the sum of the third parameter and the fourth parameter; the third parameter is equal to the fifth value when the third judgment result is yes; the third parameter is equal to the sixth value when the third judgment result is no; the sixth value is greater than the fifth value; the fourth parameter is equal to the seventh value when the fourth judgment result is yes; the fourth parameter is equal to the eighth value when the fourth judgment result is no; the eighth value is less than the seventh value;

[0178] The reciprocal of the sum of illegal operation parameters corresponding to all transmission intermediate processing operations is calculated to obtain the operation safety parameter corresponding to the mirror data.

[0179] Through the above embodiments, the audit device can calculate the operational security parameters corresponding to the mirror data through the preset neural network algorithm and numerical calculation rules, so as to obtain a comprehensive evaluation result of the mirror data later, and can audit the audit traffic data more accurately and comprehensively to achieve a deeper audit effect.

[0180] As an optional embodiment, the audit device audits the content of the mirror data according to the preset content audit rule to obtain the specific manner of the content security parameter corresponding to the mirror data, including:

[0181] Determine the traffic scenario corresponding to the mirrored data;

[0182] The data content part of the mirror data is input into the content audit neural network corresponding to the corresponding traffic scenario to obtain the content security parameters corresponding to the mirror data; the content audit neural network is trained by a training data set including multiple training data contents of the corresponding traffic scenarios and corresponding content security annotations.

[0183] Through the above embodiments, the audit device can calculate the content security parameters corresponding to the mirror data through a preset neural network algorithm, so as to obtain a comprehensive evaluation result of the mirror data later, and can audit the audit traffic data more accurately and comprehensively to achieve a deeper audit effect.

[0184] As an optional embodiment, the audit device determines the specific manner of the audit analysis result corresponding to the to-be-audited traffic data according to the device security parameter, the operation security parameter, and the content security parameter, including:

[0185] Determine whether the device safety parameter is lower than a preset device parameter threshold value, and obtain a fifth determination result;

[0186] Determine whether the operation safety parameter is lower than a preset operation parameter threshold value to obtain a sixth determination result;

[0187] Determine whether the content security parameter is higher than a preset first content parameter threshold, and obtain a seventh determination result;

[0188] Determine whether the content security parameter is higher than a preset second content parameter threshold, and obtain an eighth determination result; the second content parameter threshold is lower than the first content parameter threshold;

[0189] When the fifth judgment result, the sixth judgment result and the seventh judgment result are all yes, it is determined that the audit analysis result corresponding to the flow data to be audited has been tampered with;

[0190] When the fifth judgment result and the sixth judgment result are both negative, and the seventh judgment result or the eighth judgment result is positive, it is determined that the audit analysis result corresponding to the flow data to be audited is legal;

[0191] When the fifth judgment result and the sixth judgment result are both negative, and the eighth judgment result is negative, it is determined that the audit analysis result corresponding to the flow data to be audited is illegal;

[0192] When it is impossible to determine whether the audit analysis result corresponding to the flow data to be audited is tampered with, illegal, or legal, the mirrored data is sent to a manual audit end device.

[0193] Through the above embodiments, it is possible to comprehensively determine the evaluation results of the audited traffic data based on the device security parameters, operation security parameters and content security parameters corresponding to the mirror data based on the preset multiple judgment rules, thereby being able to audit the audited traffic data more accurately and comprehensively and achieve a more in-depth audit effect.

[0194] Embodiment 2

[0195] See also Figure 2 , Figure 2 1 is a schematic diagram of a flow data processing system based on mirror forwarding disclosed in an embodiment of the present invention. Figure 2 The described system can be applied to corresponding data processing devices, data processing terminals, and data processing servers, and the server can be a local server or a cloud server, which is not limited in the embodiments of the present invention. Figure 2 As shown, the traffic data processing system includes a source data system 20 in a first area and an audit end system 30 in a second area; the source data system 20 includes a network device 202 and a traffic packaging server 203 connected via a switch 201; the audit end system 30 includes a traffic unpacking server 301 and an audit device 302 connected to each other; the traffic packaging server 203 and the traffic unpacking server 301 are communicatively connected.

[0196] The switch 201 is used to obtain the to-be-audited traffic data sent by the network device 202 , mirror-copy the to-be-audited traffic data to obtain mirrored data, and send the mirrored data to the traffic packaging server 203 .

[0197] The traffic packaging server 203 is used to encapsulate and encrypt the mirror data according to the preset traffic encapsulation and encryption rules, obtain encapsulated data, and send the encapsulated data to the traffic depacketization server 301.

[0198] The traffic unpacking server 301 is used to unpack the encapsulated data according to the preset traffic unpacking rules, obtain the mirrored data, and send the mirrored data to the audit device 302.

[0199] The audit device 302 is used to audit the mirrored data according to preset audit rules to obtain audit analysis results corresponding to the flow data to be audited.

[0200] As an optional embodiment, the source data system 20 further includes a virtual switch connected to the switch 201 and the traffic packaging server 203 respectively; the specific manner in which the switch 201 sends the mirror data to the traffic packaging server 203 includes:

[0201] Switch 201 sends the mirrored data to the virtual switch;

[0202] The virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules, and sends the removed mirror data to the traffic packaging server 203 .

[0203] As an optional embodiment, the traffic packaging server 203 encapsulates and encrypts the mirror data according to the preset traffic encapsulation and encryption rules, and obtains the specific method of encapsulating the data, including:

[0204] According to a preset segmentation rule, the mirrored data is segmented and sliced ​​to obtain a plurality of sliced ​​data; the segmentation rule is a sequence segmentation rule or a data packet quantity segmentation rule;

[0205] Based on the nesting rules corresponding to the TCP protocol, each slice data is subjected to label encapsulation processing and encryption processing to obtain encapsulated data; the label encapsulation processing is VLAN labeling processing;

[0206] And, the traffic packaging server 203 implements encapsulation and encryption of the mirror data based on VS / TUN technology;

[0207] And, the traffic depacketizing server 301 depackets the encapsulated data according to the preset traffic depacketizing rule to obtain the specific manner of the mirrored data, including:

[0208] Based on a preset decryption algorithm, the encapsulated data is decrypted to obtain decrypted encapsulated data;

[0209] Based on the preset unpacking algorithm and de-labeling rules, the decrypted encapsulated data is unpacked and de-labeled to obtain the mirrored data.

[0210] As an optional embodiment, the data matching rule includes a data content matching rule and a data source matching rule; the specific manner in which the virtual switch removes illegal data from the mirrored data based on the ACL technology and the preset data matching rule includes:

[0211] Based on ACL technology and data content matching rules, the mirror data is matched to obtain multiple content-unmatched data corresponding to the mirror data;

[0212] Based on ACL technology and data source matching rules, the mirror data is matched to obtain multiple illegal source data corresponding to the mirror data;

[0213] Calculate the intersection data between multiple content-mismatched data and multiple illegal source data, and remove the intersection data;

[0214] Input each data that does not belong to the intersection data among the multiple content-unmatched data and the multiple illegal source data into the trained hazard data recognition neural network to obtain the hazard probability corresponding to each data; the hazard data recognition neural network is trained by a training data set including multiple training data and corresponding hazard labels;

[0215] All data with a probability of harmfulness greater than a preset probability threshold will be eliminated.

[0216] As an optional embodiment, the mirror data includes the mirror data and its transmission record data during the data transmission process; the audit device 302 audits the mirror data according to the preset audit rules to obtain the specific manner of the audit analysis result corresponding to the audited traffic data, including:

[0217] Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data;

[0218] Determine the device security parameters corresponding to the mirrored data according to multiple transmission intermediate devices and preset device security rules;

[0219] Determine the operation security parameters corresponding to the mirror data according to multiple transmission intermediate processing operations and preset operation security rules;

[0220] Audit the content of the image data according to the preset content audit rules to obtain the content security parameters corresponding to the image data;

[0221] Based on the equipment security parameters, operation security parameters and content security parameters, the audit analysis results corresponding to the flow data to be audited are determined.

[0222] As an optional embodiment, the audit device 302 determines the specific manner of the device security parameter corresponding to the mirrored data according to multiple transmission intermediate devices and preset device security rules, including:

[0223] Sending a request to the source data system 20 and the audit end system 30 to obtain a plurality of system processing devices in the source data system 20 and the audit end system 30 that have processed the mirror data;

[0224] Screening out at least one illegal device that is not any system processing device from among the plurality of transmission intermediate devices;

[0225] For each illegal device, obtain the device information and device historical data processing record corresponding to the illegal device;

[0226] Determine, based on the device information, whether the illegal device is in a preset secure data processing system, and obtain a first determination result;

[0227] Determine whether the proportion of the records in which the processed data in the historical data processing records of the device does not belong to the transmission data in the security data processing system exceeds a preset proportion threshold, and obtain a second determination result;

[0228] Calculate the device illegal parameter corresponding to the illegal device; the device illegal parameter is equal to the sum of the first parameter and the second parameter; the first parameter is equal to the first value when the first judgment result is yes; the first parameter is equal to the second value when the first judgment result is no; the second value is greater than the first value; the second parameter is equal to the third value when the second judgment result is yes; the second parameter is equal to the fourth value when the second judgment result is no; the fourth value is less than the third value;

[0229] The reciprocal of the sum of the illegal parameters of all illegal devices is calculated to obtain the device security parameters corresponding to the mirrored data.

[0230] As an optional embodiment, the audit device 302 determines the specific manner of the operation security parameter corresponding to the mirror data according to multiple transmission intermediate processing operations and preset operation security rules, including:

[0231] For each transmission intermediate processing operation, the operation record data corresponding to the transmission intermediate operation is input into the operation analysis neural network to obtain the operation type and operation object corresponding to the transmission intermediate operation; the operation analysis neural network is trained by a training data set including a plurality of training operation record data and corresponding operation type annotations and operation object annotations;

[0232] Determine whether the operation type belongs to a preset set of legal operation types, and obtain a third determination result;

[0233] Determine whether the operation object is the data content portion corresponding to the mirror data, and obtain a fourth determination result;

[0234] Calculate the illegal operation parameter corresponding to the transmission intermediate processing operation; the illegal operation parameter is equal to the sum of the third parameter and the fourth parameter; the third parameter is equal to the fifth value when the third judgment result is yes; the third parameter is equal to the sixth value when the third judgment result is no; the sixth value is greater than the fifth value; the fourth parameter is equal to the seventh value when the fourth judgment result is yes; the fourth parameter is equal to the eighth value when the fourth judgment result is no; the eighth value is less than the seventh value;

[0235] The reciprocal of the sum of illegal operation parameters corresponding to all transmission intermediate processing operations is calculated to obtain the operation safety parameter corresponding to the mirror data.

[0236] As an optional embodiment, the audit device 302 audits the content of the mirror data according to the preset content audit rules to obtain the specific manner of the content security parameters corresponding to the mirror data, including:

[0237] Determine the traffic scenario corresponding to the mirrored data;

[0238] The data content part of the mirror data is input into the content audit neural network corresponding to the corresponding traffic scenario to obtain the content security parameters corresponding to the mirror data; the content audit neural network is trained by a training data set including multiple training data contents of the corresponding traffic scenarios and corresponding content security annotations.

[0239] As an optional embodiment, the audit device 302 determines the specific manner of the audit analysis result corresponding to the to-be-audited traffic data according to the device security parameter, the operation security parameter and the content security parameter, including:

[0240] Determine whether the device safety parameter is lower than a preset device parameter threshold value, and obtain a fifth determination result;

[0241] Determine whether the operation safety parameter is lower than a preset operation parameter threshold value to obtain a sixth determination result;

[0242] Determine whether the content security parameter is higher than a preset first content parameter threshold, and obtain a seventh determination result;

[0243] Determine whether the content security parameter is higher than a preset second content parameter threshold, and obtain an eighth determination result; the second content parameter threshold is lower than the first content parameter threshold;

[0244] When the fifth judgment result, the sixth judgment result and the seventh judgment result are all yes, it is determined that the audit analysis result corresponding to the flow data to be audited has been tampered with;

[0245] When the fifth judgment result and the sixth judgment result are both negative, and the seventh judgment result or the eighth judgment result is positive, it is determined that the audit analysis result corresponding to the flow data to be audited is legal;

[0246] When the fifth judgment result and the sixth judgment result are both negative, and the eighth judgment result is negative, it is determined that the audit analysis result corresponding to the flow data to be audited is illegal;

[0247] When it is impossible to determine whether the audit analysis result corresponding to the flow data to be audited is tampered with, illegal, or legal, the mirrored data is sent to a manual audit end device.

[0248] The technical details and technical effects of the system and device in the embodiments of the present invention can be referred to the description in the first embodiment, and will not be repeated here.

[0249] In a specific embodiment, the flow data processing system can refer to Figure 3 , including the A computer room for processing specific actual business traffic, and the B computer room for auditing traffic. Specifically, the flow data processing steps of the system include:

[0250] 1. Computer room A uses the mirroring function of the switch or the optical splitter to copy the "normal traffic" to the "traffic replication" transmission, and the port of the "traffic replication" is connected to the remote mirroring sending server.

[0251] 2. The sending server in Room A is based on Linux system and has a virtualized environment. It forwards the traffic of the business port to the virtualized switch port through iptables. The virtual switch will filter or discard all illegal and non-public IP packets through ACL, and then send the official traffic to the traffic packaging server.

[0252] 3. The traffic packaging server in computer room A is a virtual server, which will segment and slice the official traffic according to the sequence or number of data packets, and process the segmented traffic. For example, by adding VLAN tag encapsulation methods and encryption methods such as dot1q tags, the mirrored traffic is encapsulated into a normal TCP data packet, and finally the data packet specifies the target server (receiving end), and forwards the traffic to the sending physical port through the real server.

[0253] 4. Computer room A is used as the sender and computer room B is used as the receiver. The sender uses a virtual local area network (VPN or VXLAN) to configure a public or intranet IP address and send the data to the server at the receiver. The traffic will be transmitted through the public or intranet to the remote mirror receiver in the remote data center.

[0254] 5. Room B, which is the receiving physical library at the receiving end, will forward the traffic from the sending end to the virtual switch. The virtual switch will forward the traffic to the traffic depacketization server. The depacketization server will decrypt it using the encryption algorithm, then depacketize and remove the labels of the encapsulated TCP data packets to restore them to real mirrored traffic. Finally, the traffic will be redirected to the business port.

[0255] 6. The business physical port of computer room B is directly connected to the audit physical library of the audit server to confirm whether the traffic can be analyzed successfully.

[0256] The system embodiments described above are only illustrative, wherein the devices described as separate components may or may not be physically separated, and the components shown as devices may or may not be physical devices, that is, they may be located in one place, or they may be distributed on multiple network devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present embodiment without creative work.

[0257] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0258] Finally, it should be noted that the traffic data processing method and system based on mirror forwarding disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traffic data processing method based on mirror forwarding, characterized in that: Applied to a traffic data processing system, the traffic data processing system includes a source data system in a first area and an audit end system in a second area; the source data system includes a network device and a traffic packaging server connected via a switch; The audit end system includes a traffic depacketization server and an audit device connected to each other; The traffic packaging server is communicatively connected to the traffic depacketizing server; the method comprises: The switch obtains the to-be-audited traffic data sent by the network device, performs mirror copying on the to-be-audited traffic data to obtain mirror data, and sends the mirror data to the traffic packaging server; The traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule to obtain encapsulated data, and sends the encapsulated data to the traffic depacketization server; The traffic unpacking server unpacks the encapsulated data according to a preset traffic unpacking rule to obtain the mirror data, and sends the mirror data to the audit device; the mirror data includes the mirror data and its transmission record data during the data transmission process; The audit device audits the mirror data according to the preset audit rules to obtain the audit analysis results corresponding to the traffic data to be audited; the audit device audits the mirror data according to the preset audit rules to obtain the audit analysis results corresponding to the traffic data to be audited, including: Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data; Determining device security parameters corresponding to the mirror data according to the multiple transmission intermediate devices and preset device security rules; Determining, according to the plurality of transmission intermediate processing operations and preset operation security rules, operation security parameters corresponding to the mirror data; Auditing the content of the mirror data according to preset content audit rules to obtain content security parameters corresponding to the mirror data; An audit analysis result corresponding to the flow data to be audited is determined according to the device security parameter, the operation security parameter and the content security parameter.

2. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The source data system further includes a virtual switch connected to the switch and the traffic packaging server respectively; The specific manner in which the switch sends the mirror data to the traffic packaging server includes: The switch sends the mirror data to the virtual switch; The virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules, and sends the removed mirror data to the traffic packaging server.

3. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The traffic packaging server encapsulates and encrypts the mirror data according to a preset traffic encapsulation and encryption rule to obtain the specific method of encapsulating the data, including: According to a preset segmentation rule, the mirrored data is segmented and sliced ​​to obtain a plurality of sliced ​​data; the segmentation rule is a sequence segmentation rule or a data packet quantity segmentation rule; Based on the nesting rules corresponding to the TCP protocol, each of the slice data is subjected to label encapsulation processing and encryption processing to obtain encapsulated data; the label encapsulation processing is VLAN labeling processing; Furthermore, the traffic packaging server implements encapsulation and encryption of the mirror data based on VS / TUN technology; And, the traffic unpacking server unpacks the encapsulated data according to the preset traffic unpacking rule to obtain the specific manner of the mirror data, including: Decrypting the encapsulated data based on a preset decryption algorithm to obtain decrypted encapsulated data; Based on a preset unpacking algorithm and de-labeling rule, the decrypted encapsulated data is unpacked and de-labeled to obtain the mirror data.

4. The method for processing traffic data based on mirror forwarding according to claim 2, characterized in that: The data matching rules include data content matching rules and data source matching rules; the specific manner in which the virtual switch removes illegal data from the mirror data based on ACL technology and preset data matching rules includes: Based on the ACL technology and the data content matching rule, the mirror data is matched to obtain a plurality of content-unmatched data corresponding to the mirror data; Based on ACL technology and the data source matching rule, the mirror data is matched to obtain multiple illegal source data corresponding to the mirror data; Calculating intersection data between the plurality of content-unmatched data and the plurality of illegal source data, and removing the intersection data; Input each data that does not belong to the intersection data among the multiple content-unmatched data and the multiple illegal source data into a trained harmful data identification neural network to obtain the harmfulness probability corresponding to each data; the harmful data identification neural network is trained by a training data set including multiple training data and corresponding harmfulness labels; All data whose harmfulness probability is greater than a preset probability threshold are eliminated.

5. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The audit device determines the specific manner in which the device security parameters corresponding to the mirror data are determined according to the multiple transmission intermediate devices and the preset device security rules, including: Sending a request to the source data system and the audit end system to obtain a plurality of system processing devices in the source data system and the audit end system that have processed the mirror data; Screening out at least one illegal device among the plurality of transmission intermediate devices that is not any of the system processing devices; For each of the illegal devices, obtaining device information and device historical data processing records corresponding to the illegal device; According to the device information, determining whether the illegal device is in a preset secure data processing system to obtain a first determination result; Determine whether the proportion of the records in which the processed data in the historical data processing records of the device does not belong to the transmission data in the security data processing system exceeds a preset proportion threshold, and obtain a second determination result; Calculate an illegal device parameter corresponding to the illegal device; the illegal device parameter is equal to the sum of a first parameter and a second parameter; the first parameter is equal to a first value when the first judgment result is yes; the first parameter is equal to a second value when the first judgment result is no; the second value is greater than the first value; the second parameter is equal to a third value when the second judgment result is yes; the second parameter is equal to a fourth value when the second judgment result is no; the fourth value is less than the third value; The reciprocal of the sum of the illegal parameters of the devices corresponding to all the illegal devices is calculated to obtain the device security parameters corresponding to the mirror data.

6. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The audit device determines a specific manner of the operation security parameter corresponding to the mirror data according to the multiple transmission intermediate processing operations and the preset operation security rules, including: For each of the transmission intermediate processing operations, the operation record data corresponding to the transmission intermediate operation is input into the operation analysis neural network to obtain the operation type and operation object corresponding to the transmission intermediate operation; the operation analysis neural network is trained by a training data set including a plurality of training operation record data and corresponding operation type annotations and operation object annotations; Determine whether the operation type belongs to a preset set of legal operation types, and obtain a third determination result; Determine whether the operation object is a data content portion corresponding to the mirror data, and obtain a fourth determination result; Calculate an illegal operation parameter corresponding to the transmission intermediate processing operation; the illegal operation parameter is equal to the sum of the third parameter and the fourth parameter; the third parameter is equal to the fifth value when the third judgment result is yes; the third parameter is equal to the sixth value when the third judgment result is no; the sixth value is greater than the fifth value; the fourth parameter is equal to the seventh value when the fourth judgment result is yes; the fourth parameter is equal to the eighth value when the fourth judgment result is no; the eighth value is less than the seventh value; The reciprocal of the sum of the illegal operation parameters corresponding to all the transmission intermediate processing operations is calculated to obtain the operation safety parameter corresponding to the mirror data.

7. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The audit device audits the content of the mirror data according to the preset content audit rule to obtain the specific manner of the content security parameter corresponding to the mirror data, including: Determine the traffic scenario corresponding to the mirrored data; The data content portion of the mirror data is input into a content audit neural network corresponding to a corresponding traffic scenario to obtain content security parameters corresponding to the mirror data; the content audit neural network is trained using a training data set including multiple training data contents of corresponding traffic scenarios and corresponding content security annotations.

8. The method for processing traffic data based on mirror forwarding according to claim 1, characterized in that: The audit device determines a specific manner of the audit analysis result corresponding to the to-be-audited traffic data according to the device security parameter, the operation security parameter, and the content security parameter, including: Determine whether the device safety parameter is lower than a preset device parameter threshold, and obtain a fifth determination result; Determining whether the operation safety parameter is lower than a preset operation parameter threshold value to obtain a sixth determination result; Determine whether the content security parameter is higher than a preset first content parameter threshold, and obtain a seventh determination result; Determine whether the content security parameter is higher than a preset second content parameter threshold, and obtain an eighth determination result; the second content parameter threshold is lower than the first content parameter threshold; When the fifth judgment result, the sixth judgment result and the seventh judgment result are all yes, it is determined that the audit analysis result corresponding to the flow data to be audited has been tampered with; When the fifth judgment result and the sixth judgment result are both negative, and the seventh judgment result or the eighth judgment result is positive, determining that the audit analysis result corresponding to the flow data to be audited is legal; When the fifth judgment result and the sixth judgment result are both negative, and the eighth judgment result is negative, determining that the audit analysis result corresponding to the to-be-audited traffic data is illegal; When it is impossible to determine whether the audit analysis result corresponding to the flow data to be audited is tampered with, illegal or legal, the mirror data is sent to a manual audit terminal device.

9. A traffic data processing system based on mirror forwarding, characterized in that: The system includes a source data system in a first area and an audit end system in a second area; the source data system includes a network device and a traffic packaging server connected via a switch; the audit end system includes a traffic depacketizing server and an audit device connected to each other; the traffic packaging server is in communication connection with the traffic depacketizing server; The switch is used to obtain the flow data to be audited sent by the network device, mirror the flow data to be audited to obtain mirror data, and send the mirror data to the flow packaging server; The traffic packaging server is used to encapsulate and encrypt the mirror data according to a preset traffic encapsulation and encryption rule to obtain encapsulated data, and send the encapsulated data to the traffic depackaging server; The traffic unpacking server is used to unpack the encapsulated data according to a preset traffic unpacking rule to obtain the mirror data, and send the mirror data to the audit device; The mirror data includes the mirror data and its transmission record data during the data transmission process; The audit device is used to audit the mirror data according to preset audit rules to obtain the audit analysis results corresponding to the flow data to be audited; The audit device audits the mirror data according to the preset audit rules to obtain the audit analysis result corresponding to the flow data to be audited, including: Determining, according to the transmission record data corresponding to the mirror data, a plurality of transmission intermediate devices and a plurality of transmission intermediate processing operations corresponding to the mirror data; Determining device security parameters corresponding to the mirror data according to the multiple transmission intermediate devices and preset device security rules; Determining, according to the plurality of transmission intermediate processing operations and preset operation security rules, operation security parameters corresponding to the mirror data; Auditing the content of the mirror data according to preset content audit rules to obtain content security parameters corresponding to the mirror data; An audit analysis result corresponding to the flow data to be audited is determined according to the device security parameter, the operation security parameter and the content security parameter.